冀北项目添加表格导出功能 技术监督添加下载模版上传功能
This commit is contained in:
153
src/views/pqs/supervise_hn/terminal/components/add.vue
Normal file
153
src/views/pqs/supervise_hn/terminal/components/add.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 800px" :before-close="handleClose">
|
||||
<el-form :model="form" :rules="rules" class="form-two" ref="elform" label-width="120px">
|
||||
<el-form-item label="终端编号:" prop="id">
|
||||
<el-input
|
||||
clearable
|
||||
:disabled="title == `编辑`"
|
||||
v-model="form.id"
|
||||
placeholder="请输入终端编号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端名称:" prop="name">
|
||||
<el-input clearable v-model="form.name" placeholder="请输入终端名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="送检单位:" prop="inspectionUnit">
|
||||
<el-input clearable v-model="form.inspectionUnit" placeholder="请输入送检单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间:" prop="inspectionTime">
|
||||
<el-date-picker
|
||||
v-model="form.inspectionTime"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="安装位置:" prop="installPlace">
|
||||
<el-input clearable v-model="form.installPlace" placeholder="请输入安装位置"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家:" prop="manufacture">
|
||||
<el-select v-model="form.manufacture" placeholder="请选择生产厂家" clearable class="select">
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始数据报告:">
|
||||
<el-upload
|
||||
v-model:file-list="form.fileList"
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".doc,.docx"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const dialogVisible = ref(false)
|
||||
const title: any = ref('')
|
||||
const form: any = ref({
|
||||
id: '',
|
||||
inspectionUnit: '',
|
||||
inspectionTime: '',
|
||||
installPlace: '',
|
||||
originalReport: '',
|
||||
manufacture: '',
|
||||
name: '',
|
||||
originalName: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
orgName: dictData.state.area[0].name,
|
||||
fileList: []
|
||||
})
|
||||
const elform = ref()
|
||||
const uploadRef = ref()
|
||||
const rules = {
|
||||
id: [{ required: true, message: '请输入终端编号', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请输入终端名称', trigger: 'blur' }],
|
||||
installPlace: [{ required: true, message: '请输入安装位置', trigger: 'blur' }],
|
||||
inspectionUnit: [{ required: true, message: '请输入送检单位', trigger: 'blur' }],
|
||||
inspectionTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
||||
manufacture: [{ required: true, message: '请选择生产厂家', trigger: 'change' }],
|
||||
fileList: [{ required: true, message: '请选择文件', trigger: 'change' }]
|
||||
}
|
||||
const submit = () => {
|
||||
elform.value.validate((valid: any) => {
|
||||
if (title.value == '新增') {
|
||||
insertTerminal(form.value).then(res => {
|
||||
ElMessage.success('新增成功!')
|
||||
handleClose()
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
updateTerminal(form.value).then(res => {
|
||||
ElMessage.success('修改成功!')
|
||||
handleClose()
|
||||
emit('onsubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 上传报告
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadRef.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadRef.value!.handleStart(file)
|
||||
}
|
||||
const choose = (e: any) => {
|
||||
upload(e.raw).then(res => {
|
||||
form.value.originalReport = res.data
|
||||
form.value.originalName = e.name
|
||||
})
|
||||
}
|
||||
|
||||
const open = (row: any) => {
|
||||
title.value = row.title
|
||||
if (row.title == '编辑') {
|
||||
row.row ? (form.value = JSON.parse(JSON.stringify(row.row))) : ''
|
||||
form.value.orgNo = dictData.state.area[0].id
|
||||
form.value.fileList = [{ name: form.value.originalName, status: 'ready', uid: form.value.id }]
|
||||
}
|
||||
dialogVisible.value = true
|
||||
}
|
||||
const handleClose = () => {
|
||||
elform.value.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
79
src/views/pqs/supervise_hn/terminal/components/cycleEch.vue
Normal file
79
src/views/pqs/supervise_hn/terminal/components/cycleEch.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker></TableHeader>
|
||||
<div style="display: flex" v-loading="tableStore.table.loading" :style="{ height: height }">
|
||||
<MyEchart :options="options1" />
|
||||
<MyEchart :options="options2" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ref, provide, onMounted } from 'vue'
|
||||
const options1 = ref()
|
||||
const options2 = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getCycleStatistics',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.id = tableStore.table.params.deptIndex
|
||||
},
|
||||
loadCallback: () => {
|
||||
options1.value = {
|
||||
legend: {
|
||||
data: ['已展开', '未展开']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '已展开',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.expanded)
|
||||
},
|
||||
{
|
||||
name: '未展开',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map(item => item.notExpanded)
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
legend: {
|
||||
data: ['检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.orgStatistics.map(item => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.orgStatistics.map(item => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const height = mainHeight(160).height
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
302
src/views/pqs/supervise_hn/terminal/components/cycleTab.vue
Normal file
302
src/views/pqs/supervise_hn/terminal/components/cycleTab.vue
Normal file
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="终端名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.name"
|
||||
clearable
|
||||
placeholder="请输入终端名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacture"
|
||||
placeholder="请选择生产厂家"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检测结果">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.testResults"
|
||||
placeholder="请选择检测结果"
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in testResultsList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls"
|
||||
:on-change="choose"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button
|
||||
icon="el-icon-Upload"
|
||||
type="primary"
|
||||
style="margin-left: 12px; margin-right: 12px"
|
||||
>
|
||||
excel导入
|
||||
</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 上传检测报告 -->
|
||||
<el-dialog
|
||||
draggable
|
||||
title="上传检测报告__支持批量上传"
|
||||
v-model="showBatchUpload"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-upload
|
||||
multiple
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:limit="999"
|
||||
accept=".doc,.docx"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
<span :style="`color:#f58003`">
|
||||
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
||||
</span>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</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 { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const testResultsList = [
|
||||
{
|
||||
id: 0,
|
||||
name: '未展开'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已展开'
|
||||
}
|
||||
]
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const showBatchUpload = ref(false)
|
||||
const fileList: any = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||
publicHeight: 85,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'id', title: '终端编号' },
|
||||
{
|
||||
field: 'manufacture',
|
||||
title: '生产厂家',
|
||||
formatter(row: any) {
|
||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'installPlace', title: '安装位置' },
|
||||
{ field: 'inspectionUnit', title: '送检单位' },
|
||||
{
|
||||
field: 'testResults',
|
||||
title: '检测结果',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未展开',
|
||||
1: '已展开'
|
||||
}
|
||||
// formatter(row: any) {
|
||||
// return row.cellValue == 0 ? '未展开' : '已展开'
|
||||
// }
|
||||
},
|
||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '250',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载原始数据报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.originalReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载检测报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.inspectionReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 1)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.id = dictData.state.area[0].id
|
||||
tableStore.table.params.testResults = ''
|
||||
tableStore.table.params.manufacture = []
|
||||
tableStore.table.params.type = 1
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 关闭弹窗查询
|
||||
const onsubmit = () => {}
|
||||
// 下载模版
|
||||
const Export = () => {
|
||||
DownloadExport().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// 下载报告
|
||||
const download = (row: any, type: number) => {
|
||||
reportDownload({
|
||||
id: row.id,
|
||||
type: type
|
||||
}).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// excel导入
|
||||
const choose = (e: any) => {
|
||||
batchTerminal(e.raw).then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功,无错误数据!')
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = '模板错误信息' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上传原始报告
|
||||
const UploadOriginal = () => {
|
||||
showBatchUpload.value = true
|
||||
}
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('type', '1')
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('files', item.raw)
|
||||
})
|
||||
importReport(form)
|
||||
.then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.error('上传失败!')
|
||||
}
|
||||
})
|
||||
.catch(response => {
|
||||
// console.log(response);
|
||||
})
|
||||
// fileList.value
|
||||
}
|
||||
const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
showBatchUpload.value = false
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
831
src/views/pqs/supervise_hn/terminal/components/detail.vue
Normal file
831
src/views/pqs/supervise_hn/terminal/components/detail.vue
Normal file
@@ -0,0 +1,831 @@
|
||||
<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="信息安全检测报告">
|
||||
<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="入网设计方案审查报告">
|
||||
<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="治理工程验收报告">
|
||||
<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="验收检验报告单">
|
||||
<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="验收检验报告">
|
||||
<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="型式实验报告">
|
||||
<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="出厂检验报告">
|
||||
<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="性能检测报告">
|
||||
<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="主接线图">
|
||||
<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="试运行报告">
|
||||
<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
|
||||
}
|
||||
|
||||
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,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='运行状态'>
|
||||
<el-select v-model="tableStore.table.params.runF" clearable placeholder="请选择运行状态">
|
||||
<el-option
|
||||
v-for="item in runFlagList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='信息查询'>
|
||||
<el-input style="width:200px;" placeholder="电站名称,终端编号,型号" v-model='tableStore.table.params.searchValue' maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <el-button icon='el-icon-Download' type='primary'>导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' />
|
||||
</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 areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/runManage/getDeviceLedger',
|
||||
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: 'areaName',
|
||||
title: '省公司',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
field: 'gdName',
|
||||
title: '市公司',
|
||||
minWidth: 150
|
||||
},
|
||||
{ field: 'bdName', title: '所属变电站', minWidth: 120 },
|
||||
{ field: 'devName', title: '终端编号', minWidth: 110 },
|
||||
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
||||
{
|
||||
field: 'manufacturer',
|
||||
title: '厂家',
|
||||
minWidth: 80
|
||||
},
|
||||
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
||||
|
||||
{ field: 'ip', title: '终端网络参数', minWidth: 100 },
|
||||
{ field: 'port', title: '端口号', minWidth: 40 },
|
||||
{
|
||||
field: 'runFlag',
|
||||
title: '运行状态',
|
||||
minWidth: 80,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'投运': 'success',
|
||||
'停运': 'danger',
|
||||
'检修': 'warning',
|
||||
'调试': 'warning',
|
||||
'退运': 'danger',
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/* {
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}*/
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
tableStore.table.params.statisticalType = {
|
||||
name: '电网拓扑',
|
||||
code: 'Power_Network'
|
||||
}
|
||||
|
||||
tableStore.table.params.runFlag = []
|
||||
if(tableStore.table.params.runF!=null){
|
||||
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.runF=null
|
||||
tableStore.table.params.runFlag=[]
|
||||
tableStore.table.params.searchValue=''
|
||||
|
||||
const runFlagList = [{id:0,name:'投运'},{id:1,name:'检修'},{id:2,name:'停运'},{id:3,name:'调试'},{id:4,name:'退运'}]
|
||||
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,390 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||
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-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" type="primary" @click="exportExcelTemplate"
|
||||
:loading="loading">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
</el-dialog>
|
||||
<!-- 批量导入 -->
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick, watch } 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 addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
||||
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: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
{ 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: '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',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
// showDisabled: row => {
|
||||
// return (
|
||||
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||
// !(row.dataType == 1)
|
||||
// )
|
||||
// },
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
|
||||
click: row => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
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.setcontroFlag()
|
||||
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.city = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
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 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,
|
||||
dataType: 1,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
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 exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '干扰源用户台账模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||
}
|
||||
|
||||
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.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label='运行状态'>
|
||||
<el-select v-model="tableStore.table.params.runF" clearable placeholder="请选择运行状态">
|
||||
<el-option v-for="item in runFlagList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息查询">
|
||||
<el-input style="width:240px;" placeholder="电站名称,终端编号,监测点名称"
|
||||
v-model="tableStore.table.params.searchValue" maxlength="32" show-word-limit
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</template>
|
||||
|
||||
<template #operation>
|
||||
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</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 areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/runManage/getLineLedger',
|
||||
publicHeight: 65,
|
||||
isWebPaging: true,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'areaName',
|
||||
title: '省公司',
|
||||
minWidth: 100
|
||||
},
|
||||
|
||||
{ field: 'gdName', title: '市公司', minWidth: 150 },
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '所属变电站',
|
||||
minWidth: 150
|
||||
},
|
||||
{ field: 'lineName', title: '监测点名称', minWidth: 130 },
|
||||
{ field: 'scale', title: '监测点电压等级', minWidth: 120 },
|
||||
|
||||
{ field: 'loadType', title: '干扰源类型', minWidth: 120 },
|
||||
{ field: 'objName', title: '监测对象名称', minWidth: 180 },
|
||||
{
|
||||
field: 'shortCapacity',
|
||||
title: '最小短路容量(MVA)',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'devCapacity',
|
||||
title: '供电终端容量(MVA )',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'dealCapacity',
|
||||
title: '用户协议容量(MVA)',
|
||||
minWidth: 150
|
||||
},
|
||||
/* { field: 'comFlag', title: '通讯状态 ', minWidth: 120 },*/
|
||||
{ field: 'id', title: '监测点序号', minWidth: 90 },
|
||||
{
|
||||
field: 'runFlag',
|
||||
title: '运行状态',
|
||||
minWidth: 80,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
'投运': 'success',
|
||||
'停运': 'danger',
|
||||
'检修': 'warning',
|
||||
'调试': 'warning',
|
||||
'退运': 'danger',
|
||||
|
||||
},
|
||||
},
|
||||
{ field: 'devName', title: '监测终端编号 ', minWidth: 140 },
|
||||
{ field: 'ptType', title: '监测终端接线方式', minWidth: 140 },
|
||||
{
|
||||
field: 'voltageDev',
|
||||
title: '电压偏差上限(%)',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
field: 'uvoltageDev',
|
||||
title: '电压偏差下限(%)',
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
|
||||
/* {
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}*/
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
|
||||
tableStore.table.params.runFlag = []
|
||||
if (tableStore.table.params.runF != null) {
|
||||
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||
}
|
||||
tableStore.table.params.comFlag = [0, 1]
|
||||
tableStore.table.params.statisticalType = {
|
||||
name: '电网拓扑',
|
||||
code: 'Power_Network'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.runF = null
|
||||
tableStore.table.params.runFlag = []
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
|
||||
const runFlagList = [{ id: 0, name: '运行' }, { id: 1, name: '检修' }, { id: 2, name: '停运' }, { id: 3, name: '调试' }, { id: 4, name: '退运' }]
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker></TableHeader>
|
||||
<div style="display: flex" v-loading="tableStore.table.loading" :style="{ height: height }">
|
||||
<MyEchart :options="options1" />
|
||||
<MyEchart :options="options2" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ref, provide, onMounted } from 'vue'
|
||||
const options1 = ref()
|
||||
const options2 = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getStatistics',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.id = tableStore.table.params.deptIndex
|
||||
},
|
||||
loadCallback: () => {
|
||||
options1.value = {
|
||||
legend: {
|
||||
data: ['日检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.dateStatistics.map((item:any) => item.statisticsDate)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '日检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.dateStatistics.map((item:any) => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
legend: {
|
||||
data: ['检测终端数量']
|
||||
},
|
||||
xAxis: {
|
||||
data: tableStore.table.data.orgStatistics.map((item:any) => item.orgName)
|
||||
},
|
||||
yAxis: {
|
||||
name: '台'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '检测终端数量',
|
||||
type: 'bar',
|
||||
|
||||
data: tableStore.table.data.orgStatistics.map((item:any) => item.count)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const height = mainHeight(160).height
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
372
src/views/pqs/supervise_hn/terminal/components/networkTab.vue
Normal file
372
src/views/pqs/supervise_hn/terminal/components/networkTab.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="终端名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.name"
|
||||
clearable
|
||||
placeholder="请输入终端名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacture"
|
||||
placeholder="请选择生产厂家"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in manufactorList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检测结果">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.testResults"
|
||||
placeholder="请选择检测结果"
|
||||
clearable
|
||||
class="select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in testResultsList"
|
||||
: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="add">新增</el-button>
|
||||
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
action=""
|
||||
accept=".xls"
|
||||
:on-change="choose"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button
|
||||
icon="el-icon-Upload"
|
||||
type="primary"
|
||||
style="margin-left: 12px; margin-right: 12px"
|
||||
>
|
||||
excel导入
|
||||
</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
||||
<!-- 上传原始报告 -->
|
||||
<el-dialog
|
||||
draggable
|
||||
title="上传原始报告__支持批量上传"
|
||||
v-model="showBatchUpload"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-upload
|
||||
multiple
|
||||
action=""
|
||||
:auto-upload="false"
|
||||
:limit="999"
|
||||
accept=".doc,.docx"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</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 newlyIncreased from './add.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
DownloadExport,
|
||||
reportDownload,
|
||||
batchTerminal,
|
||||
delTerminal,
|
||||
getTerminalPage,
|
||||
importReport
|
||||
} from '@/api/process-boot/terminal'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||
const testResultsList = [
|
||||
{
|
||||
id: 0,
|
||||
name: '未展开'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已展开'
|
||||
}
|
||||
]
|
||||
|
||||
const fileList: any = ref([])
|
||||
const TableHeaderRef = ref()
|
||||
const addRef = ref()
|
||||
const showBatchUpload = ref(false)
|
||||
const tableRef = ref()
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||
publicHeight: 85,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'id', title: '终端编号' },
|
||||
{ field: 'name', title: '终端名称' },
|
||||
{
|
||||
field: 'manufacture',
|
||||
title: '生产厂家',
|
||||
formatter(row: any) {
|
||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'installPlace', title: '安装位置' },
|
||||
{ field: 'inspectionUnit', title: '送检单位' },
|
||||
{
|
||||
field: 'testResults',
|
||||
title: '检测结果',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未展开',
|
||||
1: '已展开'
|
||||
}
|
||||
},
|
||||
{ field: 'inspectionTime', title: '检测时间' },
|
||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '250',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
addRef.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
delTerminal([row.id]).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载原始数据报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.originalReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载检测报告',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.inspectionReport == null
|
||||
},
|
||||
click: row => {
|
||||
download(row, 1)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.id = dictData.state.area[0].id
|
||||
tableStore.table.params.testResults = ''
|
||||
tableStore.table.params.manufacture = []
|
||||
tableStore.table.params.type = 0
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
addRef.value.open({
|
||||
title: '新增'
|
||||
})
|
||||
}
|
||||
|
||||
// 下载模版
|
||||
const Export = () => {
|
||||
DownloadExport().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// 下载报告
|
||||
const download = (row: any, type: number) => {
|
||||
reportDownload({
|
||||
id: row.id,
|
||||
type: type
|
||||
}).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
}
|
||||
// excel导入
|
||||
const choose = (e: any) => {
|
||||
batchTerminal(e.raw).then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功,无错误数据!')
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = '模板错误信息' // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getTerminalPage(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 UploadOriginal = () => {
|
||||
showBatchUpload.value = true
|
||||
}
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('type', '0')
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('files', item.raw)
|
||||
})
|
||||
importReport(form)
|
||||
.then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
tableStore.index()
|
||||
} else {
|
||||
ElMessage.error('上传失败!')
|
||||
}
|
||||
})
|
||||
.catch(response => {
|
||||
// console.log(response);
|
||||
})
|
||||
// fileList.value
|
||||
}
|
||||
const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
showBatchUpload.value = false
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class='cn-operate-dialog'
|
||||
v-model='eventDataUploadVisible'
|
||||
:title='title'
|
||||
style='width: 415px'
|
||||
top='25vh'
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' ref='formRef'>
|
||||
<el-form-item label='用户数据文件'>
|
||||
<el-upload
|
||||
v-model:file-list='fileList'
|
||||
ref='uploadEventData'
|
||||
action=''
|
||||
:limit='1'
|
||||
:on-exceed='handleExceed'
|
||||
:auto-upload='false'
|
||||
:on-change='choose'
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type='primary'>选择数据文件</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='eventDataUploadVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='submit'>确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive, inject } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { importSensitiveUserData, importSensitiveReportData } from '@/api/supervision-boot/userReport/form'
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
|
||||
const formRef = ref()
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const eventDataUploadVisible = ref(false)
|
||||
const title = ref('')
|
||||
const uploadEventData = ref<UploadInstance>()
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
file: null
|
||||
})
|
||||
|
||||
//弹出界面,默认选择用户的第一个生产线的第一条进线进行数据导入
|
||||
const open = async (text: string) => {
|
||||
title.value = text
|
||||
resetForm()
|
||||
form.file = null
|
||||
fileList.value = []
|
||||
eventDataUploadVisible.value = true
|
||||
}
|
||||
|
||||
//重置表单内容
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择待上传文件
|
||||
*/
|
||||
const choose = (e: any) => {
|
||||
form.file = e.raw
|
||||
}
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
uploadEventData.value!.clearFiles()
|
||||
const file = files[0] as UploadRawFile
|
||||
file.uid = genFileId()
|
||||
uploadEventData.value!.handleStart(file)
|
||||
fileList.value = [{ name: file.name, url: '' }]
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = async () => {
|
||||
if (form.file) {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let data = new FormData()
|
||||
data.append('file', form.file)
|
||||
const allowedTypes = ['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
|
||||
if (!allowedTypes.includes(form.file.type)) {
|
||||
return ElMessage.warning('只能上传 Excel 文件 (.xls 或 .xlsx)!')
|
||||
}
|
||||
|
||||
if (title.value === '导入干扰源用户') {
|
||||
await importSensitiveReportData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.finally(() => {
|
||||
tableStore.index()
|
||||
eventDataUploadVisible.value = false
|
||||
})
|
||||
} else {
|
||||
await importSensitiveUserData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.finally(() => {
|
||||
tableStore.index()
|
||||
eventDataUploadVisible.value = false
|
||||
})
|
||||
}
|
||||
// if (title.value == '导入干扰源用户') {
|
||||
// await importSensitiveReportData(data)
|
||||
// .then((res: any) => {
|
||||
// if (res.type === 'application/json') {
|
||||
// // 说明是普通对象数据,读取信息
|
||||
// const fileReader = new FileReader()
|
||||
// fileReader.onloadend = () => {
|
||||
// try {
|
||||
// const jsonData = JSON.parse(fileReader.result)
|
||||
// // 后台信息
|
||||
// if (jsonData.code === 'A0000') {
|
||||
// ElMessage.success('导入成功')
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// }
|
||||
// fileReader.readAsText(res)
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// let blob = new Blob([res], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const url = window.URL.createObjectURL(blob)
|
||||
// const link = document.createElement('a')
|
||||
// link.href = url
|
||||
// link.download = '干扰源用户失败列表'
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// link.remove()
|
||||
// }
|
||||
// })
|
||||
// .finally(() => {
|
||||
// tableStore.index()
|
||||
// eventDataUploadVisible.value = false
|
||||
// })
|
||||
// } else {
|
||||
// await importSensitiveUserData(data)
|
||||
// .then((res: any) => {
|
||||
// if (res.type === 'application/json') {
|
||||
// // 说明是普通对象数据,读取信息
|
||||
// const fileReader = new FileReader()
|
||||
// fileReader.onloadend = () => {
|
||||
// try {
|
||||
// const jsonData = JSON.parse(fileReader.result)
|
||||
// // 后台信息
|
||||
// if (jsonData.code === 'A0000') {
|
||||
// ElMessage.success('导入成功')
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// }
|
||||
// fileReader.readAsText(res)
|
||||
// } else {
|
||||
// ElMessage.error('导入失败,请查看下载附件!')
|
||||
// let blob = new Blob([res], {
|
||||
// type: 'application/vnd.ms-excel'
|
||||
// })
|
||||
// const url = window.URL.createObjectURL(blob)
|
||||
// const link = document.createElement('a')
|
||||
// link.href = url
|
||||
// link.download = '敏感及重要用户失败列表'
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// link.remove()
|
||||
// }
|
||||
// })
|
||||
// .finally(() => {
|
||||
// tableStore.index()
|
||||
// eventDataUploadVisible.value = false
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessage.error('请选择数据文件')
|
||||
}
|
||||
}
|
||||
|
||||
async function handleImportResponse(title: any, res: any) {
|
||||
if (res.type === 'application/json') {
|
||||
const fileReader = new FileReader()
|
||||
fileReader.onloadend = () => {
|
||||
try {
|
||||
const jsonData = JSON.parse(fileReader.result)
|
||||
if (jsonData.code === 'A0000') {
|
||||
ElMessage.success('导入成功')
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
fileReader.readAsText(res)
|
||||
} else {
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = title.includes('干扰源用户') ? '干扰源用户失败列表' : '敏感及重要用户失败列表'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-form-item__content div {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||
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-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" type="primary" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||
<DetailInfo :id="userId"></DetailInfo>
|
||||
</el-dialog>
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
||||
</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 { useDictData } from '@/stores/dictData'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
||||
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: 'city', title: '所在地市', minWidth: 80 },
|
||||
{
|
||||
field: 'substation',
|
||||
title: '厂站名称',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
|
||||
{
|
||||
field: 'userReportSensitivePO.loadLevel',
|
||||
title: '负荷级别',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'userReportSensitivePO.powerSupplyInfo',
|
||||
title: '供电电源情况',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '可研',
|
||||
1: '建设',
|
||||
2: '运行',
|
||||
3: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
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',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return (
|
||||
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||
!(row.dataType == 1)
|
||||
)
|
||||
},
|
||||
// disabled: row => {
|
||||
// return !(row.status == 0)
|
||||
// },
|
||||
click: row => {
|
||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
const addForms = ref()
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
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 addFormModel = () => {
|
||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
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 exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveUserTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '敏感及重要用户模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader datePicker area nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="信息查询">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入变电站/监测点名称"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32" show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation></template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :showOverflow="false" />
|
||||
</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'
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/PollutionSubstation/substationInfo',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
isWebPaging: true,
|
||||
paramsPOST: true,
|
||||
column: [
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'deptName', title: '所在地市', minWidth: 100 },
|
||||
{ field: 'substationName', title: '变电站名称', minWidth: 100 },
|
||||
|
||||
{
|
||||
field: 'dwLineList',
|
||||
title: '电网侧监测点名称',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return obj.cellValue.length == 0 ? '/' : obj.cellValue.join('\n')
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'yhLineList',
|
||||
title: '非电网侧监测点名称',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return obj.cellValue.length == 0 ? '/' : obj.cellValue.join('\n')
|
||||
}
|
||||
},
|
||||
{ field: 'alarmFreq', title: '告警频次', minWidth: 80 },
|
||||
{ field: 'vpollutionData', title: '谐波电压污染值', minWidth: 80 },
|
||||
{ field: 'ipollutionData', title: '谐波电流污染值', minWidth: 80 }
|
||||
]
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
66
src/views/pqs/supervise_hn/terminal/index.vue
Normal file
66
src/views/pqs/supervise_hn/terminal/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='干扰源用户台账' name='1'>
|
||||
<interferenceUserTable :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='敏感及重要用户台账' name='2'>
|
||||
<sensitiveUserTable v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='变电站台账' name='3'>
|
||||
<substationLedger v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='终端台账' name='4'>
|
||||
<deviceLedgerTable v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='监测点台账' name='5'>
|
||||
<monitorLedgerTable v-if="activeName == '5'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
import interferenceUserTable from './components/interferenceUserTable.vue'
|
||||
import sensitiveUserTable from './components/sensitiveUserTable.vue'
|
||||
import substationLedger from './components/substationLedger.vue'
|
||||
import deviceLedgerTable from './components/deviceLedgerTable.vue'
|
||||
import monitorLedgerTable from './components/monitorLedgerTable.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
|
||||
defineOptions({
|
||||
name: 'Supervision/Terminaldetection'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('Supervision/Terminaldetection')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == 'null') { }
|
||||
else if (type == '1') {
|
||||
activeName.value = '1'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, { 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