微调
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="用户性质:" prop="userType">
|
<el-form-item for="-" label="用户性质:" prop="userType">
|
||||||
<!-- :disabled="resendId != '' && title != '编辑'" -->
|
<!-- :disabled="resendId != '' && title != '编辑'" -->
|
||||||
<el-select v-model="form.userType" placeholder="请选择用户性质">
|
<el-select v-model="form.userType" placeholder="请选择用户性质" :disabled="resendId !== '' && title !== '用户档案录入'">
|
||||||
<el-option v-for="(item, index) in userTypeList" :label="item.label" :value="item.value"
|
<el-option v-for="(item, index) in userTypeList" :label="item.label" :value="item.value"
|
||||||
:key="index" />
|
:key="index" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -522,28 +522,8 @@ const getTreeList = () => {
|
|||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
let data = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
let data = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||||
// nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
|
||||||
|
|
||||||
// data.map((item: any) => {
|
|
||||||
// //tree禁用根节点
|
|
||||||
// item.disabled = 'disabled'
|
|
||||||
// item.children.map((vv: any) => {
|
|
||||||
// //tree禁用二级节点
|
|
||||||
// vv.disabled = 'disabled'
|
|
||||||
// vv.children.map((kk: any) => {
|
|
||||||
// //tree禁用三级节点
|
|
||||||
// kk.disabled = 'disabled'
|
|
||||||
// kk.children.map((ss: any) => {
|
|
||||||
// ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
|
||||||
// nonlinearDeviceTypeList.value[0].children.push(ss)
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
if (VITE_FLAG) {
|
|
||||||
// VITE_FLAG为true时,保持原有逻辑(包含根节点)
|
|
||||||
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||||
|
|
||||||
data.map((item: any) => {
|
data.map((item: any) => {
|
||||||
//tree禁用根节点
|
//tree禁用根节点
|
||||||
item.disabled = 'disabled'
|
item.disabled = 'disabled'
|
||||||
@@ -560,21 +540,9 @@ const getTreeList = () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
// VITE_FLAG为false时,去除第一层(根节点),只保留子节点
|
|
||||||
nonlinearDeviceTypeList.value = []
|
|
||||||
data.map((item: any) => {
|
|
||||||
item.children.map((vv: any) => {
|
|
||||||
vv.children.map((kk: any) => {
|
|
||||||
kk.children.map((ss: any) => {
|
|
||||||
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
|
||||||
nonlinearDeviceTypeList.value.push(ss)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getTreeList()
|
getTreeList()
|
||||||
@@ -829,6 +797,7 @@ const open = async (row: any) => {
|
|||||||
let deptIds = adminInfo.$state.deptId
|
let deptIds = adminInfo.$state.deptId
|
||||||
addUploadRef.value?.reset()
|
addUploadRef.value?.reset()
|
||||||
if (row.row) {
|
if (row.row) {
|
||||||
|
|
||||||
resendId.value = row.row.id
|
resendId.value = row.row.id
|
||||||
status.value = row.row.status
|
status.value = row.row.status
|
||||||
|
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ const devIdList = ref([])
|
|||||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||||
const openFile = (name: any) => {
|
const openFile = (name: any) => {
|
||||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||||
|
|
||||||
}
|
}
|
||||||
const netInReportList: any = ref([])
|
const netInReportList: any = ref([])
|
||||||
const governReportList: any = ref([])
|
const governReportList: any = ref([])
|
||||||
|
|||||||
@@ -508,6 +508,10 @@ const treeData: any = ref('')
|
|||||||
const loadTypeList: any = ref([])
|
const loadTypeList: any = ref([])
|
||||||
//干扰源类别 取树形图第二层children数据
|
//干扰源类别 取树形图第二层children数据
|
||||||
const businessTypeList: any = ref([])
|
const businessTypeList: any = ref([])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const getTreeList = () => {
|
const getTreeList = () => {
|
||||||
queryByAllCode().then(res => {
|
queryByAllCode().then(res => {
|
||||||
treeData.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
treeData.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||||
@@ -519,23 +523,33 @@ const getTreeList = () => {
|
|||||||
children: item?.children
|
children: item?.children
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
console.log('treeData', treeData.value)
|
||||||
form.value.loadType = loadTypeList.value[0]?.id
|
form.value.loadType = loadTypeList.value[0]?.id
|
||||||
changeLoadType()
|
changeLoadType()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getTreeList()
|
getTreeList()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//选择干扰源类型的时候,干扰源类别数据跟随改变
|
//选择干扰源类型的时候,干扰源类别数据跟随改变
|
||||||
const changeLoadType = async () => {
|
const changeLoadType = async () => {
|
||||||
|
console.log('123',loadTypeList.value)
|
||||||
|
console.log('456',form.value.loadType)
|
||||||
businessTypeList.value = loadTypeList.value.find(item => {
|
businessTypeList.value = loadTypeList.value.find(item => {
|
||||||
return item.id == form.value.loadType
|
return item.id == form.value.loadType
|
||||||
})?.children
|
})?.children
|
||||||
// form.value.businessType = businessTypeList.value[0]?.id
|
console.log('-====',businessTypeList.value)
|
||||||
|
form.value.businessType = businessTypeList.value[0]?.id
|
||||||
}
|
}
|
||||||
//选择关联干扰源回显数据
|
//选择关联干扰源回显数据
|
||||||
const changeUserName = () => {
|
const changeUserName = () => {
|
||||||
|
|
||||||
let obj: any = projectList.value.find((item: any) => {
|
let obj: any = projectList.value.find((item: any) => {
|
||||||
return form.value.userName == item.id
|
return form.value.userName == item.id
|
||||||
})
|
})
|
||||||
|
console.log('changeUserName', obj)
|
||||||
form.value = {
|
form.value = {
|
||||||
...form.value,
|
...form.value,
|
||||||
city: obj?.city,
|
city: obj?.city,
|
||||||
@@ -591,10 +605,12 @@ const changeUserName = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getDictTree = (e?: string) => {
|
const getDictTree = (e?: string) => {
|
||||||
|
console.log('e', e)
|
||||||
if (e) {
|
if (e) {
|
||||||
getDictTreeById(e).then(res => {
|
getDictTreeById(e).then(res => {
|
||||||
form.value.loadType = res.data.pids.split(',')[1] || ''
|
form.value.loadType = res.data.pids.split(',')[1] || ''
|
||||||
form.value.businessType = res.data.pids.split(',')[2] || ''
|
form.value.businessType = res.data.pids.split(',')[2] || ''
|
||||||
|
console.log('res', form.value.loadType )
|
||||||
changeLoadType()
|
changeLoadType()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -820,6 +836,11 @@ const rules = ref({
|
|||||||
})
|
})
|
||||||
const resendId = ref('')
|
const resendId = ref('')
|
||||||
const rowValue: any = ref({})
|
const rowValue: any = ref({})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
resetForm()
|
resetForm()
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
@@ -833,6 +854,8 @@ const open = async (row: any) => {
|
|||||||
await getTempLineDetailsById({ id: row.row.id }).then(res => {
|
await getTempLineDetailsById({ id: row.row.id }).then(res => {
|
||||||
form.value = res.data
|
form.value = res.data
|
||||||
form.value.loadType = loadTypeList.value.filter((item: any) => item.name == res.data.loadType)[0]?.id
|
form.value.loadType = loadTypeList.value.filter((item: any) => item.name == res.data.loadType)[0]?.id
|
||||||
|
console.log('res.data',form.value.loadType)
|
||||||
|
console.log('res.businessTypeList.value',businessTypeList.value)
|
||||||
form.value.businessType = businessTypeList.value.filter(
|
form.value.businessType = businessTypeList.value.filter(
|
||||||
(item: any) => item.name == res.data.businessType
|
(item: any) => item.name == res.data.businessType
|
||||||
)[0]?.id
|
)[0]?.id
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<el-form-item for="-" label="监测终端安装位置:" prop="monitoringDeviceInstallationPosition" class="label_over_warp">
|
<el-form-item for="-" label="监测终端安装位置:" prop="monitoringDeviceInstallationPosition" class="label_over_warp">
|
||||||
<!-- 电网侧、用户侧 -->
|
<!-- 电网侧、用户侧 -->
|
||||||
<el-select v-model="form.monitoringDeviceInstallationPosition" clearable style="width: 100%"
|
<el-select v-model="form.monitoringDeviceInstallationPosition" clearable style="width: 100%"
|
||||||
placeholder="请选择监测终端安装位置" disabled>
|
placeholder="请选择监测终端安装位置" >
|
||||||
<el-option v-for="item in monitoringDeviceInstallationPositionList" :key="item.id"
|
<el-option v-for="item in monitoringDeviceInstallationPositionList" :key="item.id"
|
||||||
:label="item.name" :value="item.id"></el-option>
|
:label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -510,14 +510,11 @@ const changeSubstationFlag = () => {
|
|||||||
return form.value.substation == item.id
|
return form.value.substation == item.id
|
||||||
})?.name
|
})?.name
|
||||||
|
|
||||||
// 系统电站选"是"时,安装位置设为"电网侧"
|
|
||||||
form.value.monitoringDeviceInstallationPosition = '0'
|
|
||||||
} else {
|
} else {
|
||||||
form.value.substation = ''
|
form.value.substation = ''
|
||||||
form.value.substationName = ''
|
form.value.substationName = ''
|
||||||
form.value.substationVoltageLevel = voltageLevelList[0].id
|
form.value.substationVoltageLevel = voltageLevelList[0].id
|
||||||
// 系统电站选"否"时,安装位置设为"用户侧"
|
|
||||||
form.value.monitoringDeviceInstallationPosition = '1'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
@@ -1351,12 +1348,12 @@ const confirmForm = async (flag: boolean) => {
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
|
||||||
// 编码改动
|
// 编码改动
|
||||||
const encode = (e: string) => {
|
const encode = (e: string) => {
|
||||||
if(VITE_FLAG){
|
|
||||||
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const open = async (row: any) => {
|
|||||||
procInsId: row.procInsId
|
procInsId: row.procInsId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
bpmnXML.value = res.data.xmlData
|
bpmnXML.value = res.data.xmlData
|
||||||
|
|
||||||
})
|
})
|
||||||
bpmnXMLShow.value = true
|
bpmnXMLShow.value = true
|
||||||
|
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ const getProcessInstance = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
processInstance.value = data
|
processInstance.value = data
|
||||||
|
console.log(data)
|
||||||
// 设置表单信息
|
// 设置表单信息
|
||||||
const processDefinition = data.processDefinition
|
const processDefinition = data.processDefinition
|
||||||
if (processDefinition.formType === 10) {
|
if (processDefinition.formType === 10) {
|
||||||
|
|||||||
Reference in New Issue
Block a user