Compare commits

...

3 Commits

6 changed files with 275 additions and 77 deletions

View File

@ -168,7 +168,7 @@
</div>
</a-col>
<a-col :span="2">
</a-col>
<a-col :span="10">
<div class="upload-form-by-database">
@ -210,15 +210,15 @@
<a-form-item label="图层数据" name="relationTable">
<a-input v-model:value="uploadFrom.relationTable">
<template #addonAfter >
<PlusOutlined @click="handlerGetExistsTableList()" />
<PlusOutlined @click="handlerGetExistsTableList('relationTable')" />
</template>
</a-input>
</a-form-item>
<a-form-item label="属性数据">
<a-input v-model:value="uploadFrom.attributeTable">
<a-input v-model:value="uploadFrom.attributeTable" @change="handlerGetAttributeFields">
<template #addonAfter >
<PlusOutlined @click="handlerGetExistsTableList()" />
<PlusOutlined @click="handlerGetExistsTableList('attributeTable')" />
</template>
</a-input>
</a-form-item>
@ -242,33 +242,7 @@
</div>
<a-modal :open="openSelectTable" title="请选择数据表" @cancel="handlerCancleSelectTable" @ok="handlerSelectTable" width="1000px">
<!-- <div>
<a-form
layout="inline"
>
<a-form-item>
<a-input v-model:value="formState.user" placeholder="">
<template #prefix><UserOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
</a-input>
</a-form-item>
<a-form-item>
<a-input v-model:value="formState.password" type="password" placeholder="Password">
<template #prefix><LockOutlined style="color: rgba(0, 0, 0, 0.25)" /></template>
</a-input>
</a-form-item>
<a-form-item>
<a-button
type="primary"
html-type="submit"
:disabled="formState.user === '' || formState.password === ''"
>
Log in
</a-button>
</a-form-item>
</a-form>
</div> -->
<a-modal :open="openSelectTable" title="请选择数据表" @cancel="handlerCancleSelectTable" @ok="handlerSelectTable" width="1000px" :searchInfo="searchInfo">
<BasicTable @register="registerImportTable" />
</a-modal>
@ -300,8 +274,8 @@
import { getOutKeyList } from '@/api/formdesign/index';
const filedOptions = ref([])
getOutKeyList({tableNames:"drone_caseinfo_single",dbCode:"hcsystemdb"}).then(res=>{
filedOptions.value = res[0].db_codecolumnsList
const searchInfo = ref({
code:"hcsystemdb"
})
import {
getDataBaseTableList,
@ -309,16 +283,9 @@
importDataBaseTable,
} from '@/api/formdesign/index';
const dataSource = reactive([
{
"tablename":"monitor"
},
{
"tablename":"monitor0527"
},
])
const openSelectTable = ref<boolean>(false)
const openSelectTable = ref<boolean>(false);
const openSelectAttributeTable = ref<boolean>(false);
const columns = reactive([
{
@ -369,25 +336,33 @@
api: getImportBaseTableList,
formConfig: {
labelWidth: 80,
schemas:[
{
field:"code",
label:"数据库",
component:"Select",
colProps:{span:6},
},{
field: 'key',
label: '数据表名',
component: 'Input',
colProps: { span: 6 },
}
],
},
useSearchForm: true,
columns: importColumns,
size: 'small',
rowSelection: {
type: 'radio',
},
useSearchForm: false,
showTableSetting: false,
canResize: false,
bordered: true,
pagination: {
pageSize: 10,
},
beforeFetch: () => {
var temp = {
code: "hcsystemdb",
};
return temp;
},
});
@ -635,22 +610,35 @@ const submitDataList = () => {
}
//
const handlerGetExistsTableList = (record )=>{
const currentTableType = ref<string>();
const handlerGetExistsTableList = (type)=>{
currentTableType.value = type;
openSelectTable.value = true;
uploadFrom.tableName = record.tablename
}
const handlerSelectTable = ()=> {
const handlerGetAttributeFields = (e)=>{
if(uploadFrom.attributeTable){
getOutKeyList({tableNames:uploadFrom.attributeTable,dbCode:"hcsystemdb"}).then(res=>{
filedOptions.value = res[0].db_codecolumnsList
})
}
}
const handlerSelectTable = ()=> {
let table = getImportSelectRows();
uploadFrom.relationTable = table[0].name
uploadFrom[currentTableType.value] = table[0].name
if(currentTableType.value == 'attributeTable'){
if(uploadFrom.attributeTable){
getOutKeyList({tableNames:uploadFrom.attributeTable,dbCode:"hcsystemdb"}).then(res=>{
filedOptions.value = res[0].db_codecolumnsList
})
}
}
openSelectTable.value = false;
}
const handlerCancleSelectTable = ()=>{
openSelectTable.value = false;
}
</script>
<style lang="scss" scoped>

View File

@ -109,8 +109,6 @@
default: '',
},
});
console.log("mapConfig",props.mapConfig);
let nextMapControl: Array<any> = reactive([]);
nextMapControl = props.control
@ -142,7 +140,7 @@
// emit
//
const emit = defineEmits(['mapOnLoad', 'mapDraw', 'handlerDrawComplete']);
const emit = defineEmits(['mapOnLoad', 'mapDraw', 'handlerDrawComplete','handlerGetFormDetail']);
onMounted(() => {
mapboxgl.accessToken = MapboxConfig.ACCESS_TOKEN;
@ -269,12 +267,23 @@
map.on("click",item.layer.id,(e)=>{
let state = findLayerAttributeInfo(applicationLayers,e.features[0].layer.id);
if(state){
let formDetailParams = {
attributeTable:state.attributeTable,
attributeField:state.attributeField,
value:e.features[0].properties.gid
}
//
emit("handlerGetFormDetail",formDetailParams)
createMessage.success("数据表:"+state.attributeTable+";查询字段:"+state.attributeField+"字段值:"+e.features[0].properties.gid)
console.log("EVEVEVE",state);
}else{
createMessage.warning("当前点击图层未绑定信息");
}
console.log("e.features[0]",e.features[0]);
// console.log("EVEVEVE",state);
// console.log("EVEVEVE",e.features);
})
})
});

