Compare commits

...

2 Commits

Author SHA1 Message Date
徐景良 3d9fb512cb Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua 2024-07-30 17:29:45 +08:00
徐景良 3f0395337b merge 2024-07-30 17:29:41 +08:00
12 changed files with 550 additions and 19 deletions

View File

@ -135,7 +135,8 @@
const VITE_GLOB_API_URL_VAR = ref<String>(VITE_GLOB_API_URL+"/");
const mapContainerName = ref<String>()
mapContainerName.value = "mapContainer"+generateUUID();
mapContainerName.value = "mapContainer-"+generateUUID();
const openModal = ref(false);
const insertShpModal = ref(false);

View File

@ -0,0 +1,536 @@
<template>
<div class="map-list-content">
<div class="rollback">
<Icon
style="font-size: 20px; cursor: pointer"
icon="ant-design:arrow-left-outlined"
@click="emits('closeShowInfo', false)"
/>
</div>
<div class="screen-div">
<div class="screen-item">
<div class="screen-item-label">年份</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.year"
:options="yearOptions"
@change="(value) => emits('mapListScreenChange',value,'year')"
/>
</div>
<!-- <div class="screen-item">
<div class="screen-item-label">批次</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.batch"
:options="batchOptions"
@change="(value) => emits('mapListScreenChange',value,'batch')"
/>
</div> -->
<div class="screen-item">
<div class="screen-item-label">图斑号</div>
<a-input
allowClear
v-model:value="props.infoScreenData.mapNo"
style="flex: 1;"
@change="(value) => emits('mapListScreenChange',value.target.value,'mapNo')"/>
</div>
<!-- <div class="screen-item" >
<div class="screen-item-label">市级区划</div>
<a-select
disabled
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.countyId"
:options="props.municipalAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'countyId')"
/>
</div> -->
<!-- <div class="screen-item">
<div class="screen-item-label">县级区划</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.streetId"
:options="props.countiesAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'streetId')"
/> -->
<!-- </div> -->
<div class="screen-item" v-if="props.cityType.level >= 0">
<div class="screen-item-label">县级区划</div>
<a-select
:disabled="props.cityType.level >= 1"
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.countyId"
:options="props.countiesAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'countyId')"
/>
</div>
<div class="screen-item" v-if="props.cityType.level >= 1">
<div class="screen-item-label">镇级区划</div>
<a-select
:disabled="props.cityType.level >= 2"
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.streetId"
:options="props.streetsAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'streetId')"
/>
</div>
<div class="screen-item" v-if="props.cityType.level >= 2">
<div class="screen-item-label">街道区划</div>
<a-select
:disabled="props.cityType.level >= 3"
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.communityId"
:options="props.communitiesAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'communityId')"
/>
</div>
<div class="screen-item">
<div class="screen-item-label">图斑类型</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.mapType"
:options="mapTypeOptions"
@change="(value) => emits('mapListScreenChange',value,'mapType')"
/>
</div>
<div class="screen-item" v-if="props.infoScreenData.mapType === 1">
<div class="screen-item-label">违法类型</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.illegalType"
:options="illegalTypeOptions"
@change="(value) => emits('mapListScreenChange',value,'illegalType')"
/>
</div>
<div class="screen-item" v-if="props.infoScreenData.illegalType === 0">
<div class="screen-item-label">整改措施</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.measure"
:options="measureOptions"
@change="(value) => emits('mapListScreenChange',value,'measure')"
/>
</div>
<div class="screen-item">
<div class="screen-item-label">图斑状态</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.mapStatus"
:options="mapStatusOptions"
@change="(value) => emits('mapListScreenChange',value,'mapStatus')"
/>
</div>
<div class="screen-item">
<div class="screen-item-label">标注类型</div>
<a-select
allowClear
style="flex: 1;"
v-model:value="props.infoScreenData.markType"
:options="markTypeOptions"
@change="(value) => emits('mapListScreenChange',value,'markType')"
/>
</div>
<div class="screen-button-div">
<!-- <a-button type="primary" size="small" @click="emits('closeShowInfo', false)">返回</a-button> -->
<a-button type="primary" size="small" @click="dataListSort('area')" >
{{`排序(图斑面积) ${props.infoScreenData.sort === 'area'? orderMark(): '-'}`}}
</a-button>
<a-button type="primary" size="small" @click="dataListSort('gengdi_area')">
{{`排序(耕地面积) ${props.infoScreenData.sort === 'gengdi_area'? orderMark(): '-'}`}}
</a-button>
<!-- <a-button type="primary" size="small">导出</a-button> -->
<a-button type="primary" :style="openCollect && 'background: #bf0000;' " size="small" @click="getCollectList"></a-button>
<a-button size="small" @click="emits('getInfoList')"></a-button>
<a-button size="small" @click="emits('resetScreenData')"></a-button>
<!-- <div style="width: 30px;height: 100%"></div> -->
</div>
</div>
<div class="data-list-div">
<div v-for="(item, index) in props.infoDataList" :key="index" class="data-list-item">
<div class="select-mark"></div>
<Icon style="font-size: 30px; color: #086DEC" icon="gis:poi-alt" @click="locationFun(item)" />
<div class="data-list-item-content">
<div class="item-info-div">
<div class="item-info-id">{{ item.case_no }}</div>
<div class="item-info-layout">
<div class="item-info-batch">
<a-tag color="blue" v-if="item.address">
{{ item.address }}
</a-tag>
</div>
<div class="item-info-batch">
<a-tag color="green" v-if="item.case_name">
{{ item.case_name }}
</a-tag>
</div>
</div>
</div>
<div class="item-data-div">
<div class="item-data-item" v-if="item.area">
<div class="item-mark-div sum-mark"></div>
<div class="area-data">{{ item.area}}</div>
</div>
<div class="item-data-item" v-if="item.gengdi_area">
<div class="item-mark-div plowland-mark"></div>
<div class="area-data">{{ item.gengdi_area}}</div>
</div>
<div class="item-data-item" v-if="item.yongjiujibennongtian_area">
<div class="item-mark-div farmland-mark"></div>
<div class="area-data">{{ item.yongjiujibennongtian_area}}</div>
</div>
<div class="item-data-item" v-if="item.zhongdianquyu_area">
<div class="item-mark-div focus-area"></div>
<div class="area-data">{{ item.zhongdianquyu_area}}</div>
</div>
<div class="item-data-item" v-if="item.guotukongjianguihua_area">
<div class="item-mark-div padding-mark"></div>
<div class="area-data">{{ item.guotukongjianguihua_area}}</div>
</div>
<div class="item-data-item" v-if="item.shengtaibaohuhongxian_area">
<div class="item-mark-div adjust-mark"></div>
<div class="area-data">{{ item.shengtaibaohuhongxian_area}}</div>
</div>
</div>
</div>
<div class="button-div">
<StarFilled v-if="item.Fid" style="color: #F20C00;cursor: pointer;" @click="cancelCollectItem(item)"/>
<StarOutlined v-else class="collect-button" @click="collectItem(item)"/>
<Icon style="font-size: 20px;cursor: pointer;" icon="bx:detail" @click="showInfo(item)"/>
</div>
</div>
</div>
<div class="pagination-div">
<a-pagination
size="small"
v-model:pageSize="props.pageSize"
v-model:current="props.pageNo"
:total="props.total"
show-size-changer
show-quick-jumper
@change="changePage" />
</div>
<a-modal
style="width:100vw;top:0px;left:0px;margin:0px;padding:0px;"
wrap-class-name="full-modal"
v-model:open="showInfoOpen"
title="详情"
:footer="null"
:maskClosable="true"
:destroyOnClose="true"
@cancel="showInfoOpen = false"
>
<div class="modal-content">
<ShowInfoModal :showInfoData="showInfoData"/>
</div>
</a-modal>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, defineEmits, defineProps, computed } from "vue"
import { StarOutlined, StarFilled } from '@ant-design/icons-vue';
import Icon from '@/components/Icon/Icon.vue';
import { addCaseFavorite,getCaseInfoById, deleteFavoriteCase } from '@/api/bootstraps/index.ts';
import {
batchOptions,
yearOptions,
mapTypeOptions,
illegalTypeOptions,
measureOptions,
mapStatusOptions,
markTypeOptions,
} from '@/views/demo/bootstraps/curbspotcity/util.ts'
import { useUserStore } from '@/store/modules/user.ts'
import { message } from "ant-design-vue";
import ShowInfoModal from './ShowInfoModal/index.vue'
const userStore = useUserStore()
const emits = defineEmits([
"closeShowInfo",
"mapListScreenChange",
"changeInfoPage",
"getInfoList",
"changeTask",
"infoDataListSort",
"collectChange",
"resetScreenData",
])
const props = defineProps([
"infoScreenData",
"cityType",
"municipalAreaOptions",
"countiesAreaOptions",
"streetsAreaOptions",
"communitiesAreaOptions",
"pageNo",
"pageSize",
"total",
"infoDataList"
])
const order = ref(0) // 0: 1: 2:
const orderMark = () => {
switch(order.value){
case 0:
return '-'
case 1:
return '↑'
case 2:
return '↓'
}
}
const showInfoOpen = ref(false)
const openCollect = computed(() => {
if(props.infoScreenData.type === '') return false
return true
})
const showInfoData = ref()
onMounted(() => {
console.log('onMounted')
})
async function locationFun(record) {
console.log(record);
emits('changeTask', record.geomid);
}
const changePage = (page, pageSize) => {
console.log(page,pageSize)
emits('changeInfoPage',page,pageSize)
}
const collectItem = (item) => {
console.log(item)
let userInfo = userStore.getUserInfo
let params = {
id: item.id,
caseNo: item.case_no,
favoriteUserId: userInfo.id
}
addCaseFavorite(params).then(res => {
console.log(res)
message.success('收藏成功')
emits('getInfoList')
})
}
const cancelCollectItem = (item) => {
deleteFavoriteCase(item.Fid).then(res => {
message.success('取消收藏成功')
emits('getInfoList')
})
}
const getCollectList = () => {
let collect = props.infoScreenData.type
let value: number|string = ''
if(collect === ''){
value = 1
}else if(collect === 1){
value = ''
}
emits('collectChange', value)
}
const dataListSort = (type) => {
order.value = (order.value + 1) % 3
emits('infoDataListSort', type, order.value)
}
const showInfo = (item) => {
getCaseInfoById({id:item.id}).then(res => {
showInfoData.value = res
showInfoOpen.value = true
})
}
</script>
<style lang="scss" scoped>
::v-deep .ant-modal {
width: 100vw!important;
top: 0px;
padding: 0px;
margin: 0px;
}
::v-deep .ant-modal-content{
width: 100vw!important;
}
.map-list-content{
height: 100%;
display: flex;
flex-direction: column;
}
.rollback {
background: #fff;
padding: 10px;
}
.screen-div{
padding: 10px;
background: #e6ecfb;
display: flex;
width: 100%;
flex-wrap: wrap;
.screen-item{
width: 50%;
display: flex;
margin-bottom: 3px;
.screen-item-label{
width: 75px;
padding-left: 10px;
display: flex;
align-items: center;
font-size: 15px;
}
}
.screen-button-div{
display: flex;
// justify-content: space-between;
width: 100%;
button{
margin-right: 5px;
}
}
}
.data-list-div{
flex: 1;
overflow: auto;
padding: 10px;
.data-list-item{
display: flex;
height: 90px;
align-items: center;
border-bottom: 1px solid #cdcccc;
.select-mark{
width:3px;
height: 100%;
}
.data-list-item-content{
padding-left: 5px;
width:80%;
.item-info-div{
display: flex;
align-items: center;
margin-bottom: 5px;
.item-info-id{
width: 185px;
/* background: #bf2c64; */
color: #000;
border-radius: 11px;
display: flex;
align-items: center;
// justify-content: center;
height: 22px;
font-weight: 500;
font-size: 15px;
}
.item-info-layout{
padding-left: 15px;
display: flex;
flex: 1;
justify-content: space-between;
}
.item-info-batch{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
.item-data-div{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.item-data-item{
display:flex;
align-items: center;
border-radius: 6px 6px 0px 6px;
border: 1px solid #dddddd;
margin-right: 10px;
.item-mark-div{
width: 20px;
height: 20px;
color: #fff;
border-radius: 4px 4px 0px 4px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 7px;
}
.sum-mark{
background: rgb(46 90 173);
}
.plowland-mark{
background: #01692a;
}
.adjust-mark{
background: #c06b1a;
}
.farmland-mark{
background: #7d2bb1;
}
.focus-area{
background: rgb(225 91 91);
}
.padding-mark{
background: #36afa4;;
}
.area-data{
width: 55px;
}
}
}
}
.button-div{
flex: 1;
width: 100%;
height: 100%;
display: flex;
justify-content: space-evenly;
font-size: 20px;
.collect-button{
color:#086DEC
}
.collect-button:hover{
color: rgb(255, 205, 42)
}
}
}
}
.pagination-div{
height: 60px;
display: flex;
align-items: center;
justify-content: center;
}
.full-modal {
.ant-modal {
min-width: 100vw;
top: 0px;
padding: 0px;
margin: 0px;
}
.ant-modal-content {
display: flex;
flex-direction: column;
}
.ant-modal-body {
flex: 1;
}
}
.modal-content{
padding:15px;
width: 100%;
height: calc(100vh - 65px);
overflow: auto;
}
::v-deep .ant-modal{
min-width:100vw!important;
}
</style>

View File

@ -719,7 +719,7 @@
let getGeomPrams = {
TableName: layer,
FieldName: 'gid',
FieldValue: gids,
FieldValue: gids?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -135,7 +135,7 @@
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: val,
FieldValue: val?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -138,7 +138,7 @@
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: val,
FieldValue: val?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -285,7 +285,7 @@
:destroyOnClose="true"
@cancel="showSplitPolygon = false"
>
<div class="modal-content">
<div class="modal-content" v-if="showSplitPolygon">
<SplitPolygonModal :showInfoData="showInfoData" @closeModal="handlerSplitComplete"/>
</div>
</a-modal>

View File

@ -290,7 +290,7 @@
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: val,
FieldValue: val?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -428,7 +428,7 @@
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: props.showInfoData.geomid,
FieldValue: props.showInfoData.geomid?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -451,7 +451,7 @@
</template>
<script setup lang="ts">
import { defineProps, ref, computed, defineEmits } from 'vue';
import {onMounted, defineProps, ref, computed, defineEmits } from 'vue';
import axios from 'axios';
import MapboxMap from '@/components/MapboxMaps/MapComponent.vue';
import { getConfig } from '@/api/sys/layerManagement';
@ -654,16 +654,10 @@
if (props.showInfoData.geomid) {
let geomids = "";
if(props.showInfoData.geomid.match(",")){
geomids = props.showInfoData.geomid.split(",");
}else{
geomids = [props.showInfoData.geomid];
}
let getGeomPrams = {
TableName: "drone_shp_data",
FieldName: 'gid',
FieldValue: geomids,
FieldValue: props.showInfoData.geomid?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -391,7 +391,7 @@
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: val,
FieldValue: val?.split(","),
page: 1,
limit: 999,
key: null,

View File

@ -196,7 +196,7 @@ function handlerLoadPolygon(code="",filter="",type=""){
})
map.on("click","historyLayerFill",(e)=>{
console.log("eee123",e.features[0])
})
}

View File

@ -69,7 +69,7 @@
position:absolute;
top:50px;
left:50%;
transform: translate( calc( -50% - 580px),0);
transform: translate( calc( -50% - 570px),0);
.category-item{
float:left;
width:138px;
@ -88,7 +88,7 @@
position:absolute;
top:50px;
right:50%;
transform: translate( calc( 50% + 580px),0);
transform: translate( calc( 50% + 570px),0);
.category-item{
float:left;
width:138px;