修改表格操作列
This commit is contained in:
@@ -1,72 +1,115 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
//事件报告
|
|
||||||
export function getEventReport(data) {
|
//事件报告
|
||||||
return createAxios({
|
export function getEventReport(data) {
|
||||||
url: '/event-boot/report/getEventReport',
|
return createAxios({
|
||||||
method: 'post',
|
url: '/event-boot/report/getEventReport',
|
||||||
data
|
method: 'post',
|
||||||
})
|
data
|
||||||
}
|
})
|
||||||
// 生成报告
|
}
|
||||||
export function getAreaReport(data) {
|
// 生成报告
|
||||||
return createAxios({
|
export function getAreaReport(data) {
|
||||||
url: '/event-boot/report/getAreaReport',
|
return createAxios({
|
||||||
method: 'post',
|
url: '/event-boot/report/getAreaReport',
|
||||||
data,
|
method: 'post',
|
||||||
responseType: 'blob'
|
data,
|
||||||
})
|
responseType: 'blob'
|
||||||
}
|
}).then(async res => {
|
||||||
//查询所有模板
|
let load: any = await readJsonBlob(res)
|
||||||
export function getList(data) {
|
if (load.code) {
|
||||||
return createAxios({
|
if (load.data.code == 'A0011') {
|
||||||
url: '/system-boot/EventTemplate/getList',
|
ElMessage.warning('下载失败!')
|
||||||
method: 'post',
|
} else {
|
||||||
data
|
ElMessage.warning(load.data.message)
|
||||||
})
|
}
|
||||||
}
|
} else {
|
||||||
export function selectReleation(data) {
|
return res
|
||||||
return createAxios({
|
}
|
||||||
url: '/system-boot/EventTemplate/selectReleation',
|
})
|
||||||
method: 'post',
|
}
|
||||||
params: data
|
async function readJsonBlob(blob) {
|
||||||
})
|
try {
|
||||||
}
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
export function getLineExport(data) {
|
const jsonStr = await blob.text()
|
||||||
return createAxios({
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
url: '/event-boot/report/getLineExport',
|
const jsonData = JSON.parse(jsonStr)
|
||||||
method: 'post',
|
// 3. 拿到数据,后续随便用
|
||||||
data: data,
|
return {
|
||||||
responseType: 'blob'
|
code: true,
|
||||||
})
|
data: jsonData
|
||||||
}
|
}
|
||||||
export function getVoltage(data: any) {
|
} catch (err) {
|
||||||
return createAxios({
|
return {
|
||||||
url: '/event-boot/report/getVoltage',
|
code: false,
|
||||||
method: 'post',
|
data: {}
|
||||||
data
|
}
|
||||||
})
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
}
|
}
|
||||||
export function getGeneralSituation(data: any) {
|
}
|
||||||
return createAxios({
|
|
||||||
url: '/event-boot/report/getGeneralSituation',
|
//查询所有模板
|
||||||
method: 'post',
|
export function getList(data) {
|
||||||
data
|
return createAxios({
|
||||||
})
|
url: '/system-boot/EventTemplate/getList',
|
||||||
}
|
method: 'post',
|
||||||
export function getTransientValue(data: any) {
|
data
|
||||||
return createAxios({
|
})
|
||||||
url: '/event-boot/transient/getTransientValue',
|
}
|
||||||
method: 'post',
|
export function selectReleation(data) {
|
||||||
data
|
return createAxios({
|
||||||
})
|
url: '/system-boot/EventTemplate/selectReleation',
|
||||||
}
|
method: 'post',
|
||||||
// 周报导出
|
params: data
|
||||||
export function getExport(data: any) {
|
})
|
||||||
return createAxios({
|
}
|
||||||
url: '/event-boot/report/getExport',
|
export function getLineExport(data) {
|
||||||
method: 'post',
|
return createAxios({
|
||||||
data,
|
url: '/event-boot/report/getLineExport',
|
||||||
responseType: 'blob'
|
method: 'post',
|
||||||
})
|
data: data,
|
||||||
}
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getVoltage(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getVoltage',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getGeneralSituation(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getGeneralSituation',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getTransientValue(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/transient/getTransientValue',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 周报导出
|
||||||
|
export function getExport(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getExport',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,18 +1,48 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
export function getHistoryResult(data: any) {
|
export function getHistoryResult(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/harmonic-boot/harmonic/getHistoryResult',
|
url: '/harmonic-boot/harmonic/getHistoryResult',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// word报告
|
// word报告
|
||||||
export function exportModelJB(data: any) {
|
export function exportModelJB(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/harmonic-boot/exportmodel/exportModelJB',
|
url: '/harmonic-boot/exportmodel/exportModelJB',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
data: data
|
data: data
|
||||||
})
|
}).then(async res => {
|
||||||
}
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
|
|
||||||
export function exportModel(data: any) {
|
export function exportModel(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -6,6 +7,17 @@ export function exportModel(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function areaHarmonicReport(data: any) {
|
export function areaHarmonicReport(data: any) {
|
||||||
@@ -14,5 +26,35 @@ export function areaHarmonicReport(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,176 +1,176 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<!-- date-picker 时间组件 area区域组件-->
|
<!-- date-picker 时间组件 area区域组件-->
|
||||||
<TableHeader date-picker area>
|
<TableHeader date-picker area>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='关键词:'>
|
<el-form-item label='关键词:'>
|
||||||
<el-input
|
<el-input
|
||||||
style='width: 240px'
|
style='width: 240px'
|
||||||
v-model='tableStore.table.params.searchValue'
|
v-model='tableStore.table.params.searchValue'
|
||||||
clearable
|
clearable
|
||||||
placeholder='仅根据用户名/登录名'
|
placeholder='仅根据用户名/登录名'
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<Table ref='tableRef' />
|
<Table ref='tableRef' />
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<PopupEdit ref='popupEdit' />
|
<PopupEdit ref='popupEdit' />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide, defineOptions } from 'vue'
|
import { ref, onMounted, provide, defineOptions } from 'vue'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import PopupEdit from './dialog.vue'
|
import PopupEdit from './dialog.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
|
||||||
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'auth/userlist'
|
name: 'auth/userlist'
|
||||||
})
|
})
|
||||||
const popupEdit = ref()
|
const popupEdit = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
||||||
// publicHeight: 60,
|
// publicHeight: 60,
|
||||||
url: '/user-boot/user/list',
|
url: '/user-boot/user/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '用户名称', field: 'name', minWidth: '130' },
|
{ title: '用户名称', field: 'name', minWidth: '130' },
|
||||||
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
||||||
{ title: '角色', field: 'roleName', minWidth: '130' },
|
{ title: '角色', field: 'roleName', minWidth: '130' },
|
||||||
{ title: '部门', field: 'deptName', minWidth: '200' },
|
{ title: '部门', field: 'deptName', minWidth: '200' },
|
||||||
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
||||||
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
||||||
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
||||||
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
width: '100',
|
width: '100',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'danger',
|
0: 'danger',
|
||||||
1: 'success',
|
1: 'success',
|
||||||
2: 'warning',
|
2: 'warning',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
5: 'danger'
|
5: 'danger'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '注销',
|
0: '注销',
|
||||||
1: '正常',
|
1: '正常',
|
||||||
2: '锁定',
|
2: '锁定',
|
||||||
3: '待审核',
|
3: '待审核',
|
||||||
4: '休眠',
|
4: '休眠',
|
||||||
5: '密码过期'
|
5: '密码过期'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1
|
return row.state !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改密码',
|
title: '修改密码',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Lock',
|
icon: 'el-icon-Lock',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1
|
return row.state !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'password'
|
inputType: 'password'
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '激活',
|
title: '激活',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '注销',
|
title: '注销',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-SwitchButton',
|
icon: 'el-icon-SwitchButton',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1 && row.state !== 3
|
return row.state !== 1 && row.state !== 3
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
item.deptName = item.deptName || '/'
|
item.deptName = item.deptName || '/'
|
||||||
item.phoneShow = item.phone || '/'
|
item.phoneShow = item.phone || '/'
|
||||||
item.roleName = item.role.length ? item.role : '/'
|
item.roleName = item.role.length ? item.role : '/'
|
||||||
switch (item.casualUser) {
|
switch (item.casualUser) {
|
||||||
case 0:
|
case 0:
|
||||||
item.casualUserName = '临时用户'
|
item.casualUserName = '临时用户'
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
item.casualUserName = '长期用户'
|
item.casualUserName = '长期用户'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
item.casualUserName = '/'
|
item.casualUserName = '/'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 注入到子组件
|
// 注入到子组件
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 默认参数 参数多的话可以使用Object.assign方法
|
// 默认参数 参数多的话可以使用Object.assign方法
|
||||||
tableStore.table.params.searchState = 1
|
tableStore.table.params.searchState = 1
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.casualUser = -1
|
tableStore.table.params.casualUser = -1
|
||||||
tableStore.table.params.orderBy = ''
|
tableStore.table.params.orderBy = ''
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 弹框
|
// 弹框
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
popupEdit.value.open('新增用户')
|
popupEdit.value.open('新增用户')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class MQTT {
|
|||||||
localStorage.getItem('MqttUrl') == 'null'
|
localStorage.getItem('MqttUrl') == 'null'
|
||||||
? 'ws://192.168.1.68:8083/mqtt'
|
? 'ws://192.168.1.68:8083/mqtt'
|
||||||
: localStorage.getItem('MqttUrl')
|
: localStorage.getItem('MqttUrl')
|
||||||
|
if (mqttUrl == 'null'||mqttUrl == null) return
|
||||||
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
||||||
this.setupEventListeners()
|
this.setupEventListeners()
|
||||||
|
|
||||||
|
|||||||
@@ -1,125 +1,125 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="新能源场站名称">
|
<el-form-item label="新能源场站名称">
|
||||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!--弹框-->
|
<!--弹框-->
|
||||||
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from './components/addForm.vue'
|
import addForm from './components/addForm.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { delNewStation } from '@/api/device-boot/newEnergy'
|
import { delNewStation } from '@/api/device-boot/newEnergy'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'newEnergy/newEnergyLedger'
|
name: 'newEnergy/newEnergyLedger'
|
||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const newEnergy = dictData.getBasicData('new_station_type')
|
const newEnergy = dictData.getBasicData('new_station_type')
|
||||||
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/newStation/queryPage',
|
url: '/device-boot/newStation/queryPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'name', title: '新能源场站名称' },
|
{ field: 'name', title: '新能源场站名称' },
|
||||||
{
|
{
|
||||||
field: 'stationType',
|
field: 'stationType',
|
||||||
title: '新能源场站类型',
|
title: '新能源场站类型',
|
||||||
|
|
||||||
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'scale',
|
field: 'scale',
|
||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
|
|
||||||
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
},
|
},
|
||||||
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
||||||
{ field: 'longitude', title: '经度' },
|
{ field: 'longitude', title: '经度' },
|
||||||
{ field: 'latitude', title: '纬度' },
|
{ field: 'latitude', title: '纬度' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-edit',
|
icon: 'el-icon-edit',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
addFormRef.value.open({
|
addFormRef.value.open({
|
||||||
title: '修改',
|
title: '修改',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该数据吗?'
|
title: '确定删除该数据吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delNewStation({ ids: row.id }).then(() => {
|
delNewStation({ ids: row.id }).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
loadCallback: () => {}
|
loadCallback: () => {}
|
||||||
})
|
})
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
const add = () => {
|
const add = () => {
|
||||||
addFormRef.value.open({
|
addFormRef.value.open({
|
||||||
title: '新增'
|
title: '新增'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'evaluateDate', title: '评估日期' },
|
{ field: 'evaluateDate', title: '评估日期' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createBy', title: '创建者' },
|
{ field: 'createBy', title: '创建者' },
|
||||||
{ field: 'createTime', title: '创建日期' },
|
{ field: 'createTime', title: '创建日期' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '描述', field: 'remark' },
|
{ title: '描述', field: 'remark' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,315 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
v-model="tableStore.table.params.projectName"
|
v-model="tableStore.table.params.projectName"
|
||||||
clearable
|
clearable
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for="item in areaOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.name"
|
:value="item.name"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
||||||
模板下载
|
模板下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入 -->
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from './components/addForm.vue'
|
import addForm from './components/addForm.vue'
|
||||||
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import DetailInfo from './components/detail.vue'
|
import DetailInfo from './components/detail.vue'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
||||||
})
|
})
|
||||||
|
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getUserLedgerPage',
|
url: '/supervision-boot/userReport/getUserLedgerPage',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '创建人',
|
title: '创建人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '干扰源用户台账模板'
|
link.download = '干扰源用户台账模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getUserReportById(fullId).then(res => {
|
await getUserReportById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,274 +1,274 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- 案例库 -->
|
<!-- 案例库 -->
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="名称">
|
<el-form-item label="名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
||||||
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看常见治理措施</el-button>
|
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看常见治理措施</el-button>
|
||||||
|
|
||||||
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||||
v-if="information">
|
v-if="information">
|
||||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||||
下载常见治理措施
|
下载常见治理措施
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef"></Table>
|
<Table ref="tableRef"></Table>
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
||||||
<!-- 简介详情 -->
|
<!-- 简介详情 -->
|
||||||
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
||||||
<div class="editor" v-html="summary"></div>
|
<div class="editor" v-html="summary"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 抽屉 -->
|
<!-- 抽屉 -->
|
||||||
<drawer ref="drawerRef" />
|
<drawer ref="drawerRef" />
|
||||||
<!-- 文件 -->
|
<!-- 文件 -->
|
||||||
<annex ref="annexRef" />
|
<annex ref="annexRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, provide } from 'vue'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import PopupEdit from './components/form.vue'
|
import PopupEdit from './components/form.vue'
|
||||||
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
||||||
import drawer from './components/drawer.vue'
|
import drawer from './components/drawer.vue'
|
||||||
import annex from './components/annex.vue'
|
import annex from './components/annex.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import katex from "katex";
|
import katex from "katex";
|
||||||
import "katex/dist/katex.css";
|
import "katex/dist/katex.css";
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'database/case'
|
name: 'database/case'
|
||||||
})
|
})
|
||||||
|
|
||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
const drawerRef = ref()
|
const drawerRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const annexRef = ref()
|
const annexRef = ref()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const summary = ref('')
|
const summary = ref('')
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/libcase/pageQuery',
|
url: '/supervision-boot/libcase/pageQuery',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '电能质量事件名称', field: 'name' },
|
{ title: '电能质量事件名称', field: 'name' },
|
||||||
{
|
{
|
||||||
title: '发生地点',
|
title: '发生地点',
|
||||||
field: 'location'
|
field: 'location'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '发生事件',
|
// title: '发生事件',
|
||||||
// field: 'type'
|
// field: 'type'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '事件经过',
|
// title: '事件经过',
|
||||||
// field: 'process'
|
// field: 'process'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '处理措施',
|
// title: '处理措施',
|
||||||
// field: 'measures'
|
// field: 'measures'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '治理效果',
|
// title: '治理效果',
|
||||||
// field: 'effect'
|
// field: 'effect'
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '事件简介',
|
title: '事件简介',
|
||||||
width: '140',
|
width: '140',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
summary.value = row.summary
|
summary.value = row.summary
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
const spans = document.querySelectorAll('span[data-value]');
|
const spans = document.querySelectorAll('span[data-value]');
|
||||||
// 遍历每个 span 标签
|
// 遍历每个 span 标签
|
||||||
spans.forEach(function (span) {
|
spans.forEach(function (span) {
|
||||||
|
|
||||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||||
throwOnError: false,
|
throwOnError: false,
|
||||||
})
|
})
|
||||||
var newDiv = span;
|
var newDiv = span;
|
||||||
newDiv.innerHTML = val;
|
newDiv.innerHTML = val;
|
||||||
|
|
||||||
span.parentNode.replaceChild(newDiv, span);
|
span.parentNode.replaceChild(newDiv, span);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '200',
|
width: '200',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
annexRef.value.open(row)
|
annexRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '下载附件',
|
title: '下载附件',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
annexRef.value.open(row)
|
annexRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !information
|
return !information
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupEditRef.value.open('修改案例', row)
|
popupEditRef.value.open('修改案例', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !information
|
return !information
|
||||||
},
|
},
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
libcaseBeleteyById({ id: row.id }).then(res => {
|
libcaseBeleteyById({ id: row.id }).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadCallback: () => { }
|
loadCallback: () => { }
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// 弹框
|
// 弹框
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
popupEditRef.value.open('新增案例')
|
popupEditRef.value.open('新增案例')
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
||||||
})
|
})
|
||||||
const checkOutTheCriteria = () => {
|
const checkOutTheCriteria = () => {
|
||||||
queryStandardCase().then(res => {
|
queryStandardCase().then(res => {
|
||||||
drawerRef.value.open(res.data)
|
drawerRef.value.open(res.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传
|
// 上传
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
ElMessage.info('上传中,请稍等...')
|
ElMessage.info('上传中,请稍等...')
|
||||||
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
||||||
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
const downloadTheReport = () => {
|
const downloadTheReport = () => {
|
||||||
queryStandardCase().then(res => {
|
queryStandardCase().then(res => {
|
||||||
let urls = res.data
|
let urls = res.data
|
||||||
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
||||||
ElMessage.info('下载中,请稍等...')
|
ElMessage.info('下载中,请稍等...')
|
||||||
downloadFile({ filePath: urls }).then((res: any) => {
|
downloadFile({ filePath: urls }).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: urls.includes('.pdf')
|
type: urls.includes('.pdf')
|
||||||
? 'application/pdf'
|
? 'application/pdf'
|
||||||
: urls.includes('.docx')
|
: urls.includes('.docx')
|
||||||
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
: urls.includes('.xls')
|
: urls.includes('.xls')
|
||||||
? 'application/vnd.ms-excel'
|
? 'application/vnd.ms-excel'
|
||||||
: urls.includes('.xlsx')
|
: urls.includes('.xlsx')
|
||||||
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
: urls.includes('.png')
|
: urls.includes('.png')
|
||||||
? 'image/png'
|
? 'image/png'
|
||||||
: urls.includes('.jpeg')
|
: urls.includes('.jpeg')
|
||||||
? 'image/jpeg'
|
? 'image/jpeg'
|
||||||
: urls.includes('.jpg')
|
: urls.includes('.jpg')
|
||||||
? 'image/jpg'
|
? 'image/jpg'
|
||||||
: ''
|
: ''
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = name
|
link.download = name
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.editor {
|
.editor {
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'createTime'
|
field: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '280',
|
width: '280',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -74,9 +74,14 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电网标志">
|
<el-form-item label="电网标志">
|
||||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
<el-option
|
||||||
</el-select>
|
v-for="item in sign"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.algoDescribe"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
@@ -159,6 +164,8 @@ const tableStore = new TableStore({
|
|||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
field: 'voltageLevel',
|
field: 'voltageLevel',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
|
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -167,6 +174,7 @@ const tableStore = new TableStore({
|
|||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'networkParam',
|
field: 'networkParam',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -175,6 +183,7 @@ const tableStore = new TableStore({
|
|||||||
title: '监测点名称',
|
title: '监测点名称',
|
||||||
field: 'lineName',
|
field: 'lineName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -183,6 +192,7 @@ const tableStore = new TableStore({
|
|||||||
title: '厂家',
|
title: '厂家',
|
||||||
field: 'factoryName',
|
field: 'factoryName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -191,6 +201,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电压(%)',
|
title: '谐波电压(%)',
|
||||||
field: 'harmonicVoltage',
|
field: 'harmonicVoltage',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -199,6 +210,7 @@ const tableStore = new TableStore({
|
|||||||
title: '电压偏差(%)',
|
title: '电压偏差(%)',
|
||||||
field: 'voltageOffset',
|
field: 'voltageOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -207,6 +219,7 @@ const tableStore = new TableStore({
|
|||||||
title: '三相电压不平衡度(%)',
|
title: '三相电压不平衡度(%)',
|
||||||
field: 'voltageUnbalance',
|
field: 'voltageUnbalance',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -215,6 +228,7 @@ const tableStore = new TableStore({
|
|||||||
title: '间谐波电压含有率(%)',
|
title: '间谐波电压含有率(%)',
|
||||||
field: 'interHarmonic',
|
field: 'interHarmonic',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -223,6 +237,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电流(%)',
|
title: '谐波电流(%)',
|
||||||
field: 'harmonicCurrent',
|
field: 'harmonicCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -231,6 +246,7 @@ const tableStore = new TableStore({
|
|||||||
title: '负序电流(%)',
|
title: '负序电流(%)',
|
||||||
field: 'negativeCurrent',
|
field: 'negativeCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -239,6 +255,7 @@ const tableStore = new TableStore({
|
|||||||
title: '频率偏差(%)',
|
title: '频率偏差(%)',
|
||||||
field: 'freqOffset',
|
field: 'freqOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -247,6 +264,7 @@ const tableStore = new TableStore({
|
|||||||
title: '闪变(%)',
|
title: '闪变(%)',
|
||||||
field: 'flicker',
|
field: 'flicker',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -256,7 +274,7 @@ const tableStore = new TableStore({
|
|||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||||
@@ -312,7 +330,7 @@ const tree2List = (list: any, id?: string) => {
|
|||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '更新时间', field: 'updateTime' },
|
{ title: '更新时间', field: 'updateTime' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '计算时间', field: 'updateTime' },
|
{ title: '计算时间', field: 'updateTime' },
|
||||||
{ title: '计算窗口', field: 'timeWindow' },
|
{ title: '计算窗口', field: 'timeWindow' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 150
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数' ,width:'120px',
|
title: '网络参数',
|
||||||
|
width: '120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
|||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||||
|
|
||||||
tableStore.table.data = rest
|
tableStore.table.data = rest
|
||||||
|
|
||||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数' ,width:'120px',
|
title: '网络参数',
|
||||||
|
width: '120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
|||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||||
|
|
||||||
tableStore.table.data = rest
|
tableStore.table.data = rest
|
||||||
|
|
||||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const tableStore = new TableStore({
|
|||||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet.create({
|
luckysheet.create({
|
||||||
container: 'luckysheet',
|
container: 'luckysheet',
|
||||||
@@ -126,7 +126,6 @@ const changetype = (val: any) => {
|
|||||||
reportForm.value = val.reportForm
|
reportForm.value = val.reportForm
|
||||||
}
|
}
|
||||||
const selectChange = () => {
|
const selectChange = () => {
|
||||||
|
|
||||||
if (tableStore.table.data.length != 0) {
|
if (tableStore.table.data.length != 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet && luckysheet?.resize()
|
luckysheet && luckysheet?.resize()
|
||||||
@@ -152,6 +151,10 @@ const exportReport = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,129 +1,141 @@
|
|||||||
<!--业务用户管理界面-->
|
<!--业务用户管理界面-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker area showExport>
|
<TableHeader datePicker area showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable maxlength="32" show-word-limit placeholder="筛选数据" />
|
<el-input
|
||||||
</el-form-item>
|
v-model="tableStore.table.params.searchValue"
|
||||||
</template>
|
clearable
|
||||||
<template v-slot:operation>
|
maxlength="32"
|
||||||
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
show-word-limit
|
||||||
</template>
|
placeholder="筛选数据"
|
||||||
</TableHeader>
|
/>
|
||||||
<!--表格-->
|
</el-form-item>
|
||||||
<Table ref="tableRef"></Table>
|
</template>
|
||||||
</div>
|
<template v-slot:operation>
|
||||||
</template>
|
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
||||||
|
</template>
|
||||||
<script setup lang="ts">
|
</TableHeader>
|
||||||
import { ElMessage } from 'element-plus'
|
<!--表格-->
|
||||||
import TableStore from '@/utils/tableStore'
|
<Table ref="tableRef"></Table>
|
||||||
import Table from '@/components/table/index.vue'
|
</div>
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
</template>
|
||||||
import { onMounted, provide, ref } from 'vue'
|
|
||||||
import { useDictData } from '@/stores/dictData'
|
<script setup lang="ts">
|
||||||
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
defineOptions({
|
import Table from '@/components/table/index.vue'
|
||||||
name: 'harmonic-boot/reate/word'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
})
|
import { onMounted, provide, ref } from 'vue'
|
||||||
const dictData = useDictData()
|
import { useDictData } from '@/stores/dictData'
|
||||||
//区域联级选择
|
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
||||||
const industry = dictData.getBasicData('Interference_Source')
|
|
||||||
//用户信息弹出框
|
defineOptions({
|
||||||
const tableRef = ref()
|
name: 'harmonic-boot/reate/word'
|
||||||
|
})
|
||||||
const tableStore = new TableStore({
|
const dictData = useDictData()
|
||||||
url: '/harmonic-boot/qualifiedReport/pageTable',
|
//区域联级选择
|
||||||
method: 'POST',
|
const industry = dictData.getBasicData('Interference_Source')
|
||||||
column: [
|
//用户信息弹出框
|
||||||
{
|
const tableRef = ref()
|
||||||
title: '序号',
|
|
||||||
width: 80,
|
const tableStore = new TableStore({
|
||||||
formatter: (row: any) => {
|
url: '/harmonic-boot/qualifiedReport/pageTable',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
method: 'POST',
|
||||||
}
|
column: [
|
||||||
},
|
{
|
||||||
{ title: '变电站', field: 'subName', width: 200 },
|
title: '序号',
|
||||||
{ title: '监测点名称', field: 'lineName', width: 200 },
|
width: 80,
|
||||||
{
|
formatter: (row: any) => {
|
||||||
title: '行业类型',
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
field: 'businessType',
|
}
|
||||||
formatter: (row: any) => {
|
},
|
||||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
{ title: '变电站', field: 'subName', width: 200 },
|
||||||
}
|
{ title: '监测点名称', field: 'lineName', width: 200 },
|
||||||
},
|
{
|
||||||
{
|
title: '行业类型',
|
||||||
title: '分类等级',
|
field: 'businessType',
|
||||||
field: 'calssificationGrade',
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '/'
|
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '电压等级', field: 'voltageScale' },
|
{
|
||||||
{
|
title: '分类等级',
|
||||||
title: '上级变电站',
|
field: 'calssificationGrade',
|
||||||
field: 'superiorsSubstation',
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '/'
|
return row.cellValue || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{ title: '电压等级', field: 'voltageScale', minWidth: 80 },
|
||||||
title: '挂接线路',
|
{
|
||||||
field: 'hangLine',
|
title: '上级变电站',
|
||||||
formatter: (row: any) => {
|
field: 'superiorsSubstation',
|
||||||
return row.cellValue || '/'
|
minWidth: 90,
|
||||||
}
|
formatter: (row: any) => {
|
||||||
},
|
return row.cellValue || '/'
|
||||||
{
|
}
|
||||||
title: 'PT变比',
|
},
|
||||||
field: 'pt',
|
{
|
||||||
formatter: (row: any) => {
|
title: '挂接线路',
|
||||||
return row.row.pt1 + '/' + row.row.pt2
|
field: 'hangLine',
|
||||||
}
|
minWidth: 80,
|
||||||
},
|
formatter: (row: any) => {
|
||||||
{
|
return row.cellValue || '/'
|
||||||
title: 'CT变比',
|
}
|
||||||
field: 'ct',
|
},
|
||||||
formatter: (row: any) => {
|
{
|
||||||
return row.row.ct1 + '/' + row.row.ct2
|
title: 'PT变比',
|
||||||
}
|
field: 'pt',
|
||||||
},
|
minWidth: 80,
|
||||||
{ title: '短路容量(MVA)', field: 'shortCapacity' },
|
formatter: (row: any) => {
|
||||||
{ title: '终端容量(MVA)', field: 'deviceCapacity' },
|
return row.row.pt1 + '/' + row.row.pt2
|
||||||
{ title: '协议容量(MVA)', field: 'dealCapacity' },
|
}
|
||||||
{ title: '谐波情况', field: 'harmDes' },
|
},
|
||||||
{ title: '电能质量情况', field: 'powerDes' }
|
{
|
||||||
],
|
title: 'CT变比',
|
||||||
beforeSearchFun: () => {
|
field: 'ct',
|
||||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
minWidth: 80,
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
formatter: (row: any) => {
|
||||||
}
|
return row.row.ct1 + '/' + row.row.ct2
|
||||||
})
|
}
|
||||||
|
},
|
||||||
onMounted(() => {
|
{ title: '短路容量(MVA)', field: 'shortCapacity', minWidth: 80 },
|
||||||
// 加载数据
|
{ title: '终端容量(MVA)', field: 'deviceCapacity', minWidth: 80 },
|
||||||
tableStore.index()
|
{ title: '协议容量(MVA)', field: 'dealCapacity', minWidth: 80 },
|
||||||
})
|
{ title: '谐波情况', field: 'harmDes', minWidth: 80 },
|
||||||
tableStore.table.params.searchValue = ''
|
{ title: '电能质量情况', field: 'powerDes', minWidth: 100 }
|
||||||
provide('tableStore', tableStore)
|
],
|
||||||
// 导出
|
beforeSearchFun: () => {
|
||||||
const exportEvent = () => {
|
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
form.pageNum = 1
|
}
|
||||||
form.pageSize = tableStore.table.total
|
})
|
||||||
pageTable(form).then(res => {
|
|
||||||
tableRef.value.getRef().exportData({
|
onMounted(() => {
|
||||||
filename: '合格率报告', // 文件名字
|
// 加载数据
|
||||||
sheetName: 'Sheet1',
|
tableStore.index()
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
})
|
||||||
useStyle: true,
|
tableStore.table.params.searchValue = ''
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
provide('tableStore', tableStore)
|
||||||
columnFilterMethod: function (column: any) {
|
// 导出
|
||||||
return !(column.$columnIndex === 0)
|
const exportEvent = () => {
|
||||||
}
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
})
|
form.pageNum = 1
|
||||||
})
|
form.pageSize = tableStore.table.total
|
||||||
}
|
pageTable(form).then(res => {
|
||||||
</script>
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ const exportEvent = () => {
|
|||||||
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||||
})
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -41,7 +41,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
||||||
<el-button icon="el-icon-Download" :loading="loading" @click="exportReport" type="primary" v-if="VITE_FLAG">
|
<el-button
|
||||||
|
icon="el-icon-Download"
|
||||||
|
:loading="loading"
|
||||||
|
@click="exportReport"
|
||||||
|
type="primary"
|
||||||
|
v-if="VITE_FLAG"
|
||||||
|
>
|
||||||
下载报告
|
下载报告
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -189,6 +195,10 @@ const exportReport = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -151,6 +151,10 @@ const exportEvent = () => {
|
|||||||
ElMessage('生成报告中...')
|
ElMessage('生成报告中...')
|
||||||
exportModel(form)
|
exportModel(form)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,141 +1,141 @@
|
|||||||
<!--业务用户管理界面-->
|
<!--业务用户管理界面-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<div v-show="addedShow">
|
<div v-show="addedShow">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<Table ref="tableRef"></Table>
|
<Table ref="tableRef"></Table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 设计流程 -->
|
<!-- 设计流程 -->
|
||||||
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
||||||
<!-- 配置表单 -->
|
<!-- 配置表单 -->
|
||||||
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import Allocation from './allocation.vue'
|
import Allocation from './allocation.vue'
|
||||||
import { deleteDeploy } from '@/api/process-boot/bpm'
|
import { deleteDeploy } from '@/api/process-boot/bpm'
|
||||||
import { onMounted, provide, ref } from 'vue'
|
import { onMounted, provide, ref } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import editor from './editor/index.vue'
|
import editor from './editor/index.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: '/flowable/definition/index'
|
name: '/flowable/definition/index'
|
||||||
})
|
})
|
||||||
|
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const allocationRef = ref()
|
const allocationRef = ref()
|
||||||
const model = ref({})
|
const model = ref({})
|
||||||
const addedShow = ref(true)
|
const addedShow = ref(true)
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/flowable/definition/list',
|
url: '/process-boot/flowable/definition/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '流程标识', field: 'flowKey' },
|
{ title: '流程标识', field: 'flowKey' },
|
||||||
{ title: '流程分类', field: 'category' },
|
{ title: '流程分类', field: 'category' },
|
||||||
{ title: '流程名称', field: 'name' },
|
{ title: '流程名称', field: 'name' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '业务功能',
|
title: '业务功能',
|
||||||
field: 'formId',
|
field: 'formId',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '流程版本(V)', field: 'version' },
|
{ title: '流程版本(V)', field: 'version' },
|
||||||
|
|
||||||
|
|
||||||
{ title: '部署时间', field: 'deploymentTime' },
|
{ title: '部署时间', field: 'deploymentTime' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '设计',
|
title: '设计',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
model.value = row
|
model.value = row
|
||||||
addedShow.value = false
|
addedShow.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '配置主表单',
|
title: '配置主表单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
allocationRef.value.open(row)
|
allocationRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteDeploy([row.id]).then(() => {
|
deleteDeploy([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
model.value = {}
|
model.value = {}
|
||||||
addedShow.value = false
|
addedShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const quit = () => {
|
const quit = () => {
|
||||||
addedShow.value = true
|
addedShow.value = true
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
|
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
|
||||||
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
|
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,9 +96,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '谐波49次', field: 'i49', minWidth: '80' },
|
{ title: '谐波49次', field: 'i49', minWidth: '80' },
|
||||||
{ title: '谐波50次', field: 'i50', minWidth: '80' },
|
{ title: '谐波50次', field: 'i50', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
|
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
|
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
|
||||||
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
|
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -184,10 +184,10 @@ const tableStore: any = new TableStore({
|
|||||||
// { field: 'name13', title: '单相负荷', minWidth: 180 },
|
// { field: 'name13', title: '单相负荷', minWidth: 180 },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -1,155 +1,155 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入问题名称"
|
placeholder="请输入问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling
|
<Filling
|
||||||
ref="FillingRef"
|
ref="FillingRef"
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
:isDisabled="true"
|
:isDisabled="true"
|
||||||
:audit="true"
|
:audit="true"
|
||||||
:flag="true"
|
:flag="true"
|
||||||
@beforeClose="beforeClose"
|
@beforeClose="beforeClose"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
|
|
||||||
const list: any = ref({})
|
const list: any = ref({})
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
|
|
||||||
{ field: 'dataDate', title: '提交时间' },
|
{ field: 'dataDate', title: '提交时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报节点',
|
title: '填报节点',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '150',
|
width: '150',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
list.value = row
|
list.value = row
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||||
|
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,255 +1,255 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in auditStatus"
|
v-for="item in auditStatus"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请填写问题名称"
|
placeholder="请填写问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||||
<!-- 填报 -->
|
<!-- 填报 -->
|
||||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<Detail ref="detailRef" />
|
<Detail ref="detailRef" />
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import NewlyAdd from './NewlyAdd.vue'
|
import NewlyAdd from './NewlyAdd.vue'
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import Detail from './detail.vue'
|
import Detail from './detail.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
|
|
||||||
const showNewlyAdded = ref(false)
|
const showNewlyAdded = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
// { width: '60', type: 'checkbox' },
|
// { width: '60', type: 'checkbox' },
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
{ field: 'dataDate', title: '问题新建时间' },
|
{ field: 'dataDate', title: '问题新建时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报进度',
|
title: '填报进度',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'reportProcessStatus',
|
field: 'reportProcessStatus',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
detailRef.value.open(row)
|
detailRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '填报',
|
title: '填报',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return (
|
return (
|
||||||
row.reportProcessStatus == 'Auditt' ||
|
row.reportProcessStatus == 'Auditt' ||
|
||||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||||
row.reportProcess == 'Archived'
|
row.reportProcess == 'Archived'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '归档',
|
title: '归档',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-SuccessFilled',
|
icon: 'el-icon-SuccessFilled',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定归档?'
|
title: '确定归档?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
archive(row.powerQualityProblemNo).then(() => {
|
archive(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('归档成功!')
|
ElMessage.success('归档成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-PieChart',
|
icon: 'el-icon-PieChart',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcess == 'Archived'
|
return row.reportProcess == 'Archived'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.reportProcessStatus = ''
|
tableStore.table.params.reportProcessStatus = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([
|
TableHeaderRef.value.setDatePicker([
|
||||||
{ label: '年', value: 1 },
|
{ label: '年', value: 1 },
|
||||||
{ label: '季', value: 2 },
|
{ label: '季', value: 2 },
|
||||||
{ label: '月', value: 3 }
|
{ label: '月', value: 3 }
|
||||||
])
|
])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
showNewlyAdded.value = true
|
showNewlyAdded.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭弹框
|
// 关闭弹框
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
showNewlyAdded.value = false
|
showNewlyAdded.value = false
|
||||||
}
|
}
|
||||||
// 关闭 填报
|
// 关闭 填报
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ const tableStore = new TableStore({
|
|||||||
title: '最新数据时间'
|
title: '最新数据时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -104,11 +104,11 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -1,67 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{ field: 'planNo', title: '普测计划编号' },
|
{ field: 'planNo', title: '普测计划编号' },
|
||||||
{ field: 'planName', title: '普测计划名称' },
|
{ field: 'planName', title: '普测计划名称' },
|
||||||
{ field: 'planStartTime', title: '开始时间' },
|
{ field: 'planStartTime', title: '开始时间' },
|
||||||
{ field: 'planEndTime', title: '结束时间' },
|
{ field: 'planEndTime', title: '结束时间' },
|
||||||
{ field: 'subCount', title: '普测变电站数量' },
|
{ field: 'subCount', title: '普测变电站数量' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
planAddRef.value.open('计划审核', row)
|
planAddRef.value.open('计划审核', row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,362 +1,362 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="监督类型">
|
<el-form-item label="监督类型">
|
||||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supvTypeOptionList"
|
v-for="item in supvTypeOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||||
import planTest from './planTest.vue'
|
import planTest from './planTest.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
const planTestRef = ref()
|
const planTestRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const auditList: any = ref([])
|
const auditList: any = ref([])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename: '技术监督测试管理',
|
filename: '技术监督测试管理',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'problemFlag',
|
field: 'problemFlag',
|
||||||
title: '是否存在问题',
|
title: '是否存在问题',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'danger',
|
1: 'danger',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '合格',
|
0: '合格',
|
||||||
1: '存在问题',
|
1: '存在问题',
|
||||||
null: '待测试'
|
null: '待测试'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
|
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
|
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '测试填报',
|
title: '测试填报',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != 6
|
return row.status != 6
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
add(row.id)
|
add(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || !row.processInstanceId
|
return row.status == 6 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// planTestRef.value.open('查看计划', row)
|
// planTestRef.value.open('查看计划', row)
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('编辑', row.id, false)
|
planTestRef.value.open('编辑', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: '已取消'
|
: '已取消'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.supvType = ''
|
tableStore.table.params.supvType = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = (id: string) => {
|
const add = (id: string) => {
|
||||||
planTestRef.value.open('计划测试填报', id, true)
|
planTestRef.value.open('计划测试填报', id, true)
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTest(data)
|
await cancelTest(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps(['id', 'businessKey'])
|
const props = defineProps(['id', 'businessKey'])
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (props.businessKey == '3') {
|
if (props.businessKey == '3') {
|
||||||
planTestRef.value.open('编辑', fullId, false)
|
planTestRef.value.open('编辑', fullId, false)
|
||||||
} else {
|
} else {
|
||||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'recordTime', title: '建档时间' },
|
{ field: 'recordTime', title: '建档时间' },
|
||||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="干扰源类型">
|
<el-form-item label="干扰源类型">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in interferenceType"
|
v-for="item in interferenceType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源用户名称">
|
<el-form-item label="干扰源用户名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.userName"
|
v-model="tableStore.table.params.userName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择干扰源用户名称"
|
placeholder="请选择干扰源用户名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联干扰源用户">
|
<el-form-item label="关联干扰源用户">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.relationUserName"
|
v-model="tableStore.table.params.relationUserName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择关联干扰源用户"
|
placeholder="请选择关联干扰源用户"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否已上传实测">
|
<el-form-item label="是否已上传实测">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.aisFileUpload"
|
v-model="tableStore.table.params.aisFileUpload"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择是否已上传实测"
|
placeholder="请选择是否已上传实测"
|
||||||
>
|
>
|
||||||
<el-option label="否" value="0" />
|
<el-option label="否" value="0" />
|
||||||
<el-option label="是" value="1" />
|
<el-option label="是" value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||||
const istatusList = dictData.getBasicData('On-network_Status')
|
const istatusList = dictData.getBasicData('On-network_Status')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox' },
|
{ width: '60', type: 'checkbox' },
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'loadType',
|
field: 'loadType',
|
||||||
title: '干扰源类型',
|
title: '干扰源类型',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'userName', title: '干扰源用户名称' },
|
{ field: 'userName', title: '干扰源用户名称' },
|
||||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||||
{
|
{
|
||||||
field: 'istatus',
|
field: 'istatus',
|
||||||
title: '实测报告状态',
|
title: '实测报告状态',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -188,9 +188,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -167,9 +167,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,217 +1,217 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
v-model="dialogFormVisible"
|
v-model="dialogFormVisible"
|
||||||
title="技术监督计划实施问题"
|
title="技术监督计划实施问题"
|
||||||
width="90%"
|
width="90%"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
draggable
|
draggable
|
||||||
custom-class="fixed-dialog"
|
custom-class="fixed-dialog"
|
||||||
@closed="close"
|
@closed="close"
|
||||||
> -->
|
> -->
|
||||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||||
<!-- <template #select>
|
<!-- <template #select>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for="item in areaOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template> -->
|
</template> -->
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRefs" />
|
<Table ref="tableRefs" />
|
||||||
<!-- </el-dialog> -->
|
<!-- </el-dialog> -->
|
||||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||||
import { getAreaList } from '@/api/common'
|
import { getAreaList } from '@/api/common'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'PlanEffectProblem'
|
name: 'PlanEffectProblem'
|
||||||
})
|
})
|
||||||
const emits = defineEmits([''])
|
const emits = defineEmits([''])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
effectProblemForm: {
|
effectProblemForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const planId: any = ref('')
|
const planId: any = ref('')
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const tableRefs = ref()
|
const tableRefs = ref()
|
||||||
//字典获取问题类型
|
//字典获取问题类型
|
||||||
const problemTypeList = dictData.getBasicData('problem_type')
|
const problemTypeList = dictData.getBasicData('problem_type')
|
||||||
//字典整改情况
|
//字典整改情况
|
||||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||||
//字典问题等级
|
//字典问题等级
|
||||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||||
const effectTableStore = new TableStore({
|
const effectTableStore = new TableStore({
|
||||||
url: '/supervision-boot/superProblem/pageProblem',
|
url: '/supervision-boot/superProblem/pageProblem',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'problemDesc',
|
field: 'problemDesc',
|
||||||
title: '问题描述',
|
title: '问题描述',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevel',
|
field: 'problemLevel',
|
||||||
title: '问题等级',
|
title: '问题等级',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevelReason',
|
field: 'problemLevelReason',
|
||||||
title: '定级依据',
|
title: '定级依据',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemType',
|
field: 'problemType',
|
||||||
title: '问题类型',
|
title: '问题类型',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'rectificationStatus',
|
field: 'rectificationStatus',
|
||||||
title: '整改情况',
|
title: '整改情况',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'rectificationTime',
|
field: 'rectificationTime',
|
||||||
title: '整改时间',
|
title: '整改时间',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue.replace('T', ' ')
|
return row.cellValue.replace('T', ' ')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
handleDetail(row)
|
handleDetail(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleEdit(row)
|
handleEdit(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const { go } = useRouter() // 路由
|
const { go } = useRouter() // 路由
|
||||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||||
planId.value = queryId
|
planId.value = queryId
|
||||||
watch(
|
watch(
|
||||||
() => queryId,
|
() => queryId,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
effectTableStore.table.params.planId = val
|
effectTableStore.table.params.planId = val
|
||||||
effectTableStore.index()
|
effectTableStore.index()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
provide('tableStore', effectTableStore)
|
provide('tableStore', effectTableStore)
|
||||||
const open = () => {
|
const open = () => {
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
dialogFormVisible.value = false
|
dialogFormVisible.value = false
|
||||||
// emits('onSubmit')
|
// emits('onSubmit')
|
||||||
}
|
}
|
||||||
//新增
|
//新增
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addFormRef.value.open({}, 'add')
|
addFormRef.value.open({}, 'add')
|
||||||
}
|
}
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = (row: any) => {
|
const handleDetail = (row: any) => {
|
||||||
addFormRef.value.open(row, 'detail')
|
addFormRef.value.open(row, 'detail')
|
||||||
}
|
}
|
||||||
//修改
|
//修改
|
||||||
const handleEdit = (row: any) => {
|
const handleEdit = (row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
}
|
}
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -176,9 +176,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,382 +1,382 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、监测点"
|
placeholder="输入变电站、监测点"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||||
<!--弹框-->
|
<!--弹框-->
|
||||||
<monitor-quit-popup ref="deviceQuitPopup" />
|
<monitor-quit-popup ref="deviceQuitPopup" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { onMounted, provide, ref, watch } from 'vue'
|
import { onMounted, provide, ref, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/retire'
|
name: 'supervision/retire'
|
||||||
})
|
})
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const deviceQuitPopup = ref()
|
const deviceQuitPopup = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/quitRunningDevice/list',
|
url: '/supervision-boot/quitRunningDevice/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
filename:'监测点状态管理',
|
filename:'监测点状态管理',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||||
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
||||||
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
||||||
{
|
{
|
||||||
title: '变更前状态',
|
title: '变更前状态',
|
||||||
field: 'devOriginalStatus',
|
field: 'devOriginalStatus',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
|
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '投运',
|
0: '投运',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运',
|
4: '退运',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '目标状态',
|
title: '目标状态',
|
||||||
field: 'devStatus',
|
field: 'devStatus',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '投运',
|
0: '投运',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运',
|
4: '退运',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('编辑', row)
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起', row)
|
deviceQuitPopup.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
// for (let key in tableStore.table.params) {
|
// for (let key in tableStore.table.params) {
|
||||||
// if (tableStore.table.params[key] === '') {
|
// if (tableStore.table.params[key] === '') {
|
||||||
// delete tableStore.table.params[key]
|
// delete tableStore.table.params[key]
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// }
|
// }
|
||||||
tableStore.table.params.deviceType = 2
|
tableStore.table.params.deviceType = 2
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.devOriginalStatus =
|
item.devOriginalStatus =
|
||||||
item.devOriginalStatus == 0
|
item.devOriginalStatus == 0
|
||||||
? '运行'
|
? '运行'
|
||||||
: item.devOriginalStatus == 1
|
: item.devOriginalStatus == 1
|
||||||
? '检修'
|
? '检修'
|
||||||
: item.devOriginalStatus == 2
|
: item.devOriginalStatus == 2
|
||||||
? '停运'
|
? '停运'
|
||||||
: item.devOriginalStatus == 3
|
: item.devOriginalStatus == 3
|
||||||
? '调试'
|
? '调试'
|
||||||
: item.devOriginalStatus == 4
|
: item.devOriginalStatus == 4
|
||||||
? '退运'
|
? '退运'
|
||||||
: '/'
|
: '/'
|
||||||
item.devStatus =
|
item.devStatus =
|
||||||
item.devStatus == 0
|
item.devStatus == 0
|
||||||
? '运行'
|
? '运行'
|
||||||
: item.devStatus == 1
|
: item.devStatus == 1
|
||||||
? '检修'
|
? '检修'
|
||||||
: item.devStatus == 2
|
: item.devStatus == 2
|
||||||
? '停运'
|
? '停运'
|
||||||
: item.devStatus == 3
|
: item.devStatus == 3
|
||||||
? '调试'
|
? '调试'
|
||||||
: item.devStatus == 4
|
: item.devStatus == 4
|
||||||
? '退运'
|
? '退运'
|
||||||
: '/'
|
: '/'
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: item.status == 4
|
: item.status == 4
|
||||||
? '已取消'
|
? '已取消'
|
||||||
: item.status == 5
|
: item.status == 5
|
||||||
? '新增'
|
? '新增'
|
||||||
: '/'
|
: '/'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
//新增退运终端信息
|
//新增退运终端信息
|
||||||
const add = () => {
|
const add = () => {
|
||||||
deviceQuitPopup.value.open('新增监测点状态变更')
|
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** 流程实例详情 */
|
/** 流程实例详情 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelQuitRunningDevice(data)
|
await cancelQuitRunningDevice(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getRunningDeviceById(fullId).then(res => {
|
await getRunningDeviceById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
deviceQuitPopup.value.open('重新发起', res.data)
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,378 +1,378 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、终端"
|
placeholder="输入变电站、终端"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||||
<!--弹框-->
|
<!--弹框-->
|
||||||
<device-quit-popup ref="deviceQuitPopup" />
|
<device-quit-popup ref="deviceQuitPopup" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { onMounted, provide, ref, watch } from 'vue'
|
import { onMounted, provide, ref, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/retire'
|
name: 'supervision/retire'
|
||||||
})
|
})
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const deviceQuitPopup = ref()
|
const deviceQuitPopup = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/quitRunningDevice/list',
|
url: '/supervision-boot/quitRunningDevice/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
filename:'终端状态管理',
|
filename:'终端状态管理',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||||
{
|
{
|
||||||
title: '变更前状态',
|
title: '变更前状态',
|
||||||
field: 'devOriginalStatus',
|
field: 'devOriginalStatus',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运',
|
4: '退运',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '目标状态',
|
title: '目标状态',
|
||||||
field: 'devStatus',
|
field: 'devStatus',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运',
|
4: '退运',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('编辑', row)
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起', row)
|
deviceQuitPopup.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
// for (let key in tableStore.table.params) {
|
// for (let key in tableStore.table.params) {
|
||||||
// if (tableStore.table.params[key] === '') {
|
// if (tableStore.table.params[key] === '') {
|
||||||
// delete tableStore.table.params[key]
|
// delete tableStore.table.params[key]
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
tableStore.table.params.deviceType = 1
|
tableStore.table.params.deviceType = 1
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.devOriginalStatus =
|
item.devOriginalStatus =
|
||||||
item.devOriginalStatus == 0
|
item.devOriginalStatus == 0
|
||||||
? '运行'
|
? '运行'
|
||||||
: item.devOriginalStatus == 1
|
: item.devOriginalStatus == 1
|
||||||
? '检修'
|
? '检修'
|
||||||
: item.devOriginalStatus == 2
|
: item.devOriginalStatus == 2
|
||||||
? '停运'
|
? '停运'
|
||||||
: item.devOriginalStatus == 3
|
: item.devOriginalStatus == 3
|
||||||
? '调试'
|
? '调试'
|
||||||
: item.devOriginalStatus == 4
|
: item.devOriginalStatus == 4
|
||||||
? '退运'
|
? '退运'
|
||||||
: '/'
|
: '/'
|
||||||
item.devStatus =
|
item.devStatus =
|
||||||
item.devStatus == 0
|
item.devStatus == 0
|
||||||
? '运行'
|
? '运行'
|
||||||
: item.devStatus == 1
|
: item.devStatus == 1
|
||||||
? '检修'
|
? '检修'
|
||||||
: item.devStatus == 2
|
: item.devStatus == 2
|
||||||
? '停运'
|
? '停运'
|
||||||
: item.devStatus == 3
|
: item.devStatus == 3
|
||||||
? '调试'
|
? '调试'
|
||||||
: item.devStatus == 4
|
: item.devStatus == 4
|
||||||
? '退运'
|
? '退运'
|
||||||
: '/'
|
: '/'
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: item.status == 4
|
: item.status == 4
|
||||||
? '已取消'
|
? '已取消'
|
||||||
: item.status == 5
|
: item.status == 5
|
||||||
? '新增'
|
? '新增'
|
||||||
: '/'
|
: '/'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
//新增退运终端信息
|
//新增退运终端信息
|
||||||
const add = () => {
|
const add = () => {
|
||||||
deviceQuitPopup.value.open('新增终端状态变更')
|
deviceQuitPopup.value.open('新增终端状态变更')
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** 流程实例详情 */
|
/** 流程实例详情 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelQuitRunningDevice(data)
|
await cancelQuitRunningDevice(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getRunningDeviceById(fullId).then(res => {
|
await getRunningDeviceById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
deviceQuitPopup.value.open('重新发起', res.data)
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -221,11 +221,11 @@ const tableStore = new TableStore({
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '220',
|
minWidth: '220',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -138,11 +138,11 @@ const tableStore = new TableStore({
|
|||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '220',
|
minWidth: '220',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -1,214 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择筛选数据"
|
placeholder="请选择筛选数据"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<MyEChart style="flex: 1.2" :options="options1" />
|
<MyEChart style="flex: 1.2" :options="options1" />
|
||||||
<MyEChart style="flex: 2" :options="options2" />
|
<MyEChart style="flex: 2" :options="options2" />
|
||||||
</div>
|
</div>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { info } from 'console'
|
import { info } from 'console'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const options1 = ref({})
|
const options1 = ref({})
|
||||||
const options2 = ref({})
|
const options2 = ref({})
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/system-boot/area/areaSelect',
|
||||||
publicHeight: 345,
|
publicHeight: 345,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '事务名称' },
|
{ field: 'name', title: '事务名称' },
|
||||||
{ field: 'type', title: '事务类型' },
|
{ field: 'type', title: '事务类型' },
|
||||||
{ field: 'createUser', title: '创建人员' },
|
{ field: 'createUser', title: '创建人员' },
|
||||||
{ field: 'companyName', title: '创建部门' },
|
{ field: 'companyName', title: '创建部门' },
|
||||||
{ field: 'modifyUser', title: '处理人员' },
|
{ field: 'modifyUser', title: '处理人员' },
|
||||||
{ field: 'modifyTime', title: '处理时间' },
|
{ field: 'modifyTime', title: '处理时间' },
|
||||||
{ field: 'progressTime', title: '进行时间(天)' },
|
{ field: 'progressTime', title: '进行时间(天)' },
|
||||||
{ field: 'progress', title: '流程状态' },
|
{ field: 'progress', title: '流程状态' },
|
||||||
{ field: 'alertType', title: '预警类型' },
|
{ field: 'alertType', title: '预警类型' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '上传',
|
title: '上传',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: '',
|
type: '',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {}
|
click: async row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.type = ''
|
tableStore.table.params.type = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
info()
|
info()
|
||||||
})
|
})
|
||||||
//渲染图表
|
//渲染图表
|
||||||
const info = () => {
|
const info = () => {
|
||||||
options1.value = {
|
options1.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '商务类型',
|
text: '商务类型',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: ['全部', '预警单', '告警单']
|
data: ['全部', '预警单', '告警单']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
options2.value = {
|
options2.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '事务流程',
|
text: '事务流程',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: [
|
data: [
|
||||||
'全部',
|
'全部',
|
||||||
'开始',
|
'开始',
|
||||||
'预/告警单下发',
|
'预/告警单下发',
|
||||||
'预/告警单反馈',
|
'预/告警单反馈',
|
||||||
'现场测试',
|
'现场测试',
|
||||||
'整改通知单下发',
|
'整改通知单下发',
|
||||||
'整改通知单反馈',
|
'整改通知单反馈',
|
||||||
'完结'
|
'完结'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '2'
|
id: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '3'
|
id: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '4'
|
id: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '5'
|
id: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '6'
|
id: '6'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '新增告警单'
|
title.value = '新增告警单'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
height: 280px;
|
height: 280px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,188 +1,188 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择筛选数据"
|
placeholder="请选择筛选数据"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="事务类型:">
|
<el-form-item label="事务类型:">
|
||||||
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in affairs"
|
v-for="item in affairs"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属流程:">
|
<el-form-item label="所属流程:">
|
||||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in process"
|
v-for="item in process"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const process = [
|
const process = [
|
||||||
{
|
{
|
||||||
name: '开始',
|
name: '开始',
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '预/告警单下发',
|
name: '预/告警单下发',
|
||||||
id: '1'
|
id: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反馈单上传',
|
name: '反馈单上传',
|
||||||
id: '2'
|
id: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '现场测试',
|
name: '现场测试',
|
||||||
id: '3'
|
id: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '整改通知单下发',
|
name: '整改通知单下发',
|
||||||
id: '4'
|
id: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '整改通知单反馈',
|
name: '整改通知单反馈',
|
||||||
id: '5'
|
id: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '完结',
|
name: '完结',
|
||||||
id: '6'
|
id: '6'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const affairs = [
|
const affairs = [
|
||||||
{
|
{
|
||||||
name: '预警单',
|
name: '预警单',
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '告警单',
|
name: '告警单',
|
||||||
id: '1'
|
id: '1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/system-boot/area/areaSelect',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '名称' },
|
{ field: 'name', title: '名称' },
|
||||||
{
|
{
|
||||||
field: 'grade',
|
field: 'grade',
|
||||||
title: '等级'
|
title: '等级'
|
||||||
},
|
},
|
||||||
{ field: 'bigType', title: '策略选择' },
|
{ field: 'bigType', title: '策略选择' },
|
||||||
{ field: 'updateBy', title: '更新人员' },
|
{ field: 'updateBy', title: '更新人员' },
|
||||||
{ field: 'updateTime', title: '更新时间' },
|
{ field: 'updateTime', title: '更新时间' },
|
||||||
{
|
{
|
||||||
field: 'state',
|
field: 'state',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
activeValue: '2',
|
activeValue: '2',
|
||||||
inactiveValue: '1',
|
inactiveValue: '1',
|
||||||
render: 'switch',
|
render: 'switch',
|
||||||
onChangeField: (row: any, value) => {
|
onChangeField: (row: any, value) => {
|
||||||
console.log('🚀 ~ row:', 444123, value)
|
console.log('🚀 ~ row:', 444123, value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '绑定',
|
title: '绑定',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: '',
|
type: '',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {}
|
click: async row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
removeUse({ userIds: row.userId }).then(res => {
|
removeUse({ userIds: row.userId }).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.type = ''
|
tableStore.table.params.type = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '新增告警单'
|
title.value = '新增告警单'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,302 +1,302 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端名称">
|
<el-form-item label="终端名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.name"
|
v-model="tableStore.table.params.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入终端名称"
|
placeholder="请输入终端名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产厂家">
|
<el-form-item label="生产厂家">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacture"
|
v-model="tableStore.table.params.manufacture"
|
||||||
placeholder="请选择生产厂家"
|
placeholder="请选择生产厂家"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in manufactorList"
|
v-for="item in manufactorList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检测结果">
|
<el-form-item label="检测结果">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.testResults"
|
v-model="tableStore.table.params.testResults"
|
||||||
placeholder="请选择检测结果"
|
placeholder="请选择检测结果"
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in testResultsList"
|
v-for="item in testResultsList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action=""
|
action=""
|
||||||
accept=".xls"
|
accept=".xls"
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-Upload"
|
icon="el-icon-Upload"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left: 12px; margin-right: 12px"
|
style="margin-left: 12px; margin-right: 12px"
|
||||||
>
|
>
|
||||||
excel导入
|
excel导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 上传检测报告 -->
|
<!-- 上传检测报告 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
title="上传检测报告__支持批量上传"
|
title="上传检测报告__支持批量上传"
|
||||||
v-model="showBatchUpload"
|
v-model="showBatchUpload"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
multiple
|
multiple
|
||||||
action=""
|
action=""
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
accept=".doc,.docx"
|
accept=".doc,.docx"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-change="chooseBatch"
|
:on-change="chooseBatch"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
>
|
>
|
||||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||||
<span :style="`color:#f58003`">
|
<span :style="`color:#f58003`">
|
||||||
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const testResultsList = [
|
const testResultsList = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未展开'
|
name: '未展开'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '已展开'
|
name: '已展开'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const showBatchUpload = ref(false)
|
const showBatchUpload = ref(false)
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||||
publicHeight: 85,
|
publicHeight: 85,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'id', title: '终端编号' },
|
{ field: 'id', title: '终端编号' },
|
||||||
{
|
{
|
||||||
field: 'manufacture',
|
field: 'manufacture',
|
||||||
title: '生产厂家',
|
title: '生产厂家',
|
||||||
formatter(row: any) {
|
formatter(row: any) {
|
||||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'installPlace', title: '安装位置' },
|
{ field: 'installPlace', title: '安装位置' },
|
||||||
{ field: 'inspectionUnit', title: '送检单位' },
|
{ field: 'inspectionUnit', title: '送检单位' },
|
||||||
{
|
{
|
||||||
field: 'testResults',
|
field: 'testResults',
|
||||||
title: '检测结果',
|
title: '检测结果',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未展开',
|
0: '未展开',
|
||||||
1: '已展开'
|
1: '已展开'
|
||||||
}
|
}
|
||||||
// formatter(row: any) {
|
// formatter(row: any) {
|
||||||
// return row.cellValue == 0 ? '未展开' : '已展开'
|
// return row.cellValue == 0 ? '未展开' : '已展开'
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '250',
|
width: '250',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载原始数据报告',
|
title: '下载原始数据报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.originalReport == null
|
return row.originalReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 0)
|
download(row, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载检测报告',
|
title: '下载检测报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.inspectionReport == null
|
return row.inspectionReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 1)
|
download(row, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
tableStore.table.params.id = dictData.state.area[0].id
|
tableStore.table.params.id = dictData.state.area[0].id
|
||||||
tableStore.table.params.testResults = ''
|
tableStore.table.params.testResults = ''
|
||||||
tableStore.table.params.manufacture = []
|
tableStore.table.params.manufacture = []
|
||||||
tableStore.table.params.type = 1
|
tableStore.table.params.type = 1
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
// 关闭弹窗查询
|
// 关闭弹窗查询
|
||||||
const onsubmit = () => {}
|
const onsubmit = () => {}
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then((res: any) => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const download = (row: any, type: number) => {
|
const download = (row: any, type: number) => {
|
||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// excel导入
|
// excel导入
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
batchTerminal(e.raw).then((res: any) => {
|
batchTerminal(e.raw).then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功,无错误数据!')
|
ElMessage.success('上传成功,无错误数据!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '模板错误信息' // 设置下载的文件名
|
link.download = '模板错误信息' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 上传原始报告
|
// 上传原始报告
|
||||||
const UploadOriginal = () => {
|
const UploadOriginal = () => {
|
||||||
showBatchUpload.value = true
|
showBatchUpload.value = true
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', '1')
|
form.append('type', '1')
|
||||||
fileList.value.forEach((item: any) => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('上传失败!')
|
ElMessage.error('上传失败!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
})
|
})
|
||||||
// fileList.value
|
// fileList.value
|
||||||
}
|
}
|
||||||
const chooseBatch = (e: any) => {
|
const chooseBatch = (e: any) => {
|
||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
showBatchUpload.value = false
|
showBatchUpload.value = false
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,388 +1,388 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader ref="TableHeaderRef" showExport>
|
<TableHeader ref="TableHeaderRef" showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||||
:value="item.name"></el-option>
|
:value="item.name"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-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-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模板下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入 -->
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'干扰源用户台账',
|
filename:'干扰源用户台账',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
// showDisabled: row => {
|
// showDisabled: row => {
|
||||||
// return (
|
// return (
|
||||||
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||||
// !(row.dataType == 1)
|
// !(row.dataType == 1)
|
||||||
// )
|
// )
|
||||||
// },
|
// },
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async() => {
|
const exportExcelTemplate = async() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '干扰源用户台账模板'
|
link.download = '干扰源用户台账模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
},0)
|
},0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getUserReportById(fullId).then(res => {
|
await getUserReportById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,372 +1,372 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端名称">
|
<el-form-item label="终端名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.name"
|
v-model="tableStore.table.params.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入终端名称"
|
placeholder="请输入终端名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产厂家">
|
<el-form-item label="生产厂家">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacture"
|
v-model="tableStore.table.params.manufacture"
|
||||||
placeholder="请选择生产厂家"
|
placeholder="请选择生产厂家"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in manufactorList"
|
v-for="item in manufactorList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检测结果">
|
<el-form-item label="检测结果">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.testResults"
|
v-model="tableStore.table.params.testResults"
|
||||||
placeholder="请选择检测结果"
|
placeholder="请选择检测结果"
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in testResultsList"
|
v-for="item in testResultsList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<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="exportEvent">导出</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action=""
|
action=""
|
||||||
accept=".xls"
|
accept=".xls"
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-Upload"
|
icon="el-icon-Upload"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left: 12px; margin-right: 12px"
|
style="margin-left: 12px; margin-right: 12px"
|
||||||
>
|
>
|
||||||
excel导入
|
excel导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
||||||
<!-- 上传原始报告 -->
|
<!-- 上传原始报告 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
title="上传原始报告__支持批量上传"
|
title="上传原始报告__支持批量上传"
|
||||||
v-model="showBatchUpload"
|
v-model="showBatchUpload"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
multiple
|
multiple
|
||||||
action=""
|
action=""
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
accept=".doc,.docx"
|
accept=".doc,.docx"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-change="chooseBatch"
|
:on-change="chooseBatch"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
>
|
>
|
||||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||||
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import newlyIncreased from './add.vue'
|
import newlyIncreased from './add.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import {
|
import {
|
||||||
DownloadExport,
|
DownloadExport,
|
||||||
reportDownload,
|
reportDownload,
|
||||||
batchTerminal,
|
batchTerminal,
|
||||||
delTerminal,
|
delTerminal,
|
||||||
getTerminalPage,
|
getTerminalPage,
|
||||||
importReport
|
importReport
|
||||||
} from '@/api/process-boot/terminal'
|
} from '@/api/process-boot/terminal'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const testResultsList = [
|
const testResultsList = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未展开'
|
name: '未展开'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '已展开'
|
name: '已展开'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const addRef = ref()
|
const addRef = ref()
|
||||||
const showBatchUpload = ref(false)
|
const showBatchUpload = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||||
publicHeight: 85,
|
publicHeight: 85,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
// { width: '60', type: 'checkbox' },
|
// { width: '60', type: 'checkbox' },
|
||||||
|
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{ field: 'id', title: '终端编号' },
|
{ field: 'id', title: '终端编号' },
|
||||||
{ field: 'name', title: '终端名称' },
|
{ field: 'name', title: '终端名称' },
|
||||||
{
|
{
|
||||||
field: 'manufacture',
|
field: 'manufacture',
|
||||||
title: '生产厂家',
|
title: '生产厂家',
|
||||||
formatter(row: any) {
|
formatter(row: any) {
|
||||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'installPlace', title: '安装位置' },
|
{ field: 'installPlace', title: '安装位置' },
|
||||||
{ field: 'inspectionUnit', title: '送检单位' },
|
{ field: 'inspectionUnit', title: '送检单位' },
|
||||||
{
|
{
|
||||||
field: 'testResults',
|
field: 'testResults',
|
||||||
title: '检测结果',
|
title: '检测结果',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未展开',
|
0: '未展开',
|
||||||
1: '已展开'
|
1: '已展开'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'inspectionTime', title: '检测时间' },
|
{ field: 'inspectionTime', title: '检测时间' },
|
||||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '250',
|
width: '250',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
addRef.value.open({
|
addRef.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delTerminal([row.id]).then(() => {
|
delTerminal([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载原始数据报告',
|
title: '下载原始数据报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.originalReport == null
|
return row.originalReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 0)
|
download(row, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载检测报告',
|
title: '下载检测报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.inspectionReport == null
|
return row.inspectionReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 1)
|
download(row, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
tableStore.table.params.id = dictData.state.area[0].id
|
tableStore.table.params.id = dictData.state.area[0].id
|
||||||
tableStore.table.params.testResults = ''
|
tableStore.table.params.testResults = ''
|
||||||
tableStore.table.params.manufacture = []
|
tableStore.table.params.manufacture = []
|
||||||
tableStore.table.params.type = 0
|
tableStore.table.params.type = 0
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const add = () => {
|
const add = () => {
|
||||||
addRef.value.open({
|
addRef.value.open({
|
||||||
title: '新增'
|
title: '新增'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then((res: any) => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const download = (row: any, type: number) => {
|
const download = (row: any, type: number) => {
|
||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// excel导入
|
// excel导入
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
batchTerminal(e.raw).then((res: any) => {
|
batchTerminal(e.raw).then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功,无错误数据!')
|
ElMessage.success('上传成功,无错误数据!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '模板错误信息' // 设置下载的文件名
|
link.download = '模板错误信息' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getTerminalPage(form).then(res => {
|
getTerminalPage(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '终端入网检测', // 文件名字
|
filename: '终端入网检测', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 上传原始报告
|
// 上传原始报告
|
||||||
const UploadOriginal = () => {
|
const UploadOriginal = () => {
|
||||||
showBatchUpload.value = true
|
showBatchUpload.value = true
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', '0')
|
form.append('type', '0')
|
||||||
fileList.value.forEach((item: any) => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('上传失败!')
|
ElMessage.error('上传失败!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
})
|
})
|
||||||
// fileList.value
|
// fileList.value
|
||||||
}
|
}
|
||||||
const chooseBatch = (e: any) => {
|
const chooseBatch = (e: any) => {
|
||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
showBatchUpload.value = false
|
showBatchUpload.value = false
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,286 +1,286 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader ref="TableHeaderRef" showExport>
|
<TableHeader ref="TableHeaderRef" showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||||
:value="item.name"></el-option>
|
:value="item.name"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-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-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||||
<DetailInfo :id="userId"></DetailInfo>
|
<DetailInfo :id="userId"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||||
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'敏感及重要用户台账',
|
filename:'敏感及重要用户台账',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '厂站名称',
|
title: '厂站名称',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
|
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'userReportSensitivePO.loadLevel',
|
field: 'userReportSensitivePO.loadLevel',
|
||||||
title: '负荷级别',
|
title: '负荷级别',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'userReportSensitivePO.powerSupplyInfo',
|
field: 'userReportSensitivePO.powerSupplyInfo',
|
||||||
title: '供电电源情况',
|
title: '供电电源情况',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return (
|
return (
|
||||||
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||||
!(row.dataType == 1)
|
!(row.dataType == 1)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return !(row.status == 0)
|
// return !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveUserTemplate().then((res: any) => {
|
await downloadSensitiveUserTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '敏感及重要用户模板'
|
link.download = '敏感及重要用户模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,304 +1,304 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area ref='TableHeaderRef' showExport>
|
<TableHeader area ref='TableHeaderRef' showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='搜索'>
|
<el-form-item label='搜索'>
|
||||||
<el-input
|
<el-input
|
||||||
v-model='tableStore.table.params.searchValue'
|
v-model='tableStore.table.params.searchValue'
|
||||||
placeholder='输入变电站.终端名称'
|
placeholder='输入变电站.终端名称'
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in statusSelect'
|
v-for='item in statusSelect'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.id'
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='处理状态'>
|
<el-form-item label='处理状态'>
|
||||||
<el-select v-model='tableStore.table.params.state' clearable placeholder='请选处理状态'>
|
<el-select v-model='tableStore.table.params.state' clearable placeholder='请选处理状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in stateSelect'
|
v-for='item in stateSelect'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.id'
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' />
|
<Table ref='tableRef' />
|
||||||
<Form ref='FormRef' @onSubmit='tableStore.index()' />
|
<Form ref='FormRef' @onSubmit='tableStore.index()' />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { cancel, getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
import { cancel, getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const FormRef = ref()
|
const FormRef = ref()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const stateSelect = [
|
const stateSelect = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未处理'
|
name: '未处理'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '处理中'
|
name: '处理中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '已处理'
|
name: '已处理'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
//申请联调
|
//申请联调
|
||||||
const debugForms = ref()
|
const debugForms = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/checkDevice/list',
|
url: '/supervision-boot/checkDevice/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'终端周期检测',
|
filename:'终端周期检测',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{ field: 'substation', title: '变电站' },
|
{ field: 'substation', title: '变电站' },
|
||||||
|
|
||||||
{ field: 'dept', title: '供电公司' },
|
{ field: 'dept', title: '供电公司' },
|
||||||
{
|
{
|
||||||
field: 'deviceName',
|
field: 'deviceName',
|
||||||
title: '终端名称'
|
title: '终端名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'thisTimeCheck',
|
field: 'thisTimeCheck',
|
||||||
title: '本次定检时间'
|
title: '本次定检时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'nextTimeCheck',
|
field: 'nextTimeCheck',
|
||||||
title: '下次定检时间'
|
title: '下次定检时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'overdueDay',
|
field: 'overdueDay',
|
||||||
title: '逾期天数',
|
title: '逾期天数',
|
||||||
type: 'html',
|
type: 'html',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
|
|
||||||
let text = row.row.status == 2
|
let text = row.row.status == 2
|
||||||
? '/'
|
? '/'
|
||||||
: `<span style='color: ${
|
: `<span style='color: ${
|
||||||
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
||||||
};text-decoration: none'>${row.row.overdueDay}</span>`
|
};text-decoration: none'>${row.row.overdueDay}</span>`
|
||||||
|
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
5: '同步台账成功',
|
5: '同步台账成功',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '报告上传',
|
title: '报告上传',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != null
|
return row.status != null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('报告上传', row)
|
FormRef.value.open('报告上传', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('重新发起', row)
|
FormRef.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: async row => {
|
click: async row => {
|
||||||
// cancelLeave(row)
|
// cancelLeave(row)
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.statveList = [2]
|
tableStore.table.params.statveList = [2]
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: item.status == 4
|
: item.status == 4
|
||||||
? '已取消':item.status == 5
|
? '已取消':item.status == 5
|
||||||
? '同步台账成功':'/'
|
? '同步台账成功':'/'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.state = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const props = defineProps(['id', 'businessKey'])
|
const props = defineProps(['id', 'businessKey'])
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getInfoById({ id: fullId }).then(res => {
|
await getInfoById({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
if (props.businessKey == '3') {
|
if (props.businessKey == '3') {
|
||||||
FormRef.value.open('报告上传', res.data)
|
FormRef.value.open('报告上传', res.data)
|
||||||
} else {
|
} else {
|
||||||
FormRef.value.open('重新发起', res.data)
|
FormRef.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang='scss'>
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,379 +1,379 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll showExport ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll showExport ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable style="width: 230px"></el-input>
|
clearable style="width: 230px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
|
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 申请联调弹框 -->
|
<!-- 申请联调弹框 -->
|
||||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import {
|
import {
|
||||||
getMointorPointTempLinedebugDetail,
|
getMointorPointTempLinedebugDetail,
|
||||||
setTempLinedebugLedgerSync
|
setTempLinedebugLedgerSync
|
||||||
} from '@/api/supervision-boot/jointDebugList/index'
|
} from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import debug from './debug.vue'
|
import debug from './debug.vue'
|
||||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteTempLineDebugReport } from '@/api/supervision-boot/delete/index'
|
import { deleteTempLineDebugReport } from '@/api/supervision-boot/delete/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
statusSelect.push({ name: '同步台账成功', id: 5 })
|
statusSelect.push({ name: '同步台账成功', id: 5 })
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/tempLinedebug/list',
|
url: '/supervision-boot/tempLinedebug/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'监测点联调列表',
|
filename:'监测点联调列表',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'powerSubstationName',
|
field: 'powerSubstationName',
|
||||||
title: '电网侧变电站',
|
title: '电网侧变电站',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
|
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'reason',
|
field: 'reason',
|
||||||
title: '调试原因',
|
title: '调试原因',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
|
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
|
||||||
// { field: 'monitoringTerminalCode', title: '终端编码', minWidth: 170 },
|
// { field: 'monitoringTerminalCode', title: '终端编码', minWidth: 170 },
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
5: '同步台账成功',
|
5: '同步台账成功',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: 'edit',
|
// name: 'edit',
|
||||||
// title: '编辑',
|
// title: '编辑',
|
||||||
// type: 'primary',
|
// type: 'primary',
|
||||||
// icon: 'el-icon-Open',
|
// icon: 'el-icon-Open',
|
||||||
// render: 'basicButton',
|
// render: 'basicButton',
|
||||||
// showDisabled: row => {
|
// showDisabled: row => {
|
||||||
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return !(row.status == 0)
|
// return !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
// click: row => {
|
// click: row => {
|
||||||
// debugForms.value.open('编辑', row)
|
// debugForms.value.open('编辑', row)
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '申请联调',
|
title: '申请联调',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-add',
|
icon: 'el-icon-add',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
// handleDebug(row)
|
// handleDebug(row)
|
||||||
debugForms.value.open('申请联调', row)
|
debugForms.value.open('申请联调', row)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reason
|
return row.reason
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
debugForms.value.open('重新发起', row)
|
debugForms.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '同步台账',
|
title: '同步台账',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-add',
|
icon: 'el-icon-add',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
setTempLinedebugLedgerSync({ id: row.id }).then(res => {
|
setTempLinedebugLedgerSync({ id: row.id }).then(res => {
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '台账同步成功',
|
message: '台账同步成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != 2
|
return row.status != 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.statveList = [2]
|
tableStore.table.params.statveList = [2]
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: item.status == 4
|
: item.status == 4
|
||||||
? '已取消':item.status == 5
|
? '已取消':item.status == 5
|
||||||
? '同步台账成功':'/'
|
? '同步台账成功':'/'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//申请联调
|
//申请联调
|
||||||
const debugForms = ref()
|
const debugForms = ref()
|
||||||
const debugId = ref('')
|
const debugId = ref('')
|
||||||
const handleDebug = (row: any) => {
|
const handleDebug = (row: any) => {
|
||||||
debugId.value = row.id
|
debugId.value = row.id
|
||||||
console.log(debugId.value)
|
console.log(debugId.value)
|
||||||
debugForms.value.open('申请联调', row)
|
debugForms.value.open('申请联调', row)
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelMointorPointTempLinedebug(data)
|
await cancelMointorPointTempLinedebug(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
debugForms.value.open('重新发起', res.data)
|
debugForms.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,388 +1,388 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll showExport ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll showExport ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端名称"
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端名称"
|
||||||
clearable style="width: 180px"></el-input>
|
clearable style="width: 180px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
||||||
:loading="loading">模版下载</el-button>
|
:loading="loading">模版下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
<!-- 上传模版 -->
|
<!-- 上传模版 -->
|
||||||
<uploadATemplate ref="uploadATemplateRef" />
|
<uploadATemplate ref="uploadATemplateRef" />
|
||||||
|
|
||||||
<!-- 上传模版 详情 -->
|
<!-- 上传模版 详情 -->
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId"></DetailInfo>
|
<DetailInfo :id="userId"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
||||||
import { cancelTerminalFormData, getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
import { cancelTerminalFormData, getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||||
import uploadATemplate from './uploadATemplate.vue'
|
import uploadATemplate from './uploadATemplate.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
||||||
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const uploadATemplateRef = ref()
|
const uploadATemplateRef = ref()
|
||||||
const show: any = ref(false)
|
const show: any = ref(false)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/deVReport/list',
|
url: '/supervision-boot/deVReport/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'终端入网检测',
|
filename:'终端入网检测',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'orgName',
|
field: 'orgName',
|
||||||
title: '填报部门名称',
|
title: '填报部门名称',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : ''
|
row.cellValue = row.cellValue ? row.cellValue : ''
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substationName',
|
field: 'substationName',
|
||||||
title: '所属变电站',
|
title: '所属变电站',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||||
{ field: 'monitoringTerminalCode', title: '终端编号', minWidth: 170 },
|
{ field: 'monitoringTerminalCode', title: '终端编号', minWidth: 170 },
|
||||||
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType != 0 || !row.processInstanceId
|
return row.importType != 0 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType != 1
|
return row.importType != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
userId.value = row.id
|
userId.value = row.id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType == 1 ? false : !(row.status == 0)
|
return row.importType == 1 ? false : !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: '已取消'
|
: '已取消'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '终端信息'
|
title: '终端信息'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTerminalFormData(data)
|
await cancelTerminalFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
downloadDevTemplate().then((res: any) => {
|
downloadDevTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测模板'
|
link.download = '终端入网检测模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
uploadATemplateRef.value.open('导入终端入网检测')
|
uploadATemplateRef.value.open('导入终端入网检测')
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getTerminalDetailsById({ id: fullId }).then(res => {
|
await getTerminalDetailsById({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -146,9 +146,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,155 +1,155 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入问题名称"
|
placeholder="请输入问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling
|
<Filling
|
||||||
ref="FillingRef"
|
ref="FillingRef"
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
:isDisabled="true"
|
:isDisabled="true"
|
||||||
:audit="true"
|
:audit="true"
|
||||||
:flag="true"
|
:flag="true"
|
||||||
@beforeClose="beforeClose"
|
@beforeClose="beforeClose"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
|
|
||||||
const list: any = ref({})
|
const list: any = ref({})
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
|
|
||||||
{ field: 'dataDate', title: '提交时间' },
|
{ field: 'dataDate', title: '提交时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报节点',
|
title: '填报节点',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '150',
|
width: '150',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
list.value = row
|
list.value = row
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||||
|
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,255 +1,255 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in auditStatus"
|
v-for="item in auditStatus"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请填写问题名称"
|
placeholder="请填写问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||||
<!-- 填报 -->
|
<!-- 填报 -->
|
||||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<Detail ref="detailRef" />
|
<Detail ref="detailRef" />
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import NewlyAdd from './NewlyAdd.vue'
|
import NewlyAdd from './NewlyAdd.vue'
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import Detail from './detail.vue'
|
import Detail from './detail.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
|
|
||||||
const showNewlyAdded = ref(false)
|
const showNewlyAdded = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
// { width: '60', type: 'checkbox' },
|
// { width: '60', type: 'checkbox' },
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
{ field: 'dataDate', title: '问题新建时间' },
|
{ field: 'dataDate', title: '问题新建时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报进度',
|
title: '填报进度',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'reportProcessStatus',
|
field: 'reportProcessStatus',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
detailRef.value.open(row)
|
detailRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '填报',
|
title: '填报',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return (
|
return (
|
||||||
row.reportProcessStatus == 'Auditt' ||
|
row.reportProcessStatus == 'Auditt' ||
|
||||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||||
row.reportProcess == 'Archived'
|
row.reportProcess == 'Archived'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '归档',
|
title: '归档',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-SuccessFilled',
|
icon: 'el-icon-SuccessFilled',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定归档?'
|
title: '确定归档?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
archive(row.powerQualityProblemNo).then(() => {
|
archive(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('归档成功!')
|
ElMessage.success('归档成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-PieChart',
|
icon: 'el-icon-PieChart',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcess == 'Archived'
|
return row.reportProcess == 'Archived'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.reportProcessStatus = ''
|
tableStore.table.params.reportProcessStatus = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([
|
TableHeaderRef.value.setDatePicker([
|
||||||
{ label: '年', value: 1 },
|
{ label: '年', value: 1 },
|
||||||
{ label: '季', value: 2 },
|
{ label: '季', value: 2 },
|
||||||
{ label: '月', value: 3 }
|
{ label: '月', value: 3 }
|
||||||
])
|
])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
showNewlyAdded.value = true
|
showNewlyAdded.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭弹框
|
// 关闭弹框
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
showNewlyAdded.value = false
|
showNewlyAdded.value = false
|
||||||
}
|
}
|
||||||
// 关闭 填报
|
// 关闭 填报
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,225 +1,225 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 用户投诉 -->
|
<!-- 用户投诉 -->
|
||||||
<!-- 2 有新增 发起 预警单 -->
|
<!-- 2 有新增 发起 预警单 -->
|
||||||
|
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="是否解决">
|
<el-form-item label="是否解决">
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||||
:value="item.value"></el-option>
|
:value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<detail ref="detailRef" />
|
<detail ref="detailRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import complaintsForm from './form/complaintsForm.vue'
|
import complaintsForm from './form/complaintsForm.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
||||||
import detail from './complaintsDetail.vue';
|
import detail from './complaintsDetail.vue';
|
||||||
// Steady_Statis
|
// Steady_Statis
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const dealStateList = ref([
|
const dealStateList = ref([
|
||||||
{
|
{
|
||||||
label: '未解决',
|
label: '未解决',
|
||||||
value: '0'
|
value: '0'
|
||||||
},
|
},
|
||||||
|
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'userName', title: '用户名称' },
|
{ field: 'userName', title: '用户名称' },
|
||||||
{ field: 'userNumber', title: '用户编号' },
|
{ field: 'userNumber', title: '用户编号' },
|
||||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
|
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
|
||||||
// { field: 'userCategory', title: '用户类别' },
|
// { field: 'userCategory', title: '用户类别' },
|
||||||
|
|
||||||
{ field: 'complaintText', title: '投诉内容' },
|
{ field: 'complaintText', title: '投诉内容' },
|
||||||
{ field: 'steadyIndicator', title: '稳态指标' },
|
{ field: 'steadyIndicator', title: '稳态指标' },
|
||||||
{ field: 'transientIndicators', title: '暂态指标' },
|
{ field: 'transientIndicators', title: '暂态指标' },
|
||||||
{
|
{
|
||||||
field: 'monitorName',
|
field: 'monitorName',
|
||||||
title: '监测点名称',
|
title: '监测点名称',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'detectionFlag',
|
field: 'detectionFlag',
|
||||||
title: '是否实现监测',
|
title: '是否实现监测',
|
||||||
|
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
|
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '否',
|
0: '否',
|
||||||
1: '是',
|
1: '是',
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dealState',
|
field: 'dealState',
|
||||||
title: '是否解决',
|
title: '是否解决',
|
||||||
|
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
null: 'info'
|
null: 'info'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未解决',
|
0: '未解决',
|
||||||
1: '已解决',
|
1: '已解决',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '发起告警单',
|
title: '发起告警单',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.dealState != 0
|
return row.dealState != 0
|
||||||
},
|
},
|
||||||
// popconfirm: {
|
// popconfirm: {
|
||||||
// confirmButtonText: '确认',
|
// confirmButtonText: '确认',
|
||||||
// cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
// confirmButtonType: 'primary',
|
// confirmButtonType: 'primary',
|
||||||
// title: '请确认发起告警单!'
|
// title: '请确认发起告警单!'
|
||||||
// },
|
// },
|
||||||
click: async row => {
|
click: async row => {
|
||||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '请输入整改意见'
|
inputErrorMessage: '请输入整改意见'
|
||||||
})
|
})
|
||||||
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||||
ElMessage.success('发起告警单成功!')
|
ElMessage.success('发起告警单成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.dealState == 0
|
return row.dealState == 0
|
||||||
},
|
},
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
detailRef.value.open({
|
detailRef.value.open({
|
||||||
row: row,
|
row: row,
|
||||||
title: '详情',
|
title: '详情',
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看告警单',
|
title: '查看告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.initiateWarningFlag == 0
|
return row.initiateWarningFlag == 0
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 1,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
// tableStore.table.data = [
|
// tableStore.table.data = [
|
||||||
// {
|
// {
|
||||||
// userName: '东润开阳堡光伏电站用户',
|
// userName: '东润开阳堡光伏电站用户',
|
||||||
// userId: '8115771123274',
|
// userId: '8115771123274',
|
||||||
// complaintContent: '终端频繁重启',
|
// complaintContent: '终端频繁重启',
|
||||||
// complaintTime: '2024-05-16'
|
// complaintTime: '2024-05-16'
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.dealState = ''
|
tableStore.table.params.dealState = ''
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
formRef.value.open({ text: '新增投诉' })
|
formRef.value.open({ text: '新增投诉' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,378 +1,378 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
||||||
|
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="区域">
|
<el-form-item label="区域">
|
||||||
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
|
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="监测点性质">
|
<el-form-item label="监测点性质">
|
||||||
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
|
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
|
||||||
<el-option label="电网侧" value="0"/>
|
<el-option label="电网侧" value="0"/>
|
||||||
<el-option label="非电网侧" value="1"/>
|
<el-option label="非电网侧" value="1"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="超标指标">
|
<el-form-item label="超标指标">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.targetList"
|
v-model="tableStore.table.params.targetList"
|
||||||
clearable
|
clearable
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
placeholder="请选择超标指标"
|
placeholder="请选择超标指标"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
|
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据类型">
|
<el-form-item label="数据类型">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="tableStore.table.params.dataType"
|
v-model="tableStore.table.params.dataType"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-text="超标数据"
|
active-text="超标数据"
|
||||||
inactive-text="无数据"
|
inactive-text="无数据"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预警阈值">
|
<el-form-item label="预警阈值">
|
||||||
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alertThreshold"
|
v-model="tableStore.table.params.alertThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlert"
|
@change="changeAlert"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="告警阈值">
|
<el-form-item label="告警阈值">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alarmThreshold"
|
v-model="tableStore.table.params.alarmThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlarm"
|
@change="changeAlarm"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="搜索">
|
<!-- <el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、终端、监测点名称"
|
placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag > 2" type="primary" @click="launch('发起预警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag > 2" type="primary" @click="launch('发起预警单')">
|
||||||
发起预警单
|
发起预警单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag > 2" type="primary" @click="launch('发起告警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag > 2" type="primary" @click="launch('发起告警单')">
|
||||||
发起告警单
|
发起告警单
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef"/>
|
<Table ref="tableRef"/>
|
||||||
<!-- /告警单 -->
|
<!-- /告警单 -->
|
||||||
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
|
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<detail ref="detailRef"/>
|
<detail ref="detailRef"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted, provide, nextTick} from 'vue'
|
import {ref, onMounted, provide, nextTick} from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import {useDictData} from '@/stores/dictData'
|
import {useDictData} from '@/stores/dictData'
|
||||||
import alarmList from './form/alarmList.vue'
|
import alarmList from './form/alarmList.vue'
|
||||||
import detail from './form/detail.vue'
|
import detail from './form/detail.vue'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
import {useRouter} from 'vue-router'
|
import {useRouter} from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
//字典获取超标指标
|
//字典获取超标指标
|
||||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const industry = dictData.getBasicData('Business_Type')
|
const industry = dictData.getBasicData('Business_Type')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const alarmListRef = ref()
|
const alarmListRef = ref()
|
||||||
const flagTime = ref(false)
|
const flagTime = ref(false)
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const list: any = ref({
|
const list: any = ref({
|
||||||
deptId: '',
|
deptId: '',
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
alertThreshold: '',
|
alertThreshold: '',
|
||||||
alarmThreshold: ''
|
alarmThreshold: ''
|
||||||
})
|
})
|
||||||
const level: any = ref(dictData.state.area[0]?.level)
|
const level: any = ref(dictData.state.area[0]?.level)
|
||||||
const flag: any = ref('')
|
const flag: any = ref('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/onlineMonitor/list',
|
url: '/supervision-boot/onlineMonitor/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
// isWebPaging:true,
|
// isWebPaging:true,
|
||||||
column: [
|
column: [
|
||||||
{title: '', type: 'checkbox', width: 40},
|
{title: '', type: 'checkbox', width: 40},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'dept', title: '负责单位'},
|
{field: 'dept', title: '负责单位'},
|
||||||
{field: 'substation', title: '变电站名称'},
|
{field: 'substation', title: '变电站名称'},
|
||||||
{field: 'deviceName', title: '终端名称'},
|
{field: 'deviceName', title: '终端名称'},
|
||||||
{field: 'lineName', title: '监测点名称'},
|
{field: 'lineName', title: '监测点名称'},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'businessType',
|
field: 'businessType',
|
||||||
title: '监测对象类型',
|
title: '监测对象类型',
|
||||||
|
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'objectName', title: '监测对象名称'},
|
{field: 'objectName', title: '监测对象名称'},
|
||||||
{
|
{
|
||||||
field: 'targetType',
|
field: 'targetType',
|
||||||
title: '指标类型',
|
title: '指标类型',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
|
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'overLimitDay',
|
field: 'overLimitDay',
|
||||||
title: '累计超标天数',
|
title: '累计超标天数',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue != null ? row.cellValue : '/'
|
return row.cellValue != null ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'updateTime',
|
field: 'updateTime',
|
||||||
visible: flagTime,
|
visible: flagTime,
|
||||||
title: '最新数据时间'
|
title: '最新数据时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.targetType == 0
|
return row.targetType == 0
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
detailRef.value.open({
|
detailRef.value.open({
|
||||||
text: '详情',
|
text: '详情',
|
||||||
row: row,
|
row: row,
|
||||||
list: list.value
|
list: list.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '查看预警单',
|
title: '查看预警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.step != 1
|
return row.step != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 0,
|
type: 0,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '查看告警单',
|
title: '查看告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.step != 2
|
return row.step != 2
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 1,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
// name: 'productSetting',
|
// name: 'productSetting',
|
||||||
// title: '发起告警单',
|
// title: '发起告警单',
|
||||||
// type: 'warning',
|
// type: 'warning',
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return row.overLimitDay < tableStore.table.params.alarmThreshold
|
// return row.overLimitDay < tableStore.table.params.alarmThreshold
|
||||||
// },
|
// },
|
||||||
// icon: 'el-icon-EditPen',
|
// icon: 'el-icon-EditPen',
|
||||||
// render: 'basicButton',
|
// render: 'basicButton',
|
||||||
|
|
||||||
// click: async row => {
|
// click: async row => {
|
||||||
// // handleWarningAlarmFlag(row).then(res => {
|
// // handleWarningAlarmFlag(row).then(res => {
|
||||||
// // console.log(res)
|
// // console.log(res)
|
||||||
// // ElMessage.success('发起告警单成功!')
|
// // ElMessage.success('发起告警单成功!')
|
||||||
// // tableStore.index()
|
// // tableStore.index()
|
||||||
// // })
|
// // })
|
||||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
// confirmButtonText: '确定',
|
// confirmButtonText: '确定',
|
||||||
// cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
|
|
||||||
// inputType: 'textarea',
|
// inputType: 'textarea',
|
||||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
// inputErrorMessage: '请输入整改意见'
|
// inputErrorMessage: '请输入整改意见'
|
||||||
// })
|
// })
|
||||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||||
// ElMessage.success('发起告警单成功!')
|
// ElMessage.success('发起告警单成功!')
|
||||||
// tableStore.index()
|
// tableStore.index()
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// name: 'edit',
|
// name: 'edit',
|
||||||
// title: '发起预警单',
|
// title: '发起预警单',
|
||||||
// type: 'primary',
|
// type: 'primary',
|
||||||
// icon: 'el-icon-Open',
|
// icon: 'el-icon-Open',
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
|
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
|
||||||
// },
|
// },
|
||||||
// render: 'basicButton',
|
// render: 'basicButton',
|
||||||
|
|
||||||
// click: async row => {
|
// click: async row => {
|
||||||
// // handleWarningAlarmFlag(row).then(res => {
|
// // handleWarningAlarmFlag(row).then(res => {
|
||||||
// // console.log(res)
|
// // console.log(res)
|
||||||
// // ElMessage.success('发起预警单成功!')
|
// // ElMessage.success('发起预警单成功!')
|
||||||
// // tableStore.index()
|
// // tableStore.index()
|
||||||
// // })
|
// // })
|
||||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
// confirmButtonText: '确定',
|
// confirmButtonText: '确定',
|
||||||
// cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
|
|
||||||
// inputType: 'textarea',
|
// inputType: 'textarea',
|
||||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
// inputErrorMessage: '请输入整改意见'
|
// inputErrorMessage: '请输入整改意见'
|
||||||
// })
|
// })
|
||||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||||
// ElMessage.success('发起预警单成功!')
|
// ElMessage.success('发起预警单成功!')
|
||||||
// tableStore.index()
|
// tableStore.index()
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
list.value.deptId = tableStore.table.params.deptId
|
list.value.deptId = tableStore.table.params.deptId
|
||||||
|
|
||||||
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
|
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
|
||||||
list.value.searchEndTime = tableStore.table.params.searchEndTime
|
list.value.searchEndTime = tableStore.table.params.searchEndTime
|
||||||
if (tableStore.table.params.alertThreshold != '') {
|
if (tableStore.table.params.alertThreshold != '') {
|
||||||
list.value.alertThreshold = tableStore.table.params.alertThreshold
|
list.value.alertThreshold = tableStore.table.params.alertThreshold
|
||||||
}
|
}
|
||||||
list.value.lineType = tableStore.table.params.lineType
|
list.value.lineType = tableStore.table.params.lineType
|
||||||
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
|
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
|
||||||
flag.value = level.value
|
flag.value = level.value
|
||||||
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
|
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
// tableStore.table.data = [
|
// tableStore.table.data = [
|
||||||
// {
|
// {
|
||||||
// orgName: '张家口',
|
// orgName: '张家口',
|
||||||
// subName: '110kV马头山风电场',
|
// subName: '110kV马头山风电场',
|
||||||
// lineName: '111口头线',
|
// lineName: '111口头线',
|
||||||
// voltageScale: '110kV',
|
// voltageScale: '110kV',
|
||||||
// overDay: '20',
|
// overDay: '20',
|
||||||
// overDays: '10'
|
// overDays: '10'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// orgName: '张家口',
|
// orgName: '张家口',
|
||||||
// subName: '110kV韩家庄风电场',
|
// subName: '110kV韩家庄风电场',
|
||||||
// lineName: '111缘韩一线',
|
// lineName: '111缘韩一线',
|
||||||
// voltageScale: '110kV',
|
// voltageScale: '110kV',
|
||||||
// overDay: '20',
|
// overDay: '20',
|
||||||
// overDays: '16'
|
// overDays: '16'
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
tableStore.table.params.targetList = exceeded.filter(item => item.code == 'Total_Indicator')[0].id
|
tableStore.table.params.targetList = exceeded.filter(item => item.code == 'Total_Indicator')[0].id
|
||||||
? [exceeded.filter(item => item.code == 'Total_Indicator')[0].id]
|
? [exceeded.filter(item => item.code == 'Total_Indicator')[0].id]
|
||||||
: []
|
: []
|
||||||
tableStore.table.params.lineType = ''
|
tableStore.table.params.lineType = ''
|
||||||
tableStore.table.params.dataType = '1'
|
tableStore.table.params.dataType = '1'
|
||||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
TableHeaderRef.value.showSelectChange()
|
TableHeaderRef.value.showSelectChange()
|
||||||
}, 10)
|
}, 10)
|
||||||
})
|
})
|
||||||
|
|
||||||
const changeAlert = e => {
|
const changeAlert = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e > tableStore.table.params.alarmThreshold) {
|
if (e > tableStore.table.params.alarmThreshold) {
|
||||||
ElMessage.warning('预警阈值不能大于报警阈值')
|
ElMessage.warning('预警阈值不能大于报警阈值')
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const changeAlarm = e => {
|
const changeAlarm = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e < tableStore.table.params.alertThreshold) {
|
if (e < tableStore.table.params.alertThreshold) {
|
||||||
ElMessage.warning('报警阈值不能小于预警阈值')
|
ElMessage.warning('报警阈值不能小于预警阈值')
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 发起预警单
|
// 发起预警单
|
||||||
const launch = (title: string) => {
|
const launch = (title: string) => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage.warning('请选择一条数据')
|
ElMessage.warning('请选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
alarmListRef.value.open({
|
alarmListRef.value.open({
|
||||||
text: title,
|
text: title,
|
||||||
form: list.value,
|
form: list.value,
|
||||||
row: tableStore.table.selection
|
row: tableStore.table.selection
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ launch ~ list.value:', list.value)
|
console.log('🚀 ~ launch ~ list.value:', list.value)
|
||||||
}
|
}
|
||||||
const changeArea = e => {
|
const changeArea = e => {
|
||||||
level.value = e.data.level
|
level.value = e.data.level
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,187 +1,187 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="计划名称">
|
<el-form-item label="计划名称">
|
||||||
<el-input style="width: 200px" v-model="tableStore.table.params.searchValue" clearable
|
<el-input style="width: 200px" v-model="tableStore.table.params.searchValue" clearable
|
||||||
placeholder="请输入计划名称"></el-input>
|
placeholder="请输入计划名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否解决">
|
<el-form-item label="是否解决">
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||||
:value="item.value"></el-option>
|
:value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<testQuestionsForm ref="testQuestionsFormRef" />
|
<testQuestionsForm ref="testQuestionsFormRef" />
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
||||||
<detail :id="detailId" :flag="flag" />
|
<detail :id="detailId" :flag="flag" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import testQuestionsForm from './form/testQuestionsForm.vue'
|
import testQuestionsForm from './form/testQuestionsForm.vue'
|
||||||
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
|
import { initiateWarningLeaflet } from '@/api/supervision-boot/survey/test'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const detailId = ref('')
|
const detailId = ref('')
|
||||||
const testQuestionsFormRef = ref()
|
const testQuestionsFormRef = ref()
|
||||||
const dealStateList = ref([
|
const dealStateList = ref([
|
||||||
{
|
{
|
||||||
label: '未解决',
|
label: '未解决',
|
||||||
value: '0'
|
value: '0'
|
||||||
},
|
},
|
||||||
|
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
url: '/supervision-boot/surveyTest/pageProblemSurvey',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 120 },
|
{ field: 'planName', title: '计划名称', minWidth: 120 },
|
||||||
{ field: 'deptName', title: '负责单位', minWidth: 120 },
|
{ field: 'deptName', title: '负责单位', minWidth: 120 },
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 120 },
|
{ field: 'substationName', title: '变电站', minWidth: 120 },
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
|
{ field: 'planStartTime', title: '计划开始时间', minWidth: 100 },
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
|
{ field: 'planEndTime', title: '计划结束时间', minWidth: 100 },
|
||||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 100 },
|
{ field: 'completeTime', title: '实际完成时间', minWidth: 100 },
|
||||||
{ field: 'completeBy', title: '测试负责人', minWidth: 120 },
|
{ field: 'completeBy', title: '测试负责人', minWidth: 120 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dealState',
|
field: 'dealState',
|
||||||
title: '是否解决',
|
title: '是否解决',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
null: 'info'
|
null: 'info'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未解决',
|
0: '未解决',
|
||||||
1: '已解决',
|
1: '已解决',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
|
||||||
click: async row => {
|
click: async row => {
|
||||||
flag.value = row.dealState == 1 ? true : false
|
flag.value = row.dealState == 1 ? true : false
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
detailId.value = row.id
|
detailId.value = row.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '发起告警单',
|
title: '发起告警单',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.dealState != 0
|
return row.dealState != 0
|
||||||
},
|
},
|
||||||
|
|
||||||
click: async row => {
|
click: async row => {
|
||||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '请输入整改意见'
|
inputErrorMessage: '请输入整改意见'
|
||||||
})
|
})
|
||||||
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
initiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||||
ElMessage.success('发起告警成功!')
|
ElMessage.success('发起告警成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看告警单',
|
title: '查看告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.initiateWarningFlag == 0
|
return row.initiateWarningFlag == 0
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 1,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.dealState = ''
|
tableStore.table.params.dealState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起告警单
|
* 发起告警单
|
||||||
*/
|
*/
|
||||||
const initiateAlarm = async (id: string) => {
|
const initiateAlarm = async (id: string) => {
|
||||||
await initiateWarningLeaflet(id)
|
await initiateWarningLeaflet(id)
|
||||||
ElMessage.success('发起告警成功!')
|
ElMessage.success('发起告警成功!')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,302 +1,302 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否解决">
|
<el-form-item label="是否解决">
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
||||||
:value="item.value"></el-option>
|
:value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<detail ref="detailRef" />
|
<detail ref="detailRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, reactive } from 'vue'
|
import { ref, onMounted, provide, reactive } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
|
import { addRunTest, initiateWarningLeaflet } from '@/api/supervision-boot/lineRunTest'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { VxeTablePropTypes } from 'vxe-table'
|
import { VxeTablePropTypes } from 'vxe-table'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import detail from './testRunDetail.vue'
|
import detail from './testRunDetail.vue'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const dealStateList = ref([
|
const dealStateList = ref([
|
||||||
{
|
{
|
||||||
label: '未解决',
|
label: '未解决',
|
||||||
value: '0'
|
value: '0'
|
||||||
},
|
},
|
||||||
|
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
url: '/supervision-boot/lineRunTestProblem/pageProblem',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||||
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
{ field: 'connectedBus', title: '接入母线', minWidth: 160 },
|
||||||
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
// { field: 'monitoringTerminalCode', title: '终端编号', minWidth: 140 },
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140, },
|
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 140, },
|
||||||
{
|
{
|
||||||
field: 'powerSubstationName', title: '变电站', minWidth: 160, formatter: row => {
|
field: 'powerSubstationName', title: '变电站', minWidth: 160, formatter: row => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
{ field: 'reason', title: '调试原因', minWidth: 160 },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'testRunState',
|
field: 'testRunState',
|
||||||
title: '试运行状态',
|
title: '试运行状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
1: 'warning'
|
1: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待试运行',
|
0: '待试运行',
|
||||||
1: '试运行中',
|
1: '试运行中',
|
||||||
2: '试运行成功',
|
2: '试运行成功',
|
||||||
3: '试运行失败',
|
3: '试运行失败',
|
||||||
null: '待试运行'
|
null: '待试运行'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'testRunTime',
|
field: 'testRunTime',
|
||||||
title: '试运行时间范围',
|
title: '试运行时间范围',
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
|
{ field: 'problemReason', title: '试运行评估问题', minWidth: 200 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dealState',
|
field: 'dealState',
|
||||||
title: '是否解决',
|
title: '是否解决',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
null: 'info'
|
null: 'info'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未解决',
|
0: '未解决',
|
||||||
1: '已解决',
|
1: '已解决',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
// {
|
// {
|
||||||
// name: 'productSetting',
|
// name: 'productSetting',
|
||||||
// title: '流程详情',
|
// title: '流程详情',
|
||||||
// type: 'primary',
|
// type: 'primary',
|
||||||
// icon: 'el-icon-EditPen',
|
// icon: 'el-icon-EditPen',
|
||||||
// render: 'basicButton',
|
// render: 'basicButton',
|
||||||
// click: row => {
|
// click: row => {
|
||||||
// handleAudit(row.processInstanceId, row.historyInstanceId)
|
// handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
// },
|
// },
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return row.testRunState != 2 || !row.processInstanceId
|
// return row.testRunState != 2 || !row.processInstanceId
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '下载报告',
|
title: '下载报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
downloadTheReport(row.testRunReport)
|
downloadTheReport(row.testRunReport)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.testRunReport == null || row.testRunReport.length == 0
|
return row.testRunReport == null || row.testRunReport.length == 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '发起告警单',
|
title: '发起告警单',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.dealState != 0
|
return row.dealState != 0
|
||||||
},
|
},
|
||||||
|
|
||||||
click: async row => {
|
click: async row => {
|
||||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '请输入整改意见'
|
inputErrorMessage: '请输入整改意见'
|
||||||
})
|
})
|
||||||
initiateWarningLeaflet({
|
initiateWarningLeaflet({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
problemId: row.problemId,
|
problemId: row.problemId,
|
||||||
reformAdvice: value,
|
reformAdvice: value,
|
||||||
type: 2,
|
type: 2,
|
||||||
issueDetail: row.problemReason
|
issueDetail: row.problemReason
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
ElMessage.success('发起告警单成功!')
|
ElMessage.success('发起告警单成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.dealState == 0
|
return row.dealState == 0
|
||||||
},
|
},
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
detailRef.value.open({
|
detailRef.value.open({
|
||||||
row: row,
|
row: row,
|
||||||
title: '详情',
|
title: '详情',
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看告警单',
|
title: '查看告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.problemType == null
|
return row.problemType == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
push({
|
push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 1,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.statveList = [2]
|
tableStore.table.params.statveList = [2]
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.dealState = ''
|
tableStore.table.params.dealState = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||||
labelField: '',
|
labelField: '',
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return !(row.testRunState == 1 || row.testRunState == 2)
|
return !(row.testRunState == 1 || row.testRunState == 2)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const downloadTheReport = (url: string) => {
|
const downloadTheReport = (url: string) => {
|
||||||
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = res.data.url
|
link.href = res.data.url
|
||||||
link.download = res.data.name
|
link.download = res.data.name
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const runTestSubmit = (type: number) => {
|
const runTestSubmit = (type: number) => {
|
||||||
const start = new Date()
|
const start = new Date()
|
||||||
start.setDate(start.getDate() + 1)
|
start.setDate(start.getDate() + 1)
|
||||||
start.setHours(0, 0, 0)
|
start.setHours(0, 0, 0)
|
||||||
|
|
||||||
const end = new Date()
|
const end = new Date()
|
||||||
end.setDate(end.getDate() + 3)
|
end.setDate(end.getDate() + 3)
|
||||||
end.setHours(23, 59, 59)
|
end.setHours(23, 59, 59)
|
||||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||||
const data = {
|
const data = {
|
||||||
startTime: startString,
|
startTime: startString,
|
||||||
endTime: endString,
|
endTime: endString,
|
||||||
lineIds: monitorIds,
|
lineIds: monitorIds,
|
||||||
operateType: type
|
operateType: type
|
||||||
}
|
}
|
||||||
addRunTest(data).then((res: any) => {
|
addRunTest(data).then((res: any) => {
|
||||||
if (res.code === 'A0000') {
|
if (res.code === 'A0000') {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '发起试运行成功',
|
message: '发起试运行成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,67 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{ field: 'planNo', title: '普测计划编号' },
|
{ field: 'planNo', title: '普测计划编号' },
|
||||||
{ field: 'planName', title: '普测计划名称' },
|
{ field: 'planName', title: '普测计划名称' },
|
||||||
{ field: 'planStartTime', title: '开始时间' },
|
{ field: 'planStartTime', title: '开始时间' },
|
||||||
{ field: 'planEndTime', title: '结束时间' },
|
{ field: 'planEndTime', title: '结束时间' },
|
||||||
{ field: 'subCount', title: '普测变电站数量' },
|
{ field: 'subCount', title: '普测变电站数量' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
planAddRef.value.open('计划审核', row)
|
planAddRef.value.open('计划审核', row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,336 +1,336 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="监督类型">
|
<el-form-item label="监督类型">
|
||||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
||||||
<el-option v-for="item in supvTypeOptionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in supvTypeOptionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { cancel, getById } from '@/api/process-boot/generalTest'
|
import { cancel, getById } from '@/api/process-boot/generalTest'
|
||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
|
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
|
||||||
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const auditList: any = ref([])
|
const auditList: any = ref([])
|
||||||
const auditUser = ref('')
|
const auditUser = ref('')
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const openType = ref('create')
|
const openType = ref('create')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
url: '/supervision-boot/surveyPlan/surveyPlanPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'planName',
|
field: 'planName',
|
||||||
title: '计划名称',
|
title: '计划名称',
|
||||||
minWidth: 130
|
minWidth: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'deptName',
|
field: 'deptName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '负责单位'
|
title: '负责单位'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '变电站',
|
title: '变电站',
|
||||||
minWidth: 110,
|
minWidth: 110,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
|
{ field: 'planStartTime', minWidth: 130, title: '计划开始时间' },
|
||||||
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
|
{ field: 'planEndTime', minWidth: 130, title: '计划结束时间' },
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planAddRef.value.open('编辑', row.id, false)
|
planAddRef.value.open('编辑', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
planAddRef.value.open('重新发起计划', row.id, false)
|
planAddRef.value.open('重新发起计划', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.supvType = ''
|
tableStore.table.params.supvType = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
// title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
planAddRef.value.open('计划新增')
|
planAddRef.value.open('计划新增')
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
auditUser.value = ''
|
auditUser.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
planAddRef.value.open('重新发起计划', fullId, false)
|
planAddRef.value.open('重新发起计划', fullId, false)
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,339 +1,339 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
<TableHeader area datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='监督类型'>
|
<el-form-item label='监督类型'>
|
||||||
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择监督类型'>
|
<el-select v-model='tableStore.table.params.supvType' clearable placeholder='请选择监督类型'>
|
||||||
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
|
<el-option v-for='item in supvTypeOptionList' :key='item.id' :label='item.name'
|
||||||
:value='item.id'></el-option>
|
:value='item.id'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name'
|
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name'
|
||||||
:value='item.id'></el-option>
|
:value='item.id'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planTest ref='planTestRef' @onsubmit='tableStore.index()' />
|
<planTest ref='planTestRef' @onsubmit='tableStore.index()' />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||||
import planTest from './planTest.vue'
|
import planTest from './planTest.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
const planTestRef = ref()
|
const planTestRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const auditList: any = ref([])
|
const auditList: any = ref([])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'problemFlag',
|
field: 'problemFlag',
|
||||||
title: '是否存在问题',
|
title: '是否存在问题',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'danger',
|
1: 'danger',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '合格',
|
0: '合格',
|
||||||
1: '存在问题',
|
1: '存在问题',
|
||||||
null: '待测试'
|
null: '待测试'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
|
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
|
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '测试填报',
|
title: '测试填报',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != 6
|
return row.status != 6
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
add(row.id)
|
add(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || !row.processInstanceId
|
return row.status == 6 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// planTestRef.value.open('查看计划', row)
|
// planTestRef.value.open('查看计划', row)
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('编辑', row.id, false)
|
planTestRef.value.open('编辑', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.supvType = ''
|
tableStore.table.params.supvType = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = (id: string) => {
|
const add = (id: string) => {
|
||||||
planTestRef.value.open('计划测试填报', id, true)
|
planTestRef.value.open('计划测试填报', id, true)
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTest(data)
|
await cancelTest(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps(['id', 'businessKey'])
|
const props = defineProps(['id', 'businessKey'])
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (props.businessKey == '3') {
|
if (props.businessKey == '3') {
|
||||||
planTestRef.value.open('编辑', fullId, false)
|
planTestRef.value.open('编辑', fullId, false)
|
||||||
} else {
|
} else {
|
||||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'></style>
|
<style scoped lang='scss'></style>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'recordTime', title: '建档时间' },
|
{ field: 'recordTime', title: '建档时间' },
|
||||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="干扰源类型">
|
<el-form-item label="干扰源类型">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in interferenceType"
|
v-for="item in interferenceType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源用户名称">
|
<el-form-item label="干扰源用户名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.userName"
|
v-model="tableStore.table.params.userName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择干扰源用户名称"
|
placeholder="请选择干扰源用户名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联干扰源用户">
|
<el-form-item label="关联干扰源用户">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.relationUserName"
|
v-model="tableStore.table.params.relationUserName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择关联干扰源用户"
|
placeholder="请选择关联干扰源用户"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否已上传实测">
|
<el-form-item label="是否已上传实测">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.aisFileUpload"
|
v-model="tableStore.table.params.aisFileUpload"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择是否已上传实测"
|
placeholder="请选择是否已上传实测"
|
||||||
>
|
>
|
||||||
<el-option label="否" value="0" />
|
<el-option label="否" value="0" />
|
||||||
<el-option label="是" value="1" />
|
<el-option label="是" value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||||
const istatusList = dictData.getBasicData('On-network_Status')
|
const istatusList = dictData.getBasicData('On-network_Status')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox' },
|
{ width: '60', type: 'checkbox' },
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'loadType',
|
field: 'loadType',
|
||||||
title: '干扰源类型',
|
title: '干扰源类型',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'userName', title: '干扰源用户名称' },
|
{ field: 'userName', title: '干扰源用户名称' },
|
||||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||||
{
|
{
|
||||||
field: 'istatus',
|
field: 'istatus',
|
||||||
title: '实测报告状态',
|
title: '实测报告状态',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -173,9 +173,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,358 +1,358 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- <TableHeader ref='TableHeaderRef'>
|
<!-- <TableHeader ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='用户名称'>
|
<el-form-item label='用户名称'>
|
||||||
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
<el-input v-model='tableStore.table.params.projectName' clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='所在地市'>
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in areaOptionList'
|
v-for='item in areaOptionList'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.name'
|
:value='item.name'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
<el-button icon='' type='primary' @click='toGoNet()'>{{ titleButton }}</el-button>
|
||||||
|
|
||||||
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
<el-button style='margin-left: 50px' :icon='Back' @click='go(-1)'>返回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader> -->
|
</TableHeader> -->
|
||||||
<div class="header_btn">
|
<div class="header_btn">
|
||||||
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
<el-button v-if="bussType == 0 && !(jb_pl || jb_dky)" icon="" type="primary" @click="toGoNet()">
|
||||||
{{ titleButton }}
|
{{ titleButton }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)" icon="" type="primary"
|
<el-button v-if="bussType == 1 && needGovernance != '0' && !(jb_pl || jb_dky)" icon="" type="primary"
|
||||||
@click="toGoNet()">
|
@click="toGoNet()">
|
||||||
{{ titleButton }}
|
{{ titleButton }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<addForm v-if="dialogVisible" ref="addForms" :id="bussId" :bussType="bussType" :title="titleButton1"
|
<addForm v-if="dialogVisible" ref="addForms" :id="bussId" :bussType="bussType" :title="titleButton1"
|
||||||
openType="detail" @onSubmit="tableStore.index()"></addForm>
|
openType="detail" @onSubmit="tableStore.index()"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'ProgramReview'
|
name: 'ProgramReview'
|
||||||
})
|
})
|
||||||
|
|
||||||
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
|
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { cancel, userReportGoNetById } from '@/api/supervision-boot/interfere/index'
|
import { cancel, userReportGoNetById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { Back } from '@element-plus/icons-vue'
|
import { Back } from '@element-plus/icons-vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
|
||||||
const { go, currentRoute, push } = useRouter()
|
const { go, currentRoute, push } = useRouter()
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
|
|
||||||
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const jb_pl = ref(false)
|
const jb_pl = ref(false)
|
||||||
const jb_dky = ref(false)
|
const jb_dky = ref(false)
|
||||||
jb_pl.value =
|
jb_pl.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_pl'
|
return item == 'jb_pl'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
jb_dky.value =
|
jb_dky.value =
|
||||||
adminInfo.$state.roleCode.filter(item => {
|
adminInfo.$state.roleCode.filter(item => {
|
||||||
return item == 'jb_dky'
|
return item == 'jb_dky'
|
||||||
}).length != 0
|
}).length != 0
|
||||||
? true
|
? true
|
||||||
: false
|
: false
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
|
||||||
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '用户名称', minWidth: 170 },
|
{ field: 'projectName', title: '用户名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId)
|
handleAudit(row.processInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return !(row.status == 0 || row.status == 3)
|
return !(row.status == 0 || row.status == 3)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0 || row.status == 3)
|
return !(row.status == 0 || row.status == 3)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
titleButton1.value = '编辑'
|
titleButton1.value = '编辑'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open(row)
|
addForms.value.open(row)
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
titleButton1.value = '重新发起'
|
titleButton1.value = '重新发起'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open(row)
|
addForms.value.open(row)
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.userReportId = bussId.value
|
tableStore.table.params.userReportId = bussId.value
|
||||||
tableStore.table.params.type = bussType.value
|
tableStore.table.params.type = bussType.value
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const bussId = ref()
|
const bussId = ref()
|
||||||
bussId.value = currentRoute.value.query.id
|
bussId.value = currentRoute.value.query.id
|
||||||
|
|
||||||
const bussType = ref()
|
const bussType = ref()
|
||||||
bussType.value = Number(currentRoute.value.query.type)
|
bussType.value = Number(currentRoute.value.query.type)
|
||||||
|
|
||||||
const titleButton = ref()
|
const titleButton = ref()
|
||||||
const titleButton1 = ref()
|
const titleButton1 = ref()
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const handleVisibilityChange = async () => {
|
const handleVisibilityChange = async () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
// 在这里执行页面回到回到当前页签需要做的事情
|
// 在这里执行页面回到回到当前页签需要做的事情
|
||||||
await tableStore.index()
|
await tableStore.index()
|
||||||
} else if (document.visibilityState === 'hidden') {
|
} else if (document.visibilityState === 'hidden') {
|
||||||
// 在这里执行页面离开时需要做的事情
|
// 在这里执行页面离开时需要做的事情
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
document.addEventListener('visibilitychange', handleVisibilityChange)
|
document.addEventListener('visibilitychange', handleVisibilityChange)
|
||||||
if (query.fangAnId) {
|
if (query.fangAnId) {
|
||||||
//根据id查询待编辑的数据
|
//根据id查询待编辑的数据
|
||||||
await userReportGoNetById({ id: query.fangAnId }).then(res => {
|
await userReportGoNetById({ id: query.fangAnId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
titleButton1.value = '重新发起'
|
titleButton1.value = '重新发起'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
res.data.id = query.fangAnId
|
res.data.id = query.fangAnId
|
||||||
addForms.value.open(res.data)
|
addForms.value.open(res.data)
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
||||||
})
|
})
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any) => {
|
const handleAudit = (instanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
query: {
|
query: {
|
||||||
id: instanceId
|
id: instanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (bussType.value === 0) {
|
if (bussType.value === 0) {
|
||||||
titleButton.value = '入网设计方案申请'
|
titleButton.value = '入网设计方案申请'
|
||||||
} else {
|
} else {
|
||||||
titleButton.value = '治理工程申请'
|
titleButton.value = '治理工程申请'
|
||||||
}
|
}
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const toGoNet = () => {
|
const toGoNet = () => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
if (bussType.value === 0) {
|
if (bussType.value === 0) {
|
||||||
titleButton1.value = '入网设计方案申请'
|
titleButton1.value = '入网设计方案申请'
|
||||||
} else {
|
} else {
|
||||||
titleButton1.value = '治理工程申请'
|
titleButton1.value = '治理工程申请'
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open()
|
addForms.value.open()
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.header_btn {
|
.header_btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 13px 15px;
|
padding: 13px 15px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid #dddfe6;
|
border: 1px solid #dddfe6;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,404 +1,404 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
<TableHeader datePicker nextFlag theCurrentTime ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='项目名称'>
|
<el-form-item label='项目名称'>
|
||||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称' clearable maxlength="32" show-word-limit></el-input>
|
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称' clearable maxlength="32" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='所在地市'>
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
<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-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
|
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
|
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
|
||||||
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
|
<el-button icon='el-icon-Plus' type='primary' @click='addFormModel'>新增</el-button>
|
||||||
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
<el-button icon='el-icon-Delete' type='primary' @click='deleteEven'>删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
||||||
<!-- 上传 -->
|
<!-- 上传 -->
|
||||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import Add from './add.vue'
|
import Add from './add.vue'
|
||||||
import Audit from './audit.vue'
|
import Audit from './audit.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData
|
const areaOptionList = dictData
|
||||||
.getBasicData('jibei_area')
|
.getBasicData('jibei_area')
|
||||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const addRef = ref()
|
const addRef = ref()
|
||||||
const AuditRef = ref()
|
const AuditRef = ref()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const show: any = ref(false)
|
const show: any = ref(false)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getUserReport',
|
url: '/supervision-boot/userReport/getUserReport',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'city',
|
field: 'city',
|
||||||
title: '所在地市',
|
title: '所在地市',
|
||||||
minWidth: 80
|
minWidth: 80
|
||||||
// formatter: (obj: any) => {
|
// formatter: (obj: any) => {
|
||||||
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
// return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '厂站名称',
|
title: '厂站名称',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.fileUploadflag = ''
|
tableStore.table.params.fileUploadflag = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增
|
// 新增
|
||||||
const addList = () => {
|
const addList = () => {
|
||||||
addRef.value.open()
|
addRef.value.open()
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
show.value = true
|
show.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getUserReportById(fullId).then(res => {
|
await getUserReportById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'></style>
|
<style scoped lang='scss'></style>
|
||||||
|
|||||||
@@ -1,217 +1,217 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
v-model="dialogFormVisible"
|
v-model="dialogFormVisible"
|
||||||
title="技术监督计划实施问题"
|
title="技术监督计划实施问题"
|
||||||
width="90%"
|
width="90%"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
draggable
|
draggable
|
||||||
custom-class="fixed-dialog"
|
custom-class="fixed-dialog"
|
||||||
@closed="close"
|
@closed="close"
|
||||||
> -->
|
> -->
|
||||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||||
<!-- <template #select>
|
<!-- <template #select>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for="item in areaOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template> -->
|
</template> -->
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRefs" />
|
<Table ref="tableRefs" />
|
||||||
<!-- </el-dialog> -->
|
<!-- </el-dialog> -->
|
||||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||||
import { getAreaList } from '@/api/common'
|
import { getAreaList } from '@/api/common'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'PlanEffectProblem'
|
name: 'PlanEffectProblem'
|
||||||
})
|
})
|
||||||
const emits = defineEmits([''])
|
const emits = defineEmits([''])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
effectProblemForm: {
|
effectProblemForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const planId: any = ref('')
|
const planId: any = ref('')
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const tableRefs = ref()
|
const tableRefs = ref()
|
||||||
//字典获取问题类型
|
//字典获取问题类型
|
||||||
const problemTypeList = dictData.getBasicData('problem_type')
|
const problemTypeList = dictData.getBasicData('problem_type')
|
||||||
//字典整改情况
|
//字典整改情况
|
||||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||||
//字典问题等级
|
//字典问题等级
|
||||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||||
const effectTableStore = new TableStore({
|
const effectTableStore = new TableStore({
|
||||||
url: '/supervision-boot/superProblem/pageProblem',
|
url: '/supervision-boot/superProblem/pageProblem',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'problemDesc',
|
field: 'problemDesc',
|
||||||
title: '问题描述',
|
title: '问题描述',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevel',
|
field: 'problemLevel',
|
||||||
title: '问题等级',
|
title: '问题等级',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevelReason',
|
field: 'problemLevelReason',
|
||||||
title: '定级依据',
|
title: '定级依据',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemType',
|
field: 'problemType',
|
||||||
title: '问题类型',
|
title: '问题类型',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'rectificationStatus',
|
field: 'rectificationStatus',
|
||||||
title: '整改情况',
|
title: '整改情况',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'rectificationTime',
|
field: 'rectificationTime',
|
||||||
title: '整改时间',
|
title: '整改时间',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue.replace('T', ' ')
|
return row.cellValue.replace('T', ' ')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
handleDetail(row)
|
handleDetail(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleEdit(row)
|
handleEdit(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const { go } = useRouter() // 路由
|
const { go } = useRouter() // 路由
|
||||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||||
planId.value = queryId
|
planId.value = queryId
|
||||||
watch(
|
watch(
|
||||||
() => queryId,
|
() => queryId,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
effectTableStore.table.params.planId = val
|
effectTableStore.table.params.planId = val
|
||||||
effectTableStore.index()
|
effectTableStore.index()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
provide('tableStore', effectTableStore)
|
provide('tableStore', effectTableStore)
|
||||||
const open = () => {
|
const open = () => {
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
dialogFormVisible.value = false
|
dialogFormVisible.value = false
|
||||||
// emits('onSubmit')
|
// emits('onSubmit')
|
||||||
}
|
}
|
||||||
//新增
|
//新增
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addFormRef.value.open({}, 'add')
|
addFormRef.value.open({}, 'add')
|
||||||
}
|
}
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = (row: any) => {
|
const handleDetail = (row: any) => {
|
||||||
addFormRef.value.open(row, 'detail')
|
addFormRef.value.open(row, 'detail')
|
||||||
}
|
}
|
||||||
//修改
|
//修改
|
||||||
const handleEdit = (row: any) => {
|
const handleEdit = (row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
}
|
}
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,391 +1,391 @@
|
|||||||
<!---技术监督计划-->
|
<!---技术监督计划-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
<!-- 实施问题弹框 -->
|
<!-- 实施问题弹框 -->
|
||||||
<effectProblem
|
<effectProblem
|
||||||
ref="effectProblemList"
|
ref="effectProblemList"
|
||||||
@onSubmit="tableStore.index()"
|
@onSubmit="tableStore.index()"
|
||||||
:effectProblemForm="effectProblemForm"
|
:effectProblemForm="effectProblemForm"
|
||||||
></effectProblem>
|
></effectProblem>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
import addForm from './components/addForm.vue'
|
import addForm from './components/addForm.vue'
|
||||||
import effectProblem from './components/effectProblem/index.vue'
|
import effectProblem from './components/effectProblem/index.vue'
|
||||||
import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
|
import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
|
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'plan'
|
name: 'plan'
|
||||||
})
|
})
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
// const layout = mainHeight(120) as any
|
// const layout = mainHeight(120) as any
|
||||||
|
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
//字典获取监督类型
|
//字典获取监督类型
|
||||||
const supvTypeList = dictData.getBasicData('supv_type')
|
const supvTypeList = dictData.getBasicData('supv_type')
|
||||||
//字典获取监督阶段
|
//字典获取监督阶段
|
||||||
const supvStageList = dictData.getBasicData('supv_stage')
|
const supvStageList = dictData.getBasicData('supv_stage')
|
||||||
//字典获取监督对象类型
|
//字典获取监督对象类型
|
||||||
const supvObjTypeList = dictData.getBasicData('supv_obj_type')
|
const supvObjTypeList = dictData.getBasicData('supv_obj_type')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/superPlan/pagePlan',
|
url: '/supervision-boot/superPlan/pagePlan',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'province',
|
field: 'province',
|
||||||
title: '所属省份',
|
title: '所属省份',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'city',
|
field: 'city',
|
||||||
title: '所在地市',
|
title: '所在地市',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'county',
|
field: 'county',
|
||||||
title: '所属县区',
|
title: '所属县区',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvOrgName',
|
field: 'supvOrgName',
|
||||||
title: '监督单位',
|
title: '监督单位',
|
||||||
minWidth: 170
|
minWidth: 170
|
||||||
},
|
},
|
||||||
{ field: 'workPlanName', title: '计划名称', minWidth: 170 },
|
{ field: 'workPlanName', title: '计划名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'planSupvDate',
|
field: 'planSupvDate',
|
||||||
title: '计划监督时间',
|
title: '计划监督时间',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue.replace('T', ' ')
|
return row.cellValue.replace('T', ' ')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvStage',
|
field: 'supvStage',
|
||||||
title: '监督阶段',
|
title: '监督阶段',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvStageList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvStageList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjType',
|
field: 'supvObjType',
|
||||||
title: '监督对象类型',
|
title: '监督对象类型',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvObjTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvObjTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'objType',
|
field: 'objType',
|
||||||
title: '监督对象属性',
|
title: '监督对象属性',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == '1' ? '在运站' : '新(改、扩)建站'
|
return row.cellValue == '1' ? '在运站' : '新(改、扩)建站'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleDetails(row.processInstanceId, row.historyInstanceId)
|
handleDetails(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '实施问题',
|
title: '实施问题',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return row.createBy != adminInfo.$state.id || row.status != 3
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleEffectProblem(row)
|
handleEffectProblem(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '提交审核',
|
title: '提交审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.processInstanceId
|
return row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row)
|
handleAudit(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
// return row.createBy != adminInfo.$state.id || row.status != 1 || !row.processInstanceId
|
// return row.createBy != adminInfo.$state.id || row.status != 1 || !row.processInstanceId
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '发起告警单',
|
title: '发起告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.isUploadHead == 1
|
return row.isUploadHead == 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAlarmForm(row)
|
handleAlarmForm(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看告警单',
|
title: '查看告警单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.isUploadHead == 0
|
return row.isUploadHead == 0
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '技术监督计划'
|
title: '技术监督计划'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
const handleDetails = (id: any, historyInstanceId: any) => {
|
const handleDetails = (id: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: id,
|
id: id,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 提交审核按钮 */
|
/** 提交审核按钮 */
|
||||||
const handleAudit = (row: any) => {
|
const handleAudit = (row: any) => {
|
||||||
planDetailsAudit({ id: row.planId }).then(res => {
|
planDetailsAudit({ id: row.planId }).then(res => {
|
||||||
ElMessage.success('提交审核成功!')
|
ElMessage.success('提交审核成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//发起告警单
|
//发起告警单
|
||||||
const handleAlarmForm = (row: any) => {
|
const handleAlarmForm = (row: any) => {
|
||||||
sendAlarm({ id: row.planId }).then(res => {
|
sendAlarm({ id: row.planId }).then(res => {
|
||||||
ElMessage.success('发起告警单成功!')
|
ElMessage.success('发起告警单成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.planId,
|
id: row.planId,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelPlanFormData(data)
|
await cancelPlanFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
// 实施问题按钮
|
// 实施问题按钮
|
||||||
const effectProblemList = ref()
|
const effectProblemList = ref()
|
||||||
const effectProblemForm: any = ref({})
|
const effectProblemForm: any = ref({})
|
||||||
const handleEffectProblem = (row: any) => {
|
const handleEffectProblem = (row: any) => {
|
||||||
// effectProblemForm.value = row
|
// effectProblemForm.value = row
|
||||||
// effectProblemList.value.open()
|
// effectProblemList.value.open()
|
||||||
push({
|
push({
|
||||||
name: 'PlanEffectProblem',
|
name: 'PlanEffectProblem',
|
||||||
query: {
|
query: {
|
||||||
id: row.planId
|
id: row.planId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -144,10 +144,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -112,11 +112,11 @@ const tableStore = new TableStore({
|
|||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '220',
|
minWidth: '220',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -1,214 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择筛选数据"
|
placeholder="请选择筛选数据"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<MyEChart style="flex: 1.2" :options="options1" />
|
<MyEChart style="flex: 1.2" :options="options1" />
|
||||||
<MyEChart style="flex: 2" :options="options2" />
|
<MyEChart style="flex: 2" :options="options2" />
|
||||||
</div>
|
</div>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { info } from 'console'
|
import { info } from 'console'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const options1 = ref({})
|
const options1 = ref({})
|
||||||
const options2 = ref({})
|
const options2 = ref({})
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/system-boot/area/areaSelect',
|
||||||
publicHeight: 345,
|
publicHeight: 345,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '事务名称' },
|
{ field: 'name', title: '事务名称' },
|
||||||
{ field: 'type', title: '事务类型' },
|
{ field: 'type', title: '事务类型' },
|
||||||
{ field: 'createUser', title: '创建人员' },
|
{ field: 'createUser', title: '创建人员' },
|
||||||
{ field: 'companyName', title: '创建部门' },
|
{ field: 'companyName', title: '创建部门' },
|
||||||
{ field: 'modifyUser', title: '处理人员' },
|
{ field: 'modifyUser', title: '处理人员' },
|
||||||
{ field: 'modifyTime', title: '处理时间' },
|
{ field: 'modifyTime', title: '处理时间' },
|
||||||
{ field: 'progressTime', title: '进行时间(天)' },
|
{ field: 'progressTime', title: '进行时间(天)' },
|
||||||
{ field: 'progress', title: '流程状态' },
|
{ field: 'progress', title: '流程状态' },
|
||||||
{ field: 'alertType', title: '预警类型' },
|
{ field: 'alertType', title: '预警类型' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '上传',
|
title: '上传',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: '',
|
type: '',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {}
|
click: async row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.type = ''
|
tableStore.table.params.type = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
info()
|
info()
|
||||||
})
|
})
|
||||||
//渲染图表
|
//渲染图表
|
||||||
const info = () => {
|
const info = () => {
|
||||||
options1.value = {
|
options1.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '商务类型',
|
text: '商务类型',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: ['全部', '预警单', '告警单']
|
data: ['全部', '预警单', '告警单']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
options2.value = {
|
options2.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '事务流程',
|
text: '事务流程',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: [
|
data: [
|
||||||
'全部',
|
'全部',
|
||||||
'开始',
|
'开始',
|
||||||
'预/告警单下发',
|
'预/告警单下发',
|
||||||
'预/告警单反馈',
|
'预/告警单反馈',
|
||||||
'现场测试',
|
'现场测试',
|
||||||
'整改通知单下发',
|
'整改通知单下发',
|
||||||
'整改通知单反馈',
|
'整改通知单反馈',
|
||||||
'完结'
|
'完结'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '2'
|
id: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '3'
|
id: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '4'
|
id: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '5'
|
id: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '6'
|
id: '6'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '新增告警单'
|
title.value = '新增告警单'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
height: 280px;
|
height: 280px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,302 +1,302 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端名称">
|
<el-form-item label="终端名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.name"
|
v-model="tableStore.table.params.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入终端名称"
|
placeholder="请输入终端名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产厂家">
|
<el-form-item label="生产厂家">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacture"
|
v-model="tableStore.table.params.manufacture"
|
||||||
placeholder="请选择生产厂家"
|
placeholder="请选择生产厂家"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in manufactorList"
|
v-for="item in manufactorList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检测结果">
|
<el-form-item label="检测结果">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.testResults"
|
v-model="tableStore.table.params.testResults"
|
||||||
placeholder="请选择检测结果"
|
placeholder="请选择检测结果"
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in testResultsList"
|
v-for="item in testResultsList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action=""
|
action=""
|
||||||
accept=".xls"
|
accept=".xls"
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-Upload"
|
icon="el-icon-Upload"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left: 12px; margin-right: 12px"
|
style="margin-left: 12px; margin-right: 12px"
|
||||||
>
|
>
|
||||||
excel导入
|
excel导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传检测报告</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 上传检测报告 -->
|
<!-- 上传检测报告 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
title="上传检测报告__支持批量上传"
|
title="上传检测报告__支持批量上传"
|
||||||
v-model="showBatchUpload"
|
v-model="showBatchUpload"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
multiple
|
multiple
|
||||||
action=""
|
action=""
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
accept=".doc,.docx"
|
accept=".doc,.docx"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-change="chooseBatch"
|
:on-change="chooseBatch"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
>
|
>
|
||||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||||
<span :style="`color:#f58003`">
|
<span :style="`color:#f58003`">
|
||||||
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const testResultsList = [
|
const testResultsList = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未展开'
|
name: '未展开'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '已展开'
|
name: '已展开'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const showBatchUpload = ref(false)
|
const showBatchUpload = ref(false)
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||||
publicHeight: 85,
|
publicHeight: 85,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'id', title: '终端编号' },
|
{ field: 'id', title: '终端编号' },
|
||||||
{
|
{
|
||||||
field: 'manufacture',
|
field: 'manufacture',
|
||||||
title: '生产厂家',
|
title: '生产厂家',
|
||||||
formatter(row: any) {
|
formatter(row: any) {
|
||||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'installPlace', title: '安装位置' },
|
{ field: 'installPlace', title: '安装位置' },
|
||||||
{ field: 'inspectionUnit', title: '送检单位' },
|
{ field: 'inspectionUnit', title: '送检单位' },
|
||||||
{
|
{
|
||||||
field: 'testResults',
|
field: 'testResults',
|
||||||
title: '检测结果',
|
title: '检测结果',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未展开',
|
0: '未展开',
|
||||||
1: '已展开'
|
1: '已展开'
|
||||||
}
|
}
|
||||||
// formatter(row: any) {
|
// formatter(row: any) {
|
||||||
// return row.cellValue == 0 ? '未展开' : '已展开'
|
// return row.cellValue == 0 ? '未展开' : '已展开'
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '250',
|
width: '250',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载原始数据报告',
|
title: '下载原始数据报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.originalReport == null
|
return row.originalReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 0)
|
download(row, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载检测报告',
|
title: '下载检测报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.inspectionReport == null
|
return row.inspectionReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 1)
|
download(row, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
tableStore.table.params.id = dictData.state.area[0].id
|
tableStore.table.params.id = dictData.state.area[0].id
|
||||||
tableStore.table.params.testResults = ''
|
tableStore.table.params.testResults = ''
|
||||||
tableStore.table.params.manufacture = []
|
tableStore.table.params.manufacture = []
|
||||||
tableStore.table.params.type = 1
|
tableStore.table.params.type = 1
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
// 关闭弹窗查询
|
// 关闭弹窗查询
|
||||||
const onsubmit = () => {}
|
const onsubmit = () => {}
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then((res: any) => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const download = (row: any, type: number) => {
|
const download = (row: any, type: number) => {
|
||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// excel导入
|
// excel导入
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
batchTerminal(e.raw).then((res: any) => {
|
batchTerminal(e.raw).then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功,无错误数据!')
|
ElMessage.success('上传成功,无错误数据!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '模板错误信息' // 设置下载的文件名
|
link.download = '模板错误信息' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 上传原始报告
|
// 上传原始报告
|
||||||
const UploadOriginal = () => {
|
const UploadOriginal = () => {
|
||||||
showBatchUpload.value = true
|
showBatchUpload.value = true
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', '1')
|
form.append('type', '1')
|
||||||
fileList.value.forEach((item: any) => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('上传失败!')
|
ElMessage.error('上传失败!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
})
|
})
|
||||||
// fileList.value
|
// fileList.value
|
||||||
}
|
}
|
||||||
const chooseBatch = (e: any) => {
|
const chooseBatch = (e: any) => {
|
||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
showBatchUpload.value = false
|
showBatchUpload.value = false
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,390 +1,390 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||||
clearable maxlength="32" show-word-limit></el-input>
|
clearable maxlength="32" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||||
:value="item.name"></el-option>
|
:value="item.name"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
||||||
:loading="loading">模板下载</el-button>
|
:loading="loading">模板下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入 -->
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
url: '/supervision-boot/userReport/getInterferenceUserPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
// showDisabled: row => {
|
// showDisabled: row => {
|
||||||
// return (
|
// return (
|
||||||
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||||
// !(row.dataType == 1)
|
// !(row.dataType == 1)
|
||||||
// )
|
// )
|
||||||
// },
|
// },
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '干扰源用户台账模板'
|
link.download = '干扰源用户台账模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getUserReportById(fullId).then(res => {
|
await getUserReportById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
|
|
||||||
/* {
|
/* {
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,372 +1,372 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端名称">
|
<el-form-item label="终端名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.name"
|
v-model="tableStore.table.params.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入终端名称"
|
placeholder="请输入终端名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产厂家">
|
<el-form-item label="生产厂家">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacture"
|
v-model="tableStore.table.params.manufacture"
|
||||||
placeholder="请选择生产厂家"
|
placeholder="请选择生产厂家"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in manufactorList"
|
v-for="item in manufactorList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="检测结果">
|
<el-form-item label="检测结果">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.testResults"
|
v-model="tableStore.table.params.testResults"
|
||||||
placeholder="请选择检测结果"
|
placeholder="请选择检测结果"
|
||||||
clearable
|
clearable
|
||||||
class="select"
|
class="select"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in testResultsList"
|
v-for="item in testResultsList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<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="exportEvent">导出</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="Export">下载模板</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action=""
|
action=""
|
||||||
accept=".xls"
|
accept=".xls"
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-Upload"
|
icon="el-icon-Upload"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left: 12px; margin-right: 12px"
|
style="margin-left: 12px; margin-right: 12px"
|
||||||
>
|
>
|
||||||
excel导入
|
excel导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="UploadOriginal">上传原始报告</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
<newlyIncreased ref="addRef" @onsubmit="tableStore.index()" />
|
||||||
<!-- 上传原始报告 -->
|
<!-- 上传原始报告 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
title="上传原始报告__支持批量上传"
|
title="上传原始报告__支持批量上传"
|
||||||
v-model="showBatchUpload"
|
v-model="showBatchUpload"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
multiple
|
multiple
|
||||||
action=""
|
action=""
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:limit="999"
|
:limit="999"
|
||||||
accept=".doc,.docx"
|
accept=".doc,.docx"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-change="chooseBatch"
|
:on-change="chooseBatch"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
>
|
>
|
||||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||||
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
<span :style="`color:#f58003`"> (*传入的原始数据文件格式(终端编号-原始数据报告.docx))</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
<el-button type="primary" @click="BatchUpload">上 传</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import newlyIncreased from './add.vue'
|
import newlyIncreased from './add.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import {
|
import {
|
||||||
DownloadExport,
|
DownloadExport,
|
||||||
reportDownload,
|
reportDownload,
|
||||||
batchTerminal,
|
batchTerminal,
|
||||||
delTerminal,
|
delTerminal,
|
||||||
getTerminalPage,
|
getTerminalPage,
|
||||||
importReport
|
importReport
|
||||||
} from '@/api/process-boot/terminal'
|
} from '@/api/process-boot/terminal'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
const manufactorList = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const testResultsList = [
|
const testResultsList = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未展开'
|
name: '未展开'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '已展开'
|
name: '已展开'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const addRef = ref()
|
const addRef = ref()
|
||||||
const showBatchUpload = ref(false)
|
const showBatchUpload = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||||
publicHeight: 85,
|
publicHeight: 85,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
// { width: '60', type: 'checkbox' },
|
// { width: '60', type: 'checkbox' },
|
||||||
|
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{ field: 'id', title: '终端编号' },
|
{ field: 'id', title: '终端编号' },
|
||||||
{ field: 'name', title: '终端名称' },
|
{ field: 'name', title: '终端名称' },
|
||||||
{
|
{
|
||||||
field: 'manufacture',
|
field: 'manufacture',
|
||||||
title: '生产厂家',
|
title: '生产厂家',
|
||||||
formatter(row: any) {
|
formatter(row: any) {
|
||||||
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
return manufactorList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'installPlace', title: '安装位置' },
|
{ field: 'installPlace', title: '安装位置' },
|
||||||
{ field: 'inspectionUnit', title: '送检单位' },
|
{ field: 'inspectionUnit', title: '送检单位' },
|
||||||
{
|
{
|
||||||
field: 'testResults',
|
field: 'testResults',
|
||||||
title: '检测结果',
|
title: '检测结果',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未展开',
|
0: '未展开',
|
||||||
1: '已展开'
|
1: '已展开'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'inspectionTime', title: '检测时间' },
|
{ field: 'inspectionTime', title: '检测时间' },
|
||||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '250',
|
width: '250',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
addRef.value.open({
|
addRef.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delTerminal([row.id]).then(() => {
|
delTerminal([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载原始数据报告',
|
title: '下载原始数据报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.originalReport == null
|
return row.originalReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 0)
|
download(row, 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载检测报告',
|
title: '下载检测报告',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.inspectionReport == null
|
return row.inspectionReport == null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
download(row, 1)
|
download(row, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
tableStore.table.params.id = dictData.state.area[0].id
|
tableStore.table.params.id = dictData.state.area[0].id
|
||||||
tableStore.table.params.testResults = ''
|
tableStore.table.params.testResults = ''
|
||||||
tableStore.table.params.manufacture = []
|
tableStore.table.params.manufacture = []
|
||||||
tableStore.table.params.type = 0
|
tableStore.table.params.type = 0
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const add = () => {
|
const add = () => {
|
||||||
addRef.value.open({
|
addRef.value.open({
|
||||||
title: '新增'
|
title: '新增'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then((res: any) => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
link.download = '终端入网检测录入模板' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 下载报告
|
// 下载报告
|
||||||
const download = (row: any, type: number) => {
|
const download = (row: any, type: number) => {
|
||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
link.download = type == 1 ? row.inspectionName : row.originalName // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// excel导入
|
// excel导入
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
batchTerminal(e.raw).then((res: any) => {
|
batchTerminal(e.raw).then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功,无错误数据!')
|
ElMessage.success('上传成功,无错误数据!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
ElMessage.warning('上传成功,有错误数据 自动下载 请查看')
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '模板错误信息' // 设置下载的文件名
|
link.download = '模板错误信息' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getTerminalPage(form).then(res => {
|
getTerminalPage(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '终端入网检测', // 文件名字
|
filename: '终端入网检测', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 上传原始报告
|
// 上传原始报告
|
||||||
const UploadOriginal = () => {
|
const UploadOriginal = () => {
|
||||||
showBatchUpload.value = true
|
showBatchUpload.value = true
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', '0')
|
form.append('type', '0')
|
||||||
fileList.value.forEach((item: any) => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('上传失败!')
|
ElMessage.error('上传失败!')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
})
|
})
|
||||||
// fileList.value
|
// fileList.value
|
||||||
}
|
}
|
||||||
const chooseBatch = (e: any) => {
|
const chooseBatch = (e: any) => {
|
||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
showBatchUpload.value = false
|
showBatchUpload.value = false
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,285 +1,285 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
<el-input style="width: 200px" placeholder="请输入项目名称" v-model="tableStore.table.params.projectName"
|
||||||
clearable maxlength="32" show-word-limit></el-input>
|
clearable maxlength="32" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
<el-option v-for="item in areaOptionList" :key="item.id" :label="item.name"
|
||||||
:value="item.name"></el-option>
|
:value="item.name"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-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-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||||
<DetailInfo :id="userId"></DetailInfo>
|
<DetailInfo :id="userId"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create" :submissionControl="false"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||||
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const loadLevelOptionList = dictData.getBasicData('load_level')
|
const loadLevelOptionList = dictData.getBasicData('load_level')
|
||||||
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
url: '/supervision-boot/userReport/getSensitiveUserPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '厂站名称',
|
title: '厂站名称',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
|
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'userReportSensitivePO.loadLevel',
|
field: 'userReportSensitivePO.loadLevel',
|
||||||
title: '负荷级别',
|
title: '负荷级别',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return loadLevelOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'userReportSensitivePO.powerSupplyInfo',
|
field: 'userReportSensitivePO.powerSupplyInfo',
|
||||||
title: '供电电源情况',
|
title: '供电电源情况',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return powerSupplyInfoOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'userStatus',
|
field: 'userStatus',
|
||||||
title: '用户状态',
|
title: '用户状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'primary',
|
0: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'warning'
|
3: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '可研',
|
0: '可研',
|
||||||
1: '建设',
|
1: '建设',
|
||||||
2: '运行',
|
2: '运行',
|
||||||
3: '退运'
|
3: '退运'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return (
|
return (
|
||||||
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
|
||||||
!(row.dataType == 1)
|
!(row.dataType == 1)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return !(row.status == 0)
|
// return !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveUserTemplate().then((res: any) => {
|
await downloadSensitiveUserTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '敏感及重要用户模板'
|
link.download = '敏感及重要用户模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
sensitiveUserPopup.value.open('导入敏感及重要用户')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,286 +1,286 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area ref='TableHeaderRef'>
|
<TableHeader area ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='搜索'>
|
<el-form-item label='搜索'>
|
||||||
<el-input
|
<el-input
|
||||||
v-model='tableStore.table.params.searchValue'
|
v-model='tableStore.table.params.searchValue'
|
||||||
placeholder='输入变电站.终端名称'
|
placeholder='输入变电站.终端名称'
|
||||||
clearable maxlength="32" show-word-limit
|
clearable maxlength="32" show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='流程状态'>
|
<el-form-item label='流程状态'>
|
||||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in statusSelect'
|
v-for='item in statusSelect'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.id'
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='处理状态'>
|
<el-form-item label='处理状态'>
|
||||||
<el-select v-model='tableStore.table.params.state' clearable placeholder='请选处理状态'>
|
<el-select v-model='tableStore.table.params.state' clearable placeholder='请选处理状态'>
|
||||||
<el-option
|
<el-option
|
||||||
v-for='item in stateSelect'
|
v-for='item in stateSelect'
|
||||||
:key='item.id'
|
:key='item.id'
|
||||||
:label='item.name'
|
:label='item.name'
|
||||||
:value='item.id'
|
:value='item.id'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' />
|
<Table ref='tableRef' />
|
||||||
<Form ref='FormRef' @onSubmit='tableStore.index()' />
|
<Form ref='FormRef' @onSubmit='tableStore.index()' />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { cancel, getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
import { cancel, getInfoById } from '@/api/supervision-boot/cycleDetection/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const FormRef = ref()
|
const FormRef = ref()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const stateSelect = [
|
const stateSelect = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '未处理'
|
name: '未处理'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '处理中'
|
name: '处理中'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '已处理'
|
name: '已处理'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
//申请联调
|
//申请联调
|
||||||
const debugForms = ref()
|
const debugForms = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/checkDevice/list',
|
url: '/supervision-boot/checkDevice/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{ field: 'substation', title: '变电站' },
|
{ field: 'substation', title: '变电站' },
|
||||||
|
|
||||||
{ field: 'dept', title: '供电公司' },
|
{ field: 'dept', title: '供电公司' },
|
||||||
{
|
{
|
||||||
field: 'deviceName',
|
field: 'deviceName',
|
||||||
title: '终端名称'
|
title: '终端名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'thisTimeCheck',
|
field: 'thisTimeCheck',
|
||||||
title: '本次定检时间'
|
title: '本次定检时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'nextTimeCheck',
|
field: 'nextTimeCheck',
|
||||||
title: '下次定检时间'
|
title: '下次定检时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'overdueDay',
|
field: 'overdueDay',
|
||||||
title: '逾期天数',
|
title: '逾期天数',
|
||||||
type: 'html',
|
type: 'html',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
|
|
||||||
let text = row.row.status == 2
|
let text = row.row.status == 2
|
||||||
? '/'
|
? '/'
|
||||||
: `<span style='color: ${
|
: `<span style='color: ${
|
||||||
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
row.row.overdueDay > 10 ? 'red' : row.row.overdueDay > 3 ? 'yellow' : ''
|
||||||
};text-decoration: none'>${row.row.overdueDay}</span>`
|
};text-decoration: none'>${row.row.overdueDay}</span>`
|
||||||
|
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
5: '同步台账成功',
|
5: '同步台账成功',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '报告上传',
|
title: '报告上传',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != null
|
return row.status != null
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('报告上传', row)
|
FormRef.value.open('报告上传', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('重新发起', row)
|
FormRef.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: async row => {
|
click: async row => {
|
||||||
// cancelLeave(row)
|
// cancelLeave(row)
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancel(data)
|
await cancel(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.statveList = [2]
|
tableStore.table.params.statveList = [2]
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.state = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const props = defineProps(['id', 'businessKey'])
|
const props = defineProps(['id', 'businessKey'])
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getInfoById({ id: fullId }).then(res => {
|
await getInfoById({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
if (props.businessKey == '3') {
|
if (props.businessKey == '3') {
|
||||||
FormRef.value.open('报告上传', res.data)
|
FormRef.value.open('报告上传', res.data)
|
||||||
} else {
|
} else {
|
||||||
FormRef.value.open('重新发起', res.data)
|
FormRef.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang='scss'>
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,361 +1,361 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable maxlength="32" show-word-limit style="width: 230px"></el-input>
|
clearable maxlength="32" show-word-limit style="width: 230px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
|
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 申请联调弹框 -->
|
<!-- 申请联调弹框 -->
|
||||||
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
<debug ref="debugForms" @onSubmit="tableStore.index()" :debugId="debugId"></debug>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import {
|
import {
|
||||||
getMointorPointTempLinedebugDetail,
|
getMointorPointTempLinedebugDetail,
|
||||||
setTempLinedebugLedgerSync
|
setTempLinedebugLedgerSync
|
||||||
} from '@/api/supervision-boot/jointDebugList/index'
|
} from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import debug from './debug.vue'
|
import debug from './debug.vue'
|
||||||
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteTempLineDebugReport } from '@/api/supervision-boot/delete/index'
|
import { deleteTempLineDebugReport } from '@/api/supervision-boot/delete/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
statusSelect.push({ name: '同步台账成功', id: 5 })
|
statusSelect.push({ name: '同步台账成功', id: 5 })
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/tempLinedebug/list',
|
url: '/supervision-boot/tempLinedebug/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'powerSubstationName',
|
field: 'powerSubstationName',
|
||||||
title: '电网侧变电站',
|
title: '电网侧变电站',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
|
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'reason',
|
field: 'reason',
|
||||||
title: '调试原因',
|
title: '调试原因',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
|
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
|
||||||
// { field: 'monitoringTerminalCode', title: '终端编码', minWidth: 170 },
|
// { field: 'monitoringTerminalCode', title: '终端编码', minWidth: 170 },
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning',
|
4: 'warning',
|
||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消',
|
4: '已取消',
|
||||||
5: '同步台账成功',
|
5: '同步台账成功',
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: 'edit',
|
// name: 'edit',
|
||||||
// title: '编辑',
|
// title: '编辑',
|
||||||
// type: 'primary',
|
// type: 'primary',
|
||||||
// icon: 'el-icon-Open',
|
// icon: 'el-icon-Open',
|
||||||
// render: 'basicButton',
|
// render: 'basicButton',
|
||||||
// showDisabled: row => {
|
// showDisabled: row => {
|
||||||
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return !(row.status == 0)
|
// return !(row.status == 0)
|
||||||
// },
|
// },
|
||||||
// click: row => {
|
// click: row => {
|
||||||
// debugForms.value.open('编辑', row)
|
// debugForms.value.open('编辑', row)
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '申请联调',
|
title: '申请联调',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-add',
|
icon: 'el-icon-add',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
// handleDebug(row)
|
// handleDebug(row)
|
||||||
debugForms.value.open('申请联调', row)
|
debugForms.value.open('申请联调', row)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reason
|
return row.reason
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
debugForms.value.open('重新发起', row)
|
debugForms.value.open('重新发起', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '同步台账',
|
title: '同步台账',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-add',
|
icon: 'el-icon-add',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
setTempLinedebugLedgerSync({ id: row.id }).then(res => {
|
setTempLinedebugLedgerSync({ id: row.id }).then(res => {
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '台账同步成功',
|
message: '台账同步成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != 2
|
return row.status != 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.statveList = [2]
|
tableStore.table.params.statveList = [2]
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteTempLineDebugReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//申请联调
|
//申请联调
|
||||||
const debugForms = ref()
|
const debugForms = ref()
|
||||||
const debugId = ref('')
|
const debugId = ref('')
|
||||||
const handleDebug = (row: any) => {
|
const handleDebug = (row: any) => {
|
||||||
debugId.value = row.id
|
debugId.value = row.id
|
||||||
console.log(debugId.value)
|
console.log(debugId.value)
|
||||||
debugForms.value.open('申请联调', row)
|
debugForms.value.open('申请联调', row)
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelMointorPointTempLinedebug(data)
|
await cancelMointorPointTempLinedebug(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
await getMointorPointTempLinedebugDetail({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
debugForms.value.open('重新发起', res.data)
|
debugForms.value.open('重新发起', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,328 +1,328 @@
|
|||||||
<!---终端入网检测-->
|
<!---终端入网检测-->
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable maxlength="32" show-word-limit style="width: 230px"></el-input>
|
clearable maxlength="32" show-word-limit style="width: 230px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { cancelMointorPointFormData, getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
import { cancelMointorPointFormData, getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
||||||
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
|
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
|
||||||
import { getTerminalDetailsById } from "@/api/supervision-boot/terminal";
|
import { getTerminalDetailsById } from "@/api/supervision-boot/terminal";
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const show: any = ref(false)
|
const show: any = ref(false)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/tempLine/list',
|
url: '/supervision-boot/tempLine/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
// { field: 'orgName', title: '填报部门名称', minWidth: 170 },
|
// { field: 'orgName', title: '填报部门名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'powerSubstationName',
|
field: 'powerSubstationName',
|
||||||
title: '电网侧电站',
|
title: '电网侧电站',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'connectedBus', title: '关联母线', minWidth: 170 },
|
{ field: 'connectedBus', title: '关联母线', minWidth: 170 },
|
||||||
{ field: 'monitoringTerminalName', title: '所属终端', minWidth: 170 },
|
{ field: 'monitoringTerminalName', title: '所属终端', minWidth: 170 },
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 150 },
|
{ field: 'lineName', title: '监测点名称', minWidth: 150 },
|
||||||
{ field: 'reportDate', title: '填报日期', minWidth: 150 },
|
{ field: 'reportDate', title: '填报日期', minWidth: 150 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '监测点信息'
|
title: '监测点信息'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelMointorPointFormData(data)
|
await cancelMointorPointFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
deleteTempLineReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteTempLineReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
getLoadTypeUserList(form).then(res => {
|
getLoadTypeUserList(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '未建档非线性用户', // 文件名字
|
filename: '未建档非线性用户', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getTempLineDetailsById({ id: fullId }).then(res => {
|
await getTempLineDetailsById({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,372 +1,372 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端名称"
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入变电站、终端名称"
|
||||||
clearable maxlength="32" show-word-limit style="width: 180px"></el-input>
|
clearable maxlength="32" show-word-limit style="width: 180px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate"
|
||||||
:loading="loading">模版下载</el-button>
|
:loading="loading">模版下载</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
<!-- 上传模版 -->
|
<!-- 上传模版 -->
|
||||||
<uploadATemplate ref="uploadATemplateRef" />
|
<uploadATemplate ref="uploadATemplateRef" />
|
||||||
|
|
||||||
<!-- 上传模版 详情 -->
|
<!-- 上传模版 详情 -->
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId"></DetailInfo>
|
<DetailInfo :id="userId"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
import DetailInfo from '@/views/pqs/supervise/terminalNetworkDetection/components/terminainal/detail.vue'
|
||||||
import { cancelTerminalFormData, getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
import { cancelTerminalFormData, getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||||
import uploadATemplate from './uploadATemplate.vue'
|
import uploadATemplate from './uploadATemplate.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
||||||
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
import { getUserReportById } from "@/api/supervision-boot/interfere";
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const uploadATemplateRef = ref()
|
const uploadATemplateRef = ref()
|
||||||
const show: any = ref(false)
|
const show: any = ref(false)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/deVReport/list',
|
url: '/supervision-boot/deVReport/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'orgName',
|
field: 'orgName',
|
||||||
title: '填报部门名称',
|
title: '填报部门名称',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : ''
|
row.cellValue = row.cellValue ? row.cellValue : ''
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'substationName',
|
field: 'substationName',
|
||||||
title: '所属变电站',
|
title: '所属变电站',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
{ field: 'monitoringTerminalName', title: '终端名称', minWidth: 170 },
|
||||||
{ field: 'monitoringTerminalCode', title: '终端编号', minWidth: 170 },
|
{ field: 'monitoringTerminalCode', title: '终端编号', minWidth: 170 },
|
||||||
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
{ field: 'reportDate', title: '填报日期', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType != 0 || !row.processInstanceId
|
return row.importType != 0 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType != 1
|
return row.importType != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
userId.value = row.id
|
userId.value = row.id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0)
|
return row.importType == 1 ? false : row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.importType == 1 ? false : !(row.status == 0)
|
return row.importType == 1 ? false : !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
// tableStore.table.params.fileUploadflag = ''
|
// tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '终端信息'
|
title: '终端信息'
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTerminalFormData(data)
|
await cancelTerminalFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
downloadDevTemplate().then((res: any) => {
|
downloadDevTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '终端入网检测模板'
|
link.download = '终端入网检测模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
uploadATemplateRef.value.open('导入终端入网检测')
|
uploadATemplateRef.value.open('导入终端入网检测')
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentRoute.value.path,
|
() => currentRoute.value.path,
|
||||||
() => {
|
() => {
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
flag.value = false
|
flag.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(() => props.id, async (newValue, oldValue) => {
|
watch(() => props.id, async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getTerminalDetailsById({ id: fullId }).then(res => {
|
await getTerminalDetailsById({ id: fullId }).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-upload-list__item) {
|
:deep(.el-upload-list__item) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__wrapper {
|
::v-deep .el-input__wrapper {
|
||||||
// width: 200px !important;
|
// width: 200px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user