Compare commits
25 Commits
e65df4daad
...
2026-01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59489aaafa | ||
|
|
5d0421dd40 | ||
|
|
6d7ef7cf5d | ||
|
|
8d9ccf97a7 | ||
|
|
7188e3e681 | ||
|
|
a9fc77eb8b | ||
|
|
87af11288d | ||
|
|
0763187744 | ||
|
|
ae641604ba | ||
|
|
564e6ef4ab | ||
|
|
c84c5dae3b | ||
|
|
c902dabb73 | ||
|
|
8d1497032f | ||
|
|
6aeac753ef | ||
|
|
56d65a6c17 | ||
|
|
8b356c87a3 | ||
|
|
c0feeaee7b | ||
|
|
6a112c8ae2 | ||
|
|
a19952b771 | ||
|
|
0b76347853 | ||
|
|
379951699d | ||
|
|
003737cf52 | ||
|
|
20e6d3719a | ||
|
|
77617412dd | ||
|
|
68ea43c42b |
@@ -206,3 +206,11 @@ export function exportTerminalBase() {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
//一键分配终端
|
||||
export function allotTerminal(data: any) {
|
||||
return createAxios({
|
||||
url: '/device-boot/nodeDevice/oneKeyDistribution',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,72 +1,115 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
//事件报告
|
||||
export function getEventReport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getEventReport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 生成报告
|
||||
export function getAreaReport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getAreaReport',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
//查询所有模板
|
||||
export function getList(data) {
|
||||
return createAxios({
|
||||
url: '/system-boot/EventTemplate/getList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function selectReleation(data) {
|
||||
return createAxios({
|
||||
url: '/system-boot/EventTemplate/selectReleation',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
export function getLineExport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getLineExport',
|
||||
method: 'post',
|
||||
data: data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
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'
|
||||
})
|
||||
}
|
||||
import createAxios from '@/utils/request'
|
||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
|
||||
//事件报告
|
||||
export function getEventReport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getEventReport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 生成报告
|
||||
export function getAreaReport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getAreaReport',
|
||||
method: 'post',
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
//查询所有模板
|
||||
export function getList(data) {
|
||||
return createAxios({
|
||||
url: '/system-boot/EventTemplate/getList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function selectReleation(data) {
|
||||
return createAxios({
|
||||
url: '/system-boot/EventTemplate/selectReleation',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
export function getLineExport(data) {
|
||||
return createAxios({
|
||||
url: '/event-boot/report/getLineExport',
|
||||
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'
|
||||
|
||||
export function getHistoryResult(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/harmonic/getHistoryResult',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// word报告
|
||||
export function exportModelJB(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/exportmodel/exportModelJB',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
export function getHistoryResult(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/harmonic/getHistoryResult',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// word报告
|
||||
export function exportModelJB(data: any) {
|
||||
return request({
|
||||
url: '/harmonic-boot/exportmodel/exportModelJB',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
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 { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
|
||||
export function exportModel(data: any) {
|
||||
return createAxios({
|
||||
@@ -6,6 +7,17 @@ export function exportModel(data: any) {
|
||||
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 areaHarmonicReport(data: any) {
|
||||
@@ -14,5 +26,35 @@ export function areaHarmonicReport(data: any) {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export const uploadFile = (file: any, path: string) => {
|
||||
data: form
|
||||
}).then(res => {
|
||||
if (res.code == `A0000`) {
|
||||
ElMessage.success('上传成功!')
|
||||
ElMessage.success('文件上传成功!')
|
||||
return res
|
||||
}
|
||||
})
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 243 KiB |
BIN
src/assets/logo/海南.png
Normal file
BIN
src/assets/logo/海南.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
src/assets/logo/灿能.png
Normal file
BIN
src/assets/logo/灿能.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/logo/电网.png
Normal file
BIN
src/assets/logo/电网.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 249 KiB |
BIN
src/assets/logo/电网1.png
Normal file
BIN
src/assets/logo/电网1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -17,6 +17,7 @@ const config = useConfig()
|
||||
// import { nextTick } from 'process'
|
||||
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
||||
color[0] = config.layout.elementUiPrimary[0]
|
||||
|
||||
const chartRef = ref<HTMLDivElement>()
|
||||
|
||||
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
||||
|
||||
@@ -34,7 +34,6 @@ const fetchConfig = async (name: string) => {
|
||||
// fetchConfig()
|
||||
|
||||
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
||||
onMounted(() => {})
|
||||
|
||||
const GetEchar = async (name: string) => {
|
||||
let chartDom = document.getElementById('chartMap')
|
||||
@@ -44,6 +43,7 @@ const GetEchar = async (name: string) => {
|
||||
name == dictData.state.area?.[0].name ? (showCircle.value = false) : (showCircle.value = true)
|
||||
|
||||
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
|
||||
|
||||
let option = {
|
||||
title: {
|
||||
left: 'center',
|
||||
@@ -99,6 +99,7 @@ const GetEchar = async (name: string) => {
|
||||
// top: 10,
|
||||
// bottom: 0,
|
||||
roam: true,
|
||||
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
@@ -178,6 +179,7 @@ const GetEchar = async (name: string) => {
|
||||
}, 0)
|
||||
window.addEventListener('resize', resizeHandler)
|
||||
const flag1 = ref(true)
|
||||
|
||||
// 点击事件
|
||||
myCharts.value.off('click')
|
||||
myCharts.value.on('click', (e: any) => {
|
||||
|
||||
@@ -1,441 +1,441 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div>
|
||||
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="wave"></div>
|
||||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||
<el-table stripe :data="Data" :height="height" border style="width: 100%"
|
||||
header-cell-class-name="table_header">
|
||||
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="三相电压不平衡度(%)" width="180"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降类型"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { downloadWaveFile, getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import * as echarts from 'echarts'
|
||||
import url from '@/assets/img/point.png'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
props: {
|
||||
flag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
boxoList: {
|
||||
type: [Object, Array]
|
||||
},
|
||||
GJList: {
|
||||
type: [Object, Array]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
|
||||
valA: 0,
|
||||
isOpen: false,
|
||||
time: '',
|
||||
type: '',
|
||||
severity: '',
|
||||
iphasic: '',
|
||||
eventValue: '',
|
||||
persistTime: '',
|
||||
lineName: '',
|
||||
subName: '',
|
||||
waveDatas: [],
|
||||
|
||||
Data: [],
|
||||
height: null,
|
||||
vhh: null,
|
||||
ptpass: '',
|
||||
waveHeight: undefined,
|
||||
$wave: undefined,
|
||||
color: '#006565',
|
||||
charts: {},
|
||||
arrpoints: [],
|
||||
titles: '',
|
||||
vh: null,
|
||||
vw: null,
|
||||
zoom: ''
|
||||
}
|
||||
},
|
||||
created() { },
|
||||
watch: {
|
||||
value: function (a, b) {
|
||||
if (a == 2) {
|
||||
// $("#wave1").remove();
|
||||
this.initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
this.initWaves()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.$wave = $('#wave').eq(0)
|
||||
this.$nextTick(() => {
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
if (this.flag) {
|
||||
// console.log(123);
|
||||
this.vh = mainHeight(250).height
|
||||
} else {
|
||||
// console.log(3333);
|
||||
this.vh = mainHeight(270).height
|
||||
}
|
||||
},
|
||||
query() {
|
||||
this.loading = true
|
||||
this.initWave()
|
||||
},
|
||||
|
||||
//开始画图
|
||||
initWave() {
|
||||
//清除之前增加的div
|
||||
// $("#wave ~ .bx1").remove();
|
||||
$('div.bx1').remove()
|
||||
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
||||
// var height = $(window).height() - 90;
|
||||
var picHeight
|
||||
var show = true
|
||||
|
||||
//var v = $("#interval").val();
|
||||
var isvisible = false
|
||||
|
||||
picHeight = this.vh
|
||||
// this.$wave.css('height', picHeight)
|
||||
// this.$wave.css('width', '100%')
|
||||
$('#wave').css('height', picHeight)
|
||||
$('#wave').css('width', this.vw)
|
||||
|
||||
var adata = []
|
||||
var bdata = []
|
||||
var cdata = []
|
||||
var max = 0
|
||||
var min = 0
|
||||
//绘制横向第一个波形图
|
||||
this.GJList.smp_x.forEach((item, ind) => {
|
||||
if (this.GJList.smp_a[ind] > max) {
|
||||
max = this.GJList.smp_a[ind]
|
||||
} else if (this.GJList.smp_a[ind] < min) {
|
||||
min = this.GJList.smp_a[ind]
|
||||
}
|
||||
if (this.GJList.smp_b[ind] > max) {
|
||||
max = this.GJList.smp_b[ind]
|
||||
} else if (this.GJList.smp_b[ind] < min) {
|
||||
min = this.GJList.smp_b[ind]
|
||||
}
|
||||
if (this.GJList.smp_c[ind] > max) {
|
||||
max = this.GJList.smp_c[ind]
|
||||
} else if (this.GJList.smp_c[ind] < min) {
|
||||
min = this.GJList.smp_c[ind]
|
||||
}
|
||||
|
||||
adata.push([item, this.GJList.smp_a[ind]])
|
||||
bdata.push([item, this.GJList.smp_b[ind]])
|
||||
cdata.push([item, this.GJList.smp_c[ind]])
|
||||
})
|
||||
//绘制瞬时波形图
|
||||
// const echarts = require('echarts')
|
||||
let wave = document.getElementById('wave')
|
||||
let _this = this
|
||||
var myChartes = echarts.init(wave)
|
||||
let echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
var option = {
|
||||
tooltip: {
|
||||
top: '10px',
|
||||
trigger: 'axis',
|
||||
borderColor: 'grey',
|
||||
backgroundColor: '#fff',
|
||||
style: {
|
||||
color: '#000',
|
||||
fontSize: '15px',
|
||||
padding: 10
|
||||
},
|
||||
formatter: function (params) {
|
||||
// console.log(params)
|
||||
var tips = ''
|
||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
},
|
||||
// axisPointer: {
|
||||
// type: "cross",
|
||||
// label: {
|
||||
// color: "#fff",
|
||||
// fontSize: 16,
|
||||
// },
|
||||
// },
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0
|
||||
},
|
||||
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
left: '5%',
|
||||
top: '20',
|
||||
verticalAlign: 'top',
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
rich: {
|
||||
a: {
|
||||
verticalAlign: 'middle'
|
||||
}
|
||||
},
|
||||
|
||||
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
feature: {
|
||||
//restore: {},
|
||||
saveAsImage: {
|
||||
iconStyle: {
|
||||
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '时刻',
|
||||
boundaryGap: false,
|
||||
min: this.GJList.smp_x[0],
|
||||
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
if (_this.valA != (value - 0).toFixed(0)) {
|
||||
_this.valA = (value - 0).toFixed(0)
|
||||
return (value - 0).toFixed(0)
|
||||
}
|
||||
}
|
||||
//rotate:39
|
||||
}
|
||||
// data: this.syncExtremes,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: 'kV',
|
||||
title: {
|
||||
align: 'high',
|
||||
offset: 0,
|
||||
text: 'kV',
|
||||
rotation: 0,
|
||||
y: -10
|
||||
},
|
||||
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: (max + 10).toFixed(2),
|
||||
min: (min - 10).toFixed(2),
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
//minInterval: 1,
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
// 使用深浅的间隔色
|
||||
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '40px',
|
||||
bottom: '40px',
|
||||
top: '55px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'A相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#DAA520'
|
||||
},
|
||||
data: adata
|
||||
},
|
||||
{
|
||||
name: 'B相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#2E8B57'
|
||||
},
|
||||
data: bdata
|
||||
},
|
||||
{
|
||||
name: 'C相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#A52a2a'
|
||||
},
|
||||
data: cdata
|
||||
},
|
||||
{
|
||||
name: '暂降触发点',
|
||||
type: 'scatter',
|
||||
symbol: 'image://' + url,
|
||||
itemStyle: {
|
||||
width: 16,
|
||||
height: 16
|
||||
},
|
||||
data: [[0, min]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
myChartes.setOption(option)
|
||||
// window.echartsArr.push(myChartes)
|
||||
setTimeout(() => {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
|
||||
// let waveDatasTemp = waveDatas.slice(1);
|
||||
// waveDatasTemp.reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div>
|
||||
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="wave"></div>
|
||||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||
<el-table stripe :data="Data" :height="height" border style="width: 100%"
|
||||
header-cell-class-name="table_header">
|
||||
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="三相电压不平衡度(%)" width="180"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="触发类型"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { downloadWaveFile, getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import * as echarts from 'echarts'
|
||||
import url from '@/assets/img/point.png'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
props: {
|
||||
flag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
boxoList: {
|
||||
type: [Object, Array]
|
||||
},
|
||||
GJList: {
|
||||
type: [Object, Array]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
|
||||
valA: 0,
|
||||
isOpen: false,
|
||||
time: '',
|
||||
type: '',
|
||||
severity: '',
|
||||
iphasic: '',
|
||||
eventValue: '',
|
||||
persistTime: '',
|
||||
lineName: '',
|
||||
subName: '',
|
||||
waveDatas: [],
|
||||
|
||||
Data: [],
|
||||
height: null,
|
||||
vhh: null,
|
||||
ptpass: '',
|
||||
waveHeight: undefined,
|
||||
$wave: undefined,
|
||||
color: '#006565',
|
||||
charts: {},
|
||||
arrpoints: [],
|
||||
titles: '',
|
||||
vh: null,
|
||||
vw: null,
|
||||
zoom: ''
|
||||
}
|
||||
},
|
||||
created() { },
|
||||
watch: {
|
||||
value: function (a, b) {
|
||||
if (a == 2) {
|
||||
// $("#wave1").remove();
|
||||
this.initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
this.initWaves()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.$wave = $('#wave').eq(0)
|
||||
this.$nextTick(() => {
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
if (this.flag) {
|
||||
// console.log(123);
|
||||
this.vh = mainHeight(250).height
|
||||
} else {
|
||||
// console.log(3333);
|
||||
this.vh = mainHeight(270).height
|
||||
}
|
||||
},
|
||||
query() {
|
||||
this.loading = true
|
||||
this.initWave()
|
||||
},
|
||||
|
||||
//开始画图
|
||||
initWave() {
|
||||
//清除之前增加的div
|
||||
// $("#wave ~ .bx1").remove();
|
||||
$('div.bx1').remove()
|
||||
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
||||
// var height = $(window).height() - 90;
|
||||
var picHeight
|
||||
var show = true
|
||||
|
||||
//var v = $("#interval").val();
|
||||
var isvisible = false
|
||||
|
||||
picHeight = this.vh
|
||||
// this.$wave.css('height', picHeight)
|
||||
// this.$wave.css('width', '100%')
|
||||
$('#wave').css('height', picHeight)
|
||||
$('#wave').css('width', this.vw)
|
||||
|
||||
var adata = []
|
||||
var bdata = []
|
||||
var cdata = []
|
||||
var max = 0
|
||||
var min = 0
|
||||
//绘制横向第一个波形图
|
||||
this.GJList.smp_x.forEach((item, ind) => {
|
||||
if (this.GJList.smp_a[ind] > max) {
|
||||
max = this.GJList.smp_a[ind]
|
||||
} else if (this.GJList.smp_a[ind] < min) {
|
||||
min = this.GJList.smp_a[ind]
|
||||
}
|
||||
if (this.GJList.smp_b[ind] > max) {
|
||||
max = this.GJList.smp_b[ind]
|
||||
} else if (this.GJList.smp_b[ind] < min) {
|
||||
min = this.GJList.smp_b[ind]
|
||||
}
|
||||
if (this.GJList.smp_c[ind] > max) {
|
||||
max = this.GJList.smp_c[ind]
|
||||
} else if (this.GJList.smp_c[ind] < min) {
|
||||
min = this.GJList.smp_c[ind]
|
||||
}
|
||||
|
||||
adata.push([item, this.GJList.smp_a[ind]])
|
||||
bdata.push([item, this.GJList.smp_b[ind]])
|
||||
cdata.push([item, this.GJList.smp_c[ind]])
|
||||
})
|
||||
//绘制瞬时波形图
|
||||
// const echarts = require('echarts')
|
||||
let wave = document.getElementById('wave')
|
||||
let _this = this
|
||||
var myChartes = echarts.init(wave)
|
||||
let echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
var option = {
|
||||
tooltip: {
|
||||
top: '10px',
|
||||
trigger: 'axis',
|
||||
borderColor: 'grey',
|
||||
backgroundColor: '#fff',
|
||||
style: {
|
||||
color: '#000',
|
||||
fontSize: '15px',
|
||||
padding: 10
|
||||
},
|
||||
formatter: function (params) {
|
||||
// console.log(params)
|
||||
var tips = ''
|
||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
},
|
||||
// axisPointer: {
|
||||
// type: "cross",
|
||||
// label: {
|
||||
// color: "#fff",
|
||||
// fontSize: 16,
|
||||
// },
|
||||
// },
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0
|
||||
},
|
||||
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
left: '5%',
|
||||
top: '20',
|
||||
verticalAlign: 'top',
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
rich: {
|
||||
a: {
|
||||
verticalAlign: 'middle'
|
||||
}
|
||||
},
|
||||
|
||||
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
feature: {
|
||||
//restore: {},
|
||||
saveAsImage: {
|
||||
iconStyle: {
|
||||
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '时刻',
|
||||
boundaryGap: false,
|
||||
min: this.GJList.smp_x[0],
|
||||
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
if (_this.valA != (value - 0).toFixed(0)) {
|
||||
_this.valA = (value - 0).toFixed(0)
|
||||
return (value - 0).toFixed(0)
|
||||
}
|
||||
}
|
||||
//rotate:39
|
||||
}
|
||||
// data: this.syncExtremes,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: 'kV',
|
||||
title: {
|
||||
align: 'high',
|
||||
offset: 0,
|
||||
text: 'kV',
|
||||
rotation: 0,
|
||||
y: -10
|
||||
},
|
||||
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: (max + 10).toFixed(2),
|
||||
min: (min - 10).toFixed(2),
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
//minInterval: 1,
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
// 使用深浅的间隔色
|
||||
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '40px',
|
||||
bottom: '40px',
|
||||
top: '55px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'A相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#DAA520'
|
||||
},
|
||||
data: adata
|
||||
},
|
||||
{
|
||||
name: 'B相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#2E8B57'
|
||||
},
|
||||
data: bdata
|
||||
},
|
||||
{
|
||||
name: 'C相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#A52a2a'
|
||||
},
|
||||
data: cdata
|
||||
},
|
||||
{
|
||||
name: '暂降触发点',
|
||||
type: 'scatter',
|
||||
symbol: 'image://' + url,
|
||||
itemStyle: {
|
||||
width: 16,
|
||||
height: 16
|
||||
},
|
||||
data: [[0, min]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
myChartes.setOption(option)
|
||||
// window.echartsArr.push(myChartes)
|
||||
setTimeout(() => {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
|
||||
// let waveDatasTemp = waveDatas.slice(1);
|
||||
// waveDatasTemp.reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/>
|
||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||
<div style="display: flex; align-items: center" class="mb10">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable>
|
||||
<el-input v-model="filterText" placeholder="请输入内容" maxlength="10" show-word-limit clearable>
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{ Math.floor(row.eventValue * 10000) / 100 }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="eventType" width="100px" title="暂降类型">
|
||||
<vxe-column field="eventType" width="100px" title="触发类型">
|
||||
<template #default="{ row }">
|
||||
{{ event.filter(item => item.id == row.eventType)[0]?.name || '/' }}
|
||||
</template>
|
||||
@@ -79,7 +79,7 @@ const init = async () => {
|
||||
// 设置消息接收回调
|
||||
mqttClient.onMessage((topic, message) => {
|
||||
const msg = JSON.parse(message.toString())
|
||||
// console.log('🚀 ~ init ~ msg:', msg)
|
||||
// console.log('🚀 ~ init ~ msg:', msg)
|
||||
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
||||
drawer.value = true
|
||||
isLoading.value = true
|
||||
|
||||
@@ -1,109 +1,117 @@
|
||||
<template>
|
||||
<el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="校验密码:" prop="password">
|
||||
<el-input v-model="form.password" type="password" placeholder="请输入校验密码" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
|
||||
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
|
||||
<el-input v-model="form.confirmPwd" type="password" placeholder="请输入确认密码" show-password />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
||||
import { validatePwd } from '@/utils/common'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
|
||||
const adminInfo = useAdminInfo()
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('修改密码')
|
||||
const formRef = ref()
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
password: '',
|
||||
newPwd: '',
|
||||
confirmPwd: ''
|
||||
})
|
||||
const rules = {
|
||||
password: [
|
||||
{ required: true, message: '请输入校验密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
newPwd: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ validator: validatePwd, trigger: 'blur' }
|
||||
],
|
||||
confirmPwd: [
|
||||
{ required: true, message: '请确认密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: string, callback: any) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请再次输入密码'))
|
||||
} else if (value !== form.newPwd) {
|
||||
callback(new Error('两次输入密码不一致!'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur',
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
dialogVisible.value = true
|
||||
form.password = ''
|
||||
form.newPwd = ''
|
||||
form.confirmPwd = ''
|
||||
}
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
passwordConfirm(form.password).then(res => {
|
||||
updatePassword({
|
||||
id: adminInfo.$state.userIndex,
|
||||
newPassword: form.newPwd
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('密码修改成功')
|
||||
dialogVisible.value = false
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<template>
|
||||
<el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="校验密码:" prop="password">
|
||||
<el-input v-model="form.password" type="password" placeholder="请输入校验密码" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
|
||||
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
|
||||
<el-input v-model="form.confirmPwd" type="password" placeholder="请输入确认密码" show-password />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
||||
import { validatePwd } from '@/utils/common'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import router from '@/router'
|
||||
import { useNavTabs } from '@/stores/navTabs'
|
||||
const navTabs = useNavTabs()
|
||||
const adminInfo = useAdminInfo()
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('修改密码')
|
||||
const formRef = ref()
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
password: '',
|
||||
newPwd: '',
|
||||
confirmPwd: ''
|
||||
})
|
||||
const rules = {
|
||||
password: [
|
||||
{ required: true, message: '请输入校验密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
newPwd: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ validator: validatePwd, trigger: 'blur' }
|
||||
],
|
||||
confirmPwd: [
|
||||
{ required: true, message: '请确认密码', trigger: 'blur' },
|
||||
{
|
||||
min: 6,
|
||||
max: 12,
|
||||
message: '长度在 6 到 12 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: string, callback: any) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请再次输入密码'))
|
||||
} else if (value !== form.newPwd) {
|
||||
callback(new Error('两次输入密码不一致!'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur',
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
dialogVisible.value = true
|
||||
form.password = ''
|
||||
form.newPwd = ''
|
||||
form.confirmPwd = ''
|
||||
}
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
passwordConfirm(form.password).then(res => {
|
||||
updatePassword({
|
||||
id: adminInfo.$state.userIndex,
|
||||
newPassword: form.newPwd
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('密码修改成功,请重新登录!')
|
||||
dialogVisible.value = false
|
||||
setTimeout(() => {
|
||||
navTabs.closeTabs()
|
||||
window.localStorage.clear()
|
||||
adminInfo.reset()
|
||||
router.push({ name: 'login' })
|
||||
}, 0)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import staticRoutes from '@/router/static'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import NProgress from 'nprogress'
|
||||
import { loading } from '@/utils/loading'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: staticRoutes
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.configure({ showSpinner: false })
|
||||
NProgress.start()
|
||||
if (!window.existLoading) {
|
||||
loading.show()
|
||||
window.existLoading = true
|
||||
}
|
||||
if (to.path == '/login' || to.path == '/404') {
|
||||
// 登录或者注册才可以往下进行
|
||||
next()
|
||||
} else if (to.path == '/admin/center/homePage') {
|
||||
window.open(window.location.origin + '/homePage/#/')
|
||||
} else {
|
||||
// 获取 token
|
||||
const adminInfo = useAdminInfo()
|
||||
const token = adminInfo.getToken()
|
||||
// token 不存在
|
||||
if (token === null || token === '') {
|
||||
ElMessage.error('您还没有登录,请先登录')
|
||||
next('/login')
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
// next()
|
||||
})
|
||||
|
||||
// 路由加载后
|
||||
router.afterEach(() => {
|
||||
if (window.existLoading) {
|
||||
loading.hide()
|
||||
}
|
||||
NProgress.done()
|
||||
})
|
||||
|
||||
export default router
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import staticRoutes from '@/router/static'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import NProgress from 'nprogress'
|
||||
import { loading } from '@/utils/loading'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: staticRoutes
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.configure({ showSpinner: false })
|
||||
NProgress.start()
|
||||
if (!window.existLoading) {
|
||||
loading.show()
|
||||
window.existLoading = true
|
||||
}
|
||||
if (to.path == '/login' || to.path == '/404') {
|
||||
// 登录或者注册才可以往下进行
|
||||
next()
|
||||
} else if (to.path == '/admin/center/homePage') {
|
||||
window.open(window.location.origin + '/homePage/#/')
|
||||
} else {
|
||||
// 获取 token
|
||||
const adminInfo = useAdminInfo()
|
||||
const token = adminInfo.getToken()
|
||||
// token 不存在
|
||||
if (token === null || token === '') {
|
||||
// ElMessage.error('您还没有登录,请先登录')
|
||||
next('/login')
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
||||
// next()
|
||||
})
|
||||
|
||||
// 路由加载后
|
||||
router.afterEach(() => {
|
||||
if (window.existLoading) {
|
||||
loading.hide()
|
||||
}
|
||||
NProgress.done()
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
@@ -1,246 +1,246 @@
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { STORE_CONFIG } from '@/stores/constant/cacheKey'
|
||||
import type { Layout } from '@/stores/interface'
|
||||
|
||||
export const useConfig = defineStore(
|
||||
'config',
|
||||
() => {
|
||||
const layout: Layout = reactive({
|
||||
/* 全局 */
|
||||
showDrawer: false,
|
||||
// 是否收缩布局(小屏终端)
|
||||
shrink: false,
|
||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
layoutMode: 'Classic',
|
||||
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
mainAnimation: 'slide-right',
|
||||
// 是否暗黑模式
|
||||
isDark: false,
|
||||
elementUiPrimary: ['#002B6A', '#002B6A'],
|
||||
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
||||
tableHeaderColor: ['#111', '#fff'],
|
||||
tableCurrent: ['#F3F6F9', '#F3F6F9'],
|
||||
/* 侧边菜单 */
|
||||
// 侧边菜单背景色
|
||||
menuBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 侧边菜单文字颜色
|
||||
menuColor: ['#FFFFFF', '#CFD3DC'],
|
||||
// 侧边菜单激活项背景色
|
||||
menuActiveBackground: ['#002255', '#1d1e1f'],
|
||||
// 侧边菜单激活项文字色
|
||||
menuActiveColor: ['#409eff', '#3375b9'],
|
||||
// 侧边菜单顶栏背景色
|
||||
menuTopBarBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 侧边菜单宽度(展开时),单位px
|
||||
menuWidth: 260,
|
||||
// 侧边菜单项默认图标
|
||||
menuDefaultIcon: 'fa fa-circle-o',
|
||||
// 是否水平折叠收起菜单
|
||||
menuCollapse: false,
|
||||
// 是否只保持一个子菜单的展开(手风琴)
|
||||
menuUniqueOpened: false,
|
||||
// 显示菜单栏顶栏(LOGO)
|
||||
menuShowTopBar: true,
|
||||
|
||||
/* 顶栏 */
|
||||
// 顶栏文字色
|
||||
headerBarTabColor: ['#FFFFFF', '#CFD3DC'],
|
||||
// // 顶栏激活项背景色
|
||||
headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||
// 顶栏激活项文字色
|
||||
headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||
// 顶栏背景色
|
||||
headerBarBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 顶栏悬停时背景色
|
||||
headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||
})
|
||||
|
||||
const lang = reactive({
|
||||
// 默认语言,可选值<zh-cn|en>
|
||||
defaultLang: 'zh-cn',
|
||||
// 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||
fallbackLang: 'zh-cn',
|
||||
// 支持的语言列表
|
||||
langArray: [
|
||||
{ name: 'zh-cn', value: '中文简体' },
|
||||
{ name: 'en', value: 'English' }
|
||||
]
|
||||
})
|
||||
|
||||
function menuWidth() {
|
||||
if (layout.shrink) {
|
||||
return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||
}
|
||||
// 菜单是否折叠
|
||||
return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||
}
|
||||
|
||||
function setLang(val: string) {
|
||||
lang.defaultLang = val
|
||||
}
|
||||
|
||||
function onSetLayoutColor(data = layout.layoutMode) {
|
||||
// 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||
const tempValue = layout.isDark
|
||||
? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||
: { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||
if (
|
||||
data == 'Classic' &&
|
||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||
) {
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||
} else if (
|
||||
data == 'Default' &&
|
||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||
) {
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||
}
|
||||
}
|
||||
|
||||
function setLayoutMode(data: string) {
|
||||
layout.layoutMode = data
|
||||
onSetLayoutColor(data)
|
||||
}
|
||||
|
||||
const setLayout = (name: keyof Layout, value: any) => {
|
||||
layout[name] = value as never
|
||||
}
|
||||
|
||||
const getColorVal = function (name: keyof Layout): string {
|
||||
const colors = layout[name] as string[]
|
||||
if (layout.isDark) {
|
||||
return colors[1]
|
||||
} else {
|
||||
return colors[0]
|
||||
}
|
||||
}
|
||||
|
||||
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||
},
|
||||
// () => {
|
||||
//
|
||||
// console.log('🚀 ~ subject:', subject)
|
||||
// const layout: Layout = reactive({
|
||||
// /* 全局 */
|
||||
// showDrawer: false,
|
||||
// // 是否收缩布局(小屏终端)
|
||||
// shrink: false,
|
||||
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
// layoutMode: 'Classic',
|
||||
// // 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
// mainAnimation: subject.mainAnimation,
|
||||
// // 是否暗黑模式
|
||||
// isDark: false,
|
||||
// elementUiPrimary: JSON.parse(subject.elementUiPrimary),
|
||||
// tableHeaderBackground: JSON.parse(subject.tableHeaderBackground),
|
||||
// tableHeaderColor:JSON.parse(subject.tableHeaderColor),
|
||||
// tableCurrent: JSON.parse(subject.tableCurrent),
|
||||
// /* 侧边菜单 */
|
||||
// // 侧边菜单背景色
|
||||
// menuBackground: JSON.parse(subject.menuBackground),
|
||||
// // 侧边菜单文字颜色
|
||||
// menuColor:JSON.parse(subject.menuColor),
|
||||
// // 侧边菜单激活项背景色
|
||||
// menuActiveBackground:JSON.parse(subject.menuActiveBackground),
|
||||
// // 侧边菜单激活项文字色
|
||||
// menuActiveColor:JSON.parse(subject.menuActiveColor),
|
||||
// // 侧边菜单顶栏背景色
|
||||
// menuTopBarBackground: JSON.parse(subject.menuTopBarBackground),
|
||||
// // 侧边菜单宽度(展开时),单位px
|
||||
// menuWidth: 260,
|
||||
// // 侧边菜单项默认图标
|
||||
// menuDefaultIcon: 'fa fa-circle-o',
|
||||
// // 是否水平折叠收起菜单
|
||||
// menuCollapse: false,
|
||||
// // 是否只保持一个子菜单的展开(手风琴)
|
||||
// menuUniqueOpened: false,
|
||||
// // 显示菜单栏顶栏(LOGO)
|
||||
// menuShowTopBar: true,
|
||||
|
||||
// /* 顶栏 */
|
||||
// // 顶栏文字色
|
||||
// headerBarTabColor:JSON.parse(subject.headerBarTabColor),
|
||||
// // // 顶栏激活项背景色
|
||||
// headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||
// // 顶栏激活项文字色
|
||||
// headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||
// // 顶栏背景色
|
||||
// headerBarBackground: JSON.parse(subject.headerBarBackground),
|
||||
// // 顶栏悬停时背景色
|
||||
// headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||
// })
|
||||
// // console.log(123, window.localStorage.getItem('getTheme'))
|
||||
|
||||
// const lang = reactive({
|
||||
// // 默认语言,可选值<zh-cn|en>
|
||||
// defaultLang: 'zh-cn',
|
||||
// // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||
// fallbackLang: 'zh-cn',
|
||||
// // 支持的语言列表
|
||||
// langArray: [
|
||||
// { name: 'zh-cn', value: '中文简体' },
|
||||
// { name: 'en', value: 'English' }
|
||||
// ]
|
||||
// })
|
||||
|
||||
// function menuWidth() {
|
||||
// if (layout.shrink) {
|
||||
// return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||
// }
|
||||
// // 菜单是否折叠
|
||||
// return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||
// }
|
||||
|
||||
// function setLang(val: string) {
|
||||
// lang.defaultLang = val
|
||||
// }
|
||||
|
||||
// function onSetLayoutColor(data = layout.layoutMode) {
|
||||
// // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||
// const tempValue = layout.isDark
|
||||
// ? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||
// : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||
// if (
|
||||
// data == 'Classic' &&
|
||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||
// ) {
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||
// } else if (
|
||||
// data == 'Default' &&
|
||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||
// ) {
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||
// }
|
||||
// }
|
||||
|
||||
// function setLayoutMode(data: string) {
|
||||
// layout.layoutMode = data
|
||||
// onSetLayoutColor(data)
|
||||
// }
|
||||
|
||||
// const setLayout = (name: keyof Layout, value: any) => {
|
||||
// layout[name] = value as never
|
||||
// }
|
||||
|
||||
// const getColorVal = function (name: keyof Layout): string {
|
||||
// const colors = layout[name] as string[]
|
||||
// if (layout.isDark) {
|
||||
// return colors[1]
|
||||
// } else {
|
||||
// return colors[0]
|
||||
// }
|
||||
// }
|
||||
|
||||
// return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||
// },
|
||||
{
|
||||
persist: {
|
||||
key: STORE_CONFIG
|
||||
}
|
||||
}
|
||||
)
|
||||
import { reactive } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { STORE_CONFIG } from '@/stores/constant/cacheKey'
|
||||
import type { Layout } from '@/stores/interface'
|
||||
|
||||
export const useConfig = defineStore(
|
||||
'config',
|
||||
() => {
|
||||
const layout: Layout = reactive({
|
||||
/* 全局 */
|
||||
showDrawer: false,
|
||||
// 是否收缩布局(小屏终端)
|
||||
shrink: false,
|
||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
layoutMode: 'Classic',
|
||||
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
mainAnimation: 'slide-right',
|
||||
// 是否暗黑模式
|
||||
isDark: false,
|
||||
elementUiPrimary: ['#002B6A', '#002B6A'],
|
||||
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
||||
tableHeaderColor: ['#111', '#fff'],
|
||||
tableCurrent: ['#F3F6F9', '#F3F6F9'],
|
||||
/* 侧边菜单 */
|
||||
// 侧边菜单背景色
|
||||
menuBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 侧边菜单文字颜色
|
||||
menuColor: ['#FFFFFF', '#CFD3DC'],
|
||||
// 侧边菜单激活项背景色
|
||||
menuActiveBackground: ['#002255', '#1d1e1f'],
|
||||
// 侧边菜单激活项文字色
|
||||
menuActiveColor: ['#409eff', '#3375b9'],
|
||||
// 侧边菜单顶栏背景色
|
||||
menuTopBarBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 侧边菜单宽度(展开时),单位px
|
||||
menuWidth: 260,
|
||||
// 侧边菜单项默认图标
|
||||
menuDefaultIcon: 'fa fa-circle-o',
|
||||
// 是否水平折叠收起菜单
|
||||
menuCollapse: false,
|
||||
// 是否只保持一个子菜单的展开(手风琴)
|
||||
menuUniqueOpened: false,
|
||||
// 显示菜单栏顶栏(LOGO)
|
||||
menuShowTopBar: true,
|
||||
|
||||
/* 顶栏 */
|
||||
// 顶栏文字色
|
||||
headerBarTabColor: ['#FFFFFF', '#CFD3DC'],
|
||||
// // 顶栏激活项背景色
|
||||
headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||
// 顶栏激活项文字色
|
||||
headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||
// 顶栏背景色
|
||||
headerBarBackground: ['#002B6A', '#1d1e1f'],
|
||||
// 顶栏悬停时背景色
|
||||
headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||
})
|
||||
|
||||
const lang = reactive({
|
||||
// 默认语言,可选值<zh-cn|en>
|
||||
defaultLang: 'zh-cn',
|
||||
// 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||
fallbackLang: 'zh-cn',
|
||||
// 支持的语言列表
|
||||
langArray: [
|
||||
{ name: 'zh-cn', value: '中文简体' },
|
||||
{ name: 'en', value: 'English' }
|
||||
]
|
||||
})
|
||||
|
||||
function menuWidth() {
|
||||
if (layout.shrink) {
|
||||
return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||
}
|
||||
// 菜单是否折叠
|
||||
return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||
}
|
||||
|
||||
function setLang(val: string) {
|
||||
lang.defaultLang = val
|
||||
}
|
||||
|
||||
function onSetLayoutColor(data = layout.layoutMode) {
|
||||
// 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||
const tempValue = layout.isDark
|
||||
? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||
: { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||
if (
|
||||
data == 'Classic' &&
|
||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||
) {
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||
} else if (
|
||||
data == 'Default' &&
|
||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||
) {
|
||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||
}
|
||||
}
|
||||
|
||||
function setLayoutMode(data: string) {
|
||||
layout.layoutMode = data
|
||||
onSetLayoutColor(data)
|
||||
}
|
||||
|
||||
const setLayout = (name: keyof Layout, value: any) => {
|
||||
layout[name] = value as never
|
||||
}
|
||||
|
||||
const getColorVal = function (name: keyof Layout): string {
|
||||
const colors = layout[name] as string[] || ['#082E6C', '#0e8780']
|
||||
if (layout.isDark) {
|
||||
return colors[1]
|
||||
} else {
|
||||
return colors[0]
|
||||
}
|
||||
}
|
||||
|
||||
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||
},
|
||||
// () => {
|
||||
//
|
||||
// console.log('🚀 ~ subject:', subject)
|
||||
// const layout: Layout = reactive({
|
||||
// /* 全局 */
|
||||
// showDrawer: false,
|
||||
// // 是否收缩布局(小屏终端)
|
||||
// shrink: false,
|
||||
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
// layoutMode: 'Classic',
|
||||
// // 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||
// mainAnimation: subject.mainAnimation,
|
||||
// // 是否暗黑模式
|
||||
// isDark: false,
|
||||
// elementUiPrimary: JSON.parse(subject.elementUiPrimary),
|
||||
// tableHeaderBackground: JSON.parse(subject.tableHeaderBackground),
|
||||
// tableHeaderColor:JSON.parse(subject.tableHeaderColor),
|
||||
// tableCurrent: JSON.parse(subject.tableCurrent),
|
||||
// /* 侧边菜单 */
|
||||
// // 侧边菜单背景色
|
||||
// menuBackground: JSON.parse(subject.menuBackground),
|
||||
// // 侧边菜单文字颜色
|
||||
// menuColor:JSON.parse(subject.menuColor),
|
||||
// // 侧边菜单激活项背景色
|
||||
// menuActiveBackground:JSON.parse(subject.menuActiveBackground),
|
||||
// // 侧边菜单激活项文字色
|
||||
// menuActiveColor:JSON.parse(subject.menuActiveColor),
|
||||
// // 侧边菜单顶栏背景色
|
||||
// menuTopBarBackground: JSON.parse(subject.menuTopBarBackground),
|
||||
// // 侧边菜单宽度(展开时),单位px
|
||||
// menuWidth: 260,
|
||||
// // 侧边菜单项默认图标
|
||||
// menuDefaultIcon: 'fa fa-circle-o',
|
||||
// // 是否水平折叠收起菜单
|
||||
// menuCollapse: false,
|
||||
// // 是否只保持一个子菜单的展开(手风琴)
|
||||
// menuUniqueOpened: false,
|
||||
// // 显示菜单栏顶栏(LOGO)
|
||||
// menuShowTopBar: true,
|
||||
|
||||
// /* 顶栏 */
|
||||
// // 顶栏文字色
|
||||
// headerBarTabColor:JSON.parse(subject.headerBarTabColor),
|
||||
// // // 顶栏激活项背景色
|
||||
// headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||
// // 顶栏激活项文字色
|
||||
// headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||
// // 顶栏背景色
|
||||
// headerBarBackground: JSON.parse(subject.headerBarBackground),
|
||||
// // 顶栏悬停时背景色
|
||||
// headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||
// })
|
||||
// // console.log(123, window.localStorage.getItem('getTheme'))
|
||||
|
||||
// const lang = reactive({
|
||||
// // 默认语言,可选值<zh-cn|en>
|
||||
// defaultLang: 'zh-cn',
|
||||
// // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||
// fallbackLang: 'zh-cn',
|
||||
// // 支持的语言列表
|
||||
// langArray: [
|
||||
// { name: 'zh-cn', value: '中文简体' },
|
||||
// { name: 'en', value: 'English' }
|
||||
// ]
|
||||
// })
|
||||
|
||||
// function menuWidth() {
|
||||
// if (layout.shrink) {
|
||||
// return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||
// }
|
||||
// // 菜单是否折叠
|
||||
// return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||
// }
|
||||
|
||||
// function setLang(val: string) {
|
||||
// lang.defaultLang = val
|
||||
// }
|
||||
|
||||
// function onSetLayoutColor(data = layout.layoutMode) {
|
||||
// // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||
// const tempValue = layout.isDark
|
||||
// ? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||
// : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||
// if (
|
||||
// data == 'Classic' &&
|
||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||
// ) {
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||
// } else if (
|
||||
// data == 'Default' &&
|
||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||
// ) {
|
||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||
// }
|
||||
// }
|
||||
|
||||
// function setLayoutMode(data: string) {
|
||||
// layout.layoutMode = data
|
||||
// onSetLayoutColor(data)
|
||||
// }
|
||||
|
||||
// const setLayout = (name: keyof Layout, value: any) => {
|
||||
// layout[name] = value as never
|
||||
// }
|
||||
|
||||
// const getColorVal = function (name: keyof Layout): string {
|
||||
// const colors = layout[name] as string[]
|
||||
// if (layout.isDark) {
|
||||
// return colors[1]
|
||||
// } else {
|
||||
// return colors[0]
|
||||
// }
|
||||
// }
|
||||
|
||||
// return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||
// },
|
||||
{
|
||||
persist: {
|
||||
key: STORE_CONFIG
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -25,14 +25,10 @@ export const useMonitoringPoint = defineStore(
|
||||
val: any
|
||||
) => {
|
||||
state[key] = val
|
||||
|
||||
}
|
||||
const setShowCheckBox = (val: boolean) => {
|
||||
if (val && state.lineIds.length === 0) {
|
||||
state.lineIds = [state.lineId]
|
||||
// console.log('====================================')
|
||||
// console.log(state.lineIds)
|
||||
// console.log('====================================')
|
||||
}
|
||||
state.showCheckBox = val
|
||||
}
|
||||
|
||||
@@ -1,176 +1,176 @@
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<!-- 表头 -->
|
||||
<!-- date-picker 时间组件 area区域组件-->
|
||||
<TableHeader date-picker area>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='关键词:'>
|
||||
<el-input
|
||||
style='width: 240px'
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
clearable
|
||||
placeholder='仅根据用户名/登录名'
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- 表格 -->
|
||||
<Table ref='tableRef' />
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref='popupEdit' />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide, defineOptions } from 'vue'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import PopupEdit from './dialog.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
|
||||
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
||||
defineOptions({
|
||||
name: 'auth/userlist'
|
||||
})
|
||||
const popupEdit = ref()
|
||||
const tableStore = new TableStore({
|
||||
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
||||
// publicHeight: 60,
|
||||
url: '/user-boot/user/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '用户名称', field: 'name', minWidth: '130' },
|
||||
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
||||
{ title: '角色', field: 'roleName', minWidth: '130' },
|
||||
{ title: '部门', field: 'deptName', minWidth: '200' },
|
||||
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
||||
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
||||
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
||||
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'danger',
|
||||
1: 'success',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
5: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '注销',
|
||||
1: '正常',
|
||||
2: '锁定',
|
||||
3: '待审核',
|
||||
4: '休眠',
|
||||
5: '密码过期'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改密码',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Lock',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1
|
||||
},
|
||||
click: row => {
|
||||
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'password'
|
||||
}).then(({ value }) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '激活',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '注销',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-SwitchButton',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1 && row.state !== 3
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.deptName = item.deptName || '/'
|
||||
item.phoneShow = item.phone || '/'
|
||||
item.roleName = item.role.length ? item.role : '/'
|
||||
switch (item.casualUser) {
|
||||
case 0:
|
||||
item.casualUserName = '临时用户'
|
||||
break
|
||||
case 1:
|
||||
item.casualUserName = '长期用户'
|
||||
break
|
||||
default:
|
||||
item.casualUserName = '/'
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// 注入到子组件
|
||||
provide('tableStore', tableStore)
|
||||
// 默认参数 参数多的话可以使用Object.assign方法
|
||||
tableStore.table.params.searchState = 1
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.casualUser = -1
|
||||
tableStore.table.params.orderBy = ''
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEdit.value.open('新增用户')
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<!-- 表头 -->
|
||||
<!-- date-picker 时间组件 area区域组件-->
|
||||
<TableHeader date-picker area>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='关键词:'>
|
||||
<el-input
|
||||
style='width: 240px'
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
clearable
|
||||
placeholder='仅根据用户名/登录名'
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- 表格 -->
|
||||
<Table ref='tableRef' />
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref='popupEdit' />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide, defineOptions } from 'vue'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import PopupEdit from './dialog.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
|
||||
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
||||
defineOptions({
|
||||
name: 'auth/userlist'
|
||||
})
|
||||
const popupEdit = ref()
|
||||
const tableStore = new TableStore({
|
||||
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
||||
// publicHeight: 60,
|
||||
url: '/user-boot/user/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '用户名称', field: 'name', minWidth: '130' },
|
||||
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
||||
{ title: '角色', field: 'roleName', minWidth: '130' },
|
||||
{ title: '部门', field: 'deptName', minWidth: '200' },
|
||||
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
||||
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
||||
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
||||
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'danger',
|
||||
1: 'success',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
5: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '注销',
|
||||
1: '正常',
|
||||
2: '锁定',
|
||||
3: '待审核',
|
||||
4: '休眠',
|
||||
5: '密码过期'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改密码',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Lock',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1
|
||||
},
|
||||
click: row => {
|
||||
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'password'
|
||||
}).then(({ value }) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '激活',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '注销',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-SwitchButton',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.state !== 1 && row.state !== 3
|
||||
},
|
||||
click: row => {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.deptName = item.deptName || '/'
|
||||
item.phoneShow = item.phone || '/'
|
||||
item.roleName = item.role.length ? item.role : '/'
|
||||
switch (item.casualUser) {
|
||||
case 0:
|
||||
item.casualUserName = '临时用户'
|
||||
break
|
||||
case 1:
|
||||
item.casualUserName = '长期用户'
|
||||
break
|
||||
default:
|
||||
item.casualUserName = '/'
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// 注入到子组件
|
||||
provide('tableStore', tableStore)
|
||||
// 默认参数 参数多的话可以使用Object.assign方法
|
||||
tableStore.table.params.searchState = 1
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.casualUser = -1
|
||||
tableStore.table.params.orderBy = ''
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEdit.value.open('新增用户')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -52,11 +52,12 @@ class MQTT {
|
||||
}
|
||||
|
||||
try {
|
||||
const mqttUrl =
|
||||
localStorage.getItem('MqttUrl') == 'null'
|
||||
? 'ws://192.168.1.68:8083/mqtt'
|
||||
: localStorage.getItem('MqttUrl')
|
||||
|
||||
// const mqttUrl =
|
||||
// localStorage.getItem('MqttUrl') == 'null'
|
||||
// ? 'ws://192.168.1.68:8083/mqtt'
|
||||
// : localStorage.getItem('MqttUrl')
|
||||
const mqttUrl = localStorage.getItem('MqttUrl')
|
||||
if (mqttUrl == 'null' || mqttUrl == null) return
|
||||
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
||||
this.setupEventListeners()
|
||||
|
||||
|
||||
@@ -1,125 +1,125 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="新能源场站名称">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!--弹框-->
|
||||
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import addForm from './components/addForm.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { delNewStation } from '@/api/device-boot/newEnergy'
|
||||
defineOptions({
|
||||
name: 'newEnergy/newEnergyLedger'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const newEnergy = dictData.getBasicData('new_station_type')
|
||||
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const tableRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const addFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/newStation/queryPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '新能源场站名称' },
|
||||
{
|
||||
field: 'stationType',
|
||||
title: '新能源场站类型',
|
||||
|
||||
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
||||
},
|
||||
{
|
||||
field: 'scale',
|
||||
title: '电压等级',
|
||||
|
||||
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
},
|
||||
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
||||
{ field: 'longitude', title: '经度' },
|
||||
{ field: 'latitude', title: '纬度' },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-edit',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
addFormRef.value.open({
|
||||
title: '修改',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除该数据吗?'
|
||||
},
|
||||
click: row => {
|
||||
delNewStation({ ids: row.id }).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
const add = () => {
|
||||
addFormRef.value.open({
|
||||
title: '新增'
|
||||
})
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="新能源场站名称">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!--弹框-->
|
||||
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import addForm from './components/addForm.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { delNewStation } from '@/api/device-boot/newEnergy'
|
||||
defineOptions({
|
||||
name: 'newEnergy/newEnergyLedger'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const newEnergy = dictData.getBasicData('new_station_type')
|
||||
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const tableRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const addFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/device-boot/newStation/queryPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '新能源场站名称' },
|
||||
{
|
||||
field: 'stationType',
|
||||
title: '新能源场站类型',
|
||||
|
||||
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
||||
},
|
||||
{
|
||||
field: 'scale',
|
||||
title: '电压等级',
|
||||
|
||||
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
},
|
||||
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
||||
{ field: 'longitude', title: '经度' },
|
||||
{ field: 'latitude', title: '纬度' },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-edit',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
addFormRef.value.open({
|
||||
title: '修改',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除该数据吗?'
|
||||
},
|
||||
click: row => {
|
||||
delNewStation({ ids: row.id }).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
const add = () => {
|
||||
addFormRef.value.open({
|
||||
title: '新增'
|
||||
})
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -38,6 +38,7 @@ const tableStore = new TableStore({
|
||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
||||
table.value.info(tableStore.table.data)
|
||||
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TableHeader datePicker :showReset="false" showExport ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.loginName" placeholder="请输入"></el-input>
|
||||
<el-input v-model="tableStore.table.params.loginName" placeholder="请输入" clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
|
||||
@@ -288,18 +288,21 @@ const equipment = (row: any) => {}
|
||||
// 承载能力评估
|
||||
const assess = () => {
|
||||
// vxeRef.value.getRadioRecord()
|
||||
|
||||
if (equipmentList.value.length == null) {
|
||||
return ElMessage.warning('请选择用户')
|
||||
|
||||
if (equipmentList.value.length == 0) {
|
||||
return ElMessage.warning('请选择有终端设备的用户')
|
||||
}
|
||||
loading.value = true
|
||||
formRef.value.validate((valid: any) => {
|
||||
|
||||
if (valid) {
|
||||
form.value.devList = equipmentList.value
|
||||
carryCapacityEvaluate(form.value).then(res => {
|
||||
rendering(res.data)
|
||||
loading.value = false
|
||||
})
|
||||
}else{
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -734,6 +734,7 @@ const choose = (e: any) => {
|
||||
|
||||
uploadExcel(e.raw, form).then(res => {
|
||||
ElMessage.success('导入成功')
|
||||
onSubmit()
|
||||
})
|
||||
}
|
||||
const tabChange = (e: any) => {
|
||||
|
||||
@@ -136,7 +136,7 @@ const tableStore: any = new TableStore({
|
||||
{ field: 'evaluateDate', title: '评估日期' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -187,7 +187,7 @@ const tableStore: any = new TableStore({
|
||||
{ field: 'createBy', title: '创建者' },
|
||||
{ field: 'createTime', title: '创建日期' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
@@ -259,7 +259,7 @@ const tableStore: any = new TableStore({
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
console.log(tableStore.table.data)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<TableHeader datePicker showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
|
||||
<div :key="key">
|
||||
<Table ref="tableRef" :height="'49vh'"></Table>
|
||||
<Table ref="tableRef" :height="'calc(50vh - 100px)'"></Table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -31,10 +31,12 @@ const dialogVisible = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/frontLog/queryLogCHild',
|
||||
method: 'POST',
|
||||
filename: '前置交互日志详情',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TableHeader datePicker showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
></Table>
|
||||
</div>
|
||||
<div class="pd10" style="width: 400px" v-loading="loading">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable show-word-limit @input="change">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable maxlength="32" show-word-limit @input="change">
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
@@ -83,7 +83,7 @@
|
||||
v-else
|
||||
class="box-item"
|
||||
title="确定重启吗?"
|
||||
placement="bottom"
|
||||
placement="left"
|
||||
@confirm="restart(data)"
|
||||
>
|
||||
<template #actions="{ confirm, cancel }">
|
||||
@@ -139,9 +139,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
|
||||
<el-input
|
||||
v-model="formData.nodeDevNum"
|
||||
v-model.trim.number="formData.nodeDevNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请输入最大终端数"
|
||||
@@ -149,7 +149,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
||||
<el-input
|
||||
v-model="formData.maxProcessNum"
|
||||
v-model.trim.number="formData.maxProcessNum"
|
||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||
maxlength="5"
|
||||
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
||||
@@ -209,7 +209,8 @@ import {
|
||||
updateNode,
|
||||
nodeDeviceTree,
|
||||
updateDeviceProcess,
|
||||
askRestartProcess
|
||||
askRestartProcess,
|
||||
allotTerminal
|
||||
} from '@/api/device-boot/Business'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
@@ -240,6 +241,7 @@ const tableRef = ref()
|
||||
const processNo = ref('')
|
||||
const ruleFormRef = ref()
|
||||
const dataSource: any = ref([])
|
||||
const deviceInfoList: any = ref([])
|
||||
const defaultProps = {
|
||||
children: 'deviceInfoList',
|
||||
label: 'name'
|
||||
@@ -288,7 +290,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '最大监测点数量',
|
||||
title: '最大终端数量',
|
||||
field: 'nodeDevNum'
|
||||
},
|
||||
{
|
||||
@@ -315,7 +317,7 @@ const tableStore = new TableStore({
|
||||
{ title: '描述', field: 'remark' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
@@ -350,7 +352,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
askRestartProcess({
|
||||
deviceRebootType: null,
|
||||
deviceRebootType: 1,
|
||||
nodeId: row.id,
|
||||
processNo: 1
|
||||
}).then(res => {
|
||||
@@ -373,12 +375,42 @@ const tableStore = new TableStore({
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
if (hasDevices.value) {
|
||||
ElMessage.warning('此前置机绑定了设备,无法删除!');
|
||||
return;
|
||||
}
|
||||
|
||||
delNode(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '分配终端',
|
||||
type: 'primary',
|
||||
icon: 'InfoFilled',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'primary',
|
||||
title: '确定分配终端吗?'
|
||||
},
|
||||
click: row => {
|
||||
if (!hasDevices.value) {
|
||||
ElMessage.warning('此前置机下无设备,无法分配终端!');
|
||||
return;
|
||||
}
|
||||
allotTerminal({
|
||||
nodeId: row.id
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -395,12 +427,14 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
const nodeId = ref('')
|
||||
// 点击行
|
||||
const hasDevices = ref(false)
|
||||
/// 点击行
|
||||
const currentChangeEvent = () => {
|
||||
// 确保 tableRef 和当前记录存在
|
||||
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
||||
loading.value = false
|
||||
dataSource.value = []
|
||||
hasDevices.value = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -413,15 +447,27 @@ const currentChangeEvent = () => {
|
||||
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
||||
// 检查返回的数据是否存在且不为空
|
||||
if (res.data && res.data.processDeviceList) {
|
||||
dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + ''))
|
||||
// 检查是否有设备绑定
|
||||
const hasAnyDevices = res.data.processDeviceList.some(item =>
|
||||
item.deviceInfoList && item.deviceInfoList.length > 0
|
||||
);
|
||||
hasDevices.value = hasAnyDevices;
|
||||
|
||||
dataSource.value = res.data.processDeviceList.filter(item => {
|
||||
item.name = item.processNo + '';
|
||||
return true; // 保持原有的过滤逻辑
|
||||
});
|
||||
} else {
|
||||
dataSource.value = []
|
||||
hasDevices.value = false;
|
||||
}
|
||||
loading.value = false
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
// 添加错误处理,确保 loading 状态也能关闭
|
||||
dataSource.value = []
|
||||
hasDevices.value = false;
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
@@ -432,9 +478,9 @@ const currentChangeEvent = () => {
|
||||
const restart = (data: any) => {
|
||||
// console.log('🚀 ~ restart ~ data:', data)
|
||||
askRestartProcess({
|
||||
deviceRebootType: data.processNo,
|
||||
deviceRebootType: null,
|
||||
nodeId: nodeId.value,
|
||||
processNo: 2
|
||||
processNo: data.processNo
|
||||
}).then(res => {
|
||||
ElMessage.success('重启成功')
|
||||
currentChangeEvent()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="程序版本">
|
||||
<!-- <el-form-item label="程序版本">
|
||||
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
||||
<el-option
|
||||
v-for="item in programoption"
|
||||
@@ -41,19 +41,21 @@
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.filterName"
|
||||
@keyup="searchEvent"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <template #operation>
|
||||
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
||||
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
</TableHeader>
|
||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||
<vxe-table
|
||||
@@ -104,7 +106,7 @@
|
||||
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
||||
<vxe-column title="操作" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button>
|
||||
<!-- <el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button> -->
|
||||
<el-button
|
||||
v-if="row.level == 4"
|
||||
:disabled="row.state == 1 ? true : false"
|
||||
@@ -251,6 +253,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
tableStore.table.params.teriminal = ''
|
||||
tableStore.table.params.teriminalstatus = ''
|
||||
tableStore.table.params.state = ''
|
||||
tableStore.table.params.program = ''
|
||||
tableStore.table.params.searchEvent = ''
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
v-model="tableStore.table.params.filterName"
|
||||
@keyup="searchEvent"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -75,6 +77,7 @@
|
||||
:checkbox-config="{ labelField: 'name' }"
|
||||
>
|
||||
<vxe-column
|
||||
v-if="treeData && treeData.length > 0"
|
||||
field="name"
|
||||
align="left"
|
||||
type="checkbox"
|
||||
@@ -82,6 +85,15 @@
|
||||
min-width="200"
|
||||
tree-node
|
||||
></vxe-column>
|
||||
<!-- 没有数据时显示普通列 -->
|
||||
<vxe-column
|
||||
v-else
|
||||
field="name"
|
||||
align="left"
|
||||
title="电网拓扑"
|
||||
min-width="200"
|
||||
tree-node
|
||||
></vxe-column>
|
||||
<vxe-column field="devType" title="终端型号">
|
||||
<template #default="{ row }">
|
||||
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
||||
|
||||
@@ -2397,35 +2397,45 @@ const onsubmit = () => {
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
const submitData = () => {
|
||||
const submitData = async () => {
|
||||
const project = JSON.parse(JSON.stringify(AddProjectBO.value))
|
||||
|
||||
// project: JSON.stringify(project)
|
||||
addTerminal(project).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
reaseStatus()
|
||||
initAddProjectBo()
|
||||
initAddProjectBoId()
|
||||
treedata()
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addTerminal(project).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
reaseStatus()
|
||||
initAddProjectBo()
|
||||
initAddProjectBoId()
|
||||
treedata()
|
||||
})
|
||||
}
|
||||
})
|
||||
// project: JSON.stringify(project)
|
||||
|
||||
}
|
||||
/**
|
||||
* 修改数据
|
||||
*/
|
||||
const updateDate = () => {
|
||||
const updateDate = async () => {
|
||||
// console.log("updateProject:", this.updateProject);
|
||||
let data = updateProject.value
|
||||
updateTerminal(data).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
pageStatus.value = 1
|
||||
treedata()
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid){
|
||||
let data = updateProject.value
|
||||
updateTerminal(data).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
pageStatus.value = 1
|
||||
treedata()
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const updateProjectF = () => {
|
||||
updateProject.value = {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
||||
<el-form-item label="变压器名:" prop="tfName">
|
||||
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable></el-input>
|
||||
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接线方式:" prop="wiring" class="top">
|
||||
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
||||
@@ -113,7 +113,7 @@
|
||||
<el-col :span="8">
|
||||
<div style="border-right: 1px solid; height: 100%" class="xiaoshou">
|
||||
<div style="overflow-y: auto; height: 100%; overflow-x: auto;max-height: 350px;" class="tree mr10 xiaoshou">
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable></el-input>
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-tree
|
||||
style="cursor: pointer;display: inline-block;"
|
||||
:data="treeMenuLeftData"
|
||||
@@ -163,7 +163,7 @@
|
||||
<el-col :span="8">
|
||||
<div style="border-left: 1px solid; height: 100%" class="xiaoshou">
|
||||
<div style="overflow-y: auto; height: 100%;overflow-x: auto;max-height: 350px;" class="ml10 tree xiaoshou">
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable></el-input>
|
||||
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable maxlength="32" show-word-limit></el-input>
|
||||
<el-tree
|
||||
style="cursor: pointer"
|
||||
:data="treeMenuRightData"
|
||||
@@ -328,7 +328,7 @@ const tableStore = new TableStore({
|
||||
field: 'tfDescribe'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
@@ -372,6 +372,7 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
delTransformer([row.tfIndex]).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
menuTree.value.loadData()
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
@@ -413,6 +414,7 @@ const transformerAdd = () => {
|
||||
message: '请选择变电站'
|
||||
})
|
||||
} else {
|
||||
ruleForm.subIndex = parentId.value
|
||||
transformerTitle.value = '新增变压器信息'
|
||||
transformerInformation.value = true
|
||||
nextTick(() => {
|
||||
@@ -602,56 +604,74 @@ const maintenanceData = reactive({
|
||||
//上节点选择
|
||||
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
||||
maintenanceData.upNode = checkedNodes.id
|
||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||
menuTreeRight.value?.setCheckedKeys([])
|
||||
maintenanceData.downNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||
menuTreeRight.value?.setCheckedKeys([])
|
||||
maintenanceData.downNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
}
|
||||
|
||||
//下节点选择
|
||||
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
||||
maintenanceData.downNode = checkedNodes.id
|
||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||
menuTreeLeft.value?.setCheckedKeys([])
|
||||
maintenanceData.upNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
|
||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||
menuTreeLeft.value?.setCheckedKeys([])
|
||||
maintenanceData.upNode = ''
|
||||
}
|
||||
if (checkedKeys.checkedKeys.length > 1) {
|
||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||
}
|
||||
}
|
||||
|
||||
//节点维护提交
|
||||
const maintenanceOnsubmit = () => {
|
||||
for (let i = 0; i < bind.value.length; i++) {
|
||||
if (bind.value[i][0] == maintenanceData.upNode) {
|
||||
for (let j = 0; j < bind.value.length; j++) {
|
||||
if (bind.value[j][1] == maintenanceData.downNode) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!!!'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(maintenanceData.downNode == '' || maintenanceData.upNode == '') {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请确保上下节点各自选择一个母线!'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (bindLevel.value != 5) {
|
||||
for (let i = 0; i < bind.value.length; i++) {
|
||||
if (maintenanceData.upNode == bind.value[i][1] && maintenanceData.downNode == bind.value[i][0]) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!!!'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (maintenanceData.upNode == maintenanceData.downNode) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '上下节点无法选择相同母线!'
|
||||
})
|
||||
}
|
||||
// for (let i = 0; i < bind.value.length; i++) {
|
||||
// if (bind.value[i] == maintenanceData.upNode) {
|
||||
// for (let j = 0; j < bind.value.length; j++) {
|
||||
|
||||
// if (bind.value[j] == maintenanceData.downNode) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '上下节点无法选择相同母线!!!'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (bindLevel.value != 5) {
|
||||
// for (let i = 0; i < bind.value.length; i++) {
|
||||
// if (maintenanceData.upNode == bind.value[i] && maintenanceData.downNode == bind.value[i]) {
|
||||
// ElMessage({
|
||||
// type: 'warning',
|
||||
// message: '上下节点无法选择相同母线!!!'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
nodeMaintenance(maintenanceData).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage({
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="box">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
||||
<el-form-item label="名称:">
|
||||
<el-input v-model="form.tpName" placeholder="请输入"></el-input>
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
|
||||
<el-form-item label="名称:" prop="tpName">
|
||||
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" class="mt20">
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入"></el-input>
|
||||
<el-input v-model="form.tfDescribe" placeholder="请输入" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt20 ml20">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
@@ -122,13 +122,8 @@ const menuTree = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }],
|
||||
nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }],
|
||||
nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }],
|
||||
maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }],
|
||||
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
|
||||
tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
|
||||
})
|
||||
|
||||
const dialogFormVisible = ref(false)
|
||||
@@ -161,7 +156,7 @@ const tableStore = new TableStore({
|
||||
field: 'tfDescribe'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
v-model.trim="form.projectName"
|
||||
autocomplete="off"
|
||||
placeholder="请输入项目名称"
|
||||
maxlength="64"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -112,7 +112,7 @@
|
||||
v-model.trim="form.substation"
|
||||
autocomplete="off"
|
||||
placeholder="请输入厂站名称"
|
||||
maxlength="64"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -364,6 +364,8 @@
|
||||
v-model.trim="form.evaluationChekDept"
|
||||
autocomplete="off"
|
||||
placeholder="请输入预测评估评审单位"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
{{ proviteData.agreementCapacity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="装机容量(MW)">
|
||||
{{ proviteData?.ratePower }}
|
||||
{{ detailData?.ratePower }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="PCC供电设备容量(MVA)"
|
||||
@@ -332,6 +332,7 @@ const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
|
||||
try {
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||
@@ -341,6 +342,7 @@ const getInfo = async () => {
|
||||
} else {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
|
||||
getProviteData()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,315 +1,315 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入项目名称"
|
||||
v-model="tableStore.table.params.projectName"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
||||
模板下载
|
||||
</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
</el-dialog>
|
||||
<!-- 批量导入 -->
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import addForm from './components/addForm.vue'
|
||||
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from './components/detail.vue'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
defineOptions({
|
||||
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
||||
})
|
||||
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getUserLedgerPage',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '创建人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详细信息',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
|
||||
|
||||
click: row => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
dataType: 1,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
//导出模板
|
||||
const exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '干扰源用户台账模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||
}
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
placeholder="请输入项目名称"
|
||||
v-model="tableStore.table.params.projectName"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
||||
模板下载
|
||||
</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
</el-dialog>
|
||||
<!-- 批量导入 -->
|
||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import addForm from './components/addForm.vue'
|
||||
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from './components/detail.vue'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const loading = ref(false)
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
defineOptions({
|
||||
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
||||
})
|
||||
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getUserLedgerPage',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
const userType = obj.row.userType
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '创建人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 150,
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详细信息',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
lookInfo(row.id)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
|
||||
|
||||
click: row => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
addForms.value.open({
|
||||
title: '编辑',
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||
tableStore.table.params.projectName = ''
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
const userId = ref()
|
||||
const dialogShow = ref(false)
|
||||
|
||||
const lookInfo = (id: string) => {
|
||||
userId.value = id
|
||||
dialogShow.value = true
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
dataType: 1,
|
||||
reason: value
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([6])
|
||||
|
||||
setTimeout(() => {
|
||||
addForms.value.open({
|
||||
title: '用户档案录入'
|
||||
})
|
||||
})
|
||||
}
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
//导出模板
|
||||
const exportExcelTemplate = async () => {
|
||||
loading.value = true
|
||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = '干扰源用户台账模板'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
await setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
}
|
||||
|
||||
//批量导入用户数据
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||
}
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div v-if="information">
|
||||
<div >
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
||||
|
||||
@@ -1,274 +1,274 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- 案例库 -->
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #operation>
|
||||
<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-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||
v-if="information">
|
||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||
下载常见治理措施
|
||||
</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
||||
<!-- 简介详情 -->
|
||||
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
||||
<div class="editor" v-html="summary"></div>
|
||||
</el-dialog>
|
||||
<!-- 抽屉 -->
|
||||
<drawer ref="drawerRef" />
|
||||
<!-- 文件 -->
|
||||
<annex ref="annexRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import PopupEdit from './components/form.vue'
|
||||
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
||||
import drawer from './components/drawer.vue'
|
||||
import annex from './components/annex.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import katex from "katex";
|
||||
import "katex/dist/katex.css";
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'database/case'
|
||||
})
|
||||
|
||||
const popupEditRef = ref()
|
||||
const drawerRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const annexRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
const summary = ref('')
|
||||
const information = adminInfo.roleCode.includes('information_info')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/libcase/pageQuery',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '电能质量事件名称', field: 'name' },
|
||||
{
|
||||
title: '发生地点',
|
||||
field: 'location'
|
||||
},
|
||||
// {
|
||||
// title: '发生事件',
|
||||
// field: 'type'
|
||||
// },
|
||||
// {
|
||||
// title: '事件经过',
|
||||
// field: 'process'
|
||||
// },
|
||||
// {
|
||||
// title: '处理措施',
|
||||
// field: 'measures'
|
||||
// },
|
||||
// {
|
||||
// title: '治理效果',
|
||||
// field: 'effect'
|
||||
// },
|
||||
{
|
||||
title: '事件简介',
|
||||
width: '140',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
summary.value = row.summary
|
||||
setTimeout(() => {
|
||||
|
||||
const spans = document.querySelectorAll('span[data-value]');
|
||||
// 遍历每个 span 标签
|
||||
spans.forEach(function (span) {
|
||||
|
||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||
throwOnError: false,
|
||||
})
|
||||
var newDiv = span;
|
||||
newDiv.innerHTML = val;
|
||||
|
||||
span.parentNode.replaceChild(newDiv, span);
|
||||
});
|
||||
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '200',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
annexRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'view',
|
||||
title: '下载附件',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
annexRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return !information
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
popupEditRef.value.open('修改案例', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return !information
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
libcaseBeleteyById({ id: row.id }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => { }
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增案例')
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
||||
})
|
||||
const checkOutTheCriteria = () => {
|
||||
queryStandardCase().then(res => {
|
||||
drawerRef.value.open(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
// 上传
|
||||
const choose = (e: any) => {
|
||||
ElMessage.info('上传中,请稍等...')
|
||||
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
||||
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
||||
ElMessage.success('上传成功!')
|
||||
})
|
||||
})
|
||||
//
|
||||
}
|
||||
const downloadTheReport = () => {
|
||||
queryStandardCase().then(res => {
|
||||
let urls = res.data
|
||||
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
||||
ElMessage.info('下载中,请稍等...')
|
||||
downloadFile({ filePath: urls }).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: urls.includes('.pdf')
|
||||
? 'application/pdf'
|
||||
: urls.includes('.docx')
|
||||
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
: urls.includes('.xls')
|
||||
? 'application/vnd.ms-excel'
|
||||
: urls.includes('.xlsx')
|
||||
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
: urls.includes('.png')
|
||||
? 'image/png'
|
||||
: urls.includes('.jpeg')
|
||||
? 'image/jpeg'
|
||||
: urls.includes('.jpg')
|
||||
? 'image/jpg'
|
||||
: ''
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.editor {
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- 案例库 -->
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #operation>
|
||||
<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-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||
v-if="information">
|
||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||
下载常见治理措施
|
||||
</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
||||
<!-- 简介详情 -->
|
||||
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
||||
<div class="editor" v-html="summary"></div>
|
||||
</el-dialog>
|
||||
<!-- 抽屉 -->
|
||||
<drawer ref="drawerRef" />
|
||||
<!-- 文件 -->
|
||||
<annex ref="annexRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import PopupEdit from './components/form.vue'
|
||||
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
||||
import drawer from './components/drawer.vue'
|
||||
import annex from './components/annex.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import katex from "katex";
|
||||
import "katex/dist/katex.css";
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'database/case'
|
||||
})
|
||||
|
||||
const popupEditRef = ref()
|
||||
const drawerRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const annexRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
const summary = ref('')
|
||||
const information = adminInfo.roleCode.includes('information_info')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/libcase/pageQuery',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '电能质量事件名称', field: 'name' },
|
||||
{
|
||||
title: '发生地点',
|
||||
field: 'location'
|
||||
},
|
||||
// {
|
||||
// title: '发生事件',
|
||||
// field: 'type'
|
||||
// },
|
||||
// {
|
||||
// title: '事件经过',
|
||||
// field: 'process'
|
||||
// },
|
||||
// {
|
||||
// title: '处理措施',
|
||||
// field: 'measures'
|
||||
// },
|
||||
// {
|
||||
// title: '治理效果',
|
||||
// field: 'effect'
|
||||
// },
|
||||
{
|
||||
title: '事件简介',
|
||||
width: '140',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
summary.value = row.summary
|
||||
setTimeout(() => {
|
||||
|
||||
const spans = document.querySelectorAll('span[data-value]');
|
||||
// 遍历每个 span 标签
|
||||
spans.forEach(function (span) {
|
||||
|
||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||
throwOnError: false,
|
||||
})
|
||||
var newDiv = span;
|
||||
newDiv.innerHTML = val;
|
||||
|
||||
span.parentNode.replaceChild(newDiv, span);
|
||||
});
|
||||
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '200',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
annexRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'view',
|
||||
title: '下载附件',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
annexRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return !information
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
popupEditRef.value.open('修改案例', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return !information
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
libcaseBeleteyById({ id: row.id }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => { }
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增案例')
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
||||
})
|
||||
const checkOutTheCriteria = () => {
|
||||
queryStandardCase().then(res => {
|
||||
drawerRef.value.open(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
// 上传
|
||||
const choose = (e: any) => {
|
||||
ElMessage.info('上传中,请稍等...')
|
||||
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
||||
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
||||
ElMessage.success('上传成功!')
|
||||
})
|
||||
})
|
||||
//
|
||||
}
|
||||
const downloadTheReport = () => {
|
||||
queryStandardCase().then(res => {
|
||||
let urls = res.data
|
||||
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
||||
ElMessage.info('下载中,请稍等...')
|
||||
downloadFile({ filePath: urls }).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: urls.includes('.pdf')
|
||||
? 'application/pdf'
|
||||
: urls.includes('.docx')
|
||||
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
: urls.includes('.xls')
|
||||
? 'application/vnd.ms-excel'
|
||||
: urls.includes('.xlsx')
|
||||
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
: urls.includes('.png')
|
||||
? 'image/png'
|
||||
: urls.includes('.jpeg')
|
||||
? 'image/jpeg'
|
||||
: urls.includes('.jpg')
|
||||
? 'image/jpg'
|
||||
: ''
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = name
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.editor {
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -91,8 +91,10 @@ const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (urlList.value.length > 0) {
|
||||
|
||||
const promises = urlList.value.map(async (item: any) => {
|
||||
if (urlList.value[0].raw) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uploadFile(item.raw, '/supervision/')
|
||||
.then((res: any) => {
|
||||
|
||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
||||
field: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '280',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TableHeader datePicker area showExport>
|
||||
<template #select>
|
||||
<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/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
@@ -131,7 +131,7 @@ const tableStore = new TableStore({
|
||||
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
||||
// {
|
||||
// field: 'advanceType',
|
||||
// title: '暂降类型',
|
||||
// title: '触发类型',
|
||||
// minWidth: '90',
|
||||
// formatter: (row: any) => {
|
||||
// return row.cellValue || '其他'
|
||||
@@ -147,7 +147,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'eventType',
|
||||
title: '暂态统计类型',
|
||||
title: '触发类型',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
@@ -179,7 +179,7 @@ const tableStore = new TableStore({
|
||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -74,9 +74,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电网标志">
|
||||
<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-select>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
@@ -159,6 +164,8 @@ const tableStore = new TableStore({
|
||||
title: '电压等级',
|
||||
field: 'voltageLevel',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
@@ -167,6 +174,7 @@ const tableStore = new TableStore({
|
||||
title: '网络参数',
|
||||
field: 'networkParam',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
@@ -175,6 +183,7 @@ const tableStore = new TableStore({
|
||||
title: '监测点名称',
|
||||
field: 'lineName',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
@@ -183,6 +192,7 @@ const tableStore = new TableStore({
|
||||
title: '厂家',
|
||||
field: 'factoryName',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
@@ -191,6 +201,7 @@ const tableStore = new TableStore({
|
||||
title: '谐波电压(%)',
|
||||
field: 'harmonicVoltage',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -199,6 +210,7 @@ const tableStore = new TableStore({
|
||||
title: '电压偏差(%)',
|
||||
field: 'voltageOffset',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -207,6 +219,7 @@ const tableStore = new TableStore({
|
||||
title: '三相电压不平衡度(%)',
|
||||
field: 'voltageUnbalance',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -215,6 +228,7 @@ const tableStore = new TableStore({
|
||||
title: '间谐波电压含有率(%)',
|
||||
field: 'interHarmonic',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -223,6 +237,7 @@ const tableStore = new TableStore({
|
||||
title: '谐波电流(%)',
|
||||
field: 'harmonicCurrent',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -231,6 +246,7 @@ const tableStore = new TableStore({
|
||||
title: '负序电流(%)',
|
||||
field: 'negativeCurrent',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -239,6 +255,7 @@ const tableStore = new TableStore({
|
||||
title: '频率偏差(%)',
|
||||
field: 'freqOffset',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -247,6 +264,7 @@ const tableStore = new TableStore({
|
||||
title: '闪变(%)',
|
||||
field: 'flicker',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
}
|
||||
@@ -256,7 +274,7 @@ const tableStore = new TableStore({
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||
|
||||
|
||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||
setTimeout(() => {
|
||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||
@@ -312,7 +330,7 @@ const tree2List = (list: any, id?: string) => {
|
||||
})
|
||||
// 返回结果数组
|
||||
return arr
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<TableHeader :showReset="false" ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -69,7 +69,7 @@ const tableStore = new TableStore({
|
||||
{ title: '更新时间', field: 'updateTime' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
||||
{ title: '计算时间', field: 'updateTime' },
|
||||
{ title: '计算窗口', field: 'timeWindow' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
||||
<template #header>
|
||||
<div style="cursor: pointer;" @click="queryline(item, false)">
|
||||
<el-tag v-if="item.data < 60 && item.data >= 0"
|
||||
<el-tag v-if="item.data < 60 && item.data >= 0 && item.data !== 3.14159"
|
||||
style="color: #fff; background: #339966" size="small">
|
||||
优
|
||||
</el-tag>
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="card-item" v-for="(item1, index1) in item.children"
|
||||
:key="index1" @click="queryline(item1, true)">
|
||||
|
||||
<el-tag v-if="item1.data < 60 && item1.data >= 0"
|
||||
<el-tag v-if="item1.data < 60 && item1.data >= 0 && item1.data !== 3.14159"
|
||||
style="color: #fff; background: #339966" size="small">
|
||||
优
|
||||
</el-tag>
|
||||
|
||||
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -106,9 +106,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -123,7 +123,8 @@ const tableStore = new TableStore({
|
||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||
{
|
||||
field: 'ip',
|
||||
title: '网络参数' ,width:'120px',
|
||||
title: '网络参数',
|
||||
width: '120px',
|
||||
formatter: ({ row }: any) => {
|
||||
return row.ip || '/'
|
||||
}
|
||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||
options
|
||||
)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
|
||||
tableStore.table.data = rest
|
||||
|
||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
||||
})
|
||||
exportModelJB(form)
|
||||
.then(async res => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
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: 'ip',
|
||||
title: '网络参数' ,width:'120px',
|
||||
title: '网络参数',
|
||||
width: '120px',
|
||||
formatter: ({ row }: any) => {
|
||||
return row.ip || '/'
|
||||
}
|
||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||
options
|
||||
)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
|
||||
tableStore.table.data = rest
|
||||
|
||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
||||
})
|
||||
exportModelJB(form)
|
||||
.then(async res => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
})
|
||||
|
||||
@@ -744,7 +744,8 @@ const initEcharts = (color: string, key: number, name: string) => {
|
||||
}
|
||||
//渲染echarts
|
||||
const init = () => {
|
||||
const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.68:10407/api/pushMessage/'
|
||||
loading.value = true
|
||||
const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.67:10407/api/pushMessage/'
|
||||
echartsDataV1.value = initEcharts('#DAA520', 0, 'A相')
|
||||
echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相')
|
||||
echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相')
|
||||
@@ -758,6 +759,7 @@ const init = () => {
|
||||
return
|
||||
}
|
||||
if (monitoringPoint.state.comFlag == 0) {
|
||||
loading.value = false
|
||||
return ElMessage({
|
||||
message: '所选监测点离线!',
|
||||
type: 'warning'
|
||||
@@ -826,7 +828,7 @@ const init = () => {
|
||||
]
|
||||
spectrumRef.value?.init(data)
|
||||
trendRef.value?.init(data)
|
||||
|
||||
loading.value = false
|
||||
// console.log('🚀 ~ dataSocket.socketServe.registerCallBack ~ webMsgSend.value:', data)
|
||||
setRealData()
|
||||
})
|
||||
@@ -918,11 +920,14 @@ const setRealData = () => {
|
||||
}
|
||||
defineExpose({ setRealData })
|
||||
onMounted(() => {
|
||||
|
||||
init()
|
||||
|
||||
initRadioCharts()
|
||||
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
||||
})
|
||||
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
dataSocket.socketServe?.closeWs()
|
||||
|
||||
@@ -1,357 +1,358 @@
|
||||
<template>
|
||||
<div class="pt50">
|
||||
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
<div class="select">
|
||||
<div class="mr10">谐波次数</div>
|
||||
<el-select v-model="selectValue" style="width: 100px" @change="loading = true">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick" v-loading="loading">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div>
|
||||
<div class="realtrend_top">
|
||||
<div class="realtrend_table">
|
||||
<div class="thead_left">
|
||||
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
||||
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
||||
</div>
|
||||
<div class="thead_right">
|
||||
<div
|
||||
class="right_cell"
|
||||
v-for="i in selectValue == '1'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue == '2'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
||||
: item.title"
|
||||
:key="index"
|
||||
>
|
||||
<p style="background-color: #f3f6f9">
|
||||
<span>{{ i }}次</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10" :style="height">
|
||||
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getOverLimitData } from '@/api/device-boot/communicate'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
const emit = defineEmits(['shutDown'])
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const options = [
|
||||
{
|
||||
value: '3',
|
||||
label: '全部'
|
||||
},
|
||||
|
||||
{
|
||||
value: '1',
|
||||
label: '奇次'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '偶次'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(315)
|
||||
const barCharts = ref()
|
||||
const loading = ref(true)
|
||||
const crossTheLine: any = ref({})
|
||||
const tabsList: any = ref([
|
||||
{
|
||||
id: '6d5470f509ca271d7108a86e83bb283f',
|
||||
groupName: '谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
||||
groupName: '间谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5,
|
||||
19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
|
||||
37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: '8dc260f16280184e2b57d26668dc00b1',
|
||||
groupName: '谐波电流幅值',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: 'A',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
|
||||
data: {},
|
||||
echartsData: {}
|
||||
}
|
||||
])
|
||||
|
||||
const selectValue = ref('1')
|
||||
const activeName = ref(0)
|
||||
// 点击tab
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
}
|
||||
const init = (row: any) => {
|
||||
let vData: any = {}
|
||||
let iData: any = {}
|
||||
let SvData: any = {}
|
||||
for (let i = 1; i < 50; i++) {
|
||||
vData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.V.A[`V` + (i + 1)], row.V.B[`V` + (i + 1)], row.V.C[`V` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
|
||||
SvData[`h${i - 0.5}`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_` + (i-1)], row.V.B[`SV_` + (i-1)], row.V.C[`SV_` + (i-1)]].map(Number)) * 100) /
|
||||
100
|
||||
iData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.I.A[`I` + (i + 1)], row.I.B[`I` + (i + 1)], row.I.C[`I` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
}
|
||||
SvData[`h49.5`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_49`], row.V.B[`SV_49`], row.V.C[`SV_49`]].map(Number)) * 100) / 100
|
||||
|
||||
tabsList.value[0].data = vData
|
||||
tabsList.value[1].data = SvData
|
||||
tabsList.value[2].data = iData
|
||||
|
||||
let xData =
|
||||
selectValue.value == '1'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue.value == '2'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 === 0)
|
||||
: tabsList.value[activeName.value].title
|
||||
|
||||
barCharts.value[activeName.value]?.setOptions({
|
||||
title: {
|
||||
text: tabsList.value[activeName.value].groupName
|
||||
},
|
||||
xAxis: {
|
||||
data: xData.map(num => `${num}次`)
|
||||
},
|
||||
yAxis: {
|
||||
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return tabsList.value[activeName.value].data[`h${num}`]
|
||||
})
|
||||
},
|
||||
{
|
||||
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return (
|
||||
crossTheLine.value[
|
||||
activeName.value == 0
|
||||
? `uharm${num}`
|
||||
: activeName.value == 1
|
||||
? `inuharm${num + 0.5}`
|
||||
: `iharm${num}`
|
||||
] || ''
|
||||
)
|
||||
})
|
||||
}
|
||||
]
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
// 设置ecartsData
|
||||
const echarts = (num: number) => {
|
||||
return {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
name: "次数",
|
||||
data: []
|
||||
},
|
||||
yAxis: {name: tabsList.value[num].unit},
|
||||
color: ['#2E8B57', '#DAA520'],
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[num].groupName,
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '国标限值('+ tabsList.value[num].unit +')',
|
||||
type: 'bar',
|
||||
// label: {
|
||||
// normal: {
|
||||
// position: 'top'
|
||||
// }
|
||||
// },
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tabsList.value[0].echartsData = echarts(0)
|
||||
tabsList.value[1].echartsData = echarts(1)
|
||||
tabsList.value[2].echartsData = echarts(2)
|
||||
console.log(tabsList.value)
|
||||
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
crossTheLine.value = res.data
|
||||
})
|
||||
})
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shutDown {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.select {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.realtrend_top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.table {
|
||||
flex: 1;
|
||||
// min-height: 80px;
|
||||
cursor: pointer;
|
||||
min-height: 90px;
|
||||
max-height: 170px;
|
||||
border: 1px solid #eee;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
|
||||
ul {
|
||||
width: auto;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
|
||||
li {
|
||||
flex: none;
|
||||
width: 100px;
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul:nth-child(1) {
|
||||
li {
|
||||
font-weight: 800;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .table::-webkit-scrollbar {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
.realtrend_table {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 150px;
|
||||
display: flex;
|
||||
border: 2px solid #eee;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
|
||||
.thead_left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
|
||||
padding-bottom: 5px;
|
||||
|
||||
p {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.thead_right {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
padding-bottom: 5px;
|
||||
|
||||
.right_cell {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
flex: none;
|
||||
min-width: 60px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="pt50">
|
||||
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||
<div class="select">
|
||||
<div class="mr10">谐波次数</div>
|
||||
<el-select v-model="selectValue" style="width: 100px" @change="loading = true">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick" v-loading="loading">
|
||||
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||
<div>
|
||||
<div class="realtrend_top">
|
||||
<div class="realtrend_table">
|
||||
<div class="thead_left">
|
||||
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
||||
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
||||
</div>
|
||||
<div class="thead_right">
|
||||
<div
|
||||
class="right_cell"
|
||||
v-for="i in selectValue == '1'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue == '2'
|
||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
||||
: item.title"
|
||||
:key="index"
|
||||
>
|
||||
<p style="background-color: #f3f6f9">
|
||||
<span>{{ i }}次</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10" :style="height">
|
||||
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getOverLimitData } from '@/api/device-boot/communicate'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
const emit = defineEmits(['shutDown'])
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const options = [
|
||||
{
|
||||
value: '3',
|
||||
label: '全部'
|
||||
},
|
||||
|
||||
{
|
||||
value: '1',
|
||||
label: '奇次'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '偶次'
|
||||
}
|
||||
]
|
||||
const height = mainHeight(315)
|
||||
const barCharts = ref()
|
||||
const loading = ref(true)
|
||||
const crossTheLine: any = ref({})
|
||||
const tabsList: any = ref([
|
||||
{
|
||||
id: '6d5470f509ca271d7108a86e83bb283f',
|
||||
groupName: '谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
||||
groupName: '间谐波电压含有率',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: '%',
|
||||
title: [
|
||||
0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5,
|
||||
// 16.5, 17.5, 18.5,
|
||||
// 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
|
||||
// 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5
|
||||
],
|
||||
data: {},
|
||||
echartsData: {}
|
||||
},
|
||||
{
|
||||
id: '8dc260f16280184e2b57d26668dc00b1',
|
||||
groupName: '谐波电流幅值',
|
||||
thdDataVOS: null,
|
||||
thdDataTdVODatas: null,
|
||||
unit: 'A',
|
||||
title: [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||
],
|
||||
|
||||
data: {},
|
||||
echartsData: {}
|
||||
}
|
||||
])
|
||||
|
||||
const selectValue = ref('1')
|
||||
const activeName = ref(0)
|
||||
// 点击tab
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
loading.value = true
|
||||
}
|
||||
const init = (row: any) => {
|
||||
let vData: any = {}
|
||||
let iData: any = {}
|
||||
let SvData: any = {}
|
||||
for (let i = 1; i < 50; i++) {
|
||||
vData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.V.A[`V` + (i + 1)], row.V.B[`V` + (i + 1)], row.V.C[`V` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
|
||||
SvData[`h${i - 0.5}`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_` + (i-1)], row.V.B[`SV_` + (i-1)], row.V.C[`SV_` + (i-1)]].map(Number)) * 100) /
|
||||
100
|
||||
iData[`h${i + 1}`] =
|
||||
Math.floor(
|
||||
Math.max(...[row.I.A[`I` + (i + 1)], row.I.B[`I` + (i + 1)], row.I.C[`I` + (i + 1)]].map(Number)) * 100
|
||||
) / 100
|
||||
}
|
||||
SvData[`h49.5`] =
|
||||
Math.floor(Math.max(...[row.V.A[`SV_49`], row.V.B[`SV_49`], row.V.C[`SV_49`]].map(Number)) * 100) / 100
|
||||
|
||||
tabsList.value[0].data = vData
|
||||
tabsList.value[1].data = SvData
|
||||
tabsList.value[2].data = iData
|
||||
|
||||
let xData =
|
||||
selectValue.value == '1'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||
: selectValue.value == '2'
|
||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 === 0)
|
||||
: tabsList.value[activeName.value].title
|
||||
|
||||
barCharts.value[activeName.value]?.setOptions({
|
||||
title: {
|
||||
text: tabsList.value[activeName.value].groupName
|
||||
},
|
||||
xAxis: {
|
||||
data: xData.map(num => `${num}次`)
|
||||
},
|
||||
yAxis: {
|
||||
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return tabsList.value[activeName.value].data[`h${num}`]
|
||||
})
|
||||
},
|
||||
{
|
||||
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
||||
type: 'bar',
|
||||
data: xData.map(num => {
|
||||
return (
|
||||
crossTheLine.value[
|
||||
activeName.value == 0
|
||||
? `uharm${num}`
|
||||
: activeName.value == 1
|
||||
? `inuharm${num + 0.5}`
|
||||
: `iharm${num}`
|
||||
] || ''
|
||||
)
|
||||
})
|
||||
}
|
||||
]
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
// 设置ecartsData
|
||||
const echarts = (num: number) => {
|
||||
return {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
name: "次数",
|
||||
data: []
|
||||
},
|
||||
yAxis: {name: tabsList.value[num].unit},
|
||||
color: ['#2E8B57', '#DAA520'],
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: tabsList.value[num].groupName,
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '国标限值('+ tabsList.value[num].unit +')',
|
||||
type: 'bar',
|
||||
// label: {
|
||||
// normal: {
|
||||
// position: 'top'
|
||||
// }
|
||||
// },
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tabsList.value[0].echartsData = echarts(0)
|
||||
tabsList.value[1].echartsData = echarts(1)
|
||||
tabsList.value[2].echartsData = echarts(2)
|
||||
console.log(tabsList.value)
|
||||
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
||||
crossTheLine.value = res.data
|
||||
})
|
||||
})
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.shutDown {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.select {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.realtrend_top {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.table {
|
||||
flex: 1;
|
||||
// min-height: 80px;
|
||||
cursor: pointer;
|
||||
min-height: 90px;
|
||||
max-height: 170px;
|
||||
border: 1px solid #eee;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
|
||||
ul {
|
||||
width: auto;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
|
||||
li {
|
||||
flex: none;
|
||||
width: 100px;
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul:nth-child(1) {
|
||||
li {
|
||||
font-weight: 800;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .table::-webkit-scrollbar {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
.realtrend_table {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 150px;
|
||||
display: flex;
|
||||
border: 2px solid #eee;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
|
||||
.thead_left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
|
||||
padding-bottom: 5px;
|
||||
|
||||
p {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.thead_right {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
padding-bottom: 5px;
|
||||
|
||||
.right_cell {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
p {
|
||||
flex: none;
|
||||
min-width: 60px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border: 1px solid #eee;
|
||||
line-height: 38px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
p:nth-child(1) {
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -86,7 +86,7 @@ const tableStore = new TableStore({
|
||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
@@ -126,7 +126,6 @@ const changetype = (val: any) => {
|
||||
reportForm.value = val.reportForm
|
||||
}
|
||||
const selectChange = () => {
|
||||
|
||||
if (tableStore.table.data.length != 0) {
|
||||
setTimeout(() => {
|
||||
luckysheet && luckysheet?.resize()
|
||||
@@ -152,6 +151,10 @@ const exportReport = () => {
|
||||
})
|
||||
exportModelJB(form)
|
||||
.then(async res => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
})
|
||||
|
||||
@@ -153,7 +153,7 @@ const typeOptions = ref([
|
||||
{ label: 'cp95值', value: 4 }
|
||||
])
|
||||
onMounted(() => {
|
||||
datePickerRef.value.setTheDate(5)
|
||||
datePickerRef.value.setTheDate(4)
|
||||
init()
|
||||
})
|
||||
const height: any = ref(mainHeight(200, 1))
|
||||
|
||||
@@ -181,9 +181,10 @@ const init = () => {
|
||||
]
|
||||
if (searchType.value) {
|
||||
series.push({
|
||||
name: formData.periodBeginTime + '至' + formData.periodEndTime,
|
||||
name: formData.periodBeginTime + '~' + formData.periodEndTime,
|
||||
type: 'bar',
|
||||
barMaxWidth: 30,
|
||||
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: 'top',
|
||||
@@ -234,10 +235,19 @@ const init = () => {
|
||||
let msg = ''
|
||||
msg += params[0].name
|
||||
for (let i in params) {
|
||||
|
||||
if (params[i].data == 3.14159) {
|
||||
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': 暂无数据<br/>'
|
||||
if (params[i].seriesName && params[i].seriesName.includes('~')) {
|
||||
msg += params[i].marker + ': 暂无数据<br/>'
|
||||
} else {
|
||||
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': 暂无数据<br/>'
|
||||
}
|
||||
} else {
|
||||
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': ' + params[i].data + '<br/>'
|
||||
if (params[i].seriesName && params[i].seriesName.includes('~')) {
|
||||
msg += params[i].marker + ': ' + params[i].data + '<br/>'
|
||||
} else {
|
||||
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': ' + params[i].data + '<br/>'
|
||||
}
|
||||
}
|
||||
}
|
||||
return msg
|
||||
|
||||
@@ -1,129 +1,141 @@
|
||||
<!--业务用户管理界面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker area showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable maxlength="32" show-word-limit placeholder="筛选数据" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/reate/word'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//区域联级选择
|
||||
const industry = dictData.getBasicData('Interference_Source')
|
||||
//用户信息弹出框
|
||||
const tableRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/qualifiedReport/pageTable',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '变电站', field: 'subName', width: 200 },
|
||||
{ title: '监测点名称', field: 'lineName', width: 200 },
|
||||
{
|
||||
title: '行业类型',
|
||||
field: 'businessType',
|
||||
formatter: (row: any) => {
|
||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '分类等级',
|
||||
field: 'calssificationGrade',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{ title: '电压等级', field: 'voltageScale' },
|
||||
{
|
||||
title: '上级变电站',
|
||||
field: 'superiorsSubstation',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '挂接线路',
|
||||
field: 'hangLine',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'PT变比',
|
||||
field: 'pt',
|
||||
formatter: (row: any) => {
|
||||
return row.row.pt1 + '/' + row.row.pt2
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'CT变比',
|
||||
field: 'ct',
|
||||
formatter: (row: any) => {
|
||||
return row.row.ct1 + '/' + row.row.ct2
|
||||
}
|
||||
},
|
||||
{ title: '短路容量(MVA)', field: 'shortCapacity' },
|
||||
{ title: '终端容量(MVA)', field: 'deviceCapacity' },
|
||||
{ title: '协议容量(MVA)', field: 'dealCapacity' },
|
||||
{ title: '谐波情况', field: 'harmDes' },
|
||||
{ title: '电能质量情况', field: 'powerDes' }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
pageTable(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '合格率报告', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--业务用户管理界面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker area showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="筛选数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/reate/word'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//区域联级选择
|
||||
const industry = dictData.getBasicData('Interference_Source')
|
||||
//用户信息弹出框
|
||||
const tableRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/qualifiedReport/pageTable',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '变电站', field: 'subName', width: 200 },
|
||||
{ title: '监测点名称', field: 'lineName', width: 200 },
|
||||
{
|
||||
title: '行业类型',
|
||||
field: 'businessType',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '分类等级',
|
||||
field: 'calssificationGrade',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{ title: '电压等级', field: 'voltageScale', minWidth: 80 },
|
||||
{
|
||||
title: '上级变电站',
|
||||
field: 'superiorsSubstation',
|
||||
minWidth: 90,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '挂接线路',
|
||||
field: 'hangLine',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'PT变比',
|
||||
field: 'pt',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return row.row.pt1 + '/' + row.row.pt2
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'CT变比',
|
||||
field: 'ct',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return row.row.ct1 + '/' + row.row.ct2
|
||||
}
|
||||
},
|
||||
{ title: '短路容量(MVA)', field: 'shortCapacity', minWidth: 80 },
|
||||
{ title: '终端容量(MVA)', field: 'deviceCapacity', minWidth: 80 },
|
||||
{ title: '协议容量(MVA)', field: 'dealCapacity', minWidth: 80 },
|
||||
{ title: '谐波情况', field: 'harmDes', minWidth: 80 },
|
||||
{ title: '电能质量情况', field: 'powerDes', minWidth: 100 }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
pageTable(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '合格率报告', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -87,6 +87,10 @@ const exportEvent = () => {
|
||||
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||
})
|
||||
.then((res: any) => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
@@ -41,7 +41,13 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<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>
|
||||
</template>
|
||||
@@ -110,7 +116,7 @@ const tableStore = new TableStore({
|
||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||
})
|
||||
})
|
||||
console.log(tableStore.table.data)
|
||||
|
||||
setTimeout(() => {
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
@@ -123,6 +129,13 @@ const tableStore = new TableStore({
|
||||
data: tableStore.table.data
|
||||
})
|
||||
}, 10)
|
||||
},
|
||||
resetCallback: () => {
|
||||
// 重置模板策略为第一个选项
|
||||
if (templatePolicy.value && templatePolicy.value.length > 0) {
|
||||
Template.value = templatePolicy.value[0]
|
||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||
}
|
||||
}
|
||||
})
|
||||
const loading = ref(false)
|
||||
@@ -148,7 +161,7 @@ const changetype = (val: any) => {
|
||||
reportForm.value = val.reportForm
|
||||
}
|
||||
const selectChange = () => {
|
||||
console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
|
||||
//console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
|
||||
if (tableStore.table.data.length != 0) {
|
||||
setTimeout(() => {
|
||||
luckysheet && luckysheet?.resize()
|
||||
@@ -159,6 +172,13 @@ const selectChange = () => {
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
|
||||
TableHeaderRef.value.setTheDate(3)
|
||||
// 重置模板策略为第一个选项
|
||||
if (templatePolicy.value && templatePolicy.value.length > 0) {
|
||||
Template.value = templatePolicy.value[0]
|
||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||
}
|
||||
tableStore.index()
|
||||
}
|
||||
}
|
||||
@@ -189,6 +209,10 @@ const exportReport = () => {
|
||||
})
|
||||
exportModelJB(form)
|
||||
.then(async res => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||
})
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">生成</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">
|
||||
生成
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
@@ -108,9 +110,10 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
// 上传
|
||||
const choose = (files: any) => {
|
||||
const isJPG = files.raw.type === 'image/jpg'
|
||||
const isJPEG = files.raw.type === 'image/jpeg'
|
||||
const isPNG = files.raw.type === 'image/png'
|
||||
if (!isJPG && !isPNG) {
|
||||
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
||||
if (!isJPG && !isPNG && !isJPEG) {
|
||||
ElMessage.warning('上传文件只能是 jpg/png 格式!')
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -131,7 +134,7 @@ const exportEvent = () => {
|
||||
form.append('type', '0')
|
||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
//console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||
form.append('file', uploadList.value?.raw || '')
|
||||
// 特殊字符正则表达式
|
||||
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
||||
@@ -146,22 +149,28 @@ const exportEvent = () => {
|
||||
} else {
|
||||
loading.value = true
|
||||
ElMessage('生成报告中...')
|
||||
exportModel(form).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
exportModel(form)
|
||||
.then((res: any) => {
|
||||
if (res == undefined) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name + dayjs().format('YYYYMMDD') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
loading.value = false
|
||||
})
|
||||
.catch((err: any) => {
|
||||
loading.value = false
|
||||
})
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name+ dayjs().format('YYYYMMDD') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
loading.value =false
|
||||
}).catch((err: any) => {
|
||||
loading.value =false
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价筛选">
|
||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" maxlength="32" show-word-limit />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -100,10 +100,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'areaName', title: '区域',minWidth: 100 },
|
||||
{ field: 'gdName', title: '地级区' ,minWidth: 100},
|
||||
{ field: 'gdName', title: '供电公司' ,minWidth: 100},
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '供电公司',
|
||||
title: '场站',
|
||||
minWidth: 100
|
||||
},
|
||||
{ field: 'objName', title: '对象名称' , minWidth: 240},
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价筛选">
|
||||
<!-- <el-form-item label="评价筛选">
|
||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
@@ -145,10 +145,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'areaName', title: '区域', minWidth: 100 },
|
||||
{ field: 'gdName', title: '地级区', minWidth: 100 },
|
||||
{ field: 'gdName', title: '供电公司', minWidth: 100 },
|
||||
{
|
||||
field: 'bdName',
|
||||
title: '供电公司',
|
||||
title: '场站',
|
||||
minWidth: 100
|
||||
},
|
||||
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
||||
@@ -219,7 +219,7 @@ tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
tableStore.table.params.comFlag = []
|
||||
tableStore.table.params.runFlag = []
|
||||
tableStore.table.params.evaluate = ''
|
||||
// tableStore.table.params.evaluate = ''
|
||||
tableStore.table.params.powerFlag = 2
|
||||
tableStore.table.params.monitorFlag = 2
|
||||
tableStore.table.params.scale = []
|
||||
|
||||
@@ -1,153 +1,153 @@
|
||||
<!-- 暂态 -->
|
||||
<template>
|
||||
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
||||
<div>
|
||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="360px" :data="tableData">
|
||||
<vxe-column field="name" title="区域" />
|
||||
|
||||
<vxe-column sortable field="sagTimes" title="暂降次数" />
|
||||
<vxe-column sortable field="swellTimes" title="暂升次数" />
|
||||
<vxe-column sortable field="interruptTimes" title="短时中断次数" />
|
||||
|
||||
<vxe-colgroup title="暂态严重度占比">
|
||||
<vxe-column sortable field="rate90" title="SARFI-90" />
|
||||
<vxe-column sortable field="rate50" title="SARFI-50" />
|
||||
<vxe-column sortable field="rate20" title="SARFI-20" />
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<div style="margin-top: 10px; display: flex">
|
||||
<!--
|
||||
-->
|
||||
<div class="statistics-main">
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart" />
|
||||
|
||||
<el-table size="small" height="250px" :data="descentData">
|
||||
<el-table-column prop="name" label="暂降原因" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||
<el-table size="small" height="250px" :data="resembleData">
|
||||
<el-table-column prop="name" label="暂降类型" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
||||
|
||||
const dialogVisible: any = ref(false)
|
||||
|
||||
const tableData: any = ref([])
|
||||
const descentData = ref([])
|
||||
const resembleData = ref([])
|
||||
|
||||
const picEChart = ref({})
|
||||
const picEChart1 = ref({})
|
||||
const open = async (row: any) => {
|
||||
getEventDetailByList({ ...row, deviceInfoParam: row }).then((res: any) => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
getEventReason(row).then(res => {
|
||||
descentData.value = res.data.reason
|
||||
resembleData.value = res.data.type
|
||||
picEChart.value = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: '10px'
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
options: {
|
||||
dataZoom: null,
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: ['60%', '50%'],
|
||||
radius: '50%',
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
//数值样式
|
||||
}
|
||||
},
|
||||
data: res.data.reason
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
picEChart1.value = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: '10px'
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
options: {
|
||||
dataZoom: null,
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: ['60%', '50%'],
|
||||
radius: '50%',
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
//数值样式
|
||||
}
|
||||
},
|
||||
data: res.data.type
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.statistics-main {
|
||||
// height: 300px;
|
||||
display: grid;
|
||||
width: 100%;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
.statistics-box {
|
||||
// height: 300px;
|
||||
// display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
}
|
||||
}
|
||||
:deep(.el-dialog__body) {
|
||||
max-height: none !important;
|
||||
}
|
||||
</style>
|
||||
<!-- 暂态 -->
|
||||
<template>
|
||||
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
||||
<div>
|
||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="360px" :data="tableData">
|
||||
<vxe-column field="name" title="区域" />
|
||||
|
||||
<vxe-column sortable field="sagTimes" title="暂降次数" />
|
||||
<vxe-column sortable field="swellTimes" title="暂升次数" />
|
||||
<vxe-column sortable field="interruptTimes" title="短时中断次数" />
|
||||
|
||||
<vxe-colgroup title="暂态严重度占比">
|
||||
<vxe-column sortable field="rate90" title="SARFI-90" />
|
||||
<vxe-column sortable field="rate50" title="SARFI-50" />
|
||||
<vxe-column sortable field="rate20" title="SARFI-20" />
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<div style="margin-top: 10px; display: flex">
|
||||
<!--
|
||||
-->
|
||||
<div class="statistics-main">
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart" />
|
||||
|
||||
<el-table size="small" height="250px" :data="descentData">
|
||||
<el-table-column prop="name" label="暂降原因" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||
<el-table size="small" height="250px" :data="resembleData">
|
||||
<el-table-column prop="name" label="暂降类型" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
||||
|
||||
const dialogVisible: any = ref(false)
|
||||
|
||||
const tableData: any = ref([])
|
||||
const descentData = ref([])
|
||||
const resembleData = ref([])
|
||||
|
||||
const picEChart = ref({})
|
||||
const picEChart1 = ref({})
|
||||
const open = async (row: any) => {
|
||||
getEventDetailByList({ ...row, deviceInfoParam: row }).then((res: any) => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
getEventReason(row).then(res => {
|
||||
descentData.value = res.data.reason
|
||||
resembleData.value = res.data.type
|
||||
picEChart.value = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: '10px'
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
options: {
|
||||
dataZoom: null,
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: ['60%', '50%'],
|
||||
radius: '50%',
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
//数值样式
|
||||
}
|
||||
},
|
||||
data: res.data.reason
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
picEChart1.value = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: '10px'
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
options: {
|
||||
dataZoom: null,
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: ['60%', '50%'],
|
||||
radius: '50%',
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
//数值样式
|
||||
}
|
||||
},
|
||||
data: res.data.type
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.statistics-main {
|
||||
// height: 300px;
|
||||
display: grid;
|
||||
width: 100%;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
.statistics-box {
|
||||
// height: 300px;
|
||||
// display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
}
|
||||
}
|
||||
:deep(.el-dialog__body) {
|
||||
max-height: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,141 +1,141 @@
|
||||
<!--业务用户管理界面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div v-show="addedShow">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
<!-- 设计流程 -->
|
||||
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
||||
<!-- 配置表单 -->
|
||||
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Allocation from './allocation.vue'
|
||||
import { deleteDeploy } from '@/api/process-boot/bpm'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import editor from './editor/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: '/flowable/definition/index'
|
||||
})
|
||||
|
||||
const tableRef = ref()
|
||||
const allocationRef = ref()
|
||||
const model = ref({})
|
||||
const addedShow = ref(true)
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/flowable/definition/list',
|
||||
method: 'GET',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '流程标识', field: 'flowKey' },
|
||||
{ title: '流程分类', field: 'category' },
|
||||
{ title: '流程名称', field: 'name' },
|
||||
|
||||
{
|
||||
title: '业务功能',
|
||||
field: 'formId',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
||||
}
|
||||
},
|
||||
{ title: '流程版本(V)', field: 'version' },
|
||||
|
||||
|
||||
{ title: '部署时间', field: 'deploymentTime' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '设计',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
model.value = row
|
||||
addedShow.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '配置主表单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
allocationRef.value.open(row)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'del',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteDeploy([row.id]).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
model.value = {}
|
||||
addedShow.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
const quit = () => {
|
||||
addedShow.value = true
|
||||
tableStore.index()
|
||||
}
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
</script>
|
||||
<!--业务用户管理界面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div v-show="addedShow">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
<!-- 设计流程 -->
|
||||
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
||||
<!-- 配置表单 -->
|
||||
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Allocation from './allocation.vue'
|
||||
import { deleteDeploy } from '@/api/process-boot/bpm'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import editor from './editor/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: '/flowable/definition/index'
|
||||
})
|
||||
|
||||
const tableRef = ref()
|
||||
const allocationRef = ref()
|
||||
const model = ref({})
|
||||
const addedShow = ref(true)
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/flowable/definition/list',
|
||||
method: 'GET',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '流程标识', field: 'flowKey' },
|
||||
{ title: '流程分类', field: 'category' },
|
||||
{ title: '流程名称', field: 'name' },
|
||||
|
||||
{
|
||||
title: '业务功能',
|
||||
field: 'formId',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
||||
}
|
||||
},
|
||||
{ title: '流程版本(V)', field: 'version' },
|
||||
|
||||
|
||||
{ title: '部署时间', field: 'deploymentTime' },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '设计',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
model.value = row
|
||||
addedShow.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '配置主表单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
allocationRef.value.open(row)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'del',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteDeploy([row.id]).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
model.value = {}
|
||||
addedShow.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
const quit = () => {
|
||||
addedShow.value = true
|
||||
tableStore.index()
|
||||
}
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
</script>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<div class="statistics-box">
|
||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||
<el-table size="small" height="250px" :data="resembleData">
|
||||
<el-table-column prop="name" label="暂降类型" width="80px" align="center" />
|
||||
<el-table-column prop="name" label="触发类型" width="80px" align="center" />
|
||||
<el-table-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
<el-input
|
||||
placeholder="请输入监测点名称/终端名称"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -62,9 +62,9 @@ const tableStore = new TableStore({
|
||||
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
|
||||
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -96,9 +96,9 @@ const tableStore = new TableStore({
|
||||
{ title: '谐波49次', field: 'i49', minWidth: '80' },
|
||||
{ title: '谐波50次', field: 'i50', minWidth: '80' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -63,9 +63,9 @@ const tableStore = new TableStore({
|
||||
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -73,9 +73,9 @@ const tableStore = new TableStore({
|
||||
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
|
||||
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -184,10 +184,10 @@ const tableStore: any = new TableStore({
|
||||
// { field: 'name13', title: '单相负荷', minWidth: 180 },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '220',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
|
||||
@@ -152,6 +152,8 @@
|
||||
placeholder="请输入监测点名称/终端名称"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="异常持续天数"></el-form-item>
|
||||
|
||||
@@ -1,155 +1,155 @@
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请输入问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 审核 -->
|
||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling
|
||||
ref="FillingRef"
|
||||
v-if="dialogVisible"
|
||||
:isDisabled="true"
|
||||
:audit="true"
|
||||
:flag="true"
|
||||
@beforeClose="beforeClose"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import Filling from './filling.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const TableHeaderRef = ref()
|
||||
const FillingRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
|
||||
const list: any = ref({})
|
||||
const recordingRef = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
|
||||
{ field: 'dataDate', title: '提交时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报节点',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '150',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
list.value = row
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||
|
||||
const beforeClose = () => {
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请输入问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 审核 -->
|
||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling
|
||||
ref="FillingRef"
|
||||
v-if="dialogVisible"
|
||||
:isDisabled="true"
|
||||
:audit="true"
|
||||
:flag="true"
|
||||
@beforeClose="beforeClose"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import Filling from './filling.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const TableHeaderRef = ref()
|
||||
const FillingRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
|
||||
const list: any = ref({})
|
||||
const recordingRef = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
|
||||
{ field: 'dataDate', title: '提交时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报节点',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '150',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
list.value = row
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||
|
||||
const beforeClose = () => {
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,255 +1,255 @@
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in auditStatus"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请填写问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||
<!-- 填报 -->
|
||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情 -->
|
||||
<Detail ref="detailRef" />
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import NewlyAdd from './NewlyAdd.vue'
|
||||
import Filling from './filling.vue'
|
||||
import Detail from './detail.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const FillingRef = ref()
|
||||
|
||||
const showNewlyAdded = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const recordingRef = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
{ field: 'dataDate', title: '问题新建时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报进度',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'reportProcessStatus',
|
||||
title: '状态',
|
||||
formatter: (row: any) => {
|
||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
detailRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '填报',
|
||||
disabled: row => {
|
||||
return (
|
||||
row.reportProcessStatus == 'Auditt' ||
|
||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||
row.reportProcess == 'Archived'
|
||||
)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '归档',
|
||||
disabled: row => {
|
||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-SuccessFilled',
|
||||
render: 'basicButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定归档?'
|
||||
},
|
||||
click: row => {
|
||||
archive(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('归档成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-PieChart',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
disabled: row => {
|
||||
return row.reportProcess == 'Archived'
|
||||
},
|
||||
click: row => {
|
||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.reportProcessStatus = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([
|
||||
{ label: '年', value: 1 },
|
||||
{ label: '季', value: 2 },
|
||||
{ label: '月', value: 3 }
|
||||
])
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
showNewlyAdded.value = true
|
||||
}
|
||||
|
||||
// 关闭弹框
|
||||
const handleClose = () => {
|
||||
showNewlyAdded.value = false
|
||||
}
|
||||
// 关闭 填报
|
||||
const beforeClose = () => {
|
||||
dialogVisible.value = false
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="问题来源">
|
||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||
<el-option
|
||||
v-for="item in problemData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="填报进度">
|
||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||
<el-option
|
||||
v-for="item in fillingProgress"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in auditStatus"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="问题名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.problemName"
|
||||
clearable
|
||||
placeholder="请填写问题名称"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||
<!-- 填报 -->
|
||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情 -->
|
||||
<Detail ref="detailRef" />
|
||||
|
||||
<!-- 审核记录 -->
|
||||
<recording ref="recordingRef" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import NewlyAdd from './NewlyAdd.vue'
|
||||
import Filling from './filling.vue'
|
||||
import Detail from './detail.vue'
|
||||
import recording from './recording.vue'
|
||||
const dictData = useDictData()
|
||||
const FillingRef = ref()
|
||||
|
||||
const showNewlyAdded = ref(false)
|
||||
const dialogVisible = ref(false)
|
||||
const recordingRef = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const problemData = dictData.getBasicData('Problem_Sources')
|
||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/process-boot/electricityQuality/getIssues',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'problemSources',
|
||||
title: '问题来源'
|
||||
},
|
||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||
{ field: 'problemName', title: '问题名称' },
|
||||
{ field: 'dataDate', title: '问题新建时间' },
|
||||
{
|
||||
field: 'reportProcess',
|
||||
title: '填报进度',
|
||||
formatter: (row: any) => {
|
||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'reportProcessStatus',
|
||||
title: '状态',
|
||||
formatter: (row: any) => {
|
||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
detailRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '填报',
|
||||
disabled: row => {
|
||||
return (
|
||||
row.reportProcessStatus == 'Auditt' ||
|
||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||
row.reportProcess == 'Archived'
|
||||
)
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
FillingRef.value.open(row)
|
||||
}, 10)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '归档',
|
||||
disabled: row => {
|
||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||
},
|
||||
type: 'primary',
|
||||
icon: 'el-icon-SuccessFilled',
|
||||
render: 'basicButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定归档?'
|
||||
},
|
||||
click: row => {
|
||||
archive(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('归档成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核记录',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.reportProcessStatus == 'Init'
|
||||
},
|
||||
icon: 'el-icon-PieChart',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
recordingRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
disabled: row => {
|
||||
return row.reportProcess == 'Archived'
|
||||
},
|
||||
click: row => {
|
||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.problemName = ''
|
||||
tableStore.table.params.problemSources = ''
|
||||
tableStore.table.params.reportProcess = ''
|
||||
tableStore.table.params.reportProcessStatus = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([
|
||||
{ label: '年', value: 1 },
|
||||
{ label: '季', value: 2 },
|
||||
{ label: '月', value: 3 }
|
||||
])
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
showNewlyAdded.value = true
|
||||
}
|
||||
|
||||
// 关闭弹框
|
||||
const handleClose = () => {
|
||||
showNewlyAdded.value = false
|
||||
}
|
||||
// 关闭 填报
|
||||
const beforeClose = () => {
|
||||
dialogVisible.value = false
|
||||
tableStore.index()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -122,7 +122,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 120,
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户名称:" prop="userName">
|
||||
<el-input v-model="form.userName" clearable style="width: 100%"
|
||||
placeholder="请输入用户名称"></el-input>
|
||||
placeholder="请输入用户名称" maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item for="-" label="用户编号:" prop="userNumber">
|
||||
<el-input v-model="form.userNumber" clearable style="width: 100%"
|
||||
placeholder="请输入用户编号"></el-input>
|
||||
placeholder="请输入用户编号" maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -187,11 +187,11 @@ const tableStore = new TableStore({
|
||||
title: '最新数据时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入计划名称"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否解决">
|
||||
@@ -104,11 +106,11 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
|
||||
@@ -134,9 +134,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 230,
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
// {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Area v-model="form.deptId" @change="changeArea" />
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划名称:" prop="planName">
|
||||
<el-input v-model="form.planName" placeholder="请输入计划名称"></el-input>
|
||||
<el-input v-model="form.planName" placeholder="请输入计划名称" clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="监督类型:" prop="supvType">
|
||||
<el-select v-model="form.supvType" placeholder="请选择监督类型" style="width: 100%" @change="++key">
|
||||
@@ -26,7 +26,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="监督对象名称:" prop="supvObjectName">
|
||||
<el-input v-model="form.supvObjectName" placeholder="请输入监督对象名称"></el-input>
|
||||
<el-input v-model="form.supvObjectName" placeholder="请输入监督对象名称" clearable maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
||||
<el-date-picker
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import planAdd from './planAdd.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const planAddRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'planNo', title: '普测计划编号' },
|
||||
{ field: 'planName', title: '普测计划名称' },
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planAddRef.value.open('计划审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import planAdd from './planAdd.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const planAddRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'planNo', title: '普测计划编号' },
|
||||
{ field: 'planName', title: '普测计划名称' },
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planAddRef.value.open('计划审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -147,9 +147,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -1,362 +1,362 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监督类型">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 新增 -->
|
||||
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||
import planTest from './planTest.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
const planTestRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const auditList: any = ref([])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
filename: '技术监督测试管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||
{
|
||||
field: 'supvType',
|
||||
title: '监督类型',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvObjectName',
|
||||
minWidth: 130,
|
||||
title: '监督对象名称'
|
||||
},
|
||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||
{
|
||||
field: 'problemFlag',
|
||||
title: '是否存在问题',
|
||||
minWidth: 120,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'danger',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '合格',
|
||||
1: '存在问题',
|
||||
null: '待测试'
|
||||
}
|
||||
},
|
||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 140,
|
||||
custom: {
|
||||
0: 'warning',
|
||||
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 120,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 180,
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '测试填报',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status != 6
|
||||
},
|
||||
click: row => {
|
||||
add(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status == 6 || !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
// planTestRef.value.open('查看计划', row)
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('编辑', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.supvType = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// 新增计划
|
||||
const add = (id: string) => {
|
||||
planTestRef.value.open('计划测试填报', id, true)
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
const exportFn = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
queryPlan(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '计划', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelTest(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
getUserByRoleType(3).then(res => {
|
||||
auditList.value = res.data
|
||||
})
|
||||
})
|
||||
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
nextTick(() => {
|
||||
if (props.businessKey == '3') {
|
||||
planTestRef.value.open('编辑', fullId, false)
|
||||
} else {
|
||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="监督类型">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<!-- 新增 -->
|
||||
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||
import planTest from './planTest.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dictData = useDictData()
|
||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
const planTestRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const auditList: any = ref([])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
filename: '技术监督测试管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||
{
|
||||
field: 'supvType',
|
||||
title: '监督类型',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supvObjectName',
|
||||
minWidth: 130,
|
||||
title: '监督对象名称'
|
||||
},
|
||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||
{
|
||||
field: 'problemFlag',
|
||||
title: '是否存在问题',
|
||||
minWidth: 120,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'danger',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '合格',
|
||||
1: '存在问题',
|
||||
null: '待测试'
|
||||
}
|
||||
},
|
||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 140,
|
||||
custom: {
|
||||
0: 'warning',
|
||||
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 120,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 180,
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '测试填报',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status != 6
|
||||
},
|
||||
click: row => {
|
||||
add(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status == 6 || !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
// planTestRef.value.open('查看计划', row)
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('编辑', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.supvType = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// 新增计划
|
||||
const add = (id: string) => {
|
||||
planTestRef.value.open('计划测试填报', id, true)
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
const exportFn = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
queryPlan(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '计划', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelTest(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
getUserByRoleType(3).then(res => {
|
||||
auditList.value = res.data
|
||||
})
|
||||
})
|
||||
|
||||
const props = defineProps(['id', 'businessKey'])
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
nextTick(() => {
|
||||
if (props.businessKey == '3') {
|
||||
planTestRef.value.open('编辑', fullId, false)
|
||||
} else {
|
||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -61,7 +61,7 @@ const tableStore = new TableStore({
|
||||
{ field: 'recordTime', title: '建档时间' },
|
||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.relationUserName"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否已上传实测">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.aisFileUpload"
|
||||
clearable
|
||||
placeholder="请选择是否已上传实测"
|
||||
>
|
||||
<el-option label="否" value="0" />
|
||||
<el-option label="是" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{
|
||||
field: 'istatus',
|
||||
title: '实测报告状态',
|
||||
formatter: row => {
|
||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联干扰源用户">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.relationUserName"
|
||||
clearable
|
||||
placeholder="请选择关联干扰源用户"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否已上传实测">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.aisFileUpload"
|
||||
clearable
|
||||
placeholder="请选择是否已上传实测"
|
||||
>
|
||||
<el-option label="否" value="0" />
|
||||
<el-option label="是" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||
{
|
||||
field: 'istatus',
|
||||
title: '实测报告状态',
|
||||
formatter: row => {
|
||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.relationUserName = ''
|
||||
tableStore.table.params.aisFileUpload = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TableHeader datePicker nextFlag theCurrentTime showTimeAll showExport ref='TableHeaderRef'>
|
||||
<template #select>
|
||||
<el-form-item label='项目名称'>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称'></el-input>
|
||||
<el-input v-model='tableStore.table.params.projectName' placeholder='请输入项目名称' maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
@@ -188,9 +188,9 @@ const tableStore = new TableStore({
|
||||
},
|
||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 300,
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
|
||||
@@ -161,9 +161,9 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 180,
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="归口管理部门:" prop="responsibleDepartment">
|
||||
<el-input v-model="form.responsibleDepartment" autocomplete="off" placeholder="请输入归口管理部门" />
|
||||
<el-input v-model="form.responsibleDepartment" autocomplete="off" placeholder="请输入归口管理部门" maxlength="32" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="项目名称:" prop="projectName">
|
||||
<el-input v-model="form.projectName" autocomplete="off" placeholder="请输入项目名称" />
|
||||
<el-input v-model="form.projectName" autocomplete="off" placeholder="请输入项目名称" maxlength="32" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="用户状态:" prop="userStatus">
|
||||
<el-select v-model="form.userStatus" placeholder="请选择用户状态">
|
||||
@@ -45,7 +45,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="厂站名称:" prop="substation">
|
||||
<el-input v-model="form.substation" autocomplete="off" placeholder="请输入厂站名称" />
|
||||
<el-input v-model="form.substation" autocomplete="off" placeholder="请输入厂站名称" maxlength="32" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" v-if="form.userType == '0' || form.userType == '1'" label="用户协议容量:"
|
||||
prop="agreementCapacity">
|
||||
@@ -193,7 +193,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item for="-" v-if="form.userType != '0' && form.userType != '1'" label="预测评估评审单位:"
|
||||
prop="evaluationChekDept">
|
||||
<el-input v-model="form.evaluationChekDept" autocomplete="off" placeholder="请输入预测评估评审单位" />
|
||||
<el-input v-model="form.evaluationChekDept" autocomplete="off" placeholder="请输入预测评估评审单位" maxlength="32" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item for="-" label="预测评估结论:" prop="evaluationConclusion" style="width: 100%">
|
||||
<el-input type="textarea" v-model="form.evaluationConclusion" autocomplete="off"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<TableHeader datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称"></el-input>
|
||||
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入项目名称" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||
@@ -167,9 +167,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -160,7 +160,7 @@ import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import {download} from '@/utils/fileDownload'
|
||||
import {download} from '@/utils/fileDownLoad'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
|
||||
@@ -1,217 +1,217 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="技术监督计划实施问题"
|
||||
width="90%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
custom-class="fixed-dialog"
|
||||
@closed="close"
|
||||
> -->
|
||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||
<!-- <template #select>
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRefs" />
|
||||
<!-- </el-dialog> -->
|
||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||
import { getAreaList } from '@/api/common'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
defineOptions({
|
||||
name: 'PlanEffectProblem'
|
||||
})
|
||||
const emits = defineEmits([''])
|
||||
const props = defineProps({
|
||||
effectProblemForm: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const planId: any = ref('')
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const tableRefs = ref()
|
||||
//字典获取问题类型
|
||||
const problemTypeList = dictData.getBasicData('problem_type')
|
||||
//字典整改情况
|
||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||
//字典问题等级
|
||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||
const effectTableStore = new TableStore({
|
||||
url: '/supervision-boot/superProblem/pageProblem',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{
|
||||
field: 'problemDesc',
|
||||
title: '问题描述',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevel',
|
||||
title: '问题等级',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevelReason',
|
||||
title: '定级依据',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '问题类型',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||
{
|
||||
field: 'rectificationStatus',
|
||||
title: '整改情况',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'rectificationTime',
|
||||
title: '整改时间',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.replace('T', ' ')
|
||||
}
|
||||
},
|
||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDetail(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return true
|
||||
},
|
||||
click: row => {
|
||||
handleEdit(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
const { query } = useRoute() // 查询参数
|
||||
const { go } = useRouter() // 路由
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
planId.value = queryId
|
||||
watch(
|
||||
() => queryId,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
effectTableStore.table.params.planId = val
|
||||
effectTableStore.index()
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
provide('tableStore', effectTableStore)
|
||||
const open = () => {
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
const close = () => {
|
||||
dialogFormVisible.value = false
|
||||
// emits('onSubmit')
|
||||
}
|
||||
//新增
|
||||
const addFormRef = ref()
|
||||
const addFormModel = () => {
|
||||
addFormRef.value.open({}, 'add')
|
||||
}
|
||||
//详情
|
||||
const handleDetail = (row: any) => {
|
||||
addFormRef.value.open(row, 'detail')
|
||||
}
|
||||
//修改
|
||||
const handleEdit = (row: any) => {
|
||||
console.log(row)
|
||||
}
|
||||
onMounted(() => {})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<!-- <el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="技术监督计划实施问题"
|
||||
width="90%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
custom-class="fixed-dialog"
|
||||
@closed="close"
|
||||
> -->
|
||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||
<!-- <template #select>
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地市">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRefs" />
|
||||
<!-- </el-dialog> -->
|
||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||
import { getAreaList } from '@/api/common'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
defineOptions({
|
||||
name: 'PlanEffectProblem'
|
||||
})
|
||||
const emits = defineEmits([''])
|
||||
const props = defineProps({
|
||||
effectProblemForm: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const planId: any = ref('')
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const tableRefs = ref()
|
||||
//字典获取问题类型
|
||||
const problemTypeList = dictData.getBasicData('problem_type')
|
||||
//字典整改情况
|
||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||
//字典问题等级
|
||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||
const effectTableStore = new TableStore({
|
||||
url: '/supervision-boot/superProblem/pageProblem',
|
||||
// publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{
|
||||
field: 'problemDesc',
|
||||
title: '问题描述',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevel',
|
||||
title: '问题等级',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemLevelReason',
|
||||
title: '定级依据',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '问题类型',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||
{
|
||||
field: 'rectificationStatus',
|
||||
title: '整改情况',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'rectificationTime',
|
||||
title: '整改时间',
|
||||
minWidth: 170,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue.replace('T', ' ')
|
||||
}
|
||||
},
|
||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 150,
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDetail(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '修改',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return true
|
||||
},
|
||||
click: row => {
|
||||
handleEdit(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||
}
|
||||
})
|
||||
const { query } = useRoute() // 查询参数
|
||||
const { go } = useRouter() // 路由
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
planId.value = queryId
|
||||
watch(
|
||||
() => queryId,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
effectTableStore.table.params.planId = val
|
||||
effectTableStore.index()
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
provide('tableStore', effectTableStore)
|
||||
const open = () => {
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
const close = () => {
|
||||
dialogFormVisible.value = false
|
||||
// emits('onSubmit')
|
||||
}
|
||||
//新增
|
||||
const addFormRef = ref()
|
||||
const addFormModel = () => {
|
||||
addFormRef.value.open({}, 'add')
|
||||
}
|
||||
//详情
|
||||
const handleDetail = (row: any) => {
|
||||
addFormRef.value.open(row, 'detail')
|
||||
}
|
||||
//修改
|
||||
const handleEdit = (row: any) => {
|
||||
console.log(row)
|
||||
}
|
||||
onMounted(() => {})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
@@ -176,9 +176,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: 300,
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -1,382 +1,384 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、监测点"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<monitor-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'监测点状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
||||
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
|
||||
// }
|
||||
tableStore.table.params.deviceType = 2
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.status = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||
}
|
||||
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template #select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、监测点"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<monitor-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'监测点状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
||||
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '投运',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
|
||||
// }
|
||||
tableStore.table.params.deviceType = 2
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.status = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||
}
|
||||
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -1,378 +1,381 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、终端"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'终端状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
// }
|
||||
tableStore.table.params.deviceType = 1
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="流程状态">
|
||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||
<el-option
|
||||
v-for="item in statusSelect"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
placeholder="输入变电站、终端"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const deviceQuitPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'终端状态管理',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '变更前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '目标状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info',
|
||||
null: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运',
|
||||
null: '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('编辑', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
// }
|
||||
tableStore.table.params.deviceType = 1
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.devOriginalStatus =
|
||||
item.devOriginalStatus == 0
|
||||
? '运行'
|
||||
: item.devOriginalStatus == 1
|
||||
? '检修'
|
||||
: item.devOriginalStatus == 2
|
||||
? '停运'
|
||||
: item.devOriginalStatus == 3
|
||||
? '调试'
|
||||
: item.devOriginalStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.devStatus =
|
||||
item.devStatus == 0
|
||||
? '运行'
|
||||
: item.devStatus == 1
|
||||
? '检修'
|
||||
: item.devStatus == 2
|
||||
? '停运'
|
||||
: item.devStatus == 3
|
||||
? '调试'
|
||||
: item.devStatus == 4
|
||||
? '退运'
|
||||
: '/'
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: item.status == 4
|
||||
? '已取消'
|
||||
: item.status == 5
|
||||
? '新增'
|
||||
: '/'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运终端信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getRunningDeviceById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
deviceQuitPopup.value.open('重新发起', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -221,11 +221,11 @@ const tableStore = new TableStore({
|
||||
// },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
|
||||
@@ -138,11 +138,11 @@ const tableStore = new TableStore({
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
|
||||
@@ -1,214 +1,214 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
<MyEChart style="flex: 1.2" :options="options1" />
|
||||
<MyEChart style="flex: 2" :options="options2" />
|
||||
</div>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { info } from 'console'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
const options1 = ref({})
|
||||
const options2 = ref({})
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 345,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '事务名称' },
|
||||
{ field: 'type', title: '事务类型' },
|
||||
{ field: 'createUser', title: '创建人员' },
|
||||
{ field: 'companyName', title: '创建部门' },
|
||||
{ field: 'modifyUser', title: '处理人员' },
|
||||
{ field: 'modifyTime', title: '处理时间' },
|
||||
{ field: 'progressTime', title: '进行时间(天)' },
|
||||
{ field: 'progress', title: '流程状态' },
|
||||
{ field: 'alertType', title: '预警类型' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '上传',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
info()
|
||||
})
|
||||
//渲染图表
|
||||
const info = () => {
|
||||
options1.value = {
|
||||
title: {
|
||||
text: '商务类型',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: ['全部', '预警单', '告警单']
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
title: {
|
||||
text: '事务流程',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: [
|
||||
'全部',
|
||||
'开始',
|
||||
'预/告警单下发',
|
||||
'预/告警单反馈',
|
||||
'现场测试',
|
||||
'整改通知单下发',
|
||||
'整改通知单反馈',
|
||||
'完结'
|
||||
]
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
height: 280px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
<MyEChart style="flex: 1.2" :options="options1" />
|
||||
<MyEChart style="flex: 2" :options="options2" />
|
||||
</div>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { info } from 'console'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
const options1 = ref({})
|
||||
const options2 = ref({})
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 345,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '事务名称' },
|
||||
{ field: 'type', title: '事务类型' },
|
||||
{ field: 'createUser', title: '创建人员' },
|
||||
{ field: 'companyName', title: '创建部门' },
|
||||
{ field: 'modifyUser', title: '处理人员' },
|
||||
{ field: 'modifyTime', title: '处理时间' },
|
||||
{ field: 'progressTime', title: '进行时间(天)' },
|
||||
{ field: 'progress', title: '流程状态' },
|
||||
{ field: 'alertType', title: '预警类型' },
|
||||
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '上传',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
info()
|
||||
})
|
||||
//渲染图表
|
||||
const info = () => {
|
||||
options1.value = {
|
||||
title: {
|
||||
text: '商务类型',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: ['全部', '预警单', '告警单']
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
options2.value = {
|
||||
title: {
|
||||
text: '事务流程',
|
||||
x: 'center',
|
||||
textStyle: {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
data: [
|
||||
'全部',
|
||||
'开始',
|
||||
'预/告警单下发',
|
||||
'预/告警单反馈',
|
||||
'现场测试',
|
||||
'整改通知单下发',
|
||||
'整改通知单反馈',
|
||||
'完结'
|
||||
]
|
||||
}
|
||||
],
|
||||
yAxis: [{}],
|
||||
series: [
|
||||
{
|
||||
name: '数量',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30, //最大宽度
|
||||
data: [
|
||||
{
|
||||
value: 9,
|
||||
id: ''
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
height: 280px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,188 +1,188 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事务类型:">
|
||||
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
||||
<el-option
|
||||
v-for="item in affairs"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属流程:">
|
||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
||||
<el-option
|
||||
v-for="item in process"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const process = [
|
||||
{
|
||||
name: '开始',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '预/告警单下发',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '反馈单上传',
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
name: '现场测试',
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
name: '整改通知单下发',
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
name: '整改通知单反馈',
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
name: '完结',
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
const affairs = [
|
||||
{
|
||||
name: '预警单',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '告警单',
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '名称' },
|
||||
{
|
||||
field: 'grade',
|
||||
title: '等级'
|
||||
},
|
||||
{ field: 'bigType', title: '策略选择' },
|
||||
{ field: 'updateBy', title: '更新人员' },
|
||||
{ field: 'updateTime', title: '更新时间' },
|
||||
{
|
||||
field: 'state',
|
||||
title: '状态',
|
||||
activeValue: '2',
|
||||
inactiveValue: '1',
|
||||
render: 'switch',
|
||||
onChangeField: (row: any, value) => {
|
||||
console.log('🚀 ~ row:', 444123, value)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '绑定',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
click: row => {
|
||||
removeUse({ userIds: row.userId }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请选择筛选数据"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事务类型:">
|
||||
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
||||
<el-option
|
||||
v-for="item in affairs"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属流程:">
|
||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
||||
<el-option
|
||||
v-for="item in process"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
const process = [
|
||||
{
|
||||
name: '开始',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '预/告警单下发',
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '反馈单上传',
|
||||
id: '2'
|
||||
},
|
||||
{
|
||||
name: '现场测试',
|
||||
id: '3'
|
||||
},
|
||||
{
|
||||
name: '整改通知单下发',
|
||||
id: '4'
|
||||
},
|
||||
{
|
||||
name: '整改通知单反馈',
|
||||
id: '5'
|
||||
},
|
||||
{
|
||||
name: '完结',
|
||||
id: '6'
|
||||
}
|
||||
]
|
||||
const affairs = [
|
||||
{
|
||||
name: '预警单',
|
||||
id: '0'
|
||||
},
|
||||
{
|
||||
name: '告警单',
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'name', title: '名称' },
|
||||
{
|
||||
field: 'grade',
|
||||
title: '等级'
|
||||
},
|
||||
{ field: 'bigType', title: '策略选择' },
|
||||
{ field: 'updateBy', title: '更新人员' },
|
||||
{ field: 'updateTime', title: '更新时间' },
|
||||
{
|
||||
field: 'state',
|
||||
title: '状态',
|
||||
activeValue: '2',
|
||||
inactiveValue: '1',
|
||||
render: 'switch',
|
||||
onChangeField: (row: any, value) => {
|
||||
console.log('🚀 ~ row:', 444123, value)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '绑定',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: '',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除?'
|
||||
},
|
||||
click: row => {
|
||||
removeUse({ userIds: row.userId }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
title.value = '新增告警单'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user