冀北项目添加表格导出功能 技术监督添加下载模版上传功能
This commit is contained in:
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<!-- 上传 -->
|
||||
<el-dialog draggable :title="title" v-model="uploadConclusions" width="800px" :before-close="cancel">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="addForm"
|
||||
label-width="120px"
|
||||
:rules="rules"
|
||||
:disabled="title == '未建档干扰源用户详情'"
|
||||
>
|
||||
<el-form-item label="所属单位:">
|
||||
<Area v-model="addForm.orgNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addForm.userName" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select v-model="addForm.loadType" clearable collapse-tags placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="建档时间:">
|
||||
<el-input v-model="addForm.recordTime" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">报告在线查看</el-divider>
|
||||
<el-form-item class="item" label="报告:">
|
||||
<el-button type="primary" link @click="download">
|
||||
{{ addForm.ifilePathName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估结论填报
|
||||
</el-divider>
|
||||
<el-form-item label="是否超标:" style="margin-top: 10px" prop="iIsOverLimit">
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="1" disabled>是</el-radio>
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="0" disabled>否</el-radio>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="超标指标:" style="margin-top: 10px" prop="IOverLimitTarget">
|
||||
<el-checkbox-group v-model="addForm.IOverLimitTarget" disabled>
|
||||
<el-checkbox v-for="(item, ind) in exceeded" :label="item.id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="计划采取措施:" style="margin-top: 10px" prop="IPlanStep">
|
||||
<el-select v-model="addForm.IPlanStep" placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in takeMeasures"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="入网详情:" style="margin-top: 10px" prop="IDescription">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="addForm.IDescription"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入入网详情"
|
||||
type="textarea"
|
||||
style="width: 500px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-form-item prop="checkComment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addForm.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px" v-if="title != '未建档干扰源用户详情'">
|
||||
<el-button type="primary" class="ml20" @click="submit(1)">通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="submit(0)">不通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { checkLoadTypeUserI, getLoadTypeUserById } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const takeMeasures = dictData.getBasicData('Plan_Take')
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const uploadConclusions = ref(false)
|
||||
|
||||
const addForm: any = ref({})
|
||||
|
||||
const title = ref('')
|
||||
const rules = {
|
||||
checkComment: [{ required: true, message: '请输入入网详情', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
|
||||
const submit = (flag: any) => {
|
||||
formRef.value?.validate((valid: any) => {
|
||||
if (valid) {
|
||||
checkLoadTypeUserI({
|
||||
checkComment: addForm.value.checkComment,
|
||||
checkPerson: dictData.state.area[0].id,
|
||||
checkResult: flag,
|
||||
id: addForm.value.id
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('操作成功')
|
||||
cancel()
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(addForm.value.ifile)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = addForm.value.ifilePathName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
addForm.value.checkComment = ''
|
||||
uploadConclusions.value = false
|
||||
}
|
||||
|
||||
const open = (text: string, row: any) => {
|
||||
title.value = text
|
||||
addForm.value = {}
|
||||
getLoadTypeUserById({ id: row.id }).then((res: any) => {
|
||||
addForm.value = {
|
||||
id: res.data.id,
|
||||
orgNo: res.data.orgNo,
|
||||
loadType: res.data.loadType,
|
||||
userName: res.data.userName,
|
||||
recordTime: res.data.recordTime,
|
||||
iIsOverLimit: res.data.iisOverLimit ? res.data.iisOverLimit : 0,
|
||||
IDescription: res.data.idescription ? res.data.idescription : '',
|
||||
IPlanStep: res.data.iplanStep ? res.data.iplanStep : '',
|
||||
IOverLimitTarget: res.data.ioverLimitTarget ? res.data.ioverLimitTarget.split(',') : [],
|
||||
ifilePathName: res.data.ifilePathName ? res.data.ifilePathName : '',
|
||||
ifile: res.data.ifile
|
||||
}
|
||||
})
|
||||
|
||||
uploadConclusions.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- <template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template> -->
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
|
||||
</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 { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Audit from '../undocumented/audit.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const AuditRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeUserList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'recordTime', title: '建档时间' },
|
||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
AuditRef.value.open('入网评估报告审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.checkType = 1
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
129
src/views/pqs/supervise_hn/interfere/components/normal.vue
Normal file
129
src/views/pqs/supervise_hn/interfere/components/normal.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.relationUserName"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否已上传实测">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.aisFileUpload"
|
||||
clearable
|
||||
placeholder="请选择是否已上传实测"
|
||||
>
|
||||
<el-option label="否" value="0" />
|
||||
<el-option label="是" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</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 { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{
|
||||
field: 'istatus',
|
||||
title: '实测报告状态',
|
||||
formatter: row => {
|
||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,404 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:title="titleButton"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
>
|
||||
<!-- 用户档案录入 新建1 -->
|
||||
<el-form
|
||||
:model="form"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
ref="ruleFormRef"
|
||||
:rules="rules"
|
||||
label-width="auto"
|
||||
class="form-two"
|
||||
>
|
||||
<el-divider content-position="left">干扰源用户基本信息</el-divider>
|
||||
<el-form-item label="用户性质:" prop="userType">
|
||||
<el-select v-model="form.userType" placeholder="请选择用户性质" :disabled="openType == 'detail'">
|
||||
<el-option
|
||||
v-for="(item, index) in userTypeList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市:" 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-form-item label="归口管理部门:" prop="responsibleDepartment">
|
||||
<el-input
|
||||
v-model="form.responsibleDepartment"
|
||||
autocomplete="off"
|
||||
placeholder="请输入归口管理部门"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称:" prop="projectName">
|
||||
<el-input
|
||||
v-model="form.projectName"
|
||||
autocomplete="off"
|
||||
placeholder="请输入项目名称"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户状态:" 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-form-item label="厂站名称:" prop="substation">
|
||||
<el-input
|
||||
v-model="form.substation"
|
||||
autocomplete="off"
|
||||
placeholder="请输入厂站名称"
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userType == '0' || form.userType == '1'" label="电压等级:" 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-form-item
|
||||
v-if="form.userType == '0' || form.userType == '1'"
|
||||
label="预测评估单位:"
|
||||
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-form-item v-if="form.userReportSubstationPO" label="是否需要治理:" prop="needGovernance">
|
||||
<el-radio-group v-model="form.userReportSubstationPO.needGovernance" :disabled="openType == 'detail'">
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userReportSubstationPO" label="是否开展背景测试:" prop="backgroundTestPerformed">
|
||||
<el-radio-group
|
||||
v-model="form.userReportSubstationPO.backgroundTestPerformed"
|
||||
:disabled="openType == 'detail'"
|
||||
>
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">
|
||||
{{ bussType == 0 ? '入网设计方案审查报告' : '治理工程验收报告' }}
|
||||
</el-divider>
|
||||
<el-form-item label="填报人:" prop="reporter">
|
||||
<el-input v-model="form.reporter" autocomplete="off" :disabled="true" place-holder="请输入填报人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="填报日期:" prop="reportDate">
|
||||
<el-date-picker
|
||||
:disabled="true"
|
||||
style="width: 100%"
|
||||
v-model="form.reportDate"
|
||||
type="date"
|
||||
placeholder="请选择填报日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报部门:" prop="orgId">
|
||||
<el-input v-model="form.orgId" :disabled="true" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="uploadFile"
|
||||
:label="bussType == 0 ? '入网设计方案审查报告:' : '治理工程验收报告:'"
|
||||
prop="goToNetReport"
|
||||
>
|
||||
<el-upload
|
||||
v-model:file-list="form.goToNetReport"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="confirmForm()">确定</el-button> -->
|
||||
<el-button type="primary" @click="confirmForm(true)" :loading="loading" >保存</el-button>
|
||||
<el-button type="primary" @click="confirmForm(false)" :loading="loading" >提交审批</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, defineProps, defineEmits } from 'vue'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { submitGoNet } from '@/api/supervision-boot/interfere/index'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
|
||||
const props = defineProps({
|
||||
openType: {
|
||||
type: String,
|
||||
default: 'create'
|
||||
},
|
||||
id: {
|
||||
type: String
|
||||
},
|
||||
bussType: {
|
||||
type: Number
|
||||
},
|
||||
titleButton: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
const rules = {
|
||||
goToNetReport: [{ required: true, message: '请上传报告', trigger: 'blur' }]
|
||||
}
|
||||
const loading = ref(false)
|
||||
const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
const form: any = ref({})
|
||||
const ruleFormRef: any = ref(null)
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典预测评估单位
|
||||
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 adminInfo = useAdminInfo()
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
orgId: '', //填报部门
|
||||
goToNetReport: [], //报告
|
||||
userType: 0, //用户性质
|
||||
city: areaOptionList[0].name, //所在地市
|
||||
responsibleDepartment: '', //归口管理部门
|
||||
projectName: '', //项目名称
|
||||
userStatus: userStateList[0].value, //用户状态
|
||||
substation: '', //变电站
|
||||
backgroundTestPerformed: 0, //是否开展背景测试
|
||||
antiInterferenceTest: 0, //是否开展抗扰度测试
|
||||
voltageLevel: voltageLevelList[0].id, //电压等级
|
||||
evaluationDept: evaluationDeptList[0].name //预测评估单位
|
||||
}
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
}
|
||||
//初始化数据
|
||||
resetForm()
|
||||
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const getInfo = async (row?: any) => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getUserReportById(props.id).then(res => {
|
||||
form.value = res.data
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
form.value.reportDate = new Date()
|
||||
if (row) {
|
||||
goToNetReport.value = row.otherReport
|
||||
form.value.id = row.id
|
||||
form.value.goToNetReport =
|
||||
row.otherReport == null || row.otherReport == ''
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: row.otherReport.split('/')[2]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const open = (row?: any) => {
|
||||
dialogFormVisible.value = true
|
||||
goToNetReport.value = ''
|
||||
resetForm()
|
||||
getInfo(row)
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
resetForm()
|
||||
dialogFormVisible.value = false
|
||||
}
|
||||
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
|
||||
//移除文件上传
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
|
||||
// 治理工程验收报告数组
|
||||
const goToNetReport = ref('')
|
||||
|
||||
const choose = (e: any) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
//治理工程验收报告
|
||||
goToNetReport.value = res.data.name
|
||||
})
|
||||
}
|
||||
|
||||
//提交
|
||||
const confirmForm = (flag: boolean) => {
|
||||
loading.value = true
|
||||
if (flag) {
|
||||
let data = {
|
||||
type: props.bussType,
|
||||
userReportId: props.id,
|
||||
reportUrl: goToNetReport.value,
|
||||
id: form.value.id || null,
|
||||
saveOrCheckflag: '1'
|
||||
}
|
||||
submitGoNet(data).then((res: any) => {
|
||||
ElMessage({
|
||||
message: '保存成功!',
|
||||
type: 'success'
|
||||
})
|
||||
emits('onSubmit')
|
||||
close()
|
||||
})
|
||||
} else {
|
||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||
return ElMessage({
|
||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
let data = {
|
||||
type: props.bussType,
|
||||
userReportId: props.id,
|
||||
reportUrl: goToNetReport.value,
|
||||
id: form.value.id || null,
|
||||
saveOrCheckflag: '2'
|
||||
}
|
||||
submitGoNet(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '新建流程成功',
|
||||
type: 'success'
|
||||
})
|
||||
emits('onSubmit')
|
||||
close()
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="details_item">
|
||||
<div class="left_title">
|
||||
<slot name="label"></slot>
|
||||
</div>
|
||||
<div class="right_content">
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.details_item {
|
||||
width: 48%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
.left_title {
|
||||
width: 54%;
|
||||
height: 100%;
|
||||
background: #f5f7fa;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
padding: 8px 11px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #eceef5;
|
||||
border-right: 0;
|
||||
color: #606266;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.right_content {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
line-height: 18px;
|
||||
padding: 8px 11px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #eceef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,587 @@
|
||||
<template>
|
||||
<div class="details">
|
||||
<el-divider content-position="left">干扰源用户信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="工程预期投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性质">
|
||||
{{
|
||||
userTypeList.find(item => {
|
||||
return item.value == detailData.userType
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="归口管理部门">
|
||||
{{ detailData.responsibleDepartment }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变电站">
|
||||
{{ detailData.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户协议容量" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.voltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估单位">
|
||||
{{ detailData.evaluationDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估结论">
|
||||
{{ detailData.evaluationConclusion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
||||
" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.nonlinearLoadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否需要治理">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展背景测试">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.pccPoint }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC供电设备容量" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.pccEquipmentCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="基准短路容量" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.baseShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{
|
||||
evaluationTypeList.find(item => {
|
||||
return item.id == proviteData?.evaluationType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.evaluationChekDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="系统最小短路容量" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData?.minShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户用电协议容量" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData?.userAgreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||
{{
|
||||
industryList.find(item => {
|
||||
return item.id == proviteData.industry
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||
{{ proviteData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">
|
||||
{{ proviteData.powerSupplyCount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="可研报告">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport.name">
|
||||
<View @click="openFile(proviteData.feasibilityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport.url">
|
||||
{{ proviteData.feasibilityReport.name }}
|
||||
</a>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目初步设计说明书">
|
||||
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription.name">
|
||||
<View @click="openFile(proviteData?.preliminaryDesignDescription.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.preliminaryDesignDescription.url">
|
||||
{{ proviteData?.preliminaryDesignDescription.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReport.url">
|
||||
{{ proviteData?.predictionEvaluationReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审意见报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户接入变电站主接线示意图" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram.name">
|
||||
<View @click="openFile(proviteData?.substationMainWiringDiagram.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.substationMainWiringDiagram.url">
|
||||
{{ proviteData?.substationMainWiringDiagram.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.sensitiveDevices.name">
|
||||
<View @click="openFile(proviteData?.sensitiveDevices.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.sensitiveDevices.url">
|
||||
{{ proviteData?.sensitiveDevices.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport.name">
|
||||
<View @click="openFile(proviteData?.antiInterferenceReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.antiInterferenceReport.url">
|
||||
{{ proviteData?.antiInterferenceReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.powerQualityReport.name">
|
||||
<View @click="openFile(proviteData?.powerQualityReport.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.powerQualityReport.url">
|
||||
{{ proviteData?.powerQualityReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网评估报告" v-if="applyTitle == '干扰源用户治理工程验收'">
|
||||
<div v-for="item in netInReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="其他附件" v-if="proviteData?.additionalAttachments.url">
|
||||
<el-icon class="elView" v-if="proviteData?.additionalAttachments.name">
|
||||
<View @click="openFile(proviteData?.additionalAttachments.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.additionalAttachments.url">
|
||||
{{ proviteData?.additionalAttachments.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">{{ applyTitle + '填报信息' }}</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="applyTitle + '报告'"
|
||||
v-if="proviteData?.otherReport && proviteData?.otherReport.url">
|
||||
<el-icon class="elView" v-if="proviteData?.otherReport.name">
|
||||
<View @click="openFile(proviteData?.otherReport.nam)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.otherReport.url">{{ proviteData?.otherReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { userReportGoNetById } from '@/api/supervision-boot/interfere'
|
||||
// import el-descriptions-item from './components/detailsItem.vue'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
applyTitle: propTypes.string.def(undefined)
|
||||
})
|
||||
const netInReportList: any = ref([])
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
//用户性质数组
|
||||
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 dictData = useDictData()
|
||||
//字典获取敏感电能质量指标
|
||||
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 getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
userReportGoNetById({ id: props.id }).then(r => {
|
||||
getUserReportById(r.data.userReportId).then(res => {
|
||||
detailData.value = res.data
|
||||
detailData.value.otherReport = r.data.otherReport
|
||||
getProviteData()
|
||||
})
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性终端类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
proviteData.value.otherReport = detailData.value.otherReport
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感终端清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
await getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
|
||||
if (proviteData.value.otherReport) {
|
||||
await getFileNamePath(proviteData.value.otherReport, 'otherReport')
|
||||
}
|
||||
|
||||
// 入网评估报告
|
||||
if (detailData.value.netInReport.length > 0 && detailData.value.netInReport[0] != null) {
|
||||
netInReportList.value = []
|
||||
detailData.value.netInReport.forEach((item: any) => {
|
||||
getFileNamePath(item, 'netInReport')
|
||||
})
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
//其他附件
|
||||
else if (pathName == 'otherReport' && proviteData.value.otherReport) {
|
||||
proviteData.value.otherReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
} else if (pathName == 'netInReport') {
|
||||
netInReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
|
||||
// .details {
|
||||
// width: 100%;
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
// }
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
:deep(.el-descriptions__label) {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
:deep(.el-descriptions__content) {
|
||||
width: 30%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,483 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='项目名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称' clearable maxlength="32"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
</div>
|
||||
|
||||
<el-dialog title='干扰源用户详细信息' v-if='dialogVisible' v-model='dialogVisible' width='65%' :append-to-body='true'
|
||||
:close-on-click-modal='false' draggable>
|
||||
<BpmUserReportDetail :id='interId' ref='detailsRef'></BpmUserReportDetail>
|
||||
</el-dialog>
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref='addForms' @onSubmit='tableStore.index()' :update='update' :normalizedControl='true' openType='create'>
|
||||
</addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
defineOptions({
|
||||
name: 'supervision/interferenceUserTable'
|
||||
})
|
||||
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import { getUserReportById, getUserReportByFangAnId } from '@/api/supervision-boot/interfere'
|
||||
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
|
||||
|
||||
const dictData = useDictData()
|
||||
const flag = ref(false)
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const jb_pl = ref(false)
|
||||
const jb_dky = ref(false)
|
||||
const update = ref(false)
|
||||
const addForms = ref()
|
||||
jb_pl.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_pl'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
jb_dky.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_dky'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getNormalUserPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '信息更新状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '详细信息',
|
||||
minWidth: 100,
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
update.value = row.status == null ? false : true
|
||||
setTimeout(() => {
|
||||
open(row)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 300,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
},
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return (
|
||||
row.createBy != adminInfo.$state.id ||
|
||||
!(row.status == 0 || row.status == 2 || row.status == null)
|
||||
)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0 || row.status == 2 || row.status == null)
|
||||
},
|
||||
click: row => {
|
||||
update.value = row.status == null ? false : true
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({ title: '重新发起', row: row })
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '入网设计方案申请',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return jb_pl.value || jb_dky.value
|
||||
// },
|
||||
click: row => {
|
||||
toFangAn(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '治理工程验收申请',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.needGovernance == 0 //&& row.type == true
|
||||
},
|
||||
showDisabled: row => {
|
||||
return row.type == false
|
||||
},
|
||||
click: row => {
|
||||
toFangAn(row, 1)
|
||||
}
|
||||
}
|
||||
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '/',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return !jb_pl.value && !jb_dky.value
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.dataType = 0
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
const dialogVisible = ref(false)
|
||||
const interId = ref()
|
||||
provide('tableStore', tableStore)
|
||||
const detailsRef = ref(null)
|
||||
/** 打开弹窗 */
|
||||
const open = async val => {
|
||||
interId.value = val.id
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await userReportRenewalCancel(data).then(res => {
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
const needGovernance = ref()
|
||||
/** 方案审查 */
|
||||
const toFangAn = (row: any, typeNo: number) => {
|
||||
//查询详情拿到needGovernance
|
||||
/** 获得数据 */
|
||||
getUserReportById(row.id).then(res => {
|
||||
if (res.data.userType == '0' || res.data.userType == '1') {
|
||||
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
||||
} else if (
|
||||
res.data.userType == '2' ||
|
||||
res.data.userType == '3' ||
|
||||
res.data.userType == '4' ||
|
||||
res.data.userType == '5'
|
||||
) {
|
||||
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
||||
} else if (res.data.userType == '6') {
|
||||
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
||||
}
|
||||
push({
|
||||
name: 'ProgramReview',
|
||||
query: {
|
||||
id: row.id,
|
||||
type: typeNo,
|
||||
needGovernance: needGovernance.value
|
||||
}
|
||||
})
|
||||
flag.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const toFangAnById = (id: string, typeNo: number) => {
|
||||
//查询详情拿到needGovernance
|
||||
/** 获得数据 */
|
||||
getUserReportByFangAnId(id).then(res => {
|
||||
let userId;
|
||||
if (res.data.userType == '0' || res.data.userType == '1') {
|
||||
userId = res.data.userReportProjectPO?.id
|
||||
needGovernance.value = res.data.userReportProjectPO?.needGovernance
|
||||
} else if (
|
||||
res.data.userType == '2' ||
|
||||
res.data.userType == '3' ||
|
||||
res.data.userType == '4' ||
|
||||
res.data.userType == '5'
|
||||
) {
|
||||
userId = res.data.userReportSubstationPO?.id
|
||||
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
|
||||
} else if (res.data.userType == '6') {
|
||||
userId = res.data.userReportSensitivePO?.id
|
||||
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
|
||||
}
|
||||
push({
|
||||
name: 'ProgramReview',
|
||||
query: {
|
||||
id: userId,
|
||||
fangAnId: id,
|
||||
type: typeNo,
|
||||
needGovernance: needGovernance.value
|
||||
}
|
||||
})
|
||||
flag.value = true
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
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 '新建电网工程'
|
||||
}
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
//初始进来时如果有id就直接打开重新发起
|
||||
onMounted(async () => {
|
||||
tableStore.index()
|
||||
})
|
||||
/**
|
||||
* 监听 props.id变了,根据id查询详细数据用户重新发起
|
||||
*/
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return; // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
// 此处较为复杂,需要判断是更新、入网检测、治理工程验收
|
||||
if (props.businessKey == 'user_go_net') {
|
||||
// 入网检测
|
||||
toFangAnById(fullId, 0)
|
||||
} else if (props.businessKey == 'user_treat_check') {
|
||||
// 治理工程验收
|
||||
toFangAnById(fullId, 1)
|
||||
} else {
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}, { immediate: true })
|
||||
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <TableHeader ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='用户名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option
|
||||
v-for='item in areaOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.name'
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
||||
|
||||
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
||||
</template>
|
||||
</TableHeader> -->
|
||||
<div class="header_btn">
|
||||
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
||||
{{ titleButton }}
|
||||
</el-button>
|
||||
<el-button v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)" icon="" type="primary"
|
||||
@click="toGoNet()">
|
||||
{{ titleButton }}
|
||||
</el-button>
|
||||
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
||||
</div>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<addForm v-if="dialogVisible" ref="addForms" :id="bussId" :bussType="bussType" :title="titleButton1"
|
||||
openType="detail" @onSubmit="tableStore.index()"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: 'ProgramReview'
|
||||
})
|
||||
|
||||
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { cancel, userReportGoNetById } from '@/api/supervision-boot/interfere/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import addForm from './addForm.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { Back } from '@element-plus/icons-vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
|
||||
const { go, currentRoute, push } = useRouter()
|
||||
const { query } = useRoute() // 查询参数
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
|
||||
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
||||
const dictData = useDictData()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const adminInfo = useAdminInfo()
|
||||
const jb_pl = ref(false)
|
||||
const jb_dky = ref(false)
|
||||
jb_pl.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_pl'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
jb_dky.value =
|
||||
adminInfo.$state.roleCode.filter(item => {
|
||||
return item == 'jb_dky'
|
||||
}).length != 0
|
||||
? true
|
||||
: false
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
||||
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '用户名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
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: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return !(row.status == 0 || row.status == 3)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0 || row.status == 3)
|
||||
},
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '编辑'
|
||||
setTimeout(() => {
|
||||
addForms.value.open(row)
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '重新发起'
|
||||
setTimeout(() => {
|
||||
addForms.value.open(row)
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.userReportId = bussId.value
|
||||
tableStore.table.params.type = bussType.value
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const bussId = ref()
|
||||
bussId.value = currentRoute.value.query.id
|
||||
|
||||
const bussType = ref()
|
||||
bussType.value = Number(currentRoute.value.query.type)
|
||||
|
||||
const titleButton = ref()
|
||||
const titleButton1 = ref()
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
const handleVisibilityChange = async () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
// 在这里执行页面回到回到当前页签需要做的事情
|
||||
await tableStore.index()
|
||||
} else if (document.visibilityState === 'hidden') {
|
||||
// 在这里执行页面离开时需要做的事情
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
tableStore.index()
|
||||
document.addEventListener('visibilitychange', handleVisibilityChange)
|
||||
if (query.fangAnId) {
|
||||
//根据id查询待编辑的数据
|
||||
await userReportGoNetById({ id: query.fangAnId }).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
dialogVisible.value = true
|
||||
titleButton1.value = '重新发起'
|
||||
setTimeout(() => {
|
||||
res.data.id = query.fangAnId
|
||||
addForms.value.open(res.data)
|
||||
}, 0)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
||||
})
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
if (bussType.value === 0) {
|
||||
titleButton.value = '入网设计方案申请'
|
||||
} else {
|
||||
titleButton.value = '治理工程申请'
|
||||
}
|
||||
const addForms = ref()
|
||||
const toGoNet = () => {
|
||||
dialogVisible.value = true
|
||||
if (bussType.value === 0) {
|
||||
titleButton1.value = '入网设计方案申请'
|
||||
} else {
|
||||
titleButton1.value = '治理工程申请'
|
||||
}
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
}, 0)
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
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">
|
||||
.header_btn {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
padding: 13px 15px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
border: 1px solid #dddfe6;
|
||||
}
|
||||
</style>
|
||||
92
src/views/pqs/supervise_hn/interfere/components/report.vue
Normal file
92
src/views/pqs/supervise_hn/interfere/components/report.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择干扰源类型"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</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 { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const process = [
|
||||
{
|
||||
name: '是',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '否',
|
||||
id: '0'
|
||||
}
|
||||
]
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型'
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{ field: 'auploadTime', title: '报告提交评估时间' }
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<!-- 新增 -->
|
||||
<el-dialog draggable title="未建档干扰用户新增" v-model="userAdd" width="500px" :before-close="cancel">
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">基本信息</el-divider>
|
||||
<el-form :inline="true" ref="formRef" :model="addData" label-width="auto" class="form-one" :rules="rules">
|
||||
<el-form-item label="区域:">
|
||||
<Area ref="areaRef" v-model="addData.orgNo" />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:" prop="loadType">
|
||||
<el-select v-model="addData.loadType" clearable collapse-tags placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addData.userName" clearable placeholder="请输入关键字"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="建档时间:" prop="recordTime">
|
||||
<el-date-picker
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
v-model="addData.recordTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px">
|
||||
<el-button type="primary" class="ml20" @click="config">确定</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { addLoadTypeUser } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
const userAdd = ref(false)
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const rules = reactive({
|
||||
loadType: [{ required: true, message: '请选择干扰源类型', trigger: 'change' }],
|
||||
userName: [{ required: true, message: '请输入干扰源用户名称', trigger: 'blur' }],
|
||||
recordTime: [{ required: true, message: '请选择建档时间', trigger: 'change' }]
|
||||
})
|
||||
const addData = ref({
|
||||
orgNo: dictData.state.area[0].id,
|
||||
loadType: '',
|
||||
userName: '',
|
||||
recordTime: ''
|
||||
})
|
||||
const formRef = ref()
|
||||
// 新增
|
||||
const config = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addLoadTypeUser(addData.value).then((res: any) => {
|
||||
ElMessage.success('新增成功!')
|
||||
emit('onSubmit')
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
formRef.value.resetFields()
|
||||
userAdd.value = false
|
||||
}
|
||||
const open = () => {
|
||||
userAdd.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<el-form-item label="信息安全检测报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.informationSecurityTestReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'informationSecurityTestReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('informationSecurityTestReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="入网设计方案审查报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.NetReport"
|
||||
ref="NetReportRef"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
@change="choose($event, 'NetReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('NetReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="治理工程验收报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.governReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
@change="choose($event, 'governReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('governReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="验收检验报告单:">
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReportSingle"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'acceptanceInspectionReportSingle')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('acceptanceInspectionReportSingle', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收检验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.acceptanceInspectionReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'acceptanceInspectionReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('acceptanceInspectionReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="型式实验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.typeExperimentReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'typeExperimentReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('typeExperimentReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂检验报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.factoryInspectionReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'factoryInspectionReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('factoryInspectionReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="性能检测报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.performanceTestReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'performanceTestReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('performanceTestReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="主接线图:">
|
||||
<el-upload
|
||||
v-model:file-list="form.mainWiringDiagram"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'mainWiringDiagram')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('mainWiringDiagram', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="试运行报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.runTheReport"
|
||||
action=""
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||
:limit="1"
|
||||
@change="choose($event, 'runTheReport')"
|
||||
:auto-upload="false"
|
||||
:before-remove="beforeRemove('runTheReport', '1')"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
|
||||
const form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
|
||||
const formName: any = ref({
|
||||
NetReport: '',
|
||||
governReport: '',
|
||||
informationSecurityTestReport: '',
|
||||
acceptanceInspectionReportSingle: '',
|
||||
acceptanceInspectionReport: '',
|
||||
typeExperimentReport: '',
|
||||
factoryInspectionReport: '',
|
||||
performanceTestReport: '',
|
||||
mainWiringDiagram: '',
|
||||
runTheReport: ''
|
||||
})
|
||||
|
||||
const beforeRemove = (name: any, flag?: string) => {
|
||||
// console.log('🚀 ~ beforeRemove ~ flag:', flag)
|
||||
if (flag == '1') {
|
||||
formName.value[name] = ''
|
||||
}
|
||||
}
|
||||
|
||||
const choose = (e: any, name: string) => {
|
||||
uploadFile(e.raw, '/supervision/').then(res => {
|
||||
formName.value[name] = res.data.name
|
||||
})
|
||||
}
|
||||
|
||||
const submitForm = async (id: string) => {
|
||||
// console.log(form.value)
|
||||
|
||||
let data = []
|
||||
for (let i in form.value) {
|
||||
// form.value.map(item=>item.name)
|
||||
|
||||
if (form.value[i].map(item => item.name).join(',') != '')
|
||||
data.push({
|
||||
supervisionId: id,
|
||||
name: i,
|
||||
url: form.value[i].map(item => item.name).join(','), //formName.value[i],
|
||||
state: 1
|
||||
})
|
||||
}
|
||||
// for (let i in formName.value) {
|
||||
// data.push({
|
||||
// supervisionId: id,
|
||||
// name: i,
|
||||
// url: formName.value[i],
|
||||
// state: 1
|
||||
// })
|
||||
// }
|
||||
|
||||
await addOrUpdateFile(data)
|
||||
}
|
||||
const queryFiles = (id: string) => {
|
||||
reset()
|
||||
getFileById({ id: id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePath(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
let data = val.split(',')
|
||||
for (let i = 0; i < data.length ; i++) {
|
||||
// console.log('🚀 ~ getFileNamePath ~ data:', data[i])
|
||||
|
||||
await getFileNameAndFilePath({ filePath: '/supervision/' + data[i] }).then(res => {
|
||||
res.data.name = res.data.fileName
|
||||
form.value[pathName].push(res.data)
|
||||
// setTimeout(() => {
|
||||
// formName.value[pathName] = res.data.fileName
|
||||
// }, 100)
|
||||
})
|
||||
}
|
||||
}
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
}
|
||||
|
||||
formName.value = {
|
||||
NetReport: '',
|
||||
governReport: '',
|
||||
informationSecurityTestReport: '',
|
||||
acceptanceInspectionReportSingle: '',
|
||||
acceptanceInspectionReport: '',
|
||||
typeExperimentReport: '',
|
||||
factoryInspectionReport: '',
|
||||
performanceTestReport: '',
|
||||
mainWiringDiagram: '',
|
||||
runTheReport: ''
|
||||
}
|
||||
}
|
||||
defineExpose({ submitForm, queryFiles ,reset})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-form-item__content > div:first-child {
|
||||
display: flex;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
margin: 0;
|
||||
.el-upload-list__item {
|
||||
height: 25px;
|
||||
}
|
||||
.el-upload-list__item-file-name {
|
||||
width: 150px !important;
|
||||
height: 25px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
|
||||
<!-- 上传 -->
|
||||
<el-dialog draggable :title="title" v-model="uploadConclusions" width="1500px" :before-close="cancel">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="addForm"
|
||||
label-width="auto"
|
||||
:rules="rules"
|
||||
:disabled="title == '未建档干扰源用户详情' || title == '入网评估报告审核'"
|
||||
>
|
||||
<el-form-item label="所属单位:">
|
||||
<Area v-model="addForm.orgNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select v-model="addForm.loadType" clearable collapse-tags placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addForm.userName" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="建档时间:">
|
||||
<el-input v-model="addForm.recordTime" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估报告上传
|
||||
</el-divider>
|
||||
<el-form label-width="120px">
|
||||
<el-form-item class="item" label="上传文件:">
|
||||
<el-upload
|
||||
v-if="title == '未建档干扰源用户入网报告结论上传'"
|
||||
v-model:file-list="addForm.fileList"
|
||||
ref="upload"
|
||||
action=""
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button type="primary" link @click="download" v-else>
|
||||
{{ addForm.ifilePathName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估结论填报
|
||||
</el-divider>
|
||||
<el-form-item label="是否超标:" style="margin-top: 10px" prop="iIsOverLimit" @change="changeOverLimit">
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="1">是</el-radio>
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
<br v-if="show" />
|
||||
<el-form-item label="超标指标:" style="margin-top: 10px" prop="IOverLimitTarget" v-if="show">
|
||||
<el-checkbox-group v-model="addForm.IOverLimitTarget">
|
||||
<el-checkbox v-for="(item, ind) in exceeded" :label="item.id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br v-if="show" />
|
||||
<el-form-item label="计划采取措施:" style="margin-top: 10px" prop="IPlanStep" v-if="show">
|
||||
<el-select v-model="addForm.IPlanStep" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in takeMeasures"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="入网详情:" style="margin-top: 10px" prop="IDescription">
|
||||
<el-input
|
||||
v-model="addForm.IDescription"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入入网详情"
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="addForm"
|
||||
label-width="auto"
|
||||
ref="form1Ref"
|
||||
style="margin-left: 32px;"
|
||||
:rules="rules"
|
||||
v-if="title == '入网评估报告审核'"
|
||||
>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-form-item label="审核意见:" prop="checkComment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addForm.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form>
|
||||
<div
|
||||
style="display: flex; justify-content: center; margin-top: 30px"
|
||||
v-if="title != '未建档干扰源用户详情' && title != '入网评估报告审核'"
|
||||
>
|
||||
<el-button type="primary" class="ml20" @click="submit(1)">审核</el-button>
|
||||
<el-button type="primary" class="ml20" @click="submit(2)">保存</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px" v-if="title == '入网评估报告审核'">
|
||||
<el-button type="primary" class="ml20" @click="audit(1)">通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="audit(0)">不通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { uploadLoadTypeUserI, getLoadTypeUserById, checkLoadTypeUserI } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const takeMeasures = dictData.getBasicData('Plan_Take')
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const uploadConclusions = ref(false)
|
||||
const show = ref(false)
|
||||
const addForm: any = ref({
|
||||
id: '',
|
||||
orgNo: '',
|
||||
loadType: '',
|
||||
userName: '',
|
||||
recordTime: '',
|
||||
iIsOverLimit: '',
|
||||
IDescription: '',
|
||||
IPlanStep: '',
|
||||
IOverLimitTarget: [],
|
||||
fileList: []
|
||||
})
|
||||
const upload = ref()
|
||||
const title = ref('')
|
||||
const rules = {
|
||||
iIsOverLimit: [{ required: true, message: '请选择是否超标', trigger: 'change' }],
|
||||
IDescription: [{ required: true, message: '请输入入网详情', trigger: 'blur' }],
|
||||
IPlanStep: [{ required: true, message: '请选择计划采取措施', trigger: 'change' }],
|
||||
IOverLimitTarget: [{ required: true, message: '请选择超标指标', trigger: 'change' }],
|
||||
checkComment: [{ required: true, message: '请输入入网详情', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
const form1Ref = ref()
|
||||
|
||||
// 填报 审核
|
||||
const submit = (flag: any) => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
const formData = new FormData()
|
||||
|
||||
addForm.value.fileList.forEach((item: any) => {
|
||||
if (item.raw == undefined) {
|
||||
} else {
|
||||
formData.append('file', item.raw)
|
||||
}
|
||||
})
|
||||
formData.append('id', addForm.value.id)
|
||||
formData.append('IDescription', addForm.value.IDescription)
|
||||
formData.append('iIsOverLimit', addForm.value.iIsOverLimit)
|
||||
formData.append('IPlanStep', addForm.value.IPlanStep)
|
||||
formData.append('IOverLimitTarget', addForm.value.IOverLimitTarget.toString())
|
||||
|
||||
formData.append('status', flag)
|
||||
// 提交
|
||||
uploadLoadTypeUserI(formData).then((res: any) => {
|
||||
ElMessage.success(flag == 1 ? '提交成功!' : '保存成功!')
|
||||
emit('onSubmit')
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 入网审核
|
||||
const audit = (flag: any) => {
|
||||
form1Ref.value?.validate((valid: any) => {
|
||||
if (valid) {
|
||||
checkLoadTypeUserI({
|
||||
checkComment: addForm.value.checkComment,
|
||||
checkPerson: dictData.state.area[0].id,
|
||||
checkResult: flag,
|
||||
id: addForm.value.id
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('操作成功')
|
||||
cancel()
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
upload.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
upload.value!.handleStart(file)
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(addForm.value.ifile)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = addForm.value.ifilePathName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
formRef.value?.resetFields()
|
||||
uploadConclusions.value = false
|
||||
}
|
||||
|
||||
const open = (text: string, row: any) => {
|
||||
title.value = text
|
||||
getLoadTypeUserById({ id: row.id }).then((res: any) => {
|
||||
uploadConclusions.value = true
|
||||
addForm.value = {
|
||||
id: res.data.id,
|
||||
orgNo: res.data.orgNo,
|
||||
loadType: res.data.loadType,
|
||||
userName: res.data.userName,
|
||||
recordTime: res.data.recordTime,
|
||||
iIsOverLimit: res.data.iisOverLimit ? res.data.iisOverLimit : 0,
|
||||
IDescription: res.data.idescription ? res.data.idescription : '',
|
||||
IPlanStep: res.data.iplanStep ? res.data.iplanStep : '',
|
||||
IOverLimitTarget: res.data.ioverLimitTarget ? res.data.ioverLimitTarget.split(',') : [],
|
||||
fileList: res.data.ifilePathName ? [{ name: res.data.ifilePathName, status: 'ready' }] : [],
|
||||
ifilePathName: res.data.ifilePathName ? res.data.ifilePathName : '',
|
||||
ifile: res.data.ifile
|
||||
}
|
||||
res.data.iisOverLimit == 0 ? (show.value = false) : (show.value = true)
|
||||
})
|
||||
}
|
||||
const changeOverLimit = (e: any) => {
|
||||
if (e.target.value == 0) {
|
||||
show.value = false
|
||||
} else {
|
||||
show.value = true
|
||||
}
|
||||
addForm.value.IOverLimitTarget = []
|
||||
addForm.value.IPlanStep = ''
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,832 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程预期投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户性质">
|
||||
{{
|
||||
userTypeList.find(item => {
|
||||
return item.value == detailData.userType
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="归口管理部门">
|
||||
{{ detailData.responsibleDepartment }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="厂站名称">
|
||||
{{ detailData.substation }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电压等级">
|
||||
{{
|
||||
voltageLevelList.find(item => {
|
||||
return item.id == detailData.voltageLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估单位">
|
||||
{{ detailData.evaluationDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估结论" :span="2">
|
||||
{{ detailData.evaluationConclusion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :label="detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
||||
" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.nonlinearLoadType }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否需要治理">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开展背景测试">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="关联终端" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
{{ devIdList[0]?.devName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联监测点" v-if="props.openType != 'create'">
|
||||
<span>
|
||||
<!-- {{ detailData?.lineId }} -->
|
||||
{{ devIdList[0]?.lineList.filter(item => item.lineId == detailData?.lineId)[0].lineName }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||
<span>
|
||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户协议容量(MVA)" v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC供电设备容量(MVA)" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.pccEquipmentCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="基准短路容量(MVA)" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData.baseShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="系统最小短路容量(MVA)" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData?.minShortCircuitCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户用电协议容量(MVA)" v-if="
|
||||
detailData.userType == '2' ||
|
||||
detailData.userType == '3' ||
|
||||
detailData.userType == '4' ||
|
||||
detailData.userType == '5'
|
||||
">
|
||||
{{ proviteData?.userAgreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.pccPoint }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{
|
||||
evaluationTypeList.find(item => {
|
||||
return item.id == proviteData?.evaluationType
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
{{ proviteData?.evaluationChekDept }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||
{{
|
||||
industryList.find(item => {
|
||||
return item.id == proviteData.industry
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||
{{ proviteData.deviceName }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
|
||||
<!-- {{ proviteData.powerSupplyCount }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
|
||||
{{
|
||||
powerSupplyInfoOptionList.find(item => {
|
||||
return item.id == proviteData.powerSupplyInfo
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
|
||||
{{ proviteData.powerSupply }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
|
||||
{{
|
||||
loadLevelOptionList.find(item => {
|
||||
return item.id == proviteData.loadLevel
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="可研报告">
|
||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url" rel="nofollow">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="
|
||||
detailData.userType == 2 ||
|
||||
detailData.userType == 3 ||
|
||||
detailData.userType == 4 ||
|
||||
detailData.userType == 5
|
||||
">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name">
|
||||
<View @click="openFile(proviteData?.feasibilityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData.feasibilityReport?.url">
|
||||
{{ proviteData.feasibilityReport?.name }}
|
||||
</a>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目初步设计说明书">
|
||||
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name">
|
||||
<View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
|
||||
</el-icon>
|
||||
|
||||
<a target="_blank" :href="proviteData?.preliminaryDesignDescription?.url">
|
||||
{{ proviteData?.preliminaryDesignDescription?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReport?.url">
|
||||
{{ proviteData?.predictionEvaluationReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预测评估评审意见报告">
|
||||
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name">
|
||||
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.predictionEvaluationReviewOpinions?.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户接入变电站主接线示意图" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name">
|
||||
<View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.substationMainWiringDiagram?.url">
|
||||
{{ proviteData?.substationMainWiringDiagram?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name">
|
||||
<View @click="openFile(proviteData?.sensitiveDevices?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.sensitiveDevices?.url">
|
||||
{{ proviteData?.sensitiveDevices?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name">
|
||||
<View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.antiInterferenceReport?.url">
|
||||
{{ proviteData?.antiInterferenceReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
|
||||
<el-icon class="elView" v-if="proviteData?.powerQualityReport?.name">
|
||||
<View @click="openFile(proviteData?.powerQualityReport?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.powerQualityReport?.url">
|
||||
{{ proviteData?.powerQualityReport?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他附件"
|
||||
v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url">
|
||||
<el-icon class="elView" v-if="proviteData?.additionalAttachments?.name">
|
||||
<View @click="openFile(proviteData?.additionalAttachments?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="proviteData?.additionalAttachments?.url">
|
||||
{{ proviteData?.additionalAttachments?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="入网评估报告">
|
||||
<div v-for="item in netInReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理评估报告">
|
||||
<div v-for="item in governReportList">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信息安全检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.informationSecurityTestReport[0]?.name">
|
||||
<View @click="openFile(form.informationSecurityTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.informationSecurityTestReport[0]?.url">
|
||||
{{ form.informationSecurityTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网设计方案审查报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<div v-for="item in form.NetReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理工程验收报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<div v-for="item in form.governReport">
|
||||
<el-icon class="elView" v-if="item.name">
|
||||
<View @click="openFile(item.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="item.url">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告单" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReportSingle[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReportSingle[0]?.url">
|
||||
{{ form.acceptanceInspectionReportSingle[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.acceptanceInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.acceptanceInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReport[0]?.url">
|
||||
{{ form.acceptanceInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.typeExperimentReport[0]?.name">
|
||||
<View @click="openFile(form.typeExperimentReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.typeExperimentReport[0]?.url">
|
||||
{{ form.typeExperimentReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出厂检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.factoryInspectionReport[0]?.name">
|
||||
<View @click="openFile(form.factoryInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.factoryInspectionReport[0]?.url">
|
||||
{{ form.factoryInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.performanceTestReport[0]?.name">
|
||||
<View @click="openFile(form.performanceTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.performanceTestReport[0]?.url">
|
||||
{{ form.performanceTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主接线图" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.mainWiringDiagram[0]?.name">
|
||||
<View @click="openFile(form.mainWiringDiagram[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.mainWiringDiagram[0]?.url">
|
||||
{{ form.mainWiringDiagram[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="form.runTheReport[0]?.name">
|
||||
<View @click="openFile(form.runTheReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.runTheReport[0]?.url">
|
||||
{{ form.runTheReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById, getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined),
|
||||
update: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openType: {
|
||||
type: String,
|
||||
default: 'create'
|
||||
}
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const devIdList = ref([])
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||
}
|
||||
const netInReportList: any = ref([])
|
||||
const governReportList: any = ref([])
|
||||
//用户性质数组
|
||||
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 form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//字典获取所在地市
|
||||
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 loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data.userReportMessageJson
|
||||
getProviteData()
|
||||
})
|
||||
} else {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getProviteData()
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
if (props.openType == 'sourcesOfInterference') {
|
||||
queryFiles()
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//可研报告
|
||||
const feasibilityReportRef: any = ref(null)
|
||||
//项目初步设计说明书
|
||||
const preliminaryDesignDescriptionRef: any = ref(null)
|
||||
//预测评估报告
|
||||
const predictionEvaluationReportRef: any = ref(null)
|
||||
//预测评估评审意见报告
|
||||
const predictionEvaluationReviewOpinionsRef: any = ref(null)
|
||||
//用户接入变电站主接线示意图
|
||||
const substationMainWiringDiagramRef: any = ref(null)
|
||||
//主要敏感终端清单
|
||||
const sensitiveDevicesRef: any = ref(null)
|
||||
//抗扰度测试报告
|
||||
const antiInterferenceReportRef: any = ref(null)
|
||||
//背景电能质量测试报告
|
||||
const powerQualityReportRef: any = ref(null)
|
||||
//其他附件
|
||||
const additionalAttachmentsRef: any = ref(null)
|
||||
//预览
|
||||
const preview = (val: any, url: any) => {
|
||||
nextTick(() => {
|
||||
//可研报告
|
||||
if (val == 'feasibilityReport') {
|
||||
feasibilityReportRef?.value.open(url)
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (val == 'preliminaryDesignDescription') {
|
||||
preliminaryDesignDescriptionRef?.value.open(url)
|
||||
}
|
||||
//预测评估报告
|
||||
if (val == 'predictionEvaluationReport') {
|
||||
console.log(url, '9999999')
|
||||
predictionEvaluationReportRef?.value.open(url)
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
if (val == 'predictionEvaluationReviewOpinions') {
|
||||
predictionEvaluationReviewOpinionsRef?.value.open(url)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (val == 'substationMainWiringDiagram') {
|
||||
substationMainWiringDiagramRef?.value.open(url)
|
||||
}
|
||||
//主要敏感终端清单
|
||||
if (val == 'sensitiveDevices') {
|
||||
sensitiveDevicesRef?.value.open(url)
|
||||
}
|
||||
//抗扰度测试报告
|
||||
if (val == 'antiInterferenceReport') {
|
||||
antiInterferenceReportRef?.value.open(url)
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
if (val == 'powerQualityReport') {
|
||||
powerQualityReportRef?.value.open(url)
|
||||
}
|
||||
//其他附件
|
||||
if (val == 'additionalAttachments') {
|
||||
additionalAttachmentsRef?.value.open(url)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryFiles = () => {
|
||||
getFileById({ id: props.id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性终端类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//项目初步设计说明书
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感终端清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
|
||||
// 入网评估报告
|
||||
if (detailData.value.netInReport.length > 0) {
|
||||
netInReportList.value = []
|
||||
detailData.value.netInReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'netInReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 治理评估告"
|
||||
if (detailData.value.governReport.length > 0) {
|
||||
governReportList.value = []
|
||||
detailData.value.governReport.forEach((item: any) => {
|
||||
if (item != null) {
|
||||
getFileNamePath(item, 'governReport')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 调用关联终端接口
|
||||
getByDeptDevLine({ id: detailData.value.orgId }).then(res => {
|
||||
devIdList.value = res.data.filter((item: any) => item.devId == detailData.value.devId)
|
||||
})
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感终端清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
|
||||
if (pathName == 'netInReport') {
|
||||
netInReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
} else if (pathName == 'governReport') {
|
||||
governReportList.value.push({
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const getFileNamePaths = async (val: any, pathName: any) => {
|
||||
let data = val.split(',')
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
await getFileNameAndFilePath({ filePath: '/supervision/' + data[i] }).then(res => {
|
||||
res.data.name = res.data.fileName
|
||||
form.value[pathName].push(res.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
watch(
|
||||
() => props.id,
|
||||
(val, oldVal) => {
|
||||
val && getInfo()
|
||||
}
|
||||
)
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
::v-deep.el-icon svg {
|
||||
// margin: 5px !important;
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
// float: right;
|
||||
}
|
||||
|
||||
// .el-icon {
|
||||
// float: left;
|
||||
// }
|
||||
// a {
|
||||
// display: block;
|
||||
// width: 200px;
|
||||
// float: right;
|
||||
// }
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,404 @@
|
||||
<template>
|
||||
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='项目名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称' clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='流程状态'>
|
||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||
<el-option v-for='item in statusSelect' :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="addList">新增</el-button> -->
|
||||
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
|
||||
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||
<!-- 新增 -->
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 上传 -->
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, onMounted, provide, watch, reactive } 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 Add from './add.vue'
|
||||
import Audit from './audit.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const addRef = ref()
|
||||
const AuditRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getUserReport',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在地市',
|
||||
minWidth: 80
|
||||
// formatter: (obj: any) => {
|
||||
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
||||
// }
|
||||
},
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.fileUploadflag = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.status = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// 新增
|
||||
const addList = () => {
|
||||
addRef.value.open()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
show.value = true
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
}, 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
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 '新建电网工程'
|
||||
}
|
||||
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang='scss'></style>
|
||||
62
src/views/pqs/supervise_hn/interfere/index.vue
Normal file
62
src/views/pqs/supervise_hn/interfere/index.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='未建档用户档案录入管理' name='1'>
|
||||
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='常态化干扰源用户管理' name='3'>
|
||||
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { nextTick, ref, provide } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import undocumented from './components/undocumented/index.vue'
|
||||
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const Undocumented = ref()
|
||||
const InterferenceUserTable = ref()
|
||||
defineOptions({
|
||||
name: 'supervision/interferencemanagement'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const id = ref('')
|
||||
const key = ref('')
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('supervision/interferencemanagement')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else {
|
||||
activeName.value = '3'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
key.value = (route.query.key as string) || 'null'
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
|
||||
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