我的任务,干扰源分析,常态化干扰源用户管理,终端检测,bug调整
This commit is contained in:
@@ -36,8 +36,8 @@
|
||||
//引入相关样式
|
||||
import '@vue-office/excel/lib/index.css'
|
||||
//引入VueOfficeDocx组件
|
||||
import VueOfficeDocx from '@vue-office/docx'
|
||||
import VueOfficeExcel from '@vue-office/excel'
|
||||
import VueOfficeDocx from '@vue-office/docx'
|
||||
import VueOfficeExcel from '@vue-office/excel'
|
||||
//引入VueOfficePdf组件
|
||||
import VueOfficePdf from '@vue-office/pdf'
|
||||
import { ref, reactive } from 'vue'
|
||||
|
||||
@@ -181,6 +181,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { submitGoNet } from '@/api/supervision-boot/interfere/index'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
import { lo } from 'element-plus/es/locale'
|
||||
|
||||
const props = defineProps({
|
||||
openType: {
|
||||
@@ -340,6 +341,8 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
goToNetReport.value = ''
|
||||
form.value.goToNetReport = uploadFiles
|
||||
}
|
||||
|
||||
// 治理工程验收报告数组
|
||||
@@ -373,6 +376,7 @@ const confirmForm = (flag: boolean) => {
|
||||
})
|
||||
} else {
|
||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||
loading.value = false
|
||||
return ElMessage({
|
||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||
type: 'warning'
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="uploadFile" for="-" label="可研报告:" prop="feasibilityReport">
|
||||
<el-upload v-model:file-list="form.feasibilityReport" ref="uploadRef" action="" :accept="acceptType"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('feasibilityReport')"
|
||||
:on-progress="uploadFileName('feasibilityReport')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -210,7 +210,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="uploadFile" for="-" label="项目初步设计说明书:" prop="preliminaryDesignDescription">
|
||||
<el-upload v-model:file-list="form.preliminaryDesignDescription" ref="uploadRef" action=""
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('preliminaryDesignDescription')"
|
||||
:on-progress="uploadFileName('preliminaryDesignDescription')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -219,7 +219,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="uploadFile" for="-" label="预测评估报告:" prop="predictionEvaluationReport">
|
||||
<el-upload v-model:file-list="form.predictionEvaluationReport" ref="uploadRef" action=""
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('predictionEvaluationReport')"
|
||||
:on-progress="uploadFileName('predictionEvaluationReport')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -228,7 +228,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="uploadFile" for="-" label="预测评估评审意见报告:" prop="predictionEvaluationReviewOpinions">
|
||||
<el-upload v-model:file-list="form.predictionEvaluationReviewOpinions" ref="uploadRef" action=""
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('predictionEvaluationReviewOpinions')"
|
||||
:on-progress="uploadFileName('predictionEvaluationReviewOpinions')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -237,7 +237,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="uploadFile" for="-" label="其他附件:" prop="additionalAttachments">
|
||||
<el-upload v-model:file-list="form.additionalAttachments" ref="uploadRef" action="" :accept="acceptType"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('additionalAttachments')"
|
||||
:on-progress="uploadFileName('additionalAttachments')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -247,7 +247,7 @@
|
||||
<el-form-item for="-" class="uploadFile" v-if="form.userType != '0' && form.userType != '1'"
|
||||
label="用户接入变电站主接线示意图:" prop="substationMainWiringDiagram">
|
||||
<el-upload v-model:file-list="form.substationMainWiringDiagram" ref="uploadRef" action=""
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('substationMainWiringDiagram')"
|
||||
:on-progress="uploadFileName('substationMainWiringDiagram')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -257,7 +257,7 @@
|
||||
<el-form-item class="uploadFile" for="-" label="主要敏感终端清单:" v-if="form.userType == '6'"
|
||||
prop="sensitiveDevices">
|
||||
<el-upload v-model:file-list="form.sensitiveDevices" ref="uploadRef" action="" :accept="acceptType"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('sensitiveDevices')"
|
||||
:on-progress="uploadFileName('sensitiveDevices')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -267,7 +267,7 @@
|
||||
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="抗扰度测试报告:"
|
||||
prop="antiInterferenceReport">
|
||||
<el-upload v-model:file-list="form.antiInterferenceReport" ref="uploadRef" action=""
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('antiInterferenceReport')"
|
||||
:on-progress="uploadFileName('antiInterferenceReport')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -277,7 +277,7 @@
|
||||
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="背景电能质量测试报告:"
|
||||
prop="powerQualityReport">
|
||||
<el-upload v-model:file-list="form.powerQualityReport" ref="uploadRef" action="" :accept="acceptType"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('powerQualityReport')"
|
||||
:on-progress="uploadFileName('powerQualityReport')">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
@@ -300,7 +300,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
// import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import type { UploadFile, UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||
@@ -499,6 +499,8 @@ const resetForm = () => {
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
//获取树形图数据
|
||||
const getTreeList = () => {
|
||||
queryByAllCode().then(res => {
|
||||
@@ -520,23 +522,58 @@ const getTreeList = () => {
|
||||
// })
|
||||
// })
|
||||
let data = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||
data.map((item: any) => {
|
||||
//tree禁用根节点
|
||||
item.disabled = 'disabled'
|
||||
item.children.map((vv: any) => {
|
||||
//tree禁用二级节点
|
||||
vv.disabled = 'disabled'
|
||||
vv.children.map((kk: any) => {
|
||||
//tree禁用三级节点
|
||||
kk.disabled = 'disabled'
|
||||
kk.children.map((ss: any) => {
|
||||
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||
nonlinearDeviceTypeList.value[0].children.push(ss)
|
||||
// nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||
|
||||
// data.map((item: any) => {
|
||||
// //tree禁用根节点
|
||||
// item.disabled = 'disabled'
|
||||
// item.children.map((vv: any) => {
|
||||
// //tree禁用二级节点
|
||||
// vv.disabled = 'disabled'
|
||||
// vv.children.map((kk: any) => {
|
||||
// //tree禁用三级节点
|
||||
// kk.disabled = 'disabled'
|
||||
// kk.children.map((ss: any) => {
|
||||
// ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||
// nonlinearDeviceTypeList.value[0].children.push(ss)
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
if (VITE_FLAG) {
|
||||
// VITE_FLAG为true时,保持原有逻辑(包含根节点)
|
||||
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||
data.map((item: any) => {
|
||||
//tree禁用根节点
|
||||
item.disabled = 'disabled'
|
||||
item.children.map((vv: any) => {
|
||||
//tree禁用二级节点
|
||||
vv.disabled = 'disabled'
|
||||
vv.children.map((kk: any) => {
|
||||
//tree禁用三级节点
|
||||
kk.disabled = 'disabled'
|
||||
kk.children.map((ss: any) => {
|
||||
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||
nonlinearDeviceTypeList.value[0].children.push(ss)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// VITE_FLAG为false时,去除第一层(根节点),只保留子节点
|
||||
nonlinearDeviceTypeList.value = []
|
||||
data.map((item: any) => {
|
||||
item.children.map((vv: any) => {
|
||||
vv.children.map((kk: any) => {
|
||||
kk.children.map((ss: any) => {
|
||||
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||
nonlinearDeviceTypeList.value.push(ss)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -811,6 +848,29 @@ const open = async (row: any) => {
|
||||
} else {
|
||||
resendId.value = ''
|
||||
form.value.userType = userTypeList.value[0].value
|
||||
|
||||
|
||||
// 清空所有文件引用
|
||||
feasibilityReport.value = ''
|
||||
preliminaryDesignDescription.value = ''
|
||||
predictionEvaluationReport.value = ''
|
||||
predictionEvaluationReviewOpinions.value = ''
|
||||
additionalAttachments.value = ''
|
||||
substationMainWiringDiagram.value = ''
|
||||
sensitiveDevices.value = ''
|
||||
antiInterferenceReport.value = ''
|
||||
powerQualityReport.value = ''
|
||||
|
||||
// 清空表单中的文件列表
|
||||
form.value.feasibilityReport = []
|
||||
form.value.preliminaryDesignDescription = []
|
||||
form.value.predictionEvaluationReport = []
|
||||
form.value.predictionEvaluationReviewOpinions = []
|
||||
form.value.additionalAttachments = []
|
||||
form.value.substationMainWiringDiagram = []
|
||||
form.value.sensitiveDevices = []
|
||||
form.value.antiInterferenceReport = []
|
||||
form.value.powerQualityReport = []
|
||||
}
|
||||
setTimeout(() => {
|
||||
getByDeptDevLine({ id: deptIds }).then(res => {
|
||||
@@ -899,9 +959,45 @@ let uploadName = ref('')
|
||||
const uploadFileName = (val: any) => {
|
||||
uploadName.value = val
|
||||
}
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
|
||||
|
||||
// 移除文件上传
|
||||
const removeFile = (val: any) => {
|
||||
return (file: UploadFile, fileList: UploadFile[]) => {
|
||||
// 根据上传字段名称清除对应的文件引用
|
||||
switch(val) {
|
||||
case 'feasibilityReport':
|
||||
feasibilityReport.value = ''
|
||||
break
|
||||
case 'preliminaryDesignDescription':
|
||||
preliminaryDesignDescription.value = ''
|
||||
break
|
||||
case 'predictionEvaluationReport':
|
||||
predictionEvaluationReport.value = ''
|
||||
break
|
||||
case 'predictionEvaluationReviewOpinions':
|
||||
predictionEvaluationReviewOpinions.value = ''
|
||||
break
|
||||
case 'additionalAttachments':
|
||||
additionalAttachments.value = ''
|
||||
break
|
||||
case 'substationMainWiringDiagram':
|
||||
substationMainWiringDiagram.value = ''
|
||||
break
|
||||
case 'sensitiveDevices':
|
||||
sensitiveDevices.value = ''
|
||||
break
|
||||
case 'antiInterferenceReport':
|
||||
antiInterferenceReport.value = ''
|
||||
break
|
||||
case 'powerQualityReport':
|
||||
powerQualityReport.value = ''
|
||||
break
|
||||
}
|
||||
|
||||
// 同步更新表单中的文件列表
|
||||
form.value[val] = fileList
|
||||
}
|
||||
}
|
||||
// 可研报告数组
|
||||
const feasibilityReport = ref('')
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<el-form-item for="-" label="监测终端安装位置:" prop="monitoringDeviceInstallationPosition" class="label_over_warp">
|
||||
<!-- 电网侧、用户侧 -->
|
||||
<el-select v-model="form.monitoringDeviceInstallationPosition" clearable style="width: 100%"
|
||||
placeholder="请选择监测终端安装位置">
|
||||
placeholder="请选择监测终端安装位置" disabled>
|
||||
<el-option v-for="item in monitoringDeviceInstallationPositionList" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -240,9 +240,9 @@
|
||||
<el-radio :value="0">关闭</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="电镀功能:" prop="electroplatingFunction">
|
||||
<el-form-item for="-" label="电度功能:" prop="electroplatingFunction">
|
||||
<!-- 默认 关闭 下拉框 -->
|
||||
<el-select v-model="form.electroplatingFunction" clearable style="width: 100%" placeholder="请选择电镀功能">
|
||||
<el-select v-model="form.electroplatingFunction" clearable style="width: 100%" placeholder="请选择电度功能">
|
||||
<el-option v-for="item in electroplatingFunctionList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -509,10 +509,15 @@ const changeSubstationFlag = () => {
|
||||
form.value.substationName = substationList.value.find((item: any) => {
|
||||
return form.value.substation == item.id
|
||||
})?.name
|
||||
|
||||
// 系统电站选"是"时,安装位置设为"电网侧"
|
||||
form.value.monitoringDeviceInstallationPosition = '0'
|
||||
} else {
|
||||
form.value.substation = ''
|
||||
form.value.substationName = ''
|
||||
form.value.substationVoltageLevel = voltageLevelList[0].id
|
||||
// 系统电站选"否"时,安装位置设为"用户侧"
|
||||
form.value.monitoringDeviceInstallationPosition = '1'
|
||||
}
|
||||
}
|
||||
watch(
|
||||
@@ -1345,9 +1350,14 @@ const confirmForm = async (flag: boolean) => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
// 编码改动
|
||||
const encode = (e: string) => {
|
||||
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
||||
if(VITE_FLAG){
|
||||
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
||||
}
|
||||
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
@@ -347,6 +347,7 @@ const cancelLeave = async (row: any) => {
|
||||
const needGovernance = ref()
|
||||
/** 方案审查 */
|
||||
const toFangAn = (row: any, typeNo: number) => {
|
||||
|
||||
//查询详情拿到needGovernance
|
||||
/** 获得数据 */
|
||||
getUserReportById(row.id).then(res => {
|
||||
|
||||
@@ -837,6 +837,7 @@ watch(
|
||||
const resendId = ref('')
|
||||
const status = ref('')
|
||||
const open = async (row: any) => {
|
||||
|
||||
title.value = row.title
|
||||
dialogFormVisible.value = true
|
||||
let deptIds = adminInfo.$state.deptId
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{{ processInstance?.startUser.deptName }}
|
||||
</el-form-item>
|
||||
|
||||
<el-card v-if="runningTasks[index].formId != null" style="width: 100%; margin-right: 40%">
|
||||
<el-card v-if="runningTasks[index].formId != null" style="width: 100%; margin-right: 40%">
|
||||
<template #header>
|
||||
<span class="el-icon-picture-outline">
|
||||
{{ runningTasks[index]?.formName }}
|
||||
@@ -226,7 +226,7 @@ const handleAudit = async (task, pass) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 1.3 验证 approveForms 中的 radio 字段是否都有值
|
||||
// 1.3 验证 approveForms 中的 radio 字段是否都有值
|
||||
const currentApproveForm = approveForms.value[index];
|
||||
if (currentApproveForm && currentApproveForm.rule && Array.isArray(currentApproveForm.rule)) {
|
||||
const emptyRadioFields = currentApproveForm.rule.filter(rule =>
|
||||
@@ -238,7 +238,7 @@ const handleAudit = async (task, pass) => {
|
||||
);
|
||||
|
||||
if (emptyRadioFields.length > 0) {
|
||||
ElMessage.error('请确认试运行分析报告审核要点都已勾选!');
|
||||
ElMessage.error('请确认'+ stepList.value[index].formName +'都已勾选!');
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user