809 lines
31 KiB
Vue
809 lines
31 KiB
Vue
|
|
<template>
|
|||
|
|
<el-dialog
|
|||
|
|
v-model="dialogFormVisible"
|
|||
|
|
title="技术监督计划"
|
|||
|
|
width="60%"
|
|||
|
|
:append-to-body="true"
|
|||
|
|
:before-close="close"
|
|||
|
|
:close-on-click-modal="false"
|
|||
|
|
:lazy="true"
|
|||
|
|
draggable
|
|||
|
|
custom-class="fixed-dialog"
|
|||
|
|
>
|
|||
|
|
<el-form
|
|||
|
|
:model="form"
|
|||
|
|
:validate-on-rule-change="false"
|
|||
|
|
:scroll-to-error="true"
|
|||
|
|
:rules="rules"
|
|||
|
|
ref="ruleFormRef"
|
|||
|
|
label-width="140px"
|
|||
|
|
label-position="right"
|
|||
|
|
>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="计划名称:" prop="planName">
|
|||
|
|
<el-input v-model="form.planName" autocomplete="off" place-holder="请输入计划名称" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督单位:" prop="planUnit">
|
|||
|
|
<el-select v-model="form.planUnit" clearable style="width: 100%" placeholder="请选择监督单位">
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in areaOptionList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="计划编制单位:" prop="planDept">
|
|||
|
|
<el-input v-model="form.planDept" autocomplete="off" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督类型:" prop="planType">
|
|||
|
|
<el-select v-model="form.planType" clearable style="width: 100%" placeholder="请选择监督类型">
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in areaOptionList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督阶段:" prop="planStep">
|
|||
|
|
<el-select v-model="form.planStep" clearable style="width: 100%" placeholder="请选择监督阶段">
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in areaOptionList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="计划监督时间:" prop="planSupervise">
|
|||
|
|
<el-date-picker
|
|||
|
|
style="width: 100%"
|
|||
|
|
v-model="form.planSuperviseTime"
|
|||
|
|
type="month"
|
|||
|
|
format="YYYY-MM"
|
|||
|
|
value-format="YYYY-MM"
|
|||
|
|
placeholder="请选择计划监督时间"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象类型:">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.superviseObjType"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择监督对象类型"
|
|||
|
|
@change="findSubstationVoltageLevel"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in powerCompanyList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象名称:">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.superviseObjName"
|
|||
|
|
autocomplete="off"
|
|||
|
|
place-holder="请输入监督对象名称"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象电压等级:" prop="superviseObjName" class="label_over_warp">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.superviseObjVoltageLevel"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择监督对象电压等级"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in voltageLevelList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象属性:">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.superviseObjAttribute"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择监督对象属性"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in voltageLevelList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象属性名称:" class="label_over_warp">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.superviseObjAttributeName"
|
|||
|
|
autocomplete="off"
|
|||
|
|
place-holder="请输入监督对象属性名称"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象协议容量(MVA):" class="label_over_warp">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.superviseObjCapacity"
|
|||
|
|
autocomplete="off"
|
|||
|
|
place-holder="请输入监督对象监督对象协议容量"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象关联电站:" class="label_over_warp">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.superviseObjStation"
|
|||
|
|
autocomplete="off"
|
|||
|
|
place-holder="请输入监督对象关联电站"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="监督对象关联电站电压等级:" class="label_over_warp">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.superviseObjStationVoltageLevel"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择监督对象关联电站电压等级"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in neutralPointWiringMethodList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="实施状态:" prop="implementStatus">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.implementStatus"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择实施状态"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in manufacturerList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="开始实施时间:">
|
|||
|
|
<el-date-picker
|
|||
|
|
style="width: 100%"
|
|||
|
|
v-model="form.implementBeginTime"
|
|||
|
|
type="datetime"
|
|||
|
|
format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
value-format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
placeholder="请选择开始实施时间"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="结束实施时间:">
|
|||
|
|
<el-date-picker
|
|||
|
|
style="width: 100%"
|
|||
|
|
v-model="form.implementEndTime"
|
|||
|
|
type="datetime"
|
|||
|
|
format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
value-format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
placeholder="请选择结束实施时间"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="报告出具时间:">
|
|||
|
|
<el-date-picker
|
|||
|
|
style="width: 100%"
|
|||
|
|
v-model="form.reportTime"
|
|||
|
|
type="datetime"
|
|||
|
|
format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
value-format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
placeholder="请选择报告出具时间"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="电能质量问题发生时间:" class="label_over_warp">
|
|||
|
|
<el-date-picker
|
|||
|
|
style="width: 100%"
|
|||
|
|
v-model="form.problemTime"
|
|||
|
|
type="datetime"
|
|||
|
|
format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
value-format="YYYY-MM-DD hh:mm:ss"
|
|||
|
|
placeholder="请选择电能质量问题发生时间"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="实施人员:">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.implementUser"
|
|||
|
|
clearable
|
|||
|
|
style="width: 100%"
|
|||
|
|
placeholder="请选择实施人员"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in frontEndMachineList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="计划状态:" class="label_over_warp">
|
|||
|
|
<el-select v-model="form.planStatus" clearable style="width: 100%" placeholder="请选择计划状态">
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in frontEndMachineList"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.name"
|
|||
|
|
:value="item.id"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="12" class="required_position">
|
|||
|
|
<span class="required_icon_white">*</span>
|
|||
|
|
<el-form-item label="其他要求:">
|
|||
|
|
<el-input v-model="form.other" autocomplete="off" place-holder="请输入其他要求" />
|
|||
|
|
</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="informationSecurityTestReport">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.informationSecurityTestReport"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('informationSecurityTestReport')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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="acceptanceInspectionReportSingle">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.acceptanceInspectionReportSingle"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('acceptanceInspectionReportSingle')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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="acceptanceInspectionReport">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.acceptanceInspectionReport"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('acceptanceInspectionReport')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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="typeExperimentReport" :show-message="false">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.typeExperimentReport"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('typeExperimentReport')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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="factoryInspectionReport" class="label_over_warp">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.factoryInspectionReport"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('factoryInspectionReport')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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="performanceTestReport" :show-message="false">
|
|||
|
|
<el-upload
|
|||
|
|
v-model:file-list="form.performanceTestReport"
|
|||
|
|
ref="uploadRef"
|
|||
|
|
action=""
|
|||
|
|
accept=".xls,.xlsx"
|
|||
|
|
:limit="1"
|
|||
|
|
:on-exceed="handleExceed"
|
|||
|
|
:on-change="choose"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
:on-progress="uploadFileName('performanceTestReport')"
|
|||
|
|
>
|
|||
|
|
<template #trigger>
|
|||
|
|
<el-button type="primary">上传文件</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 { queryByAllCode } from '@/api/system-boot/dictTree'
|
|||
|
|
import { useAdminInfo } from '@/stores/adminInfo'
|
|||
|
|
import { uploadFile } from '@/api/system-boot/file'
|
|||
|
|
import { addTerminalFormData, getSubstationVoltageLevel } from '@/api/supervision-boot/terminal/index'
|
|||
|
|
import { getAreaList } from '@/api/common'
|
|||
|
|
const emits = defineEmits(['onSubmit'])
|
|||
|
|
const dictData = useDictData()
|
|||
|
|
const dialogFormVisible = ref(false)
|
|||
|
|
const form: any = ref({})
|
|||
|
|
const ruleFormRef = ref(null)
|
|||
|
|
//字典获取监督阶段
|
|||
|
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
|||
|
|
//字典获取监督对象关联电站电压等级
|
|||
|
|
const neutralPointWiringMethodList = dictData.getBasicData('Neutral_Point')
|
|||
|
|
//字典获取实施状态
|
|||
|
|
const manufacturerList = dictData.getBasicData('Dev_Manufacturers')
|
|||
|
|
//字典获取实施人员
|
|||
|
|
const frontEndMachineList = dictData.getBasicData('Front_Type')
|
|||
|
|
//字典获取电压等级
|
|||
|
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
|||
|
|
const resetForm = () => {
|
|||
|
|
form.value = {
|
|||
|
|
planName: '', //计划名称
|
|||
|
|
planUnit:'', //监督单位
|
|||
|
|
planDept: '', //计划编制单位
|
|||
|
|
planType: '', //监督类型
|
|||
|
|
planStep: areaOptionList[0].id, //监督阶段
|
|||
|
|
planSuperviseTime: '', //计划监督时间
|
|||
|
|
superviseObjType: areaOptionList[0].id, //监督对象类型
|
|||
|
|
superviseObjName: '', //监督对象名称
|
|||
|
|
superviseObjVoltageLevel: voltageLevelList[0].id, // 监督对象电压等级
|
|||
|
|
superviseObjAttribute: '', //监督对象属性
|
|||
|
|
superviseObjAttributeName: '', //监督对象属性名称
|
|||
|
|
superviseObjCapacity: '', //监督对象协议容量
|
|||
|
|
superviseObjStation: '', //监督对象关联电站
|
|||
|
|
superviseObjStationVoltageLevel: voltageLevelList[0].id, // 监督对象关联电站电压等级
|
|||
|
|
implementStatus: '0', //实施状态
|
|||
|
|
implementBeginTime: '', //开始实施时间
|
|||
|
|
implementEndTime: '', //结束实施时间
|
|||
|
|
reportTime: '', //报告出具时间
|
|||
|
|
problemTime: '', //电能质量问题发生时间
|
|||
|
|
implementUser: '', //实施人员
|
|||
|
|
planStatus: '', //计划状态
|
|||
|
|
other: '', //其他要求
|
|||
|
|
|
|||
|
|
sealReport: '', //盖章报告
|
|||
|
|
evidenceMaterials:'', //佐证材料
|
|||
|
|
planChangeMaterials: '', //计划变更材料
|
|||
|
|
alarmMaterials:'', //告预警单材料
|
|||
|
|
alarmFeedbackMaterials: '', //告预警单反馈材料
|
|||
|
|
assessReport:'' //评估报告
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//初始化数据
|
|||
|
|
resetForm()
|
|||
|
|
|
|||
|
|
//定义校验规则
|
|||
|
|
const rules = ref({
|
|||
|
|
//基础信息
|
|||
|
|
planName: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请输入计划名称',
|
|||
|
|
trigger: 'blur'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
planUnit: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择监督单位',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
planDept: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择计划编制单位',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
planType: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择监督类型',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
planStep: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择监督阶段',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
planSuperviseTime: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择计划监督时间',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
|
|||
|
|
superviseObjVoltageLevel: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择监督对象电压等级',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
implementStatus: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: '请选择实施状态',
|
|||
|
|
trigger: 'change'
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
})
|
|||
|
|
watch(
|
|||
|
|
() => form.value,
|
|||
|
|
(val, oldVal) => {},
|
|||
|
|
{
|
|||
|
|
deep: true,
|
|||
|
|
immediate: true
|
|||
|
|
}
|
|||
|
|
)
|
|||
|
|
const open = () => {
|
|||
|
|
dialogFormVisible.value = true
|
|||
|
|
}
|
|||
|
|
const close = () => {
|
|||
|
|
//重置表单内容
|
|||
|
|
//取消表单校验状态
|
|||
|
|
ruleFormRef.value && ruleFormRef.value.resetFields()
|
|||
|
|
dialogFormVisible.value = false
|
|||
|
|
emits('onSubmit')
|
|||
|
|
resetForm()
|
|||
|
|
}
|
|||
|
|
onMounted(() => {
|
|||
|
|
console.log()
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
// 上传报告
|
|||
|
|
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 sealReport = ref('')
|
|||
|
|
// 佐证材料
|
|||
|
|
const evidenceMaterials = ref('')
|
|||
|
|
// 计划变更材料
|
|||
|
|
const planChangeMaterials = ref('')
|
|||
|
|
//告预警单材料
|
|||
|
|
const alarmMaterials = ref('')
|
|||
|
|
//告预警单反馈材料
|
|||
|
|
const alarmFeedbackMaterials = ref('')
|
|||
|
|
//评估报告
|
|||
|
|
const assessReport = ref('')
|
|||
|
|
const choose = (e: any) => {
|
|||
|
|
uploadFile(e.raw, '/supervision/').then(res => {
|
|||
|
|
//盖章报告
|
|||
|
|
if (uploadName.value == 'sealReport') {
|
|||
|
|
sealReport.value = res.data.name
|
|||
|
|
}
|
|||
|
|
//佐证材料
|
|||
|
|
else if (uploadName.value == 'evidenceMaterials') {
|
|||
|
|
evidenceMaterials.value = res.data.name
|
|||
|
|
}
|
|||
|
|
//计划变更材料
|
|||
|
|
else if (uploadName.value == 'planChangeMaterials') {
|
|||
|
|
planChangeMaterials.value = res.data.name
|
|||
|
|
}
|
|||
|
|
//告预警单材料
|
|||
|
|
else if (uploadName.value == 'alarmMaterials') {
|
|||
|
|
alarmMaterials.value = res.data.name
|
|||
|
|
}
|
|||
|
|
//告预警单反馈材料
|
|||
|
|
else if (uploadName.value == 'alarmFeedbackMaterials') {
|
|||
|
|
alarmFeedbackMaterials.value = res.data.name
|
|||
|
|
}
|
|||
|
|
//评估报告
|
|||
|
|
else if (uploadName.value == 'assessReport') {
|
|||
|
|
assessReport.value = res.data.name
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//设置监督类型时间选择范围不能<今天
|
|||
|
|
const disabledDate = time => {
|
|||
|
|
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
|||
|
|
}
|
|||
|
|
//提交
|
|||
|
|
const confirmForm = () => {
|
|||
|
|
// 提交终端信息
|
|||
|
|
ruleFormRef.value.validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
|||
|
|
//1.判断是否上传
|
|||
|
|
if (!sealReport.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传盖章报告',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
if (!evidenceMaterials.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传佐证材料',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
if (!planChangeMaterials.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传计划变更材料',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
if (!alarmMaterials.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传告预警单材料',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
if (!alarmFeedbackMaterials.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传告预警单反馈材料',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
if (!assessReport.value) {
|
|||
|
|
return ElMessage({
|
|||
|
|
message: '请上传评估报告',
|
|||
|
|
type: 'warning'
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//提交终端信息
|
|||
|
|
confirmFormData = {
|
|||
|
|
...confirmFormData,
|
|||
|
|
sealReport: sealReport?.value, //盖章报告
|
|||
|
|
evidenceMaterials: evidenceMaterials.value, //佐证材料
|
|||
|
|
planChangeMaterials: planChangeMaterials.value, //计划变更材料
|
|||
|
|
alarmMaterials: alarmMaterials.value, //告预警单材料
|
|||
|
|
alarmFeedbackMaterials: alarmFeedbackMaterials.value, //告预警单反馈材料
|
|||
|
|
assessReport: assessReport.value //评估报告
|
|||
|
|
}
|
|||
|
|
addTerminalFormData(confirmFormData).then(res => {
|
|||
|
|
ruleFormRef.value.resetFields()
|
|||
|
|
resetForm()
|
|||
|
|
close()
|
|||
|
|
})
|
|||
|
|
} else {
|
|||
|
|
console.log('表单验证失败')
|
|||
|
|
return false
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
defineExpose({ open })
|
|||
|
|
</script>
|
|||
|
|
<style lang="scss" scoped>
|
|||
|
|
.fixed-dialog {
|
|||
|
|
position: fixed;
|
|||
|
|
top: 50%;
|
|||
|
|
left: 50%;
|
|||
|
|
transform: translate(-50%, -50%);
|
|||
|
|
max-height: calc(100% - 30px);
|
|||
|
|
}
|
|||
|
|
.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;
|
|||
|
|
}
|
|||
|
|
::v-deep .el-form-item {
|
|||
|
|
padding: 0 10px;
|
|||
|
|
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-number .el-input__inner {
|
|||
|
|
text-align: left;
|
|||
|
|
}
|
|||
|
|
.no_required::v-deep .el-form-item__label {
|
|||
|
|
padding-left: 10px !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
::v-deep .el-input {
|
|||
|
|
width: 200px !important;
|
|||
|
|
}
|
|||
|
|
::v-deep .el-select {
|
|||
|
|
width: 200px !important;
|
|||
|
|
}
|
|||
|
|
::v-deep .required_position {
|
|||
|
|
position: relative;
|
|||
|
|
.required_icon {
|
|||
|
|
position: absolute;
|
|||
|
|
left: -10px;
|
|||
|
|
margin-top: 8px;
|
|||
|
|
color: #f56c6c;
|
|||
|
|
margin-left: 20px;
|
|||
|
|
margin-right: 10px;
|
|||
|
|
}
|
|||
|
|
.required_icon_white {
|
|||
|
|
color: #fff;
|
|||
|
|
position: absolute;
|
|||
|
|
left: -10px;
|
|||
|
|
padding-left: 10px;
|
|||
|
|
margin: 8px 10px 0 10px;
|
|||
|
|
}
|
|||
|
|
.required_text {
|
|||
|
|
// padding-left: 20px;
|
|||
|
|
}
|
|||
|
|
.el-form-item__label {
|
|||
|
|
padding-left: 10px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// ::v-deep .tabs_form{
|
|||
|
|
// height:300px !important;
|
|||
|
|
// }
|
|||
|
|
</style>
|