From d61db3751272ad171e0b6250568afbe5bea8ee41 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Mon, 24 Jun 2024 14:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=20=E3=80=90=E5=B9=B2?= =?UTF-8?q?=E6=89=B0=E6=BA=90=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E3=80=91?= =?UTF-8?q?=E3=80=81=E3=80=90=E6=95=8F=E6=84=9F=E5=8F=8A=E9=87=8D=E8=A6=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E3=80=91=E9=9C=80=E8=A6=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E3=80=81=E3=80=90=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=8B=E8=BD=BD=E3=80=91=E3=80=81=E3=80=90=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=AF=BC=E5=85=A5=E3=80=91=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E5=8F=82=E8=80=83=E5=86=85=E7=BD=91pms3.0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/supervision-boot/userReport/form.ts | 21 +++ .../components/undocumented/addForm.vue | 36 +++-- .../components/interferenceUserTable.vue | 99 +++++++++--- .../components/sensitiveUserPopup.vue | 150 +++++++++++------- .../components/sensitiveUserTable.vue | 42 ++++- 5 files changed, 257 insertions(+), 91 deletions(-) diff --git a/src/api/supervision-boot/userReport/form.ts b/src/api/supervision-boot/userReport/form.ts index df7bfb21..436e9240 100644 --- a/src/api/supervision-boot/userReport/form.ts +++ b/src/api/supervision-boot/userReport/form.ts @@ -36,6 +36,16 @@ export const downloadSensitiveUserTemplate = () => { responseType: 'blob' }) } +/** + * 下载干扰源用户台账模板 + */ +export const downloadSensitiveReportTemplate = () => { + return createAxios({ + url: MAPPING_PATH + '/downloadSensitiveReportTemplate', + method: 'GET', + responseType: 'blob' + }) +} /** * 导入敏感及重要用户数据 @@ -48,6 +58,17 @@ export const importSensitiveUserData = (data: any) => { responseType: 'blob' }) } +/** + * 批量导入干扰源用户 + */ +export const importSensitiveReportData = (data: any) => { + return createAxios({ + url: MAPPING_PATH + '/importSensitiveReportData', + method: 'POST', + data: data, + responseType: 'blob' + }) +} diff --git a/src/views/pqs/supervise/interfere/components/undocumented/addForm.vue b/src/views/pqs/supervise/interfere/components/undocumented/addForm.vue index 05317769..1e959b75 100644 --- a/src/views/pqs/supervise/interfere/components/undocumented/addForm.vue +++ b/src/views/pqs/supervise/interfere/components/undocumented/addForm.vue @@ -508,7 +508,7 @@ @@ -536,6 +536,7 @@ const dialogFormVisible = ref(false) // .doc,.docx,.xlsx,.xls,.pdf const acceptType = '' const form: any = ref({}) +const control: any = ref(true) const ruleFormRef: any = ref(null) //字典获取所在地市 const areaOptionList = dictData @@ -554,7 +555,7 @@ const evaluationTypeList = dictData.getBasicData('Evaluation_Type') const evaluationDeptList = dictData.getBasicData('evaluation_dept') //用户性质数组 -const userTypeList = reactive([ +const userTypeList: any = ref([ { label: '新建电网工程', value: 0 @@ -948,7 +949,7 @@ const open = async (row: any) => { }) } else { resendId.value = '' - form.value.userType = 0 + form.value.userType = userTypeList.value[0].value } } // 处理上传文件回显 @@ -965,12 +966,17 @@ const fileRaw = (row: any, key: string) => { 'powerQualityReport' ] for (let k of list) { - if (row[key][k]) { - form.value[k] = [ - { - name: row[key][k].split('/')[2] - } - ] + if (row[key][k] != null) { + form.value[k] = + row[key][k].length == 0 + ? [] + : [ + { + name: row[key][k].split('/')[2] + } + ] + } else { + form.value[k] = [] } } @@ -987,7 +993,7 @@ const fileRaw = (row: any, key: string) => { const close = () => { //重置表单内容 //取消表单校验状态 - ruleFormRef.value && ruleFormRef.value.resetFields() + ruleFormRef?.value && ruleFormRef?.value.resetFields() dialogFormVisible.value = false emits('onSubmit') resetForm() @@ -1138,7 +1144,7 @@ const confirmForm = (flag: boolean) => { } confirmFormData.saveOrCheckflag = '1' if (title.value != '用户档案录入') confirmFormData.id = resendId.value - + if (!control.value) confirmFormData.dataType = 1 submitFormData(confirmFormData).then(res => { ElMessage({ message: '保存成功!', @@ -1341,7 +1347,13 @@ const confirmForm = (flag: boolean) => { }) } } -defineExpose({ open }) + +// 过滤用户 +const filterUsers = (arr: any) => { + control.value = false + userTypeList.value = userTypeList.value.filter(item => !arr.includes(item.value)) +} +defineExpose({ open, filterUsers })