云查询管理-弹窗-部分下拉框显示内容修改

dianlixunjian
滕嵩 2024-08-28 17:14:36 +08:00
parent 5b4c8cd811
commit 8f1cfcc373
2 changed files with 22 additions and 5 deletions

View File

@ -78,7 +78,7 @@
v-model:value="props.modalData.data.classField"
placeholder="请先选择图层"
:options="classFieldOptioins"
:fieldNames="{ label: 'column_name', value: 'column_name' }"
:fieldNames="{ label: 'nameAndValue', value: 'column_name' }"
:disabled="props.modalData.data.layer == undefined"
@change="classFieldChange"
/>
@ -96,7 +96,7 @@
v-model:value="props.modalData.data.areaField"
placeholder="请先选择图层"
:options="classFieldOptioins"
:fieldNames="{ label: 'column_name', value: 'column_name' }"
:fieldNames="{ label: 'nameAndValue', value: 'column_name' }"
:disabled="props.modalData.data.layer == undefined"
/>
</a-form-item>
@ -205,7 +205,16 @@
// options
function getClassFieldOptioins(tableName) {
let query = { tableName: tableName };
GetTableAndViewColumnList(query).then((res) => {
GetTableAndViewColumnList(query).then((res: any) => {
if (res) {
res.forEach((element) => {
if (element.description == null) {
element.nameAndValue = element.column_name;
} else {
element.nameAndValue = element.column_name + '(' + element.description + ')';
}
});
}
classFieldOptioins.value = res;
});
}

View File

@ -117,7 +117,9 @@
},
});
}
map.moveLayer(layerName, '');
if (layerName) {
map.moveLayer(layerName, '');
}
};
//
@ -169,7 +171,9 @@
},
});
map.moveLayer('countyLayer');
map.moveLayer(layerName, '');
if (layerName) {
map.moveLayer(layerName, '');
}
}
};
@ -306,6 +310,10 @@
onMounted(() => {
mapboxgl.accessToken = MAPBOX_TOKEN;
map = initMap();
//
handlerDealStreet(null);
handlerDealCountry(null);
// handlerLocation([118.30207505530701, 35.30123435040745], 7.848587811931849);
// map.on('load', () => {
// map.flyTo({
// center: [118.30207505530701, 35.30123435040745],