diff --git a/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue b/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
index 14291049..f8fea835 100644
--- a/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
+++ b/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
@@ -68,7 +68,7 @@
for="-"
label="关联电站:"
v-if="form.customSubstationFlag == 0"
- prop="substation"
+ :prop="dynamicProp"
style="display: flex; align-items: center"
>
-->
-
+
+
@@ -135,13 +136,15 @@
diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue
index c924ce63..af43b484 100644
--- a/src/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue
+++ b/src/views/pqs/supervise/terminalNetworkDetection/components/jointDebugList/index.vue
@@ -92,6 +92,7 @@ const tableStore = new TableStore({
minWidth: 100,
render: 'tag',
custom: {
+ 0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
@@ -99,6 +100,7 @@ const tableStore = new TableStore({
5: 'primary'
},
replaceValue: {
+ 0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
@@ -127,6 +129,19 @@ const tableStore = new TableStore({
return !row.processInstanceId
}
},
+ {
+ name: 'edit',
+ title: '编辑',
+ type: 'primary',
+ icon: 'el-icon-Open',
+ render: 'basicButton',
+ disabled: row => {
+ return row.createBy != adminInfo.$state.id || !(row.status == 0)
+ },
+ click: row => {
+ debugForms.value.open('编辑', row)
+ }
+ },
{
name: 'productSetting',
title: '申请联调',
diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue
index 0939d07f..e46e90e9 100644
--- a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue
+++ b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/addForm.vue
@@ -352,7 +352,8 @@
@@ -974,14 +975,18 @@ const open = async (row: any) => {
form.value.businessType = businessTypeList.value.filter(
(item: any) => item.name == res.data.businessType
)[0]?.id
- mainWiringDiagram.value = JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
- form.value.mainWiringDiagram = JSON.parse(
- JSON.stringify([
- {
- name: res.data.mainWiringDiagram.split('/')[2]
- }
- ])
- )
+ mainWiringDiagram.value =
+ res.data.mainWiringDiagram.length == 0 ? [] : JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
+ form.value.mainWiringDiagram =
+ res.data.mainWiringDiagram.length == 0
+ ? []
+ : JSON.parse(
+ JSON.stringify([
+ {
+ name: res.data.mainWiringDiagram.split('/')[2]
+ }
+ ])
+ )
})
} else {
resendId.value = ''
@@ -1057,65 +1062,100 @@ const disabledDate = time => {
}
const activeName = ref('0')
//提交
-const confirmForm = () => {
- // 先判断提交终端信息与监测点信息
- // 提交监测点信息
- ruleFormRef.value.validate(valid => {
- if (valid) {
- //整理上传文件的数据
- //处理填报日期时间格式
- form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
- let confirmFormData = JSON.parse(JSON.stringify(form.value))
- if (!form.value.pt1 || !form.value.pt2) {
- return ElMessage({
- message: '请输入PT变比',
- type: 'warning'
- })
- }
- if (!form.value.ct1 || !form.value.ct2) {
- return ElMessage({
- message: '请输入CT变比',
- type: 'warning'
- })
- }
- //提交终端信息
- confirmFormData = {
- ...confirmFormData,
- lineFilePath: lineFilePath?.value, //监测点信息
- mainWiringDiagram: mainWiringDiagram.value //主接线图
- // pt1: form.value.pt1 / form.value.pt2, //PT变比
- // ct1: form.value.ct1 / form.value.ct2 //CT变比
- }
- if (title.value == '监测点信息') {
- addMointorPointFormData(confirmFormData).then(res => {
- ElMessage({
- message: '新增成功',
- type: 'success'
+const confirmForm = (flag: boolean) => {
+ if (flag) {
+ form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
+ let confirmFormData = JSON.parse(JSON.stringify(form.value))
+ if (!form.value.pt1 || !form.value.pt2) {
+ return ElMessage({
+ message: '请输入PT变比',
+ type: 'warning'
+ })
+ }
+ if (!form.value.ct1 || !form.value.ct2) {
+ return ElMessage({
+ message: '请输入CT变比',
+ type: 'warning'
+ })
+ }
+ //提交终端信息
+ confirmFormData = {
+ ...confirmFormData,
+ lineFilePath: form.value.lineFilePath?.length == 0 ? '' : lineFilePath?.value, //监测点信息
+ mainWiringDiagram: form.value.mainWiringDiagram?.length == 0 ? '' : mainWiringDiagram.value //主接线图
+ }
+ confirmFormData.saveOrCheckflag = '1'
+ if (title.value != '监测点信息') confirmFormData.id = resendId.value
+ addMointorPointFormData(confirmFormData).then(res => {
+ ElMessage({
+ message: '保存成功!',
+ type: 'success'
+ })
+ ruleFormRef.value.resetFields()
+ resetForm()
+ close()
+ })
+ } else {
+ // 先判断提交终端信息与监测点信息
+ // 提交监测点信息
+ ruleFormRef.value.validate(valid => {
+ if (valid) {
+ //整理上传文件的数据
+ //处理填报日期时间格式
+ form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
+ let confirmFormData = JSON.parse(JSON.stringify(form.value))
+ if (!form.value.pt1 || !form.value.pt2) {
+ return ElMessage({
+ message: '请输入PT变比',
+ type: 'warning'
})
- ruleFormRef.value.resetFields()
- resetForm()
- close()
- })
- } else {
- confirmFormData.id = resendId.value
- // console.log(confirmFormData, '99999999999')
- updateMointorPointFormData(confirmFormData).then(res => {
- if (res.code == 'A0000') {
+ }
+ if (!form.value.ct1 || !form.value.ct2) {
+ return ElMessage({
+ message: '请输入CT变比',
+ type: 'warning'
+ })
+ }
+ //提交终端信息
+ confirmFormData = {
+ ...confirmFormData,
+ lineFilePath: form.value.lineFilePath?.length == 0 ? null : lineFilePath?.value, //监测点信息
+ mainWiringDiagram: form.value.mainWiringDiagram?.length == 0 ? null : mainWiringDiagram.value //主接线图
+ // pt1: form.value.pt1 / form.value.pt2, //PT变比
+ // ct1: form.value.ct1 / form.value.ct2 //CT变比
+ }
+ confirmFormData.saveOrCheckflag = '2'
+ if (title.value == '监测点信息') {
+ addMointorPointFormData(confirmFormData).then(res => {
ElMessage({
- message: '重新发起成功',
+ message: '新增成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
- }
- })
+ })
+ } else {
+ confirmFormData.id = resendId.value
+ // console.log(confirmFormData, '99999999999')
+ updateMointorPointFormData(confirmFormData).then(res => {
+ if (res.code == 'A0000') {
+ ElMessage({
+ message: '重新发起成功',
+ type: 'success'
+ })
+ ruleFormRef.value.resetFields()
+ resetForm()
+ close()
+ }
+ })
+ }
+ } else {
+ // // console.log('表单验证失败')
+ return false
}
- } else {
- // // console.log('表单验证失败')
- return false
- }
- })
+ })
+ }
}
defineExpose({ open })
diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue
index 87e5c521..fc4b427f 100644
--- a/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue
+++ b/src/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue
@@ -89,12 +89,14 @@ const tableStore = new TableStore({
minWidth: 100,
render: 'tag',
custom: {
+ 0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
+ 0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
@@ -113,11 +115,30 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
+ disabled: row => {
+ return !row.processInstanceId
+ },
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
+ {
+ name: 'edit',
+ title: '编辑',
+ type: 'primary',
+ icon: 'el-icon-Open',
+ render: 'basicButton',
+ disabled: row => {
+ return row.createBy != adminInfo.$state.id || !(row.status == 0)
+ },
+ click: row => {
+ addForms.value.open({
+ title: '编辑',
+ row: row
+ })
+ }
+ },
{
name: 'edit',
title: '重新发起',
diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue
index 2331d1ee..0e41a12e 100644
--- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue
+++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/addForm.vue
@@ -590,7 +590,8 @@
@@ -1421,61 +1422,116 @@ const close = async () => {
resetForm()
}
//提交
-const confirmForm = () => {
- // 提交终端信息
- ruleFormRef.value.validate(valid => {
- if (valid) {
- //整理上传文件的数据
- devReportForm.value.reporter = adminInfo.$state.id
- devReportForm.value.orgId = adminInfo.$state.deptId
- let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
- //提交终端信息
- confirmFormData = {
- ...confirmFormData,
- acceptanceInspectionReport: acceptanceInspectionReport.value, //验收检验报告
- // acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
- deviceFilePath: deviceFilePath?.value, //终端台账信息
- factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告
- informationSecurityTestReport: informationSecurityTestReport.value, //信息安全检测报告
- performanceTestReport: performanceTestReport.value, //性能检测报告
- typeExperimentReport: typeExperimentReport.value, //型式实验报告
- otherAttachments: otherAttachments?.value //其他附件
- }
- if (title.value == '终端信息') {
- addTerminalFormData(confirmFormData).then((res: any) => {
- if (res.code == 'A0000') {
- ElMessage({
- message: '新增成功',
- type: 'success'
- })
- ruleFormRef.value.resetFields()
- resetForm()
- close()
- }
- })
- } else {
- confirmFormData.reporter = adminInfo.$state.id
- confirmFormData.orgId = adminInfo.$state.deptId
- confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
- confirmFormData.supervisionTempDeviceReportParam.commissioningTime.replace('T', ' ')
- confirmFormData.id = resendId.value
- updateTerminalFormData(confirmFormData).then((res: any) => {
- if (res.code == 'A0000') {
- ElMessage({
- message: '重新发起成功',
- type: 'success'
- })
- ruleFormRef.value.resetFields()
- resetForm()
- close()
- }
- })
- }
- } else {
- console.log('表单验证失败')
- return false
+const confirmForm = async (flag: boolean) => {
+ if (flag) {
+ // 提交终端信息
+
+ //整理上传文件的数据
+ devReportForm.value.reporter = adminInfo.$state.id
+ devReportForm.value.orgId = adminInfo.$state.deptId
+ let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
+ //提交终端信息 form.value
+ confirmFormData = {
+ ...confirmFormData,
+ acceptanceInspectionReport:
+ form.value.acceptanceInspectionReport.length == 0 ? '' : acceptanceInspectionReport.value, //验收检验报告
+ // acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
+ deviceFilePath: form.value.deviceFilePath.length == 0 ? '' : deviceFilePath?.value, //终端台账信息
+ factoryInspectionReport:
+ form.value.factoryInspectionReport.length == 0 ? '' : factoryInspectionReport.value, //出厂检验报告
+ informationSecurityTestReport:
+ form.value.informationSecurityTestReport.length == 0 ? '' : informationSecurityTestReport.value, //信息安全检测报告
+ performanceTestReport: form.value.performanceTestReport.length == 0 ? '' : performanceTestReport.value, //性能检测报告
+ typeExperimentReport: form.value.typeExperimentReport.length == 0 ? '' : typeExperimentReport.value, //型式实验报告
+ otherAttachments: form.value.otherAttachments.length == 0 ? '' : otherAttachments?.value //其他附件
}
- })
+
+ confirmFormData.saveOrCheckflag = '1'
+ confirmFormData.reporter = adminInfo.$state.id
+ confirmFormData.orgId = adminInfo.$state.deptId
+ confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
+ confirmFormData?.supervisionTempDeviceReportParam?.commissioningTime?.replace('T', ' ') || ''
+
+ let powerCompanID = powerCompanyList.value.filter(item => item.name == form.value.powerCompany)[0]?.id
+ confirmFormData.supervisionTempDeviceReportParam.terminalIp = form.value.terminalIp
+ confirmFormData.supervisionTempDeviceReportParam.powerCompany = powerCompanID
+ ? powerCompanID
+ : form.value.powerCompany
+
+ if (title.value != '终端信息') confirmFormData.id = resendId.value
+
+ await addTerminalFormData(confirmFormData).then((res: any) => {
+ if (res.code == 'A0000') {
+ ElMessage({
+ message: '保存成功!',
+ type: 'success'
+ })
+ ruleFormRef.value.resetFields()
+ resetForm()
+ close()
+ }
+ })
+ } else {
+ // 提交终端信息
+ ruleFormRef.value.validate(valid => {
+ if (valid) {
+ //整理上传文件的数据
+ devReportForm.value.reporter = adminInfo.$state.id
+ devReportForm.value.orgId = adminInfo.$state.deptId
+ let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
+ //提交终端信息
+ confirmFormData = {
+ ...confirmFormData,
+ acceptanceInspectionReport:
+ form.value.acceptanceInspectionReport.length == 0 ? '' : acceptanceInspectionReport.value, //验收检验报告
+ // acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
+ deviceFilePath: form.value.deviceFilePath.length == 0 ? '' : deviceFilePath?.value, //终端台账信息
+ factoryInspectionReport:
+ form.value.factoryInspectionReport.length == 0 ? '' : factoryInspectionReport.value, //出厂检验报告
+ informationSecurityTestReport:
+ form.value.informationSecurityTestReport.length == 0 ? '' : informationSecurityTestReport.value, //信息安全检测报告
+ performanceTestReport:
+ form.value.performanceTestReport.length == 0 ? '' : performanceTestReport.value, //性能检测报告
+ typeExperimentReport: form.value.typeExperimentReport.length == 0 ? '' : typeExperimentReport.value, //型式实验报告
+ otherAttachments: form.value.otherAttachments.length == 0 ? '' : otherAttachments?.value //其他附件
+ }
+ confirmFormData.saveOrCheckflag = '2'
+ if (title.value == '终端信息') {
+ addTerminalFormData(confirmFormData).then((res: any) => {
+ if (res.code == 'A0000') {
+ ElMessage({
+ message: '新增成功',
+ type: 'success'
+ })
+ ruleFormRef.value.resetFields()
+ resetForm()
+ close()
+ }
+ })
+ } else {
+ confirmFormData.reporter = adminInfo.$state.id
+ confirmFormData.orgId = adminInfo.$state.deptId
+ confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
+ confirmFormData.supervisionTempDeviceReportParam.commissioningTime.replace('T', ' ')
+ confirmFormData.id = resendId.value
+ updateTerminalFormData(confirmFormData).then((res: any) => {
+ if (res.code == 'A0000') {
+ ElMessage({
+ message: '重新发起成功',
+ type: 'success'
+ })
+ ruleFormRef.value.resetFields()
+ resetForm()
+ close()
+ }
+ })
+ }
+ } else {
+ console.log('表单验证失败')
+ return false
+ }
+ })
+ }
}
defineExpose({ open })
diff --git a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue
index 7ac1277d..f033d5ac 100644
--- a/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue
+++ b/src/views/pqs/supervise/terminalNetworkDetection/components/terminainal/index.vue
@@ -1,4 +1,3 @@
-
@@ -96,12 +95,14 @@ const tableStore = new TableStore({
minWidth: 100,
render: 'tag',
custom: {
+ 0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
+ 0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
@@ -157,11 +158,30 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
+ disabled: row => {
+ return !row.processInstanceId
+ },
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
+ {
+ name: 'edit',
+ title: '编辑',
+ type: 'primary',
+ icon: 'el-icon-Open',
+ render: 'basicButton',
+ disabled: row => {
+ return row.createBy != adminInfo.$state.id || !(row.status == 0)
+ },
+ click: row => {
+ addForms.value.open({
+ title: '编辑',
+ row: row
+ })
+ }
+ },
{
name: 'edit',
title: '重新发起',
diff --git a/src/views/pqs/supervise/testRun/index.vue b/src/views/pqs/supervise/testRun/index.vue
index b3ead9c6..db7bc8b7 100644
--- a/src/views/pqs/supervise/testRun/index.vue
+++ b/src/views/pqs/supervise/testRun/index.vue
@@ -56,10 +56,11 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { addRunTest } from '@/api/supervision-boot/lineRunTest'
import { formatDate } from '@/utils/formatTime'
import { VxeTablePropTypes } from 'vxe-table'
+import { useAdminInfo } from '@/stores/adminInfo'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const { push } = useRouter()
-
+const adminInfo = useAdminInfo()
const TableHeaderRef = ref()
const tableRef = ref()
@@ -107,12 +108,14 @@ const tableStore = new TableStore({
minWidth: 100,
render: 'tag',
custom: {
+ 0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
+ 0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
@@ -145,10 +148,22 @@ const tableStore = new TableStore({
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
- return row.testRunState != 2
+ return row.testRunState != 2 || !row.processInstanceId
+ }
+ },
+ {
+ name: 'edit',
+ title: '编辑',
+ type: 'primary',
+ icon: 'el-icon-Open',
+ render: 'basicButton',
+ disabled: row => {
+ return row.createBy != adminInfo.$state.id || !(row.status == 0)
+ },
+ click: row => {
+
}
},
-
{
name: 'productSetting',
title: '重新试运行',