修改图层管理
This commit is contained in:
parent
8f999af2fe
commit
d9c68af854
@ -7,13 +7,14 @@ VITE_APP_TITLE = '水电水利建设项目全过程环境管理信息平台'
|
|||||||
VITE_APP_PORT = 3000
|
VITE_APP_PORT = 3000
|
||||||
VITE_APP_BASE_API = '/dev-api'
|
VITE_APP_BASE_API = '/dev-api'
|
||||||
# 本地环境
|
# 本地环境
|
||||||
VITE_APP_BASE_URL = 'http://localhost:8093'
|
# VITE_APP_BASE_URL = 'http://localhost:8093'
|
||||||
# 测试环境
|
# 测试环境
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
||||||
# 汤伟
|
# 汤伟
|
||||||
# VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
|
# VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
|
||||||
# VITE_APP_BASE_URL = 'http://192.168.1.162:8093'
|
# 李林
|
||||||
|
VITE_APP_BASE_URL = 'http://10.84.121.43:8093'
|
||||||
|
|
||||||
# 测试环境线上10.84.121.122:
|
# 测试环境线上10.84.121.122:
|
||||||
VITE_APP_TEST_ONLINE_URL = 'https://211.99.26.225:12122'
|
VITE_APP_TEST_ONLINE_URL = 'https://211.99.26.225:12122'
|
||||||
|
|||||||
@ -3,7 +3,7 @@ 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: '/mapLayer/getAllMapLayerTree',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -11,7 +11,7 @@ export function getAllMapLayerTree(data: any) {
|
|||||||
// 保存地图 图层
|
// 保存地图 图层
|
||||||
export function saveMapLayer(data: any) {
|
export function saveMapLayer(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLayer/save',
|
url: '/mapLayer/save',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -19,15 +19,7 @@ export function saveMapLayer(data: any) {
|
|||||||
// 删除地图 图层
|
// 删除地图 图层
|
||||||
export function deleteMapLayer(data: any) {
|
export function deleteMapLayer(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/mapLayer/delete',
|
url: '/mapLayer/delete',
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 获取所有地图 图层树
|
|
||||||
export function getAllMapLayerParentIdTree(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/api/wmp-sys-server/mapLayer/getAllMapLayerTree',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
|||||||
@ -189,13 +189,14 @@ const getList = async (filter?: Record<string, any>) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const res = await props.listUrl(params);
|
const res = await props.listUrl(params);
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
let finalRecords: any[] = [];
|
let finalRecords: any[] = [];
|
||||||
let finalTotal = 0;
|
let finalTotal = 0;
|
||||||
|
|
||||||
if (props.transformData) {
|
if (props.transformData) {
|
||||||
const result = props.transformData(res);
|
const result = props.transformData(res);
|
||||||
finalRecords = result.records || [];
|
finalRecords = result.records || result.data || [];
|
||||||
finalTotal = result.total || 0;
|
finalTotal = result.total || 0;
|
||||||
} else {
|
} else {
|
||||||
finalRecords = res?.data?.records || res?.data?.data || res?.data || [];
|
finalRecords = res?.data?.records || res?.data?.data || res?.data || [];
|
||||||
@ -296,6 +297,9 @@ const processData = (records: any[]) => {
|
|||||||
for (const key in processedRecord) {
|
for (const key in processedRecord) {
|
||||||
if (Object.prototype.hasOwnProperty.call(processedRecord, key)) {
|
if (Object.prototype.hasOwnProperty.call(processedRecord, key)) {
|
||||||
const val = processedRecord[key];
|
const val = processedRecord[key];
|
||||||
|
// children 字段不处理,保持原值(包括 null)
|
||||||
|
if (key === 'children') continue;
|
||||||
|
// 空数组不替换,只替换 null、undefined、空字符串
|
||||||
if (val === null || val === undefined || val === '') {
|
if (val === null || val === undefined || val === '') {
|
||||||
processedRecord[key] = props.emptyPlaceholder;
|
processedRecord[key] = props.emptyPlaceholder;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
>编辑</a-button
|
>编辑</a-button
|
||||||
>
|
>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="record.children.length == 0"
|
v-if="record.children && record.children.length == 0"
|
||||||
class="!p-0"
|
class="!p-0"
|
||||||
type="link"
|
type="link"
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user