系统管理添加 地图模块,倾斜摄影,沿程配置
This commit is contained in:
parent
c31d89f364
commit
7af8deb103
@ -13,7 +13,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
master:
|
master:
|
||||||
driverClassName: oracle.jdbc.OracleDriver
|
driverClassName: oracle.jdbc.OracleDriver
|
||||||
url: "${DB_MASTER_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
|
url: "${DB_MASTER_URL:jdbc:oracle:thin:@172.16.31.190:1521/SDLYZ}"
|
||||||
username: "${DB_MASTER_USERNAME:QGC_REFA}"
|
username: "${DB_MASTER_USERNAME:QGC_REFA}"
|
||||||
password: "${DB_MASTER_PASSWORD:Y4M4K1oCkL8U}"
|
password: "${DB_MASTER_PASSWORD:Y4M4K1oCkL8U}"
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
@ -43,7 +43,7 @@ spring:
|
|||||||
connection-properties: oracle.net.CONNECT_TIMEOUT=10000;oracle.jdbc.ReadTimeout=60000;oracle.net.READ_TIMEOUT=60000
|
connection-properties: oracle.net.CONNECT_TIMEOUT=10000;oracle.jdbc.ReadTimeout=60000;oracle.net.READ_TIMEOUT=60000
|
||||||
slave:
|
slave:
|
||||||
driverClassName: oracle.jdbc.OracleDriver
|
driverClassName: oracle.jdbc.OracleDriver
|
||||||
url: "${DB_SLAVE_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
|
url: "${DB_SLAVE_URL:jdbc:oracle:thin:@172.16.31.190:1521/SDLYZ}"
|
||||||
username: "${DB_SLAVE_USERNAME:QGC_REFA}"
|
username: "${DB_SLAVE_USERNAME:QGC_REFA}"
|
||||||
password: "${DB_SLAVE_PASSWORD:Y4M4K1oCkL8U}"
|
password: "${DB_SLAVE_PASSWORD:Y4M4K1oCkL8U}"
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
26
frontend/src/api/system/map/ConfigManagement/index.ts
Normal file
26
frontend/src/api/system/map/ConfigManagement/index.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 获取所有沿程配置数据
|
||||||
|
export function getAllConfigTree(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/dec-lygk-base-server/base/msalongb/GetKendoList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 保存沿程配置
|
||||||
|
export function saveBaseWbsb(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/dec-lygk-base-server/base/wbsb/addOrUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除沿程配置
|
||||||
|
export function deleteBaseWbsb(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/dec-lygk-base-server/base/wbsb/delete',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 获取所有地图 图例树
|
// 获取所有地图 图层树
|
||||||
export function getAllMapLayerTree(data: any) {
|
export function getAllMapLayerTree(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLayer/getAllMapLayerTree',
|
url: '/api/wmp-sys-server/mapLayer/getAllMapLayerTree',
|
||||||
@ -8,7 +8,7 @@ export function getAllMapLayerTree(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 保存地图 图例
|
// 保存地图 图层
|
||||||
export function saveMapLayer(data: any) {
|
export function saveMapLayer(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLayer/save',
|
url: '/api/wmp-sys-server/mapLayer/save',
|
||||||
@ -16,7 +16,7 @@ export function saveMapLayer(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 删除地图 图例
|
// 删除地图 图层
|
||||||
export function deleteMapLayer(data: any) {
|
export function deleteMapLayer(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLayer/delete',
|
url: '/api/wmp-sys-server/mapLayer/delete',
|
||||||
@ -24,11 +24,11 @@ export function deleteMapLayer(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 获取所有地图 图例树
|
// 获取所有地图 图层树
|
||||||
export function getAllMapLegendParentIdTree(data: any) {
|
export function getAllMapLayerParentIdTree(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLegend/getAllMapLegendTree',
|
url: '/api/wmp-sys-server/mapLayer/getAllMapLayerTree',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 获取所有地图 图层
|
// 获取所有地图 图例树
|
||||||
export function getAllMapLegendTree(data: any) {
|
export function getAllMapLegendTree(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLegend/GetKendoList',
|
url: '/api/wmp-sys-server/mapLegend/GetKendoList',
|
||||||
@ -8,7 +8,7 @@ export function getAllMapLegendTree(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 保存地图 图层
|
// 保存地图 图例
|
||||||
export function saveMapLegend(data: any) {
|
export function saveMapLegend(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLegend/save',
|
url: '/api/wmp-sys-server/mapLegend/save',
|
||||||
@ -16,7 +16,7 @@ export function saveMapLegend(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 删除地图 图层
|
// 删除地图 图例
|
||||||
export function deleteMapLegend(data: any) {
|
export function deleteMapLegend(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLegend/delete',
|
url: '/api/wmp-sys-server/mapLegend/delete',
|
||||||
@ -24,3 +24,12 @@ export function deleteMapLegend(data: any) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取所有地图 图例树
|
||||||
|
export function getAllMapLegendParentIdTree(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/wmp-sys-server/mapLegend/getAllMapLegendTree',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
26
frontend/src/api/system/map/TiltPhotoManagement/index.ts
Normal file
26
frontend/src/api/system/map/TiltPhotoManagement/index.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 获取所有倾斜摄影
|
||||||
|
export function getAllTiltPhotoTree(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/wmp-sys-server/sys/oblique/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 保存倾斜摄影
|
||||||
|
export function saveTiltPhoto(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/wmp-sys-server/sys/oblique/addOrUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除倾斜摄影
|
||||||
|
export function deleteTiltPhoto(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/api/wmp-sys-server/sys/oblique/delete',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -43,7 +43,7 @@
|
|||||||
:allow-clear="item.fieldProps?.allowClear"
|
:allow-clear="item.fieldProps?.allowClear"
|
||||||
:presets="item.presets"
|
:presets="item.presets"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="val => triggerManualValuesChange(item.name, val)"
|
@change="(val) => triggerManualValuesChange(item.name, val)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 日期范围选择器 -->
|
<!-- 日期范围选择器 -->
|
||||||
@ -58,7 +58,7 @@
|
|||||||
:allow-clear="item.fieldProps?.allowClear"
|
:allow-clear="item.fieldProps?.allowClear"
|
||||||
:presets="item.presets"
|
:presets="item.presets"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="val => triggerManualValuesChange(item.name, val)"
|
@change="(val) => triggerManualValuesChange(item.name, val)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 普通输入框 -->
|
<!-- 普通输入框 -->
|
||||||
@ -68,16 +68,11 @@
|
|||||||
:placeholder="item.placeholder || '请输入'"
|
:placeholder="item.placeholder || '请输入'"
|
||||||
:allow-clear="item.fieldProps?.allowClear"
|
:allow-clear="item.fieldProps?.allowClear"
|
||||||
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
||||||
@change="
|
@change="(e) => triggerManualValuesChange(item.name, e.target.value)"
|
||||||
e => triggerManualValuesChange(item.name, e.target.value)
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 电站下拉框 -->
|
<!-- 电站下拉框 -->
|
||||||
<div
|
<div class="flex gap-[10px]" v-else-if="item.type === 'waterStation'">
|
||||||
class="flex gap-[10px]"
|
|
||||||
v-else-if="item.type === 'waterStation'"
|
|
||||||
>
|
|
||||||
<a-form-item-rest>
|
<a-form-item-rest>
|
||||||
<!-- 基地下拉框 -->
|
<!-- 基地下拉框 -->
|
||||||
<!-- <a-select
|
<!-- <a-select
|
||||||
@ -173,7 +168,7 @@
|
|||||||
:placeholder="item.placeholder || '请选择'"
|
:placeholder="item.placeholder || '请选择'"
|
||||||
:allow-clear="item.fieldProps?.allowClear"
|
:allow-clear="item.fieldProps?.allowClear"
|
||||||
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
||||||
@change="val => triggerManualValuesChange(item.name, val)"
|
@change="(val) => triggerManualValuesChange(item.name, val)"
|
||||||
show-search
|
show-search
|
||||||
:filter-option="filterOption"
|
:filter-option="filterOption"
|
||||||
>
|
>
|
||||||
@ -199,15 +194,13 @@
|
|||||||
item.fieldNames || {
|
item.fieldNames || {
|
||||||
label: 'label',
|
label: 'label',
|
||||||
value: 'value',
|
value: 'value',
|
||||||
children: 'children'
|
children: 'children',
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:show-search="item.showSearch !== false"
|
:show-search="item.showSearch !== false"
|
||||||
:multiple="item.multiple"
|
|
||||||
:tree-checkable="item.treeCheckable"
|
:tree-checkable="item.treeCheckable"
|
||||||
:check-strictly="item.checkStrictly"
|
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
@change="val => triggerManualValuesChange(item.name, val)"
|
@change="(val) => triggerManualValuesChange(item.name, val)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 单选框 -->
|
<!-- 单选框 -->
|
||||||
@ -215,15 +208,9 @@
|
|||||||
v-else-if="item.type === 'Radio'"
|
v-else-if="item.type === 'Radio'"
|
||||||
v-model:value="formData[item.name]"
|
v-model:value="formData[item.name]"
|
||||||
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
:style="{ width: item.width ? item.width + 'px' : '200px' }"
|
||||||
@change="
|
@change="(e) => triggerManualValuesChange(item.name, e.target.value)"
|
||||||
e => triggerManualValuesChange(item.name, e.target.value)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<a-radio
|
|
||||||
v-for="opt in item.options"
|
|
||||||
:key="opt.value"
|
|
||||||
:value="opt.value"
|
|
||||||
>
|
>
|
||||||
|
<a-radio v-for="opt in item.options" :key="opt.value" :value="opt.value">
|
||||||
{{ opt.label }}
|
{{ opt.label }}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
@ -257,16 +244,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed, reactive, watch, onMounted, nextTick } from 'vue';
|
import { ref, computed, reactive, watch, onMounted, nextTick } from "vue";
|
||||||
import { useShuJuTianBaoStore } from '@/store/modules/shuJuTianBao';
|
import { useShuJuTianBaoStore } from "@/store/modules/shuJuTianBao";
|
||||||
const shuJuTianBaoStore = useShuJuTianBaoStore();
|
const shuJuTianBaoStore = useShuJuTianBaoStore();
|
||||||
|
|
||||||
// --- 类型定义 ---
|
// --- 类型定义 ---
|
||||||
export interface SearchItem {
|
export interface SearchItem {
|
||||||
type?: 'Input' | 'Select' | 'TreeSelect' | 'DataPicker' | string;
|
type?: "Input" | "Select" | "TreeSelect" | "DataPicker" | string;
|
||||||
name: string;
|
name: string;
|
||||||
label: string;
|
label: string;
|
||||||
picker?: 'year' | 'month' | 'date' | 'week';
|
picker?: "year" | "month" | "date" | "week";
|
||||||
fieldProps?: any;
|
fieldProps?: any;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
span?: number;
|
span?: number;
|
||||||
@ -304,13 +291,13 @@ interface Props {
|
|||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
initialValues: () => ({}),
|
initialValues: () => ({}),
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
showReset: true
|
showReset: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'finish', values: any): void;
|
(e: "finish", values: any): void;
|
||||||
(e: 'valuesChange', changedValues: any, allValues: any): void;
|
(e: "valuesChange", changedValues: any, allValues: any): void;
|
||||||
(e: 'reset'): void;
|
(e: "reset"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const formRef = ref<any>();
|
const formRef = ref<any>();
|
||||||
@ -323,7 +310,7 @@ const filterOption = (inputValue: string, option: any) => {
|
|||||||
};
|
};
|
||||||
// 2. 创建计算属性,自动过滤掉 false/null/undefined 的项
|
// 2. 创建计算属性,自动过滤掉 false/null/undefined 的项
|
||||||
const validSearchList = computed(() => {
|
const validSearchList = computed(() => {
|
||||||
return props.searchList.filter(item => item);
|
return props.searchList.filter((item) => item);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- 初始化逻辑 ---
|
// --- 初始化逻辑 ---
|
||||||
@ -331,14 +318,14 @@ const initForm = () => {
|
|||||||
const initial = JSON.parse(JSON.stringify(props.initialValues || {}));
|
const initial = JSON.parse(JSON.stringify(props.initialValues || {}));
|
||||||
|
|
||||||
// 1. 清空 formData
|
// 1. 清空 formData
|
||||||
Object.keys(formData).forEach(key => delete formData[key]);
|
Object.keys(formData).forEach((key) => delete formData[key]);
|
||||||
|
|
||||||
// 2. 赋值初始数据
|
// 2. 赋值初始数据
|
||||||
Object.assign(formData, initial);
|
Object.assign(formData, initial);
|
||||||
|
|
||||||
// 3. 过滤掉 searchList 中为 false/null/undefined 的项,并生成规则
|
// 3. 过滤掉 searchList 中为 false/null/undefined 的项,并生成规则
|
||||||
validSearchList.value.forEach(item => {
|
validSearchList.value.forEach((item) => {
|
||||||
if (item.type == 'waterStation') {
|
if (item.type == "waterStation") {
|
||||||
// 下拉菜单
|
// 下拉菜单
|
||||||
// shuJuTianBaoStore.getBaseOption();
|
// shuJuTianBaoStore.getBaseOption();
|
||||||
shuJuTianBaoStore.getSelectForOption();
|
shuJuTianBaoStore.getSelectForOption();
|
||||||
@ -346,7 +333,7 @@ const initForm = () => {
|
|||||||
}
|
}
|
||||||
if (item.fieldProps?.required) {
|
if (item.fieldProps?.required) {
|
||||||
rules[item.name] = [
|
rules[item.name] = [
|
||||||
{ required: true, message: `${item.label}不能为空`, trigger: 'blur' }
|
{ required: true, message: `${item.label}不能为空`, trigger: "blur" },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -362,7 +349,7 @@ const triggerManualValuesChange = (changedKey: string, newValue: any) => {
|
|||||||
const changedValues = { [changedKey]: newValue };
|
const changedValues = { [changedKey]: newValue };
|
||||||
// 发射事件,传递变更值和当前所有值
|
// 发射事件,传递变更值和当前所有值
|
||||||
// 注意:这里使用 {...formData} 是为了传递当前的最新状态
|
// 注意:这里使用 {...formData} 是为了传递当前的最新状态
|
||||||
emit('valuesChange', changedValues, { ...formData });
|
emit("valuesChange", changedValues, { ...formData });
|
||||||
};
|
};
|
||||||
|
|
||||||
// const dataDimensionDataChange = (value: any) => {
|
// const dataDimensionDataChange = (value: any) => {
|
||||||
@ -376,24 +363,24 @@ const triggerManualValuesChange = (changedKey: string, newValue: any) => {
|
|||||||
|
|
||||||
const lyChange = (value: any) => {
|
const lyChange = (value: any) => {
|
||||||
formData.hbrvcd = value;
|
formData.hbrvcd = value;
|
||||||
formData.rstcd = '';
|
formData.rstcd = "";
|
||||||
shuJuTianBaoStore.getEngOption(formData.hbrvcd);
|
shuJuTianBaoStore.getEngOption(formData.hbrvcd);
|
||||||
|
|
||||||
// 【关键修改】手动触发 valuesChange,因为 a-form-item-rest 阻断了自动监听
|
// 【关键修改】手动触发 valuesChange,因为 a-form-item-rest 阻断了自动监听
|
||||||
triggerManualValuesChange('hbrvcd', formData.hbrvcd);
|
triggerManualValuesChange("hbrvcd", formData.hbrvcd);
|
||||||
};
|
};
|
||||||
|
|
||||||
const stcdIdChange = (value: any) => {
|
const stcdIdChange = (value: any) => {
|
||||||
if (props.zhujianfujian == 'fu') {
|
if (props.zhujianfujian == "fu") {
|
||||||
formData.rstcd = value;
|
formData.rstcd = value;
|
||||||
shuJuTianBaoStore.getFpssOption(formData.hbrvcd, value);
|
shuJuTianBaoStore.getFpssOption(formData.hbrvcd, value);
|
||||||
// 【关键修改】手动触发 valuesChange
|
// 【关键修改】手动触发 valuesChange
|
||||||
triggerManualValuesChange('rstcd', formData.rstcd);
|
triggerManualValuesChange("rstcd", formData.rstcd);
|
||||||
} else {
|
} else {
|
||||||
formData.stcd = value;
|
formData.stcd = value;
|
||||||
shuJuTianBaoStore.getFpssOption(formData.hbrvcd, value);
|
shuJuTianBaoStore.getFpssOption(formData.hbrvcd, value);
|
||||||
// 【关键修改】手动触发 valuesChange
|
// 【关键修改】手动触发 valuesChange
|
||||||
triggerManualValuesChange('stcd', formData.stcd);
|
triggerManualValuesChange("stcd", formData.stcd);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -403,7 +390,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.initialValues,
|
() => props.initialValues,
|
||||||
newVal => {
|
(newVal) => {
|
||||||
if (newVal && formRef.value) {
|
if (newVal && formRef.value) {
|
||||||
formRef.value.setFieldsValue(newVal);
|
formRef.value.setFieldsValue(newVal);
|
||||||
Object.assign(formData, newVal);
|
Object.assign(formData, newVal);
|
||||||
@ -415,11 +402,11 @@ watch(
|
|||||||
// --- 事件处理 ---
|
// --- 事件处理 ---
|
||||||
const handleFinish = (values: any) => {
|
const handleFinish = (values: any) => {
|
||||||
const finalValues = { ...formData, ...values };
|
const finalValues = { ...formData, ...values };
|
||||||
emit('finish', finalValues);
|
emit("finish", finalValues);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleValuesChange = (changedValues: any, allValues: any) => {
|
const handleValuesChange = (changedValues: any, allValues: any) => {
|
||||||
emit('valuesChange', changedValues, allValues);
|
emit("valuesChange", changedValues, allValues);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
@ -428,7 +415,7 @@ const handleReset = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initForm();
|
initForm();
|
||||||
});
|
});
|
||||||
emit('reset');
|
emit("reset");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -436,7 +423,7 @@ defineExpose({
|
|||||||
form: formRef,
|
form: formRef,
|
||||||
formData,
|
formData,
|
||||||
reset: handleReset,
|
reset: handleReset,
|
||||||
submit: () => formRef.value?.submit()
|
submit: () => formRef.value?.submit(),
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,8 @@ import Stroke from 'ol/style/Stroke';
|
|||||||
// ✅ 新增导入
|
// ✅ 新增导入
|
||||||
import Icon from 'ol/style/Icon';
|
import Icon from 'ol/style/Icon';
|
||||||
import Text from 'ol/style/Text';
|
import Text from 'ol/style/Text';
|
||||||
7;
|
import Circle from 'ol/style/Circle';
|
||||||
|
import RegularShape from 'ol/style/RegularShape';
|
||||||
|
|
||||||
// import LayerGroup from 'ol/layer/Group';
|
// import LayerGroup from 'ol/layer/Group';
|
||||||
// import OSM from 'ol/source/OSM';
|
// import OSM from 'ol/source/OSM';
|
||||||
@ -122,7 +123,7 @@ export class MapOl implements MapInterface {
|
|||||||
// 或者使用 constrainResolution: false 允许非整数缩放,获得更丝滑的效果。
|
// 或者使用 constrainResolution: false 允许非整数缩放,获得更丝滑的效果。
|
||||||
const mouseWheelInteraction = new MouseWheelZoom({
|
const mouseWheelInteraction = new MouseWheelZoom({
|
||||||
duration: 100, // 缩放动画持续时间 (ms),Leaflet 默认也有动画
|
duration: 100, // 缩放动画持续时间 (ms),Leaflet 默认也有动画
|
||||||
maxDelta: 0.5,
|
maxDelta: 2,
|
||||||
constrainResolution: false // ✅ 关键:false 允许缩放到非整数级别 (如 4.5, 4.6),实现平滑缩放
|
constrainResolution: false // ✅ 关键:false 允许缩放到非整数级别 (如 4.5, 4.6),实现平滑缩放
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -289,8 +290,9 @@ export class MapOl implements MapInterface {
|
|||||||
vectorLayer = new VectorLayer({
|
vectorLayer = new VectorLayer({
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
zIndex: 100, // 确保点在底图之上
|
zIndex: 100, // 确保点在底图之上
|
||||||
declutter: true,
|
// declutter: true,
|
||||||
style: (feature: any) => this.createPointStyle(feature) // 使用动态样式函数
|
// style: (feature: any) => this.createPointStyle(feature) // 使用动态样式函数
|
||||||
|
style: (feature: any) => this.createPointStyle1(feature) // 使用动态样式函数
|
||||||
});
|
});
|
||||||
this.pointLayerRegistry.set(targetLayerKey, vectorLayer);
|
this.pointLayerRegistry.set(targetLayerKey, vectorLayer);
|
||||||
this.map.addLayer(vectorLayer);
|
this.map.addLayer(vectorLayer);
|
||||||
@ -313,7 +315,7 @@ export class MapOl implements MapInterface {
|
|||||||
const features: Feature[] = [];
|
const features: Feature[] = [];
|
||||||
|
|
||||||
dataArray.forEach((item: any) => {
|
dataArray.forEach((item: any) => {
|
||||||
const { lgtd, lttd, stnm, iconCode, titleName, ennm } = item;
|
let { lgtd, lttd, stnm, iconCode, titleName, ennm } = item;
|
||||||
|
|
||||||
if (lgtd == null || lttd == null) {
|
if (lgtd == null || lttd == null) {
|
||||||
return;
|
return;
|
||||||
@ -490,6 +492,84 @@ export class MapOl implements MapInterface {
|
|||||||
// }
|
// }
|
||||||
return new Style(styleOptions);
|
return new Style(styleOptions);
|
||||||
}
|
}
|
||||||
|
private createPointStyle1(feature: Feature): Style {
|
||||||
|
const color = (feature.get('iconCode') as string) || '#3399CC';
|
||||||
|
const labelText = feature.get('titleName') as string;
|
||||||
|
const buildType = (feature.get('BuildType') as number) ?? 1; // 默认完整圆
|
||||||
|
|
||||||
|
// 缩放相关动态计算
|
||||||
|
const currentZoom = this.view ? this.view.getZoom() : 4.5;
|
||||||
|
let dynamicScale = 0.7 + (currentZoom - 4.5) * 0.08;
|
||||||
|
dynamicScale = Math.max(0.5, Math.min(3.0, dynamicScale));
|
||||||
|
// 底图
|
||||||
|
const fontSize = Math.max(16, Math.min(24, 12 * dynamicScale));
|
||||||
|
const radius = Math.max(6, Math.min(18, 6 * dynamicScale));
|
||||||
|
// const fontSize = Math.max(46, Math.min(24, 12 * dynamicScale));
|
||||||
|
// const radius = Math.max(14, Math.min(18, 6 * dynamicScale));
|
||||||
|
|
||||||
|
const currentFeatureId = feature.getId() || (feature as any).ol_uid;
|
||||||
|
const isHovered = this.hoveredFeatureId === currentFeatureId;
|
||||||
|
|
||||||
|
// 根据 BuildType 选择图形样式
|
||||||
|
let imageStyle;
|
||||||
|
if (buildType === 0) {
|
||||||
|
// 半圆(横向,开口朝右)
|
||||||
|
const canvas = this.createSemiCircleCanvas(radius, color);
|
||||||
|
imageStyle = new Icon({
|
||||||
|
img: canvas,
|
||||||
|
imgSize: [canvas.width, canvas.height],
|
||||||
|
anchor: [0.5, 0.5] // 锚点居中,使半圆定位准确
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 完整圆
|
||||||
|
imageStyle = new Circle({
|
||||||
|
radius: radius,
|
||||||
|
fill: new Fill({ color: color }),
|
||||||
|
stroke: new Stroke({ color: 'rgba(0, 0, 0, 0.5)', width: 1 })
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const styleOptions: any = {
|
||||||
|
image: imageStyle
|
||||||
|
};
|
||||||
|
|
||||||
|
// 悬停时添加文本标签(与原逻辑相同,可根据半圆形状微调 offsetY)
|
||||||
|
if (labelText) {
|
||||||
|
let offsetY = -20 * dynamicScale;
|
||||||
|
// 特殊文本的偏移处理(保持原有逻辑)
|
||||||
|
const specialLabels = [
|
||||||
|
'枕头坝二级',
|
||||||
|
'老鹰岩二级',
|
||||||
|
'长洲',
|
||||||
|
'丹巴',
|
||||||
|
'玛尔挡',
|
||||||
|
'班多',
|
||||||
|
'彭水',
|
||||||
|
'李家峡',
|
||||||
|
'ML',
|
||||||
|
'BDa',
|
||||||
|
'乌东德',
|
||||||
|
'里底',
|
||||||
|
'大华桥',
|
||||||
|
|
||||||
|
'巴塘'
|
||||||
|
];
|
||||||
|
if (specialLabels.includes(labelText)) {
|
||||||
|
offsetY = 20 * dynamicScale;
|
||||||
|
}
|
||||||
|
styleOptions.text = new Text({
|
||||||
|
text: labelText,
|
||||||
|
offsetY: offsetY,
|
||||||
|
font: `${fontSize}px sans-serif`,
|
||||||
|
fill: new Fill({ color: '#fff' }),
|
||||||
|
stroke: new Stroke({ color: 'rgba(0, 0, 0, .9)', width: 2 }),
|
||||||
|
textAlign: 'center',
|
||||||
|
declutterMode: 'declutter'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Style(styleOptions);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化加载基础图层
|
* 初始化加载基础图层
|
||||||
* @param layer 图层配置对象
|
* @param layer 图层配置对象
|
||||||
@ -1550,6 +1630,51 @@ export class MapOl implements MapInterface {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成带完整圆边框的上半圆 Canvas
|
||||||
|
* @param radius 半径(像素)
|
||||||
|
* @param color 填充颜色
|
||||||
|
* @returns HTMLCanvasElement
|
||||||
|
*/
|
||||||
|
private createSemiCircleCanvas(
|
||||||
|
radius: number,
|
||||||
|
color: string
|
||||||
|
): HTMLCanvasElement {
|
||||||
|
const size = radius * 2 + 2;
|
||||||
|
const canvas = document.createElement('canvas');
|
||||||
|
canvas.width = size;
|
||||||
|
canvas.height = size;
|
||||||
|
const ctx = canvas.getContext('2d')!;
|
||||||
|
ctx.clearRect(0, 0, size, size);
|
||||||
|
|
||||||
|
const centerX = size / 2;
|
||||||
|
const centerY = size / 2;
|
||||||
|
|
||||||
|
// 1. 绘制下半圆填充(给定颜色)— 圆弧从 π 到 2π
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(centerX, centerY, radius, 0, Math.PI, false);
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.fillStyle = color;
|
||||||
|
ctx.fill();
|
||||||
|
|
||||||
|
// 2. 绘制上半圆填充(白色)
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(centerX, centerY, radius, Math.PI, 2 * Math.PI, false);
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.fillStyle = '#FFFFFF'; // 白色
|
||||||
|
ctx.fill();
|
||||||
|
|
||||||
|
// 3. 绘制完整圆边框
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
|
||||||
|
ctx.strokeStyle = 'rgba(0, 0, 0, 0.5)';
|
||||||
|
ctx.lineWidth = 1.5;
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
|
return canvas;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除地图对象,释放资源
|
* 移除地图对象,释放资源
|
||||||
*/
|
*/
|
||||||
@ -1623,5 +1748,4 @@ export class MapOl implements MapInterface {
|
|||||||
|
|
||||||
console.log('地图实例已销毁');
|
console.log('地图实例已销毁');
|
||||||
}
|
}
|
||||||
// ... 其他 MapInterface 方法待实现
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,7 @@ service.interceptors.request.use(
|
|||||||
config.headers._sysid = '10EC2E0B-AEA9-4757-83A2-201BA1BC54E9';
|
config.headers._sysid = '10EC2E0B-AEA9-4757-83A2-201BA1BC54E9';
|
||||||
|
|
||||||
config.headers.authorization =
|
config.headers.authorization =
|
||||||
'bearer bcaab66c-0455-4062-aa2a-85c1af405d9b';
|
'bearer a385ef90-a17d-429f-817f-7d961594020c';
|
||||||
config.baseURL = '/';
|
config.baseURL = '/';
|
||||||
} else {
|
} else {
|
||||||
const user = useUserStoreHook();
|
const user = useUserStoreHook();
|
||||||
|
|||||||
@ -8,9 +8,9 @@
|
|||||||
@search-finish="onSearchFinish"
|
@search-finish="onSearchFinish"
|
||||||
/>
|
/>
|
||||||
<BasicTable
|
<BasicTable
|
||||||
|
ref="basicTable"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="dataSource"
|
:list-url="getAllConfigTree"
|
||||||
:list-url="fetchConfigData"
|
|
||||||
:search-params="searchParams"
|
:search-params="searchParams"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
@ -29,11 +29,6 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'configType'">
|
|
||||||
<a-tag :color="getConfigTypeColor(record.configType)">
|
|
||||||
{{ record.configType }}
|
|
||||||
</a-tag>
|
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<ConfigManagementForm
|
<ConfigManagementForm
|
||||||
@ -47,12 +42,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, nextTick, onMounted } from "vue";
|
||||||
import BasicTable from "@/components/BasicTable/index.vue";
|
import BasicTable from "@/components/BasicTable/index.vue";
|
||||||
import ConfigManagementSearch from "./ConfigManagementSearch.vue";
|
import ConfigManagementSearch from "./ConfigManagementSearch.vue";
|
||||||
import ConfigManagementForm from "./ConfigManagementForm.vue";
|
import ConfigManagementForm from "./ConfigManagementForm.vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
import {
|
||||||
|
getAllConfigTree,
|
||||||
|
deleteBaseWbsb,
|
||||||
|
saveBaseWbsb,
|
||||||
|
} from "@/api/system/map/ConfigManagement";
|
||||||
|
|
||||||
|
// 表格实例
|
||||||
|
const basicTable = ref<any>(null);
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -118,399 +120,7 @@ const searchParams = ref({});
|
|||||||
const currentRecord = ref<any | null>(null);
|
const currentRecord = ref<any | null>(null);
|
||||||
const editModalVisible = ref(false);
|
const editModalVisible = ref(false);
|
||||||
|
|
||||||
// 数据源
|
// 新增处理
|
||||||
const dataSource = ref([
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "D0E1293DB0324E729AB074D8BD61C745",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "0001-01-01 00:00:00",
|
|
||||||
modifyTime: "0001-01-01 00:00:00",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "雅砻江通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY176",
|
|
||||||
rvnm: "雅砻江",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "E8E0425BFA8143BCB2D0FC9C45FE2853",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "0001-01-01 00:00:00",
|
|
||||||
modifyTime: "0001-01-01 00:00:00",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "澜沧江干流通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY126",
|
|
||||||
rvnm: "澜沧江干流",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "9AE90200DF324B6981C85129D5288C8E",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:08",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "清江通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY109",
|
|
||||||
rvnm: "清江",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "F2EC0A6870534C14810AECA990E092D6",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:09",
|
|
||||||
modifyTime: "2024-07-08 16:25:05",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "澧水通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY110",
|
|
||||||
rvnm: "澧水",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "F99C360B47B14F10AAE688534ECAFA87",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:10",
|
|
||||||
modifyTime: "2024-06-14 15:25:10",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "红水河通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY130",
|
|
||||||
rvnm: "红水河",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "3E8E27C07F5B41D9A3915E969D9E1BB8",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:11",
|
|
||||||
modifyTime: "2024-07-18 17:29:22",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "大渡河通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY148",
|
|
||||||
rvnm: "大渡河",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "BB4FBC900D2C462080BDC7638EB4459F",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:12",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "洞庭湖环湖区通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY155",
|
|
||||||
rvnm: "洞庭湖环湖区",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "8E707E0628414DC2BFC42CFAA32D2A76",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:13",
|
|
||||||
modifyTime: "2024-05-29 10:08:26",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "丰满以下通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY168",
|
|
||||||
rvnm: "丰满以下",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "BB911176EE164E3F85B6DABF1F6C3F14",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:13",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "丰满以上通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY169",
|
|
||||||
rvnm: "丰满以上",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "3246C417FA544C3592FA367B15F90927",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:15",
|
|
||||||
modifyTime: "2024-07-08 16:14:42",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "南盘江通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY178",
|
|
||||||
rvnm: "南盘江",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "2589AC1BFB5549F2AD497D3EDB7C45A9",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:16",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "瓯江温溪以上通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY194",
|
|
||||||
rvnm: "瓯江温溪以上",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "2A450ADE4A884F90A35866C89FF9A012",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:16",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "富春江水库以上通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY195",
|
|
||||||
rvnm: "富春江水库以上",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "761683529B374922864910CD334BE7D3",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:17",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "黄河干流中游通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY1C",
|
|
||||||
rvnm: "黄河干流中游",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "2A64FFA5D7944CE9A7D3C844F5A7B7AA",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:18",
|
|
||||||
modifyTime: "2024-08-07 10:29:42",
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "黄河干流上游通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY1U",
|
|
||||||
rvnm: "黄河干流上游",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "1B0ECE32A8F74E47B0B5EB6774476728",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:19",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "长江干流通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY208",
|
|
||||||
rvnm: "长江干流",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "96600AD12B9645D9A86B0754BE03F9C3",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:20",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "资水通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY214",
|
|
||||||
rvnm: "资水",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "2B70280D51D44398815C99EF700A6B55",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:20",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "沅水通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY216",
|
|
||||||
rvnm: "沅水",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "F9CD484CBE254AD0A7B7D3D058443455",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:21",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "赣江通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY217",
|
|
||||||
rvnm: "赣江",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "0AA0EA96FA5649FEA3B7881FC6F0C85C",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:22",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "黔浔江及西江通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY25",
|
|
||||||
rvnm: "黔浔江及西江",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_tls: {},
|
|
||||||
id: "533473B0349546CC82B50C21CF843101",
|
|
||||||
recordUser: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
recordTime: "2023-08-04 17:46:23",
|
|
||||||
modifyTime: null,
|
|
||||||
displayRecordUser: null,
|
|
||||||
isolateType: null,
|
|
||||||
name: "闽江上游通用配置",
|
|
||||||
code: "common",
|
|
||||||
rvcd: "SJLY33",
|
|
||||||
rvnm: "闽江上游",
|
|
||||||
remark: null,
|
|
||||||
recordUserName: "20210802-1454-3403-3753-a22ed7009522",
|
|
||||||
departmentId: null,
|
|
||||||
displayDepartment: null,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// 获取配置类型标签颜色
|
|
||||||
const getConfigTypeColor = (type: string) => {
|
|
||||||
const colorMap: Record<string, string> = {
|
|
||||||
系统配置: "blue",
|
|
||||||
显示配置: "green",
|
|
||||||
业务配置: "orange",
|
|
||||||
};
|
|
||||||
return colorMap[type] || "default";
|
|
||||||
};
|
|
||||||
|
|
||||||
// 模拟数据获取函数
|
|
||||||
const fetchConfigData = (params: any) => {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
resolve({
|
|
||||||
data: {
|
|
||||||
records: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
configName: "默认缩放级别",
|
|
||||||
configType: "显示配置",
|
|
||||||
configValue: "10",
|
|
||||||
description: "地图默认显示的缩放级别",
|
|
||||||
updateTime: "2023-05-15 10:30:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
configName: "数据刷新间隔",
|
|
||||||
configType: "系统配置",
|
|
||||||
configValue: "300",
|
|
||||||
description: "数据自动刷新的时间间隔(秒)",
|
|
||||||
updateTime: "2023-06-20 14:45:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
configName: "预警阈值",
|
|
||||||
configType: "业务配置",
|
|
||||||
configValue: "85%",
|
|
||||||
description: "触发预警的阈值百分比",
|
|
||||||
updateTime: "2023-07-10 09:15:00",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
total: 3,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
currentRecord.value = null;
|
currentRecord.value = null;
|
||||||
editModalVisible.value = true;
|
editModalVisible.value = true;
|
||||||
@ -524,26 +134,86 @@ const handleEdit = (record: any) => {
|
|||||||
|
|
||||||
// 删除处理
|
// 删除处理
|
||||||
const handleDelete = (record: any) => {
|
const handleDelete = (record: any) => {
|
||||||
message.warning(`删除配置: ${record.configName}`);
|
Modal.confirm({
|
||||||
|
title: "确认删除",
|
||||||
|
content: "确定要删除选中的记录吗?",
|
||||||
|
zIndex: 2002,
|
||||||
|
onOk: async () => {
|
||||||
|
try {
|
||||||
|
let res = await deleteBaseWbsb([record.id]);
|
||||||
|
message.success("删除成功");
|
||||||
|
basicTable.value.refresh();
|
||||||
|
} catch (error) {
|
||||||
|
message.error("删除失败");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 搜索完成处理
|
// 搜索完成处理
|
||||||
const onSearchFinish = (values: any) => {
|
const onSearchFinish = (values: any) => {
|
||||||
console.log(values);
|
const params = {
|
||||||
|
logic: "and",
|
||||||
|
filters: [
|
||||||
|
values.parentId
|
||||||
|
? {
|
||||||
|
field: "parentId",
|
||||||
|
operator: "eq",
|
||||||
|
dataType: "string",
|
||||||
|
value: values.parentId,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
values.name
|
||||||
|
? {
|
||||||
|
field: "name",
|
||||||
|
operator: "contains",
|
||||||
|
dataType: "string",
|
||||||
|
value: values.name,
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
].filter(Boolean),
|
||||||
|
};
|
||||||
|
basicTable.value.getList(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
const handleReset = (params: any) => {};
|
const handleReset = () => {
|
||||||
|
basicTable.value.getList({
|
||||||
|
logic: "and",
|
||||||
|
filters: [],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 表单取消
|
// 表单取消
|
||||||
const editModalCancel = () => {
|
const editModalCancel = () => {
|
||||||
|
currentRecord.value = null;
|
||||||
editModalVisible.value = false;
|
editModalVisible.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 表单提交
|
// 表单提交
|
||||||
const handleEditSubmit = (values: any) => {
|
const handleEditSubmit = async (values: any) => {
|
||||||
console.log(values);
|
try {
|
||||||
|
let res = await saveBaseWbsb({
|
||||||
|
...currentRecord.value,
|
||||||
|
...values,
|
||||||
|
});
|
||||||
|
message.success(`保存成功`);
|
||||||
|
|
||||||
|
editModalVisible.value = false;
|
||||||
|
basicTable.value.refresh();
|
||||||
|
} catch (error) {
|
||||||
|
message.error(`保存失败`);
|
||||||
|
|
||||||
|
editModalVisible.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const initOption = () => {};
|
||||||
|
onMounted(() => {
|
||||||
|
initOption();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
v-if="isInterface && formData.type === 'geojson'"
|
v-if="isInterface && formData.type === 'geojson'"
|
||||||
>
|
>
|
||||||
<a-textarea
|
<a-textarea
|
||||||
rows="4"
|
:rows="4"
|
||||||
v-model:value="formData.paramJson"
|
v-model:value="formData.paramJson"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入gisJson"
|
placeholder="请输入gisJson"
|
||||||
@ -87,7 +87,7 @@
|
|||||||
v-if="!isInterface || formData.type === 'geojson'"
|
v-if="!isInterface || formData.type === 'geojson'"
|
||||||
>
|
>
|
||||||
<a-textarea
|
<a-textarea
|
||||||
rows="4"
|
:rows="4"
|
||||||
v-model:value="formData.description"
|
v-model:value="formData.description"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
|
|||||||
@ -35,29 +35,47 @@
|
|||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.nameEn"
|
v-model:value="formData.nameEn"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择图例类型"
|
placeholder="请输入图例编码"
|
||||||
:options="options"
|
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="icon编码" name="icon">
|
<a-form-item label="色块颜色" name="color" v-if="formData.code === 'colorLayer'">
|
||||||
|
<a-color-picker
|
||||||
|
v-model:value="formData.color"
|
||||||
|
:show-text="true"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择色块颜色"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="icon编码" name="icon" v-if="formData.code !== 'colorLayer'">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.icon"
|
v-model:value="formData.icon"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入icon编码"
|
placeholder="请输入icon编码"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="父级图例名称" name="parentName">
|
<a-form-item label="父级图例名称" name="parentId">
|
||||||
<a-input
|
<a-select
|
||||||
v-model:value="formData.parentName"
|
v-model:value="formData.parentId"
|
||||||
|
:options="LegendOptions"
|
||||||
|
:fieldNames="{
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
}"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入父级图例名称"
|
placeholder="请选择父级图例名称"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="图层名称" name="layerCodeName">
|
<a-form-item label="图层名称" name="layerCode">
|
||||||
<a-input
|
<a-tree-select
|
||||||
v-model:value="formData.layerCodeName"
|
v-model:value="formData.layerCode"
|
||||||
|
:tree-data="LayerOptions"
|
||||||
|
:fieldNames="{
|
||||||
|
label: 'title',
|
||||||
|
value: 'code',
|
||||||
|
children: 'children',
|
||||||
|
}"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入图层名称"
|
placeholder="请选择图层名称"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="二维最小缩放" name="minZoom">
|
<a-form-item label="二维最小缩放" name="minZoom">
|
||||||
@ -74,16 +92,16 @@
|
|||||||
placeholder="请输入二维最大缩放"
|
placeholder="请输入二维最大缩放"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="三维最小高程" name="minElevation">
|
<a-form-item label="三维最小高程" name="minHeightThd">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.minElevation"
|
v-model:value="formData.minHeightThd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入三维最小高程"
|
placeholder="请输入三维最小高程"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="三维最大高程" name="maxElevation">
|
<a-form-item label="三维最大高程" name="maxHeightThd">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.maxElevation"
|
v-model:value="formData.maxHeightThd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入三维最大高程"
|
placeholder="请输入三维最大高程"
|
||||||
/>
|
/>
|
||||||
@ -108,13 +126,15 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, computed, watch } from "vue";
|
import { ref, reactive, computed, watch } from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message, ColorPicker } from "ant-design-vue";
|
||||||
import type { Rule } from "ant-design-vue/es/form";
|
import type { Rule } from "ant-design-vue/es/form";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
initialValues?: any | null;
|
initialValues?: any | null;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
|
LegendOptions?: any[];
|
||||||
|
LayerOptions?: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const localLoading = ref(false);
|
const localLoading = ref(false);
|
||||||
@ -144,20 +164,30 @@ const formRef = ref();
|
|||||||
|
|
||||||
const defaultFormData = reactive({
|
const defaultFormData = reactive({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
dataName: undefined,
|
name: undefined,
|
||||||
dataType: undefined,
|
code: undefined,
|
||||||
relatedLegend: undefined,
|
nameEn: undefined,
|
||||||
dataSource: undefined,
|
color: undefined,
|
||||||
|
layerCode: undefined,
|
||||||
|
icon: undefined,
|
||||||
|
parentId: undefined,
|
||||||
|
minZoom: undefined,
|
||||||
|
maxZoom: undefined,
|
||||||
|
minHeightThd: undefined,
|
||||||
|
maxHeightThd: undefined,
|
||||||
|
expression: undefined,
|
||||||
|
description: undefined,
|
||||||
});
|
});
|
||||||
const formData: any = reactive({ ...defaultFormData });
|
const formData: any = reactive({ ...defaultFormData });
|
||||||
|
|
||||||
const rules: Record<string, Rule[]> = {
|
const rules: Record<string, Rule[]> = {
|
||||||
name: [{ required: true, message: "请输入图例名称", trigger: "blur" }],
|
name: [{ required: true, message: "请输入图例名称", trigger: "blur" }],
|
||||||
nameEn: [{ required: true, message: "请输入图例编码", trigger: "blur" }],
|
nameEn: [{ required: true, message: "请输入图例编码", trigger: "blur" }],
|
||||||
code: [{ required: true, message: "请选择图例类型", trigger: "blur" }],
|
code: [{ required: true, message: "请选择图例类型", trigger: "change" }],
|
||||||
icon: [{ required: true, message: "请输入icon编码", trigger: "blur" }],
|
icon: [{ required: true, message: "请输入icon编码", trigger: "blur" }],
|
||||||
parentName: [{ required: true, message: "请输入父级图例名称", trigger: "blur" }],
|
color: [{ required: true, message: "请选择色块颜色", trigger: "change" }],
|
||||||
layerCodeName: [{ required: true, message: "请输入图层名称", trigger: "blur" }],
|
parentId: [{ required: true, message: "请选择父级图例名称", trigger: "blur" }],
|
||||||
|
layerCode: [{ required: true, message: "请选择图层名称", trigger: "blur" }],
|
||||||
};
|
};
|
||||||
|
|
||||||
const isEdit = computed(() => !!props.initialValues);
|
const isEdit = computed(() => !!props.initialValues);
|
||||||
@ -169,6 +199,8 @@ const handleOk = async () => {
|
|||||||
...formData,
|
...formData,
|
||||||
dataType: 2,
|
dataType: 2,
|
||||||
};
|
};
|
||||||
|
// submitValues.layerCode = submitValues.layerCode.code;
|
||||||
|
console.log(submitValues);
|
||||||
emit("ok", submitValues, "form");
|
emit("ok", submitValues, "form");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Validate Failed:", error);
|
console.error("Validate Failed:", error);
|
||||||
|
|||||||
@ -37,7 +37,6 @@ const initSearchData = {
|
|||||||
name: "",
|
name: "",
|
||||||
parentId: "",
|
parentId: "",
|
||||||
};
|
};
|
||||||
const options = ref<any>([]);
|
|
||||||
const searchData = ref<any>({ ...initSearchData });
|
const searchData = ref<any>({ ...initSearchData });
|
||||||
const searchList: any = computed(() => [
|
const searchList: any = computed(() => [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -56,6 +56,8 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<LegendDataForm
|
<LegendDataForm
|
||||||
ref="legendDataForm"
|
ref="legendDataForm"
|
||||||
|
:LegendOptions="LegendOptions"
|
||||||
|
:LayerOptions="LayerOptions"
|
||||||
v-model:visible="editModalVisible"
|
v-model:visible="editModalVisible"
|
||||||
:initial-values="currentRecord"
|
:initial-values="currentRecord"
|
||||||
@cancel="editModalCancel"
|
@cancel="editModalCancel"
|
||||||
@ -75,8 +77,8 @@ import {
|
|||||||
saveMapLegend,
|
saveMapLegend,
|
||||||
deleteMapLegend,
|
deleteMapLegend,
|
||||||
} from "@/api/system/map/LegendStructure";
|
} from "@/api/system/map/LegendStructure";
|
||||||
import { getAllMapLegendParentIdTree } from "@/api/system/map/LayerManagement";
|
import { getAllMapLegendParentIdTree } from "@/api/system/map/LegendStructure";
|
||||||
|
import { getAllMapLayerTree } from "@/api/system/map/LayerManagement";
|
||||||
// 表格列配置
|
// 表格列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -190,14 +192,14 @@ const columns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
key: "recordUser",
|
key: "displayRecordUser",
|
||||||
dataIndex: "recordUser",
|
dataIndex: "displayRecordUser",
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "displayRecordUser",
|
key: "recordTime",
|
||||||
dataIndex: "displayRecordUser",
|
dataIndex: "recordTime",
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -220,6 +222,7 @@ const basicTable = ref<any>(null);
|
|||||||
const searchParams = ref({});
|
const searchParams = ref({});
|
||||||
// 编辑弹窗数据
|
// 编辑弹窗数据
|
||||||
const LegendOptions = ref<any[]>([]);
|
const LegendOptions = ref<any[]>([]);
|
||||||
|
const LayerOptions = ref<any[]>([]);
|
||||||
const currentRecord = ref<any | null>(null);
|
const currentRecord = ref<any | null>(null);
|
||||||
const editModalVisible = ref(false);
|
const editModalVisible = ref(false);
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
@ -274,7 +277,6 @@ const onSearchFinish = (values: any) => {
|
|||||||
},
|
},
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
};
|
};
|
||||||
console.log(params);
|
|
||||||
basicTable.value.getList(params);
|
basicTable.value.getList(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -335,6 +337,30 @@ const handleEditSubmit = async (values: any, type: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const initOption = () => {
|
const initOption = () => {
|
||||||
|
// 递归处理树节点的函数
|
||||||
|
const processTreeNode = (node: any) => {
|
||||||
|
if (!node) return node;
|
||||||
|
|
||||||
|
// 删除 checkable 属性
|
||||||
|
delete node.checkable;
|
||||||
|
// 设置 value 和 key 为 code 的值
|
||||||
|
node.value = node.code;
|
||||||
|
node.key = node.code;
|
||||||
|
|
||||||
|
// 递归处理子节点
|
||||||
|
if (node.children && Array.isArray(node.children)) {
|
||||||
|
node.children = node.children.map(processTreeNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return node;
|
||||||
|
};
|
||||||
|
|
||||||
|
getAllMapLayerTree({ flag: 0 }).then((res: any) => {
|
||||||
|
// 使用递归函数处理整个树结构
|
||||||
|
const processedData = res.data.map(processTreeNode);
|
||||||
|
LayerOptions.value = processedData;
|
||||||
|
console.log(LayerOptions.value);
|
||||||
|
});
|
||||||
getAllMapLegendParentIdTree({ flag: 1 }).then((res: any) => {
|
getAllMapLegendParentIdTree({ flag: 1 }).then((res: any) => {
|
||||||
LegendOptions.value = res.data || [];
|
LegendOptions.value = res.data || [];
|
||||||
});
|
});
|
||||||
|
|||||||
@ -122,11 +122,15 @@ const formRef = ref();
|
|||||||
|
|
||||||
const defaultFormData = reactive({
|
const defaultFormData = reactive({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectName: undefined,
|
stnm: undefined,
|
||||||
captureDate: undefined,
|
hbrvcdName: undefined,
|
||||||
fileSize: undefined,
|
ennm: undefined,
|
||||||
status: undefined,
|
url: undefined,
|
||||||
coverageArea: undefined,
|
location: undefined,
|
||||||
|
accuracy: undefined,
|
||||||
|
boundary: undefined,
|
||||||
|
height: undefined,
|
||||||
|
description: undefined,
|
||||||
});
|
});
|
||||||
const formData: any = reactive({ ...defaultFormData });
|
const formData: any = reactive({ ...defaultFormData });
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user