2024-03-25 20:29:33 +08:00
|
|
|
<template>
|
2024-05-09 18:46:28 +08:00
|
|
|
<TableHeader ref="TableHeaderRef">
|
2024-03-25 20:29:33 +08:00
|
|
|
<template #select>
|
2024-05-09 18:46:28 +08:00
|
|
|
<el-form-item label="工程名称">
|
2024-03-25 20:29:33 +08:00
|
|
|
<el-input
|
2024-05-09 18:46:28 +08:00
|
|
|
v-model="tableStore.table.params.searchValue"
|
2024-03-25 20:29:33 +08:00
|
|
|
clearable
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
2024-05-09 18:46:28 +08:00
|
|
|
<el-form-item label="所属地市">
|
|
|
|
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所属地市">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in areaOptionList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
2024-03-25 20:29:33 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
<template #operation>
|
|
|
|
|
<el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button>
|
2024-04-10 20:33:20 +08:00
|
|
|
|
|
|
|
|
<el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button>
|
2024-03-25 20:29:33 +08:00
|
|
|
</template>
|
|
|
|
|
</TableHeader>
|
|
|
|
|
<Table ref="tableRef" />
|
|
|
|
|
<!-- 新增 -->
|
|
|
|
|
<Add ref="addRef" @onSubmit="tableStore.index()" />
|
|
|
|
|
<!-- 上传 -->
|
|
|
|
|
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
|
|
|
|
import TableStore from '@/utils/tableStore'
|
|
|
|
|
import Table from '@/components/table/index.vue'
|
|
|
|
|
import TableHeader from '@/components/table/header/index.vue'
|
|
|
|
|
import { mainHeight } from '@/utils/layout'
|
|
|
|
|
import Add from './add.vue'
|
|
|
|
|
import Audit from './audit.vue'
|
|
|
|
|
import { useDictData } from '@/stores/dictData'
|
2024-04-10 20:33:20 +08:00
|
|
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
2024-03-25 20:29:33 +08:00
|
|
|
const dictData = useDictData()
|
|
|
|
|
|
|
|
|
|
const TableHeaderRef = ref()
|
2024-04-10 20:33:20 +08:00
|
|
|
const tableRef = ref()
|
2024-03-25 20:29:33 +08:00
|
|
|
const interferenceType = dictData.getBasicData('Interference_Source')
|
2024-05-09 18:46:28 +08:00
|
|
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
2024-03-25 20:29:33 +08:00
|
|
|
|
|
|
|
|
const istatusList = dictData.getBasicData('On-network_Status')
|
|
|
|
|
|
|
|
|
|
const addRef = ref()
|
|
|
|
|
const AuditRef = ref()
|
|
|
|
|
const ruleFormRef = ref()
|
|
|
|
|
const fileList = ref([])
|
|
|
|
|
const tableStore = new TableStore({
|
2024-05-09 18:46:28 +08:00
|
|
|
url: '/supervision-boot/userReport/getUserReport',
|
2024-03-25 20:29:33 +08:00
|
|
|
publicHeight: 65,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
2024-05-09 18:46:28 +08:00
|
|
|
{ title: '序号', type: 'seq', width: 80 },
|
2024-03-25 20:29:33 +08:00
|
|
|
{ field: 'orgName', title: '所属单位' },
|
|
|
|
|
{
|
|
|
|
|
field: 'loadType',
|
|
|
|
|
title: '干扰源类型',
|
|
|
|
|
formatter: row => {
|
|
|
|
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ field: 'userName', title: '干扰源用户名称' },
|
|
|
|
|
{ field: 'recordTime', title: '建档时间' },
|
|
|
|
|
{
|
|
|
|
|
field: 'iisFileUpload',
|
|
|
|
|
title: '是否上传报告',
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
0: 'warning',
|
|
|
|
|
1: 'success'
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
0: '否',
|
|
|
|
|
1: '是'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'istatus',
|
|
|
|
|
title: '入网评估报告状态',
|
|
|
|
|
formatter: row => {
|
|
|
|
|
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '180',
|
|
|
|
|
render: 'buttons',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
2024-04-10 20:33:20 +08:00
|
|
|
title: '审核',
|
2024-03-25 20:29:33 +08:00
|
|
|
type: 'primary',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return !(
|
|
|
|
|
row.istatus == null ||
|
|
|
|
|
istatusList.filter(item => item.code == 'Newly')[0]?.id == row.istatus ||
|
|
|
|
|
istatusList.filter(item => item.code == 'Failed')[0]?.id == row.istatus
|
|
|
|
|
)
|
|
|
|
|
// ||
|
|
|
|
|
// istatusList.filter(item => item.code == 'Failed')[0]?.id == row.istatus
|
|
|
|
|
},
|
|
|
|
|
icon: 'el-icon-Plus',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
click: row => {
|
|
|
|
|
AuditRef.value.open('未建档干扰源用户入网报告结论上传', row)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
text: '查看',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return row.istatus == null
|
|
|
|
|
},
|
|
|
|
|
icon: 'el-icon-Delete',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
click: row => {
|
|
|
|
|
AuditRef.value.open('未建档干扰源用户详情', row)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
|
|
|
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
tableStore.table.params.loadType = ''
|
|
|
|
|
tableStore.table.params.userName = ''
|
|
|
|
|
tableStore.table.params.fileUploadflag = ''
|
|
|
|
|
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
// 新增
|
|
|
|
|
const addList = () => {
|
|
|
|
|
addRef.value.open()
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-10 20:33:20 +08:00
|
|
|
// 导出
|
|
|
|
|
const exportEvent = () => {
|
|
|
|
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
|
|
|
|
form.pageNum = 1
|
|
|
|
|
form.pageSize = tableStore.table.total
|
|
|
|
|
getLoadTypeUserList(form).then(res => {
|
|
|
|
|
tableRef.value.getRef().exportData({
|
|
|
|
|
filename: '未建档非线性用户', // 文件名字
|
|
|
|
|
sheetName: 'Sheet1',
|
|
|
|
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
|
|
|
|
useStyle: true,
|
|
|
|
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
|
|
|
|
columnFilterMethod: function (column: any) {
|
|
|
|
|
return !(column.$columnIndex === 0)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-03-25 20:29:33 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
:deep(.el-upload-list__item) {
|
|
|
|
|
width: 400px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|