1686 lines
66 KiB
Vue
1686 lines
66 KiB
Vue
<template>
|
||
<el-dialog
|
||
v-model="dialogFormVisible"
|
||
title="用户档案录入"
|
||
width="55%"
|
||
height="400"
|
||
:append-to-body="true"
|
||
:scroll-to-error="true"
|
||
:before-close="close"
|
||
:close-on-click-modal="false"
|
||
draggable
|
||
>
|
||
<!-- 用户档案录入 新建1 -->
|
||
<el-form :model="form" class=“form-two” :validate-on-rule-change="false" :rules="rules" ref="ruleFormRef">
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="填报人:" :label-width="formLabelWidth" prop="reporter">
|
||
<el-input
|
||
v-model="form.reporter"
|
||
autocomplete="off"
|
||
:disabled="true"
|
||
place-holder="请输入填报人"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="填报日期:" :label-width="formLabelWidth" prop="reportDate">
|
||
<el-date-picker
|
||
:disabled="true"
|
||
style="width: 100%"
|
||
v-model="form.reportDate"
|
||
type="date"
|
||
placeholder="请选择填报日期"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="填报部门:" :label-width="formLabelWidth" prop="orgId">
|
||
<el-input v-model="form.orgId" :disabled="true" autocomplete="off" />
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="工程预期投产日期:"
|
||
:label-width="formLabelWidth"
|
||
prop="expectedProductionDate"
|
||
class="label_over_warp"
|
||
>
|
||
<el-date-picker
|
||
style="width: 100%"
|
||
v-model="form.expectedProductionDate"
|
||
type="date"
|
||
format="YYYY-MM-DD"
|
||
value-format="YYYY-MM-DD"
|
||
:disabled-date="disabledDate"
|
||
placeholder="请选择工程预期投产日期"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="用户性质:" :label-width="formLabelWidth" prop="userType">
|
||
<el-select v-model="form.userType" placeholder="请选择用户性质" @change="changeUserType()">
|
||
<el-option
|
||
v-for="(item, index) in userTypeList"
|
||
:label="item.label"
|
||
:value="item.value"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="所属地市:" :label-width="formLabelWidth" prop="city">
|
||
<el-select
|
||
v-model="form.city"
|
||
clearable
|
||
placeholder="请选择所属地市"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="item in areaOptionList"
|
||
:key="item.id"
|
||
:label="item.name"
|
||
:value="item.name"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="归口管理部门:" :label-width="formLabelWidth" prop="responsibleDepartment">
|
||
<el-input
|
||
v-model="form.responsibleDepartment"
|
||
autocomplete="off"
|
||
placeholder="请输入归口管理部门"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="工程名称:" :label-width="formLabelWidth" prop="projectName">
|
||
<el-input
|
||
v-model="form.projectName"
|
||
autocomplete="off"
|
||
placeholder="请输入工程名称"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="用户状态:" :label-width="formLabelWidth" prop="userStatus">
|
||
<el-select
|
||
v-model="form.userStatus"
|
||
placeholder="请选择用户状态"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in userStateList"
|
||
:label="item.label"
|
||
:value="item.value"
|
||
:disabled="item.label != '可研'"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="变电站:" :label-width="formLabelWidth" prop="substation">
|
||
<el-input
|
||
v-model="form.substation"
|
||
autocomplete="off"
|
||
placeholder="请输入变电站"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row v-if="form.userType == '0' || form.userType == '1'">
|
||
<el-col :span="12">
|
||
<el-form-item label="用户协议容量:" :label-width="formLabelWidth" prop="agreementCapacity">
|
||
<el-input
|
||
v-model="form.agreementCapacity"
|
||
autocomplete="off"
|
||
placeholder="请输入用户协议容量"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="非线性设备类型:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="nonlinearDeviceType"
|
||
>
|
||
<el-tree-select
|
||
accordion
|
||
ref="treeRef"
|
||
:default-expand-all="false"
|
||
show-checkbox
|
||
check-strictly
|
||
:highlight-current="true"
|
||
readonly
|
||
node-key="id"
|
||
:props="defaultProps"
|
||
v-model="form.nonlinearDeviceType"
|
||
:data="nonlinearDeviceTypeList"
|
||
:render-after-expand="false"
|
||
style="width: 240px"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="电压等级:" :label-width="formLabelWidth" prop="voltageLevel">
|
||
<el-select
|
||
v-model="form.voltageLevel"
|
||
placeholder="请选择电压等级"
|
||
node-key="id"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in voltageLevelList"
|
||
:label="item.name"
|
||
:value="item.id"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="预测评估单位:" :label-width="formLabelWidth" prop="evaluationDept">
|
||
<el-select
|
||
v-model="form.evaluationDept"
|
||
placeholder="请选择预测评估单位"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in evaluationDeptList"
|
||
:label="item.name"
|
||
:value="item.name"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="是否需要治理:" :label-width="formLabelWidth" prop="needGovernance">
|
||
<el-radio-group v-model="form.needGovernance" :disabled="openType == 'detail'">
|
||
<el-radio :value="1">是</el-radio>
|
||
<el-radio :value="0">否</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="是否开展背景测试:"
|
||
:label-width="formLabelWidth"
|
||
prop="backgroundTestPerformed"
|
||
class="label_over_warp"
|
||
>
|
||
<el-radio-group v-model="form.backgroundTestPerformed" :disabled="openType == 'detail'">
|
||
<el-radio :value="1">是</el-radio>
|
||
<el-radio :value="0">否</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-row v-if="form.userType != '0' && form.userType != '1'">
|
||
<el-col :span="12">
|
||
<el-form-item label="评估类型:" :label-width="formLabelWidth" prop="evaluationType">
|
||
<el-select
|
||
v-model="form.evaluationType"
|
||
placeholder="请选择评估类型"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in evaluationTypeList"
|
||
:key="indedx"
|
||
:label="item.name"
|
||
:value="item.id"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="PCC点:" :label-width="formLabelWidth" prop="pccPoint">
|
||
<el-input
|
||
v-model="form.pccPoint"
|
||
autocomplete="off"
|
||
placeholder="请输入PCC点"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'">
|
||
<el-col :span="12">
|
||
<el-form-item label="基准短路容量:" :label-width="formLabelWidth" prop="baseShortCircuitCapacity">
|
||
<el-input
|
||
v-model="form.baseShortCircuitCapacity"
|
||
placeholder="请输入基准短路容量"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<template #append>MVA</template>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="系统最小短路容量:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="minShortCircuitCapacity"
|
||
>
|
||
<el-input
|
||
v-model="form.minShortCircuitCapacity"
|
||
autocomplete="off"
|
||
placeholder="请选择系统最小短路容量"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<template #append>MVA</template>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="PCC供电设备容量:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="pccEquipmentCapacity"
|
||
>
|
||
<el-input
|
||
v-model="form.pccEquipmentCapacity"
|
||
placeholder="请输入PCC供电设备容量"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<template #append>MVA</template>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="用户用电协议容量:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="userAgreementCapacity"
|
||
>
|
||
<el-input
|
||
v-model="form.userAgreementCapacity"
|
||
autocomplete="off"
|
||
:disabled="openType == 'detail'"
|
||
place-holder="请输入用户用电协议容量"
|
||
>
|
||
<template #append>MVA</template>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-row v-if="form.userType == '6'">
|
||
<el-col :span="12">
|
||
<el-form-item label="行业:" :label-width="formLabelWidth" prop="industry">
|
||
<el-select v-model="form.industry" placeholder="请选择行业" :disabled="openType == 'detail'">
|
||
<el-option
|
||
v-for="(item, index) in industryList"
|
||
:label="item.name"
|
||
:value="item.id"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="敏感装置名称:" prop="deviceName" :label-width="formLabelWidth">
|
||
<el-input
|
||
v-model="form.deviceName"
|
||
autocomplete="off"
|
||
placeholder="请输入敏感装置名称"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row v-if="form.userType == '6'">
|
||
<el-col :span="12">
|
||
<el-form-item label="供电电源数量:" prop="powerSupplyCount" :label-width="formLabelWidth">
|
||
<el-input-number
|
||
style="width: 100%"
|
||
v-model="form.powerSupplyCount"
|
||
:min="0"
|
||
placeholder="请输入供电电源数量"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="敏感电能质量指标:"
|
||
prop="energyQualityIndex"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-select
|
||
v-model="form.energyQualityIndex"
|
||
placeholder="请选择敏感电能质量指标"
|
||
:disabled="openType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in energyQualityIndexList"
|
||
:label="item.name"
|
||
:value="item.id"
|
||
:key="index"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col
|
||
:span="12"
|
||
v-if="form.userType == '2' || form.userType == '3' || form.userType == '4' || form.userType == '5'"
|
||
>
|
||
<el-form-item
|
||
label="非线性负荷类型:"
|
||
prop="nonlinearLoadType"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-tree-select
|
||
accordion
|
||
ref="treeRef"
|
||
:default-expand-all="false"
|
||
show-checkbox
|
||
check-strictly
|
||
:highlight-current="true"
|
||
readonly
|
||
node-key="id"
|
||
:props="defaultProps"
|
||
v-model="form.nonlinearLoadType"
|
||
:data="nonlinearDeviceTypeList"
|
||
:render-after-expand="false"
|
||
style="width: 240px"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" v-if="form.userType == '6'">
|
||
<el-form-item
|
||
label="是否开展抗扰度测试:"
|
||
prop="antiInterferenceTest"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-radio-group v-model="form.antiInterferenceTest" :disabled="openType == 'detail'">
|
||
<el-radio :value="1">是</el-radio>
|
||
<el-radio :value="0">否</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" v-if="form.userType != '0' && form.userType != '1'">
|
||
<el-form-item
|
||
label="预测评估评审单位:"
|
||
prop="evaluationChekDept"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-input
|
||
v-model="form.evaluationChekDept"
|
||
autocomplete="off"
|
||
placeholder="请输入预测评估评审单位"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12">
|
||
<el-form-item label="预测评估结论:" prop="evaluationConclusion" :label-width="formLabelWidth">
|
||
<el-input
|
||
v-model="form.evaluationConclusion"
|
||
autocomplete="off"
|
||
placeholder="请输入预测评估结论"
|
||
:disabled="openType == 'detail'"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item label="可研报告:" prop="feasibilityReport" :label-width="formLabelWidth">
|
||
<el-upload
|
||
v-model:file-list="form.feasibilityReport"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('feasibilityReport')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="项目初步设计说明书:"
|
||
prop="preliminaryDesignDescription"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.preliminaryDesignDescription"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('preliminaryDesignDescription')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="预测评估报告:"
|
||
prop="predictionEvaluationReport"
|
||
:label-width="formLabelWidth"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.predictionEvaluationReport"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('predictionEvaluationReport')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="预测评估评审意见报告:"
|
||
prop="predictionEvaluationReviewOpinions"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.predictionEvaluationReviewOpinions"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('predictionEvaluationReviewOpinions')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon" style="color: #fff">*</span>
|
||
<el-form-item label="其他附件:" prop="additionalAttachments" :label-width="formLabelWidth">
|
||
<el-upload
|
||
v-model:file-list="form.additionalAttachments"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('additionalAttachments')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="12" class="required_position" v-if="form.userType != '0' && form.userType != '1'">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="用户接入变电站主接线示意图:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="substationMainWiringDiagram"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.substationMainWiringDiagram"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('substationMainWiringDiagram')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" class="required_position" v-if="form.userType == '6'">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="主要敏感设备清单:"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
prop="sensitiveDevices"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.sensitiveDevices"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('sensitiveDevices')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row v-if="form.userType == '6'" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="抗扰度测试报告:"
|
||
prop="antiInterferenceReport"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.antiInterferenceReport"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('antiInterferenceReport')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12" class="required_position">
|
||
<span class="required_icon">*</span>
|
||
<el-form-item
|
||
label="背景电能质量测试报告:"
|
||
prop="powerQualityReport"
|
||
:label-width="formLabelWidth"
|
||
class="label_over_warp"
|
||
>
|
||
<el-upload
|
||
v-model:file-list="form.powerQualityReport"
|
||
ref="uploadRef"
|
||
action=""
|
||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||
:limit="1"
|
||
:on-exceed="handleExceed"
|
||
:on-change="choose"
|
||
:auto-upload="false"
|
||
:on-progress="uploadFileName('powerQualityReport')"
|
||
>
|
||
<template #trigger>
|
||
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||
</template>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</el-form>
|
||
<template #footer>
|
||
<div class="dialog-footer">
|
||
<el-button @click="close()">取消</el-button>
|
||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
||
</div>
|
||
</template>
|
||
</el-dialog>
|
||
</template>
|
||
<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 { genFileId, ElMessage } from 'element-plus'
|
||
import { useDictData } from '@/stores/dictData'
|
||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||
import moment from 'moment'
|
||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||
import { useAdminInfo } from '@/stores/adminInfo'
|
||
import { uploadFile } from '@/api/system-boot/file'
|
||
import { submitFormData } from '@/api/supervise/interfere/index'
|
||
defineProps({
|
||
openType: {
|
||
type: String,
|
||
default: 'create'
|
||
}
|
||
})
|
||
const emits = defineEmits(['onSubmit'])
|
||
const dictData = useDictData()
|
||
const dialogFormVisible = ref(false)
|
||
const formLabelWidth = '120px'
|
||
const form:any = ref({})
|
||
const ruleFormRef = ref(null)
|
||
//字典获取所属地市
|
||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||
//字典获取敏感电能质量指标
|
||
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||
//字典获取行业类型
|
||
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')
|
||
|
||
//用户性质数组
|
||
const userTypeList = reactive([
|
||
{
|
||
label: '新建电网工程',
|
||
value: '0'
|
||
},
|
||
{
|
||
label: '扩建电网工程',
|
||
value: '1'
|
||
},
|
||
{
|
||
label: '新建非线性负荷用户',
|
||
value: '2'
|
||
},
|
||
{
|
||
label: '扩建非线性负荷用户',
|
||
value: '3'
|
||
},
|
||
{
|
||
label: '新建新能源发电站',
|
||
value: '4'
|
||
},
|
||
{
|
||
label: '扩建新能源发电站',
|
||
value: '5'
|
||
},
|
||
{
|
||
label: '敏感及重要用户',
|
||
value: '6'
|
||
}
|
||
])
|
||
//用户状态数组
|
||
const userStateList = reactive([
|
||
{
|
||
label: '可研',
|
||
value: '0'
|
||
},
|
||
{
|
||
label: '建设',
|
||
value: '1'
|
||
},
|
||
{
|
||
label: '运行',
|
||
value: '2'
|
||
},
|
||
{
|
||
label: '退运',
|
||
value: '3'
|
||
}
|
||
])
|
||
//获取非线性设备类型树形下拉
|
||
const defaultProps = {
|
||
children: 'children',
|
||
label: 'name',
|
||
key: 'id'
|
||
}
|
||
const nonlinearDeviceTypeList = ref('')
|
||
//获取登陆用户姓名和部门
|
||
const adminInfo = useAdminInfo()
|
||
const resetForm = () => {
|
||
form.value = {
|
||
reporter: '', //填报人 1
|
||
reportDate: new Date(), //填报日期 1
|
||
orgId: '', //填报部门 1
|
||
expectedProductionDate: '', //工程预期投产日期 1
|
||
userType: '0', //用户性质 1
|
||
city: areaOptionList[0].name, //所属地市 1
|
||
responsibleDepartment: '', //归口管理部门 1
|
||
userStatus: userStateList[0].value, //用户状态 1
|
||
projectName: '', //工程名称 1
|
||
substation: '', //变电站 1
|
||
voltageLevel: voltageLevelList[0].id, //电压等级 1
|
||
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
||
evaluationConclusion: '', //预测评估结论 1
|
||
backgroundTestPerformed: 0, //是否开展背景测试 1
|
||
feasibilityReport: [], // 可研报告告地址 1
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址 1
|
||
predictionEvaluationReport: [], //预测评估报告地址 1
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址 1
|
||
additionalAttachments: [], //其他附件告地址 1
|
||
state: '', //数据状态
|
||
pccPoint: '', //PCC点 1
|
||
evaluationType: evaluationTypeList[0].id, //评估类型 1
|
||
evaluationChekDept: '', //预测评估审单位 1
|
||
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址 1
|
||
powerQualityReport: [], //背景电能质量测试报告 1
|
||
minShortCircuitCapacity: '', //系统最小短路容量(MVA) 1
|
||
userAgreementCapacity: '', //用户用电协议容量(MVA) 1
|
||
needGovernance: 0, //是否需要治理 1
|
||
agreementCapacity: '', //用户协议容量 1
|
||
nonlinearDeviceType: '', //非线性设备类型 1
|
||
nonlinearLoadType: '', //非线性负荷类型 1
|
||
pccEquipmentCapacity: '', // PCC供电设备容量(MVA) 1
|
||
baseShortCircuitCapacity: '', //基准短路容量(MVA)1
|
||
industry: industryList[0].id, //行业 1
|
||
deviceName: '', //敏感装置名称 1
|
||
powerSupplyCount: 0, //供电电源数量 1
|
||
energyQualityIndex: energyQualityIndexList[0].id, //敏感电能质量指标 1
|
||
antiInterferenceTest: 0, //是否开展抗扰度测试 1
|
||
sensitiveDevices: [], //主要敏感设备清单 1
|
||
antiInterferenceReport: [] //抗扰度测试报告 1
|
||
}
|
||
|
||
form.value.reporter = adminInfo.$state.name
|
||
form.value.orgId = adminInfo.$state.deptName
|
||
}
|
||
//初始化数据
|
||
resetForm()
|
||
//获取树形图数据
|
||
const getTreeList = () => {
|
||
queryByAllCode().then(res => {
|
||
nonlinearDeviceTypeList.value = [res.data.find(item => item.code == 'Major_Nonlinear_Device')]
|
||
nonlinearDeviceTypeList.value.map(item => {
|
||
//tree禁用根节点
|
||
item.disabled = 'disabled'
|
||
item.children.map(vv => {
|
||
//tree禁用二级节点
|
||
vv.disabled = 'disabled'
|
||
vv.children.map(kk => {
|
||
//tree禁用三级节点
|
||
kk.disabled = 'disabled'
|
||
kk.children.map(ss => {})
|
||
})
|
||
})
|
||
})
|
||
})
|
||
}
|
||
getTreeList()
|
||
const treeRef = ref()
|
||
//选中树形节点变化事件
|
||
const handleCheckChange = data => {
|
||
const checkedNodes = treeRef.value.getCheckedKeys()
|
||
if (checkedNodes.length > 1) {
|
||
checkedNodes.map((item, index) => {
|
||
if (index == checkedNodes.length - 1) {
|
||
treeRef.value.setChecked(checkedNodes[index], true)
|
||
} else {
|
||
treeRef.value.setChecked(checkedNodes[index], false)
|
||
}
|
||
})
|
||
form.value.nonlinearDeviceType = checkedNodes[checkedNodes.length - 1]
|
||
} else if (checkedNodes.length == 1) {
|
||
form.value.nonlinearDeviceType = checkedNodes[0]
|
||
}
|
||
}
|
||
const subForm = ref({
|
||
city: '', //所属地市
|
||
evaluationConclusion: '', //预测评估结论
|
||
evaluationDept: '', //预测评估单位
|
||
expectedProductionDate: '', //工程预期投产日期
|
||
orgId: '', //填报部门
|
||
projectName: '',
|
||
reporter: '', //填报人
|
||
reportDate: new Date(), //填报日期
|
||
responsibleDepartment: '', //归口管理部门
|
||
substation: '', ////变电站
|
||
userStatus: '0', //用户状态
|
||
userType: '0', //用户性质
|
||
voltageLevel: '',
|
||
//userType=='0' '1'
|
||
userReportProjectPO: {
|
||
additionalAttachments: [], //其他附件告地址
|
||
agreementCapacity: 0,
|
||
backgroundTestPerformed: 0,
|
||
feasibilityReport: [], //可研报告
|
||
id: '',
|
||
needGovernance: 0,
|
||
nonlinearDeviceType: '',
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
state: 0
|
||
},
|
||
//userType=='2,3,4,5'
|
||
userReportSubstationPO: {
|
||
additionalAttachments: [], //其他附件告地址
|
||
backgroundTestPerformed: 0,
|
||
baseShortCircuitCapacity: 0,
|
||
evaluationChekDept: '',
|
||
evaluationType: '',
|
||
feasibilityReport: [], //可研报告
|
||
id: '',
|
||
minShortCircuitCapacity: 0,
|
||
needGovernance: 0,
|
||
nonlinearLoadType: '',
|
||
pccEquipmentCapacity: 0,
|
||
pccPoint: '',
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
state: 0,
|
||
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址
|
||
userAgreementCapacity: 0
|
||
},
|
||
//userType=='6'
|
||
userReportSensitivePO: {
|
||
additionalAttachments: [], //其他附件告地址
|
||
antiInterferenceReport: [], //抗扰度测试报告
|
||
antiInterferenceTest: '',
|
||
backgroundTestPerformed: 0,
|
||
deviceName: '',
|
||
energyQualityIndex: '',
|
||
evaluationChekDept: '',
|
||
evaluationType: '',
|
||
feasibilityReport: [], //可研报告告地址
|
||
id: '',
|
||
industry: '',
|
||
needGovernance: 0,
|
||
pccPoint: '',
|
||
powerQualityReport: [], //背景电能质量测试报告
|
||
powerSupplyCount: 0,
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
sensitiveDevices: [], //主要敏感设备清单
|
||
state: 0,
|
||
substationMainWiringDiagram: [] //用户接入变电站主接线示意图地址
|
||
}
|
||
})
|
||
|
||
//定义校验规则
|
||
const rules = ref({
|
||
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'
|
||
}
|
||
],
|
||
city: [
|
||
{
|
||
required: true,
|
||
message: '请选择所属地市',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
responsibleDepartment: [
|
||
{
|
||
required: true,
|
||
message: '请输入归口管理部门',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
userStatus: [
|
||
{
|
||
required: true,
|
||
message: '请选择用户状态',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
projectName: [
|
||
{
|
||
required: true,
|
||
message: '请输入工程名称',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
substation: [
|
||
{
|
||
required: true,
|
||
message: '请输入变电站',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
voltageLevel: [
|
||
{
|
||
required: true,
|
||
message: '请选择电压等级',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
evaluationDept: [
|
||
{
|
||
required: true,
|
||
message: '请选择预测评估单位',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
evaluationConclusion: [
|
||
{
|
||
required: true,
|
||
message: '请输入预测评估结论',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
agreementCapacity: [
|
||
{
|
||
required: true,
|
||
message: '请选择用户协议容量',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
nonlinearDeviceType: [
|
||
{
|
||
required: true,
|
||
message: '请选择非线性设备类型',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
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'
|
||
}
|
||
],
|
||
deviceName: [
|
||
{
|
||
required: true,
|
||
message: '请输入敏感装置名称',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
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'
|
||
}
|
||
],
|
||
pccEquipmentCapacity: [
|
||
{
|
||
required: true,
|
||
message: '请输入PCC供电设备容量',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
userAgreementCapacity: [
|
||
{
|
||
required: true,
|
||
message: '请输入用户用电协议容量',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
nonlinearLoadType: [
|
||
{
|
||
required: true,
|
||
message: '请输入非线性负荷类型',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
substationMainWiringDiagram: [
|
||
{
|
||
required: false,
|
||
message: '请上传用户接入变电站主接线示意图',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
sensitiveDevices: [
|
||
{
|
||
required: false,
|
||
message: '请上传主要敏感设备清单',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
antiInterferenceReport: [
|
||
{
|
||
required: false,
|
||
message: '请上传抗扰度测试报告',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
powerQualityReport: [
|
||
{
|
||
required: false,
|
||
message: '请上传背景电能质量测试报告',
|
||
trigger: 'change'
|
||
}
|
||
],
|
||
|
||
//先取消必填,提交时候校验
|
||
feasibilityReport: [
|
||
{
|
||
required: false,
|
||
message: '请上传可研报告',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
preliminaryDesignDescription: [
|
||
{
|
||
required: false,
|
||
message: '请上传项目初步设计说明书',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
predictionEvaluationReport: [
|
||
{
|
||
required: false,
|
||
message: '请上传预测评估报告',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
predictionEvaluationReviewOpinions: [
|
||
{
|
||
required: false,
|
||
message: '请上传预测评估评审意见报告',
|
||
trigger: 'blur'
|
||
}
|
||
],
|
||
//先取消必填,提交时候校验
|
||
additionalAttachments: [
|
||
{
|
||
required: false,
|
||
message: '请上传其他附件',
|
||
trigger: 'blur'
|
||
}
|
||
]
|
||
})
|
||
watch(
|
||
() => form.value,
|
||
(val, oldVal) => {
|
||
for (let key in val) {
|
||
if (subForm.value.hasOwnProperty(key)) {
|
||
subForm.value[key] = val[key] // 对相同的key进行赋值
|
||
}
|
||
}
|
||
//处理填报日期时间格式
|
||
subForm.value.reportDate = moment(form.value.reportDate).format('YYYY-MM-DD')
|
||
//userType==0,1
|
||
if (val.userType == '0' || val.userType == '1') {
|
||
subForm.value.userReportProjectPO = {
|
||
additionalAttachments: [], //其他附件告地址
|
||
agreementCapacity: 0,
|
||
backgroundTestPerformed: 0,
|
||
feasibilityReport: [], //可研报告
|
||
id: '',
|
||
needGovernance: 0,
|
||
nonlinearDeviceType: '',
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
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 = {
|
||
additionalAttachments: [], //其他附件告地址
|
||
backgroundTestPerformed: 0,
|
||
baseShortCircuitCapacity: 0,
|
||
evaluationChekDept: '',
|
||
evaluationType: '',
|
||
feasibilityReport: [], //可研报告
|
||
id: '',
|
||
minShortCircuitCapacity: 0,
|
||
needGovernance: 0,
|
||
nonlinearLoadType: '',
|
||
pccEquipmentCapacity: 0,
|
||
pccPoint: '',
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
state: 0,
|
||
substationMainWiringDiagram: [], //用户接入变电站主接线示意图地址
|
||
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 = {
|
||
additionalAttachments: [], //其他附件告地址
|
||
antiInterferenceReport: [], //抗扰度测试报告
|
||
antiInterferenceTest: '',
|
||
backgroundTestPerformed: 0,
|
||
deviceName: '',
|
||
energyQualityIndex: '',
|
||
evaluationChekDept: '',
|
||
evaluationType: '',
|
||
feasibilityReport: [], //可研报告告地址
|
||
id: '',
|
||
industry: '',
|
||
needGovernance: 0,
|
||
pccPoint: '',
|
||
powerQualityReport: [], //背景电能质量测试报告
|
||
powerSupplyCount: 0,
|
||
predictionEvaluationReport: [], //预测评估报告告地址
|
||
predictionEvaluationReviewOpinions: [], //预测评估评审意见报告地址
|
||
preliminaryDesignDescription: [], //项目初步设计说明书告地址
|
||
sensitiveDevices: [], //主要敏感设备清单
|
||
state: 0,
|
||
substationMainWiringDiagram: [] //用户接入变电站主接线示意图地址
|
||
}
|
||
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
|
||
}
|
||
},
|
||
{
|
||
deep: true
|
||
}
|
||
)
|
||
const open = () => {
|
||
dialogFormVisible.value = true
|
||
}
|
||
const close = () => {
|
||
//重置表单内容
|
||
//取消表单校验状态
|
||
ruleFormRef.value&&ruleFormRef.value.resetFields()
|
||
dialogFormVisible.value = false
|
||
emits('onSubmit')
|
||
resetForm()
|
||
}
|
||
onMounted(() => {
|
||
console.log()
|
||
})
|
||
|
||
const changeUserType = value => {
|
||
|
||
}
|
||
// 上传报告
|
||
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('')
|
||
//上传报告改变
|
||
const uploadFileName = val => {
|
||
uploadName.value = val
|
||
}
|
||
// 可研报告数组
|
||
const feasibilityReport = ref('')
|
||
//项目初步设计说明书
|
||
const preliminaryDesignDescription = ref('')
|
||
//预测评估报告
|
||
const predictionEvaluationReport = ref('')
|
||
//预测评估评审意见报告:
|
||
const predictionEvaluationReviewOpinions = ref('')
|
||
//其他附件:
|
||
const additionalAttachments = ref('')
|
||
//用户接入变电站主接线示意图
|
||
const substationMainWiringDiagram = ref('')
|
||
//主要敏感设备清单:
|
||
const sensitiveDevices = ref('')
|
||
//抗扰度测试报告:
|
||
const antiInterferenceReport = ref('')
|
||
//背景电能质量测试报告:
|
||
const powerQualityReport = ref('')
|
||
const choose = (e: any) => {
|
||
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
|
||
}
|
||
//主要敏感设备清单:
|
||
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
|
||
}
|
||
})
|
||
}
|
||
|
||
//设置工程预期投产日期时间选择范围不能<今天
|
||
const disabledDate = time => {
|
||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||
}
|
||
//提交
|
||
const confirmForm = () => {
|
||
ruleFormRef.value.validate(valid => {
|
||
if (valid) {
|
||
//整理上传文件的数据
|
||
// userType==0,1
|
||
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 (!feasibilityReport.value) {
|
||
return ElMessage({
|
||
message: '请上传可研报告',
|
||
type: 'warning'
|
||
})
|
||
}
|
||
if (!preliminaryDesignDescription.value) {
|
||
return ElMessage({
|
||
message: '请上传项目初步设计说明书',
|
||
type: 'warning'
|
||
})
|
||
}
|
||
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 //其他附件告地址
|
||
}
|
||
}
|
||
}
|
||
|
||
//userType==2,3,4,5
|
||
if (
|
||
subForm.value.userType == '2' ||
|
||
subForm.value.userType == '3' ||
|
||
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: '请上传预测评估报告',
|
||
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 //用户接入变电站主接线示意图地址
|
||
}
|
||
}
|
||
}
|
||
|
||
//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: '请上传预测评估报告',
|
||
type: 'warning'
|
||
})
|
||
}
|
||
if (!predictionEvaluationReviewOpinions.value) {
|
||
return ElMessage({
|
||
message: '请上传预测评估评审意见报告',
|
||
type: 'warning'
|
||
})
|
||
}
|
||
if (!substationMainWiringDiagram.value) {
|
||
return ElMessage({
|
||
message: '请上传用户接入变电站主接线示意图',
|
||
type: 'warning'
|
||
})
|
||
}
|
||
if (!sensitiveDevices.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, //抗扰度测试报告
|
||
powerQualityReport: powerQualityReport.value //背景电能质量测试报告
|
||
}
|
||
}
|
||
}
|
||
|
||
submitFormData(confirmFormData).then(res => {
|
||
ruleFormRef.value.resetFields()
|
||
resetForm()
|
||
close()
|
||
})
|
||
} else {
|
||
console.log('表单验证失败')
|
||
return false
|
||
}
|
||
})
|
||
}
|
||
defineExpose({ open })
|
||
</script>
|
||
<style lang="scss" scoped>
|
||
.el-form {
|
||
width: 96%;
|
||
height: 400px;
|
||
margin: 0 auto;
|
||
overflow-y: auto;
|
||
padding-top: 20px;
|
||
}
|
||
.dialog-footer {
|
||
padding: 10px;
|
||
}
|
||
/* 调整标签的换行行为 */
|
||
.label_over_warp::v-deep .el-form-item__label {
|
||
white-space: pre-line !important;
|
||
line-height: 16px !important;
|
||
}
|
||
.el-form-item {
|
||
padding: 0 20px;
|
||
height: auto !important;
|
||
}
|
||
::v-deep .el-form-item__label {
|
||
justify-content: flex-start !important;
|
||
}
|
||
.form-label-left-align {
|
||
text-align: left;
|
||
}
|
||
::v-deep .el-input__wrapper {
|
||
// border: 2px solid red;
|
||
}
|
||
::v-deep .el-input-number .el-input__inner {
|
||
text-align: left;
|
||
}
|
||
::v-deep .el-tree__empty-text {
|
||
width: 200px !important;
|
||
margin-left: 150px !important;
|
||
top: 20% !important;
|
||
left: 50% !important;
|
||
}
|
||
::v-deep .required_position {
|
||
position: relative;
|
||
.required_icon {
|
||
position: absolute;
|
||
// left: 20px;
|
||
margin-top: 8px;
|
||
color: #f56c6c;
|
||
margin-left: 20px;
|
||
}
|
||
.required_text {
|
||
// padding-left: 20px;
|
||
}
|
||
.el-form-item__label {
|
||
margin-left: 10px;
|
||
}
|
||
}
|
||
</style>
|