Merge remote-tracking branch 'origin/master'
This commit is contained in:
808
src/views/pqs/supervise/plan/components/addForm.vue
Normal file
808
src/views/pqs/supervise/plan/components/addForm.vue
Normal file
@@ -0,0 +1,808 @@
|
||||
<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>
|
||||
372
src/views/pqs/supervise/plan/components/detail.vue
Normal file
372
src/views/pqs/supervise/plan/components/detail.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="计划名称">
|
||||
{{ detailData.planName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督单位">
|
||||
{{ detailData.planUnit }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划编制单位">
|
||||
{{ detailData.planDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督类型">
|
||||
{{ detailData.expectedProductionDate }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督阶段">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划监督时间">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<!--文件地址-->
|
||||
<el-descriptions-item label="监督对象类型" v-if="detailData.lineFilePath">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.lineFilePath.url">
|
||||
{{ detailData?.lineFilePath.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象名称">
|
||||
{{
|
||||
areaOptionList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.powerCompany
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.substationVoltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象属性">
|
||||
{{ detailData.supervisionTempDeviceReport?.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象属性名称">
|
||||
{{ detailData.supervisionTempDeviceReport?.monitoringTerminalCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象协议容量(MVA)">
|
||||
{{ detailData.supervisionTempDeviceReport?.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象关联电站">
|
||||
{{
|
||||
voltageTransformerTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.voltageTransformerType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监督对象关联电站电压等级">
|
||||
{{
|
||||
terminalWiringMethodTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.terminalWiringMethodType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实施状态">
|
||||
{{
|
||||
neutralPointWiringMethodList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.neutralPointWiringMethod
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始实施时间">
|
||||
{{
|
||||
manufacturerList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.manufacturer
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结束实施时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.manufacturerDeviceNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报告出具时间">
|
||||
{{ detailData.supervisionTempDeviceReport?.terminalIp }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电能质量问题发生时间">
|
||||
{{
|
||||
terminalTypeList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.terminalType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实施人员">
|
||||
{{ detailData.supervisionTempDeviceReport?.terminalPort }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划状态">
|
||||
{{
|
||||
frontEndMachineList.find(item => {
|
||||
return item.id == detailData.supervisionTempDeviceReport?.frontEndMachine
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他要求">
|
||||
{{ detailData.supervisionTempDeviceReport?.currentTerminalDetectionTime.replace('T', ' ') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盖章报告" v-if="detailData.factoryInspectionReport">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.factoryInspectionReport.url">
|
||||
{{ detailData?.factoryInspectionReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="佐证材料" v-if="detailData?.informationSecurityTestReport">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.informationSecurityTestReport.url">
|
||||
{{ detailData?.informationSecurityTestReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划变更材料" v-if="detailData?.otherAttachments">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告预警单材料" v-if="detailData?.performanceTestReport">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="告预警单反馈材料" v-if="detailData?.typeExperimentReport">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估报告" v-if="detailData?.performanceTestReport">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const dictData = useDictData()
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//定义监测装置安装位置下拉框数据
|
||||
const monitoringDeviceInstallationPositionList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '电网侧'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '用户侧'
|
||||
}
|
||||
]
|
||||
//定义召唤标志下拉框数据
|
||||
const summonFlagList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '周期触发'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '变为触发'
|
||||
}
|
||||
]
|
||||
//定义终端模型下拉框数据
|
||||
const terminalModelList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '虚拟设备'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '虚拟设备'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '虚拟设备'
|
||||
}
|
||||
]
|
||||
//定义通讯状态下拉框数据
|
||||
const communicationStatusList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '中断'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '正常'
|
||||
}
|
||||
]
|
||||
//字典获取监测点电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典获取数据类型
|
||||
const dataTypeList = dictData.getBasicData('System_Type')
|
||||
//字典获取终端型号
|
||||
const terminalTypeList = dictData.getBasicData('Dev_Type')
|
||||
//字典获取电压互感器类型
|
||||
const voltageTransformerTypeList = dictData.getBasicData('Voltage_Transformer')
|
||||
//字典获取中性点接线方式
|
||||
const neutralPointWiringMethodList = dictData.getBasicData('Neutral_Point')
|
||||
//字典获取所属前置机
|
||||
const frontEndMachineList = dictData.getBasicData('Front_Type')
|
||||
//字典获取终端接线方式类型
|
||||
const terminalWiringMethodTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//字典获取厂家
|
||||
const manufacturerList = dictData.getBasicData('Dev_Manufacturers')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getTerminalDetailsById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
console.log(detailData.value, '+++++++++')
|
||||
getFileName()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const getFileName = async () => {
|
||||
//验收检验报告
|
||||
if (detailData.value.acceptanceInspectionReport) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReport, 'acceptanceInspectionReport')
|
||||
}
|
||||
//验收检验报告单
|
||||
if (detailData.value.acceptanceInspectionReportSingle) {
|
||||
await getFileNamePath(detailData.value.acceptanceInspectionReportSingle, 'acceptanceInspectionReportSingle')
|
||||
}
|
||||
//出厂检验报告
|
||||
if (detailData.value.factoryInspectionReport) {
|
||||
await getFileNamePath(detailData.value.factoryInspectionReport, 'factoryInspectionReport')
|
||||
}
|
||||
|
||||
//信息安全检测报告
|
||||
if (detailData.value.informationSecurityTestReport) {
|
||||
await getFileNamePath(detailData.value.informationSecurityTestReport, 'informationSecurityTestReport')
|
||||
}
|
||||
//监测点台账信息
|
||||
if (detailData.value.lineFilePath) {
|
||||
await getFileNamePath(detailData.value.lineFilePath, 'lineFilePath')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (detailData.value.otherAttachments) {
|
||||
await getFileNamePath(detailData.value.otherAttachments, 'otherAttachments')
|
||||
}
|
||||
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
console.log(111111111)
|
||||
if (res.data) {
|
||||
//可研报告
|
||||
if (pathName == 'acceptanceInspectionReport' && detailData.value.acceptanceInspectionReport) {
|
||||
detailData.value.acceptanceInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//终端台账信息
|
||||
else if (
|
||||
pathName == 'acceptanceInspectionReportSingle' &&
|
||||
detailData.value.acceptanceInspectionReportSingle
|
||||
) {
|
||||
detailData.value.acceptanceInspectionReportSingle = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'factoryInspectionReport' && detailData.value.factoryInspectionReport) {
|
||||
detailData.value.factoryInspectionReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (pathName == 'informationSecurityTestReport' && detailData.value.informationSecurityTestReport) {
|
||||
detailData.value.informationSecurityTestReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'lineFilePath' && detailData.value.lineFilePath) {
|
||||
detailData.value.lineFilePath = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感设备清单
|
||||
else if (pathName == 'otherAttachments' && detailData.value.otherAttachments) {
|
||||
detailData.value.otherAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.default-main {
|
||||
height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
margin: 5px !important;
|
||||
position: absolute !important;
|
||||
top: 20px !important;
|
||||
}
|
||||
</style>
|
||||
225
src/views/pqs/supervise/plan/components/index.vue
Normal file
225
src/views/pqs/supervise/plan/components/index.vue
Normal file
@@ -0,0 +1,225 @@
|
||||
<!---终端入网检测-->
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<!-- <template #select>
|
||||
<el-form-item label="工程名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属地市">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所属地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import addForm from './addForm.vue'
|
||||
const dictData = useDictData()
|
||||
const { push } = useRouter()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/deVReport/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'orgName', title: '所属省份' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '所属地市' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '所属县区' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '监督单位' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '计划名称' , minWidth: 170 },
|
||||
{ field: 'reportDate', title: '计划监督时间', minWidth: 170},
|
||||
{ field: 'orgName', title: '监督类型' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '监督阶段' , minWidth: 170 },
|
||||
{ field: 'orgName', title: '监督对象类型' , minWidth: 170 },
|
||||
{ field: 'reporter', title: '填报人', minWidth: 80 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '审核状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'monitoringTerminalName', title: '设备名称', minWidth: 170 },
|
||||
{ field: 'substation', title: '所属变电站', minWidth: 170 },
|
||||
// {
|
||||
// field: 'userType',
|
||||
// title: '用户性质',
|
||||
// minWidth: 150,
|
||||
// formatter: (obj: any) => {
|
||||
// const userType = obj.row.userType
|
||||
// return getUserTypeName(userType)
|
||||
// }
|
||||
// },
|
||||
|
||||
// { field: 'informationSecurityTestReport', title: '信息安全检测报告', minWidth: 170 },
|
||||
// { field: 'otherAttachments', title: '其他附件', minWidth: 170 },
|
||||
// { field: 'orgName', title: '填报部门名称'},
|
||||
// { field: 'performanceTestReport', title: '性能检测报告', minWidth: 170 },
|
||||
|
||||
// {
|
||||
// field: 'userStatus',
|
||||
// title: '用户状态',
|
||||
// minWidth: 100,
|
||||
// render: 'tag',
|
||||
// custom: {
|
||||
// 0: 'primary',
|
||||
// 1: 'primary',
|
||||
// 2: 'success',
|
||||
// 3: 'warning'
|
||||
// },
|
||||
// replaceValue: {
|
||||
// 0: '可研',
|
||||
// 1: '建设',
|
||||
// 2: '运行',
|
||||
// 3: '退运'
|
||||
// }
|
||||
// },
|
||||
// { field: 'substation', title: '变电站', minWidth: 100 },
|
||||
// { field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
console.log(tableStore.table.params,"=========查询列表");
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
}, 0);
|
||||
|
||||
}
|
||||
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
31
src/views/pqs/supervise/plan/index.vue
Normal file
31
src/views/pqs/supervise/plan/index.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- 技术监督计划 -->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<plan/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import plan from './components/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'supervise/plan'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const Statistics = ref()
|
||||
const compatibility = ref()
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user