【台账管理】新增敏感用户中添加负荷级别和供电电源情况
This commit is contained in:
@@ -298,10 +298,50 @@
|
||||
</el-form-item>
|
||||
<el-form-item for="-" v-if="form.userType == '6'" label="是否开展抗扰度测试:" prop="antiInterferenceTest">
|
||||
<el-radio-group v-model="form.antiInterferenceTest">
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
<el-radio value="1">是</el-radio>
|
||||
<el-radio value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="form.userType == '6' && isInterferencemanagement"
|
||||
label="负荷级别:"
|
||||
prop="loadLevel"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.loadLevel"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
placeholder="请选择负荷级别"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in loadLevelOptionList"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="form.userType == '6' && isInterferencemanagement"
|
||||
label="供电电源情况:"
|
||||
prop="powerSupplyInfo"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.powerSupplyInfo"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
placeholder="请选择供电电源情况"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in powerSupplyInfoOptionList"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="form.userType != '0' && form.userType != '1'"
|
||||
@@ -531,6 +571,15 @@ import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { submitFormData, getById, updateFormData, addEditor, resend } from '@/api/supervision-boot/interfere/index'
|
||||
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const isInterferencemanagement: any = ref(false)
|
||||
if (route.path.includes('interferencemanagement')) {
|
||||
isInterferencemanagement.value = false
|
||||
} else {
|
||||
isInterferencemanagement.value = true
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
openType: {
|
||||
type: String,
|
||||
@@ -570,7 +619,10 @@ const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
//字典预测评估单位
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
|
||||
//负荷级别
|
||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
//供电电源情况
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
//用户性质数组
|
||||
const userTypeList: any = ref([
|
||||
{
|
||||
@@ -675,12 +727,19 @@ const resetForm = () => {
|
||||
deviceName: '', //敏感终端名称 1
|
||||
powerSupplyCount: 0, //供电电源数量 1
|
||||
energyQualityIndex: [energyQualityIndexList[0]?.id], //敏感电能质量指标 1
|
||||
antiInterferenceTest: 0, //是否开展抗扰度测试 1
|
||||
antiInterferenceTest: '0', //是否开展抗扰度测试 1
|
||||
sensitiveDevices: [], //主要敏感终端清单 1
|
||||
antiInterferenceReport: [] //抗扰度测试报告 1
|
||||
}
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
if (isInterferencemanagement.value) {
|
||||
form.value.loadLevel = loadLevelOptionList[0]?.id //负荷级别
|
||||
form.value.powerSupplyInfo = powerSupplyInfoOptionList[0]?.id //供电电源情况
|
||||
} else {
|
||||
delete form.value.loadLevel
|
||||
delete form.value.powerSupplyInfo
|
||||
}
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
@@ -757,7 +816,7 @@ const subForm: any = ref({
|
||||
userReportSensitivePO: {
|
||||
additionalAttachments: [], //其他附件告地址
|
||||
antiInterferenceReport: [], //抗扰度测试报告
|
||||
antiInterferenceTest: '',
|
||||
antiInterferenceTest: '0',
|
||||
backgroundTestPerformed: 0,
|
||||
deviceName: '',
|
||||
energyQualityIndex: [],
|
||||
@@ -820,7 +879,9 @@ const rules = ref({
|
||||
preliminaryDesignDescription: [{ required: false, message: '请上传项目初步设计说明书', trigger: 'blur' }],
|
||||
predictionEvaluationReport: [{ required: true, message: '请上传预测评估报告', trigger: 'blur' }],
|
||||
predictionEvaluationReviewOpinions: [{ required: true, message: '请上传预测评估评审意见报告', trigger: 'blur' }],
|
||||
additionalAttachments: [{ required: false, message: '请上传其他附件', trigger: 'blur' }]
|
||||
additionalAttachments: [{ required: false, message: '请上传其他附件', trigger: 'blur' }],
|
||||
loadLevel: [{ required: true, message: '请选择负荷级别', trigger: 'change' }],
|
||||
powerSupplyInfo: [{ required: true, message: '请选择供电电源情况', trigger: 'change' }],
|
||||
})
|
||||
watch(
|
||||
() => form.value,
|
||||
@@ -894,7 +955,7 @@ watch(
|
||||
subForm.value.userReportSensitivePO = {
|
||||
additionalAttachments: [], //其他附件告地址
|
||||
antiInterferenceReport: [], //抗扰度测试报告
|
||||
antiInterferenceTest: '',
|
||||
antiInterferenceTest: '0',
|
||||
backgroundTestPerformed: 0,
|
||||
deviceName: '',
|
||||
energyQualityIndex: [],
|
||||
@@ -912,8 +973,19 @@ watch(
|
||||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||||
sensitiveDevices: [], //主要敏感终端清单
|
||||
state: 0,
|
||||
substationMainWiringDiagram: [] //用户接入变电站主接线示意图地址
|
||||
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址
|
||||
|
||||
loadLevel: loadLevelOptionList[0]?.id, //负荷级别
|
||||
powerSupplyInfo: powerSupplyInfoOptionList[0]?.id //供电电源情况
|
||||
}
|
||||
if (isInterferencemanagement.value) {
|
||||
subForm.value.userReportSensitivePO.loadLevel = loadLevelOptionList[0]?.id //负荷级别
|
||||
subForm.value.userReportSensitivePO.powerSupplyInfo = powerSupplyInfoOptionList[0]?.id //供电电源情况
|
||||
} else {
|
||||
delete subForm.value.userReportSensitivePO.loadLevel
|
||||
delete subForm.value.userReportSensitivePO.powerSupplyInfo
|
||||
}
|
||||
|
||||
for (let key in val) {
|
||||
if (subForm.value.userReportSensitivePO && subForm.value.userReportSensitivePO.hasOwnProperty(key)) {
|
||||
// 对相同的key进行赋值
|
||||
@@ -952,7 +1024,7 @@ const open = async (row: any) => {
|
||||
form.value.userType = userTypeList.value[0].value
|
||||
}
|
||||
}
|
||||
async function handleResponse(data) {
|
||||
async function handleResponse(data: any) {
|
||||
// userType logic is commented out; if needed, implement accordingly
|
||||
if (data.userReportProjectPO) {
|
||||
form.value = { ...data, ...data.userReportProjectPO }
|
||||
@@ -1017,8 +1089,7 @@ const close = () => {
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
})
|
||||
onMounted(() => {})
|
||||
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
@@ -1030,7 +1101,7 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
||||
}
|
||||
let uploadName = ref('')
|
||||
//上传报告字段名称
|
||||
const uploadFileName = val => {
|
||||
const uploadFileName = (val: any) => {
|
||||
uploadName.value = val
|
||||
}
|
||||
//移除文件上传
|
||||
@@ -1098,7 +1169,7 @@ const choose = (e: any) => {
|
||||
}
|
||||
|
||||
//设置工程预期投产日期时间选择范围不能<今天
|
||||
const disabledDate = time => {
|
||||
const disabledDate = (time: any) => {
|
||||
// return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||
return false
|
||||
}
|
||||
@@ -1195,18 +1266,6 @@ const confirmForm = (flag: boolean) => {
|
||||
let confirmFormData = JSON.parse(JSON.stringify(subForm.value))
|
||||
//1.判断是否上传
|
||||
if (subForm.value.userType == '0' || subForm.value.userType == '1') {
|
||||
// if (!feasibilityReport.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传可研报告',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
// if (!preliminaryDesignDescription.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传项目初步设计说明书',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
if (!predictionEvaluationReport.value) {
|
||||
return ElMessage({
|
||||
message: '请上传预测评估报告',
|
||||
@@ -1237,18 +1296,6 @@ const confirmForm = (flag: boolean) => {
|
||||
subForm.value.userType == '4' ||
|
||||
subForm.value.userType == '5'
|
||||
) {
|
||||
// if (!feasibilityReport.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传可研报告',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
// if (!preliminaryDesignDescription.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传项目初步设计说明书',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
if (!predictionEvaluationReport.value) {
|
||||
return ElMessage({
|
||||
message: '请上传预测评估报告',
|
||||
@@ -1282,18 +1329,6 @@ const confirmForm = (flag: boolean) => {
|
||||
}
|
||||
//userType==6
|
||||
if (subForm.value.userType == '6') {
|
||||
// if (!feasibilityReport.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传可研报告',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
// if (!preliminaryDesignDescription.value) {
|
||||
// return ElMessage({
|
||||
// message: '请上传项目初步设计说明书',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// }
|
||||
if (!predictionEvaluationReport.value) {
|
||||
return ElMessage({
|
||||
message: '请上传预测评估报告',
|
||||
|
||||
Reference in New Issue
Block a user