View File

@ -17,11 +17,8 @@
/>
<LayerControl @draw="handlerDrawPolygon" />
<UseModal v-model:openModal="openModal" @changeOpenModal="changeOpenModal" />
<InsertShp v-model:openModal="insertShpModal" />
<!-- <AddLayer v-model:openModal="insertShpModal" /> -->
<DataListComponent />
<RightShowInfo v-model:openModal="openRightInfo" />
</div>

View File

@ -183,8 +183,36 @@ const currentLayer = ref()
const handlerEditLayer = (item) => {
currentLayer.value = item;
let layerJson = JSON.parse(currentLayer.value?.style);
// idtilessource-layerstate
console.log("currentLayer",currentLayer.value);
if(layerJson){
layerJson.id = currentLayer.value?.id;
switch(currentLayer.value?.vectorType){
case '面': layerJson.type = 'fill';
break;
case '线': layerJson.type = 'line';
break;
case '点': layerJson.type = 'symbol';
break;
}
layerJson.source.tiles = [
`http://192.168.10.102:9023/api/DroneCaseinfo/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=${currentLayer.value?.relationTable}&field=\"gid\",`
]
layerJson.state = {
attributeField:currentLayer.value?.attributeField,
attributeTable:currentLayer.value?.attributeTable
}
}
jsonData.value = JSON.stringify(layerJson, null, 4);
handlerRenderLayer();
}

View File

@ -27,7 +27,6 @@
:showOkBtn="false"
:draggable="false"
>
<h1 v-print id="printMe">Hello World Hello World Hello World Hello World</h1>
<a-button type="primary" v-print="printObj"></a-button>
<!-- <CaseView :caseId="caseId"></CaseView> -->
</BasicModal>

