修改 电网一张图bug 技术监督新增 重新发起页面绘制

This commit is contained in:
GGJ
2024-06-02 17:55:37 +08:00
parent 91fa1f60e3
commit c7025c615f
16 changed files with 668 additions and 463 deletions

View File

@@ -1,7 +1,7 @@
<template>
<el-dialog
v-model="dialogFormVisible"
title="技术监督计划"
:title="title"
width="65%"
:append-to-body="true"
:before-close="close"
@@ -197,7 +197,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="其他要求:" style="width:100%;">
<el-form-item for="-" label="其他要求:" style="width: 100%">
<el-input
type="textarea"
v-model="form.otherRemark"
@@ -217,7 +217,7 @@
v-model:file-list="form.informationSecurityTestReport"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -240,7 +240,7 @@
v-model:file-list="form.acceptanceInspectionReportSingle"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -263,7 +263,7 @@
v-model:file-list="form.acceptanceInspectionReport"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -287,7 +287,7 @@
v-model:file-list="form.typeExperimentReport"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -310,7 +310,7 @@
v-model:file-list="form.factoryInspectionReport"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -334,7 +334,7 @@
v-model:file-list="form.performanceTestReport"
ref="uploadRef"
action=""
:accept="acceptType"
:accept="acceptType"
:limit="1"
:on-exceed="handleExceed"
:on-change="choose"
@@ -362,15 +362,16 @@ import { genFileId, ElMessage } from 'element-plus'
import { useDictData } from '@/stores/dictData'
import { useAdminInfo } from '@/stores/adminInfo'
import { uploadFile } from '@/api/system-boot/file'
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
import { addPlanFormData, getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
import Area from '@/components/form/area/index.vue'
const emits = defineEmits(['onSubmit'])
const dictData = useDictData()
const dialogFormVisible = ref(false)
const form: any = ref({})
const title = ref('')
const ruleFormRef = ref(null)
// .xls,.xlsx
const acceptType=''
const acceptType = ''
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
//字典获取监督类型
@@ -556,8 +557,14 @@ watch(
immediate: true
}
)
const open = () => {
const open = (row: any) => {
title.value = row.title
dialogFormVisible.value = true
if (row.row) {
getPlanDetailsById({ id: '861efbc90d1fae8e276f477081dd85fe' }).then(res => {
form.value = res.data
})
}
}
const close = () => {
//重置表单内容
@@ -681,17 +688,21 @@ const confirmForm = () => {
// alarmFeedbackMaterials: alarmFeedbackMaterials.value, //告预警单反馈材料
// assessReport: assessReport.value //评估报告
// }
addPlanFormData(confirmFormData).then(res => {
if (res.code == 'A0000') {
ElMessage({
message: '新建技术监督计划成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
}
})
if (title.value == '技术监督计划') {
addPlanFormData(confirmFormData).then(res => {
if (res.code == 'A0000') {
ElMessage({
message: '新建技术监督计划成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
}
})
} else {
console.log(confirmFormData)
}
} else {
console.log('表单验证失败')
return false
@@ -700,6 +711,4 @@ const confirmForm = () => {
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -44,10 +44,11 @@ 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 ,sendAlarm} from '@/api/supervision-boot/plan/index'
import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
import { ElMessage } from 'element-plus'
defineOptions({
name: 'supervise/plan'
name: 'plan'
})
// const layout = mainHeight(120) as any
const dictData = useDictData()
@@ -174,6 +175,23 @@ const tableStore = new TableStore({
return !row.processInstanceId
}
},
// {
// name: 'edit',
// title: '重新发起',
// type: 'warning',
// icon: 'el-icon-Open',
// render: 'basicButton',
// disabled: row => {
// return row.status == 1 || row.status == 2
// },
// click: row => {
// addForms.value.open({
// title: '重新发起',
// row: row
// })
// }
// },
{
name: 'productSetting',
title: '实施问题',
@@ -197,6 +215,20 @@ const tableStore = new TableStore({
handleAudit(row)
}
},
// {
// name: 'cancel',
// title: '取消',
// type: 'danger',
// icon: 'el-icon-Open',
// render: 'basicButton',
// disabled: row => {
// return row.status == 3 || row.status == 2 || row.status == 4
// },
// click: row => {
// // cancelLeave(row)
// }
// },
{
name: 'productSetting',
title: '发起告警单',
@@ -240,7 +272,9 @@ provide('tableStore', tableStore)
const addForms = ref()
const addFormModel = () => {
setTimeout(() => {
addForms.value.open()
addForms.value.open({
title: '技术监督计划'
})
}, 0)
}
const exportEvent = () => {
@@ -279,7 +313,7 @@ const handleAudit = (row: any) => {
})
}
//发起告警单
const handleAlarmForm=(row:any)=>{
const handleAlarmForm = (row: any) => {
sendAlarm({ id: row.planId }).then(res => {
ElMessage.success('发起告警单成功!')
tableStore.index()