Commit 6e1da2b1 authored by 田翔's avatar 田翔

fix: GIS数据回填增加配置,维保方案增加工单巡检

parent ad36ad47
Pipeline #91506 passed with stages
......@@ -129,7 +129,7 @@
"jszip": "^3.10.1",
"lodash": "4.17.11",
"minimist": "1.2.0",
"panda-xform": "6.8.7",
"panda-xform": "6.8.8",
"parseForm": "^2.3.8",
"prop-types": "15.7.2",
"qrcode.react": "^3.1.0",
......
......@@ -30,13 +30,14 @@ import {
import classnames from 'classnames';
import styles from './patrolFeedback.less';
import AddModal from './AddModal';
import AddModalCase from './AddModalCase';
import SortModal from './SortModal';
import DragTable from '@/components/DragTable/DragTable';
const { Search } = Input;
const patrolFeedback = () => {
const [addVisible, setAddVisible] = useState(false);
const [addVisibleCase, setAddVisibleCase] = useState(false)
const [type, setType] = useState('');
const [formObj, setFormObj] = useState('');
const [treeLoading, setTreeLoading] = useState(false);
......@@ -264,6 +265,7 @@ const patrolFeedback = () => {
let newGroupNum = {
区域巡检: res.data.AreaInspectionCount,
DMA巡检: res.data.DMAInspectionCont,
工单巡检: res.data.CaseInspectionCount,
未分组: res.data.ElseInspectionCont,
};
groupNum.current = newGroupNum;
......@@ -272,29 +274,30 @@ const patrolFeedback = () => {
if (res.data.list.length > 0) {
let area = [];
let dma = [];
let cased = [];
let other = [];
res.data.list.map(i => {
if (i.businessGroup === '区域巡检') {
area.push(i);
} else if (i.businessGroup === 'DMA巡检') {
dma.push(i);
} else if (
i.businessGroup === '区域巡检,DMA巡检' ||
i.businessGroup === 'DMA巡检,区域巡检'
) {
} else if (['区域巡检,DMA巡检', 'DMA巡检,区域巡检'].includes(i.businessGroup)) {
area.push(i);
dma.push(i);
} else if (i.businessGroup === '工单巡检') {
cased.push(i)
} else {
other.push(i);
}
});
data.区域巡检 = area;
data.DMA巡检 = dma;
data.工单巡检 = cased
if (other.length > 0) {
data.未分组 = other;
setGroupName(['区域巡检', 'DMA巡检', '未分组']);
setGroupName(['区域巡检', 'DMA巡检', '工单巡检', '未分组']);
} else {
setGroupName(['区域巡检', 'DMA巡检']);
setGroupName(['区域巡检', 'DMA巡检', '工单巡检']);
}
}
if (searchValue.current) {
......@@ -307,6 +310,7 @@ const patrolFeedback = () => {
}
}
setTableData(data);
console.log('data', data)
let list = [];
res.data.list.map(i => {
list.push(i.layerName);
......@@ -325,11 +329,20 @@ const patrolFeedback = () => {
};
const add = () => {
setAddVisible(true);
console.log('pickItem', pickItem)
if (pickItem === '工单巡检') {
setAddVisibleCase(true);
} else {
setAddVisible(true);
}
setType('add');
};
const editEventType = record => {
setAddVisible(true);
if (record.businessGroup === '工单巡检') {
setAddVisibleCase(true);
} else {
setAddVisible(true);
}
setType('edit');
setFormObj(record);
};
......@@ -600,6 +613,16 @@ const patrolFeedback = () => {
pipeArr={pipeArr}
placement="right"
/>
<AddModalCase
visible={addVisibleCase}
type={type}
onClose={() => setAddVisibleCase(false)}
callBackSubmit={onOK}
formObj={formObj}
keepTableData={keepTableData}
pipeArr={pipeArr}
placement="right"
/>
<SortModal
title="调整顺序"
visible={sortVisible}
......
......@@ -380,7 +380,7 @@ const FlowChart = props => {
}
});
},
onCancel() {},
onCancel() { },
});
};
// 删除提醒
......@@ -395,7 +395,7 @@ const FlowChart = props => {
onOk() {
delNode(delNodeIds, delNodes, delLinks);
},
onCancel() {},
onCancel() { },
});
};
// 删除节点
......@@ -801,9 +801,8 @@ const FlowChart = props => {
{ margin: 4 },
new go.Binding('text', 'nodeDetail', v => {
const obj = JSON.parse(v);
return `节点名称:${obj.NodeName}\n${
obj.roleList.length > 0 ? '承办:' : ''
}${obj.roleList.map(item => item.roleName).join(',')}`;
return `节点名称:${obj.NodeName}\n${obj.roleList.length > 0 ? '承办:' : ''
}${obj.roleList.map(item => item.roleName).join(',')}`;
}),
),
),
......@@ -1146,7 +1145,7 @@ const FlowChart = props => {
toData: arr,
},
];
} else {
} else if (item.tableType === 'relationFormMapping') {
obj.relationFormMapping = [
{
fromData: {
......@@ -1157,6 +1156,17 @@ const FlowChart = props => {
toData: arr,
},
];
} else {
obj.areaTaskFormMapping = [
{
fromData: {
tableName: item.TableName,
filed: item.Fields,
filedShape: item.tableShape,
},
toData: arr,
},
];
}
let json = JSON.stringify(obj);
let newObj = { Config: json, BackfillType: 'GIS', RuleName: item.RuleName };
......
......@@ -193,11 +193,7 @@ const AddModal = props => {
title={
<>
<span style={{ marginRight: '10px' }}>{org.TableName}</span>
{org.type === '关联表单' ? (
<Tag color="green">{org.type}</Tag>
) : (
<Tag color="blue">{org.type}</Tag>
)}
<Tag color={org.type === '关联表单' ? 'blue' : (org.type === '事件工单表' ? 'green' : 'geekblue')}>{org.type}</Tag>
</>
}
disabled
......
......@@ -104,7 +104,7 @@ const ConfigGIS = (props, ref) => {
});
obj.users = users;
}
} else {
} else if (newConfig.relationFormMapping) {
let users = [];
newConfig.relationFormMapping[0].toData.map((x, y) => {
obj[y] = { nodeName: x.tableName, nodeValue: x.filed };
......@@ -127,6 +127,29 @@ const ConfigGIS = (props, ref) => {
});
obj.users = users;
}
} else {
let users = [];
newConfig.areaTaskFormMapping[0].toData.map((x, y) => {
obj[y] = { nodeName: x.tableName, nodeValue: x.filed };
});
obj.Fields = newConfig.areaTaskFormMapping[0].fromData.filed;
obj.ID = index;
obj.RuleName = item.RuleName;
obj.TableName = newConfig.areaTaskFormMapping[0].fromData.tableName;
obj.tableShape = newConfig.areaTaskFormMapping[0].fromData.filedShape;
obj.key = index;
obj.nodeName1 = newConfig.areaTaskFormMapping[0].toData[0].tableName;
obj.nodeValue1 = newConfig.areaTaskFormMapping[0].toData[0].filed;
obj.schemeName = newConfig.areaTaskFormMapping[0].toData[0].mapServer;
obj.tableType = 'areaTaskFormMapping';
if (newConfig.areaTaskFormMapping[0].toData.length > 1) {
newConfig.areaTaskFormMapping[0].toData.map((i, j) => {
if (j !== 0) {
users.push({ nodeName: i.tableName, nodeValue: i.filed });
}
});
obj.users = users;
}
}
return {
...obj,
......@@ -166,7 +189,14 @@ const ConfigGIS = (props, ref) => {
j.type = 'relationFormMapping';
});
});
let arr = [...res.data.FromData, ...res.data.RelationFormData];
res.data.AreaTaskFormData.map(i => {
i.type = '区域任务';
i.TableFields.map(j => {
j.table = i.TableName;
j.type = 'areaTaskFormMapping';
});
});
let arr = [...res.data.FromData, ...res.data.RelationFormData, ...res.data.AreaTaskFormData];
setTableField(arr);
}
});
......
......@@ -55,5 +55,7 @@ export const GetGisFeedbackTableFields = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetGisFeedbackTableFields`, query);
// 获取GIS反馈表字段
export const GetDictionaryInfoAll = query =>
get(`/PandaCore/GCK/Common/GetDictionaryInfoAll`, query);
export const LoadLedgers = query => get(`${PUBLISH_SERVICE}/WorkOrderCenter/GetCM_Ledger_LoadLedgers`, query);
// 获取GIS反馈表字段
export const GetDictionaryInfoAll = query => get(`/PandaCore/GCK/Common/GetDictionaryInfoAll`, query);
......@@ -6,7 +6,7 @@
* @LastEditTime: 2023-02-08 17:02:25
* @LastEditors: dengchao 754083046@qq.com
*/
import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';
import { CITY_SERVICE, get, PUBLISH_SERVICE, PANDA_GIS, post, postForm } from '../index';
// 加载台账
export const GetCM_Ledger_LoadLedgers = query =>
......@@ -146,3 +146,6 @@ export const Ledger_SaveLedger = data =>
// 获取副台账配置信息
export const Ledger_ParentLedgers = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/Ledger_ParentLedgers`, query);
//获取多图层公共字段
export const GetLayersShareField = query => get(`${PANDA_GIS}/MetaData/GetLayersShareField`, query);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment