调整form表单接口
This commit is contained in:
@@ -1,45 +1,25 @@
|
||||
<template>
|
||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<!-- <template v-slot:select>
|
||||
<el-form-item label="超标指标">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.evaluateType"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择评估类型"
|
||||
>
|
||||
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template v-slot:operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
<TableHeader datePicker ref='TableHeaderRef'>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<testQuestionsForm ref="testQuestionsFormRef" />
|
||||
<Table ref='tableRef' />
|
||||
<testQuestionsForm ref='testQuestionsFormRef' />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
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 testQuestionsForm from './form/testQuestionsForm.vue'
|
||||
// Steady_Statis
|
||||
const dictData = useDictData()
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const tableRef = ref()
|
||||
const planAddRef = ref()
|
||||
const listFormRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const testQuestionsFormRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/generalSurvey/getSurvey',
|
||||
url: '/supervision-boot/generalSurvey/pageProblemSubstationBySurvey',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
@@ -52,43 +32,61 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '区域' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'name', title: '普测计划名称' },
|
||||
{ field: 'time', title: '普测结果上传时间' },
|
||||
{ field: 'text', title: '问题描述' },
|
||||
|
||||
{ field: 'orgName', title: '单位', minWidth: 120 },
|
||||
{ field: 'subName', title: '变电站', minWidth: 120 },
|
||||
{ field: 'planName', title: '普测计划名称', minWidth: 120 },
|
||||
{ field: 'planCreateTime', title: '计划生成时间', minWidth: 100 },
|
||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
|
||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
|
||||
{ field: 'planComplateTime', title: '实际完成时间', minWidth: 100 },
|
||||
{ field: 'leader', title: '测试负责人', minWidth: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
minWidth: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '附件预览',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'confirmButton',
|
||||
//
|
||||
// click: row => {}
|
||||
// },
|
||||
{
|
||||
name: 'edit',
|
||||
title: '附件预览',
|
||||
type: 'primary',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'confirmButton',
|
||||
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起预警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 1
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'primary',
|
||||
title: '请确认发起发起预警单!'
|
||||
title: '请确认发起发起告警单!'
|
||||
},
|
||||
click: row => {
|
||||
initiateAlarm(row.planNo,row.subId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
|
||||
click: row => {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -96,17 +94,6 @@ const tableStore = new TableStore({
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
orgName: '张家口',
|
||||
subName: '张家口变电站',
|
||||
name: '张家口变电站1期普测计划',
|
||||
time: '2024-05-16',
|
||||
text: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -115,11 +102,16 @@ provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const add = () => {
|
||||
testQuestionsFormRef.value.open({
|
||||
text: '新增测试问题'
|
||||
})
|
||||
|
||||
/**
|
||||
* 发起告警单
|
||||
*/
|
||||
const initiateAlarm = async (id: string,subId:string) => {
|
||||
await initiateWarningLeaflet(id,subId)
|
||||
ElMessage.success('发起告警成功!')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style scoped lang='scss'></style>
|
||||
|
||||
Reference in New Issue
Block a user