From 767a35d626c81533a97f5b79351672a985aad1d3 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Mon, 27 May 2024 15:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=8F=91=E8=B5=B7=E5=91=8A=E8=AD=A6=E5=8D=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supervision-boot/plan/index.ts | 10 ++++++ src/views/pqs/supervise/plan/index.vue | 43 ++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/api/supervision-boot/plan/index.ts b/src/api/supervision-boot/plan/index.ts index b01b039f..f11079f8 100644 --- a/src/api/supervision-boot/plan/index.ts +++ b/src/api/supervision-boot/plan/index.ts @@ -38,6 +38,16 @@ export const planDetailsAudit = (obj: any) => { data:form }) } + +// 发起告警单 +export const sendAlarm = (obj: any) => { + return createAxios({ + url:'/supervision-boot/superPlan/initiateWarningLeaflet', + method: 'GET', + params:obj + }) +} + /** * 根据id获取监督计划详情 */ diff --git a/src/views/pqs/supervise/plan/index.vue b/src/views/pqs/supervise/plan/index.vue index 9c4e302d..3f03944a 100644 --- a/src/views/pqs/supervise/plan/index.vue +++ b/src/views/pqs/supervise/plan/index.vue @@ -44,14 +44,15 @@ import { getLoadTypeUserList } from '@/api/process-boot/interference' import { useDictData } from '@/stores/dictData' import addForm from './components/addForm.vue' import effectProblem from './components/effectProblem/index.vue' -import { planDetailsAudit } from '@/api/supervision-boot/plan/index' +import { planDetailsAudit ,sendAlarm} from '@/api/supervision-boot/plan/index' +import { ElMessage } from 'element-plus' defineOptions({ name: '/admin/plan' }) const layout = mainHeight(63) as any const dictData = useDictData() const { push } = useRouter() - +const router = useRouter() // 路由对象 const TableHeaderRef = ref() const tableRef = ref() //字典获取监督类型 @@ -157,7 +158,7 @@ const tableStore = new TableStore({ }, { title: '操作', - minWidth: 200, + minWidth: 300, fixed: 'right', render: 'buttons', buttons: [ @@ -196,6 +197,34 @@ const tableStore = new TableStore({ click: row => { handleAudit(row) } + }, + { + name: 'productSetting', + title: '发起告警单', + type: 'primary', + icon: 'el-icon-EditPen', + render: 'basicButton', + disabled: row => { + return row.isUploadHead == 1 + }, + click: row => { + handleAlarmForm(row) + } + }, + { + name: 'edit', + title: '查看告警单', + type: 'primary', + icon: 'el-icon-Open', + render: 'basicButton', + disabled: row => { + return row.isUploadHead == 0 + }, + click: row => { + router.push({ + name: 'supervision/supervision/manage' + }) + } } ] } @@ -255,6 +284,14 @@ const handleAudit = (row: any) => { tableStore.index() }) } +//发起告警单 +const handleAlarmForm=(row:any)=>{ + sendAlarm({ id: row.planId }).then(res => { + ElMessage.success('发起告警单成功!') + tableStore.index() + }) +} + // 实施问题按钮 const effectProblemList = ref() const effectProblemForm: any = ref({})