修改 电网一张图bug 技术监督新增 重新发起页面绘制
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="监测点信息"
|
||||
:title="title"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
@@ -348,12 +348,13 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { ref, onMounted, reactive, defineExpose, nextTick, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { getDeviceList } from '@/api/supervision-boot/terminal/index'
|
||||
import { addMointorPointFormData, getList } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
@@ -362,9 +363,10 @@ const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const ruleFormRef = ref(null)
|
||||
const title = ref('')
|
||||
const ruleFormRef:any = ref(null)
|
||||
// acceptType .doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType=''
|
||||
const acceptType = ''
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取监测点电压等级
|
||||
@@ -423,7 +425,7 @@ const operationStatusList = [
|
||||
}
|
||||
]
|
||||
//定义接线方式下拉框数据
|
||||
const ptTypeList=[
|
||||
const ptTypeList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '星型接法'
|
||||
@@ -435,7 +437,7 @@ const ptTypeList=[
|
||||
{
|
||||
id: '2',
|
||||
name: '开口三角型接法'
|
||||
},
|
||||
}
|
||||
]
|
||||
//定义线路号下拉框数据
|
||||
const numList = [
|
||||
@@ -478,7 +480,7 @@ const numList = [
|
||||
{
|
||||
id: '10',
|
||||
name: '10'
|
||||
},
|
||||
}
|
||||
]
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
@@ -547,8 +549,8 @@ const resetForm = () => {
|
||||
voltageDeviationLowerLimit: '0', //电压偏差下限
|
||||
voltageDeviationUpperLimit: '0', // 电压偏差上限
|
||||
voltageLevel: voltageLevelList[0].id, //监测点电压等级
|
||||
ptType:ptTypeList[0].id,//接线方式
|
||||
num:numList[0].id,//线路号
|
||||
ptType: ptTypeList[0].id, //接线方式
|
||||
num: numList[0].id //线路号
|
||||
}
|
||||
let obj = {}
|
||||
getList(obj).then(res => {
|
||||
@@ -567,7 +569,7 @@ const resetForm = () => {
|
||||
expectedProductionDate: obj.expectedProductionDate,
|
||||
userName: userNameList.value[0]?.projectName,
|
||||
userId: userNameList.value[0]?.id,
|
||||
objName:userNameList.value[0]?.projectName,
|
||||
objName: userNameList.value[0]?.projectName
|
||||
}
|
||||
})
|
||||
changevoltageDeviationLimit()
|
||||
@@ -604,13 +606,13 @@ findAllMonitoringTerminalList()
|
||||
//获取树形图数据
|
||||
const treeData: any = ref('')
|
||||
//干扰源类型 取树形图第一层children数据
|
||||
const loadTypeList = ref([])
|
||||
const loadTypeList: any = ref([])
|
||||
//干扰源类别 取树形图第二层children数据
|
||||
const businessTypeList = ref([])
|
||||
const businessTypeList: any = ref([])
|
||||
const getTreeList = () => {
|
||||
queryByAllCode().then(res => {
|
||||
treeData.value = [res.data.find(item => item.code == 'Major_Nonlinear_Device')]
|
||||
treeData.value[0].children.map(item => {
|
||||
treeData.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||
treeData.value[0].children.map((item: any) => {
|
||||
//干扰源类型数据
|
||||
loadTypeList.value.push({
|
||||
id: item?.id,
|
||||
@@ -632,7 +634,7 @@ const changeLoadType = async () => {
|
||||
}
|
||||
//选择关联干扰源回显数据
|
||||
const changeUserName = () => {
|
||||
let obj = projectList.value.find(item => {
|
||||
let obj: any = projectList.value.find((item: any) => {
|
||||
return form.value.userName == item.id
|
||||
})
|
||||
form.value = {
|
||||
@@ -646,8 +648,8 @@ const changeUserName = () => {
|
||||
userName: obj?.projectName,
|
||||
userId: obj?.id,
|
||||
expectedProductionDate: obj?.expectedProductionDate,
|
||||
objName:obj?.projectName,
|
||||
userStatus:obj?.userStatus+''
|
||||
objName: obj?.projectName,
|
||||
userStatus: obj?.userStatus + ''
|
||||
}
|
||||
}
|
||||
//定义校验规则
|
||||
@@ -873,10 +875,28 @@ watch(
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
const open = () => {
|
||||
const open = (row: any) => {
|
||||
dialogFormVisible.value = true
|
||||
//初始化数据
|
||||
resetForm()
|
||||
title.value = row.title
|
||||
nextTick(() => {
|
||||
if (row.row) {
|
||||
getTempLineDetailsById({ id: row.row.id }).then(res => {
|
||||
form.value = res.data
|
||||
form.value.loadType = loadTypeList.value.filter((item: any) => item.name == res.data.loadType)[0]?.id
|
||||
form.value.businessType = businessTypeList.value.filter(
|
||||
(item: any) => item.name == res.data.businessType
|
||||
)[0]?.id
|
||||
form.value.mainWiringDiagram = [
|
||||
{
|
||||
name: res.data.mainWiringDiagram.split('/')[2]
|
||||
}
|
||||
]
|
||||
mainWiringDiagram.value = res.data.mainWiringDiagram
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
@@ -903,7 +923,7 @@ const uploadFileName = val => {
|
||||
uploadName.value = val
|
||||
}
|
||||
//移除文件上传
|
||||
const removeFile = (file: any,uploadFiles:any) => {
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
//监测点台账信息
|
||||
@@ -951,8 +971,8 @@ const confirmForm = () => {
|
||||
ptRatio: form.value.ptRatio / form.value.ptRatio2, //PT变比
|
||||
ctRatio: form.value.ctRatio / form.value.ctRatio2 //CT变比
|
||||
}
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
if (title.value == '监测点信息') {
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
@@ -960,8 +980,9 @@ const confirmForm = () => {
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
|
||||
@@ -96,7 +96,36 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '重新发起',
|
||||
// type: 'warning',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 1 || row.status == 2
|
||||
// },
|
||||
// click: row => {
|
||||
// addForms.value.open({
|
||||
// title: '重新发起',
|
||||
// row: row
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'cancel',
|
||||
// title: '取消',
|
||||
// type: 'danger',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 3 || row.status == 2 || row.status == 4
|
||||
// },
|
||||
// click: row => {
|
||||
// // cancelLeave(row)
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -116,7 +145,9 @@ provide('tableStore', tableStore)
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
addForms.value.open({
|
||||
title: '监测点信息'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="终端信息"
|
||||
:title="title"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
@@ -405,8 +405,8 @@
|
||||
<el-form-item for="-" label="对时功能:" prop="timeSyncFunction">
|
||||
<!-- 默认值 开启 -->
|
||||
<el-radio-group v-model="form.timeSyncFunction">
|
||||
<el-radio value="1">开启</el-radio>
|
||||
<el-radio value="0">关闭</el-radio>
|
||||
<el-radio :value="1">开启</el-radio>
|
||||
<el-radio :value="0">关闭</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="电镀功能:" prop="electroplatingFunction">
|
||||
@@ -446,7 +446,6 @@
|
||||
</el-form-item>
|
||||
<!-- </div> -->
|
||||
<el-divider content-position="left">附件材料</el-divider>
|
||||
<!-- <div id="part3" class="form-two"> -->
|
||||
<el-form-item for="-" label="信息安全检测报告:" class="uploadFile" prop="informationSecurityTestReport">
|
||||
<el-upload
|
||||
v-model:file-list="form.informationSecurityTestReport"
|
||||
@@ -573,8 +572,6 @@
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<!-- </div> -->
|
||||
<!-- </el-tabs> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -596,13 +593,14 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index'
|
||||
import { getAllDeptList } from '@/api/common'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||
import { nodeAllList } from '@/api/device-boot/Business'
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const ruleFormRef = ref(null)
|
||||
const ruleFormRef: any = ref(null)
|
||||
const title = ref('')
|
||||
// acceptType .xls,.xlsx
|
||||
const acceptType = ''
|
||||
//字典获取所属地市
|
||||
@@ -668,6 +666,7 @@ const terminalModelList = [
|
||||
name: '离线'
|
||||
}
|
||||
]
|
||||
const substationList: any = ref([])
|
||||
//字典获取通讯类型
|
||||
const frontTypeList = dictData.getBasicData('Front_Type')
|
||||
//定义通讯状态下拉框数据
|
||||
@@ -706,18 +705,18 @@ const summonFlagList = [
|
||||
//定义电镀功能下拉框数据
|
||||
const electroplatingFunctionList = [
|
||||
{
|
||||
id: '0',
|
||||
id: 0,
|
||||
name: '关闭'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
id: 1,
|
||||
name: '开启'
|
||||
}
|
||||
]
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
//获取所属前置机数据
|
||||
const frontEndMachineList = ref([])
|
||||
const frontEndMachineList: any = ref([])
|
||||
const getFrontEndMachineList = () => {
|
||||
nodeAllList().then(res => {
|
||||
frontEndMachineList.value = res.data
|
||||
@@ -727,7 +726,7 @@ const changeSubstationFlag = () => {
|
||||
console.log(form.value.customSubstaionFlag)
|
||||
//处理所属变电站手都输入/下拉数据
|
||||
if (form.value.customSubstaionFlag == '0') {
|
||||
form.value.substationName = substationList.value.find(item => {
|
||||
form.value.substationName = substationList.value.find((item: any) => {
|
||||
return form.value.substation == item.id
|
||||
})?.name
|
||||
} else {
|
||||
@@ -740,7 +739,7 @@ watch(
|
||||
() => form.value.substation,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
form.value.substationName = substationList.value.find(item => {
|
||||
form.value.substationName = substationList.value.find((item: any) => {
|
||||
return form.value.substation == item.id
|
||||
})?.name
|
||||
}
|
||||
@@ -752,7 +751,7 @@ watch(
|
||||
)
|
||||
getFrontEndMachineList()
|
||||
//定义所属供电公司数据
|
||||
const powerCompanyList = ref([])
|
||||
const powerCompanyList: any = ref([])
|
||||
//获取所属供电公司,区域列表第三层数据
|
||||
const getPowerCompanyList = async () => {
|
||||
getAllDeptList().then(res => {
|
||||
@@ -763,7 +762,7 @@ const getPowerCompanyList = async () => {
|
||||
})
|
||||
}
|
||||
//根据所选供电公司查询所选获取变电站与变电站电压等级
|
||||
const substationList = ref([])
|
||||
|
||||
const findSubstationVoltageLevel = async () => {
|
||||
getSubstationVoltageLevel({ orgIds: [form.value.powerCompany] }).then(res => {
|
||||
substationList.value = res.data
|
||||
@@ -773,7 +772,7 @@ const findSubstationVoltageLevel = async () => {
|
||||
}
|
||||
//变电站选择的时候切换变电站电压等级
|
||||
const changeSubstation = async () => {
|
||||
let obj = substationList.value.find(item => item.id == form.value.substation)
|
||||
let obj = substationList.value.find((item: any) => item.id == form.value.substation)
|
||||
form.value.substationVoltageLevel = obj?.voltageLevel
|
||||
}
|
||||
const containerRef = ref<HTMLElement | null>(null)
|
||||
@@ -781,7 +780,7 @@ const containerRef = ref<HTMLElement | null>(null)
|
||||
const handleClick = (e: MouseEvent) => {
|
||||
e.preventDefault()
|
||||
}
|
||||
const resetForm = async () => {
|
||||
const resetForm: any = async () => {
|
||||
form.value = {
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
@@ -831,7 +830,7 @@ const resetForm = async () => {
|
||||
terminalSecretKey: '', //终端秘钥
|
||||
terminalType: terminalTypeList[0].id, // 终端型号
|
||||
terminalWiringMethodType: terminalWiringMethodTypeList[0].id, // 终端接线方式类型
|
||||
timeSyncFunction: '0', // 对时功能
|
||||
timeSyncFunction: 0, // 对时功能
|
||||
voltageTransformerType: voltageTransformerTypeList[0].id //电压互感器类型
|
||||
}
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
@@ -841,7 +840,7 @@ const resetForm = async () => {
|
||||
//初始化数据
|
||||
resetForm()
|
||||
//终端信息表单格式
|
||||
const devReportForm = ref({
|
||||
const devReportForm: any = ref({
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
orgId: '', //填报部门
|
||||
@@ -893,7 +892,7 @@ const devReportForm = ref({
|
||||
terminalSecretKey: '', //终端秘钥
|
||||
terminalType: terminalTypeList[0].id, // 终端型号
|
||||
terminalWiringMethodType: terminalWiringMethodTypeList[0].id, // 终端接线方式类型
|
||||
timeSyncFunction: '0', // 对时功能
|
||||
timeSyncFunction: 0, // 对时功能
|
||||
voltageTransformerType: voltageTransformerTypeList[0].id //电压互感器类型
|
||||
}
|
||||
})
|
||||
@@ -1344,9 +1343,43 @@ const disabledDate = time => {
|
||||
}
|
||||
const activeName = ref('0')
|
||||
|
||||
const open = async () => {
|
||||
getPowerCompanyList()
|
||||
const open = async (row: any) => {
|
||||
await getPowerCompanyList()
|
||||
title.value = row.title
|
||||
dialogFormVisible.value = true
|
||||
if (row.row) {
|
||||
await getTerminalDetailsById({ id: row.row.id }).then((res: any) => {
|
||||
form.value = { customSubstaionFlag: '0', ...res.data, ...res.data.supervisionTempDeviceReport }
|
||||
let list = [
|
||||
'deviceFilePath',
|
||||
'acceptanceInspectionReportSingle',
|
||||
'acceptanceInspectionReport',
|
||||
'typeExperimentReport',
|
||||
'factoryInspectionReport',
|
||||
'performanceTestReport',
|
||||
'informationSecurityTestReport',
|
||||
'otherAttachments'
|
||||
]
|
||||
for (let k of list) {
|
||||
if (res.data[k]) {
|
||||
form.value[k] = [
|
||||
{
|
||||
name: res.data[k].split('/')[2]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
deviceFilePath.value = res.data.deviceFilePath
|
||||
acceptanceInspectionReportSingle.value = res.data.acceptanceInspectionReportSingle
|
||||
acceptanceInspectionReport.value = res.data.acceptanceInspectionReport
|
||||
typeExperimentReport.value = res.data.typeExperimentReport
|
||||
factoryInspectionReport.value = res.data.factoryInspectionReport
|
||||
performanceTestReport.value = res.data.performanceTestReport
|
||||
informationSecurityTestReport.value = res.data.informationSecurityTestReport
|
||||
otherAttachments.value = res.data.otherAttachments
|
||||
})
|
||||
}
|
||||
}
|
||||
const close = async () => {
|
||||
//重置表单内容
|
||||
@@ -1413,17 +1446,21 @@ const confirmForm = () => {
|
||||
typeExperimentReport: typeExperimentReport.value, //型式实验报告
|
||||
otherAttachments: otherAttachments?.value //其他附件
|
||||
}
|
||||
addTerminalFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
if (title.value == '终端信息') {
|
||||
addTerminalFormData(confirmFormData).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(confirmFormData)
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
|
||||
@@ -34,11 +34,11 @@ const tableStore = new TableStore({
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'orgName', title: '填报部门名称' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '填报部门名称', minWidth: 170 },
|
||||
{ field: 'substationName', title: '所属变电站', minWidth: 170 },
|
||||
{ field: 'monitoringTerminalName', title: '设备名称', minWidth: 170 },
|
||||
{ field: 'monitoringTerminalCode', title: '设备编号', minWidth: 170 },
|
||||
{ field: 'reportDate', title: '填报日期', minWidth: 170},
|
||||
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
||||
{ field: 'reporter', title: '填报人', minWidth: 80 },
|
||||
{
|
||||
field: 'status',
|
||||
@@ -74,7 +74,7 @@ const tableStore = new TableStore({
|
||||
// { field: 'otherAttachments', title: '其他附件', minWidth: 170 },
|
||||
// { field: 'orgName', title: '填报部门名称'},
|
||||
// { field: 'performanceTestReport', title: '性能检测报告', minWidth: 170 },
|
||||
|
||||
|
||||
// {
|
||||
// field: 'userStatus',
|
||||
// title: '用户状态',
|
||||
@@ -110,13 +110,42 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '重新发起',
|
||||
// type: 'warning',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 1 || row.status == 2
|
||||
// },
|
||||
// click: row => {
|
||||
// addForms.value.open({
|
||||
// title: '重新发起',
|
||||
// row: row
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'cancel',
|
||||
// title: '取消',
|
||||
// type: 'danger',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 3 || row.status == 2 || row.status == 4
|
||||
// },
|
||||
// click: row => {
|
||||
// // cancelLeave(row)
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
@@ -129,9 +158,10 @@ provide('tableStore', tableStore)
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
}, 0);
|
||||
|
||||
addForms.value.open({
|
||||
title: '终端信息'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
|
||||
const exportEvent = () => {
|
||||
|
||||
Reference in New Issue
Block a user