diff --git a/src/api/supervision-boot/plan/index.ts b/src/api/supervision-boot/plan/index.ts new file mode 100644 index 00000000..dc40330e --- /dev/null +++ b/src/api/supervision-boot/plan/index.ts @@ -0,0 +1,31 @@ +import createAxios from '@/utils/request' + +import { SUPERVISION_BOOT } from '@/utils/constantRequest' + +const MAPPING_PATH = SUPERVISION_BOOT + '/deVReport' + +/** + * 提交终端信息表单数据 + */ +export const addPlanFormData = (data: any) => { + return createAxios({ + url: '/supervision-boot/superPlan/addPlan', + method: 'POST', + data: data + }) +} + + +/** + * 根据id获取终端录入的详细数据 + */ +export const getPlanDetailsById = (obj: any) => { + let form = new FormData() + form.append('id', obj.id) + return createAxios({ + url:MAPPING_PATH + '/queryDeviceDetail', + method: 'POST', + data:form + }) +} + diff --git a/src/views/pqs/supervise/plan/components/addForm.vue b/src/views/pqs/supervise/plan/components/addForm.vue index 1b1f1920..b4277348 100644 --- a/src/views/pqs/supervise/plan/components/addForm.vue +++ b/src/views/pqs/supervise/plan/components/addForm.vue @@ -21,14 +21,14 @@ > - - + + - - + + - - + + - - + + - - + + - + @@ -88,13 +88,12 @@ - + - - + + - + - + - - + + - + @@ -175,9 +166,9 @@ - + @@ -185,9 +176,13 @@ - + - + * * - + * - + - + * @@ -363,8 +358,7 @@ - - + * @@ -408,7 +402,7 @@ - + * @@ -470,7 +464,7 @@ 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 { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index' +import { addPlanFormData } from '@/api/supervision-boot/plan/index' import { getAreaList } from '@/api/common' const emits = defineEmits(['onSubmit']) const dictData = useDictData() @@ -487,37 +481,48 @@ const manufacturerList = dictData.getBasicData('Dev_Manufacturers') const frontEndMachineList = dictData.getBasicData('Front_Type') //字典获取电压等级 const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand') +// +const objTypeList = [ + { + id: '1', + name: '在运站' + }, + { + id: '2', + name: '新(改、扩)建站' + } +] const resetForm = () => { form.value = { - planName: '', //计划名称 - planUnit:'', //监督单位 - planDept: '', //计划编制单位 - planType: '', //监督类型 - planStep: areaOptionList[0].id, //监督阶段 - planSuperviseTime: '', //计划监督时间 - superviseObjType: areaOptionList[0].id, //监督对象类型 - superviseObjName: '', //监督对象名称 - superviseObjVoltageLevel: voltageLevelList[0].id, // 监督对象电压等级 - superviseObjAttribute: '', //监督对象属性 - superviseObjAttributeName: '', //监督对象属性名称 - superviseObjCapacity: '', //监督对象协议容量 - superviseObjStation: '', //监督对象关联电站 - superviseObjStationVoltageLevel: voltageLevelList[0].id, // 监督对象关联电站电压等级 - implementStatus: '0', //实施状态 - implementBeginTime: '', //开始实施时间 - implementEndTime: '', //结束实施时间 - reportTime: '', //报告出具时间 - problemTime: '', //电能质量问题发生时间 - implementUser: '', //实施人员 + workPlanName: '', //计划名称 + supvOrgId: '', //监督单位 + planOrgId: '', //计划编制单位 + supvType: '', //监督类型 + supvStage: areaOptionList[0].id, //监督阶段 + planSupvDate: '', //计划监督时间 + supvObjType: areaOptionList[0].id, //监督对象类型 + supvObjName: '', //监督对象名称 + objVoltageLevel: voltageLevelList[0].id, // 监督对象电压等级 + objType: '', //监督对象属性 + objTypeName: '', //监督对象属性名称 + objCapacity: '', //监督对象协议容量 + substationName: '', //监督对象关联电站 + substationVoltageLevel: voltageLevelList[0].id, // 监督对象关联电站电压等级 + effectStatus: '0', //实施状态 + effectStartTime: '', //开始实施时间 + effectEndTime: '', //结束实施时间 + reportIssueTime: '', //报告出具时间 + problemOcTime: '', //电能质量问题发生时间 + effectUserId: '', //实施人员 planStatus: '', //计划状态 - other: '', //其他要求 - - sealReport: '', //盖章报告 - evidenceMaterials:'', //佐证材料 - planChangeMaterials: '', //计划变更材料 - alarmMaterials:'', //告预警单材料 - alarmFeedbackMaterials: '', //告预警单反馈材料 - assessReport:'' //评估报告 + otherRemark: '', //其他要求 + planUserId: '' //计划编制人,挡墙登陆用户 + // sealReport: '', //盖章报告 + // evidenceMaterials:'', //佐证材料 + // planChangeMaterials: '', //计划变更材料 + // alarmMaterials:'', //告预警单材料 + // alarmFeedbackMaterials: '', //告预警单反馈材料 + // assessReport:'' //评估报告 } } //初始化数据 @@ -526,57 +531,105 @@ resetForm() //定义校验规则 const rules = ref({ //基础信息 - planName: [ + workPlanName: [ { required: true, message: '请输入计划名称', trigger: 'blur' } ], - planUnit: [ + supvOrgId: [ { required: true, message: '请选择监督单位', trigger: 'change' } ], - planDept: [ + planOrgId: [ { required: true, message: '请选择计划编制单位', trigger: 'change' } ], - planType: [ + supvType: [ { required: true, message: '请选择监督类型', trigger: 'change' } ], - planStep: [ + supvStage: [ { required: true, message: '请选择监督阶段', trigger: 'change' } ], - planSuperviseTime: [ + planSupvDate: [ { required: true, message: '请选择计划监督时间', trigger: 'change' } ], - - superviseObjVoltageLevel: [ + supvObjType: [ + { + required: true, + message: '请选择监督对象类型', + trigger: 'change' + } + ], + supvObjName: [ + { + required: true, + message: '请输入监督对象名称', + trigger: 'blur' + } + ], + objVoltageLevel: [ { required: true, message: '请选择监督对象电压等级', trigger: 'change' } ], - implementStatus: [ + objType: [ + { + required: true, + message: '请选择监督对象属性', + trigger: 'change' + } + ], + objTypeName: [ + { + required: false, + message: '请输入监督对象属性名称', + trigger: 'blur' + } + ], + objCapacity: [ + { + required: true, + message: '请输入监督对象监督对象协议容量', + trigger: 'blur' + } + ], + substationName: [ + { + required: true, + message: '请输入监督对象关联电站', + trigger: 'blur' + } + ], + substationVoltageLevel: [ + { + required: true, + message: '请选择监督对象关联电站电压等级', + trigger: 'change' + } + ], + effectStatus: [ { required: true, message: '请选择实施状态', @@ -665,61 +718,64 @@ const choose = (e: any) => { const disabledDate = time => { return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天 } +//获取登陆用户姓名和部门 +const adminInfo = useAdminInfo() //提交 const confirmForm = () => { // 提交终端信息 ruleFormRef.value.validate(valid => { if (valid) { + form.value.planUserId = adminInfo.$state.id let confirmFormData = JSON.parse(JSON.stringify(form.value)) //1.判断是否上传 - if (!sealReport.value) { - return ElMessage({ - message: '请上传盖章报告', - type: 'warning' - }) - } - if (!evidenceMaterials.value) { - return ElMessage({ - message: '请上传佐证材料', - type: 'warning' - }) - } - if (!planChangeMaterials.value) { - return ElMessage({ - message: '请上传计划变更材料', - type: 'warning' - }) - } - if (!alarmMaterials.value) { - return ElMessage({ - message: '请上传告预警单材料', - type: 'warning' - }) - } - if (!alarmFeedbackMaterials.value) { - return ElMessage({ - message: '请上传告预警单反馈材料', - type: 'warning' - }) - } - if (!assessReport.value) { - return ElMessage({ - message: '请上传评估报告', - type: 'warning' - }) - } + // if (!sealReport.value) { + // return ElMessage({ + // message: '请上传盖章报告', + // type: 'warning' + // }) + // } + // if (!evidenceMaterials.value) { + // return ElMessage({ + // message: '请上传佐证材料', + // type: 'warning' + // }) + // } + // if (!planChangeMaterials.value) { + // return ElMessage({ + // message: '请上传计划变更材料', + // type: 'warning' + // }) + // } + // if (!alarmMaterials.value) { + // return ElMessage({ + // message: '请上传告预警单材料', + // type: 'warning' + // }) + // } + // if (!alarmFeedbackMaterials.value) { + // return ElMessage({ + // message: '请上传告预警单反馈材料', + // type: 'warning' + // }) + // } + // if (!assessReport.value) { + // return ElMessage({ + // message: '请上传评估报告', + // type: 'warning' + // }) + // } //提交终端信息 - confirmFormData = { - ...confirmFormData, - sealReport: sealReport?.value, //盖章报告 - evidenceMaterials: evidenceMaterials.value, //佐证材料 - planChangeMaterials: planChangeMaterials.value, //计划变更材料 - alarmMaterials: alarmMaterials.value, //告预警单材料 - alarmFeedbackMaterials: alarmFeedbackMaterials.value, //告预警单反馈材料 - assessReport: assessReport.value //评估报告 - } - addTerminalFormData(confirmFormData).then(res => { + // confirmFormData = { + // ...confirmFormData, + // sealReport: sealReport?.value, //盖章报告 + // evidenceMaterials: evidenceMaterials.value, //佐证材料 + // planChangeMaterials: planChangeMaterials.value, //计划变更材料 + // alarmMaterials: alarmMaterials.value, //告预警单材料 + // alarmFeedbackMaterials: alarmFeedbackMaterials.value, //告预警单反馈材料 + // assessReport: assessReport.value //评估报告 + // } + addPlanFormData(confirmFormData).then(res => { ruleFormRef.value.resetFields() resetForm() close() diff --git a/src/views/pqs/supervise/plan/components/index.vue b/src/views/pqs/supervise/plan/components/index.vue index 4512193f..5319330e 100644 --- a/src/views/pqs/supervise/plan/components/index.vue +++ b/src/views/pqs/supervise/plan/components/index.vue @@ -45,76 +45,38 @@ const ruleFormRef = ref() const show: any = ref(false) const fileList = ref([]) const tableStore = new TableStore({ - url: '/supervision-boot/deVReport/list', + url: '/supervision-boot/superPlan/pagePlan', publicHeight: 65, method: 'POST', column: [ { title: '序号', type: 'seq', width: 80 }, - { field: 'orgName', title: '所属省份' , minWidth: 170 }, - { field: 'orgName', title: '所属地市' , minWidth: 170 }, - { field: 'orgName', title: '所属县区' , minWidth: 170 }, - { field: 'orgName', title: '监督单位' , minWidth: 170 }, - { field: 'orgName', title: '计划名称' , minWidth: 170 }, - { field: 'reportDate', title: '计划监督时间', minWidth: 170}, - { field: 'orgName', title: '监督类型' , minWidth: 170 }, - { field: 'orgName', title: '监督阶段' , minWidth: 170 }, - { field: 'orgName', title: '监督对象类型' , minWidth: 170 }, - { field: 'reporter', title: '填报人', minWidth: 80 }, - { - field: 'status', - title: '审核状态', - minWidth: 100, - render: 'tag', - custom: { - 1: 'primary', - 2: 'success', - 3: 'danger', - 4: 'warning' - }, - replaceValue: { - 1: '审批中', - 2: '审批通过', - 3: '审批不通过', - 4: '已取消' - } - }, - { field: 'monitoringTerminalName', title: '设备名称', minWidth: 170 }, - { field: 'substation', title: '所属变电站', minWidth: 170 }, + { field: 'province', title: '所属省份' , minWidth: 170 }, + { field: 'city', title: '所属地市' , minWidth: 170 }, + { field: 'county', title: '所属县区' , minWidth: 170 }, + { field: 'supvOrgId', title: '监督单位' , minWidth: 170 }, + { field: 'workPlanName', title: '计划名称' , minWidth: 170 }, + { field: 'planSupvDate', title: '计划监督时间', minWidth: 170}, + { field: 'supvType', title: '监督类型' , minWidth: 170 }, + { field: 'supvStage', title: '监督阶段' , minWidth: 170 }, + { field: 'supvObjType', title: '监督对象类型' , minWidth: 170 }, // { - // field: 'userType', - // title: '用户性质', - // minWidth: 150, - // formatter: (obj: any) => { - // const userType = obj.row.userType - // return getUserTypeName(userType) - // } - // }, - - // { field: 'informationSecurityTestReport', title: '信息安全检测报告', minWidth: 170 }, - // { field: 'otherAttachments', title: '其他附件', minWidth: 170 }, - // { field: 'orgName', title: '填报部门名称'}, - // { field: 'performanceTestReport', title: '性能检测报告', minWidth: 170 }, - - // { - // field: 'userStatus', - // title: '用户状态', + // field: 'status', + // title: '审核状态', // minWidth: 100, // render: 'tag', // custom: { - // 0: 'primary', // 1: 'primary', // 2: 'success', - // 3: 'warning' + // 3: 'danger', + // 4: 'warning' // }, // replaceValue: { - // 0: '可研', - // 1: '建设', - // 2: '运行', - // 3: '退运' + // 1: '审批中', + // 2: '审批通过', + // 3: '审批不通过', + // 4: '已取消' // } // }, - // { field: 'substation', title: '变电站', minWidth: 100 }, - // { field: 'createTime', title: '开始时间', minWidth: 170 }, { title: '操作', minWidth: 150,