2024-05-11 17:09:36 +08:00
|
|
|
|
<template>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-dialog v-model='dialogFormVisible' :title='title' width='65%' :append-to-body='true' :before-close='close'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:close-on-click-modal='false' draggable>
|
2024-05-11 17:09:36 +08:00
|
|
|
|
<!-- 用户档案录入 新建1 -->
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form :model='form' class='form-two' :validate-on-rule-change='false' :rules='rules' :scroll-to-error='true'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
ref='ruleFormRef' label-width='auto'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='填报人:' prop='reporter'>
|
|
|
|
|
|
<el-input v-model.trim='form.reporter' autocomplete='off' :disabled='true' placeholder='请输入填报人' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='填报日期:' prop='reportDate'>
|
|
|
|
|
|
<el-date-picker :disabled='true' style='width: 100%' v-model='form.reportDate' type='date'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
placeholder='请选择填报日期' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='填报部门:' prop='orgId'>
|
|
|
|
|
|
<el-input v-model.trim='form.orgId' :disabled='true' autocomplete='off' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='工程预期投产日期:' prop='expectedProductionDate'>
|
|
|
|
|
|
<el-date-picker style='width: 100%' v-model='form.expectedProductionDate' type='date'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
format='YYYY-MM-DD' value-format='YYYY-MM-DD' :disabled-date='disabledDate'
|
|
|
|
|
|
placeholder='请选择工程预期投产日期' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='用户性质:' prop='userType'>
|
2024-08-23 11:08:46 +08:00
|
|
|
|
<!-- :disabled="resendId != '' && title != '编辑'" -->
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-select v-model='form.userType' placeholder='请选择用户性质'>
|
|
|
|
|
|
<el-option v-for='(item, index) in userTypeList' :label='item.label' :value='item.value'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='所在地市:' prop='city'>
|
|
|
|
|
|
<el-select v-model='form.city' clearable placeholder='请选择所在地市'>
|
|
|
|
|
|
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:value='item.name'></el-option>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='归口管理部门:' prop='responsibleDepartment'>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
<el-input v-model.trim='form.responsibleDepartment' autocomplete='off' placeholder='请输入归口管理部门'
|
|
|
|
|
|
maxlength='32' show-word-limit />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='项目名称:' prop='projectName'>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
<el-input v-model.trim='form.projectName' autocomplete='off' placeholder='请输入项目名称' maxlength='64'
|
|
|
|
|
|
show-word-limit />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='用户状态:' prop='userStatus'>
|
|
|
|
|
|
<el-select v-model='form.userStatus' placeholder='请选择用户状态'>
|
|
|
|
|
|
<el-option v-for='(item, index) in userStateList' :label='item.label' :value='item.value'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:disabled='item.disabled' :key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='厂站名称:' prop='substation'>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
<el-input v-model.trim='form.substation' autocomplete='off' placeholder='请输入厂站名称' maxlength='64'
|
|
|
|
|
|
show-word-limit />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '0' || form.userType == '1'" label='用户协议容量:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='agreementCapacity'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-input v-model.trim='form.agreementCapacity' oninput="value=value.replace(/[^\-?\d.]/g,'')
|
2024-06-07 14:40:08 +08:00
|
|
|
|
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
2025-01-02 15:51:14 +08:00
|
|
|
|
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" autocomplete='off' placeholder='请输入用户协议容量' maxlength="6"
|
|
|
|
|
|
show-word-limit>
|
2024-05-24 14:53:51 +08:00
|
|
|
|
<template #append>MVA</template>
|
|
|
|
|
|
</el-input>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '0' || form.userType == '1'" label='非线性终端类型:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='nonlinearDeviceType'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-tree-select accordion ref='treeRef' :default-expand-all='false' show-checkbox check-strictly
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:highlight-current='true' readonly node-key='id' :props='defaultProps'
|
|
|
|
|
|
v-model='form.nonlinearDeviceType' :data='nonlinearDeviceTypeList' :render-after-expand='false' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='电压等级:' prop='voltageLevel'>
|
|
|
|
|
|
<el-select v-model='form.voltageLevel' placeholder='请选择电压等级' node-key='id'>
|
|
|
|
|
|
<el-option v-for='(item, index) in voltageLevelList' :label='item.name' :value='item.id'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='预测评估单位:' prop='evaluationDept'>
|
|
|
|
|
|
<el-select v-model='form.evaluationDept' allow-create filterable placeholder='请选择预测评估单位'>
|
|
|
|
|
|
<el-option v-for='(item, index) in evaluationDeptList' :label='item.name' :value='item.name'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='是否需要治理:' prop='needGovernance'>
|
|
|
|
|
|
<el-radio-group v-model='form.needGovernance'>
|
|
|
|
|
|
<el-radio :value='1'>是</el-radio>
|
|
|
|
|
|
<el-radio :value='0'>否</el-radio>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='是否开展背景测试:' prop='backgroundTestPerformed'>
|
|
|
|
|
|
<el-radio-group v-model='form.backgroundTestPerformed'>
|
|
|
|
|
|
<el-radio :value='1'>是</el-radio>
|
|
|
|
|
|
<el-radio :value='0'>否</el-radio>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item label='关联终端' prop='devId' v-if="props.openType != 'create'">
|
|
|
|
|
|
<el-select v-model='form.devId' filterable placeholder='请选择关联终端' @change='changeDevId'>
|
|
|
|
|
|
<el-option v-for='(item, index) in devIdList' :label='item.devName' :value='item.devId'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-08-15 20:31:02 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item label='关联监测点' prop='lineId' v-if="props.openType != 'create'">
|
|
|
|
|
|
<el-select v-model='form.lineId' placeholder='请选择关联监测点'>
|
|
|
|
|
|
<el-option v-for='(item, index) in lineIdList' :label='item.lineName' :value='item.lineId'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-08-15 20:31:02 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType != '0' && form.userType != '1'" label='评估类型:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='evaluationType'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-select v-model='form.evaluationType' placeholder='请选择评估类型'>
|
|
|
|
|
|
<el-option v-for='(item, index) in evaluationTypeList' :key='index' :label='item.name'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:value='item.id' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType != '0' && form.userType != '1'" label='PCC点:' prop='pccPoint'>
|
|
|
|
|
|
<el-input v-model.trim='form.pccPoint' autocomplete='off' placeholder='请输入PCC点' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
|
|
|
|
|
label='基准短路容量:' prop='baseShortCircuitCapacity'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-input v-model.trim='form.baseShortCircuitCapacity' oninput="value=value.replace(/[^\-?\d.]/g,'')
|
2024-06-07 14:40:08 +08:00
|
|
|
|
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
2024-12-07 13:55:56 +08:00
|
|
|
|
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder='请输入基准短路容量'>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #append>MVA</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
|
|
|
|
|
label='系统最小短路容量:' prop='minShortCircuitCapacity'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-input v-model.trim='form.minShortCircuitCapacity' oninput="value=value.replace(/[^\-?\d.]/g,'')
|
2024-06-07 14:40:08 +08:00
|
|
|
|
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
2024-12-07 13:55:56 +08:00
|
|
|
|
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" autocomplete='off' placeholder='请选择系统最小短路容量'>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #append>MVA</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
|
|
|
|
|
label='PCC供电设备容量:' prop='pccEquipmentCapacity'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-input v-model.trim='form.pccEquipmentCapacity' oninput="value=value.replace(/[^\-?\d.]/g,'')
|
2024-06-07 14:40:08 +08:00
|
|
|
|
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
2025-01-02 15:51:14 +08:00
|
|
|
|
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder='请输入PCC供电设备容量'>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #append>MVA</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
|
|
|
|
|
label='用户用电协议容量:' prop='userAgreementCapacity'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-input v-model.trim='form.userAgreementCapacity' autocomplete='off' oninput="value=value.replace(/[^\-?\d.]/g,'')
|
2024-06-07 14:40:08 +08:00
|
|
|
|
.replace(/^\./g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')
|
2024-12-07 13:55:56 +08:00
|
|
|
|
.replace('-','$#$').replace(/\-/g,'').replace('$#$','-')" placeholder='请输入用户用电协议容量'>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #append>MVA</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6'" label='行业:' prop='industry'>
|
|
|
|
|
|
<el-select v-model='form.industry' placeholder='请选择行业'>
|
|
|
|
|
|
<el-option v-for='(item, index) in industryList' :label='item.name' :value='item.id' :key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6'" label='敏感终端名称:' prop='deviceName'>
|
|
|
|
|
|
<el-input v-model.trim='form.deviceName' autocomplete='off' placeholder='请输入敏感终端名称' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6'" label='供电电源数量:' prop='powerSupplyCount'>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
<el-input-number style='width: 100%' v-model='form.powerSupplyCount' :min='0' placeholder='请输入供电电源数量' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6'" label='敏感电能质量指标:' prop='energyQualityIndex'>
|
|
|
|
|
|
<el-select v-model='form.energyQualityIndex' multiple collapse-tags collapse-tags-tooltip
|
2025-01-02 15:51:14 +08:00
|
|
|
|
placeholder='请选择敏感电能质量指标'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-option v-for='(item, index) in energyQualityIndexList' :label='item.name' :value='item.id'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
|
|
|
|
|
:label="form.userType == '4' || form.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'"
|
|
|
|
|
|
prop='nonlinearLoadType'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-tree-select accordion ref='treeRef' :default-expand-all='false' show-checkbox check-strictly
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:highlight-current='true' readonly node-key='id' :props='defaultProps' filterable
|
|
|
|
|
|
v-model='form.nonlinearLoadType' :data='nonlinearDeviceTypeList' :render-after-expand='false'
|
|
|
|
|
|
placeholder='请选择' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<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>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6' && isInterferencemanagement" label='负荷级别:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='loadLevel'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<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'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-07-16 15:42:07 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType == '6' && isInterferencemanagement" label='供电电源情况:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='powerSupplyInfo'>
|
|
|
|
|
|
<el-select v-model='form.powerSupplyInfo' collapse-tags collapse-tags-tooltip placeholder='请选择供电电源情况'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-option v-for='(item, index) in powerSupplyInfoOptionList' :label='item.name' :value='item.id'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:key='index' />
|
2024-07-16 15:42:07 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' v-if="form.userType != '0' && form.userType != '1'" label='预测评估评审单位:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='evaluationChekDept'>
|
|
|
|
|
|
<el-input v-model.trim='form.evaluationChekDept' autocomplete='off' placeholder='请输入预测评估评审单位' />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' label='预测评估结论:' prop='evaluationConclusion' style='width: 100%'>
|
|
|
|
|
|
<el-input type='textarea' v-model.trim='form.evaluationConclusion' autocomplete='off'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
placeholder='请输入预测评估结论' maxlength='300' show-word-limit />
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='可研报告:' prop='feasibilityReport'>
|
|
|
|
|
|
<el-upload v-model:file-list='form.feasibilityReport' ref='uploadRef' action='' :accept='acceptType'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('feasibilityReport')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='项目初步设计说明书:' prop='preliminaryDesignDescription'>
|
|
|
|
|
|
<el-upload v-model:file-list='form.preliminaryDesignDescription' ref='uploadRef' action=''
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:accept='acceptType' :limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('preliminaryDesignDescription')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='预测评估报告:' prop='predictionEvaluationReport'>
|
|
|
|
|
|
<el-upload v-model:file-list='form.predictionEvaluationReport' ref='uploadRef' action=''
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:accept='acceptType' :limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('predictionEvaluationReport')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='预测评估评审意见报告:' prop='predictionEvaluationReviewOpinions'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-upload v-model:file-list='form.predictionEvaluationReviewOpinions' ref='uploadRef' action=''
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:accept='acceptType' :limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('predictionEvaluationReviewOpinions')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='其他附件:' prop='additionalAttachments'>
|
|
|
|
|
|
<el-upload v-model:file-list='form.additionalAttachments' ref='uploadRef' action='' :accept='acceptType'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('additionalAttachments')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item for='-' class='uploadFile' v-if="form.userType != '0' && form.userType != '1'"
|
2025-01-02 15:51:14 +08:00
|
|
|
|
label='用户接入变电站主接线示意图:' prop='substationMainWiringDiagram'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-upload v-model:file-list='form.substationMainWiringDiagram' ref='uploadRef' action=''
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:accept='acceptType' :limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('substationMainWiringDiagram')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' label='主要敏感终端清单:' v-if="form.userType == '6'"
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='sensitiveDevices'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-upload v-model:file-list='form.sensitiveDevices' ref='uploadRef' action='' :accept='acceptType'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('sensitiveDevices')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' v-if="form.userType == '6'" label='抗扰度测试报告:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='antiInterferenceReport'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-upload v-model:file-list='form.antiInterferenceReport' ref='uploadRef' action=''
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:accept='acceptType' :limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('antiInterferenceReport')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-form-item class='uploadFile' for='-' v-if="form.userType == '6'" label='背景电能质量测试报告:'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
prop='powerQualityReport'>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-upload v-model:file-list='form.powerQualityReport' ref='uploadRef' action='' :accept='acceptType'
|
2025-01-02 15:51:14 +08:00
|
|
|
|
:limit='1' :on-change='choose' :auto-upload='false' :on-remove='removeFile'
|
|
|
|
|
|
:on-progress="uploadFileName('powerQualityReport')">
|
2024-05-24 13:31:08 +08:00
|
|
|
|
<template #trigger>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<el-button type='primary'>上传文件</el-button>
|
2024-05-24 13:31:08 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<addUpload ref='addUploadRef' v-if="props.openType == 'sourcesOfInterference'" />
|
2024-05-14 19:07:02 +08:00
|
|
|
|
</el-form>
|
2024-05-11 17:09:36 +08:00
|
|
|
|
<template #footer>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<div class='dialog-footer'>
|
|
|
|
|
|
<el-button @click='close()'>取消</el-button>
|
2024-12-17 14:14:39 +08:00
|
|
|
|
<el-button type='primary' @click='confirmForm(true)' :loading='loading'>保存</el-button>
|
|
|
|
|
|
<el-button type='primary' v-if='props.submissionControl' @click='confirmForm(false)' :loading='loading'>
|
2024-09-14 10:56:49 +08:00
|
|
|
|
提交审批
|
|
|
|
|
|
</el-button>
|
2024-05-11 17:09:36 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</template>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<script lang='ts' setup>
|
2024-05-14 19:07:02 +08:00
|
|
|
|
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
2024-05-11 17:09:36 +08:00
|
|
|
|
// import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
|
|
|
|
|
import type { 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'
|
2024-05-14 19:07:02 +08:00
|
|
|
|
import { useAdminInfo } from '@/stores/adminInfo'
|
|
|
|
|
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
|
|
|
|
|
import { uploadFile } from '@/api/system-boot/file'
|
2024-08-15 20:31:02 +08:00
|
|
|
|
import {
|
|
|
|
|
|
submitFormData,
|
|
|
|
|
|
getById,
|
|
|
|
|
|
updateFormData,
|
|
|
|
|
|
addEditor,
|
|
|
|
|
|
resend,
|
|
|
|
|
|
getByDeptDevLine
|
|
|
|
|
|
} from '@/api/supervision-boot/interfere/index'
|
2024-06-27 14:45:58 +08:00
|
|
|
|
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
2024-08-15 20:31:02 +08:00
|
|
|
|
import addUpload from './addUpload.vue'
|
2024-07-16 15:42:07 +08:00
|
|
|
|
import { useRoute } from 'vue-router'
|
2024-12-07 13:55:56 +08:00
|
|
|
|
|
2024-07-16 15:42:07 +08:00
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const isInterferencemanagement: any = ref(false)
|
|
|
|
|
|
if (route.path.includes('interferencemanagement')) {
|
|
|
|
|
|
isInterferencemanagement.value = false
|
|
|
|
|
|
} else {
|
|
|
|
|
|
isInterferencemanagement.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-27 14:45:58 +08:00
|
|
|
|
const props = defineProps({
|
2024-05-14 09:45:47 +08:00
|
|
|
|
openType: {
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
default: 'create'
|
2024-06-27 14:45:58 +08:00
|
|
|
|
},
|
2024-09-14 10:56:49 +08:00
|
|
|
|
submissionControl: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: true
|
|
|
|
|
|
},
|
2024-06-27 14:45:58 +08:00
|
|
|
|
update: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false
|
|
|
|
|
|
},
|
|
|
|
|
|
normalizedControl: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
const emits = defineEmits(['onSubmit'])
|
2024-05-11 17:09:36 +08:00
|
|
|
|
const dictData = useDictData()
|
|
|
|
|
|
const dialogFormVisible = ref(false)
|
2024-05-30 16:16:15 +08:00
|
|
|
|
// .doc,.docx,.xlsx,.xls,.pdf
|
2024-06-02 17:55:37 +08:00
|
|
|
|
const acceptType = ''
|
2024-05-14 19:07:02 +08:00
|
|
|
|
const form: any = ref({})
|
2024-10-16 17:54:55 +08:00
|
|
|
|
const loading = ref(false)
|
2024-08-15 20:31:02 +08:00
|
|
|
|
const addUploadRef: any = ref()
|
2024-06-24 14:29:20 +08:00
|
|
|
|
const control: any = ref(true)
|
2024-09-12 11:23:41 +08:00
|
|
|
|
const controFlag: any = ref(false)
|
2024-05-14 19:07:02 +08:00
|
|
|
|
const ruleFormRef: any = ref(null)
|
2024-06-13 13:32:50 +08:00
|
|
|
|
//字典获取所在地市
|
|
|
|
|
|
const areaOptionList = dictData
|
|
|
|
|
|
.getBasicData('jibei_area')
|
|
|
|
|
|
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
|
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//字典获取敏感电能质量指标
|
2024-07-15 20:34:21 +08:00
|
|
|
|
// const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
|
|
|
|
|
const energyQualityIndexList = dictData.getBasicData('Problem_Indicators')
|
2024-08-15 20:31:02 +08:00
|
|
|
|
const devIdList: any = ref([])
|
|
|
|
|
|
const lineIdList: any = ref([])
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//字典获取行业类型
|
|
|
|
|
|
const industryList = dictData.getBasicData('industry_type_jb')
|
|
|
|
|
|
//字典电压等级
|
|
|
|
|
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
|
|
|
|
|
//字典评估类型
|
|
|
|
|
|
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
|
|
|
|
|
//字典预测评估单位
|
|
|
|
|
|
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
2024-07-16 15:42:07 +08:00
|
|
|
|
//负荷级别
|
|
|
|
|
|
const loadLevelOptionList = dictData.getBasicData('load_level')
|
|
|
|
|
|
//供电电源情况
|
|
|
|
|
|
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
2024-05-14 09:45:47 +08:00
|
|
|
|
//用户性质数组
|
2024-06-24 14:29:20 +08:00
|
|
|
|
const userTypeList: any = ref([
|
2024-05-14 09:45:47 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: '新建电网工程',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 0
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '扩建电网工程',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '新建非线性负荷用户',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 2
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '扩建非线性负荷用户',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 3
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '新建新能源发电站',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 4
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '扩建新能源发电站',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 5
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '敏感及重要用户',
|
2024-06-02 17:55:37 +08:00
|
|
|
|
value: 6
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
])
|
|
|
|
|
|
//用户状态数组
|
2024-06-24 16:38:59 +08:00
|
|
|
|
const userStateList = ref([
|
2024-05-14 09:45:47 +08:00
|
|
|
|
{
|
|
|
|
|
|
label: '可研',
|
2024-06-24 16:38:59 +08:00
|
|
|
|
value: 0,
|
|
|
|
|
|
disabled: false
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '建设',
|
2024-06-24 16:38:59 +08:00
|
|
|
|
value: 1,
|
|
|
|
|
|
disabled: true
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '运行',
|
2024-06-24 16:38:59 +08:00
|
|
|
|
value: 2,
|
|
|
|
|
|
disabled: true
|
2024-05-14 09:45:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '退运',
|
2024-06-24 16:38:59 +08:00
|
|
|
|
value: 3,
|
|
|
|
|
|
disabled: true
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
])
|
2024-06-02 17:55:37 +08:00
|
|
|
|
const title = ref('')
|
2024-06-24 16:38:59 +08:00
|
|
|
|
|
2024-06-13 13:32:50 +08:00
|
|
|
|
//获取非线性终端类型树形下拉
|
2024-05-11 17:09:36 +08:00
|
|
|
|
const defaultProps = {
|
|
|
|
|
|
children: 'children',
|
2024-05-14 09:45:47 +08:00
|
|
|
|
label: 'name',
|
|
|
|
|
|
key: 'id'
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
2024-05-14 19:07:02 +08:00
|
|
|
|
const nonlinearDeviceTypeList: any = ref('')
|
2024-05-14 09:45:47 +08:00
|
|
|
|
//获取登陆用户姓名和部门
|
|
|
|
|
|
const adminInfo = useAdminInfo()
|
|
|
|
|
|
const resetForm = () => {
|
|
|
|
|
|
form.value = {
|
|
|
|
|
|
reporter: '', //填报人 1
|
|
|
|
|
|
reportDate: new Date(), //填报日期 1
|
|
|
|
|
|
orgId: '', //填报部门 1
|
|
|
|
|
|
expectedProductionDate: '', //工程预期投产日期 1
|
2024-06-21 10:15:25 +08:00
|
|
|
|
userType: 1, //用户性质 1
|
2024-06-13 13:32:50 +08:00
|
|
|
|
city: areaOptionList[0].name, //所在地市 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
responsibleDepartment: '', //归口管理部门 1
|
2024-06-24 16:38:59 +08:00
|
|
|
|
userStatus: userStateList.value[0].value, //用户状态 1
|
2024-08-23 10:11:30 +08:00
|
|
|
|
projectName: '', //项目名称 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
substation: '', //变电站 1
|
|
|
|
|
|
voltageLevel: voltageLevelList[0].id, //电压等级 1
|
2024-05-14 11:31:24 +08:00
|
|
|
|
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
evaluationConclusion: '', //预测评估结论 1
|
|
|
|
|
|
backgroundTestPerformed: 0, //是否开展背景测试 1
|
2024-08-15 20:31:02 +08:00
|
|
|
|
devId: '', //关联终端 1
|
|
|
|
|
|
lineId: '', //关联监测点 1
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], // 可研报告告地址 1
|
|
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址 1
|
|
|
|
|
|
predictionEvaluationReport: [], //预测评估报告地址 1
|
|
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址 1
|
|
|
|
|
|
additionalAttachments: [], //其他附件告地址 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
state: '', //数据状态
|
|
|
|
|
|
pccPoint: '', //PCC点 1
|
|
|
|
|
|
evaluationType: evaluationTypeList[0].id, //评估类型 1
|
|
|
|
|
|
evaluationChekDept: '', //预测评估审单位 1
|
2024-05-14 19:07:02 +08:00
|
|
|
|
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址 1
|
|
|
|
|
|
powerQualityReport: [], //背景电能质量测试报告 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
minShortCircuitCapacity: '', //系统最小短路容量(MVA) 1
|
|
|
|
|
|
userAgreementCapacity: '', //用户用电协议容量(MVA) 1
|
|
|
|
|
|
needGovernance: 0, //是否需要治理 1
|
|
|
|
|
|
agreementCapacity: '', //用户协议容量 1
|
2024-06-13 13:32:50 +08:00
|
|
|
|
nonlinearDeviceType: '', //非线性终端类型 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
nonlinearLoadType: '', //非线性负荷类型 1
|
2025-01-02 15:51:14 +08:00
|
|
|
|
pccEquipmentCapacity: '', // PCC供电设备容量(MVA) 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
baseShortCircuitCapacity: '', //基准短路容量(MVA)1
|
|
|
|
|
|
industry: industryList[0].id, //行业 1
|
2024-06-13 13:32:50 +08:00
|
|
|
|
deviceName: '', //敏感终端名称 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
powerSupplyCount: 0, //供电电源数量 1
|
2024-07-15 20:34:21 +08:00
|
|
|
|
energyQualityIndex: [energyQualityIndexList[0]?.id], //敏感电能质量指标 1
|
2024-07-16 15:42:07 +08:00
|
|
|
|
antiInterferenceTest: '0', //是否开展抗扰度测试 1
|
2024-06-13 13:32:50 +08:00
|
|
|
|
sensitiveDevices: [], //主要敏感终端清单 1
|
2024-05-14 19:07:02 +08:00
|
|
|
|
antiInterferenceReport: [] //抗扰度测试报告 1
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
form.value.reporter = adminInfo.$state.name
|
|
|
|
|
|
form.value.orgId = adminInfo.$state.deptName
|
2024-07-16 15:42:07 +08:00
|
|
|
|
if (isInterferencemanagement.value) {
|
|
|
|
|
|
form.value.loadLevel = loadLevelOptionList[0]?.id //负荷级别
|
|
|
|
|
|
form.value.powerSupplyInfo = powerSupplyInfoOptionList[0]?.id //供电电源情况
|
|
|
|
|
|
} else {
|
|
|
|
|
|
delete form.value.loadLevel
|
|
|
|
|
|
delete form.value.powerSupplyInfo
|
|
|
|
|
|
}
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
//初始化数据
|
|
|
|
|
|
resetForm()
|
|
|
|
|
|
//获取树形图数据
|
2024-05-11 17:09:36 +08:00
|
|
|
|
const getTreeList = () => {
|
|
|
|
|
|
queryByAllCode().then(res => {
|
2024-07-30 14:28:31 +08:00
|
|
|
|
// nonlinearDeviceTypeList.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
|
|
|
|
|
|
|
|
|
|
|
// nonlinearDeviceTypeList.value.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
|
|
|
|
|
|
// })
|
|
|
|
|
|
// })
|
|
|
|
|
|
// })
|
|
|
|
|
|
// })
|
|
|
|
|
|
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) => {
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//tree禁用根节点
|
|
|
|
|
|
item.disabled = 'disabled'
|
2024-07-16 11:49:35 +08:00
|
|
|
|
item.children.map((vv: any) => {
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//tree禁用二级节点
|
|
|
|
|
|
vv.disabled = 'disabled'
|
2024-07-16 11:49:35 +08:00
|
|
|
|
vv.children.map((kk: any) => {
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//tree禁用三级节点
|
|
|
|
|
|
kk.disabled = 'disabled'
|
2024-07-30 14:28:31 +08:00
|
|
|
|
kk.children.map((ss: any) => {
|
|
|
|
|
|
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
|
|
|
|
|
nonlinearDeviceTypeList.value[0].children.push(ss)
|
|
|
|
|
|
})
|
2024-05-11 17:09:36 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-07-30 14:28:31 +08:00
|
|
|
|
|
2024-05-14 09:45:47 +08:00
|
|
|
|
getTreeList()
|
2024-05-11 17:09:36 +08:00
|
|
|
|
const treeRef = ref()
|
2024-05-14 19:07:02 +08:00
|
|
|
|
const subForm: any = ref({
|
2024-06-13 13:32:50 +08:00
|
|
|
|
city: '', //所在地市
|
2024-05-13 10:18:48 +08:00
|
|
|
|
evaluationConclusion: '', //预测评估结论
|
|
|
|
|
|
evaluationDept: '', //预测评估单位
|
|
|
|
|
|
expectedProductionDate: '', //工程预期投产日期
|
|
|
|
|
|
orgId: '', //填报部门
|
|
|
|
|
|
projectName: '',
|
2024-08-15 20:31:02 +08:00
|
|
|
|
devId: 0, //关联终端 1
|
|
|
|
|
|
lineId: 0, //关联监测点 1
|
2024-05-11 17:09:36 +08:00
|
|
|
|
reporter: '', //填报人
|
|
|
|
|
|
reportDate: new Date(), //填报日期
|
|
|
|
|
|
responsibleDepartment: '', //归口管理部门
|
2024-05-13 10:18:48 +08:00
|
|
|
|
substation: '', ////变电站
|
|
|
|
|
|
userStatus: '0', //用户状态
|
2024-06-21 10:15:25 +08:00
|
|
|
|
userType: 1, //用户性质
|
2024-05-14 09:45:47 +08:00
|
|
|
|
voltageLevel: '',
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//userType=='0' '1'
|
|
|
|
|
|
userReportProjectPO: {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-13 10:18:48 +08:00
|
|
|
|
agreementCapacity: 0,
|
2024-05-11 17:09:36 +08:00
|
|
|
|
backgroundTestPerformed: 0,
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告
|
2024-05-11 17:09:36 +08:00
|
|
|
|
id: '',
|
|
|
|
|
|
needGovernance: 0,
|
2024-05-13 10:18:48 +08:00
|
|
|
|
nonlinearDeviceType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-05-11 17:09:36 +08:00
|
|
|
|
state: 0
|
|
|
|
|
|
},
|
2024-05-13 10:18:48 +08:00
|
|
|
|
//userType=='2,3,4,5'
|
|
|
|
|
|
userReportSubstationPO: {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-11 17:09:36 +08:00
|
|
|
|
backgroundTestPerformed: 0,
|
2024-05-13 10:18:48 +08:00
|
|
|
|
baseShortCircuitCapacity: 0,
|
2024-05-11 17:09:36 +08:00
|
|
|
|
evaluationChekDept: '',
|
|
|
|
|
|
evaluationType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告
|
2024-05-11 17:09:36 +08:00
|
|
|
|
id: '',
|
2024-05-13 10:18:48 +08:00
|
|
|
|
minShortCircuitCapacity: 0,
|
2024-05-11 17:09:36 +08:00
|
|
|
|
needGovernance: 0,
|
2024-05-13 10:18:48 +08:00
|
|
|
|
nonlinearLoadType: '',
|
|
|
|
|
|
pccEquipmentCapacity: 0,
|
2024-05-11 17:09:36 +08:00
|
|
|
|
pccPoint: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-05-11 17:09:36 +08:00
|
|
|
|
state: 0,
|
2024-05-14 19:07:02 +08:00
|
|
|
|
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址
|
2024-05-13 10:18:48 +08:00
|
|
|
|
userAgreementCapacity: 0
|
2024-05-11 17:09:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
//userType=='6'
|
2024-05-13 10:18:48 +08:00
|
|
|
|
userReportSensitivePO: {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
antiInterferenceReport: [], //抗扰度测试报告
|
2024-07-16 15:42:07 +08:00
|
|
|
|
antiInterferenceTest: '0',
|
2024-05-11 17:09:36 +08:00
|
|
|
|
backgroundTestPerformed: 0,
|
2024-05-13 10:18:48 +08:00
|
|
|
|
deviceName: '',
|
2024-07-15 20:34:21 +08:00
|
|
|
|
energyQualityIndex: [],
|
2024-05-11 17:09:36 +08:00
|
|
|
|
evaluationChekDept: '',
|
|
|
|
|
|
evaluationType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告告地址
|
2024-05-11 17:09:36 +08:00
|
|
|
|
id: '',
|
2024-05-13 10:18:48 +08:00
|
|
|
|
industry: '',
|
2024-05-11 17:09:36 +08:00
|
|
|
|
needGovernance: 0,
|
|
|
|
|
|
pccPoint: '',
|
2024-05-14 19:07:02 +08:00
|
|
|
|
powerQualityReport: [], //背景电能质量测试报告
|
2024-05-13 10:18:48 +08:00
|
|
|
|
powerSupplyCount: 0,
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-06-13 13:32:50 +08:00
|
|
|
|
sensitiveDevices: [], //主要敏感终端清单
|
2024-05-11 17:09:36 +08:00
|
|
|
|
state: 0,
|
2024-05-14 19:07:02 +08:00
|
|
|
|
substationMainWiringDiagram: [] //用户接入变电站主接线示意图地址
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
2024-12-07 13:55:56 +08:00
|
|
|
|
// 特殊字符正则表达式
|
2024-12-07 15:07:56 +08:00
|
|
|
|
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//定义校验规则
|
2024-05-14 09:45:47 +08:00
|
|
|
|
const rules = ref({
|
2024-06-02 17:55:37 +08:00
|
|
|
|
reporter: [{ required: true, message: '请输入填报人', trigger: 'blur' }],
|
|
|
|
|
|
reportDate: [{ required: true, message: '请选择填报日期', trigger: 'change' }],
|
|
|
|
|
|
orgId: [{ required: true, message: '请选择填报部门', trigger: 'change' }],
|
|
|
|
|
|
expectedProductionDate: [{ required: true, message: '请选择工程预期投产日期', trigger: 'change' }],
|
|
|
|
|
|
userType: [{ required: true, message: '清选择用户性质', trigger: 'change' }],
|
2024-06-13 13:32:50 +08:00
|
|
|
|
city: [{ required: true, message: '请选择所在地市', trigger: 'change' }],
|
2024-12-07 13:55:56 +08:00
|
|
|
|
responsibleDepartment: [{ required: true, message: '请输入归口管理部门', trigger: 'blur' },
|
2025-01-02 15:51:14 +08:00
|
|
|
|
{
|
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
|
if (specialCharRegex.test(value)) {
|
|
|
|
|
|
callback(new Error('输入包含不允许的特殊字符'))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
|
}],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
userStatus: [{ required: true, message: '请选择用户状态', trigger: 'change' }],
|
2024-12-07 13:55:56 +08:00
|
|
|
|
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' },
|
2025-01-02 15:51:14 +08:00
|
|
|
|
{
|
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
|
if (specialCharRegex.test(value)) {
|
|
|
|
|
|
callback(new Error('输入包含不允许的特殊字符'))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
|
}],
|
2024-12-07 13:55:56 +08:00
|
|
|
|
substation: [{ required: true, message: '请输入厂站名称', trigger: 'blur' },
|
2025-01-02 15:51:14 +08:00
|
|
|
|
{
|
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
|
if (specialCharRegex.test(value)) {
|
|
|
|
|
|
callback(new Error('输入包含不允许的特殊字符'))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
|
}],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
voltageLevel: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
|
|
|
|
|
evaluationDept: [{ required: true, message: '请选择预测评估单位', trigger: 'change' }],
|
2024-12-07 13:55:56 +08:00
|
|
|
|
evaluationConclusion: [{ required: true, message: '请输入预测评估结论', trigger: 'blur' },
|
2025-01-02 15:51:14 +08:00
|
|
|
|
{
|
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
|
if (specialCharRegex.test(value)) {
|
|
|
|
|
|
callback(new Error('输入包含不允许的特殊字符'))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
|
}],
|
2024-08-15 20:31:02 +08:00
|
|
|
|
devId: [{ required: true, message: '请选择关联终端', trigger: 'change' }],
|
|
|
|
|
|
lineId: [{ required: true, message: '请选择关联监测点', trigger: 'change' }],
|
2024-12-07 13:55:56 +08:00
|
|
|
|
agreementCapacity: [
|
|
|
|
|
|
{ required: true, message: '请选择用户协议容量', trigger: 'blur' }
|
|
|
|
|
|
],
|
2024-06-13 13:32:50 +08:00
|
|
|
|
nonlinearDeviceType: [{ required: true, message: '请选择非线性终端类型', trigger: 'change' }],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
needGovernance: [{ required: true, message: '请选择是否需要治理', trigger: 'change' }],
|
|
|
|
|
|
backgroundTestPerformed: [{ required: true, message: '请选择是否开展背景测试', trigger: 'change' }],
|
|
|
|
|
|
state: [{ required: true, message: '请选择数据状态', trigger: 'change' }],
|
|
|
|
|
|
pccPoint: [{ required: true, message: '请输入PCC点', trigger: 'blur' }],
|
|
|
|
|
|
industry: [{ required: true, message: '请选择行业', trigger: 'change' }],
|
2024-06-13 13:32:50 +08:00
|
|
|
|
deviceName: [{ required: true, message: '请输入敏感终端名称', trigger: 'blur' }],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
powerSupplyCount: [{ required: true, message: '请输入供电电源数量', trigger: 'blur' }],
|
|
|
|
|
|
energyQualityIndex: [{ required: true, message: '请输入敏感电能质量指标', trigger: 'blur' }],
|
|
|
|
|
|
evaluationType: [{ required: true, message: '请选择评估类型', trigger: 'change' }],
|
|
|
|
|
|
antiInterferenceTest: [{ required: true, message: '请选择是否开展抗扰度测试', trigger: 'change' }],
|
|
|
|
|
|
evaluationChekDept: [{ required: true, message: '请输入预测评估审单位', trigger: 'blur' }],
|
|
|
|
|
|
baseShortCircuitCapacity: [{ required: true, message: '请输入基准短路容量', trigger: 'blur' }],
|
|
|
|
|
|
minShortCircuitCapacity: [{ required: true, message: '请输入系统最小短路容量', trigger: 'blur' }],
|
2025-01-02 15:51:14 +08:00
|
|
|
|
pccEquipmentCapacity: [{ required: true, message: '请输入PCC供电设备容量', trigger: 'blur' }],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
userAgreementCapacity: [{ required: true, message: '请输入用户用电协议容量', trigger: 'blur' }],
|
|
|
|
|
|
nonlinearLoadType: [{ required: true, message: '请输入非线性负荷类型', trigger: 'blur' }],
|
|
|
|
|
|
substationMainWiringDiagram: [{ required: true, message: '请上传用户接入变电站主接线示意图', trigger: 'change' }],
|
2024-06-13 13:32:50 +08:00
|
|
|
|
sensitiveDevices: [{ required: true, message: '请上传主要敏感终端清单', trigger: 'change' }],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
antiInterferenceReport: [{ required: true, message: '请上传抗扰度测试报告', trigger: 'change' }],
|
|
|
|
|
|
powerQualityReport: [{ required: true, message: '请上传背景电能质量测试报告', trigger: 'change' }],
|
2024-06-06 11:10:37 +08:00
|
|
|
|
feasibilityReport: [{ required: false, message: '请上传可研报告', trigger: 'blur' }],
|
|
|
|
|
|
preliminaryDesignDescription: [{ required: false, message: '请上传项目初步设计说明书', trigger: 'blur' }],
|
2024-06-02 17:55:37 +08:00
|
|
|
|
predictionEvaluationReport: [{ required: true, message: '请上传预测评估报告', trigger: 'blur' }],
|
|
|
|
|
|
predictionEvaluationReviewOpinions: [{ required: true, message: '请上传预测评估评审意见报告', trigger: 'blur' }],
|
2024-07-16 15:42:07 +08:00
|
|
|
|
additionalAttachments: [{ required: false, message: '请上传其他附件', trigger: 'blur' }],
|
|
|
|
|
|
loadLevel: [{ required: true, message: '请选择负荷级别', trigger: 'change' }],
|
2024-07-17 16:15:07 +08:00
|
|
|
|
powerSupplyInfo: [{ required: true, message: '请选择供电电源情况', trigger: 'change' }]
|
2024-05-11 17:09:36 +08:00
|
|
|
|
})
|
2024-05-14 09:45:47 +08:00
|
|
|
|
watch(
|
|
|
|
|
|
() => form.value,
|
|
|
|
|
|
(val, oldVal) => {
|
|
|
|
|
|
for (let key in val) {
|
|
|
|
|
|
if (subForm.value.hasOwnProperty(key)) {
|
|
|
|
|
|
subForm.value[key] = val[key] // 对相同的key进行赋值
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//处理填报日期时间格式
|
2024-05-24 13:31:08 +08:00
|
|
|
|
subForm.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
|
2024-05-14 09:45:47 +08:00
|
|
|
|
//userType==0,1
|
|
|
|
|
|
if (val.userType == '0' || val.userType == '1') {
|
|
|
|
|
|
subForm.value.userReportProjectPO = {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
agreementCapacity: 0,
|
|
|
|
|
|
backgroundTestPerformed: 0,
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告
|
2024-05-14 09:45:47 +08:00
|
|
|
|
id: '',
|
|
|
|
|
|
needGovernance: 0,
|
|
|
|
|
|
nonlinearDeviceType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
state: 0
|
|
|
|
|
|
}
|
|
|
|
|
|
for (let key in val) {
|
|
|
|
|
|
if (subForm.value.userReportProjectPO && subForm.value.userReportProjectPO.hasOwnProperty(key)) {
|
|
|
|
|
|
// 对相同的key进行赋值
|
|
|
|
|
|
subForm.value.userReportProjectPO[key] = val[key]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
delete subForm.value.userReportSubstationPO
|
|
|
|
|
|
delete subForm.value.userReportSensitivePO
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
//userType==2,3,4,5
|
|
|
|
|
|
if (val.userType == '2' || val.userType == '3' || val.userType == '4' || val.userType == '5') {
|
|
|
|
|
|
subForm.value.userReportSubstationPO = {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
backgroundTestPerformed: 0,
|
|
|
|
|
|
baseShortCircuitCapacity: 0,
|
|
|
|
|
|
evaluationChekDept: '',
|
|
|
|
|
|
evaluationType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告
|
2024-05-14 09:45:47 +08:00
|
|
|
|
id: '',
|
|
|
|
|
|
minShortCircuitCapacity: 0,
|
|
|
|
|
|
needGovernance: 0,
|
|
|
|
|
|
nonlinearLoadType: '',
|
|
|
|
|
|
pccEquipmentCapacity: 0,
|
|
|
|
|
|
pccPoint: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
state: 0,
|
2024-05-14 19:07:02 +08:00
|
|
|
|
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
userAgreementCapacity: 0
|
|
|
|
|
|
}
|
|
|
|
|
|
for (let key in val) {
|
|
|
|
|
|
if (subForm.value.userReportSubstationPO && subForm.value.userReportSubstationPO.hasOwnProperty(key)) {
|
|
|
|
|
|
// 对相同的key进行赋值
|
|
|
|
|
|
subForm.value.userReportSubstationPO[key] = val[key]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
delete subForm.value.userReportProjectPO
|
|
|
|
|
|
delete subForm.value.userReportSensitivePO
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
//userType==6
|
|
|
|
|
|
if (val.userType == '6') {
|
|
|
|
|
|
subForm.value.userReportSensitivePO = {
|
2024-05-14 14:04:30 +08:00
|
|
|
|
additionalAttachments: [], //其他附件告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
antiInterferenceReport: [], //抗扰度测试报告
|
2024-07-16 15:42:07 +08:00
|
|
|
|
antiInterferenceTest: '0',
|
2024-05-14 09:45:47 +08:00
|
|
|
|
backgroundTestPerformed: 0,
|
|
|
|
|
|
deviceName: '',
|
2024-07-15 20:34:21 +08:00
|
|
|
|
energyQualityIndex: [],
|
2024-05-14 09:45:47 +08:00
|
|
|
|
evaluationChekDept: '',
|
|
|
|
|
|
evaluationType: '',
|
2024-05-14 14:04:30 +08:00
|
|
|
|
feasibilityReport: [], //可研报告告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
id: '',
|
|
|
|
|
|
industry: '',
|
|
|
|
|
|
needGovernance: 0,
|
|
|
|
|
|
pccPoint: '',
|
2024-05-14 19:07:02 +08:00
|
|
|
|
powerQualityReport: [], //背景电能质量测试报告
|
2024-05-14 09:45:47 +08:00
|
|
|
|
powerSupplyCount: 0,
|
2024-05-14 14:04:30 +08:00
|
|
|
|
predictionEvaluationReport: [], //预测评估报告告地址
|
2024-05-14 19:07:02 +08:00
|
|
|
|
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
2024-05-14 14:04:30 +08:00
|
|
|
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
2024-06-13 13:32:50 +08:00
|
|
|
|
sensitiveDevices: [], //主要敏感终端清单
|
2024-05-14 09:45:47 +08:00
|
|
|
|
state: 0,
|
2024-07-16 15:42:07 +08:00
|
|
|
|
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
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
2024-07-16 15:42:07 +08:00
|
|
|
|
|
2024-05-14 09:45:47 +08:00
|
|
|
|
for (let key in val) {
|
|
|
|
|
|
if (subForm.value.userReportSensitivePO && subForm.value.userReportSensitivePO.hasOwnProperty(key)) {
|
|
|
|
|
|
// 对相同的key进行赋值
|
|
|
|
|
|
subForm.value.userReportSensitivePO[key] = val[key]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
delete subForm.value.userReportProjectPO
|
|
|
|
|
|
delete subForm.value.userReportSubstationPO
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2024-05-11 17:09:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2024-05-14 09:45:47 +08:00
|
|
|
|
deep: true
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
2024-05-14 09:45:47 +08:00
|
|
|
|
)
|
2024-12-07 13:55:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
2024-06-13 13:32:50 +08:00
|
|
|
|
const resendId = ref('')
|
2024-07-09 13:20:11 +08:00
|
|
|
|
const status = ref('')
|
2024-06-02 17:55:37 +08:00
|
|
|
|
const open = async (row: any) => {
|
|
|
|
|
|
title.value = row.title
|
2024-05-11 17:09:36 +08:00
|
|
|
|
dialogFormVisible.value = true
|
2024-08-15 20:31:02 +08:00
|
|
|
|
let deptIds = adminInfo.$state.deptId
|
2024-08-21 16:05:06 +08:00
|
|
|
|
addUploadRef.value?.reset()
|
2024-06-02 17:55:37 +08:00
|
|
|
|
if (row.row) {
|
2024-06-13 13:32:50 +08:00
|
|
|
|
resendId.value = row.row.id
|
2024-07-09 13:20:11 +08:00
|
|
|
|
status.value = row.row.status
|
2024-08-19 16:18:57 +08:00
|
|
|
|
|
2024-08-15 20:31:02 +08:00
|
|
|
|
deptIds = row.row.orgId
|
2024-06-27 14:45:58 +08:00
|
|
|
|
if (props.update) {
|
|
|
|
|
|
await getUserReportUpdateById(row.row.id).then(res => {
|
2024-06-27 20:29:44 +08:00
|
|
|
|
handleResponse(res.data.userReportMessageJson)
|
2024-06-27 14:45:58 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
await getById({ id: row.row.id }).then(res => {
|
2024-06-27 20:29:44 +08:00
|
|
|
|
handleResponse(res.data)
|
2024-06-27 14:45:58 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-08-19 16:18:57 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
addUploadRef.value?.queryFiles(row.row.id)
|
|
|
|
|
|
}, 0)
|
2024-06-13 13:32:50 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
resendId.value = ''
|
2024-06-24 14:29:20 +08:00
|
|
|
|
form.value.userType = userTypeList.value[0].value
|
2024-06-02 17:55:37 +08:00
|
|
|
|
}
|
2024-08-15 20:31:02 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
getByDeptDevLine({ id: deptIds }).then(res => {
|
|
|
|
|
|
devIdList.value = res.data
|
|
|
|
|
|
changeDevId(form.value.devId, false)
|
|
|
|
|
|
})
|
|
|
|
|
|
}, 10)
|
2024-06-02 17:55:37 +08:00
|
|
|
|
}
|
2024-12-07 13:55:56 +08:00
|
|
|
|
|
2024-07-16 15:42:07 +08:00
|
|
|
|
async function handleResponse(data: any) {
|
2024-06-27 14:45:58 +08:00
|
|
|
|
// userType logic is commented out; if needed, implement accordingly
|
2024-06-27 20:29:44 +08:00
|
|
|
|
if (data.userReportProjectPO) {
|
|
|
|
|
|
form.value = { ...data, ...data.userReportProjectPO }
|
|
|
|
|
|
fileRaw(data, 'userReportProjectPO')
|
|
|
|
|
|
} else if (data.userReportSubstationPO) {
|
|
|
|
|
|
form.value = { ...data, ...data.userReportSubstationPO }
|
|
|
|
|
|
fileRaw(data, 'userReportSubstationPO')
|
|
|
|
|
|
} else if (data.userReportSensitivePO) {
|
2024-07-15 20:34:21 +08:00
|
|
|
|
form.value = {
|
|
|
|
|
|
...data,
|
|
|
|
|
|
...data.userReportSensitivePO,
|
|
|
|
|
|
energyQualityIndex: data.userReportSensitivePO.energyQualityIndex.split(', ')
|
|
|
|
|
|
}
|
2024-06-27 20:29:44 +08:00
|
|
|
|
fileRaw(data, 'userReportSensitivePO')
|
2024-06-27 14:45:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
form.value.orgId = adminInfo.$state.deptName
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-02 17:55:37 +08:00
|
|
|
|
// 处理上传文件回显
|
|
|
|
|
|
const fileRaw = (row: any, key: string) => {
|
|
|
|
|
|
let list = [
|
|
|
|
|
|
'feasibilityReport',
|
|
|
|
|
|
'preliminaryDesignDescription',
|
|
|
|
|
|
'predictionEvaluationReport',
|
|
|
|
|
|
'predictionEvaluationReviewOpinions',
|
|
|
|
|
|
'additionalAttachments',
|
|
|
|
|
|
'substationMainWiringDiagram',
|
|
|
|
|
|
'sensitiveDevices',
|
|
|
|
|
|
'antiInterferenceReport',
|
|
|
|
|
|
'powerQualityReport'
|
|
|
|
|
|
]
|
|
|
|
|
|
for (let k of list) {
|
2024-06-24 14:29:20 +08:00
|
|
|
|
if (row[key][k] != null) {
|
2024-06-24 16:38:59 +08:00
|
|
|
|
form.value[k] =
|
2024-06-24 14:29:20 +08:00
|
|
|
|
row[key][k].length == 0
|
|
|
|
|
|
? []
|
|
|
|
|
|
: [
|
2024-10-16 17:54:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
name: row[key][k].split('/')[2]
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-06-24 14:29:20 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
form.value[k] = []
|
2024-06-02 17:55:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
feasibilityReport.value = row[key].feasibilityReport
|
|
|
|
|
|
preliminaryDesignDescription.value = row[key].preliminaryDesignDescription
|
|
|
|
|
|
predictionEvaluationReport.value = row[key].predictionEvaluationReport
|
|
|
|
|
|
predictionEvaluationReviewOpinions.value = row[key].predictionEvaluationReviewOpinions
|
|
|
|
|
|
additionalAttachments.value = row[key].additionalAttachments
|
|
|
|
|
|
substationMainWiringDiagram.value = row[key].substationMainWiringDiagram
|
|
|
|
|
|
sensitiveDevices.value = row[key].sensitiveDevices
|
|
|
|
|
|
antiInterferenceReport.value = row[key].antiInterferenceReport
|
2024-07-17 16:15:07 +08:00
|
|
|
|
powerQualityReport.value = row[key].powerQualityReport
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
const close = () => {
|
|
|
|
|
|
//重置表单内容
|
|
|
|
|
|
//取消表单校验状态
|
2024-06-24 14:29:20 +08:00
|
|
|
|
ruleFormRef?.value && ruleFormRef?.value.resetFields()
|
2024-05-11 17:09:36 +08:00
|
|
|
|
dialogFormVisible.value = false
|
2024-05-14 09:45:47 +08:00
|
|
|
|
emits('onSubmit')
|
2024-05-14 11:31:24 +08:00
|
|
|
|
resetForm()
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
2024-12-07 13:55:56 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
})
|
2024-05-14 11:31:24 +08:00
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
// 上传报告
|
|
|
|
|
|
const uploadRef = ref()
|
|
|
|
|
|
const handleExceed: UploadProps['onExceed'] = files => {
|
|
|
|
|
|
uploadRef.value!.clearFiles()
|
|
|
|
|
|
const file = files[0] as UploadRawFile
|
|
|
|
|
|
file.uid = genFileId()
|
|
|
|
|
|
uploadRef.value!.handleStart(file)
|
|
|
|
|
|
}
|
|
|
|
|
|
let uploadName = ref('')
|
2024-05-30 17:35:56 +08:00
|
|
|
|
//上传报告字段名称
|
2024-07-16 15:42:07 +08:00
|
|
|
|
const uploadFileName = (val: any) => {
|
2024-05-11 17:09:36 +08:00
|
|
|
|
uploadName.value = val
|
|
|
|
|
|
}
|
2024-05-30 17:35:56 +08:00
|
|
|
|
//移除文件上传
|
2024-06-02 17:55:37 +08:00
|
|
|
|
const removeFile = (file: any, uploadFiles: any) => {
|
2024-05-30 17:35:56 +08:00
|
|
|
|
console.log(file, uploadFiles)
|
|
|
|
|
|
}
|
2024-05-11 17:09:36 +08:00
|
|
|
|
// 可研报告数组
|
|
|
|
|
|
const feasibilityReport = ref('')
|
|
|
|
|
|
//项目初步设计说明书
|
|
|
|
|
|
const preliminaryDesignDescription = ref('')
|
|
|
|
|
|
//预测评估报告
|
|
|
|
|
|
const predictionEvaluationReport = ref('')
|
|
|
|
|
|
//预测评估评审意见报告:
|
|
|
|
|
|
const predictionEvaluationReviewOpinions = ref('')
|
|
|
|
|
|
//其他附件:
|
|
|
|
|
|
const additionalAttachments = ref('')
|
|
|
|
|
|
//用户接入变电站主接线示意图
|
|
|
|
|
|
const substationMainWiringDiagram = ref('')
|
2024-06-13 13:32:50 +08:00
|
|
|
|
//主要敏感终端清单:
|
2024-05-11 17:09:36 +08:00
|
|
|
|
const sensitiveDevices = ref('')
|
|
|
|
|
|
//抗扰度测试报告:
|
|
|
|
|
|
const antiInterferenceReport = ref('')
|
|
|
|
|
|
//背景电能质量测试报告:
|
|
|
|
|
|
const powerQualityReport = ref('')
|
|
|
|
|
|
const choose = (e: any) => {
|
2024-06-02 17:55:37 +08:00
|
|
|
|
// console.log('🚀 ~ choose ~ e:', e)
|
2024-05-11 17:09:36 +08:00
|
|
|
|
uploadFile(e.raw, '/supervision/').then(res => {
|
|
|
|
|
|
//可研报告
|
|
|
|
|
|
if (uploadName.value == 'feasibilityReport') {
|
|
|
|
|
|
feasibilityReport.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//项目初步设计说明书
|
|
|
|
|
|
else if (uploadName.value == 'preliminaryDesignDescription') {
|
|
|
|
|
|
preliminaryDesignDescription.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//预测评估报告:
|
|
|
|
|
|
else if (uploadName.value == 'predictionEvaluationReport') {
|
|
|
|
|
|
predictionEvaluationReport.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//预测评估评审意见报告:
|
|
|
|
|
|
else if (uploadName.value == 'predictionEvaluationReviewOpinions') {
|
|
|
|
|
|
predictionEvaluationReviewOpinions.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//其他附件:
|
|
|
|
|
|
else if (uploadName.value == 'additionalAttachments') {
|
|
|
|
|
|
additionalAttachments.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//用户接入变电站主接线示意图
|
|
|
|
|
|
else if (uploadName.value == 'substationMainWiringDiagram') {
|
|
|
|
|
|
substationMainWiringDiagram.value = res.data.name
|
|
|
|
|
|
}
|
2024-06-13 13:32:50 +08:00
|
|
|
|
//主要敏感终端清单:
|
2024-05-11 17:09:36 +08:00
|
|
|
|
else if (uploadName.value == 'sensitiveDevices') {
|
|
|
|
|
|
sensitiveDevices.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//抗扰度测试报告:
|
|
|
|
|
|
else if (uploadName.value == 'antiInterferenceReport') {
|
|
|
|
|
|
antiInterferenceReport.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
//背景电能质量测试报告:
|
|
|
|
|
|
else if (uploadName.value == 'powerQualityReport') {
|
|
|
|
|
|
powerQualityReport.value = res.data.name
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-08-15 20:31:02 +08:00
|
|
|
|
// 关联终端
|
|
|
|
|
|
const changeDevId = (e: any, flag?: boolean = true) => {
|
|
|
|
|
|
if (flag) {
|
|
|
|
|
|
form.value.lineId = ''
|
|
|
|
|
|
}
|
2024-05-11 17:09:36 +08:00
|
|
|
|
|
2024-08-15 20:31:02 +08:00
|
|
|
|
lineIdList.value = devIdList.value.filter(item => item.devId == e)[0]?.lineList
|
|
|
|
|
|
}
|
2024-05-11 17:09:36 +08:00
|
|
|
|
//设置工程预期投产日期时间选择范围不能<今天
|
2024-07-16 15:42:07 +08:00
|
|
|
|
const disabledDate = (time: any) => {
|
2024-06-06 11:44:23 +08:00
|
|
|
|
// return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
|
|
|
|
|
return false
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
//提交
|
2024-10-16 17:54:55 +08:00
|
|
|
|
const confirmForm = async (flag: boolean) => {
|
|
|
|
|
|
loading.value = true
|
2024-06-19 10:21:16 +08:00
|
|
|
|
if (flag) {
|
|
|
|
|
|
//整理上传文件的数据
|
|
|
|
|
|
// userType==0,1
|
2024-08-19 16:18:57 +08:00
|
|
|
|
|
2024-06-19 10:21:16 +08:00
|
|
|
|
subForm.value.reporter = adminInfo.$state.id
|
|
|
|
|
|
subForm.value.orgId = adminInfo.$state.deptId
|
|
|
|
|
|
let confirmFormData = JSON.parse(JSON.stringify(subForm.value))
|
|
|
|
|
|
//1.判断是否上传
|
|
|
|
|
|
if (subForm.value.userType == '0' || subForm.value.userType == '1') {
|
|
|
|
|
|
{
|
|
|
|
|
|
//其他报告非必填
|
|
|
|
|
|
confirmFormData.userReportProjectPO = {
|
|
|
|
|
|
...confirmFormData.userReportProjectPO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments?.value //其他附件告地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
2024-05-13 10:18:48 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
subForm.value.userType == '2' ||
|
|
|
|
|
|
subForm.value.userType == '3' ||
|
|
|
|
|
|
subForm.value.userType == '4' ||
|
|
|
|
|
|
subForm.value.userType == '5'
|
|
|
|
|
|
) {
|
|
|
|
|
|
{
|
|
|
|
|
|
confirmFormData.userReportSubstationPO = {
|
|
|
|
|
|
...confirmFormData.userReportSubstationPO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments.value, //其他附件告地址
|
|
|
|
|
|
substationMainWiringDiagram: substationMainWiringDiagram.value //用户接入变电站主接线示意图地址
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
2024-05-13 10:18:48 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
//userType==6
|
|
|
|
|
|
if (subForm.value.userType == '6') {
|
|
|
|
|
|
{
|
|
|
|
|
|
confirmFormData.userReportSensitivePO = {
|
|
|
|
|
|
...confirmFormData.userReportSensitivePO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments.value, //其他附件告地址
|
|
|
|
|
|
substationMainWiringDiagram: substationMainWiringDiagram.value, //用户接入变电站主接线示意图地址
|
|
|
|
|
|
sensitiveDevices: sensitiveDevices.value, //主要敏感终端清单
|
|
|
|
|
|
antiInterferenceReport: antiInterferenceReport.value, //抗扰度测试报告
|
2024-07-15 20:34:21 +08:00
|
|
|
|
powerQualityReport: powerQualityReport.value, //背景电能质量测试报告
|
|
|
|
|
|
energyQualityIndex: confirmFormData.userReportSensitivePO.energyQualityIndex.join(', ')
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
confirmFormData.saveOrCheckflag = '1'
|
2024-06-21 10:15:25 +08:00
|
|
|
|
if (title.value != '用户档案录入') confirmFormData.id = resendId.value
|
2024-06-24 14:29:20 +08:00
|
|
|
|
if (!control.value) confirmFormData.dataType = 1
|
2024-09-12 11:23:41 +08:00
|
|
|
|
if (controFlag.value) confirmFormData.dataType = 1
|
2024-06-27 14:45:58 +08:00
|
|
|
|
if (props.normalizedControl) {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await addEditor(confirmFormData).then(res => {
|
2024-06-27 14:45:58 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '保存成功!',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
ruleFormRef.value.resetFields()
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm(res.data)
|
2024-06-27 14:45:58 +08:00
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-06-27 14:45:58 +08:00
|
|
|
|
} else {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await submitFormData(confirmFormData).then(res => {
|
2024-06-27 14:45:58 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '保存成功!',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
ruleFormRef.value.resetFields()
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm(res.data)
|
2024-06-27 14:45:58 +08:00
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-06-27 14:45:58 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
} else {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await ruleFormRef.value.validate(async (valid: any) => {
|
2024-06-19 10:21:16 +08:00
|
|
|
|
if (valid) {
|
|
|
|
|
|
//整理上传文件的数据
|
|
|
|
|
|
// userType==0,1
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm()
|
2024-06-19 10:21:16 +08:00
|
|
|
|
subForm.value.reporter = adminInfo.$state.id
|
|
|
|
|
|
subForm.value.orgId = adminInfo.$state.deptId
|
|
|
|
|
|
let confirmFormData = JSON.parse(JSON.stringify(subForm.value))
|
|
|
|
|
|
//1.判断是否上传
|
|
|
|
|
|
if (subForm.value.userType == '0' || subForm.value.userType == '1') {
|
|
|
|
|
|
if (!predictionEvaluationReport.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!predictionEvaluationReviewOpinions.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估评审意见报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//其他报告非必填
|
|
|
|
|
|
confirmFormData.userReportProjectPO = {
|
|
|
|
|
|
...confirmFormData.userReportProjectPO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments?.value //其他附件告地址
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
//userType==2,3,4,5
|
|
|
|
|
|
if (
|
|
|
|
|
|
subForm.value.userType == '2' ||
|
|
|
|
|
|
subForm.value.userType == '3' ||
|
|
|
|
|
|
subForm.value.userType == '4' ||
|
|
|
|
|
|
subForm.value.userType == '5'
|
|
|
|
|
|
) {
|
|
|
|
|
|
if (!predictionEvaluationReport.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!predictionEvaluationReviewOpinions.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估评审意见报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!substationMainWiringDiagram.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传用户接入变电站主接线示意图',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
//其他附件非必填
|
|
|
|
|
|
else {
|
|
|
|
|
|
confirmFormData.userReportSubstationPO = {
|
|
|
|
|
|
...confirmFormData.userReportSubstationPO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments.value, //其他附件告地址
|
|
|
|
|
|
substationMainWiringDiagram: substationMainWiringDiagram.value //用户接入变电站主接线示意图地址
|
|
|
|
|
|
}
|
2024-05-14 09:45:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
//userType==6
|
|
|
|
|
|
if (subForm.value.userType == '6') {
|
|
|
|
|
|
if (!predictionEvaluationReport.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估报告',
|
|
|
|
|
|
type: 'warning'
|
2024-06-02 17:55:37 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
if (!predictionEvaluationReviewOpinions.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传预测评估评审意见报告',
|
|
|
|
|
|
type: 'warning'
|
2024-06-03 18:00:32 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
if (!substationMainWiringDiagram.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传用户接入变电站主接线示意图',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!sensitiveDevices.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传主要敏感终端清单',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!antiInterferenceReport.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传抗扰度测试报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!powerQualityReport.value) {
|
|
|
|
|
|
return ElMessage({
|
|
|
|
|
|
message: '请上传背景电能质量测试报告',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
//其他附件非必填
|
|
|
|
|
|
else {
|
|
|
|
|
|
confirmFormData.userReportSensitivePO = {
|
|
|
|
|
|
...confirmFormData.userReportSensitivePO,
|
|
|
|
|
|
feasibilityReport: feasibilityReport.value, //可研报告
|
|
|
|
|
|
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
|
|
|
|
|
|
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
|
|
|
|
|
|
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
|
|
|
|
|
|
additionalAttachments: additionalAttachments.value, //其他附件告地址
|
|
|
|
|
|
substationMainWiringDiagram: substationMainWiringDiagram.value, //用户接入变电站主接线示意图地址
|
|
|
|
|
|
sensitiveDevices: sensitiveDevices.value, //主要敏感终端清单
|
|
|
|
|
|
antiInterferenceReport: antiInterferenceReport.value, //抗扰度测试报告
|
2024-07-15 20:34:21 +08:00
|
|
|
|
powerQualityReport: powerQualityReport.value, //背景电能质量测试报告
|
|
|
|
|
|
energyQualityIndex: confirmFormData.userReportSensitivePO.energyQualityIndex.join(', ')
|
2024-06-19 10:21:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
confirmFormData.saveOrCheckflag = '2'
|
2024-09-12 11:23:41 +08:00
|
|
|
|
if (controFlag.value) confirmFormData.dataType = 1
|
2024-06-19 10:21:16 +08:00
|
|
|
|
if (title.value == '用户档案录入') {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await submitFormData(confirmFormData).then(res => {
|
2024-06-21 10:15:25 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '新增成功',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
ruleFormRef.value.resetFields()
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm(res.data)
|
2024-06-21 10:15:25 +08:00
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-06-19 10:21:16 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
confirmFormData.id = resendId.value
|
2024-09-12 11:23:41 +08:00
|
|
|
|
if (controFlag.value) confirmFormData.dataType = 1
|
2024-12-07 13:55:56 +08:00
|
|
|
|
|
2024-06-27 20:29:44 +08:00
|
|
|
|
if (props.normalizedControl) {
|
2024-07-01 10:58:32 +08:00
|
|
|
|
if (title.value == '编辑') {
|
2024-07-09 13:20:11 +08:00
|
|
|
|
if (status.value != '') confirmFormData.status = status.value
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await addEditor(confirmFormData).then(res => {
|
2024-07-01 10:58:32 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '发起成功',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
ruleFormRef.value.resetFields()
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm(res.data)
|
2024-07-01 10:58:32 +08:00
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-07-01 10:58:32 +08:00
|
|
|
|
} else {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await resend(confirmFormData).then(res => {
|
2024-07-01 10:58:32 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '重新发起成功',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
ruleFormRef.value.resetFields()
|
|
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-07-01 10:58:32 +08:00
|
|
|
|
}
|
2024-06-27 20:29:44 +08:00
|
|
|
|
} else {
|
2024-12-07 13:55:56 +08:00
|
|
|
|
await updateFormData(confirmFormData).then(res => {
|
2024-06-27 20:29:44 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: '重新发起成功',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
2024-08-19 16:18:57 +08:00
|
|
|
|
addUploadRef.value?.submitForm(res.data)
|
2024-06-27 20:29:44 +08:00
|
|
|
|
ruleFormRef.value.resetFields()
|
|
|
|
|
|
resetForm()
|
|
|
|
|
|
close()
|
2024-12-07 13:55:56 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
})
|
2024-06-27 20:29:44 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
console.log('表单验证失败')
|
|
|
|
|
|
return false
|
2024-06-02 17:55:37 +08:00
|
|
|
|
}
|
2024-06-19 10:21:16 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-10-16 17:54:55 +08:00
|
|
|
|
await setTimeout(() => {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
}, 0)
|
2024-05-11 17:09:36 +08:00
|
|
|
|
}
|
2024-06-24 14:29:20 +08:00
|
|
|
|
|
|
|
|
|
|
// 过滤用户
|
|
|
|
|
|
const filterUsers = (arr: any) => {
|
2024-09-12 11:23:41 +08:00
|
|
|
|
controFlag.value = true
|
2024-06-24 16:38:59 +08:00
|
|
|
|
userStateList.value.map(item => (item.disabled = false))
|
2024-06-24 14:29:20 +08:00
|
|
|
|
userTypeList.value = userTypeList.value.filter(item => !arr.includes(item.value))
|
|
|
|
|
|
}
|
2024-09-12 11:23:41 +08:00
|
|
|
|
const setcontroFlag = () => {
|
|
|
|
|
|
console.log(12333)
|
2024-09-14 10:56:49 +08:00
|
|
|
|
|
2024-09-12 11:23:41 +08:00
|
|
|
|
controFlag.value = true
|
|
|
|
|
|
}
|
2024-09-14 10:56:49 +08:00
|
|
|
|
defineExpose({ open, filterUsers, setcontroFlag })
|
2024-05-11 17:09:36 +08:00
|
|
|
|
</script>
|
2024-12-07 13:55:56 +08:00
|
|
|
|
<style lang='scss' scoped>
|
2025-01-02 15:51:14 +08:00
|
|
|
|
.el-form {}
|
2024-05-15 21:33:54 +08:00
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
.form-label-left-align {
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
2024-10-16 17:54:55 +08:00
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
::v-deep .el-input__wrapper {
|
|
|
|
|
|
// border: 2px solid red;
|
|
|
|
|
|
}
|
2024-10-16 17:54:55 +08:00
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
::v-deep .el-input-number .el-input__inner {
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
2024-10-16 17:54:55 +08:00
|
|
|
|
|
2024-05-11 17:09:36 +08:00
|
|
|
|
::v-deep .el-tree__empty-text {
|
|
|
|
|
|
width: 200px !important;
|
|
|
|
|
|
margin-left: 150px !important;
|
|
|
|
|
|
top: 20% !important;
|
|
|
|
|
|
left: 50% !important;
|
|
|
|
|
|
}
|
2024-05-24 13:31:08 +08:00
|
|
|
|
|
2024-05-14 19:07:02 +08:00
|
|
|
|
:deep(.el-upload-list__item-file-name) {
|
|
|
|
|
|
width: 250px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
2024-05-11 17:09:36 +08:00
|
|
|
|
</style>
|