技术监督计划-实施问题详情

This commit is contained in:
zhujiyan
2024-05-22 11:00:42 +08:00
parent dd665ee6fe
commit c1919024f4
4 changed files with 96 additions and 25 deletions

View File

@@ -198,7 +198,6 @@ const effectUserIdList= ref([])
const getEffectUserList = () => {
getUserByDeptId({ deptId: adminInfo.$state.deptId }).then(res => {
effectUserIdList.value = res.data
console.log(effectUserIdList.value, '+++++++')
})
}
getEffectUserList()

View File

@@ -1,7 +1,7 @@
<template>
<el-dialog
v-model="dialogFormVisible"
title="技术监督实施问题新增"
:title="title"
width="60%"
:append-to-body="true"
:before-close="close"
@@ -18,6 +18,7 @@
ref="ruleFormRef"
label-width="140px"
label-position="right"
:disabled="openType!='add'"
>
<el-row>
<el-col :span="12">
@@ -28,7 +29,12 @@
<el-col :span="12">
<el-form-item label="监测点类型:" prop="monitorType">
<el-select v-model="form.monitorType" clearable style="width: 100%" placeholder="请选择监测点类型">
<el-select
v-model="form.monitorType"
clearable
style="width: 100%"
placeholder="请选择监测点类型"
>
<el-option
v-for="item in monitorTypeList"
:key="item.id"
@@ -156,7 +162,11 @@
<el-col :span="12">
<el-form-item label="问题简要描述:" prop="simpleProblemDesc">
<el-input v-model="form.simpleProblemDesc" autocomplete="off" placeholder="请输入问题简要描述" />
<el-input
v-model="form.simpleProblemDesc"
autocomplete="off"
placeholder="请输入问题简要描述"
/>
</el-form-item>
</el-col>
</el-row>
@@ -189,7 +199,11 @@
<el-col :span="12">
<el-form-item label="整改方案:" prop="rectificationProgramme">
<el-input v-model="form.rectificationProgramme" autocomplete="off" placeholder="请输入整改方案" />
<el-input
v-model="form.rectificationProgramme"
autocomplete="off"
placeholder="请输入整改方案"
/>
</el-form-item>
</el-col>
</el-row>
@@ -224,19 +238,20 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
import { queryByAllCode } from '@/api/system-boot/dictTree'
import { useAdminInfo } from '@/stores/adminInfo'
import { uploadFile } from '@/api/system-boot/file'
import { addPlanFormData, getUserByDeptId,addPlanProblemFormData} from '@/api/supervision-boot/plan/index'
import { addPlanFormData, getUserByDeptId, addPlanProblemFormData } from '@/api/supervision-boot/plan/index'
import { getAreaList } from '@/api/common'
import Area from '@/components/form/area/index.vue'
const emits = defineEmits(['onSubmit'])
const props=defineProps({
planId:{
type:String,
default:''
const props = defineProps({
planId: {
type: String,
default: ''
}
})
const dictData = useDictData()
const dialogFormVisible = ref(false)
const form: any = ref({})
const title: any = ref('')
const ruleFormRef = ref(null)
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
@@ -419,7 +434,27 @@ watch(
immediate: true
}
)
const open = () => {
const openType:any=ref('')
const open = (row: any, val: any) => {
//详情(后面做编辑,再修改判断条件)
if (val == 'detail') {
for (let key in row) {
if (form.value.hasOwnProperty(key)) {
form.value[key] = row[key] // 对相同的key进行赋值
}
}
title.value = '技术计划监督实施问题详情'
openType.value='detail'
}
//新增
else if ( val == 'add') {
title.value = '技术计划监督实施问题新增'
openType.value='add'
nextTick(() => {
ruleFormRef.value.resetFields()
resetForm()
})
}
dialogFormVisible.value = true
}
const close = () => {
@@ -443,8 +478,7 @@ const confirmForm = () => {
// 提交终端信息
ruleFormRef.value.validate(valid => {
if (valid) {
form.value.planId = props.planId;
console.log(form.value,"=========form.value");
form.value.planId = props.planId
let confirmFormData = JSON.parse(JSON.stringify(form.value))
addPlanProblemFormData(confirmFormData).then(res => {
ruleFormRef.value.resetFields()

View File

@@ -59,7 +59,12 @@ const planId: any = ref('')
const dictData = useDictData()
const dialogFormVisible = ref(false)
const tableRefs = ref()
//字典获取问题类型
const problemTypeList = dictData.getBasicData('problem_type')
//字典整改情况
const rectificationStatusList = dictData.getBasicData('rectification_type')
//字典问题等级
const problemLevelList = dictData.getBasicData('problem_level_type')
const effectTableStore = new TableStore({
url: '/supervision-boot/superProblem/pageProblem',
publicHeight: 65,
@@ -79,7 +84,7 @@ const effectTableStore = new TableStore({
title: '问题等级',
minWidth: 170,
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
@@ -90,14 +95,33 @@ const effectTableStore = new TableStore({
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'problemType', title: '问题类型', minWidth: 170 },
{
field: 'problemType',
title: '问题类型',
minWidth: 170 ,
formatter: (row: any) => {
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
{ field: 'rectificationStatus', title: '整改情况', minWidth: 170 },
{ field: 'rectificationTime', title: '整改时间', minWidth: 170 },
{
field: 'rectificationStatus',
title: '整改情况',
minWidth: 170 ,
formatter: (row: any) => {
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
}
},
{
field: 'rectificationTime',
title: '整改时间',
minWidth: 170 ,
formatter: (row: any) => {
return row.cellValue.replace('T',' ')
}
},
{ field: 'remark', title: '备注', minWidth: 170 },
{ field: 'searchBeginTime', title: '开始时间', minWidth: 170 },
{ field: 'searchEndTime', title: '结束时间', minWidth: 170 },
{
title: '操作',
minWidth: 150,
@@ -120,6 +144,9 @@ const effectTableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled:row=>{
return true
},
click: row => {
handleEdit(row)
}
@@ -157,11 +184,11 @@ const close = () => {
//新增
const addFormRef=ref()
const addFormModel=()=>{
addFormRef.value.open()
addFormRef.value.open({},'add')
}
//详情
const handleDetail = (row: any) => {
console.log(row)
addFormRef.value.open(row,'detail')
}
//修改
const handleEdit = (row: any) => {

View File

@@ -91,9 +91,20 @@ const tableStore = new TableStore({
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'supvOrgId', title: '监督单位', minWidth: 170 },
{
field: 'supvOrgName',
title: '监督单位',
minWidth: 170
},
{ field: 'workPlanName', title: '计划名称', minWidth: 170 },
{ field: 'planSupvDate', title: '计划监督时间', minWidth: 170 },
{
field: 'planSupvDate',
title: '计划监督时间',
minWidth: 170,
formatter: (row: any) => {
return row.cellValue.replace('T', ' ')
}
},
{
field: 'status',
title: '审核状态',