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'
|
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'
|
import createAxios from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
//事件报告
|
|
||||||
export function getEventReport(data) {
|
//事件报告
|
||||||
return createAxios({
|
export function getEventReport(data) {
|
||||||
url: '/event-boot/report/getEventReport',
|
return createAxios({
|
||||||
method: 'post',
|
url: '/event-boot/report/getEventReport',
|
||||||
data
|
method: 'post',
|
||||||
})
|
data
|
||||||
}
|
})
|
||||||
// 生成报告
|
}
|
||||||
export function getAreaReport(data) {
|
// 生成报告
|
||||||
return createAxios({
|
export function getAreaReport(data) {
|
||||||
url: '/event-boot/report/getAreaReport',
|
return createAxios({
|
||||||
method: 'post',
|
url: '/event-boot/report/getAreaReport',
|
||||||
data,
|
method: 'post',
|
||||||
responseType: 'blob'
|
data,
|
||||||
})
|
responseType: 'blob'
|
||||||
}
|
}).then(async res => {
|
||||||
//查询所有模板
|
let load: any = await readJsonBlob(res)
|
||||||
export function getList(data) {
|
if (load.code) {
|
||||||
return createAxios({
|
if (load.data.code == 'A0011') {
|
||||||
url: '/system-boot/EventTemplate/getList',
|
ElMessage.warning('下载失败!')
|
||||||
method: 'post',
|
} else {
|
||||||
data
|
ElMessage.warning(load.data.message)
|
||||||
})
|
}
|
||||||
}
|
} else {
|
||||||
export function selectReleation(data) {
|
return res
|
||||||
return createAxios({
|
}
|
||||||
url: '/system-boot/EventTemplate/selectReleation',
|
})
|
||||||
method: 'post',
|
}
|
||||||
params: data
|
async function readJsonBlob(blob) {
|
||||||
})
|
try {
|
||||||
}
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
export function getLineExport(data) {
|
const jsonStr = await blob.text()
|
||||||
return createAxios({
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
url: '/event-boot/report/getLineExport',
|
const jsonData = JSON.parse(jsonStr)
|
||||||
method: 'post',
|
// 3. 拿到数据,后续随便用
|
||||||
data: data,
|
return {
|
||||||
responseType: 'blob'
|
code: true,
|
||||||
})
|
data: jsonData
|
||||||
}
|
}
|
||||||
export function getVoltage(data: any) {
|
} catch (err) {
|
||||||
return createAxios({
|
return {
|
||||||
url: '/event-boot/report/getVoltage',
|
code: false,
|
||||||
method: 'post',
|
data: {}
|
||||||
data
|
}
|
||||||
})
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
}
|
}
|
||||||
export function getGeneralSituation(data: any) {
|
}
|
||||||
return createAxios({
|
|
||||||
url: '/event-boot/report/getGeneralSituation',
|
//查询所有模板
|
||||||
method: 'post',
|
export function getList(data) {
|
||||||
data
|
return createAxios({
|
||||||
})
|
url: '/system-boot/EventTemplate/getList',
|
||||||
}
|
method: 'post',
|
||||||
export function getTransientValue(data: any) {
|
data
|
||||||
return createAxios({
|
})
|
||||||
url: '/event-boot/transient/getTransientValue',
|
}
|
||||||
method: 'post',
|
export function selectReleation(data) {
|
||||||
data
|
return createAxios({
|
||||||
})
|
url: '/system-boot/EventTemplate/selectReleation',
|
||||||
}
|
method: 'post',
|
||||||
// 周报导出
|
params: data
|
||||||
export function getExport(data: any) {
|
})
|
||||||
return createAxios({
|
}
|
||||||
url: '/event-boot/report/getExport',
|
export function getLineExport(data) {
|
||||||
method: 'post',
|
return createAxios({
|
||||||
data,
|
url: '/event-boot/report/getLineExport',
|
||||||
responseType: 'blob'
|
method: 'post',
|
||||||
})
|
data: data,
|
||||||
}
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getVoltage(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getVoltage',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getGeneralSituation(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getGeneralSituation',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getTransientValue(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/transient/getTransientValue',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 周报导出
|
||||||
|
export function getExport(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/event-boot/report/getExport',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,18 +1,48 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
export function getHistoryResult(data: any) {
|
export function getHistoryResult(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/harmonic-boot/harmonic/getHistoryResult',
|
url: '/harmonic-boot/harmonic/getHistoryResult',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// word报告
|
// word报告
|
||||||
export function exportModelJB(data: any) {
|
export function exportModelJB(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/harmonic-boot/exportmodel/exportModelJB',
|
url: '/harmonic-boot/exportmodel/exportModelJB',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
data: data
|
data: data
|
||||||
})
|
}).then(async res => {
|
||||||
}
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
|
|
||||||
export function exportModel(data: any) {
|
export function exportModel(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -6,6 +7,17 @@ export function exportModel(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function areaHarmonicReport(data: any) {
|
export function areaHarmonicReport(data: any) {
|
||||||
@@ -14,5 +26,35 @@ export function areaHarmonicReport(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const uploadFile = (file: any, path: string) => {
|
|||||||
data: form
|
data: form
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == `A0000`) {
|
if (res.code == `A0000`) {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('文件上传成功!')
|
||||||
return res
|
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'
|
// import { nextTick } from 'process'
|
||||||
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
||||||
color[0] = config.layout.elementUiPrimary[0]
|
color[0] = config.layout.elementUiPrimary[0]
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
|
|
||||||
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ const fetchConfig = async (name: string) => {
|
|||||||
// fetchConfig()
|
// fetchConfig()
|
||||||
|
|
||||||
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
||||||
onMounted(() => {})
|
|
||||||
|
|
||||||
const GetEchar = async (name: string) => {
|
const GetEchar = async (name: string) => {
|
||||||
let chartDom = document.getElementById('chartMap')
|
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)
|
name == dictData.state.area?.[0].name ? (showCircle.value = false) : (showCircle.value = true)
|
||||||
|
|
||||||
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
|
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
title: {
|
title: {
|
||||||
left: 'center',
|
left: 'center',
|
||||||
@@ -99,6 +99,7 @@ const GetEchar = async (name: string) => {
|
|||||||
// top: 10,
|
// top: 10,
|
||||||
// bottom: 0,
|
// bottom: 0,
|
||||||
roam: true,
|
roam: true,
|
||||||
|
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
@@ -178,6 +179,7 @@ const GetEchar = async (name: string) => {
|
|||||||
}, 0)
|
}, 0)
|
||||||
window.addEventListener('resize', resizeHandler)
|
window.addEventListener('resize', resizeHandler)
|
||||||
const flag1 = ref(true)
|
const flag1 = ref(true)
|
||||||
|
|
||||||
// 点击事件
|
// 点击事件
|
||||||
myCharts.value.off('click')
|
myCharts.value.off('click')
|
||||||
myCharts.value.on('click', (e: any) => {
|
myCharts.value.on('click', (e: any) => {
|
||||||
|
|||||||
@@ -1,441 +1,441 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<div>
|
<div>
|
||||||
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
||||||
<div class="bx" id="wave"></div>
|
<div class="bx" id="wave"></div>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||||
<el-table stripe :data="Data" :height="height" border style="width: 100%"
|
<el-table stripe :data="Data" :height="height" border style="width: 100%"
|
||||||
header-cell-class-name="table_header">
|
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>
|
||||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
<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="A相"></el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="B相"></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 align="center" prop="number" label="C相"></el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
<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="A相"></el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="B相"></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 align="center" prop="number" label="C相"></el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
<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="A相"></el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="B相"></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 align="center" prop="number" label="C相"></el-table-column>
|
||||||
</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="总分段数目"></el-table-column>
|
||||||
<el-table-column align="center" prop="number" label="三相电压不平衡度(%)" width="180"></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-column align="center" prop="number" label="暂降原因"></el-table-column>
|
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { downloadWaveFile, getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
import { downloadWaveFile, getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import url from '@/assets/img/point.png'
|
import url from '@/assets/img/point.png'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
flag: {
|
flag: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
DColor: {
|
DColor: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
boxoList: {
|
boxoList: {
|
||||||
type: [Object, Array]
|
type: [Object, Array]
|
||||||
},
|
},
|
||||||
GJList: {
|
GJList: {
|
||||||
type: [Object, Array]
|
type: [Object, Array]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
|
||||||
valA: 0,
|
valA: 0,
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
time: '',
|
time: '',
|
||||||
type: '',
|
type: '',
|
||||||
severity: '',
|
severity: '',
|
||||||
iphasic: '',
|
iphasic: '',
|
||||||
eventValue: '',
|
eventValue: '',
|
||||||
persistTime: '',
|
persistTime: '',
|
||||||
lineName: '',
|
lineName: '',
|
||||||
subName: '',
|
subName: '',
|
||||||
waveDatas: [],
|
waveDatas: [],
|
||||||
|
|
||||||
Data: [],
|
Data: [],
|
||||||
height: null,
|
height: null,
|
||||||
vhh: null,
|
vhh: null,
|
||||||
ptpass: '',
|
ptpass: '',
|
||||||
waveHeight: undefined,
|
waveHeight: undefined,
|
||||||
$wave: undefined,
|
$wave: undefined,
|
||||||
color: '#006565',
|
color: '#006565',
|
||||||
charts: {},
|
charts: {},
|
||||||
arrpoints: [],
|
arrpoints: [],
|
||||||
titles: '',
|
titles: '',
|
||||||
vh: null,
|
vh: null,
|
||||||
vw: null,
|
vw: null,
|
||||||
zoom: ''
|
zoom: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() { },
|
created() { },
|
||||||
watch: {
|
watch: {
|
||||||
value: function (a, b) {
|
value: function (a, b) {
|
||||||
if (a == 2) {
|
if (a == 2) {
|
||||||
// $("#wave1").remove();
|
// $("#wave1").remove();
|
||||||
this.initWaves()
|
this.initWaves()
|
||||||
} else {
|
} else {
|
||||||
$('#wave1').remove()
|
$('#wave1').remove()
|
||||||
this.initWaves()
|
this.initWaves()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.setHeight()
|
this.setHeight()
|
||||||
window.addEventListener('resize', this.setHeight)
|
window.addEventListener('resize', this.setHeight)
|
||||||
this.$wave = $('#wave').eq(0)
|
this.$wave = $('#wave').eq(0)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.query()
|
this.query()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('resize', this.setHeight)
|
window.removeEventListener('resize', this.setHeight)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setHeight() {
|
setHeight() {
|
||||||
this.zoom = 1 / document.body.style.zoom
|
this.zoom = 1 / document.body.style.zoom
|
||||||
if (this.flag) {
|
if (this.flag) {
|
||||||
// console.log(123);
|
// console.log(123);
|
||||||
this.vh = mainHeight(250).height
|
this.vh = mainHeight(250).height
|
||||||
} else {
|
} else {
|
||||||
// console.log(3333);
|
// console.log(3333);
|
||||||
this.vh = mainHeight(270).height
|
this.vh = mainHeight(270).height
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
query() {
|
query() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.initWave()
|
this.initWave()
|
||||||
},
|
},
|
||||||
|
|
||||||
//开始画图
|
//开始画图
|
||||||
initWave() {
|
initWave() {
|
||||||
//清除之前增加的div
|
//清除之前增加的div
|
||||||
// $("#wave ~ .bx1").remove();
|
// $("#wave ~ .bx1").remove();
|
||||||
$('div.bx1').remove()
|
$('div.bx1').remove()
|
||||||
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
||||||
// var height = $(window).height() - 90;
|
// var height = $(window).height() - 90;
|
||||||
var picHeight
|
var picHeight
|
||||||
var show = true
|
var show = true
|
||||||
|
|
||||||
//var v = $("#interval").val();
|
//var v = $("#interval").val();
|
||||||
var isvisible = false
|
var isvisible = false
|
||||||
|
|
||||||
picHeight = this.vh
|
picHeight = this.vh
|
||||||
// this.$wave.css('height', picHeight)
|
// this.$wave.css('height', picHeight)
|
||||||
// this.$wave.css('width', '100%')
|
// this.$wave.css('width', '100%')
|
||||||
$('#wave').css('height', picHeight)
|
$('#wave').css('height', picHeight)
|
||||||
$('#wave').css('width', this.vw)
|
$('#wave').css('width', this.vw)
|
||||||
|
|
||||||
var adata = []
|
var adata = []
|
||||||
var bdata = []
|
var bdata = []
|
||||||
var cdata = []
|
var cdata = []
|
||||||
var max = 0
|
var max = 0
|
||||||
var min = 0
|
var min = 0
|
||||||
//绘制横向第一个波形图
|
//绘制横向第一个波形图
|
||||||
this.GJList.smp_x.forEach((item, ind) => {
|
this.GJList.smp_x.forEach((item, ind) => {
|
||||||
if (this.GJList.smp_a[ind] > max) {
|
if (this.GJList.smp_a[ind] > max) {
|
||||||
max = this.GJList.smp_a[ind]
|
max = this.GJList.smp_a[ind]
|
||||||
} else if (this.GJList.smp_a[ind] < min) {
|
} else if (this.GJList.smp_a[ind] < min) {
|
||||||
min = this.GJList.smp_a[ind]
|
min = this.GJList.smp_a[ind]
|
||||||
}
|
}
|
||||||
if (this.GJList.smp_b[ind] > max) {
|
if (this.GJList.smp_b[ind] > max) {
|
||||||
max = this.GJList.smp_b[ind]
|
max = this.GJList.smp_b[ind]
|
||||||
} else if (this.GJList.smp_b[ind] < min) {
|
} else if (this.GJList.smp_b[ind] < min) {
|
||||||
min = this.GJList.smp_b[ind]
|
min = this.GJList.smp_b[ind]
|
||||||
}
|
}
|
||||||
if (this.GJList.smp_c[ind] > max) {
|
if (this.GJList.smp_c[ind] > max) {
|
||||||
max = this.GJList.smp_c[ind]
|
max = this.GJList.smp_c[ind]
|
||||||
} else if (this.GJList.smp_c[ind] < min) {
|
} else if (this.GJList.smp_c[ind] < min) {
|
||||||
min = this.GJList.smp_c[ind]
|
min = this.GJList.smp_c[ind]
|
||||||
}
|
}
|
||||||
|
|
||||||
adata.push([item, this.GJList.smp_a[ind]])
|
adata.push([item, this.GJList.smp_a[ind]])
|
||||||
bdata.push([item, this.GJList.smp_b[ind]])
|
bdata.push([item, this.GJList.smp_b[ind]])
|
||||||
cdata.push([item, this.GJList.smp_c[ind]])
|
cdata.push([item, this.GJList.smp_c[ind]])
|
||||||
})
|
})
|
||||||
//绘制瞬时波形图
|
//绘制瞬时波形图
|
||||||
// const echarts = require('echarts')
|
// const echarts = require('echarts')
|
||||||
let wave = document.getElementById('wave')
|
let wave = document.getElementById('wave')
|
||||||
let _this = this
|
let _this = this
|
||||||
var myChartes = echarts.init(wave)
|
var myChartes = echarts.init(wave)
|
||||||
let echartsColor = {
|
let echartsColor = {
|
||||||
WordColor: '#000',
|
WordColor: '#000',
|
||||||
thread: '#000000',
|
thread: '#000000',
|
||||||
FigureColor: [
|
FigureColor: [
|
||||||
'#07CCCA ',
|
'#07CCCA ',
|
||||||
'#00BFF5',
|
'#00BFF5',
|
||||||
'#FFBF00',
|
'#FFBF00',
|
||||||
'#77DA63',
|
'#77DA63',
|
||||||
'#D5FF6B',
|
'#D5FF6B',
|
||||||
'#Ff6600',
|
'#Ff6600',
|
||||||
'#FF9100',
|
'#FF9100',
|
||||||
'#5B6E96',
|
'#5B6E96',
|
||||||
'#66FFCC',
|
'#66FFCC',
|
||||||
'#B3B3B3',
|
'#B3B3B3',
|
||||||
'#FF00FF',
|
'#FF00FF',
|
||||||
'#CC00FF',
|
'#CC00FF',
|
||||||
'#FF9999'
|
'#FF9999'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
top: '10px',
|
top: '10px',
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
borderColor: 'grey',
|
borderColor: 'grey',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
style: {
|
style: {
|
||||||
color: '#000',
|
color: '#000',
|
||||||
fontSize: '15px',
|
fontSize: '15px',
|
||||||
padding: 10
|
padding: 10
|
||||||
},
|
},
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
// console.log(params)
|
// console.log(params)
|
||||||
var tips = ''
|
var tips = ''
|
||||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||||
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
for (var i = 0; i < params.length; i++) {
|
||||||
if (params[i].seriesName != '暂降触发点') {
|
if (params[i].seriesName != '暂降触发点') {
|
||||||
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tips
|
return tips
|
||||||
},
|
},
|
||||||
// axisPointer: {
|
// axisPointer: {
|
||||||
// type: "cross",
|
// type: "cross",
|
||||||
// label: {
|
// label: {
|
||||||
// color: "#fff",
|
// color: "#fff",
|
||||||
// fontSize: 16,
|
// fontSize: 16,
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
opacity: 0.35,
|
opacity: 0.35,
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||||
borderWidth: 0
|
borderWidth: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
title: {
|
title: {
|
||||||
left: 'center',
|
left: 'center',
|
||||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: '5%',
|
left: '5%',
|
||||||
top: '20',
|
top: '20',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
enabled: true,
|
enabled: true,
|
||||||
itemDistance: 5,
|
itemDistance: 5,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
verticalAlign: 'middle'
|
verticalAlign: 'middle'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
padding: [2, 0, 0, 0] //[上、右、下、左]
|
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: false,
|
show: false,
|
||||||
feature: {
|
feature: {
|
||||||
//restore: {},
|
//restore: {},
|
||||||
saveAsImage: {
|
saveAsImage: {
|
||||||
iconStyle: {
|
iconStyle: {
|
||||||
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '时刻',
|
name: '时刻',
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
min: this.GJList.smp_x[0],
|
min: this.GJList.smp_x[0],
|
||||||
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
||||||
title: {
|
title: {
|
||||||
text: 'ms',
|
text: 'ms',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
align: 'high'
|
align: 'high'
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
alignWithLabel: true
|
alignWithLabel: true
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||||
},
|
},
|
||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
if (_this.valA != (value - 0).toFixed(0)) {
|
if (_this.valA != (value - 0).toFixed(0)) {
|
||||||
_this.valA = (value - 0).toFixed(0)
|
_this.valA = (value - 0).toFixed(0)
|
||||||
return (value - 0).toFixed(0)
|
return (value - 0).toFixed(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//rotate:39
|
//rotate:39
|
||||||
}
|
}
|
||||||
// data: this.syncExtremes,
|
// data: this.syncExtremes,
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: 'kV',
|
name: 'kV',
|
||||||
title: {
|
title: {
|
||||||
align: 'high',
|
align: 'high',
|
||||||
offset: 0,
|
offset: 0,
|
||||||
text: 'kV',
|
text: 'kV',
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
y: -10
|
y: -10
|
||||||
},
|
},
|
||||||
|
|
||||||
boundaryGap: [0, '100%'],
|
boundaryGap: [0, '100%'],
|
||||||
showLastLabel: true,
|
showLastLabel: true,
|
||||||
max: (max + 10).toFixed(2),
|
max: (max + 10).toFixed(2),
|
||||||
min: (min - 10).toFixed(2),
|
min: (min - 10).toFixed(2),
|
||||||
opposite: false,
|
opposite: false,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
//minInterval: 1,
|
//minInterval: 1,
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||||
},
|
},
|
||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
return (value - 0).toFixed(2)
|
return (value - 0).toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
// 使用深浅的间隔色
|
// 使用深浅的间隔色
|
||||||
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
||||||
type: 'dashed',
|
type: 'dashed',
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '1%',
|
left: '1%',
|
||||||
right: '40px',
|
right: '40px',
|
||||||
bottom: '40px',
|
bottom: '40px',
|
||||||
top: '55px',
|
top: '55px',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
type: 'inside',
|
type: 'inside',
|
||||||
height: 13,
|
height: 13,
|
||||||
start: 0,
|
start: 0,
|
||||||
bottom: '20px',
|
bottom: '20px',
|
||||||
end: 100
|
end: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
start: 0,
|
start: 0,
|
||||||
height: 13,
|
height: 13,
|
||||||
bottom: '20px',
|
bottom: '20px',
|
||||||
end: 100
|
end: 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: 'A相',
|
name: 'A相',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'lttb',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#DAA520'
|
color: '#DAA520'
|
||||||
},
|
},
|
||||||
data: adata
|
data: adata
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'B相',
|
name: 'B相',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'lttb',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#2E8B57'
|
color: '#2E8B57'
|
||||||
},
|
},
|
||||||
data: bdata
|
data: bdata
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'C相',
|
name: 'C相',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
sampling: 'lttb',
|
sampling: 'lttb',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#A52a2a'
|
color: '#A52a2a'
|
||||||
},
|
},
|
||||||
data: cdata
|
data: cdata
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '暂降触发点',
|
name: '暂降触发点',
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
symbol: 'image://' + url,
|
symbol: 'image://' + url,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16
|
height: 16
|
||||||
},
|
},
|
||||||
data: [[0, min]]
|
data: [[0, min]]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
myChartes.setOption(option)
|
myChartes.setOption(option)
|
||||||
// window.echartsArr.push(myChartes)
|
// window.echartsArr.push(myChartes)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
myChartes.resize()
|
myChartes.resize()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}, 400)
|
}, 400)
|
||||||
|
|
||||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||||
|
|
||||||
// let waveDatasTemp = waveDatas.slice(1);
|
// let waveDatasTemp = waveDatas.slice(1);
|
||||||
// waveDatasTemp.reverse();
|
// waveDatasTemp.reverse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||||
<div style="display: flex; align-items: center" class="mb10">
|
<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>
|
<template #prefix>
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
{{ Math.floor(row.eventValue * 10000) / 100 }}
|
{{ Math.floor(row.eventValue * 10000) / 100 }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="eventType" width="100px" title="暂降类型">
|
<vxe-column field="eventType" width="100px" title="触发类型">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ event.filter(item => item.id == row.eventType)[0]?.name || '/' }}
|
{{ event.filter(item => item.id == row.eventType)[0]?.name || '/' }}
|
||||||
</template>
|
</template>
|
||||||
@@ -79,7 +79,7 @@ const init = async () => {
|
|||||||
// 设置消息接收回调
|
// 设置消息接收回调
|
||||||
mqttClient.onMessage((topic, message) => {
|
mqttClient.onMessage((topic, message) => {
|
||||||
const msg = JSON.parse(message.toString())
|
const msg = JSON.parse(message.toString())
|
||||||
// console.log('🚀 ~ init ~ msg:', msg)
|
// console.log('🚀 ~ init ~ msg:', msg)
|
||||||
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
||||||
drawer.value = true
|
drawer.value = true
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
|
|||||||
@@ -1,109 +1,117 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
|
<el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||||
<el-form-item label="校验密码:" prop="password">
|
<el-form-item label="校验密码:" prop="password">
|
||||||
<el-input v-model="form.password" type="password" placeholder="请输入校验密码" show-password />
|
<el-input v-model="form.password" type="password" placeholder="请输入校验密码" show-password />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
|
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
|
||||||
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码" show-password />
|
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码" show-password />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
|
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
|
||||||
<el-input v-model="form.confirmPwd" type="password" placeholder="请输入确认密码" show-password />
|
<el-input v-model="form.confirmPwd" type="password" placeholder="请输入确认密码" show-password />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, inject } from 'vue'
|
import { ref, inject } from 'vue'
|
||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
||||||
import { validatePwd } from '@/utils/common'
|
import { validatePwd } from '@/utils/common'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import router from '@/router'
|
||||||
const adminInfo = useAdminInfo()
|
import { useNavTabs } from '@/stores/navTabs'
|
||||||
const dialogVisible = ref(false)
|
const navTabs = useNavTabs()
|
||||||
const title = ref('修改密码')
|
const adminInfo = useAdminInfo()
|
||||||
const formRef = ref()
|
const dialogVisible = ref(false)
|
||||||
// 注意不要和表单ref的命名冲突
|
const title = ref('修改密码')
|
||||||
const form = reactive({
|
const formRef = ref()
|
||||||
password: '',
|
// 注意不要和表单ref的命名冲突
|
||||||
newPwd: '',
|
const form = reactive({
|
||||||
confirmPwd: ''
|
password: '',
|
||||||
})
|
newPwd: '',
|
||||||
const rules = {
|
confirmPwd: ''
|
||||||
password: [
|
})
|
||||||
{ required: true, message: '请输入校验密码', trigger: 'blur' },
|
const rules = {
|
||||||
{
|
password: [
|
||||||
min: 6,
|
{ required: true, message: '请输入校验密码', trigger: 'blur' },
|
||||||
max: 12,
|
{
|
||||||
message: '长度在 6 到 12 个字符',
|
min: 6,
|
||||||
trigger: 'blur'
|
max: 12,
|
||||||
}
|
message: '长度在 6 到 12 个字符',
|
||||||
],
|
trigger: 'blur'
|
||||||
newPwd: [
|
}
|
||||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
],
|
||||||
{
|
newPwd: [
|
||||||
min: 6,
|
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||||
max: 12,
|
{
|
||||||
message: '长度在 6 到 12 个字符',
|
min: 6,
|
||||||
trigger: 'blur'
|
max: 12,
|
||||||
},
|
message: '长度在 6 到 12 个字符',
|
||||||
{ validator: validatePwd, trigger: 'blur' }
|
trigger: 'blur'
|
||||||
],
|
},
|
||||||
confirmPwd: [
|
{ validator: validatePwd, trigger: 'blur' }
|
||||||
{ required: true, message: '请确认密码', trigger: 'blur' },
|
],
|
||||||
{
|
confirmPwd: [
|
||||||
min: 6,
|
{ required: true, message: '请确认密码', trigger: 'blur' },
|
||||||
max: 12,
|
{
|
||||||
message: '长度在 6 到 12 个字符',
|
min: 6,
|
||||||
trigger: 'blur'
|
max: 12,
|
||||||
},
|
message: '长度在 6 到 12 个字符',
|
||||||
{
|
trigger: 'blur'
|
||||||
validator: (rule: any, value: string, callback: any) => {
|
},
|
||||||
if (value === '') {
|
{
|
||||||
callback(new Error('请再次输入密码'))
|
validator: (rule: any, value: string, callback: any) => {
|
||||||
} else if (value !== form.newPwd) {
|
if (value === '') {
|
||||||
callback(new Error('两次输入密码不一致!'))
|
callback(new Error('请再次输入密码'))
|
||||||
} else {
|
} else if (value !== form.newPwd) {
|
||||||
callback()
|
callback(new Error('两次输入密码不一致!'))
|
||||||
}
|
} else {
|
||||||
},
|
callback()
|
||||||
trigger: 'blur',
|
}
|
||||||
required: true
|
},
|
||||||
}
|
trigger: 'blur',
|
||||||
]
|
required: true
|
||||||
}
|
}
|
||||||
|
]
|
||||||
const open = () => {
|
}
|
||||||
dialogVisible.value = true
|
|
||||||
form.password = ''
|
const open = () => {
|
||||||
form.newPwd = ''
|
dialogVisible.value = true
|
||||||
form.confirmPwd = ''
|
form.password = ''
|
||||||
}
|
form.newPwd = ''
|
||||||
const submit = () => {
|
form.confirmPwd = ''
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
}
|
||||||
if (valid) {
|
const submit = () => {
|
||||||
passwordConfirm(form.password).then(res => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
updatePassword({
|
if (valid) {
|
||||||
id: adminInfo.$state.userIndex,
|
passwordConfirm(form.password).then(res => {
|
||||||
newPassword: form.newPwd
|
updatePassword({
|
||||||
}).then((res: any) => {
|
id: adminInfo.$state.userIndex,
|
||||||
ElMessage.success('密码修改成功')
|
newPassword: form.newPwd
|
||||||
dialogVisible.value = false
|
}).then((res: any) => {
|
||||||
})
|
ElMessage.success('密码修改成功,请重新登录!')
|
||||||
})
|
dialogVisible.value = false
|
||||||
}
|
setTimeout(() => {
|
||||||
})
|
navTabs.closeTabs()
|
||||||
}
|
window.localStorage.clear()
|
||||||
|
adminInfo.reset()
|
||||||
defineExpose({ open })
|
router.push({ name: 'login' })
|
||||||
</script>
|
}, 0)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||||
import staticRoutes from '@/router/static'
|
import staticRoutes from '@/router/static'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import NProgress from 'nprogress'
|
import NProgress from 'nprogress'
|
||||||
import { loading } from '@/utils/loading'
|
import { loading } from '@/utils/loading'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes: staticRoutes
|
routes: staticRoutes
|
||||||
})
|
})
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
if (!window.existLoading) {
|
if (!window.existLoading) {
|
||||||
loading.show()
|
loading.show()
|
||||||
window.existLoading = true
|
window.existLoading = true
|
||||||
}
|
}
|
||||||
if (to.path == '/login' || to.path == '/404') {
|
if (to.path == '/login' || to.path == '/404') {
|
||||||
// 登录或者注册才可以往下进行
|
// 登录或者注册才可以往下进行
|
||||||
next()
|
next()
|
||||||
} else if (to.path == '/admin/center/homePage') {
|
} else if (to.path == '/admin/center/homePage') {
|
||||||
window.open(window.location.origin + '/homePage/#/')
|
window.open(window.location.origin + '/homePage/#/')
|
||||||
} else {
|
} else {
|
||||||
// 获取 token
|
// 获取 token
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const token = adminInfo.getToken()
|
const token = adminInfo.getToken()
|
||||||
// token 不存在
|
// token 不存在
|
||||||
if (token === null || token === '') {
|
if (token === null || token === '') {
|
||||||
ElMessage.error('您还没有登录,请先登录')
|
// ElMessage.error('您还没有登录,请先登录')
|
||||||
next('/login')
|
next('/login')
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// next()
|
// next()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 路由加载后
|
// 路由加载后
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
if (window.existLoading) {
|
if (window.existLoading) {
|
||||||
loading.hide()
|
loading.hide()
|
||||||
}
|
}
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -1,246 +1,246 @@
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { STORE_CONFIG } from '@/stores/constant/cacheKey'
|
import { STORE_CONFIG } from '@/stores/constant/cacheKey'
|
||||||
import type { Layout } from '@/stores/interface'
|
import type { Layout } from '@/stores/interface'
|
||||||
|
|
||||||
export const useConfig = defineStore(
|
export const useConfig = defineStore(
|
||||||
'config',
|
'config',
|
||||||
() => {
|
() => {
|
||||||
const layout: Layout = reactive({
|
const layout: Layout = reactive({
|
||||||
/* 全局 */
|
/* 全局 */
|
||||||
showDrawer: false,
|
showDrawer: false,
|
||||||
// 是否收缩布局(小屏终端)
|
// 是否收缩布局(小屏终端)
|
||||||
shrink: false,
|
shrink: false,
|
||||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||||
layoutMode: 'Classic',
|
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>
|
// 后台主页面切换动画,可选值<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',
|
mainAnimation: 'slide-right',
|
||||||
// 是否暗黑模式
|
// 是否暗黑模式
|
||||||
isDark: false,
|
isDark: false,
|
||||||
elementUiPrimary: ['#002B6A', '#002B6A'],
|
elementUiPrimary: ['#002B6A', '#002B6A'],
|
||||||
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
||||||
tableHeaderColor: ['#111', '#fff'],
|
tableHeaderColor: ['#111', '#fff'],
|
||||||
tableCurrent: ['#F3F6F9', '#F3F6F9'],
|
tableCurrent: ['#F3F6F9', '#F3F6F9'],
|
||||||
/* 侧边菜单 */
|
/* 侧边菜单 */
|
||||||
// 侧边菜单背景色
|
// 侧边菜单背景色
|
||||||
menuBackground: ['#002B6A', '#1d1e1f'],
|
menuBackground: ['#002B6A', '#1d1e1f'],
|
||||||
// 侧边菜单文字颜色
|
// 侧边菜单文字颜色
|
||||||
menuColor: ['#FFFFFF', '#CFD3DC'],
|
menuColor: ['#FFFFFF', '#CFD3DC'],
|
||||||
// 侧边菜单激活项背景色
|
// 侧边菜单激活项背景色
|
||||||
menuActiveBackground: ['#002255', '#1d1e1f'],
|
menuActiveBackground: ['#002255', '#1d1e1f'],
|
||||||
// 侧边菜单激活项文字色
|
// 侧边菜单激活项文字色
|
||||||
menuActiveColor: ['#409eff', '#3375b9'],
|
menuActiveColor: ['#409eff', '#3375b9'],
|
||||||
// 侧边菜单顶栏背景色
|
// 侧边菜单顶栏背景色
|
||||||
menuTopBarBackground: ['#002B6A', '#1d1e1f'],
|
menuTopBarBackground: ['#002B6A', '#1d1e1f'],
|
||||||
// 侧边菜单宽度(展开时),单位px
|
// 侧边菜单宽度(展开时),单位px
|
||||||
menuWidth: 260,
|
menuWidth: 260,
|
||||||
// 侧边菜单项默认图标
|
// 侧边菜单项默认图标
|
||||||
menuDefaultIcon: 'fa fa-circle-o',
|
menuDefaultIcon: 'fa fa-circle-o',
|
||||||
// 是否水平折叠收起菜单
|
// 是否水平折叠收起菜单
|
||||||
menuCollapse: false,
|
menuCollapse: false,
|
||||||
// 是否只保持一个子菜单的展开(手风琴)
|
// 是否只保持一个子菜单的展开(手风琴)
|
||||||
menuUniqueOpened: false,
|
menuUniqueOpened: false,
|
||||||
// 显示菜单栏顶栏(LOGO)
|
// 显示菜单栏顶栏(LOGO)
|
||||||
menuShowTopBar: true,
|
menuShowTopBar: true,
|
||||||
|
|
||||||
/* 顶栏 */
|
/* 顶栏 */
|
||||||
// 顶栏文字色
|
// 顶栏文字色
|
||||||
headerBarTabColor: ['#FFFFFF', '#CFD3DC'],
|
headerBarTabColor: ['#FFFFFF', '#CFD3DC'],
|
||||||
// // 顶栏激活项背景色
|
// // 顶栏激活项背景色
|
||||||
headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||||
// 顶栏激活项文字色
|
// 顶栏激活项文字色
|
||||||
headerBarTabActiveColor: ['#000000', '#409EFF'],
|
headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||||
// 顶栏背景色
|
// 顶栏背景色
|
||||||
headerBarBackground: ['#002B6A', '#1d1e1f'],
|
headerBarBackground: ['#002B6A', '#1d1e1f'],
|
||||||
// 顶栏悬停时背景色
|
// 顶栏悬停时背景色
|
||||||
headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||||
})
|
})
|
||||||
|
|
||||||
const lang = reactive({
|
const lang = reactive({
|
||||||
// 默认语言,可选值<zh-cn|en>
|
// 默认语言,可选值<zh-cn|en>
|
||||||
defaultLang: 'zh-cn',
|
defaultLang: 'zh-cn',
|
||||||
// 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
// 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||||
fallbackLang: 'zh-cn',
|
fallbackLang: 'zh-cn',
|
||||||
// 支持的语言列表
|
// 支持的语言列表
|
||||||
langArray: [
|
langArray: [
|
||||||
{ name: 'zh-cn', value: '中文简体' },
|
{ name: 'zh-cn', value: '中文简体' },
|
||||||
{ name: 'en', value: 'English' }
|
{ name: 'en', value: 'English' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
function menuWidth() {
|
function menuWidth() {
|
||||||
if (layout.shrink) {
|
if (layout.shrink) {
|
||||||
return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||||
}
|
}
|
||||||
// 菜单是否折叠
|
// 菜单是否折叠
|
||||||
return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLang(val: string) {
|
function setLang(val: string) {
|
||||||
lang.defaultLang = val
|
lang.defaultLang = val
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSetLayoutColor(data = layout.layoutMode) {
|
function onSetLayoutColor(data = layout.layoutMode) {
|
||||||
// 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
// 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||||
const tempValue = layout.isDark
|
const tempValue = layout.isDark
|
||||||
? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||||
: { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
: { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||||
if (
|
if (
|
||||||
data == 'Classic' &&
|
data == 'Classic' &&
|
||||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||||
) {
|
) {
|
||||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||||
} else if (
|
} else if (
|
||||||
data == 'Default' &&
|
data == 'Default' &&
|
||||||
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||||
) {
|
) {
|
||||||
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLayoutMode(data: string) {
|
function setLayoutMode(data: string) {
|
||||||
layout.layoutMode = data
|
layout.layoutMode = data
|
||||||
onSetLayoutColor(data)
|
onSetLayoutColor(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const setLayout = (name: keyof Layout, value: any) => {
|
const setLayout = (name: keyof Layout, value: any) => {
|
||||||
layout[name] = value as never
|
layout[name] = value as never
|
||||||
}
|
}
|
||||||
|
|
||||||
const getColorVal = function (name: keyof Layout): string {
|
const getColorVal = function (name: keyof Layout): string {
|
||||||
const colors = layout[name] as string[]
|
const colors = layout[name] as string[] || ['#082E6C', '#0e8780']
|
||||||
if (layout.isDark) {
|
if (layout.isDark) {
|
||||||
return colors[1]
|
return colors[1]
|
||||||
} else {
|
} else {
|
||||||
return colors[0]
|
return colors[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||||
},
|
},
|
||||||
// () => {
|
// () => {
|
||||||
//
|
//
|
||||||
// console.log('🚀 ~ subject:', subject)
|
// console.log('🚀 ~ subject:', subject)
|
||||||
// const layout: Layout = reactive({
|
// const layout: Layout = reactive({
|
||||||
// /* 全局 */
|
// /* 全局 */
|
||||||
// showDrawer: false,
|
// showDrawer: false,
|
||||||
// // 是否收缩布局(小屏终端)
|
// // 是否收缩布局(小屏终端)
|
||||||
// shrink: false,
|
// shrink: false,
|
||||||
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||||
// layoutMode: 'Classic',
|
// 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>
|
// // 后台主页面切换动画,可选值<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,
|
// mainAnimation: subject.mainAnimation,
|
||||||
// // 是否暗黑模式
|
// // 是否暗黑模式
|
||||||
// isDark: false,
|
// isDark: false,
|
||||||
// elementUiPrimary: JSON.parse(subject.elementUiPrimary),
|
// elementUiPrimary: JSON.parse(subject.elementUiPrimary),
|
||||||
// tableHeaderBackground: JSON.parse(subject.tableHeaderBackground),
|
// tableHeaderBackground: JSON.parse(subject.tableHeaderBackground),
|
||||||
// tableHeaderColor:JSON.parse(subject.tableHeaderColor),
|
// tableHeaderColor:JSON.parse(subject.tableHeaderColor),
|
||||||
// tableCurrent: JSON.parse(subject.tableCurrent),
|
// tableCurrent: JSON.parse(subject.tableCurrent),
|
||||||
// /* 侧边菜单 */
|
// /* 侧边菜单 */
|
||||||
// // 侧边菜单背景色
|
// // 侧边菜单背景色
|
||||||
// menuBackground: JSON.parse(subject.menuBackground),
|
// menuBackground: JSON.parse(subject.menuBackground),
|
||||||
// // 侧边菜单文字颜色
|
// // 侧边菜单文字颜色
|
||||||
// menuColor:JSON.parse(subject.menuColor),
|
// menuColor:JSON.parse(subject.menuColor),
|
||||||
// // 侧边菜单激活项背景色
|
// // 侧边菜单激活项背景色
|
||||||
// menuActiveBackground:JSON.parse(subject.menuActiveBackground),
|
// menuActiveBackground:JSON.parse(subject.menuActiveBackground),
|
||||||
// // 侧边菜单激活项文字色
|
// // 侧边菜单激活项文字色
|
||||||
// menuActiveColor:JSON.parse(subject.menuActiveColor),
|
// menuActiveColor:JSON.parse(subject.menuActiveColor),
|
||||||
// // 侧边菜单顶栏背景色
|
// // 侧边菜单顶栏背景色
|
||||||
// menuTopBarBackground: JSON.parse(subject.menuTopBarBackground),
|
// menuTopBarBackground: JSON.parse(subject.menuTopBarBackground),
|
||||||
// // 侧边菜单宽度(展开时),单位px
|
// // 侧边菜单宽度(展开时),单位px
|
||||||
// menuWidth: 260,
|
// menuWidth: 260,
|
||||||
// // 侧边菜单项默认图标
|
// // 侧边菜单项默认图标
|
||||||
// menuDefaultIcon: 'fa fa-circle-o',
|
// menuDefaultIcon: 'fa fa-circle-o',
|
||||||
// // 是否水平折叠收起菜单
|
// // 是否水平折叠收起菜单
|
||||||
// menuCollapse: false,
|
// menuCollapse: false,
|
||||||
// // 是否只保持一个子菜单的展开(手风琴)
|
// // 是否只保持一个子菜单的展开(手风琴)
|
||||||
// menuUniqueOpened: false,
|
// menuUniqueOpened: false,
|
||||||
// // 显示菜单栏顶栏(LOGO)
|
// // 显示菜单栏顶栏(LOGO)
|
||||||
// menuShowTopBar: true,
|
// menuShowTopBar: true,
|
||||||
|
|
||||||
// /* 顶栏 */
|
// /* 顶栏 */
|
||||||
// // 顶栏文字色
|
// // 顶栏文字色
|
||||||
// headerBarTabColor:JSON.parse(subject.headerBarTabColor),
|
// headerBarTabColor:JSON.parse(subject.headerBarTabColor),
|
||||||
// // // 顶栏激活项背景色
|
// // // 顶栏激活项背景色
|
||||||
// headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
// headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||||
// // 顶栏激活项文字色
|
// // 顶栏激活项文字色
|
||||||
// headerBarTabActiveColor: ['#000000', '#409EFF'],
|
// headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||||
// // 顶栏背景色
|
// // 顶栏背景色
|
||||||
// headerBarBackground: JSON.parse(subject.headerBarBackground),
|
// headerBarBackground: JSON.parse(subject.headerBarBackground),
|
||||||
// // 顶栏悬停时背景色
|
// // 顶栏悬停时背景色
|
||||||
// headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
// headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||||
// })
|
// })
|
||||||
// // console.log(123, window.localStorage.getItem('getTheme'))
|
// // console.log(123, window.localStorage.getItem('getTheme'))
|
||||||
|
|
||||||
// const lang = reactive({
|
// const lang = reactive({
|
||||||
// // 默认语言,可选值<zh-cn|en>
|
// // 默认语言,可选值<zh-cn|en>
|
||||||
// defaultLang: 'zh-cn',
|
// defaultLang: 'zh-cn',
|
||||||
// // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
// // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||||
// fallbackLang: 'zh-cn',
|
// fallbackLang: 'zh-cn',
|
||||||
// // 支持的语言列表
|
// // 支持的语言列表
|
||||||
// langArray: [
|
// langArray: [
|
||||||
// { name: 'zh-cn', value: '中文简体' },
|
// { name: 'zh-cn', value: '中文简体' },
|
||||||
// { name: 'en', value: 'English' }
|
// { name: 'en', value: 'English' }
|
||||||
// ]
|
// ]
|
||||||
// })
|
// })
|
||||||
|
|
||||||
// function menuWidth() {
|
// function menuWidth() {
|
||||||
// if (layout.shrink) {
|
// if (layout.shrink) {
|
||||||
// return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
// return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||||
// }
|
// }
|
||||||
// // 菜单是否折叠
|
// // 菜单是否折叠
|
||||||
// return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
// return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// function setLang(val: string) {
|
// function setLang(val: string) {
|
||||||
// lang.defaultLang = val
|
// lang.defaultLang = val
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// function onSetLayoutColor(data = layout.layoutMode) {
|
// function onSetLayoutColor(data = layout.layoutMode) {
|
||||||
// // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
// // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||||
// const tempValue = layout.isDark
|
// const tempValue = layout.isDark
|
||||||
// ? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
// ? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||||
// : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
// : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||||
// if (
|
// if (
|
||||||
// data == 'Classic' &&
|
// data == 'Classic' &&
|
||||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||||
// ) {
|
// ) {
|
||||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||||
// } else if (
|
// } else if (
|
||||||
// data == 'Default' &&
|
// data == 'Default' &&
|
||||||
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||||
// ) {
|
// ) {
|
||||||
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// function setLayoutMode(data: string) {
|
// function setLayoutMode(data: string) {
|
||||||
// layout.layoutMode = data
|
// layout.layoutMode = data
|
||||||
// onSetLayoutColor(data)
|
// onSetLayoutColor(data)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// const setLayout = (name: keyof Layout, value: any) => {
|
// const setLayout = (name: keyof Layout, value: any) => {
|
||||||
// layout[name] = value as never
|
// layout[name] = value as never
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// const getColorVal = function (name: keyof Layout): string {
|
// const getColorVal = function (name: keyof Layout): string {
|
||||||
// const colors = layout[name] as string[]
|
// const colors = layout[name] as string[]
|
||||||
// if (layout.isDark) {
|
// if (layout.isDark) {
|
||||||
// return colors[1]
|
// return colors[1]
|
||||||
// } else {
|
// } else {
|
||||||
// return colors[0]
|
// return colors[0]
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
// return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
persist: {
|
persist: {
|
||||||
key: STORE_CONFIG
|
key: STORE_CONFIG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -25,14 +25,10 @@ export const useMonitoringPoint = defineStore(
|
|||||||
val: any
|
val: any
|
||||||
) => {
|
) => {
|
||||||
state[key] = val
|
state[key] = val
|
||||||
|
|
||||||
}
|
}
|
||||||
const setShowCheckBox = (val: boolean) => {
|
const setShowCheckBox = (val: boolean) => {
|
||||||
if (val && state.lineIds.length === 0) {
|
if (val && state.lineIds.length === 0) {
|
||||||
state.lineIds = [state.lineId]
|
state.lineIds = [state.lineId]
|
||||||
// console.log('====================================')
|
|
||||||
// console.log(state.lineIds)
|
|
||||||
// console.log('====================================')
|
|
||||||
}
|
}
|
||||||
state.showCheckBox = val
|
state.showCheckBox = val
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,176 +1,176 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<!-- date-picker 时间组件 area区域组件-->
|
<!-- date-picker 时间组件 area区域组件-->
|
||||||
<TableHeader date-picker area>
|
<TableHeader date-picker area>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='关键词:'>
|
<el-form-item label='关键词:'>
|
||||||
<el-input
|
<el-input
|
||||||
style='width: 240px'
|
style='width: 240px'
|
||||||
v-model='tableStore.table.params.searchValue'
|
v-model='tableStore.table.params.searchValue'
|
||||||
clearable
|
clearable
|
||||||
placeholder='仅根据用户名/登录名'
|
placeholder='仅根据用户名/登录名'
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
<el-button :icon='Plus' type='primary' @click='addUser'>添加</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<Table ref='tableRef' />
|
<Table ref='tableRef' />
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<PopupEdit ref='popupEdit' />
|
<PopupEdit ref='popupEdit' />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide, defineOptions } from 'vue'
|
import { ref, onMounted, provide, defineOptions } from 'vue'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import PopupEdit from './dialog.vue'
|
import PopupEdit from './dialog.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
|
||||||
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
// 注意名字不要重复,若要保持页面存活,名字需要和路由admin后面的字符保持一致
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'auth/userlist'
|
name: 'auth/userlist'
|
||||||
})
|
})
|
||||||
const popupEdit = ref()
|
const popupEdit = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
// 若页面表格高度需要调整,请修改publicHeight(内容区域除表格外其他内容的高度)
|
||||||
// publicHeight: 60,
|
// publicHeight: 60,
|
||||||
url: '/user-boot/user/list',
|
url: '/user-boot/user/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '用户名称', field: 'name', minWidth: '130' },
|
{ title: '用户名称', field: 'name', minWidth: '130' },
|
||||||
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
{ title: '登录名', field: 'loginName', minWidth: '130' },
|
||||||
{ title: '角色', field: 'roleName', minWidth: '130' },
|
{ title: '角色', field: 'roleName', minWidth: '130' },
|
||||||
{ title: '部门', field: 'deptName', minWidth: '200' },
|
{ title: '部门', field: 'deptName', minWidth: '200' },
|
||||||
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
{ title: '电话', field: 'phoneShow', minWidth: '100' },
|
||||||
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
|
||||||
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
|
||||||
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
{ title: '类型', field: 'casualUserName', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
width: '100',
|
width: '100',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'danger',
|
0: 'danger',
|
||||||
1: 'success',
|
1: 'success',
|
||||||
2: 'warning',
|
2: 'warning',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info',
|
4: 'info',
|
||||||
5: 'danger'
|
5: 'danger'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '注销',
|
0: '注销',
|
||||||
1: '正常',
|
1: '正常',
|
||||||
2: '锁定',
|
2: '锁定',
|
||||||
3: '待审核',
|
3: '待审核',
|
||||||
4: '休眠',
|
4: '休眠',
|
||||||
5: '密码过期'
|
5: '密码过期'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1
|
return row.state !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改密码',
|
title: '修改密码',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Lock',
|
icon: 'el-icon-Lock',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1
|
return row.state !== 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
ElMessageBox.prompt('二次校验密码确认', '注销用户', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'password'
|
inputType: 'password'
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '激活',
|
title: '激活',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
return row.state !== 2 && row.state !== 5 && row.state !== 0 && row.state !== 4
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '注销',
|
title: '注销',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-SwitchButton',
|
icon: 'el-icon-SwitchButton',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.state !== 1 && row.state !== 3
|
return row.state !== 1 && row.state !== 3
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
item.deptName = item.deptName || '/'
|
item.deptName = item.deptName || '/'
|
||||||
item.phoneShow = item.phone || '/'
|
item.phoneShow = item.phone || '/'
|
||||||
item.roleName = item.role.length ? item.role : '/'
|
item.roleName = item.role.length ? item.role : '/'
|
||||||
switch (item.casualUser) {
|
switch (item.casualUser) {
|
||||||
case 0:
|
case 0:
|
||||||
item.casualUserName = '临时用户'
|
item.casualUserName = '临时用户'
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
item.casualUserName = '长期用户'
|
item.casualUserName = '长期用户'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
item.casualUserName = '/'
|
item.casualUserName = '/'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 注入到子组件
|
// 注入到子组件
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 默认参数 参数多的话可以使用Object.assign方法
|
// 默认参数 参数多的话可以使用Object.assign方法
|
||||||
tableStore.table.params.searchState = 1
|
tableStore.table.params.searchState = 1
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.casualUser = -1
|
tableStore.table.params.casualUser = -1
|
||||||
tableStore.table.params.orderBy = ''
|
tableStore.table.params.orderBy = ''
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 弹框
|
// 弹框
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
popupEdit.value.open('新增用户')
|
popupEdit.value.open('新增用户')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -52,11 +52,12 @@ class MQTT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const mqttUrl =
|
// const mqttUrl =
|
||||||
localStorage.getItem('MqttUrl') == 'null'
|
// localStorage.getItem('MqttUrl') == 'null'
|
||||||
? 'ws://192.168.1.68:8083/mqtt'
|
// ? 'ws://192.168.1.68:8083/mqtt'
|
||||||
: localStorage.getItem('MqttUrl')
|
// : localStorage.getItem('MqttUrl')
|
||||||
|
const mqttUrl = localStorage.getItem('MqttUrl')
|
||||||
|
if (mqttUrl == 'null' || mqttUrl == null) return
|
||||||
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
||||||
this.setupEventListeners()
|
this.setupEventListeners()
|
||||||
|
|
||||||
|
|||||||
@@ -1,125 +1,125 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="新能源场站名称">
|
<el-form-item label="新能源场站名称">
|
||||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.name" clearable placeholder="输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!--弹框-->
|
<!--弹框-->
|
||||||
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from './components/addForm.vue'
|
import addForm from './components/addForm.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { delNewStation } from '@/api/device-boot/newEnergy'
|
import { delNewStation } from '@/api/device-boot/newEnergy'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'newEnergy/newEnergyLedger'
|
name: 'newEnergy/newEnergyLedger'
|
||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const newEnergy = dictData.getBasicData('new_station_type')
|
const newEnergy = dictData.getBasicData('new_station_type')
|
||||||
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/newStation/queryPage',
|
url: '/device-boot/newStation/queryPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'name', title: '新能源场站名称' },
|
{ field: 'name', title: '新能源场站名称' },
|
||||||
{
|
{
|
||||||
field: 'stationType',
|
field: 'stationType',
|
||||||
title: '新能源场站类型',
|
title: '新能源场站类型',
|
||||||
|
|
||||||
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'scale',
|
field: 'scale',
|
||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
|
|
||||||
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
},
|
},
|
||||||
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
||||||
{ field: 'longitude', title: '经度' },
|
{ field: 'longitude', title: '经度' },
|
||||||
{ field: 'latitude', title: '纬度' },
|
{ field: 'latitude', title: '纬度' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-edit',
|
icon: 'el-icon-edit',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
addFormRef.value.open({
|
addFormRef.value.open({
|
||||||
title: '修改',
|
title: '修改',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该数据吗?'
|
title: '确定删除该数据吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delNewStation({ ids: row.id }).then(() => {
|
delNewStation({ ids: row.id }).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
loadCallback: () => {}
|
loadCallback: () => {}
|
||||||
})
|
})
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
const add = () => {
|
const add = () => {
|
||||||
addFormRef.value.open({
|
addFormRef.value.open({
|
||||||
title: '新增'
|
title: '新增'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const tableStore = new TableStore({
|
|||||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||||
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
||||||
table.value.info(tableStore.table.data)
|
table.value.info(tableStore.table.data)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader datePicker :showReset="false" showExport ref="TableHeaderRef">
|
<TableHeader datePicker :showReset="false" showExport ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<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>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|||||||
@@ -288,18 +288,21 @@ const equipment = (row: any) => {}
|
|||||||
// 承载能力评估
|
// 承载能力评估
|
||||||
const assess = () => {
|
const assess = () => {
|
||||||
// vxeRef.value.getRadioRecord()
|
// vxeRef.value.getRadioRecord()
|
||||||
|
|
||||||
if (equipmentList.value.length == null) {
|
if (equipmentList.value.length == 0) {
|
||||||
return ElMessage.warning('请选择用户')
|
return ElMessage.warning('请选择有终端设备的用户')
|
||||||
}
|
}
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formRef.value.validate((valid: any) => {
|
formRef.value.validate((valid: any) => {
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
form.value.devList = equipmentList.value
|
form.value.devList = equipmentList.value
|
||||||
carryCapacityEvaluate(form.value).then(res => {
|
carryCapacityEvaluate(form.value).then(res => {
|
||||||
rendering(res.data)
|
rendering(res.data)
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -734,6 +734,7 @@ const choose = (e: any) => {
|
|||||||
|
|
||||||
uploadExcel(e.raw, form).then(res => {
|
uploadExcel(e.raw, form).then(res => {
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
|
onSubmit()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const tabChange = (e: any) => {
|
const tabChange = (e: any) => {
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'evaluateDate', title: '评估日期' },
|
{ field: 'evaluateDate', title: '评估日期' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createBy', title: '创建者' },
|
{ field: 'createBy', title: '创建者' },
|
||||||
{ field: 'createTime', title: '创建日期' },
|
{ field: 'createTime', title: '创建日期' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
@@ -259,7 +259,7 @@ const tableStore: any = new TableStore({
|
|||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
console.log(tableStore.table.data)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选数据">
|
<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>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<TableHeader datePicker showExport :showReset="false">
|
<TableHeader datePicker showExport :showReset="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<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>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<div :key="key">
|
<div :key="key">
|
||||||
<Table ref="tableRef" :height="'49vh'"></Table>
|
<Table ref="tableRef" :height="'calc(50vh - 100px)'"></Table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,10 +31,12 @@ const dialogVisible = ref(false)
|
|||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/frontLog/queryLogCHild',
|
url: '/system-boot/frontLog/queryLogCHild',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
filename: '前置交互日志详情',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader datePicker showExport>
|
<TableHeader datePicker showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
></Table>
|
></Table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pd10" style="width: 400px" v-loading="loading">
|
<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>
|
<template #prefix>
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
v-else
|
v-else
|
||||||
class="box-item"
|
class="box-item"
|
||||||
title="确定重启吗?"
|
title="确定重启吗?"
|
||||||
placement="bottom"
|
placement="left"
|
||||||
@confirm="restart(data)"
|
@confirm="restart(data)"
|
||||||
>
|
>
|
||||||
<template #actions="{ confirm, cancel }">
|
<template #actions="{ confirm, cancel }">
|
||||||
@@ -139,9 +139,9 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.nodeDevNum"
|
v-model.trim.number="formData.nodeDevNum"
|
||||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||||
maxlength="5"
|
maxlength="5"
|
||||||
placeholder="请输入最大终端数"
|
placeholder="请输入最大终端数"
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.maxProcessNum"
|
v-model.trim.number="formData.maxProcessNum"
|
||||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||||
maxlength="5"
|
maxlength="5"
|
||||||
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
||||||
@@ -209,7 +209,8 @@ import {
|
|||||||
updateNode,
|
updateNode,
|
||||||
nodeDeviceTree,
|
nodeDeviceTree,
|
||||||
updateDeviceProcess,
|
updateDeviceProcess,
|
||||||
askRestartProcess
|
askRestartProcess,
|
||||||
|
allotTerminal
|
||||||
} from '@/api/device-boot/Business'
|
} from '@/api/device-boot/Business'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
@@ -240,6 +241,7 @@ const tableRef = ref()
|
|||||||
const processNo = ref('')
|
const processNo = ref('')
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const dataSource: any = ref([])
|
const dataSource: any = ref([])
|
||||||
|
const deviceInfoList: any = ref([])
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'deviceInfoList',
|
children: 'deviceInfoList',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
@@ -288,7 +290,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '最大监测点数量',
|
title: '最大终端数量',
|
||||||
field: 'nodeDevNum'
|
field: 'nodeDevNum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -315,7 +317,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '描述', field: 'remark' },
|
{ title: '描述', field: 'remark' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -350,7 +352,7 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
askRestartProcess({
|
askRestartProcess({
|
||||||
deviceRebootType: null,
|
deviceRebootType: 1,
|
||||||
nodeId: row.id,
|
nodeId: row.id,
|
||||||
processNo: 1
|
processNo: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -373,12 +375,42 @@ const tableStore = new TableStore({
|
|||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
|
if (hasDevices.value) {
|
||||||
|
ElMessage.warning('此前置机绑定了设备,无法删除!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
delNode(row.id).then(res => {
|
delNode(row.id).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
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 nodeId = ref('')
|
||||||
// 点击行
|
const hasDevices = ref(false)
|
||||||
|
/// 点击行
|
||||||
const currentChangeEvent = () => {
|
const currentChangeEvent = () => {
|
||||||
// 确保 tableRef 和当前记录存在
|
// 确保 tableRef 和当前记录存在
|
||||||
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,15 +447,27 @@ const currentChangeEvent = () => {
|
|||||||
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
||||||
// 检查返回的数据是否存在且不为空
|
// 检查返回的数据是否存在且不为空
|
||||||
if (res.data && res.data.processDeviceList) {
|
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 {
|
} else {
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false;
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 添加错误处理,确保 loading 状态也能关闭
|
// 添加错误处理,确保 loading 状态也能关闭
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false;
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -432,9 +478,9 @@ const currentChangeEvent = () => {
|
|||||||
const restart = (data: any) => {
|
const restart = (data: any) => {
|
||||||
// console.log('🚀 ~ restart ~ data:', data)
|
// console.log('🚀 ~ restart ~ data:', data)
|
||||||
askRestartProcess({
|
askRestartProcess({
|
||||||
deviceRebootType: data.processNo,
|
deviceRebootType: null,
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeId.value,
|
||||||
processNo: 2
|
processNo: data.processNo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
ElMessage.success('重启成功')
|
ElMessage.success('重启成功')
|
||||||
currentChangeEvent()
|
currentChangeEvent()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="程序版本">
|
<!-- <el-form-item label="程序版本">
|
||||||
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in programoption"
|
v-for="item in programoption"
|
||||||
@@ -41,19 +41,21 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<!-- <template #operation>
|
||||||
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
||||||
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
||||||
</template>
|
</template> -->
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
||||||
<vxe-column title="操作" min-width="100">
|
<vxe-column title="操作" min-width="100">
|
||||||
<template #default="{ row }">
|
<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
|
<el-button
|
||||||
v-if="row.level == 4"
|
v-if="row.level == 4"
|
||||||
:disabled="row.state == 1 ? true : false"
|
:disabled="row.state == 1 ? true : false"
|
||||||
@@ -251,6 +253,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.teriminal = ''
|
tableStore.table.params.teriminal = ''
|
||||||
|
tableStore.table.params.teriminalstatus = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.state = ''
|
||||||
tableStore.table.params.program = ''
|
tableStore.table.params.program = ''
|
||||||
tableStore.table.params.searchEvent = ''
|
tableStore.table.params.searchEvent = ''
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -75,6 +77,7 @@
|
|||||||
:checkbox-config="{ labelField: 'name' }"
|
:checkbox-config="{ labelField: 'name' }"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
|
v-if="treeData && treeData.length > 0"
|
||||||
field="name"
|
field="name"
|
||||||
align="left"
|
align="left"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -82,6 +85,15 @@
|
|||||||
min-width="200"
|
min-width="200"
|
||||||
tree-node
|
tree-node
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
|
<!-- 没有数据时显示普通列 -->
|
||||||
|
<vxe-column
|
||||||
|
v-else
|
||||||
|
field="name"
|
||||||
|
align="left"
|
||||||
|
title="电网拓扑"
|
||||||
|
min-width="200"
|
||||||
|
tree-node
|
||||||
|
></vxe-column>
|
||||||
<vxe-column field="devType" title="终端型号">
|
<vxe-column field="devType" title="终端型号">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
{{ 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))
|
const project = JSON.parse(JSON.stringify(AddProjectBO.value))
|
||||||
|
await mainForm.value.validate((valid: any) => {
|
||||||
// project: JSON.stringify(project)
|
if (valid) {
|
||||||
addTerminal(project).then((res: any) => {
|
addTerminal(project).then((res: any) => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: res.message
|
message: res.message
|
||||||
})
|
})
|
||||||
reaseStatus()
|
reaseStatus()
|
||||||
initAddProjectBo()
|
initAddProjectBo()
|
||||||
initAddProjectBoId()
|
initAddProjectBoId()
|
||||||
treedata()
|
treedata()
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
// project: JSON.stringify(project)
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 修改数据
|
* 修改数据
|
||||||
*/
|
*/
|
||||||
const updateDate = () => {
|
const updateDate = async () => {
|
||||||
// console.log("updateProject:", this.updateProject);
|
// console.log("updateProject:", this.updateProject);
|
||||||
let data = updateProject.value
|
await mainForm.value.validate((valid: any) => {
|
||||||
updateTerminal(data).then((res: any) => {
|
if (valid){
|
||||||
ElMessage({
|
let data = updateProject.value
|
||||||
type: 'success',
|
updateTerminal(data).then((res: any) => {
|
||||||
message: res.message
|
ElMessage({
|
||||||
})
|
type: 'success',
|
||||||
pageStatus.value = 1
|
message: res.message
|
||||||
treedata()
|
})
|
||||||
|
pageStatus.value = 1
|
||||||
|
treedata()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const updateProjectF = () => {
|
const updateProjectF = () => {
|
||||||
updateProject.value = {
|
updateProject.value = {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
>
|
>
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
||||||
<el-form-item label="变压器名:" prop="tfName">
|
<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>
|
||||||
<el-form-item label="接线方式:" prop="wiring" class="top">
|
<el-form-item label="接线方式:" prop="wiring" class="top">
|
||||||
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div style="border-right: 1px solid; height: 100%" class="xiaoshou">
|
<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">
|
<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
|
<el-tree
|
||||||
style="cursor: pointer;display: inline-block;"
|
style="cursor: pointer;display: inline-block;"
|
||||||
:data="treeMenuLeftData"
|
:data="treeMenuLeftData"
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div style="border-left: 1px solid; height: 100%" class="xiaoshou">
|
<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">
|
<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
|
<el-tree
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
:data="treeMenuRightData"
|
:data="treeMenuRightData"
|
||||||
@@ -328,7 +328,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -372,6 +372,7 @@ const tableStore = new TableStore({
|
|||||||
click: row => {
|
click: row => {
|
||||||
delTransformer([row.tfIndex]).then(res => {
|
delTransformer([row.tfIndex]).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
|
menuTree.value.loadData()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -413,6 +414,7 @@ const transformerAdd = () => {
|
|||||||
message: '请选择变电站'
|
message: '请选择变电站'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
ruleForm.subIndex = parentId.value
|
||||||
transformerTitle.value = '新增变压器信息'
|
transformerTitle.value = '新增变压器信息'
|
||||||
transformerInformation.value = true
|
transformerInformation.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -602,56 +604,74 @@ const maintenanceData = reactive({
|
|||||||
//上节点选择
|
//上节点选择
|
||||||
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
||||||
maintenanceData.upNode = checkedNodes.id
|
maintenanceData.upNode = checkedNodes.id
|
||||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||||
menuTreeRight.value?.setCheckedKeys([])
|
menuTreeRight.value?.setCheckedKeys([])
|
||||||
maintenanceData.downNode = ''
|
maintenanceData.downNode = ''
|
||||||
}
|
}
|
||||||
if (checkedKeys.checkedKeys.length > 1) {
|
if (checkedKeys.checkedKeys.length > 1) {
|
||||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//下节点选择
|
//下节点选择
|
||||||
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
||||||
maintenanceData.downNode = checkedNodes.id
|
maintenanceData.downNode = checkedNodes.id
|
||||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
|
||||||
menuTreeLeft.value?.setCheckedKeys([])
|
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||||
maintenanceData.upNode = ''
|
menuTreeLeft.value?.setCheckedKeys([])
|
||||||
}
|
maintenanceData.upNode = ''
|
||||||
if (checkedKeys.checkedKeys.length > 1) {
|
}
|
||||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
if (checkedKeys.checkedKeys.length > 1) {
|
||||||
}
|
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//节点维护提交
|
//节点维护提交
|
||||||
const maintenanceOnsubmit = () => {
|
const maintenanceOnsubmit = () => {
|
||||||
for (let i = 0; i < bind.value.length; i++) {
|
|
||||||
if (bind.value[i][0] == maintenanceData.upNode) {
|
if(maintenanceData.downNode == '' || maintenanceData.upNode == '') {
|
||||||
for (let j = 0; j < bind.value.length; j++) {
|
ElMessage({
|
||||||
if (bind.value[j][1] == maintenanceData.downNode) {
|
type: 'warning',
|
||||||
ElMessage({
|
message: '请确保上下节点各自选择一个母线!'
|
||||||
type: 'warning',
|
})
|
||||||
message: '上下节点无法选择相同母线!!!'
|
return
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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) => {
|
nodeMaintenance(maintenanceData).then((res: any) => {
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|||||||
@@ -53,12 +53,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
<el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
|
||||||
<el-form-item label="名称:">
|
<el-form-item label="名称:" prop="tpName">
|
||||||
<el-input v-model="form.tpName" placeholder="请输入"></el-input>
|
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述:" class="mt20">
|
<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>
|
||||||
<el-form-item class="mt20 ml20">
|
<el-form-item class="mt20 ml20">
|
||||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||||
@@ -122,13 +122,8 @@ const menuTree = ref()
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
tpName: [{ 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' }]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
@@ -161,7 +156,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
v-model.trim="form.projectName"
|
v-model.trim="form.projectName"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
maxlength="64"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
v-model.trim="form.substation"
|
v-model.trim="form.substation"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入厂站名称"
|
placeholder="请输入厂站名称"
|
||||||
maxlength="64"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -364,6 +364,8 @@
|
|||||||
v-model.trim="form.evaluationChekDept"
|
v-model.trim="form.evaluationChekDept"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入预测评估评审单位"
|
placeholder="请输入预测评估评审单位"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
{{ proviteData.agreementCapacity }}
|
{{ proviteData.agreementCapacity }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="装机容量(MW)">
|
<el-descriptions-item label="装机容量(MW)">
|
||||||
{{ proviteData?.ratePower }}
|
{{ detailData?.ratePower }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
<el-descriptions-item
|
||||||
label="PCC供电设备容量(MVA)"
|
label="PCC供电设备容量(MVA)"
|
||||||
@@ -332,6 +332,7 @@ const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
|||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (props.update) {
|
if (props.update) {
|
||||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||||
@@ -341,6 +342,7 @@ const getInfo = async () => {
|
|||||||
} else {
|
} else {
|
||||||
await getUserReportById(props.id || queryId).then(res => {
|
await getUserReportById(props.id || queryId).then(res => {
|
||||||
detailData.value = res.data
|
detailData.value = res.data
|
||||||
|
|
||||||
getProviteData()
|
getProviteData()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,315 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
v-model="tableStore.table.params.projectName"
|
v-model="tableStore.table.params.projectName"
|
||||||
clearable
|
clearable
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for="item in areaOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.name"
|
:value="item.name"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
||||||
模板下载
|
模板下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入 -->
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import addForm from './components/addForm.vue'
|
import addForm from './components/addForm.vue'
|
||||||
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
import SensitiveUserPopup from './components/sensitiveUserPopup.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import DetailInfo from './components/detail.vue'
|
import DetailInfo from './components/detail.vue'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
name: 'BusinessAdministrator/TerminalManagement/userLedger'
|
||||||
})
|
})
|
||||||
|
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getUserLedgerPage',
|
url: '/supervision-boot/userReport/getUserLedgerPage',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'userType',
|
field: 'userType',
|
||||||
title: '用户性质',
|
title: '用户性质',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: (obj: any) => {
|
formatter: (obj: any) => {
|
||||||
const userType = obj.row.userType
|
const userType = obj.row.userType
|
||||||
return getUserTypeName(userType)
|
return getUserTypeName(userType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 130 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '创建人',
|
title: '创建人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详细信息',
|
title: '详细信息',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
lookInfo(row.id)
|
lookInfo(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
tableStore.table.params.orgId = adminInfo.$state.deptId
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dialogShow = ref(false)
|
const dialogShow = ref(false)
|
||||||
|
|
||||||
const lookInfo = (id: string) => {
|
const lookInfo = (id: string) => {
|
||||||
userId.value = id
|
userId.value = id
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelFormData(data)
|
await cancelFormData(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addForms.value.filterUsers([6])
|
addForms.value.filterUsers([6])
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '用户档案录入'
|
title: '用户档案录入'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/**获取用户性质*/
|
/**获取用户性质*/
|
||||||
const getUserTypeName = (userType: any) => {
|
const getUserTypeName = (userType: any) => {
|
||||||
if (userType === 0) {
|
if (userType === 0) {
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 1) {
|
if (userType === 1) {
|
||||||
return '扩建电网工程'
|
return '扩建电网工程'
|
||||||
}
|
}
|
||||||
if (userType === 2) {
|
if (userType === 2) {
|
||||||
return '新建非线性负荷用户'
|
return '新建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 3) {
|
if (userType === 3) {
|
||||||
return '扩建非线性负荷用户'
|
return '扩建非线性负荷用户'
|
||||||
}
|
}
|
||||||
if (userType === 4) {
|
if (userType === 4) {
|
||||||
return '新建新能源发电站'
|
return '新建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 5) {
|
if (userType === 5) {
|
||||||
return '扩建新能源发电站'
|
return '扩建新能源发电站'
|
||||||
}
|
}
|
||||||
if (userType === 6) {
|
if (userType === 6) {
|
||||||
return '敏感及重要用户'
|
return '敏感及重要用户'
|
||||||
}
|
}
|
||||||
return '新建电网工程'
|
return '新建电网工程'
|
||||||
}
|
}
|
||||||
//导出模板
|
//导出模板
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await downloadSensitiveReportTemplate().then((res: any) => {
|
await downloadSensitiveReportTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '干扰源用户台账模板'
|
link.download = '干扰源用户台账模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量导入用户数据
|
//批量导入用户数据
|
||||||
const importUserData = () => {
|
const importUserData = () => {
|
||||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
await getUserReportById(fullId).then(res => {
|
await getUserReportById(fullId).then(res => {
|
||||||
if (res && res.code == 'A0000') {
|
if (res && res.code == 'A0000') {
|
||||||
addForms.value.setcontroFlag()
|
addForms.value.setcontroFlag()
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
row: res.data
|
row: res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="information">
|
<div >
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
<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-Edit" type="primary" @click="revise">修改</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
||||||
|
|||||||
@@ -1,274 +1,274 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- 案例库 -->
|
<!-- 案例库 -->
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="名称">
|
<el-form-item label="名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
||||||
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看常见治理措施</el-button>
|
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看常见治理措施</el-button>
|
||||||
|
|
||||||
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||||
v-if="information">
|
v-if="information">
|
||||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||||
下载常见治理措施
|
下载常见治理措施
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef"></Table>
|
<Table ref="tableRef"></Table>
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
||||||
<!-- 简介详情 -->
|
<!-- 简介详情 -->
|
||||||
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
<el-dialog v-model="dialogVisible" title="事件简介" width="60%">
|
||||||
<div class="editor" v-html="summary"></div>
|
<div class="editor" v-html="summary"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 抽屉 -->
|
<!-- 抽屉 -->
|
||||||
<drawer ref="drawerRef" />
|
<drawer ref="drawerRef" />
|
||||||
<!-- 文件 -->
|
<!-- 文件 -->
|
||||||
<annex ref="annexRef" />
|
<annex ref="annexRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, provide } from 'vue'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import PopupEdit from './components/form.vue'
|
import PopupEdit from './components/form.vue'
|
||||||
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
import { libcaseBeleteyById } from '@/api/supervision-boot/database/index'
|
||||||
import drawer from './components/drawer.vue'
|
import drawer from './components/drawer.vue'
|
||||||
import annex from './components/annex.vue'
|
import annex from './components/annex.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import katex from "katex";
|
import katex from "katex";
|
||||||
import "katex/dist/katex.css";
|
import "katex/dist/katex.css";
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'database/case'
|
name: 'database/case'
|
||||||
})
|
})
|
||||||
|
|
||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
const drawerRef = ref()
|
const drawerRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const annexRef = ref()
|
const annexRef = ref()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const summary = ref('')
|
const summary = ref('')
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/libcase/pageQuery',
|
url: '/supervision-boot/libcase/pageQuery',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '电能质量事件名称', field: 'name' },
|
{ title: '电能质量事件名称', field: 'name' },
|
||||||
{
|
{
|
||||||
title: '发生地点',
|
title: '发生地点',
|
||||||
field: 'location'
|
field: 'location'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '发生事件',
|
// title: '发生事件',
|
||||||
// field: 'type'
|
// field: 'type'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '事件经过',
|
// title: '事件经过',
|
||||||
// field: 'process'
|
// field: 'process'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '处理措施',
|
// title: '处理措施',
|
||||||
// field: 'measures'
|
// field: 'measures'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '治理效果',
|
// title: '治理效果',
|
||||||
// field: 'effect'
|
// field: 'effect'
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '事件简介',
|
title: '事件简介',
|
||||||
width: '140',
|
width: '140',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
summary.value = row.summary
|
summary.value = row.summary
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
const spans = document.querySelectorAll('span[data-value]');
|
const spans = document.querySelectorAll('span[data-value]');
|
||||||
// 遍历每个 span 标签
|
// 遍历每个 span 标签
|
||||||
spans.forEach(function (span) {
|
spans.forEach(function (span) {
|
||||||
|
|
||||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||||
throwOnError: false,
|
throwOnError: false,
|
||||||
})
|
})
|
||||||
var newDiv = span;
|
var newDiv = span;
|
||||||
newDiv.innerHTML = val;
|
newDiv.innerHTML = val;
|
||||||
|
|
||||||
span.parentNode.replaceChild(newDiv, span);
|
span.parentNode.replaceChild(newDiv, span);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '200',
|
width: '200',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
annexRef.value.open(row)
|
annexRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'view',
|
name: 'view',
|
||||||
title: '下载附件',
|
title: '下载附件',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
annexRef.value.open(row)
|
annexRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !information
|
return !information
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupEditRef.value.open('修改案例', row)
|
popupEditRef.value.open('修改案例', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'delete',
|
name: 'delete',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !information
|
return !information
|
||||||
},
|
},
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
libcaseBeleteyById({ id: row.id }).then(res => {
|
libcaseBeleteyById({ id: row.id }).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadCallback: () => { }
|
loadCallback: () => { }
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// 弹框
|
// 弹框
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
popupEditRef.value.open('新增案例')
|
popupEditRef.value.open('新增案例')
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
// console.log('🚀 ~ libcaseBeleteyById ~ tableStore:', tableStore)
|
||||||
})
|
})
|
||||||
const checkOutTheCriteria = () => {
|
const checkOutTheCriteria = () => {
|
||||||
queryStandardCase().then(res => {
|
queryStandardCase().then(res => {
|
||||||
drawerRef.value.open(res.data)
|
drawerRef.value.open(res.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传
|
// 上传
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
ElMessage.info('上传中,请稍等...')
|
ElMessage.info('上传中,请稍等...')
|
||||||
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
uploadFile(e.raw, '/supervision/').then((row: any) => {
|
||||||
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
addStandardCase({ caseUrl: row.data.name }).then(res => {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
const downloadTheReport = () => {
|
const downloadTheReport = () => {
|
||||||
queryStandardCase().then(res => {
|
queryStandardCase().then(res => {
|
||||||
let urls = res.data
|
let urls = res.data
|
||||||
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
|
||||||
ElMessage.info('下载中,请稍等...')
|
ElMessage.info('下载中,请稍等...')
|
||||||
downloadFile({ filePath: urls }).then((res: any) => {
|
downloadFile({ filePath: urls }).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: urls.includes('.pdf')
|
type: urls.includes('.pdf')
|
||||||
? 'application/pdf'
|
? 'application/pdf'
|
||||||
: urls.includes('.docx')
|
: urls.includes('.docx')
|
||||||
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
: urls.includes('.xls')
|
: urls.includes('.xls')
|
||||||
? 'application/vnd.ms-excel'
|
? 'application/vnd.ms-excel'
|
||||||
: urls.includes('.xlsx')
|
: urls.includes('.xlsx')
|
||||||
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
: urls.includes('.png')
|
: urls.includes('.png')
|
||||||
? 'image/png'
|
? 'image/png'
|
||||||
: urls.includes('.jpeg')
|
: urls.includes('.jpeg')
|
||||||
? 'image/jpeg'
|
? 'image/jpeg'
|
||||||
: urls.includes('.jpg')
|
: urls.includes('.jpg')
|
||||||
? 'image/jpg'
|
? 'image/jpg'
|
||||||
: ''
|
: ''
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = name
|
link.download = name
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.editor {
|
.editor {
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -91,8 +91,10 @@ const submit = () => {
|
|||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (urlList.value.length > 0) {
|
if (urlList.value.length > 0) {
|
||||||
|
|
||||||
const promises = urlList.value.map(async (item: any) => {
|
const promises = urlList.value.map(async (item: any) => {
|
||||||
if (urlList.value[0].raw) {
|
if (urlList.value[0].raw) {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uploadFile(item.raw, '/supervision/')
|
uploadFile(item.raw, '/supervision/')
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'createTime'
|
field: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '280',
|
width: '280',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TableHeader datePicker area showExport>
|
<TableHeader datePicker area showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="统计类型:">
|
<el-form-item label="统计类型:">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -131,7 +131,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
||||||
// {
|
// {
|
||||||
// field: 'advanceType',
|
// field: 'advanceType',
|
||||||
// title: '暂降类型',
|
// title: '触发类型',
|
||||||
// minWidth: '90',
|
// minWidth: '90',
|
||||||
// formatter: (row: any) => {
|
// formatter: (row: any) => {
|
||||||
// return row.cellValue || '其他'
|
// return row.cellValue || '其他'
|
||||||
@@ -147,7 +147,7 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'eventType',
|
field: 'eventType',
|
||||||
title: '暂态统计类型',
|
title: '触发类型',
|
||||||
minWidth: '120',
|
minWidth: '120',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
@@ -179,7 +179,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -74,9 +74,14 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电网标志">
|
<el-form-item label="电网标志">
|
||||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
<el-option
|
||||||
</el-select>
|
v-for="item in sign"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.algoDescribe"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
@@ -159,6 +164,8 @@ const tableStore = new TableStore({
|
|||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
field: 'voltageLevel',
|
field: 'voltageLevel',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
|
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -167,6 +174,7 @@ const tableStore = new TableStore({
|
|||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'networkParam',
|
field: 'networkParam',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -175,6 +183,7 @@ const tableStore = new TableStore({
|
|||||||
title: '监测点名称',
|
title: '监测点名称',
|
||||||
field: 'lineName',
|
field: 'lineName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -183,6 +192,7 @@ const tableStore = new TableStore({
|
|||||||
title: '厂家',
|
title: '厂家',
|
||||||
field: 'factoryName',
|
field: 'factoryName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -191,6 +201,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电压(%)',
|
title: '谐波电压(%)',
|
||||||
field: 'harmonicVoltage',
|
field: 'harmonicVoltage',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -199,6 +210,7 @@ const tableStore = new TableStore({
|
|||||||
title: '电压偏差(%)',
|
title: '电压偏差(%)',
|
||||||
field: 'voltageOffset',
|
field: 'voltageOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -207,6 +219,7 @@ const tableStore = new TableStore({
|
|||||||
title: '三相电压不平衡度(%)',
|
title: '三相电压不平衡度(%)',
|
||||||
field: 'voltageUnbalance',
|
field: 'voltageUnbalance',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -215,6 +228,7 @@ const tableStore = new TableStore({
|
|||||||
title: '间谐波电压含有率(%)',
|
title: '间谐波电压含有率(%)',
|
||||||
field: 'interHarmonic',
|
field: 'interHarmonic',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -223,6 +237,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电流(%)',
|
title: '谐波电流(%)',
|
||||||
field: 'harmonicCurrent',
|
field: 'harmonicCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -231,6 +246,7 @@ const tableStore = new TableStore({
|
|||||||
title: '负序电流(%)',
|
title: '负序电流(%)',
|
||||||
field: 'negativeCurrent',
|
field: 'negativeCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -239,6 +255,7 @@ const tableStore = new TableStore({
|
|||||||
title: '频率偏差(%)',
|
title: '频率偏差(%)',
|
||||||
field: 'freqOffset',
|
field: 'freqOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -247,6 +264,7 @@ const tableStore = new TableStore({
|
|||||||
title: '闪变(%)',
|
title: '闪变(%)',
|
||||||
field: 'flicker',
|
field: 'flicker',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -256,7 +274,7 @@ const tableStore = new TableStore({
|
|||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
|
||||||
@@ -312,7 +330,7 @@ const tree2List = (list: any, id?: string) => {
|
|||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<TableHeader :showReset="false" ref="TableHeaderRef">
|
<TableHeader :showReset="false" ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="关键字">
|
<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>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
@@ -69,7 +69,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '更新时间', field: 'updateTime' },
|
{ title: '更新时间', field: 'updateTime' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '计算时间', field: 'updateTime' },
|
{ title: '计算时间', field: 'updateTime' },
|
||||||
{ title: '计算窗口', field: 'timeWindow' },
|
{ title: '计算窗口', field: 'timeWindow' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="cursor: pointer;" @click="queryline(item, false)">
|
<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">
|
style="color: #fff; background: #339966" size="small">
|
||||||
优
|
优
|
||||||
</el-tag>
|
</el-tag>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<div class="card-item" v-for="(item1, index1) in item.children"
|
<div class="card-item" v-for="(item1, index1) in item.children"
|
||||||
:key="index1" @click="queryline(item1, true)">
|
: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">
|
style="color: #fff; background: #339966" size="small">
|
||||||
优
|
优
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 150
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数' ,width:'120px',
|
title: '网络参数',
|
||||||
|
width: '120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
|||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||||
|
|
||||||
tableStore.table.data = rest
|
tableStore.table.data = rest
|
||||||
|
|
||||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数' ,width:'120px',
|
title: '网络参数',
|
||||||
|
width: '120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
@@ -249,7 +250,7 @@ const searchEvent = debounce(() => {
|
|||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||||
|
|
||||||
tableStore.table.data = rest
|
tableStore.table.data = rest
|
||||||
|
|
||||||
@@ -288,6 +289,10 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -744,7 +744,8 @@ const initEcharts = (color: string, key: number, name: string) => {
|
|||||||
}
|
}
|
||||||
//渲染echarts
|
//渲染echarts
|
||||||
const init = () => {
|
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相')
|
echartsDataV1.value = initEcharts('#DAA520', 0, 'A相')
|
||||||
echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相')
|
echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相')
|
||||||
echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相')
|
echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相')
|
||||||
@@ -758,6 +759,7 @@ const init = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (monitoringPoint.state.comFlag == 0) {
|
if (monitoringPoint.state.comFlag == 0) {
|
||||||
|
loading.value = false
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: '所选监测点离线!',
|
message: '所选监测点离线!',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -826,7 +828,7 @@ const init = () => {
|
|||||||
]
|
]
|
||||||
spectrumRef.value?.init(data)
|
spectrumRef.value?.init(data)
|
||||||
trendRef.value?.init(data)
|
trendRef.value?.init(data)
|
||||||
|
loading.value = false
|
||||||
// console.log('🚀 ~ dataSocket.socketServe.registerCallBack ~ webMsgSend.value:', data)
|
// console.log('🚀 ~ dataSocket.socketServe.registerCallBack ~ webMsgSend.value:', data)
|
||||||
setRealData()
|
setRealData()
|
||||||
})
|
})
|
||||||
@@ -918,11 +920,14 @@ const setRealData = () => {
|
|||||||
}
|
}
|
||||||
defineExpose({ setRealData })
|
defineExpose({ setRealData })
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
|
||||||
initRadioCharts()
|
initRadioCharts()
|
||||||
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
||||||
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
dataSocket.socketServe?.closeWs()
|
dataSocket.socketServe?.closeWs()
|
||||||
|
|||||||
@@ -1,357 +1,358 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="pt50">
|
<div class="pt50">
|
||||||
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
<el-button class="shutDown" icon="el-icon-Back" @click="emit('shutDown')">返回</el-button>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<div class="mr10">谐波次数</div>
|
<div class="mr10">谐波次数</div>
|
||||||
<el-select v-model="selectValue" style="width: 100px" @change="loading = true">
|
<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-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs type="border-card" v-model="activeName" @tab-change="handleClick" v-loading="loading">
|
<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">
|
<el-tab-pane v-for="(item, index) in tabsList" :label="item.groupName" :name="index" :key="index">
|
||||||
<div>
|
<div>
|
||||||
<div class="realtrend_top">
|
<div class="realtrend_top">
|
||||||
<div class="realtrend_table">
|
<div class="realtrend_table">
|
||||||
<div class="thead_left">
|
<div class="thead_left">
|
||||||
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
<p style="font-weight: 700; background-color: #f3f6f9">次数(次)</p>
|
||||||
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
<p>{{ item.groupName }}{{ item.unit ? '(' + item.unit + ')' : '' }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="thead_right">
|
<div class="thead_right">
|
||||||
<div
|
<div
|
||||||
class="right_cell"
|
class="right_cell"
|
||||||
v-for="i in selectValue == '1'
|
v-for="i in selectValue == '1'
|
||||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||||
: selectValue == '2'
|
: selectValue == '2'
|
||||||
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
? item.title.filter(num => (activeName == 1 ? num - 0.5 : num) % 2 == 0)
|
||||||
: item.title"
|
: item.title"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<p style="background-color: #f3f6f9">
|
<p style="background-color: #f3f6f9">
|
||||||
<span>{{ i }}次</span>
|
<span>{{ i }}次</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
<span>{{ item.data[`h${i}`] == 0 ? 0 : item.data[`h${i}`] || '/' }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10" :style="height">
|
<div class="mt10" :style="height">
|
||||||
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
<MyEchart ref="barCharts" :options="tabsList[0].echartsData"></MyEchart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { getOverLimitData } from '@/api/device-boot/communicate'
|
import { getOverLimitData } from '@/api/device-boot/communicate'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
const emit = defineEmits(['shutDown'])
|
const emit = defineEmits(['shutDown'])
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const options = [
|
const options = [
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '全部'
|
label: '全部'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
label: '奇次'
|
label: '奇次'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
label: '偶次'
|
label: '偶次'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const height = mainHeight(315)
|
const height = mainHeight(315)
|
||||||
const barCharts = ref()
|
const barCharts = ref()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const crossTheLine: any = ref({})
|
const crossTheLine: any = ref({})
|
||||||
const tabsList: any = ref([
|
const tabsList: any = ref([
|
||||||
{
|
{
|
||||||
id: '6d5470f509ca271d7108a86e83bb283f',
|
id: '6d5470f509ca271d7108a86e83bb283f',
|
||||||
groupName: '谐波电压含有率',
|
groupName: '谐波电压含有率',
|
||||||
thdDataVOS: null,
|
thdDataVOS: null,
|
||||||
thdDataTdVODatas: null,
|
thdDataTdVODatas: null,
|
||||||
unit: '%',
|
unit: '%',
|
||||||
title: [
|
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,
|
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
|
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
||||||
],
|
],
|
||||||
data: {},
|
data: {},
|
||||||
echartsData: {}
|
echartsData: {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
id: 'ae31115b83f02f03a0d3bd65cb017121',
|
||||||
groupName: '间谐波电压含有率',
|
groupName: '间谐波电压含有率',
|
||||||
thdDataVOS: null,
|
thdDataVOS: null,
|
||||||
thdDataTdVODatas: null,
|
thdDataTdVODatas: null,
|
||||||
unit: '%',
|
unit: '%',
|
||||||
title: [
|
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,
|
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,
|
||||||
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,
|
// 16.5, 17.5, 18.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
|
// 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: {}
|
data: {},
|
||||||
},
|
echartsData: {}
|
||||||
{
|
},
|
||||||
id: '8dc260f16280184e2b57d26668dc00b1',
|
{
|
||||||
groupName: '谐波电流幅值',
|
id: '8dc260f16280184e2b57d26668dc00b1',
|
||||||
thdDataVOS: null,
|
groupName: '谐波电流幅值',
|
||||||
thdDataTdVODatas: null,
|
thdDataVOS: null,
|
||||||
unit: 'A',
|
thdDataTdVODatas: null,
|
||||||
title: [
|
unit: 'A',
|
||||||
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,
|
title: [
|
||||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
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: {}
|
data: {},
|
||||||
}
|
echartsData: {}
|
||||||
])
|
}
|
||||||
|
])
|
||||||
const selectValue = ref('1')
|
|
||||||
const activeName = ref(0)
|
const selectValue = ref('1')
|
||||||
// 点击tab
|
const activeName = ref(0)
|
||||||
const handleClick = (tab: any, event: any) => {
|
// 点击tab
|
||||||
loading.value = true
|
const handleClick = (tab: any, event: any) => {
|
||||||
}
|
loading.value = true
|
||||||
const init = (row: any) => {
|
}
|
||||||
let vData: any = {}
|
const init = (row: any) => {
|
||||||
let iData: any = {}
|
let vData: any = {}
|
||||||
let SvData: any = {}
|
let iData: any = {}
|
||||||
for (let i = 1; i < 50; i++) {
|
let SvData: any = {}
|
||||||
vData[`h${i + 1}`] =
|
for (let i = 1; i < 50; i++) {
|
||||||
Math.floor(
|
vData[`h${i + 1}`] =
|
||||||
Math.max(...[row.V.A[`V` + (i + 1)], row.V.B[`V` + (i + 1)], row.V.C[`V` + (i + 1)]].map(Number)) * 100
|
Math.floor(
|
||||||
) / 100
|
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) /
|
SvData[`h${i - 0.5}`] =
|
||||||
100
|
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) /
|
||||||
iData[`h${i + 1}`] =
|
100
|
||||||
Math.floor(
|
iData[`h${i + 1}`] =
|
||||||
Math.max(...[row.I.A[`I` + (i + 1)], row.I.B[`I` + (i + 1)], row.I.C[`I` + (i + 1)]].map(Number)) * 100
|
Math.floor(
|
||||||
) / 100
|
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
|
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[0].data = vData
|
||||||
tabsList.value[2].data = iData
|
tabsList.value[1].data = SvData
|
||||||
|
tabsList.value[2].data = iData
|
||||||
let xData =
|
|
||||||
selectValue.value == '1'
|
let xData =
|
||||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
selectValue.value == '1'
|
||||||
: selectValue.value == '2'
|
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 !== 0)
|
||||||
? tabsList.value[activeName.value].title.filter(num => (activeName.value == 1 ? num - 0.5 : num) % 2 === 0)
|
: selectValue.value == '2'
|
||||||
: tabsList.value[activeName.value].title
|
? 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: {
|
barCharts.value[activeName.value]?.setOptions({
|
||||||
text: tabsList.value[activeName.value].groupName
|
title: {
|
||||||
},
|
text: tabsList.value[activeName.value].groupName
|
||||||
xAxis: {
|
},
|
||||||
data: xData.map(num => `${num}次`)
|
xAxis: {
|
||||||
},
|
data: xData.map(num => `${num}次`)
|
||||||
yAxis: {
|
},
|
||||||
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
yAxis: {
|
||||||
},
|
name: tabsList.value[activeName.value].unit // 更新Y轴单位
|
||||||
series: [
|
},
|
||||||
{
|
series: [
|
||||||
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
{
|
||||||
type: 'bar',
|
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
|
||||||
data: xData.map(num => {
|
type: 'bar',
|
||||||
return tabsList.value[activeName.value].data[`h${num}`]
|
data: xData.map(num => {
|
||||||
})
|
return tabsList.value[activeName.value].data[`h${num}`]
|
||||||
},
|
})
|
||||||
{
|
},
|
||||||
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
{
|
||||||
type: 'bar',
|
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
|
||||||
data: xData.map(num => {
|
type: 'bar',
|
||||||
return (
|
data: xData.map(num => {
|
||||||
crossTheLine.value[
|
return (
|
||||||
activeName.value == 0
|
crossTheLine.value[
|
||||||
? `uharm${num}`
|
activeName.value == 0
|
||||||
: activeName.value == 1
|
? `uharm${num}`
|
||||||
? `inuharm${num + 0.5}`
|
: activeName.value == 1
|
||||||
: `iharm${num}`
|
? `inuharm${num + 0.5}`
|
||||||
] || ''
|
: `iharm${num}`
|
||||||
)
|
] || ''
|
||||||
})
|
)
|
||||||
}
|
})
|
||||||
]
|
}
|
||||||
})
|
]
|
||||||
loading.value = false
|
})
|
||||||
}
|
loading.value = false
|
||||||
// 设置ecartsData
|
}
|
||||||
const echarts = (num: number) => {
|
// 设置ecartsData
|
||||||
return {
|
const echarts = (num: number) => {
|
||||||
title: {
|
return {
|
||||||
text: ''
|
title: {
|
||||||
},
|
text: ''
|
||||||
xAxis: {
|
},
|
||||||
name: "次数",
|
xAxis: {
|
||||||
data: []
|
name: "次数",
|
||||||
},
|
data: []
|
||||||
yAxis: {name: tabsList.value[num].unit},
|
},
|
||||||
color: ['#2E8B57', '#DAA520'],
|
yAxis: {name: tabsList.value[num].unit},
|
||||||
options: {
|
color: ['#2E8B57', '#DAA520'],
|
||||||
series: [
|
options: {
|
||||||
{
|
series: [
|
||||||
name: tabsList.value[num].groupName,
|
{
|
||||||
type: 'bar',
|
name: tabsList.value[num].groupName,
|
||||||
data: []
|
type: 'bar',
|
||||||
},
|
data: []
|
||||||
{
|
},
|
||||||
name: '国标限值('+ tabsList.value[num].unit +')',
|
{
|
||||||
type: 'bar',
|
name: '国标限值('+ tabsList.value[num].unit +')',
|
||||||
// label: {
|
type: 'bar',
|
||||||
// normal: {
|
// label: {
|
||||||
// position: 'top'
|
// normal: {
|
||||||
// }
|
// position: 'top'
|
||||||
// },
|
// }
|
||||||
data: []
|
// },
|
||||||
}
|
data: []
|
||||||
]
|
}
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
}
|
||||||
tabsList.value[0].echartsData = echarts(0)
|
onMounted(() => {
|
||||||
tabsList.value[1].echartsData = echarts(1)
|
tabsList.value[0].echartsData = echarts(0)
|
||||||
tabsList.value[2].echartsData = echarts(2)
|
tabsList.value[1].echartsData = echarts(1)
|
||||||
console.log(tabsList.value)
|
tabsList.value[2].echartsData = echarts(2)
|
||||||
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
console.log(tabsList.value)
|
||||||
crossTheLine.value = res.data
|
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
|
||||||
})
|
crossTheLine.value = res.data
|
||||||
})
|
})
|
||||||
defineExpose({
|
})
|
||||||
init
|
defineExpose({
|
||||||
})
|
init
|
||||||
</script>
|
})
|
||||||
<style lang="scss" scoped>
|
</script>
|
||||||
.shutDown {
|
<style lang="scss" scoped>
|
||||||
position: absolute;
|
.shutDown {
|
||||||
right: 10px;
|
position: absolute;
|
||||||
top: 10px;
|
right: 10px;
|
||||||
}
|
top: 10px;
|
||||||
.select {
|
}
|
||||||
position: absolute;
|
.select {
|
||||||
top: 10px;
|
position: absolute;
|
||||||
display: flex;
|
top: 10px;
|
||||||
align-items: center;
|
display: flex;
|
||||||
font-size: 14px;
|
align-items: center;
|
||||||
}
|
font-size: 14px;
|
||||||
.realtrend_top {
|
}
|
||||||
width: 100%;
|
.realtrend_top {
|
||||||
height: auto;
|
width: 100%;
|
||||||
display: flex;
|
height: auto;
|
||||||
justify-content: space-between;
|
display: flex;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
.table {
|
|
||||||
flex: 1;
|
.table {
|
||||||
// min-height: 80px;
|
flex: 1;
|
||||||
cursor: pointer;
|
// min-height: 80px;
|
||||||
min-height: 90px;
|
cursor: pointer;
|
||||||
max-height: 170px;
|
min-height: 90px;
|
||||||
border: 1px solid #eee;
|
max-height: 170px;
|
||||||
overflow-x: auto;
|
border: 1px solid #eee;
|
||||||
overflow-y: hidden;
|
overflow-x: auto;
|
||||||
position: relative;
|
overflow-y: hidden;
|
||||||
|
position: relative;
|
||||||
ul {
|
|
||||||
width: auto;
|
ul {
|
||||||
height: 40px;
|
width: auto;
|
||||||
display: flex;
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
li {
|
|
||||||
flex: none;
|
li {
|
||||||
width: 100px;
|
flex: none;
|
||||||
line-height: 40px;
|
width: 100px;
|
||||||
border: 1px solid #eee;
|
line-height: 40px;
|
||||||
text-align: center;
|
border: 1px solid #eee;
|
||||||
list-style: none;
|
text-align: center;
|
||||||
}
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ul:nth-child(1) {
|
|
||||||
li {
|
ul:nth-child(1) {
|
||||||
font-weight: 800;
|
li {
|
||||||
background: #f4f6f9;
|
font-weight: 800;
|
||||||
}
|
background: #f4f6f9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// .table::-webkit-scrollbar {
|
|
||||||
// display: none;
|
// .table::-webkit-scrollbar {
|
||||||
// }
|
// display: none;
|
||||||
|
// }
|
||||||
.realtrend_table {
|
|
||||||
width: 100%;
|
.realtrend_table {
|
||||||
height: auto;
|
width: 100%;
|
||||||
max-height: 150px;
|
height: auto;
|
||||||
display: flex;
|
max-height: 150px;
|
||||||
border: 2px solid #eee;
|
display: flex;
|
||||||
cursor: pointer;
|
border: 2px solid #eee;
|
||||||
font-size: 13px;
|
cursor: pointer;
|
||||||
|
font-size: 13px;
|
||||||
.thead_left {
|
|
||||||
width: 150px;
|
.thead_left {
|
||||||
height: 100%;
|
width: 150px;
|
||||||
display: flex;
|
height: 100%;
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
line-height: 50px;
|
align-items: center;
|
||||||
|
line-height: 50px;
|
||||||
padding-bottom: 5px;
|
|
||||||
|
padding-bottom: 5px;
|
||||||
p {
|
|
||||||
width: 100%;
|
p {
|
||||||
height: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
height: 100%;
|
||||||
border: 1px solid #eee;
|
text-align: center;
|
||||||
line-height: 38px;
|
border: 1px solid #eee;
|
||||||
margin: 0 !important;
|
line-height: 38px;
|
||||||
}
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.thead_right {
|
|
||||||
flex: 1;
|
.thead_right {
|
||||||
align-items: center;
|
flex: 1;
|
||||||
overflow-x: auto;
|
align-items: center;
|
||||||
overflow-y: hidden;
|
overflow-x: auto;
|
||||||
display: flex;
|
overflow-y: hidden;
|
||||||
padding-bottom: 5px;
|
display: flex;
|
||||||
|
padding-bottom: 5px;
|
||||||
.right_cell {
|
|
||||||
width: 100%;
|
.right_cell {
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
p {
|
|
||||||
flex: none;
|
p {
|
||||||
min-width: 60px;
|
flex: none;
|
||||||
height: 100%;
|
min-width: 60px;
|
||||||
text-align: center;
|
height: 100%;
|
||||||
border: 1px solid #eee;
|
text-align: center;
|
||||||
line-height: 38px;
|
border: 1px solid #eee;
|
||||||
margin: 0 !important;
|
line-height: 38px;
|
||||||
}
|
margin: 0 !important;
|
||||||
|
}
|
||||||
p:nth-child(1) {
|
|
||||||
font-weight: 800;
|
p:nth-child(1) {
|
||||||
}
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const tableStore = new TableStore({
|
|||||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet.create({
|
luckysheet.create({
|
||||||
container: 'luckysheet',
|
container: 'luckysheet',
|
||||||
@@ -126,7 +126,6 @@ const changetype = (val: any) => {
|
|||||||
reportForm.value = val.reportForm
|
reportForm.value = val.reportForm
|
||||||
}
|
}
|
||||||
const selectChange = () => {
|
const selectChange = () => {
|
||||||
|
|
||||||
if (tableStore.table.data.length != 0) {
|
if (tableStore.table.data.length != 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet && luckysheet?.resize()
|
luckysheet && luckysheet?.resize()
|
||||||
@@ -152,6 +151,10 @@ const exportReport = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ const typeOptions = ref([
|
|||||||
{ label: 'cp95值', value: 4 }
|
{ label: 'cp95值', value: 4 }
|
||||||
])
|
])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
datePickerRef.value.setTheDate(5)
|
datePickerRef.value.setTheDate(4)
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const height: any = ref(mainHeight(200, 1))
|
const height: any = ref(mainHeight(200, 1))
|
||||||
|
|||||||
@@ -181,9 +181,10 @@ const init = () => {
|
|||||||
]
|
]
|
||||||
if (searchType.value) {
|
if (searchType.value) {
|
||||||
series.push({
|
series.push({
|
||||||
name: formData.periodBeginTime + '至' + formData.periodEndTime,
|
name: formData.periodBeginTime + '~' + formData.periodEndTime,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30,
|
barMaxWidth: 30,
|
||||||
|
|
||||||
// label: {
|
// label: {
|
||||||
// show: true,
|
// show: true,
|
||||||
// position: 'top',
|
// position: 'top',
|
||||||
@@ -234,10 +235,19 @@ const init = () => {
|
|||||||
let msg = ''
|
let msg = ''
|
||||||
msg += params[0].name
|
msg += params[0].name
|
||||||
for (let i in params) {
|
for (let i in params) {
|
||||||
|
|
||||||
if (params[i].data == 3.14159) {
|
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 {
|
} 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
|
return msg
|
||||||
|
|||||||
@@ -1,129 +1,141 @@
|
|||||||
<!--业务用户管理界面-->
|
<!--业务用户管理界面-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker area showExport>
|
<TableHeader datePicker area showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable maxlength="32" show-word-limit placeholder="筛选数据" />
|
<el-input
|
||||||
</el-form-item>
|
v-model="tableStore.table.params.searchValue"
|
||||||
</template>
|
clearable
|
||||||
<template v-slot:operation>
|
maxlength="32"
|
||||||
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
show-word-limit
|
||||||
</template>
|
placeholder="筛选数据"
|
||||||
</TableHeader>
|
/>
|
||||||
<!--表格-->
|
</el-form-item>
|
||||||
<Table ref="tableRef"></Table>
|
</template>
|
||||||
</div>
|
<template v-slot:operation>
|
||||||
</template>
|
<!-- <el-button type="primary" @click="exportEvent" class="ml10" icon="el-icon-Download">导出</el-button> -->
|
||||||
|
</template>
|
||||||
<script setup lang="ts">
|
</TableHeader>
|
||||||
import { ElMessage } from 'element-plus'
|
<!--表格-->
|
||||||
import TableStore from '@/utils/tableStore'
|
<Table ref="tableRef"></Table>
|
||||||
import Table from '@/components/table/index.vue'
|
</div>
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
</template>
|
||||||
import { onMounted, provide, ref } from 'vue'
|
|
||||||
import { useDictData } from '@/stores/dictData'
|
<script setup lang="ts">
|
||||||
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
defineOptions({
|
import Table from '@/components/table/index.vue'
|
||||||
name: 'harmonic-boot/reate/word'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
})
|
import { onMounted, provide, ref } from 'vue'
|
||||||
const dictData = useDictData()
|
import { useDictData } from '@/stores/dictData'
|
||||||
//区域联级选择
|
import { pageTable } from '@/api/harmonic-boot/luckyexcel.ts'
|
||||||
const industry = dictData.getBasicData('Interference_Source')
|
|
||||||
//用户信息弹出框
|
defineOptions({
|
||||||
const tableRef = ref()
|
name: 'harmonic-boot/reate/word'
|
||||||
|
})
|
||||||
const tableStore = new TableStore({
|
const dictData = useDictData()
|
||||||
url: '/harmonic-boot/qualifiedReport/pageTable',
|
//区域联级选择
|
||||||
method: 'POST',
|
const industry = dictData.getBasicData('Interference_Source')
|
||||||
column: [
|
//用户信息弹出框
|
||||||
{
|
const tableRef = ref()
|
||||||
title: '序号',
|
|
||||||
width: 80,
|
const tableStore = new TableStore({
|
||||||
formatter: (row: any) => {
|
url: '/harmonic-boot/qualifiedReport/pageTable',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
method: 'POST',
|
||||||
}
|
column: [
|
||||||
},
|
{
|
||||||
{ title: '变电站', field: 'subName', width: 200 },
|
title: '序号',
|
||||||
{ title: '监测点名称', field: 'lineName', width: 200 },
|
width: 80,
|
||||||
{
|
formatter: (row: any) => {
|
||||||
title: '行业类型',
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
field: 'businessType',
|
}
|
||||||
formatter: (row: any) => {
|
},
|
||||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
{ title: '变电站', field: 'subName', width: 200 },
|
||||||
}
|
{ title: '监测点名称', field: 'lineName', width: 200 },
|
||||||
},
|
{
|
||||||
{
|
title: '行业类型',
|
||||||
title: '分类等级',
|
field: 'businessType',
|
||||||
field: 'calssificationGrade',
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '/'
|
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '电压等级', field: 'voltageScale' },
|
{
|
||||||
{
|
title: '分类等级',
|
||||||
title: '上级变电站',
|
field: 'calssificationGrade',
|
||||||
field: 'superiorsSubstation',
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '/'
|
return row.cellValue || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{ title: '电压等级', field: 'voltageScale', minWidth: 80 },
|
||||||
title: '挂接线路',
|
{
|
||||||
field: 'hangLine',
|
title: '上级变电站',
|
||||||
formatter: (row: any) => {
|
field: 'superiorsSubstation',
|
||||||
return row.cellValue || '/'
|
minWidth: 90,
|
||||||
}
|
formatter: (row: any) => {
|
||||||
},
|
return row.cellValue || '/'
|
||||||
{
|
}
|
||||||
title: 'PT变比',
|
},
|
||||||
field: 'pt',
|
{
|
||||||
formatter: (row: any) => {
|
title: '挂接线路',
|
||||||
return row.row.pt1 + '/' + row.row.pt2
|
field: 'hangLine',
|
||||||
}
|
minWidth: 80,
|
||||||
},
|
formatter: (row: any) => {
|
||||||
{
|
return row.cellValue || '/'
|
||||||
title: 'CT变比',
|
}
|
||||||
field: 'ct',
|
},
|
||||||
formatter: (row: any) => {
|
{
|
||||||
return row.row.ct1 + '/' + row.row.ct2
|
title: 'PT变比',
|
||||||
}
|
field: 'pt',
|
||||||
},
|
minWidth: 80,
|
||||||
{ title: '短路容量(MVA)', field: 'shortCapacity' },
|
formatter: (row: any) => {
|
||||||
{ title: '终端容量(MVA)', field: 'deviceCapacity' },
|
return row.row.pt1 + '/' + row.row.pt2
|
||||||
{ title: '协议容量(MVA)', field: 'dealCapacity' },
|
}
|
||||||
{ title: '谐波情况', field: 'harmDes' },
|
},
|
||||||
{ title: '电能质量情况', field: 'powerDes' }
|
{
|
||||||
],
|
title: 'CT变比',
|
||||||
beforeSearchFun: () => {
|
field: 'ct',
|
||||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
minWidth: 80,
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
formatter: (row: any) => {
|
||||||
}
|
return row.row.ct1 + '/' + row.row.ct2
|
||||||
})
|
}
|
||||||
|
},
|
||||||
onMounted(() => {
|
{ title: '短路容量(MVA)', field: 'shortCapacity', minWidth: 80 },
|
||||||
// 加载数据
|
{ title: '终端容量(MVA)', field: 'deviceCapacity', minWidth: 80 },
|
||||||
tableStore.index()
|
{ title: '协议容量(MVA)', field: 'dealCapacity', minWidth: 80 },
|
||||||
})
|
{ title: '谐波情况', field: 'harmDes', minWidth: 80 },
|
||||||
tableStore.table.params.searchValue = ''
|
{ title: '电能质量情况', field: 'powerDes', minWidth: 100 }
|
||||||
provide('tableStore', tableStore)
|
],
|
||||||
// 导出
|
beforeSearchFun: () => {
|
||||||
const exportEvent = () => {
|
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
form.pageNum = 1
|
}
|
||||||
form.pageSize = tableStore.table.total
|
})
|
||||||
pageTable(form).then(res => {
|
|
||||||
tableRef.value.getRef().exportData({
|
onMounted(() => {
|
||||||
filename: '合格率报告', // 文件名字
|
// 加载数据
|
||||||
sheetName: 'Sheet1',
|
tableStore.index()
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
})
|
||||||
useStyle: true,
|
tableStore.table.params.searchValue = ''
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
provide('tableStore', tableStore)
|
||||||
columnFilterMethod: function (column: any) {
|
// 导出
|
||||||
return !(column.$columnIndex === 0)
|
const exportEvent = () => {
|
||||||
}
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
})
|
form.pageNum = 1
|
||||||
})
|
form.pageSize = tableStore.table.total
|
||||||
}
|
pageTable(form).then(res => {
|
||||||
</script>
|
tableRef.value.getRef().exportData({
|
||||||
|
filename: '合格率报告', // 文件名字
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
|
useStyle: true,
|
||||||
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
|
columnFilterMethod: function (column: any) {
|
||||||
|
return !(column.$columnIndex === 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ const exportEvent = () => {
|
|||||||
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||||
})
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -41,7 +41,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
||||||
<el-button icon="el-icon-Download" :loading="loading" @click="exportReport" type="primary" v-if="VITE_FLAG">
|
<el-button
|
||||||
|
icon="el-icon-Download"
|
||||||
|
:loading="loading"
|
||||||
|
@click="exportReport"
|
||||||
|
type="primary"
|
||||||
|
v-if="VITE_FLAG"
|
||||||
|
>
|
||||||
下载报告
|
下载报告
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -110,7 +116,7 @@ const tableStore = new TableStore({
|
|||||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(tableStore.table.data)
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet.create({
|
luckysheet.create({
|
||||||
container: 'luckysheet',
|
container: 'luckysheet',
|
||||||
@@ -123,6 +129,13 @@ const tableStore = new TableStore({
|
|||||||
data: tableStore.table.data
|
data: tableStore.table.data
|
||||||
})
|
})
|
||||||
}, 10)
|
}, 10)
|
||||||
|
},
|
||||||
|
resetCallback: () => {
|
||||||
|
// 重置模板策略为第一个选项
|
||||||
|
if (templatePolicy.value && templatePolicy.value.length > 0) {
|
||||||
|
Template.value = templatePolicy.value[0]
|
||||||
|
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -148,7 +161,7 @@ const changetype = (val: any) => {
|
|||||||
reportForm.value = val.reportForm
|
reportForm.value = val.reportForm
|
||||||
}
|
}
|
||||||
const selectChange = () => {
|
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) {
|
if (tableStore.table.data.length != 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
luckysheet && luckysheet?.resize()
|
luckysheet && luckysheet?.resize()
|
||||||
@@ -159,6 +172,13 @@ const selectChange = () => {
|
|||||||
const handleNodeClick = (data: any, node: any) => {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
if (data.level == 6) {
|
if (data.level == 6) {
|
||||||
dotList.value = data
|
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()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,6 +209,10 @@ const exportReport = () => {
|
|||||||
})
|
})
|
||||||
exportModelJB(form)
|
exportModelJB(form)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -43,7 +43,9 @@
|
|||||||
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -108,9 +110,10 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
// 上传
|
// 上传
|
||||||
const choose = (files: any) => {
|
const choose = (files: any) => {
|
||||||
const isJPG = files.raw.type === 'image/jpg'
|
const isJPG = files.raw.type === 'image/jpg'
|
||||||
|
const isJPEG = files.raw.type === 'image/jpeg'
|
||||||
const isPNG = files.raw.type === 'image/png'
|
const isPNG = files.raw.type === 'image/png'
|
||||||
if (!isJPG && !isPNG) {
|
if (!isJPG && !isPNG && !isJPEG) {
|
||||||
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
ElMessage.warning('上传文件只能是 jpg/png 格式!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +134,7 @@ const exportEvent = () => {
|
|||||||
form.append('type', '0')
|
form.append('type', '0')
|
||||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
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 || '')
|
form.append('file', uploadList.value?.raw || '')
|
||||||
// 特殊字符正则表达式
|
// 特殊字符正则表达式
|
||||||
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
||||||
@@ -146,22 +149,28 @@ const exportEvent = () => {
|
|||||||
} else {
|
} else {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
ElMessage('生成报告中...')
|
ElMessage('生成报告中...')
|
||||||
exportModel(form).then((res: any) => {
|
exportModel(form)
|
||||||
let blob = new Blob([res], {
|
.then((res: any) => {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
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>
|
</script>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="评价筛选">
|
<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>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -100,10 +100,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'areaName', title: '区域',minWidth: 100 },
|
{ field: 'areaName', title: '区域',minWidth: 100 },
|
||||||
{ field: 'gdName', title: '地级区' ,minWidth: 100},
|
{ field: 'gdName', title: '供电公司' ,minWidth: 100},
|
||||||
{
|
{
|
||||||
field: 'bdName',
|
field: 'bdName',
|
||||||
title: '供电公司',
|
title: '场站',
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{ field: 'objName', title: '对象名称' , minWidth: 240},
|
{ field: 'objName', title: '对象名称' , minWidth: 240},
|
||||||
|
|||||||
@@ -98,9 +98,9 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="评价筛选">
|
<!-- <el-form-item label="评价筛选">
|
||||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
@@ -145,10 +145,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'areaName', title: '区域', minWidth: 100 },
|
{ field: 'areaName', title: '区域', minWidth: 100 },
|
||||||
{ field: 'gdName', title: '地级区', minWidth: 100 },
|
{ field: 'gdName', title: '供电公司', minWidth: 100 },
|
||||||
{
|
{
|
||||||
field: 'bdName',
|
field: 'bdName',
|
||||||
title: '供电公司',
|
title: '场站',
|
||||||
minWidth: 100
|
minWidth: 100
|
||||||
},
|
},
|
||||||
{ field: 'manufacturer', 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.serverName = 'harmonic-boot'
|
||||||
tableStore.table.params.comFlag = []
|
tableStore.table.params.comFlag = []
|
||||||
tableStore.table.params.runFlag = []
|
tableStore.table.params.runFlag = []
|
||||||
tableStore.table.params.evaluate = ''
|
// tableStore.table.params.evaluate = ''
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
|
|||||||
@@ -1,153 +1,153 @@
|
|||||||
<!-- 暂态 -->
|
<!-- 暂态 -->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
||||||
<div>
|
<div>
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="360px" :data="tableData">
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="360px" :data="tableData">
|
||||||
<vxe-column field="name" title="区域" />
|
<vxe-column field="name" title="区域" />
|
||||||
|
|
||||||
<vxe-column sortable field="sagTimes" title="暂降次数" />
|
<vxe-column sortable field="sagTimes" title="暂降次数" />
|
||||||
<vxe-column sortable field="swellTimes" title="暂升次数" />
|
<vxe-column sortable field="swellTimes" title="暂升次数" />
|
||||||
<vxe-column sortable field="interruptTimes" title="短时中断次数" />
|
<vxe-column sortable field="interruptTimes" title="短时中断次数" />
|
||||||
|
|
||||||
<vxe-colgroup title="暂态严重度占比">
|
<vxe-colgroup title="暂态严重度占比">
|
||||||
<vxe-column sortable field="rate90" title="SARFI-90" />
|
<vxe-column sortable field="rate90" title="SARFI-90" />
|
||||||
<vxe-column sortable field="rate50" title="SARFI-50" />
|
<vxe-column sortable field="rate50" title="SARFI-50" />
|
||||||
<vxe-column sortable field="rate20" title="SARFI-20" />
|
<vxe-column sortable field="rate20" title="SARFI-20" />
|
||||||
</vxe-colgroup>
|
</vxe-colgroup>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px; display: flex">
|
<div style="margin-top: 10px; display: flex">
|
||||||
<!--
|
<!--
|
||||||
-->
|
-->
|
||||||
<div class="statistics-main">
|
<div class="statistics-main">
|
||||||
<div class="statistics-box">
|
<div class="statistics-box">
|
||||||
<MyEChart style="height: 250px" :options="picEChart" />
|
<MyEChart style="height: 250px" :options="picEChart" />
|
||||||
|
|
||||||
<el-table size="small" height="250px" :data="descentData">
|
<el-table size="small" height="250px" :data="descentData">
|
||||||
<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-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statistics-box">
|
<div class="statistics-box">
|
||||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||||
<el-table size="small" height="250px" :data="resembleData">
|
<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-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
||||||
|
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
|
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const descentData = ref([])
|
const descentData = ref([])
|
||||||
const resembleData = ref([])
|
const resembleData = ref([])
|
||||||
|
|
||||||
const picEChart = ref({})
|
const picEChart = ref({})
|
||||||
const picEChart1 = ref({})
|
const picEChart1 = ref({})
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
getEventDetailByList({ ...row, deviceInfoParam: row }).then((res: any) => {
|
getEventDetailByList({ ...row, deviceInfoParam: row }).then((res: any) => {
|
||||||
tableData.value = res.data
|
tableData.value = res.data
|
||||||
})
|
})
|
||||||
getEventReason(row).then(res => {
|
getEventReason(row).then(res => {
|
||||||
descentData.value = res.data.reason
|
descentData.value = res.data.reason
|
||||||
resembleData.value = res.data.type
|
resembleData.value = res.data.type
|
||||||
picEChart.value = {
|
picEChart.value = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
left: '10px'
|
left: '10px'
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
dataZoom: null,
|
dataZoom: null,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
center: ['60%', '50%'],
|
center: ['60%', '50%'],
|
||||||
radius: '50%',
|
radius: '50%',
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'outside',
|
position: 'outside',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
//数值样式
|
//数值样式
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: res.data.reason
|
data: res.data.reason
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
picEChart1.value = {
|
picEChart1.value = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
left: '10px'
|
left: '10px'
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
dataZoom: null,
|
dataZoom: null,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
center: ['60%', '50%'],
|
center: ['60%', '50%'],
|
||||||
radius: '50%',
|
radius: '50%',
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'outside',
|
position: 'outside',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
//数值样式
|
//数值样式
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: res.data.type
|
data: res.data.type
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.statistics-main {
|
.statistics-main {
|
||||||
// height: 300px;
|
// height: 300px;
|
||||||
display: grid;
|
display: grid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
|
||||||
.statistics-box {
|
.statistics-box {
|
||||||
// height: 300px;
|
// height: 300px;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 2fr 1fr;
|
grid-template-columns: 2fr 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,141 +1,141 @@
|
|||||||
<!--业务用户管理界面-->
|
<!--业务用户管理界面-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<div v-show="addedShow">
|
<div v-show="addedShow">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
<el-input v-model="tableStore.table.params.name" clearable placeholder="筛选数据" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
<el-button type="primary" @click="add" class="ml10" icon="el-icon-Plus">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!--表格-->
|
<!--表格-->
|
||||||
<Table ref="tableRef"></Table>
|
<Table ref="tableRef"></Table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 设计流程 -->
|
<!-- 设计流程 -->
|
||||||
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
||||||
<!-- 配置表单 -->
|
<!-- 配置表单 -->
|
||||||
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import Allocation from './allocation.vue'
|
import Allocation from './allocation.vue'
|
||||||
import { deleteDeploy } from '@/api/process-boot/bpm'
|
import { deleteDeploy } from '@/api/process-boot/bpm'
|
||||||
import { onMounted, provide, ref } from 'vue'
|
import { onMounted, provide, ref } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import editor from './editor/index.vue'
|
import editor from './editor/index.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: '/flowable/definition/index'
|
name: '/flowable/definition/index'
|
||||||
})
|
})
|
||||||
|
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const allocationRef = ref()
|
const allocationRef = ref()
|
||||||
const model = ref({})
|
const model = ref({})
|
||||||
const addedShow = ref(true)
|
const addedShow = ref(true)
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/flowable/definition/list',
|
url: '/process-boot/flowable/definition/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '流程标识', field: 'flowKey' },
|
{ title: '流程标识', field: 'flowKey' },
|
||||||
{ title: '流程分类', field: 'category' },
|
{ title: '流程分类', field: 'category' },
|
||||||
{ title: '流程名称', field: 'name' },
|
{ title: '流程名称', field: 'name' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '业务功能',
|
title: '业务功能',
|
||||||
field: 'formId',
|
field: 'formId',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
return row.cellValue == 1 ? '谐波普测计划' : row.cellValue == 2 ? '干扰源用户管理' : '暂无表单'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '流程版本(V)', field: 'version' },
|
{ title: '流程版本(V)', field: 'version' },
|
||||||
|
|
||||||
|
|
||||||
{ title: '部署时间', field: 'deploymentTime' },
|
{ title: '部署时间', field: 'deploymentTime' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '设计',
|
title: '设计',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
model.value = row
|
model.value = row
|
||||||
addedShow.value = false
|
addedShow.value = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '配置主表单',
|
title: '配置主表单',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
allocationRef.value.open(row)
|
allocationRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteDeploy([row.id]).then(() => {
|
deleteDeploy([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
tableStore.table.params.beginTime = tableStore.table.params.startTime
|
||||||
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
model.value = {}
|
model.value = {}
|
||||||
addedShow.value = false
|
addedShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const quit = () => {
|
const quit = () => {
|
||||||
addedShow.value = true
|
addedShow.value = true
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<div class="statistics-box">
|
<div class="statistics-box">
|
||||||
<MyEChart style="height: 250px" :options="picEChart1" />
|
<MyEChart style="height: 250px" :options="picEChart1" />
|
||||||
<el-table size="small" height="250px" :data="resembleData">
|
<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-column prop="value" label="暂降次数" width="80px" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -144,6 +144,8 @@
|
|||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入监测点名称/终端名称"
|
placeholder="请输入监测点名称/终端名称"
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
|
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
|
||||||
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
|
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,9 +96,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '谐波49次', field: 'i49', minWidth: '80' },
|
{ title: '谐波49次', field: 'i49', minWidth: '80' },
|
||||||
{ title: '谐波50次', field: 'i50', minWidth: '80' },
|
{ title: '谐波50次', field: 'i50', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
|
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ const tableStore = new TableStore({
|
|||||||
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
|
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
|
||||||
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
|
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -184,10 +184,10 @@ const tableStore: any = new TableStore({
|
|||||||
// { field: 'name13', title: '单相负荷', minWidth: 180 },
|
// { field: 'name13', title: '单相负荷', minWidth: 180 },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -152,6 +152,8 @@
|
|||||||
placeholder="请输入监测点名称/终端名称"
|
placeholder="请输入监测点名称/终端名称"
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="异常持续天数"></el-form-item>
|
<!-- <el-form-item label="异常持续天数"></el-form-item>
|
||||||
|
|||||||
@@ -1,155 +1,155 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入问题名称"
|
placeholder="请输入问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="问题审核" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling
|
<Filling
|
||||||
ref="FillingRef"
|
ref="FillingRef"
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
:isDisabled="true"
|
:isDisabled="true"
|
||||||
:audit="true"
|
:audit="true"
|
||||||
:flag="true"
|
:flag="true"
|
||||||
@beforeClose="beforeClose"
|
@beforeClose="beforeClose"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
|
|
||||||
const list: any = ref({})
|
const list: any = ref({})
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
|
|
||||||
{ field: 'dataDate', title: '提交时间' },
|
{ field: 'dataDate', title: '提交时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报节点',
|
title: '填报节点',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '150',
|
width: '150',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
list.value = row
|
list.value = row
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.reportProcessStatus = 'Auditt'
|
tableStore.table.params.reportProcessStatus = 'Auditt'
|
||||||
|
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,255 +1,255 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="问题来源">
|
<el-form-item label="问题来源">
|
||||||
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
<el-select v-model="tableStore.table.params.problemSources" clearable placeholder="请选择问题来源">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in problemData"
|
v-for="item in problemData"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="填报进度">
|
<el-form-item label="填报进度">
|
||||||
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
<el-select v-model="tableStore.table.params.reportProcess" clearable placeholder="请选择填报进度">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fillingProgress"
|
v-for="item in fillingProgress"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
<el-select v-model="tableStore.table.params.reportProcessStatus" clearable placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in auditStatus"
|
v-for="item in auditStatus"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="问题名称">
|
<el-form-item label="问题名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.problemName"
|
v-model="tableStore.table.params.problemName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请填写问题名称"
|
placeholder="请填写问题名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
|
||||||
<!-- 填报 -->
|
<!-- 填报 -->
|
||||||
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
|
||||||
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
<Filling ref="FillingRef" v-if="dialogVisible" @beforeClose="beforeClose" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<Detail ref="detailRef" />
|
<Detail ref="detailRef" />
|
||||||
|
|
||||||
<!-- 审核记录 -->
|
<!-- 审核记录 -->
|
||||||
<recording ref="recordingRef" />
|
<recording ref="recordingRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import NewlyAdd from './NewlyAdd.vue'
|
import NewlyAdd from './NewlyAdd.vue'
|
||||||
import Filling from './filling.vue'
|
import Filling from './filling.vue'
|
||||||
import Detail from './detail.vue'
|
import Detail from './detail.vue'
|
||||||
import recording from './recording.vue'
|
import recording from './recording.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const FillingRef = ref()
|
const FillingRef = ref()
|
||||||
|
|
||||||
const showNewlyAdded = ref(false)
|
const showNewlyAdded = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const recordingRef = ref(false)
|
const recordingRef = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const problemData = dictData.getBasicData('Problem_Sources')
|
const problemData = dictData.getBasicData('Problem_Sources')
|
||||||
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
const fillingProgress = dictData.getBasicData('Fill_Progress')
|
||||||
const auditStatus = dictData.getBasicData('Audit_Status')
|
const auditStatus = dictData.getBasicData('Audit_Status')
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/process-boot/electricityQuality/getIssues',
|
url: '/process-boot/electricityQuality/getIssues',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
// { width: '60', type: 'checkbox' },
|
// { width: '60', type: 'checkbox' },
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'problemSources',
|
field: 'problemSources',
|
||||||
title: '问题来源'
|
title: '问题来源'
|
||||||
},
|
},
|
||||||
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
{ field: 'powerQualityProblemNo', title: '问题编号' },
|
||||||
{ field: 'problemName', title: '问题名称' },
|
{ field: 'problemName', title: '问题名称' },
|
||||||
{ field: 'dataDate', title: '问题新建时间' },
|
{ field: 'dataDate', title: '问题新建时间' },
|
||||||
{
|
{
|
||||||
field: 'reportProcess',
|
field: 'reportProcess',
|
||||||
title: '填报进度',
|
title: '填报进度',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
return fillingProgress.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'reportProcessStatus',
|
field: 'reportProcessStatus',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
return auditStatus.filter(item => item.code == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
detailRef.value.open(row)
|
detailRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '填报',
|
title: '填报',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return (
|
return (
|
||||||
row.reportProcessStatus == 'Auditt' ||
|
row.reportProcessStatus == 'Auditt' ||
|
||||||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
|
||||||
row.reportProcess == 'Archived'
|
row.reportProcess == 'Archived'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
FillingRef.value.open(row)
|
FillingRef.value.open(row)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '归档',
|
title: '归档',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
|
||||||
},
|
},
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-SuccessFilled',
|
icon: 'el-icon-SuccessFilled',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定归档?'
|
title: '确定归档?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
archive(row.powerQualityProblemNo).then(() => {
|
archive(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('归档成功!')
|
ElMessage.success('归档成功!')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核记录',
|
title: '审核记录',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcessStatus == 'Init'
|
return row.reportProcessStatus == 'Init'
|
||||||
},
|
},
|
||||||
icon: 'el-icon-PieChart',
|
icon: 'el-icon-PieChart',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
recordingRef.value.open(row)
|
recordingRef.value.open(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.reportProcess == 'Archived'
|
return row.reportProcess == 'Archived'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteIssues(row.powerQualityProblemNo).then(() => {
|
deleteIssues(row.powerQualityProblemNo).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
tableStore.table.params.dataDate = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
tableStore.table.params.dataType = TableHeaderRef.value.datePickerRef.interval
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.problemName = ''
|
tableStore.table.params.problemName = ''
|
||||||
tableStore.table.params.problemSources = ''
|
tableStore.table.params.problemSources = ''
|
||||||
tableStore.table.params.reportProcess = ''
|
tableStore.table.params.reportProcess = ''
|
||||||
tableStore.table.params.reportProcessStatus = ''
|
tableStore.table.params.reportProcessStatus = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([
|
TableHeaderRef.value.setDatePicker([
|
||||||
{ label: '年', value: 1 },
|
{ label: '年', value: 1 },
|
||||||
{ label: '季', value: 2 },
|
{ label: '季', value: 2 },
|
||||||
{ label: '月', value: 3 }
|
{ label: '月', value: 3 }
|
||||||
])
|
])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
showNewlyAdded.value = true
|
showNewlyAdded.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭弹框
|
// 关闭弹框
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
showNewlyAdded.value = false
|
showNewlyAdded.value = false
|
||||||
}
|
}
|
||||||
// 关闭 填报
|
// 关闭 填报
|
||||||
const beforeClose = () => {
|
const beforeClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item for="-" label="用户名称:" prop="userName">
|
<el-form-item for="-" label="用户名称:" prop="userName">
|
||||||
<el-input v-model="form.userName" clearable style="width: 100%"
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item for="-" label="用户编号:" prop="userNumber">
|
<el-form-item for="-" label="用户编号:" prop="userNumber">
|
||||||
<el-input v-model="form.userNumber" clearable style="width: 100%"
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ const tableStore = new TableStore({
|
|||||||
title: '最新数据时间'
|
title: '最新数据时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入计划名称"
|
placeholder="请输入计划名称"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否解决">
|
<el-form-item label="是否解决">
|
||||||
@@ -104,11 +106,11 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<Area v-model="form.deptId" @change="changeArea" />
|
<Area v-model="form.deptId" @change="changeArea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="计划名称:" prop="planName">
|
<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>
|
||||||
<el-form-item label="监督类型:" prop="supvType">
|
<el-form-item label="监督类型:" prop="supvType">
|
||||||
<el-select v-model="form.supvType" placeholder="请选择监督类型" style="width: 100%" @change="++key">
|
<el-select v-model="form.supvType" placeholder="请选择监督类型" style="width: 100%" @change="++key">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="监督对象名称:" prop="supvObjectName">
|
<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>
|
||||||
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
<el-form-item for="-" label="计划开始时间:" prop="planStartTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|||||||
@@ -1,67 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 审核 -->
|
<!-- 审核 -->
|
||||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{ field: 'planNo', title: '普测计划编号' },
|
{ field: 'planNo', title: '普测计划编号' },
|
||||||
{ field: 'planName', title: '普测计划名称' },
|
{ field: 'planName', title: '普测计划名称' },
|
||||||
{ field: 'planStartTime', title: '开始时间' },
|
{ field: 'planStartTime', title: '开始时间' },
|
||||||
{ field: 'planEndTime', title: '结束时间' },
|
{ field: 'planEndTime', title: '结束时间' },
|
||||||
{ field: 'subCount', title: '普测变电站数量' },
|
{ field: 'subCount', title: '普测变电站数量' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
planAddRef.value.open('计划审核', row)
|
planAddRef.value.open('计划审核', row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '180',
|
minWidth: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,362 +1,362 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="监督类型">
|
<el-form-item label="监督类型">
|
||||||
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择监督类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in supvTypeOptionList"
|
v-for="item in supvTypeOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
import { ref, onMounted, provide, watch, nextTick } from 'vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { cancelTest } from '@/api/process-boot/generalTest'
|
import { cancelTest } from '@/api/process-boot/generalTest'
|
||||||
import planTest from './planTest.vue'
|
import planTest from './planTest.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
|
||||||
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
|
|
||||||
const planTestRef = ref()
|
const planTestRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const auditList: any = ref([])
|
const auditList: any = ref([])
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/surveyTest/surveyTestPage',
|
url: '/supervision-boot/surveyTest/surveyTestPage',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename: '技术监督测试管理',
|
filename: '技术监督测试管理',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
width: '60',
|
width: '60',
|
||||||
type: 'checkbox'
|
type: 'checkbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: 80,
|
width: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
{ field: 'planName', title: '计划名称', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'supvType',
|
field: 'supvType',
|
||||||
title: '监督类型',
|
title: '监督类型',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
return supvTypeOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'supvObjectName',
|
field: 'supvObjectName',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
title: '监督对象名称'
|
title: '监督对象名称'
|
||||||
},
|
},
|
||||||
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
{ field: 'substationName', title: '变电站', minWidth: 140 },
|
||||||
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
{ field: 'planStartTime', title: '计划开始时间', minWidth: 140 },
|
||||||
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
{ field: 'planEndTime', title: '计划结束时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'problemFlag',
|
field: 'problemFlag',
|
||||||
title: '是否存在问题',
|
title: '是否存在问题',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'danger',
|
1: 'danger',
|
||||||
null: 'primary'
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '合格',
|
0: '合格',
|
||||||
1: '存在问题',
|
1: '存在问题',
|
||||||
null: '待测试'
|
null: '待测试'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
{ field: 'deptName', title: '负责单位', minWidth: 140 },
|
||||||
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
{ field: 'completeBy', title: '计划负责人', minWidth: 130 },
|
||||||
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
{ field: 'completeTime', title: '实际完成时间', minWidth: 140 },
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
|
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '待提交审批',
|
0: '待提交审批',
|
||||||
|
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '测试填报',
|
title: '测试填报',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status != 6
|
return row.status != 6
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
add(row.id)
|
add(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || !row.processInstanceId
|
return row.status == 6 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// planTestRef.value.open('查看计划', row)
|
// planTestRef.value.open('查看计划', row)
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 0)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('编辑', row.id, false)
|
planTestRef.value.open('编辑', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
return row.deptId != adminInfo.$state.deptId || !(row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cancel',
|
name: 'cancel',
|
||||||
title: '取消',
|
title: '取消',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
return row.deptId != adminInfo.$state.deptId || row.status != 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
item.problemFlag = item.problemFlag == 0 ? '合格' : item.problemFlag == 1 ? '存在问题' : '待测试'
|
||||||
item.status =
|
item.status =
|
||||||
item.status == 0
|
item.status == 0
|
||||||
? '待提交审批'
|
? '待提交审批'
|
||||||
: item.status == 1
|
: item.status == 1
|
||||||
? '审批中'
|
? '审批中'
|
||||||
: item.status == 2
|
: item.status == 2
|
||||||
? '审批通过'
|
? '审批通过'
|
||||||
: item.status == 3
|
: item.status == 3
|
||||||
? '审批不通过'
|
? '审批不通过'
|
||||||
: '已取消'
|
: '已取消'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.supvType = ''
|
tableStore.table.params.supvType = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = (id: string) => {
|
const add = (id: string) => {
|
||||||
planTestRef.value.open('计划测试填报', id, true)
|
planTestRef.value.open('计划测试填报', id, true)
|
||||||
}
|
}
|
||||||
// 禁止点击
|
// 禁止点击
|
||||||
const checkboxConfig = reactive({
|
const checkboxConfig = reactive({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
? true
|
? true
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const deleteEven = () => {
|
const deleteEven = () => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请选择要删除的数据'
|
message: '请选择要删除的数据'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功!'
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const exportFn = () => {
|
const exportFn = () => {
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
form.pageSize = tableStore.table.total
|
||||||
queryPlan(form).then(res => {
|
queryPlan(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '计划', // 文件名字
|
filename: '计划', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column: any) {
|
columnFilterMethod: function (column: any) {
|
||||||
return !(column.$columnIndex === 0)
|
return !(column.$columnIndex === 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**取消流程操作*/
|
/**取消流程操作*/
|
||||||
const cancelLeave = async (row: any) => {
|
const cancelLeave = async (row: any) => {
|
||||||
// 二次确认
|
// 二次确认
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputType: 'textarea',
|
inputType: 'textarea',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
})
|
})
|
||||||
// 发起取消
|
// 发起取消
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
processInstanceId: row.processInstanceId,
|
processInstanceId: row.processInstanceId,
|
||||||
reason: value
|
reason: value
|
||||||
}
|
}
|
||||||
await cancelTest(data)
|
await cancelTest(data)
|
||||||
ElMessage.success('取消成功')
|
ElMessage.success('取消成功')
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
historyInstanceId
|
historyInstanceId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 取消
|
// 取消
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
getUserByRoleType(3).then(res => {
|
getUserByRoleType(3).then(res => {
|
||||||
auditList.value = res.data
|
auditList.value = res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps(['id', 'businessKey'])
|
const props = defineProps(['id', 'businessKey'])
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
async (newValue, oldValue) => {
|
async (newValue, oldValue) => {
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const fullId = newValue.split('@')[0]
|
const fullId = newValue.split('@')[0]
|
||||||
let nowTime = Date.now()
|
let nowTime = Date.now()
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (props.businessKey == '3') {
|
if (props.businessKey == '3') {
|
||||||
planTestRef.value.open('编辑', fullId, false)
|
planTestRef.value.open('编辑', fullId, false)
|
||||||
} else {
|
} else {
|
||||||
planTestRef.value.open('重新发起计划测试', fullId, false)
|
planTestRef.value.open('重新发起计划测试', fullId, false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'recordTime', title: '建档时间' },
|
{ field: 'recordTime', title: '建档时间' },
|
||||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area ref="TableHeaderRef">
|
<TableHeader area ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="干扰源类型">
|
<el-form-item label="干扰源类型">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in interferenceType"
|
v-for="item in interferenceType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源用户名称">
|
<el-form-item label="干扰源用户名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.userName"
|
v-model="tableStore.table.params.userName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择干扰源用户名称"
|
placeholder="请选择干扰源用户名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联干扰源用户">
|
<el-form-item label="关联干扰源用户">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.relationUserName"
|
v-model="tableStore.table.params.relationUserName"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择关联干扰源用户"
|
placeholder="请选择关联干扰源用户"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否已上传实测">
|
<el-form-item label="是否已上传实测">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.aisFileUpload"
|
v-model="tableStore.table.params.aisFileUpload"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择是否已上传实测"
|
placeholder="请选择是否已上传实测"
|
||||||
>
|
>
|
||||||
<el-option label="否" value="0" />
|
<el-option label="否" value="0" />
|
||||||
<el-option label="是" value="1" />
|
<el-option label="是" value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
<el-button icon="el-icon-Upload" type="primary">上传</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||||
const istatusList = dictData.getBasicData('On-network_Status')
|
const istatusList = dictData.getBasicData('On-network_Status')
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
url: '/process-boot/loadTypeUserManage/getLoadTypeRelationList',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox' },
|
{ width: '60', type: 'checkbox' },
|
||||||
{ field: 'orgName', title: '所属单位' },
|
{ field: 'orgName', title: '所属单位' },
|
||||||
{
|
{
|
||||||
field: 'loadType',
|
field: 'loadType',
|
||||||
title: '干扰源类型',
|
title: '干扰源类型',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'userName', title: '干扰源用户名称' },
|
{ field: 'userName', title: '干扰源用户名称' },
|
||||||
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
{ field: 'relationUserName', title: '关联干扰源用户名称' },
|
||||||
{
|
{
|
||||||
field: 'istatus',
|
field: 'istatus',
|
||||||
title: '实测报告状态',
|
title: '实测报告状态',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
return istatusList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader datePicker nextFlag theCurrentTime showTimeAll showExport ref='TableHeaderRef'>
|
<TableHeader datePicker nextFlag theCurrentTime showTimeAll showExport ref='TableHeaderRef'>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label='项目名称'>
|
<el-form-item label='项目名称'>
|
||||||
<el-input v-model='tableStore.table.params.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>
|
||||||
<el-form-item label='所在地市'>
|
<el-form-item label='所在地市'>
|
||||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||||
@@ -188,9 +188,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
// visible:!jb_pl.value && !jb_dky.value?true:false,
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
{ field: 'createTime', title: '创建时间', minWidth: 100 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="归口管理部门:" prop="responsibleDepartment">
|
<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>
|
||||||
<el-form-item for="-" label="项目名称:" prop="projectName">
|
<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>
|
||||||
<el-form-item for="-" label="用户状态:" prop="userStatus">
|
<el-form-item for="-" label="用户状态:" prop="userStatus">
|
||||||
<el-select v-model="form.userStatus" placeholder="请选择用户状态">
|
<el-select v-model="form.userStatus" placeholder="请选择用户状态">
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="厂站名称:" prop="substation">
|
<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>
|
||||||
<el-form-item for="-" v-if="form.userType == '0' || form.userType == '1'" label="用户协议容量:"
|
<el-form-item for="-" v-if="form.userType == '0' || form.userType == '1'" label="用户协议容量:"
|
||||||
prop="agreementCapacity">
|
prop="agreementCapacity">
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" v-if="form.userType != '0' && form.userType != '1'" label="预测评估评审单位:"
|
<el-form-item for="-" v-if="form.userType != '0' && form.userType != '1'" label="预测评估评审单位:"
|
||||||
prop="evaluationChekDept">
|
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>
|
||||||
<el-form-item for="-" label="预测评估结论:" prop="evaluationConclusion" style="width: 100%">
|
<el-form-item for="-" label="预测评估结论:" prop="evaluationConclusion" style="width: 100%">
|
||||||
<el-input type="textarea" v-model="form.evaluationConclusion" autocomplete="off"
|
<el-input type="textarea" v-model="form.evaluationConclusion" autocomplete="off"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<TableHeader datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="项目名称">
|
<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>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
|
||||||
@@ -167,9 +167,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
|||||||
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
|
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
|
||||||
import { Link, View } from '@element-plus/icons-vue'
|
import { Link, View } from '@element-plus/icons-vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import {download} from '@/utils/fileDownload'
|
import {download} from '@/utils/fileDownLoad'
|
||||||
defineOptions({ name: 'BpmUserReportDetail' })
|
defineOptions({ name: 'BpmUserReportDetail' })
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@@ -1,217 +1,217 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
v-model="dialogFormVisible"
|
v-model="dialogFormVisible"
|
||||||
title="技术监督计划实施问题"
|
title="技术监督计划实施问题"
|
||||||
width="90%"
|
width="90%"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
draggable
|
draggable
|
||||||
custom-class="fixed-dialog"
|
custom-class="fixed-dialog"
|
||||||
@closed="close"
|
@closed="close"
|
||||||
> -->
|
> -->
|
||||||
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
<TableHeader :showSearch="false" ref="TableHeaderRef">
|
||||||
<!-- <template #select>
|
<!-- <template #select>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在地市">
|
<el-form-item label="所在地市">
|
||||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所在地市">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptionList"
|
v-for="item in areaOptionList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template> -->
|
</template> -->
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
<el-button icon="el-icon-Back" @click="go(-1)">返回</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRefs" />
|
<Table ref="tableRefs" />
|
||||||
<!-- </el-dialog> -->
|
<!-- </el-dialog> -->
|
||||||
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
<addForm ref="addFormRef" :planId="planId" @onSubmit="effectTableStore.index()"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
import { addPlanFormData, getUserByDeptId } from '@/api/supervision-boot/plan/index'
|
||||||
import { getAreaList } from '@/api/common'
|
import { getAreaList } from '@/api/common'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'PlanEffectProblem'
|
name: 'PlanEffectProblem'
|
||||||
})
|
})
|
||||||
const emits = defineEmits([''])
|
const emits = defineEmits([''])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
effectProblemForm: {
|
effectProblemForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const planId: any = ref('')
|
const planId: any = ref('')
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const tableRefs = ref()
|
const tableRefs = ref()
|
||||||
//字典获取问题类型
|
//字典获取问题类型
|
||||||
const problemTypeList = dictData.getBasicData('problem_type')
|
const problemTypeList = dictData.getBasicData('problem_type')
|
||||||
//字典整改情况
|
//字典整改情况
|
||||||
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
const rectificationStatusList = dictData.getBasicData('rectification_type')
|
||||||
//字典问题等级
|
//字典问题等级
|
||||||
const problemLevelList = dictData.getBasicData('problem_level_type')
|
const problemLevelList = dictData.getBasicData('problem_level_type')
|
||||||
const effectTableStore = new TableStore({
|
const effectTableStore = new TableStore({
|
||||||
url: '/supervision-boot/superProblem/pageProblem',
|
url: '/supervision-boot/superProblem/pageProblem',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
} },
|
} },
|
||||||
{
|
{
|
||||||
field: 'problemDesc',
|
field: 'problemDesc',
|
||||||
title: '问题描述',
|
title: '问题描述',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevel',
|
field: 'problemLevel',
|
||||||
title: '问题等级',
|
title: '问题等级',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemLevelList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemLevelReason',
|
field: 'problemLevelReason',
|
||||||
title: '定级依据',
|
title: '定级依据',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'problemType',
|
field: 'problemType',
|
||||||
title: '问题类型',
|
title: '问题类型',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
return problemTypeList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
{ field: 'rectificationMeasure', title: '整改措施', minWidth: 170 },
|
||||||
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
{ field: 'rectificationProgramme', title: '整改方案', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'rectificationStatus',
|
field: 'rectificationStatus',
|
||||||
title: '整改情况',
|
title: '整改情况',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
return rectificationStatusList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'rectificationTime',
|
field: 'rectificationTime',
|
||||||
title: '整改时间',
|
title: '整改时间',
|
||||||
minWidth: 170,
|
minWidth: 170,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue.replace('T', ' ')
|
return row.cellValue.replace('T', ' ')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'remark', title: '备注', minWidth: 170 },
|
{ field: 'remark', title: '备注', minWidth: 170 },
|
||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
handleDetail(row)
|
handleDetail(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '修改',
|
title: '修改',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleEdit(row)
|
handleEdit(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
effectTableStore.table.params.orgNo = effectTableStore.table.params.deptIndex
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const { go } = useRouter() // 路由
|
const { go } = useRouter() // 路由
|
||||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||||
planId.value = queryId
|
planId.value = queryId
|
||||||
watch(
|
watch(
|
||||||
() => queryId,
|
() => queryId,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
effectTableStore.table.params.planId = val
|
effectTableStore.table.params.planId = val
|
||||||
effectTableStore.index()
|
effectTableStore.index()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
provide('tableStore', effectTableStore)
|
provide('tableStore', effectTableStore)
|
||||||
const open = () => {
|
const open = () => {
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
dialogFormVisible.value = false
|
dialogFormVisible.value = false
|
||||||
// emits('onSubmit')
|
// emits('onSubmit')
|
||||||
}
|
}
|
||||||
//新增
|
//新增
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
const addFormModel = () => {
|
const addFormModel = () => {
|
||||||
addFormRef.value.open({}, 'add')
|
addFormRef.value.open({}, 'add')
|
||||||
}
|
}
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = (row: any) => {
|
const handleDetail = (row: any) => {
|
||||||
addFormRef.value.open(row, 'detail')
|
addFormRef.value.open(row, 'detail')
|
||||||
}
|
}
|
||||||
//修改
|
//修改
|
||||||
const handleEdit = (row: any) => {
|
const handleEdit = (row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
}
|
}
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -176,9 +176,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,382 +1,384 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、监测点"
|
placeholder="输入变电站、监测点"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
maxlength="32"
|
||||||
</el-form-item>
|
show-word-limit
|
||||||
</template>
|
></el-input>
|
||||||
<template #operation>
|
</el-form-item>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
</template>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
<template #operation>
|
||||||
</template>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</TableHeader>
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<!--表格-->
|
</template>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
</TableHeader>
|
||||||
<!--弹框-->
|
<!--表格-->
|
||||||
<monitor-quit-popup ref="deviceQuitPopup" />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||||
</div>
|
<!--弹框-->
|
||||||
</template>
|
<monitor-quit-popup ref="deviceQuitPopup" />
|
||||||
|
</div>
|
||||||
<script setup lang="ts">
|
</template>
|
||||||
import TableStore from '@/utils/tableStore'
|
|
||||||
import Table from '@/components/table/index.vue'
|
<script setup lang="ts">
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { onMounted, provide, ref, watch } from 'vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
import { onMounted, provide, ref, watch } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { useRouter } from 'vue-router'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
|
||||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
import { ElMessage } from 'element-plus'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||||
const dictData = useDictData()
|
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
const statusSelect = dictData.statusSelect()
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
const dictData = useDictData()
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
const statusSelect = dictData.statusSelect()
|
||||||
//获取登陆用户姓名和部门
|
|
||||||
const adminInfo = useAdminInfo()
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
defineOptions({
|
//获取登陆用户姓名和部门
|
||||||
name: 'supervision/retire'
|
const adminInfo = useAdminInfo()
|
||||||
})
|
defineOptions({
|
||||||
const { push, options, currentRoute } = useRouter()
|
name: 'supervision/retire'
|
||||||
const flag = ref(false)
|
})
|
||||||
const deviceQuitPopup = ref()
|
const { push, options, currentRoute } = useRouter()
|
||||||
const tableStore = new TableStore({
|
const flag = ref(false)
|
||||||
url: '/supervision-boot/quitRunningDevice/list',
|
const deviceQuitPopup = ref()
|
||||||
method: 'POST',
|
const tableStore = new TableStore({
|
||||||
publicHeight: 65,
|
url: '/supervision-boot/quitRunningDevice/list',
|
||||||
filename:'监测点状态管理',
|
method: 'POST',
|
||||||
column: [
|
publicHeight: 65,
|
||||||
{
|
filename:'监测点状态管理',
|
||||||
width: '60',
|
column: [
|
||||||
type: 'checkbox'
|
{
|
||||||
},
|
width: '60',
|
||||||
{
|
type: 'checkbox'
|
||||||
field: 'index',
|
},
|
||||||
title: '序号',
|
{
|
||||||
width: '80',
|
field: 'index',
|
||||||
formatter: (row: any) => {
|
title: '序号',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
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: 'gdName', minWidth: 130 },
|
||||||
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||||
{
|
{ title: '监测点', field: 'deviceName', minWidth: 200 },
|
||||||
title: '变更前状态',
|
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
|
||||||
field: 'devOriginalStatus',
|
{
|
||||||
minWidth: 130,
|
title: '变更前状态',
|
||||||
render: 'tag',
|
field: 'devOriginalStatus',
|
||||||
custom: {
|
minWidth: 130,
|
||||||
0: 'success',
|
render: 'tag',
|
||||||
1: 'warning',
|
custom: {
|
||||||
2: 'danger',
|
0: 'success',
|
||||||
3: 'warning',
|
1: 'warning',
|
||||||
4: 'info',
|
2: 'danger',
|
||||||
null: 'primary'
|
3: 'warning',
|
||||||
},
|
4: 'info',
|
||||||
|
null: 'primary'
|
||||||
replaceValue: {
|
},
|
||||||
0: '投运',
|
|
||||||
1: '检修',
|
replaceValue: {
|
||||||
2: '停运',
|
0: '投运',
|
||||||
3: '调试',
|
1: '检修',
|
||||||
4: '退运',
|
2: '停运',
|
||||||
null: '/'
|
3: '调试',
|
||||||
}
|
4: '退运',
|
||||||
},
|
null: '/'
|
||||||
{
|
}
|
||||||
title: '目标状态',
|
},
|
||||||
field: 'devStatus',
|
{
|
||||||
minWidth: 130,
|
title: '目标状态',
|
||||||
render: 'tag',
|
field: 'devStatus',
|
||||||
custom: {
|
minWidth: 130,
|
||||||
0: 'success',
|
render: 'tag',
|
||||||
1: 'warning',
|
custom: {
|
||||||
2: 'danger',
|
0: 'success',
|
||||||
3: 'warning',
|
1: 'warning',
|
||||||
4: 'info',
|
2: 'danger',
|
||||||
null: 'primary'
|
3: 'warning',
|
||||||
},
|
4: 'info',
|
||||||
replaceValue: {
|
null: 'primary'
|
||||||
0: '投运',
|
},
|
||||||
1: '检修',
|
replaceValue: {
|
||||||
2: '停运',
|
0: '投运',
|
||||||
3: '调试',
|
1: '检修',
|
||||||
4: '退运',
|
2: '停运',
|
||||||
null: '/'
|
3: '调试',
|
||||||
}
|
4: '退运',
|
||||||
},
|
null: '/'
|
||||||
{
|
}
|
||||||
field: 'status',
|
},
|
||||||
title: '流程状态',
|
{
|
||||||
minWidth: 100,
|
field: 'status',
|
||||||
render: 'tag',
|
title: '流程状态',
|
||||||
custom: {
|
minWidth: 100,
|
||||||
0: 'warning',
|
render: 'tag',
|
||||||
1: 'primary',
|
custom: {
|
||||||
2: 'success',
|
0: 'warning',
|
||||||
3: 'danger',
|
1: 'primary',
|
||||||
4: 'warning',
|
2: 'success',
|
||||||
null: 'primary'
|
3: 'danger',
|
||||||
},
|
4: 'warning',
|
||||||
replaceValue: {
|
null: 'primary'
|
||||||
0: '待提交审批',
|
},
|
||||||
1: '审批中',
|
replaceValue: {
|
||||||
2: '审批通过',
|
0: '待提交审批',
|
||||||
3: '审批不通过',
|
1: '审批中',
|
||||||
4: '已取消',
|
2: '审批通过',
|
||||||
null: '/'
|
3: '审批不通过',
|
||||||
}
|
4: '已取消',
|
||||||
},
|
null: '/'
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
}
|
||||||
{
|
},
|
||||||
field: 'createBy',
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
title: '填报人',
|
{
|
||||||
minWidth: 80,
|
field: 'createBy',
|
||||||
formatter: (row: any) => {
|
title: '填报人',
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
minWidth: 80,
|
||||||
}
|
formatter: (row: any) => {
|
||||||
},
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
{
|
}
|
||||||
title: '操作',
|
},
|
||||||
align: 'center',
|
{
|
||||||
minWidth: '150',
|
title: '操作',fixed: 'right',
|
||||||
fixed: 'right',
|
align: 'center',
|
||||||
render: 'buttons',
|
minWidth: '150',
|
||||||
buttons: [
|
|
||||||
{
|
render: 'buttons',
|
||||||
name: 'productSetting',
|
buttons: [
|
||||||
title: '流程详情',
|
{
|
||||||
type: 'primary',
|
name: 'productSetting',
|
||||||
icon: 'el-icon-EditPen',
|
title: '流程详情',
|
||||||
render: 'basicButton',
|
type: 'primary',
|
||||||
disabled: row => {
|
icon: 'el-icon-EditPen',
|
||||||
return !row.processInstanceId
|
render: 'basicButton',
|
||||||
},
|
disabled: row => {
|
||||||
click: row => {
|
return !row.processInstanceId
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
},
|
||||||
}
|
click: row => {
|
||||||
},
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
{
|
}
|
||||||
name: 'edit',
|
},
|
||||||
title: '编辑',
|
{
|
||||||
type: 'primary',
|
name: 'edit',
|
||||||
icon: 'el-icon-Open',
|
title: '编辑',
|
||||||
render: 'basicButton',
|
type: 'primary',
|
||||||
showDisabled: row => {
|
icon: 'el-icon-Open',
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
render: 'basicButton',
|
||||||
},
|
showDisabled: row => {
|
||||||
disabled: row => {
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
return !(row.status == 0)
|
},
|
||||||
},
|
disabled: row => {
|
||||||
click: row => {
|
return !(row.status == 0)
|
||||||
deviceQuitPopup.value.open('编辑', row)
|
},
|
||||||
}
|
click: row => {
|
||||||
},
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
{
|
}
|
||||||
name: 'edit',
|
},
|
||||||
title: '重新发起',
|
{
|
||||||
type: 'warning',
|
name: 'edit',
|
||||||
icon: 'el-icon-Open',
|
title: '重新发起',
|
||||||
render: 'basicButton',
|
type: 'warning',
|
||||||
disabled: row => {
|
icon: 'el-icon-Open',
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
render: 'basicButton',
|
||||||
},
|
disabled: row => {
|
||||||
click: row => {
|
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||||
deviceQuitPopup.value.open('重新发起', row)
|
},
|
||||||
}
|
click: row => {
|
||||||
},
|
deviceQuitPopup.value.open('重新发起', row)
|
||||||
{
|
}
|
||||||
name: 'cancel',
|
},
|
||||||
title: '取消',
|
{
|
||||||
type: 'danger',
|
name: 'cancel',
|
||||||
icon: 'el-icon-Open',
|
title: '取消',
|
||||||
render: 'basicButton',
|
type: 'danger',
|
||||||
disabled: row => {
|
icon: 'el-icon-Open',
|
||||||
return row.createBy != adminInfo.$state.id || row.status !== 1
|
render: 'basicButton',
|
||||||
},
|
disabled: row => {
|
||||||
click: row => {
|
return row.createBy != adminInfo.$state.id || row.status !== 1
|
||||||
cancelLeave(row)
|
},
|
||||||
}
|
click: row => {
|
||||||
}
|
cancelLeave(row)
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
beforeSearchFun: () => {
|
}
|
||||||
// for (let key in tableStore.table.params) {
|
],
|
||||||
// if (tableStore.table.params[key] === '') {
|
beforeSearchFun: () => {
|
||||||
// delete tableStore.table.params[key]
|
// 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.params.deviceType = 2
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
},
|
||||||
item.devOriginalStatus =
|
exportProcessingData: () => {
|
||||||
item.devOriginalStatus == 0
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
? '运行'
|
item.devOriginalStatus =
|
||||||
: item.devOriginalStatus == 1
|
item.devOriginalStatus == 0
|
||||||
? '检修'
|
? '运行'
|
||||||
: item.devOriginalStatus == 2
|
: item.devOriginalStatus == 1
|
||||||
? '停运'
|
? '检修'
|
||||||
: item.devOriginalStatus == 3
|
: item.devOriginalStatus == 2
|
||||||
? '调试'
|
? '停运'
|
||||||
: item.devOriginalStatus == 4
|
: item.devOriginalStatus == 3
|
||||||
? '退运'
|
? '调试'
|
||||||
: '/'
|
: item.devOriginalStatus == 4
|
||||||
item.devStatus =
|
? '退运'
|
||||||
item.devStatus == 0
|
: '/'
|
||||||
? '运行'
|
item.devStatus =
|
||||||
: item.devStatus == 1
|
item.devStatus == 0
|
||||||
? '检修'
|
? '运行'
|
||||||
: item.devStatus == 2
|
: item.devStatus == 1
|
||||||
? '停运'
|
? '检修'
|
||||||
: item.devStatus == 3
|
: item.devStatus == 2
|
||||||
? '调试'
|
? '停运'
|
||||||
: item.devStatus == 4
|
: item.devStatus == 3
|
||||||
? '退运'
|
? '调试'
|
||||||
: '/'
|
: item.devStatus == 4
|
||||||
item.status =
|
? '退运'
|
||||||
item.status == 0
|
: '/'
|
||||||
? '待提交审批'
|
item.status =
|
||||||
: item.status == 1
|
item.status == 0
|
||||||
? '审批中'
|
? '待提交审批'
|
||||||
: item.status == 2
|
: item.status == 1
|
||||||
? '审批通过'
|
? '审批中'
|
||||||
: item.status == 3
|
: item.status == 2
|
||||||
? '审批不通过'
|
? '审批通过'
|
||||||
: item.status == 4
|
: item.status == 3
|
||||||
? '已取消'
|
? '审批不通过'
|
||||||
: item.status == 5
|
: item.status == 4
|
||||||
? '新增'
|
? '已取消'
|
||||||
: '/'
|
: item.status == 5
|
||||||
return item
|
? '新增'
|
||||||
})
|
: '/'
|
||||||
}
|
return item
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
}
|
||||||
tableStore.table.params.status = ''
|
})
|
||||||
provide('tableStore', tableStore)
|
tableStore.table.params.searchValue = ''
|
||||||
|
tableStore.table.params.status = ''
|
||||||
//新增退运终端信息
|
provide('tableStore', tableStore)
|
||||||
const add = () => {
|
|
||||||
deviceQuitPopup.value.open('新增监测点状态变更')
|
//新增退运终端信息
|
||||||
}
|
const add = () => {
|
||||||
|
deviceQuitPopup.value.open('新增监测点状态变更')
|
||||||
// 禁止点击
|
}
|
||||||
const checkboxConfig = reactive({
|
|
||||||
checkMethod: ({ row }) => {
|
// 禁止点击
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
const checkboxConfig = reactive({
|
||||||
? true
|
checkMethod: ({ row }) => {
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
}
|
? true
|
||||||
})
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
const deleteEven = () => {
|
}
|
||||||
if (tableStore.table.selection.length == 0) {
|
})
|
||||||
ElMessage({
|
const deleteEven = () => {
|
||||||
type: 'warning',
|
if (tableStore.table.selection.length == 0) {
|
||||||
message: '请选择要删除的数据'
|
ElMessage({
|
||||||
})
|
type: 'warning',
|
||||||
} else {
|
message: '请选择要删除的数据'
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
})
|
||||||
confirmButtonText: '确定',
|
} else {
|
||||||
cancelButtonText: '取消',
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
type: 'warning'
|
confirmButtonText: '确定',
|
||||||
}).then(() => {
|
cancelButtonText: '取消',
|
||||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
type: 'warning'
|
||||||
ElMessage({
|
}).then(() => {
|
||||||
type: 'success',
|
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
message: '删除成功!'
|
ElMessage({
|
||||||
})
|
type: 'success',
|
||||||
tableStore.index()
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
})
|
tableStore.index()
|
||||||
}
|
})
|
||||||
}
|
})
|
||||||
/** 流程实例详情 */
|
}
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
}
|
||||||
push({
|
/** 流程实例详情 */
|
||||||
name: 'BpmProcessInstanceDetail',
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
state: {
|
push({
|
||||||
id: instanceId,
|
name: 'BpmProcessInstanceDetail',
|
||||||
historyInstanceId
|
state: {
|
||||||
}
|
id: instanceId,
|
||||||
})
|
historyInstanceId
|
||||||
}
|
}
|
||||||
|
})
|
||||||
/**取消流程操作*/
|
}
|
||||||
const cancelLeave = async (row: any) => {
|
|
||||||
// 二次确认
|
/**取消流程操作*/
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
const cancelLeave = async (row: any) => {
|
||||||
confirmButtonText: '确定',
|
// 二次确认
|
||||||
cancelButtonText: '取消',
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
inputType: 'textarea',
|
confirmButtonText: '确定',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
cancelButtonText: '取消',
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputType: 'textarea',
|
||||||
})
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
// 发起取消
|
inputErrorMessage: '取消原因不能为空'
|
||||||
let data = {
|
})
|
||||||
id: row.id,
|
// 发起取消
|
||||||
processInstanceId: row.processInstanceId,
|
let data = {
|
||||||
reason: value
|
id: row.id,
|
||||||
}
|
processInstanceId: row.processInstanceId,
|
||||||
await cancelQuitRunningDevice(data)
|
reason: value
|
||||||
ElMessage.success('取消成功')
|
}
|
||||||
// 加载数据
|
await cancelQuitRunningDevice(data)
|
||||||
tableStore.index()
|
ElMessage.success('取消成功')
|
||||||
}
|
// 加载数据
|
||||||
|
tableStore.index()
|
||||||
onMounted(() => {
|
}
|
||||||
// 加载数据
|
|
||||||
tableStore.index()
|
onMounted(() => {
|
||||||
})
|
// 加载数据
|
||||||
watch(
|
tableStore.index()
|
||||||
() => currentRoute.value.path,
|
})
|
||||||
() => {
|
watch(
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
() => currentRoute.value.path,
|
||||||
tableStore.index()
|
() => {
|
||||||
flag.value = false
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
}
|
tableStore.index()
|
||||||
},
|
flag.value = false
|
||||||
{
|
}
|
||||||
deep: true
|
},
|
||||||
}
|
{
|
||||||
)
|
deep: true
|
||||||
|
}
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
)
|
||||||
watch(
|
|
||||||
() => props.id,
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
async (newValue, oldValue) => {
|
watch(
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
() => props.id,
|
||||||
const fullId = newValue.split('@')[0]
|
async (newValue, oldValue) => {
|
||||||
let nowTime = Date.now()
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
const fullId = newValue.split('@')[0]
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
let nowTime = Date.now()
|
||||||
await getRunningDeviceById(fullId).then(res => {
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
if (res && res.code == 'A0000') {
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
deviceQuitPopup.value.open('重新发起', res.data)
|
await getRunningDeviceById(fullId).then(res => {
|
||||||
}
|
if (res && res.code == 'A0000') {
|
||||||
})
|
deviceQuitPopup.value.open('重新发起', res.data)
|
||||||
},
|
}
|
||||||
{ immediate: true }
|
})
|
||||||
)
|
},
|
||||||
</script>
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,378 +1,381 @@
|
|||||||
<!--待办事项列表-->
|
<!--待办事项列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
<TableHeader date-picker nextFlag theCurrentTime showTimeAll showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusSelect"
|
v-for="item in statusSelect"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="搜索">
|
<el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、终端"
|
placeholder="输入变电站、终端"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
maxlength="32"
|
||||||
</el-form-item>
|
show-word-limit
|
||||||
</template>
|
|
||||||
<template #operation>
|
></el-input>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
</el-form-item>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
</template>
|
||||||
</template>
|
<template #operation>
|
||||||
</TableHeader>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
<!--表格-->
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
</template>
|
||||||
<!--弹框-->
|
</TableHeader>
|
||||||
<device-quit-popup ref="deviceQuitPopup" />
|
<!--表格-->
|
||||||
</div>
|
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||||
</template>
|
<!--弹框-->
|
||||||
|
<device-quit-popup ref="deviceQuitPopup" />
|
||||||
<script setup lang="ts">
|
</div>
|
||||||
import TableStore from '@/utils/tableStore'
|
</template>
|
||||||
import Table from '@/components/table/index.vue'
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
<script setup lang="ts">
|
||||||
import { onMounted, provide, ref, watch } from 'vue'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { useRouter } from 'vue-router'
|
import Table from '@/components/table/index.vue'
|
||||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { onMounted, provide, ref, watch } from 'vue'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { useRouter } from 'vue-router'
|
||||||
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { ElMessage } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
import { cancelQuitRunningDevice, getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
|
||||||
const dictData = useDictData()
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
const statusSelect = dictData.statusSelect()
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||||
//获取登陆用户姓名和部门
|
const dictData = useDictData()
|
||||||
const adminInfo = useAdminInfo()
|
const statusSelect = dictData.statusSelect()
|
||||||
defineOptions({
|
|
||||||
name: 'supervision/retire'
|
//获取登陆用户姓名和部门
|
||||||
})
|
const adminInfo = useAdminInfo()
|
||||||
const { push, options, currentRoute } = useRouter()
|
defineOptions({
|
||||||
const flag = ref(false)
|
name: 'supervision/retire'
|
||||||
const deviceQuitPopup = ref()
|
})
|
||||||
const tableStore = new TableStore({
|
const { push, options, currentRoute } = useRouter()
|
||||||
url: '/supervision-boot/quitRunningDevice/list',
|
const flag = ref(false)
|
||||||
method: 'POST',
|
const deviceQuitPopup = ref()
|
||||||
publicHeight: 65,
|
const tableStore = new TableStore({
|
||||||
filename:'终端状态管理',
|
url: '/supervision-boot/quitRunningDevice/list',
|
||||||
column: [
|
method: 'POST',
|
||||||
{
|
publicHeight: 65,
|
||||||
width: '60',
|
filename:'终端状态管理',
|
||||||
type: 'checkbox'
|
column: [
|
||||||
},
|
{
|
||||||
{
|
width: '60',
|
||||||
field: 'index',
|
type: 'checkbox'
|
||||||
title: '序号',
|
},
|
||||||
width: '80',
|
{
|
||||||
formatter: (row: any) => {
|
field: 'index',
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
title: '序号',
|
||||||
}
|
width: '80',
|
||||||
},
|
formatter: (row: any) => {
|
||||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
}
|
||||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
},
|
||||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||||
{
|
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||||
title: '变更前状态',
|
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||||
field: 'devOriginalStatus',
|
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||||
minWidth: 130,
|
{
|
||||||
render: 'tag',
|
title: '变更前状态',
|
||||||
custom: {
|
field: 'devOriginalStatus',
|
||||||
0: 'success',
|
minWidth: 130,
|
||||||
1: 'warning',
|
render: 'tag',
|
||||||
2: 'danger',
|
custom: {
|
||||||
3: 'warning',
|
0: 'success',
|
||||||
4: 'info',
|
1: 'warning',
|
||||||
null: 'primary'
|
2: 'danger',
|
||||||
},
|
3: 'warning',
|
||||||
replaceValue: {
|
4: 'info',
|
||||||
0: '运行',
|
null: 'primary'
|
||||||
1: '检修',
|
},
|
||||||
2: '停运',
|
replaceValue: {
|
||||||
3: '调试',
|
0: '运行',
|
||||||
4: '退运',
|
1: '检修',
|
||||||
null: '/'
|
2: '停运',
|
||||||
}
|
3: '调试',
|
||||||
},
|
4: '退运',
|
||||||
{
|
null: '/'
|
||||||
title: '目标状态',
|
}
|
||||||
field: 'devStatus',
|
},
|
||||||
minWidth: 130,
|
{
|
||||||
render: 'tag',
|
title: '目标状态',
|
||||||
custom: {
|
field: 'devStatus',
|
||||||
0: 'success',
|
minWidth: 130,
|
||||||
1: 'warning',
|
render: 'tag',
|
||||||
2: 'danger',
|
custom: {
|
||||||
3: 'warning',
|
0: 'success',
|
||||||
4: 'info',
|
1: 'warning',
|
||||||
null: 'primary'
|
2: 'danger',
|
||||||
},
|
3: 'warning',
|
||||||
replaceValue: {
|
4: 'info',
|
||||||
0: '运行',
|
null: 'primary'
|
||||||
1: '检修',
|
},
|
||||||
2: '停运',
|
replaceValue: {
|
||||||
3: '调试',
|
0: '运行',
|
||||||
4: '退运',
|
1: '检修',
|
||||||
null: '/'
|
2: '停运',
|
||||||
}
|
3: '调试',
|
||||||
},
|
4: '退运',
|
||||||
{
|
null: '/'
|
||||||
field: 'status',
|
}
|
||||||
title: '流程状态',
|
},
|
||||||
minWidth: 100,
|
{
|
||||||
render: 'tag',
|
field: 'status',
|
||||||
custom: {
|
title: '流程状态',
|
||||||
0: 'warning',
|
minWidth: 100,
|
||||||
1: 'primary',
|
render: 'tag',
|
||||||
2: 'success',
|
custom: {
|
||||||
3: 'danger',
|
0: 'warning',
|
||||||
4: 'warning'
|
1: 'primary',
|
||||||
},
|
2: 'success',
|
||||||
replaceValue: {
|
3: 'danger',
|
||||||
0: '待提交审批',
|
4: 'warning'
|
||||||
1: '审批中',
|
},
|
||||||
2: '审批通过',
|
replaceValue: {
|
||||||
3: '审批不通过',
|
0: '待提交审批',
|
||||||
4: '已取消'
|
1: '审批中',
|
||||||
}
|
2: '审批通过',
|
||||||
},
|
3: '审批不通过',
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
4: '已取消'
|
||||||
{
|
}
|
||||||
field: 'createBy',
|
},
|
||||||
title: '填报人',
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
minWidth: 80,
|
{
|
||||||
formatter: (row: any) => {
|
field: 'createBy',
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
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',
|
title: '操作',fixed: 'right',
|
||||||
render: 'buttons',
|
align: 'center',
|
||||||
buttons: [
|
minWidth: '150',
|
||||||
{
|
|
||||||
name: 'productSetting',
|
render: 'buttons',
|
||||||
title: '流程详情',
|
buttons: [
|
||||||
type: 'primary',
|
{
|
||||||
icon: 'el-icon-EditPen',
|
name: 'productSetting',
|
||||||
render: 'basicButton',
|
title: '流程详情',
|
||||||
disabled: row => {
|
type: 'primary',
|
||||||
return !row.processInstanceId
|
icon: 'el-icon-EditPen',
|
||||||
},
|
render: 'basicButton',
|
||||||
click: row => {
|
disabled: row => {
|
||||||
flag.value = true
|
return !row.processInstanceId
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
},
|
||||||
}
|
click: row => {
|
||||||
},
|
flag.value = true
|
||||||
{
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
name: 'edit',
|
}
|
||||||
title: '编辑',
|
},
|
||||||
type: 'primary',
|
{
|
||||||
icon: 'el-icon-Open',
|
name: 'edit',
|
||||||
render: 'basicButton',
|
title: '编辑',
|
||||||
showDisabled: row => {
|
type: 'primary',
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
icon: 'el-icon-Open',
|
||||||
},
|
render: 'basicButton',
|
||||||
disabled: row => {
|
showDisabled: row => {
|
||||||
return !(row.status == 0)
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
},
|
},
|
||||||
click: row => {
|
disabled: row => {
|
||||||
deviceQuitPopup.value.open('编辑', row)
|
return !(row.status == 0)
|
||||||
}
|
},
|
||||||
},
|
click: row => {
|
||||||
{
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
name: 'edit',
|
}
|
||||||
title: '重新发起',
|
},
|
||||||
type: 'warning',
|
{
|
||||||
icon: 'el-icon-Open',
|
name: 'edit',
|
||||||
render: 'basicButton',
|
title: '重新发起',
|
||||||
disabled: row => {
|
type: 'warning',
|
||||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
icon: 'el-icon-Open',
|
||||||
},
|
render: 'basicButton',
|
||||||
click: row => {
|
disabled: row => {
|
||||||
deviceQuitPopup.value.open('重新发起', 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',
|
name: 'cancel',
|
||||||
render: 'basicButton',
|
title: '取消',
|
||||||
disabled: row => {
|
type: 'danger',
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
icon: 'el-icon-Open',
|
||||||
},
|
render: 'basicButton',
|
||||||
click: row => {
|
disabled: row => {
|
||||||
cancelLeave(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]
|
beforeSearchFun: () => {
|
||||||
// }
|
// for (let key in tableStore.table.params) {
|
||||||
// }
|
// if (tableStore.table.params[key] === '') {
|
||||||
tableStore.table.params.deviceType = 1
|
// delete tableStore.table.params[key]
|
||||||
},
|
// }
|
||||||
exportProcessingData: () => {
|
// }
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.params.deviceType = 1
|
||||||
item.devOriginalStatus =
|
},
|
||||||
item.devOriginalStatus == 0
|
exportProcessingData: () => {
|
||||||
? '运行'
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
: item.devOriginalStatus == 1
|
item.devOriginalStatus =
|
||||||
? '检修'
|
item.devOriginalStatus == 0
|
||||||
: item.devOriginalStatus == 2
|
? '运行'
|
||||||
? '停运'
|
: item.devOriginalStatus == 1
|
||||||
: item.devOriginalStatus == 3
|
? '检修'
|
||||||
? '调试'
|
: item.devOriginalStatus == 2
|
||||||
: item.devOriginalStatus == 4
|
? '停运'
|
||||||
? '退运'
|
: item.devOriginalStatus == 3
|
||||||
: '/'
|
? '调试'
|
||||||
item.devStatus =
|
: item.devOriginalStatus == 4
|
||||||
item.devStatus == 0
|
? '退运'
|
||||||
? '运行'
|
: '/'
|
||||||
: item.devStatus == 1
|
item.devStatus =
|
||||||
? '检修'
|
item.devStatus == 0
|
||||||
: item.devStatus == 2
|
? '运行'
|
||||||
? '停运'
|
: item.devStatus == 1
|
||||||
: item.devStatus == 3
|
? '检修'
|
||||||
? '调试'
|
: item.devStatus == 2
|
||||||
: item.devStatus == 4
|
? '停运'
|
||||||
? '退运'
|
: item.devStatus == 3
|
||||||
: '/'
|
? '调试'
|
||||||
item.status =
|
: item.devStatus == 4
|
||||||
item.status == 0
|
? '退运'
|
||||||
? '待提交审批'
|
: '/'
|
||||||
: item.status == 1
|
item.status =
|
||||||
? '审批中'
|
item.status == 0
|
||||||
: item.status == 2
|
? '待提交审批'
|
||||||
? '审批通过'
|
: item.status == 1
|
||||||
: item.status == 3
|
? '审批中'
|
||||||
? '审批不通过'
|
: item.status == 2
|
||||||
: item.status == 4
|
? '审批通过'
|
||||||
? '已取消'
|
: item.status == 3
|
||||||
: item.status == 5
|
? '审批不通过'
|
||||||
? '新增'
|
: item.status == 4
|
||||||
: '/'
|
? '已取消'
|
||||||
return item
|
: item.status == 5
|
||||||
})
|
? '新增'
|
||||||
}
|
: '/'
|
||||||
})
|
return item
|
||||||
tableStore.table.params.status = ''
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
}
|
||||||
provide('tableStore', tableStore)
|
})
|
||||||
|
tableStore.table.params.status = ''
|
||||||
//新增退运终端信息
|
tableStore.table.params.searchValue = ''
|
||||||
const add = () => {
|
provide('tableStore', tableStore)
|
||||||
deviceQuitPopup.value.open('新增终端状态变更')
|
|
||||||
}
|
//新增退运终端信息
|
||||||
// 禁止点击
|
const add = () => {
|
||||||
const checkboxConfig = reactive({
|
deviceQuitPopup.value.open('新增终端状态变更')
|
||||||
checkMethod: ({ row }) => {
|
}
|
||||||
return adminInfo.roleCode.includes('delete_info')
|
// 禁止点击
|
||||||
? true
|
const checkboxConfig = reactive({
|
||||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
checkMethod: ({ row }) => {
|
||||||
}
|
return adminInfo.roleCode.includes('delete_info')
|
||||||
})
|
? true
|
||||||
const deleteEven = () => {
|
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||||
if (tableStore.table.selection.length == 0) {
|
}
|
||||||
ElMessage({
|
})
|
||||||
type: 'warning',
|
const deleteEven = () => {
|
||||||
message: '请选择要删除的数据'
|
if (tableStore.table.selection.length == 0) {
|
||||||
})
|
ElMessage({
|
||||||
} else {
|
type: 'warning',
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
message: '请选择要删除的数据'
|
||||||
confirmButtonText: '确定',
|
})
|
||||||
cancelButtonText: '取消',
|
} else {
|
||||||
type: 'warning'
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
}).then(() => {
|
confirmButtonText: '确定',
|
||||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
cancelButtonText: '取消',
|
||||||
ElMessage({
|
type: 'warning'
|
||||||
type: 'success',
|
}).then(() => {
|
||||||
message: '删除成功!'
|
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||||
})
|
ElMessage({
|
||||||
tableStore.index()
|
type: 'success',
|
||||||
})
|
message: '删除成功!'
|
||||||
})
|
})
|
||||||
}
|
tableStore.index()
|
||||||
}
|
})
|
||||||
/** 流程实例详情 */
|
})
|
||||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
}
|
||||||
push({
|
}
|
||||||
name: 'BpmProcessInstanceDetail',
|
/** 流程实例详情 */
|
||||||
state: {
|
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||||
id: instanceId,
|
push({
|
||||||
historyInstanceId
|
name: 'BpmProcessInstanceDetail',
|
||||||
}
|
state: {
|
||||||
})
|
id: instanceId,
|
||||||
}
|
historyInstanceId
|
||||||
|
}
|
||||||
/**取消流程操作*/
|
})
|
||||||
const cancelLeave = async (row: any) => {
|
}
|
||||||
// 二次确认
|
|
||||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
/**取消流程操作*/
|
||||||
confirmButtonText: '确定',
|
const cancelLeave = async (row: any) => {
|
||||||
cancelButtonText: '取消',
|
// 二次确认
|
||||||
inputType: 'textarea',
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
confirmButtonText: '确定',
|
||||||
inputErrorMessage: '取消原因不能为空'
|
cancelButtonText: '取消',
|
||||||
})
|
inputType: 'textarea',
|
||||||
// 发起取消
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
let data = {
|
inputErrorMessage: '取消原因不能为空'
|
||||||
id: row.id,
|
})
|
||||||
processInstanceId: row.processInstanceId,
|
// 发起取消
|
||||||
reason: value
|
let data = {
|
||||||
}
|
id: row.id,
|
||||||
await cancelQuitRunningDevice(data)
|
processInstanceId: row.processInstanceId,
|
||||||
ElMessage.success('取消成功')
|
reason: value
|
||||||
// 加载数据
|
}
|
||||||
tableStore.index()
|
await cancelQuitRunningDevice(data)
|
||||||
}
|
ElMessage.success('取消成功')
|
||||||
|
// 加载数据
|
||||||
onMounted(() => {
|
tableStore.index()
|
||||||
// 加载数据
|
}
|
||||||
tableStore.index()
|
|
||||||
})
|
onMounted(() => {
|
||||||
watch(
|
// 加载数据
|
||||||
() => currentRoute.value.path,
|
tableStore.index()
|
||||||
() => {
|
})
|
||||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
watch(
|
||||||
tableStore.index()
|
() => currentRoute.value.path,
|
||||||
flag.value = false
|
() => {
|
||||||
}
|
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||||
},
|
tableStore.index()
|
||||||
{
|
flag.value = false
|
||||||
deep: true
|
}
|
||||||
}
|
},
|
||||||
)
|
{
|
||||||
|
deep: true
|
||||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
}
|
||||||
watch(
|
)
|
||||||
() => props.id,
|
|
||||||
async (newValue, oldValue) => {
|
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
watch(
|
||||||
const fullId = newValue.split('@')[0]
|
() => props.id,
|
||||||
let nowTime = Date.now()
|
async (newValue, oldValue) => {
|
||||||
const routeTime = Number(newValue.split('@')[1])
|
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
const fullId = newValue.split('@')[0]
|
||||||
await getRunningDeviceById(fullId).then(res => {
|
let nowTime = Date.now()
|
||||||
if (res && res.code == 'A0000') {
|
const routeTime = Number(newValue.split('@')[1])
|
||||||
deviceQuitPopup.value.open('重新发起', res.data)
|
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>
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -221,11 +221,11 @@ const tableStore = new TableStore({
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '220',
|
minWidth: '220',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -138,11 +138,11 @@ const tableStore = new TableStore({
|
|||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: '220',
|
minWidth: '220',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
|
|||||||
@@ -1,214 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择筛选数据"
|
placeholder="请选择筛选数据"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<MyEChart style="flex: 1.2" :options="options1" />
|
<MyEChart style="flex: 1.2" :options="options1" />
|
||||||
<MyEChart style="flex: 2" :options="options2" />
|
<MyEChart style="flex: 2" :options="options2" />
|
||||||
</div>
|
</div>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { info } from 'console'
|
import { info } from 'console'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const options1 = ref({})
|
const options1 = ref({})
|
||||||
const options2 = ref({})
|
const options2 = ref({})
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/system-boot/area/areaSelect',
|
||||||
publicHeight: 345,
|
publicHeight: 345,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '事务名称' },
|
{ field: 'name', title: '事务名称' },
|
||||||
{ field: 'type', title: '事务类型' },
|
{ field: 'type', title: '事务类型' },
|
||||||
{ field: 'createUser', title: '创建人员' },
|
{ field: 'createUser', title: '创建人员' },
|
||||||
{ field: 'companyName', title: '创建部门' },
|
{ field: 'companyName', title: '创建部门' },
|
||||||
{ field: 'modifyUser', title: '处理人员' },
|
{ field: 'modifyUser', title: '处理人员' },
|
||||||
{ field: 'modifyTime', title: '处理时间' },
|
{ field: 'modifyTime', title: '处理时间' },
|
||||||
{ field: 'progressTime', title: '进行时间(天)' },
|
{ field: 'progressTime', title: '进行时间(天)' },
|
||||||
{ field: 'progress', title: '流程状态' },
|
{ field: 'progress', title: '流程状态' },
|
||||||
{ field: 'alertType', title: '预警类型' },
|
{ field: 'alertType', title: '预警类型' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '上传',
|
title: '上传',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: '',
|
type: '',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {}
|
click: async row => {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.type = ''
|
tableStore.table.params.type = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
info()
|
info()
|
||||||
})
|
})
|
||||||
//渲染图表
|
//渲染图表
|
||||||
const info = () => {
|
const info = () => {
|
||||||
options1.value = {
|
options1.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '商务类型',
|
text: '商务类型',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: ['全部', '预警单', '告警单']
|
data: ['全部', '预警单', '告警单']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
options2.value = {
|
options2.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '事务流程',
|
text: '事务流程',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
data: [
|
data: [
|
||||||
'全部',
|
'全部',
|
||||||
'开始',
|
'开始',
|
||||||
'预/告警单下发',
|
'预/告警单下发',
|
||||||
'预/告警单反馈',
|
'预/告警单反馈',
|
||||||
'现场测试',
|
'现场测试',
|
||||||
'整改通知单下发',
|
'整改通知单下发',
|
||||||
'整改通知单反馈',
|
'整改通知单反馈',
|
||||||
'完结'
|
'完结'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [{}],
|
yAxis: [{}],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数量',
|
name: '数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30, //最大宽度
|
barMaxWidth: 30, //最大宽度
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 9,
|
value: 9,
|
||||||
id: ''
|
id: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '1'
|
id: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '2'
|
id: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '3'
|
id: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '4'
|
id: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '5'
|
id: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
id: '6'
|
id: '6'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '新增告警单'
|
title.value = '新增告警单'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
height: 280px;
|
height: 280px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,188 +1,188 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader datePicker ref="TableHeaderRef">
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择筛选数据"
|
placeholder="请选择筛选数据"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="事务类型:">
|
<el-form-item label="事务类型:">
|
||||||
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
<el-select v-model="tableStore.table.params.type" clearable placeholder="请选择事务类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in affairs"
|
v-for="item in affairs"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属流程:">
|
<el-form-item label="所属流程:">
|
||||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择所属流程">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in process"
|
v-for="item in process"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新建</el-button>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">上传模板</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const process = [
|
const process = [
|
||||||
{
|
{
|
||||||
name: '开始',
|
name: '开始',
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '预/告警单下发',
|
name: '预/告警单下发',
|
||||||
id: '1'
|
id: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反馈单上传',
|
name: '反馈单上传',
|
||||||
id: '2'
|
id: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '现场测试',
|
name: '现场测试',
|
||||||
id: '3'
|
id: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '整改通知单下发',
|
name: '整改通知单下发',
|
||||||
id: '4'
|
id: '4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '整改通知单反馈',
|
name: '整改通知单反馈',
|
||||||
id: '5'
|
id: '5'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '完结',
|
name: '完结',
|
||||||
id: '6'
|
id: '6'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const affairs = [
|
const affairs = [
|
||||||
{
|
{
|
||||||
name: '预警单',
|
name: '预警单',
|
||||||
id: '0'
|
id: '0'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '告警单',
|
name: '告警单',
|
||||||
id: '1'
|
id: '1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/system-boot/area/areaSelect',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '名称' },
|
{ field: 'name', title: '名称' },
|
||||||
{
|
{
|
||||||
field: 'grade',
|
field: 'grade',
|
||||||
title: '等级'
|
title: '等级'
|
||||||
},
|
},
|
||||||
{ field: 'bigType', title: '策略选择' },
|
{ field: 'bigType', title: '策略选择' },
|
||||||
{ field: 'updateBy', title: '更新人员' },
|
{ field: 'updateBy', title: '更新人员' },
|
||||||
{ field: 'updateTime', title: '更新时间' },
|
{ field: 'updateTime', title: '更新时间' },
|
||||||
{
|
{
|
||||||
field: 'state',
|
field: 'state',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
activeValue: '2',
|
activeValue: '2',
|
||||||
inactiveValue: '1',
|
inactiveValue: '1',
|
||||||
render: 'switch',
|
render: 'switch',
|
||||||
onChangeField: (row: any, value) => {
|
onChangeField: (row: any, value) => {
|
||||||
console.log('🚀 ~ row:', 444123, value)
|
console.log('🚀 ~ row:', 444123, value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '绑定',
|
title: '绑定',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {}
|
click: row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: '',
|
type: '',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {}
|
click: async row => {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
removeUse({ userIds: row.userId }).then(res => {
|
removeUse({ userIds: row.userId }).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.type = ''
|
tableStore.table.params.type = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '新增告警单'
|
title.value = '新增告警单'
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user