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

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

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