View File

@ -133,6 +133,130 @@
</div>
</div>
</div>
<a-modal
v-model:open="printOpen"
title="打印预览"
width="100%"
wrap-class-name="full-modal"
>
<template #footer>
<a-button type="primary" v-print="printObj"></a-button>
</template>
<div id="printMe">
<BasicTable size="small" @register="registerPrintTable" :searchInfo="searchInfo" style="transform: scale(1);">
<template #bodyCell="{ column, record }">
<!-- 乡镇 -->
<template v-if="column.key === 'streetname'">
<a v-if="currentOrgLevel == 'country'" @click="getOrgCaseList(column,record)">{{record.streetname}}</a>
<span v-if="currentOrgLevel == 'street'">{{record.streetname}}</span>
</template>
<!-- 无人机发现数量 -->
<template v-if="column.key === 'allCount'">
<a @click="handlePreViewData(column,record)">{{record.allCount}}</a>
</template>
<!-- 完成外业核查数量 -->
<template v-if="column.key === 'handleStatus'">
<a @click="handlePreViewData(column,record)">{{record.handleStatus}}</a>
</template>
<!-- 24H内为核查 -->
<template v-if="column.key === 'notDealHour24'">
<a @click="handlePreViewData(column,record)">{{record.notDealHour24}}</a>
</template>
<!-- 房屋翻新 -->
<template v-if="column.key === 'typeFanxinCount'">
<a @click="handlePreViewData(column,record)">{{record.typeFanxinCount}}</a>
</template>
<!-- 房屋加盖 -->
<template v-if="column.key === 'typeJiagaiCount'">
<a @click="handlePreViewData(column,record)">{{record.typeJiagaiCount}}</a>
</template>
<!-- 房屋翻建 -->
<template v-if="column.key === 'typeFanjianCount'">
<a @click="handlePreViewData(column,record)">{{record.typeFanjianCount}}</a>
</template>
<!-- 存量建设 -->
<template v-if="column.key === 'typeCunliangCount'">
<a @click="handlePreViewData(column,record)">{{record.typeCunliangCount}}</a>
</template>
<!-- 推土 -->
<template v-if="column.key === 'typeTuituCount'">
<a @click="handlePreViewData(column,record)">{{record.typeTuituCount}}</a>
</template>
<!-- 其他 -->
<!-- <template v-if="column.key === 'typeOtherCount'">
<a @click="handlePreViewData(column,record)">{{record.typeOtherCount}}</a>
</template> -->
<!-- 合法 -->
<template v-if="column.key === 'illegal0Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal0Count}}</a>
</template>
<!-- 违法 -->
<template v-if="column.key === 'illegal1Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal1Count}}</a>
</template>
<!-- 伪变化 -->
<template v-if="column.key === 'illegal2Count'">
<a @click="handlePreViewData(column,record)">{{record.illegal2Count}}</a>
</template>
<!-- 外业核实后确定违法数量 -->
<template v-if="column.key === 'illegal1Count1'">
<a @click="handlePreViewData(column,record)">{{record.illegal1Count}}</a>
</template>
<!-- 违法面积 -->
<!-- <template v-if="column.key === 'illegalHandleAreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandleAreaList}}</a>
</template> -->
<!-- 整改销号数 -->
<template v-if="column.key === 'illegalHandle2Status'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle2Status}}</a>
</template>
<!-- 销号面积 -->
<!-- <template v-if="column.key === 'illegalHandle2AreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle2AreaList}}</a>
</template> -->
<!-- 尚未整改宗数 -->
<template v-if="column.key === 'illegalHandle01Status'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle01Status}}</a>
</template>
<!-- 尚未整改面积 -->
<!-- <template v-if="column.key === 'illegalHandle01AreaList'">
<a @click="handlePreViewData(column,record)">{{record.illegalHandle01AreaList}}</a>
</template> -->
<!-- 3日内未整改完成 -->
<template v-if="column.key === 'notComplete3'">
<a @click="handlePreViewData(column,record)">{{record.notComplete3}}</a>
</template>
<!-- 7日内未整改完成 -->
<template v-if="column.key === 'notComplete7'">
<a @click="handlePreViewData(column,record)">{{record.notComplete7}}</a>
</template>
<!-- 30日内未整改完成 -->
<template v-if="column.key === 'notComplete30'">
<a @click="handlePreViewData(column,record)">{{record.notComplete30}}</a>
</template>
<!-- 30日以上未整改完成 -->
<template v-if="column.key === 'notComplete30More'">
<a @click="handlePreViewData(column,record)">{{record.notComplete30More}}</a>
</template>
</template>
</BasicTable>
</div>
</a-modal>
</div>
</template>
<script lang="ts" setup>
@ -152,6 +276,25 @@
import { columns, columnsDataPreview,searchFormSchema } from './statistical.data';
import {MinusOutlined,CloseOutlined,CloudDownloadOutlined} from '@ant-design/icons-vue'
import print from "vue3-print-nb";
const vPrint = print;
const printOpen = ref<boolean>(false);
const printObj = reactive({
id:"printMe",
popTitle: "",
beforeOpenCallback() {
},
openCallback() {
},
closeCallback() {
}
})
defineOptions({ name: 'RoleManagement' });
let activeKey = ref('0')
@ -168,7 +311,7 @@
const showRecordList = ref<boolean>(false);
const panes = reactive<{ title: string; content: string; key: string; closable?: boolean}[]>([])
const searchParams = ref();
const [registerTable, { reload, getSelectRows, clearSelectedRowKeys, updateTableData}] = useTable({
//
title: '统计报表',
@ -195,10 +338,45 @@
rowSelection: false,
//
handleSearchInfoFn(info) {
searchParams.value = info;
return info;
},
});
const [registerPrintTable] = useTable({
//
title: '',
//
api: getStatisticalList,
// BasicColumn[]
columns,
rowKey: 'id',
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
// 使
useSearchForm: false,
//
showTableSetting: false,
//
pagination:false,
//
bordered: true,
//
showIndexColumn: false,
//
rowSelection: false,
//
handleSearchInfoFn(info) {
searchParams.value = info;
return info;
},
});
const [registerTableDataPreview,{ reloadDataPreview, getSelectRowsDataPreview, clearSelectedRowKeysDataPreview }] = useTable({
//
@ -276,7 +454,7 @@
interface searchListSchema{
is_intact?:number;
streetid?:number;
countryid?:number;
countyid?:number;
identification_start_time?:string;
identification_end_time?:string;
page?:number;
@ -299,17 +477,18 @@
function handlePreViewData(column,record:Recordable){
const searchForm = reactive<searchListSchema>({
identification_start_time:"",
identification_end_time:"",
identification_start_time:searchParams.value?.identification_start_time,
identification_end_time:searchParams.value?.identification_end_time,
is_intact:1,
page:1,
limit:10,
})
if(currentOrgLevel.value == 'country'){
searchForm.countryid = record.streetid;
searchForm.countyid = record.streetid;
}else if(currentOrgLevel.value == 'street'){
searchForm.streetid = record.streetid;
}
@ -409,10 +588,8 @@
}else if(currentOrgLevel.value == 'street'){
currentOrgLevel.value = 'country'
}
searchInfo.countyid = record.streetid;
reload();
}
function handleCloseAllRecordList(){
for(let i=0;i<tablist.length;i++){
@ -456,7 +633,7 @@
}
function handlePrint(){
printOpen.value = true;
}
function handleExport(){
@ -496,7 +673,7 @@
});
break;
case 'btnPrint':
handlePrint();
handlePrint();
break;
case 'btnExport':
handleExport();