技术监督计划发起告警单接口联调

This commit is contained in:
zhujiyan
2024-05-27 15:35:38 +08:00
parent e05717790d
commit 767a35d626
2 changed files with 50 additions and 3 deletions

View File

@@ -38,6 +38,16 @@ export const planDetailsAudit = (obj: any) => {
data:form data:form
}) })
} }
// 发起告警单
export const sendAlarm = (obj: any) => {
return createAxios({
url:'/supervision-boot/superPlan/initiateWarningLeaflet',
method: 'GET',
params:obj
})
}
/** /**
* 根据id获取监督计划详情 * 根据id获取监督计划详情
*/ */

View File

@@ -44,14 +44,15 @@ import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import addForm from './components/addForm.vue' import addForm from './components/addForm.vue'
import effectProblem from './components/effectProblem/index.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({ defineOptions({
name: '/admin/plan' name: '/admin/plan'
}) })
const layout = mainHeight(63) as any const layout = mainHeight(63) as any
const dictData = useDictData() const dictData = useDictData()
const { push } = useRouter() const { push } = useRouter()
const router = useRouter() // 路由对象
const TableHeaderRef = ref() const TableHeaderRef = ref()
const tableRef = ref() const tableRef = ref()
//字典获取监督类型 //字典获取监督类型
@@ -157,7 +158,7 @@ const tableStore = new TableStore({
}, },
{ {
title: '操作', title: '操作',
minWidth: 200, minWidth: 300,
fixed: 'right', fixed: 'right',
render: 'buttons', render: 'buttons',
buttons: [ buttons: [
@@ -196,6 +197,34 @@ const tableStore = new TableStore({
click: row => { click: row => {
handleAudit(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() tableStore.index()
}) })
} }
//发起告警单
const handleAlarmForm=(row:any)=>{
sendAlarm({ id: row.planId }).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()
})
}
// 实施问题按钮 // 实施问题按钮
const effectProblemList = ref() const effectProblemList = ref()
const effectProblemForm: any = ref({}) const effectProblemForm: any = ref({})