diff --git a/src/api/process-boot/electricitymanagement.ts b/src/api/process-boot/electricitymanagement.ts index 97ee5232..c831c0af 100644 --- a/src/api/process-boot/electricitymanagement.ts +++ b/src/api/process-boot/electricitymanagement.ts @@ -213,8 +213,8 @@ export function addComplaintsData(data) { export function sureInitiateWarningLeaflet(query) { return createAxios({ url: '/supervision-boot/SupervisionUserComplaint/initiateWarningLeaflet', - method: 'GET', - params: query + method: 'POST', + data: query }) } diff --git a/src/api/supervision-boot/survey/test.ts b/src/api/supervision-boot/survey/test.ts index 685f7ba9..c7edc502 100644 --- a/src/api/supervision-boot/survey/test.ts +++ b/src/api/supervision-boot/survey/test.ts @@ -40,10 +40,11 @@ export const updateSurveyTest = (data: any) => { /** * 针对有问题的现场测试发起告警单 */ -export const initiateWarningLeaflet = (id: string) => { +export const initiateWarningLeaflet = (data:any) => { return createAxios({ - url: MAPPING_PATH + '/initiateWarningLeaflet?id=' + id, - method: 'GET' + url: MAPPING_PATH + '/initiateWarningLeaflet', + method: 'POST', + data }) } diff --git a/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue b/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue index 92d99999..4deb92b5 100644 --- a/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue +++ b/src/views/pqs/supervise/electricalEnergy/components1/complaints.vue @@ -102,17 +102,19 @@ const tableStore = new TableStore({ // title: '请确认发起告警单!' // }, click: async row => { - const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', { + const { value } = await ElMessageBox.prompt('', '整改意见', { confirmButtonText: '确定', cancelButtonText: '取消', inputType: 'textarea', inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 - inputErrorMessage: '取消原因不能为空' + inputErrorMessage: '请输入整改意见' }) - // sureInitiateWarningLeaflet({ id: row.id }) - // ElMessage.success('发起告警单成功!') - // tableStore.index() + sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res=>{ + ElMessage.success('发起告警单成功!') + tableStore.index() + }) + } }, { diff --git a/src/views/pqs/supervise/electricalEnergy/components1/online.vue b/src/views/pqs/supervise/electricalEnergy/components1/online.vue index 95ec562f..b2215bd5 100644 --- a/src/views/pqs/supervise/electricalEnergy/components1/online.vue +++ b/src/views/pqs/supervise/electricalEnergy/components1/online.vue @@ -4,16 +4,29 @@ @@ -25,19 +38,18 @@ import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import { ElMessage, ElMessageBox } from 'element-plus' import { useDictData } from '@/stores/dictData' -import { ValueType } from 'exceljs' + import { handleWarningAlarmFlag } from '@/api/process-boot/electricitymanagement' // Steady_Statis const dictData = useDictData() //字典获取超标指标 -const exceeded = dictData.getBasicData('Indicator_Type') +const exceeded = dictData.getBasicData('Steady_Statis') const tableRef = ref() -const planAddRef = ref() -const listFormRef = ref() +const industry = dictData.getBasicData('Business_Type') const TableHeaderRef = ref() const tableStore = new TableStore({ - url: '/harmonic-boot/rmppartharmonicdetail/getRMpPartHarmonicDetail', + url: '/supervision-boot/onlineMonitor/list', publicHeight: 65, method: 'POST', // isWebPaging:true, @@ -51,34 +63,34 @@ const tableStore = new TableStore({ return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1 } }, - { field: 'sustationName', title: '变电站名称', width: 170 }, - { field: 'barName', title: '母线名称', width: 170 }, - { field: 'dutyOrgName', title: '负责单位', minWidth: '150' }, - { field: 'measurementPointName', title: '监测点名称', width: 170 }, - { field: 'voltageLevel', title: '电压等级', width: 170 }, - { field: 'loadType', title: '监测点对象类型', width: 170 }, - { field: 'objName', title: '监测点对象名称', width: 170 }, - { field: 'dateList', title: '超标天数详情', width: 170 }, + { field: 'substation', title: '变电站名称' }, + { field: 'lineName', title: '监测点名称' }, + { field: 'deviceName', title: '终端名称' }, { - field: 'overLimitContinuous', - title: '连续超标天数', - width: 170 - }, - { - field: 'overLimitDay', - title: '超标天数', - width: 170 - }, - { - field: 'overLimitrate', - title: '超标占比', - width: 170, + field: 'businessType', + title: '监测对象类型', + formatter: (row: any) => { - console.log(row.cellValue, row) - let value = parseFloat(row.cellValue * 100).toFixed(2) + '%' - return value + return industry.find((item: any) => item.id == row.cellValue)?.name || '/' } }, + { field: 'objectName', title: '监测对象名称' }, + { field: 'dept', title: '负责单位' }, + { + field: 'dataResource', + title: '数据来源', + render: 'tag', + custom: { + 0: 'primary', + 1: 'success' + }, + replaceValue: { + 0: '系统默认', + 1: '自定义' + } + }, + { field: 'overLimitDay', title: '累计超标天数' }, + { title: '操作', width: '180', @@ -91,19 +103,26 @@ const tableStore = new TableStore({ title: '发起告警单', type: 'warning', disabled: row => { - return row.alarmFlag != 1 + return row.overLimitDay < tableStore.table.params.alarmThreshold }, icon: 'el-icon-EditPen', - render: 'confirmButton', - popconfirm: { - confirmButtonText: '确认', - cancelButtonText: '取消', - confirmButtonType: 'primary', - title: '请确认发起告警单!' - }, - click: row => { - handleWarningAlarmFlag(row).then(res => { - console.log(res) + render: 'basicButton', + + click: async row => { + // handleWarningAlarmFlag(row).then(res => { + // console.log(res) + // ElMessage.success('发起告警单成功!') + // tableStore.index() + // }) + const { value } = await ElMessageBox.prompt('', '整改意见', { + confirmButtonText: '确定', + cancelButtonText: '取消', + + inputType: 'textarea', + inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 + inputErrorMessage: '请输入整改意见' + }) + handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => { ElMessage.success('发起告警单成功!') tableStore.index() }) @@ -115,19 +134,25 @@ const tableStore = new TableStore({ type: 'primary', icon: 'el-icon-Open', disabled: row => { - return row.warningFlag != 1 - }, - render: 'confirmButton', - popconfirm: { - confirmButtonText: '确认', - cancelButtonText: '取消', - confirmButtonType: 'primary', - title: '请确认发起预警单!' + return row.overLimitDay >= tableStore.table.params.alarmThreshold }, + render: 'basicButton', - click: row => { - handleWarningAlarmFlag(row).then(res => { - console.log(res) + click: async row => { + // handleWarningAlarmFlag(row).then(res => { + // console.log(res) + // ElMessage.success('发起预警单成功!') + // tableStore.index() + // }) + const { value } = await ElMessageBox.prompt('', '整改意见', { + confirmButtonText: '确定', + cancelButtonText: '取消', + + inputType: 'textarea', + inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 + inputErrorMessage: '请输入整改意见' + }) + handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => { ElMessage.success('发起预警单成功!') tableStore.index() }) @@ -137,7 +162,7 @@ const tableStore = new TableStore({ } ], beforeSearchFun: () => { - tableStore.table.params.orgNo = tableStore.table.params.deptIndex + tableStore.table.params.deptId = tableStore.table.params.deptIndex tableStore.table.params.currentPage = tableStore.table.params.pageNum }, loadCallback: () => { @@ -161,12 +186,35 @@ const tableStore = new TableStore({ // ] } }) +tableStore.table.params.alertThreshold = 10 +tableStore.table.params.alarmThreshold = 15 +// tableStore.table.params.targetId = '' provide('tableStore', tableStore) onMounted(() => { tableStore.index() }) +const changeAlert = e => { + if (e == null) { + tableStore.table.params.alertThreshold = 10 + } else { + if (e > tableStore.table.params.alarmThreshold) { + ElMessage.warning('预警阈值不能大于报警阈值') + tableStore.table.params.alertThreshold = 10 + } + } +} +const changeAlarm = e => { + if (e == null) { + tableStore.table.params.alarmThreshold = 15 + } else { + if (e < tableStore.table.params.alertThreshold) { + ElMessage.warning('报警阈值不能小于预警阈值') + tableStore.table.params.alarmThreshold = 15 + } + } +} diff --git a/src/views/pqs/supervise/electricalEnergy/components1/testQuestions.vue b/src/views/pqs/supervise/electricalEnergy/components1/testQuestions.vue index dc390f2d..1dda6ca9 100644 --- a/src/views/pqs/supervise/electricalEnergy/components1/testQuestions.vue +++ b/src/views/pqs/supervise/electricalEnergy/components1/testQuestions.vue @@ -3,7 +3,12 @@ @@ -17,7 +22,7 @@ import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import testQuestionsForm from './form/testQuestionsForm.vue' import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test' -import { ElMessage } from 'element-plus' +import { ElMessage,ElMessageBox } from 'element-plus' import { useRouter } from 'vue-router' import { useDictData } from '@/stores/dictData' const dictData = useDictData() @@ -67,18 +72,24 @@ const tableStore = new TableStore({ title: '发起告警单', type: 'warning', icon: 'el-icon-Open', - render: 'confirmButton', + render: 'basicButton', disabled: row => { return row.initiateWarningFlag == 1 }, - popconfirm: { - confirmButtonText: '确认', - cancelButtonText: '取消', - confirmButtonType: 'primary', - title: '请确认发起告警单!' - }, - click: row => { - initiateAlarm(row.id) + + click: async row => { + const { value } = await ElMessageBox.prompt('', '整改意见', { + confirmButtonText: '确定', + cancelButtonText: '取消', + + inputType: 'textarea', + inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 + inputErrorMessage: '请输入整改意见' + }) + initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => { + ElMessage.success('发起告警成功!') + tableStore.index() + }) } }, { @@ -93,8 +104,8 @@ const tableStore = new TableStore({ click: row => { router.push({ name: 'supervision/supervision/manage', - state:{ - type:1 + state: { + type: 1 } }) } diff --git a/src/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue b/src/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue index 6c9803bb..612e5789 100644 --- a/src/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue +++ b/src/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue @@ -136,6 +136,9 @@ const tableStore = new TableStore({ type: 'primary', icon: 'el-icon-EditPen', render: 'basicButton', + disabled: row => { + return !row.processInstanceId + }, click: row => { handleAudit(row.processInstanceId) } diff --git a/src/views/pqs/supervise/retire/deviceQuitPopup.vue b/src/views/pqs/supervise/retire/deviceQuitPopup.vue index b6fada35..295a1089 100644 --- a/src/views/pqs/supervise/retire/deviceQuitPopup.vue +++ b/src/views/pqs/supervise/retire/deviceQuitPopup.vue @@ -117,7 +117,7 @@ const open = async (text: string, tempData?: any) => { } form.value.deviceType = form.value.deviceType + '' changeDevStatus(form.value.deviceId, true) - form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : '' + form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : '' } else { resetForm() // 在此处恢复默认表单 diff --git a/src/views/pqs/supervise/retire/monitor.vue b/src/views/pqs/supervise/retire/monitor.vue index 1124d7fd..87dd1021 100644 --- a/src/views/pqs/supervise/retire/monitor.vue +++ b/src/views/pqs/supervise/retire/monitor.vue @@ -81,7 +81,7 @@ const tableStore = new TableStore({ }, replaceValue: { - 0: '运行', + 0: '投运', 1: '检修', 2: '停运', 3: '调试', @@ -89,6 +89,28 @@ const tableStore = new TableStore({ null: '/' } }, + { + title: '目标状态', + field: 'devStatus', + minWidth: 130, + render: 'tag', + custom: { + 0: 'success', + 1: 'warning', + 2: 'danger', + 3: 'warning', + 4: 'info', + null: 'primary' + }, + replaceValue: { + 0: '投运', + 1: '检修', + 2: '停运', + 3: '调试', + 4: '退运', + null:'/' + } + }, { field: 'status', title: '流程状态', @@ -133,6 +155,9 @@ const tableStore = new TableStore({ type: 'primary', icon: 'el-icon-EditPen', render: 'basicButton', + disabled: row => { + return !row.processInstanceId + }, click: row => { handleAudit(row.processInstanceId, row.historyInstanceId) } diff --git a/src/views/pqs/supervise/retire/monitorQuitPopup.vue b/src/views/pqs/supervise/retire/monitorQuitPopup.vue index d3517478..898aa85d 100644 --- a/src/views/pqs/supervise/retire/monitorQuitPopup.vue +++ b/src/views/pqs/supervise/retire/monitorQuitPopup.vue @@ -22,7 +22,7 @@ { } form.value.deviceType = form.value.deviceType + '' changeDevStatus(form.value.deviceId, true) - form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : '' + form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : '' } else { resetForm() // 在此处恢复默认表单 @@ -161,9 +161,7 @@ const submit = (flag: boolean) => { formRef.value.validate(async (valid: any) => { if (valid) { form.value.saveOrCheckflag = '2' - if (form.value.devOriginalStatus == '4') { - ElMessage.warning('终端当前状态就是退运,无需变更!') - } else { + { if (form.value.id) { await quitRunningDeviceUpdate(form.value) ElMessage.success('重新发起成功') @@ -212,9 +210,11 @@ const changeDevStatus = async (event: any, flag?: any) => { // form.value.devOriginalStatus = '4' // break // } - runFlag.value = runFlagList.filter(item => item.name == res.data.runFlag)[0].id + runFlag.value = runFlagList.filter(item => item.name == res.data.runFlag)[0].id form.value.devOriginalStatus = runFlag.value - if (!flag) form.value.devStatus = '' + if (!flag) { + form.value.devStatus = '' + } runFlagData.value = runFlagList.filter(item => item.name != res.data.runFlag) }) } diff --git a/src/views/pqs/supervise/retire/terminal.vue b/src/views/pqs/supervise/retire/terminal.vue index 3758221e..d20e6da7 100644 --- a/src/views/pqs/supervise/retire/terminal.vue +++ b/src/views/pqs/supervise/retire/terminal.vue @@ -151,6 +151,9 @@ 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) diff --git a/src/views/pqs/supervise/technology/components/alarm.vue b/src/views/pqs/supervise/technology/components/alarm.vue index 55930905..2d3729e8 100644 --- a/src/views/pqs/supervise/technology/components/alarm.vue +++ b/src/views/pqs/supervise/technology/components/alarm.vue @@ -77,6 +77,7 @@ const tableStore = new TableStore({ } }, { field: 'dutyOrgName', title: '负责单位', minWidth: '150' }, + { field: 'reformAdvice', title: '整改意见', minWidth: '150' }, { field: 'leafletName', title: '单据名称', minWidth: '150' }, { field: 'issueDetail', title: '告警内容', minWidth: '150' }, { @@ -139,7 +140,14 @@ const tableStore = new TableStore({ return row.status !== 5 }, click: row => { - feedbackPopup.value.open('填报反馈单', row.id, row.status, row.issueDetail, row.problemPath) + feedbackPopup.value.open( + '填报反馈单', + row.id, + row.status, + row.issueDetail, + row.problemPath, + row.reformAdvice + ) } }, @@ -150,7 +158,7 @@ const tableStore = new TableStore({ icon: 'el-icon-EditPen', render: 'basicButton', disabled: row => { - return row.status == 5 + return !row.processInstanceId }, click: row => { handleAudit(row.processInstanceId, row.historyInstanceId) @@ -172,6 +180,8 @@ const tableStore = new TableStore({ row.status, row.issueDetail, row.problemPath, + + row.reformAdvice , row.takeStep, row.reportPath ) @@ -194,8 +204,10 @@ const tableStore = new TableStore({ row.status, row.issueDetail, row.problemPath, + row.reformAdvice , row.takeStep, - row.reportPath + row.reportPath, + row.reformAdvice ) } }, diff --git a/src/views/pqs/supervise/technology/components/earlyWarn.vue b/src/views/pqs/supervise/technology/components/earlyWarn.vue index d7873a9e..289e9131 100644 --- a/src/views/pqs/supervise/technology/components/earlyWarn.vue +++ b/src/views/pqs/supervise/technology/components/earlyWarn.vue @@ -61,6 +61,7 @@ const tableStore = new TableStore({ } }, { field: 'dutyOrgName', title: '负责单位', minWidth: '150' }, + { field: 'reformAdvice', title: '整改意见', minWidth: '150' }, { field: 'leafletName', title: '单据名称', minWidth: '150' }, { field: 'status', @@ -68,6 +69,7 @@ const tableStore = new TableStore({ minWidth: '150', render: 'tag', custom: { + 0: 'warning', 1: 'primary', 2: 'success', 3: 'danger', @@ -75,6 +77,7 @@ const tableStore = new TableStore({ 5: 'primary' }, replaceValue: { + 0: '待提交审批', 1: '审批中', 2: '审批通过', 3: '审批不通过', @@ -120,7 +123,14 @@ const tableStore = new TableStore({ return row.status !== 5 }, click: row => { - feedbackPopup.value.open('填报反馈单', row.id, row.status, row.issueDetail, row.problemPath) + feedbackPopup.value.open( + '填报反馈单', + row.id, + row.status, + row.issueDetail, + row.problemPath, + row.reformAdvice + ) } }, { @@ -130,12 +140,35 @@ const tableStore = new TableStore({ icon: 'el-icon-EditPen', render: 'basicButton', disabled: row => { - return row.status == 5 + return !row.processInstanceId }, click: row => { 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 => { + feedbackPopup.value.open( + '编辑', + row.id, + row.status, + row.issueDetail, + row.problemPath, + + row.reformAdvice, + row.takeStep, + row.reportPath + ) + } + }, { name: 'edit', title: '重新发起', @@ -153,6 +186,7 @@ const tableStore = new TableStore({ row.status, row.issueDetail, row.problemPath, + row.reformAdvice, row.takeStep, row.reportPath ) diff --git a/src/views/pqs/supervise/technology/feedbackPopup.vue b/src/views/pqs/supervise/technology/feedbackPopup.vue index 64dc0152..e8ad8724 100644 --- a/src/views/pqs/supervise/technology/feedbackPopup.vue +++ b/src/views/pqs/supervise/technology/feedbackPopup.vue @@ -11,6 +11,15 @@ readonly /> + + + @@ -82,6 +91,7 @@ const form = ref({ id: '', status: '', issueDetail: '', + reformAdvice: '', takeStep: '', reportPath: [] }) @@ -113,6 +123,7 @@ const open = async ( status: any, issueDetail: string, problemPath?: string, + reformAdvice?: string, takeStep?: string, reportPath?: string ) => { @@ -134,6 +145,7 @@ const open = async ( form.value.id = id form.value.status = status form.value.issueDetail = issueDetail + form.value.reformAdvice = reformAdvice reportFilePath.value = reportPath //判断附件是否存在,如果存在则回显出让用户可以点击下载 if (problemPath) { @@ -159,6 +171,7 @@ const close = () => { id: '', status: '', issueDetail: '', + reformAdvice: '', takeStep: '', reportPath: [] } @@ -172,7 +185,7 @@ const submit = (flag: boolean) => { let subForm = JSON.parse(JSON.stringify(form.value)) subForm = { ...subForm, - reportPath: reportFilePath.value + reportPath: form.value.reportPath.length > 0 ? reportFilePath.value : null } subForm.saveOrCheckflag = '1' //此时该告警单处于待反馈状态 @@ -188,7 +201,7 @@ const submit = (flag: boolean) => { let subForm = JSON.parse(JSON.stringify(form.value)) subForm = { ...subForm, - reportPath: reportFilePath.value + reportPath: form.value.reportPath.length > 0 ? reportFilePath.value : null } if (!reportFilePath.value) { return ElMessage({ diff --git a/src/views/system/bpm/task/done/index.vue b/src/views/system/bpm/task/done/index.vue index 79a7ce8f..241b3b36 100644 --- a/src/views/system/bpm/task/done/index.vue +++ b/src/views/system/bpm/task/done/index.vue @@ -87,6 +87,9 @@ const tableStore = new TableStore({ type: 'primary', icon: 'el-icon-EditPen', render: 'basicButton', + disabled: row => { + return !row.processInstanceId + }, click: row => { flag.value = true handleAudit(row.processInstance.id, row.historyInstanceId) diff --git a/src/views/system/bpm/task/myInstance/index.vue b/src/views/system/bpm/task/myInstance/index.vue index 3d6d9bf4..60c892c4 100644 --- a/src/views/system/bpm/task/myInstance/index.vue +++ b/src/views/system/bpm/task/myInstance/index.vue @@ -111,6 +111,9 @@ const tableStore = new TableStore({ type: 'primary', icon: 'el-icon-EditPen', render: 'basicButton', + disabled: row => { + return !row.processInstanceId + }, click: row => { flag.value = true handleAudit(row.id, row.historyInstanceId)