Compare commits
6 Commits
79a246cd87
...
2025-11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa07112605 | ||
|
|
c09bea9e04 | ||
|
|
22cd6088a3 | ||
|
|
faf7ba98a6 | ||
|
|
b90f70c72d | ||
|
|
d38b426527 |
@@ -6,8 +6,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"dev:zl": "vite --mode zl",
|
"dev:zl": "vite --mode zl",
|
||||||
|
"dev:ypt": "vite --mode ypt",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"build:zl": "vite build --mode zl",
|
"build:zl": "vite build --mode zl",
|
||||||
|
"build:ypt": "vite build --mode ypt",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
28
src/api/cs-device-boot/sensitiveLoadMange.ts
Normal file
28
src/api/cs-device-boot/sensitiveLoadMange.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 新增敏感用户
|
||||||
|
export function saveUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/cs-harmonic-boot/pqSensitiveUser/save',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改敏感用户
|
||||||
|
export function updateUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/cs-harmonic-boot/pqSensitiveUser/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除敏感用户
|
||||||
|
export function deleteUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/cs-harmonic-boot/pqSensitiveUser/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
}"
|
}"
|
||||||
@chart-click="handleChartClick"
|
@chart-click="handleChartClick"
|
||||||
/>
|
/>
|
||||||
<el-dialog v-model="isWaveCharts" draggable :title="dialogTitle" append-to-body width="70%">
|
<el-dialog v-model="isWaveCharts" v-if="isWaveCharts" draggable :title="dialogTitle" append-to-body width="70%">
|
||||||
<waveFormAnalysis
|
<waveFormAnalysis
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-if="isWaveCharts"
|
|
||||||
ref="waveFormAnalysisRef"
|
ref="waveFormAnalysisRef"
|
||||||
@handleHideCharts="isWaveCharts = false"
|
@handleHideCharts="isWaveCharts = false"
|
||||||
:wp="wp"
|
:wp="wp"
|
||||||
@@ -37,7 +37,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
|||||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { analyseWave } from '@/api/common'
|
import { analyseWave } from '@/api/common'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
w: { type: [String, Number] },
|
w: { type: [String, Number] },
|
||||||
h: { type: [String, Number] },
|
h: { type: [String, Number] },
|
||||||
@@ -420,15 +420,14 @@ const handleChartClick = (params: any) => {
|
|||||||
|
|
||||||
// 可容忍事件点击处理函数
|
// 可容忍事件点击处理函数
|
||||||
const handleTolerableEventClick = async (row: any) => {
|
const handleTolerableEventClick = async (row: any) => {
|
||||||
isWaveCharts.value = true
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
isWaveCharts.value = true
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (waveFormAnalysisRef.value) {
|
if (waveFormAnalysisRef.value) {
|
||||||
//waveFormAnalysisRef.value.setHeight(false, 360)
|
//waveFormAnalysisRef.value.setHeight(false, 360)
|
||||||
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
|
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const messageInstance = ElMessage.info(`正在加载,请稍等...`)
|
||||||
await analyseWave(row.value[3]) //eventId
|
await analyseWave(row.value[3]) //eventId
|
||||||
.then(res => {
|
.then(res => {
|
||||||
row.loading1 = false
|
row.loading1 = false
|
||||||
@@ -442,9 +441,12 @@ const handleTolerableEventClick = async (row: any) => {
|
|||||||
boxoList.value.systemType = 'YPT'
|
boxoList.value.systemType = 'YPT'
|
||||||
wp.value = res.data
|
wp.value = res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isWaveCharts.value = true
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
messageInstance.close()
|
||||||
row.loading1 = false
|
row.loading1 = false
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,238 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!--治理效果报表 -->
|
|
||||||
<TableHeader :showReset="false" datePicker @selectChange="selectChange" v-if="fullscreen">
|
|
||||||
<template v-slot:select>
|
|
||||||
<el-form-item label="监测对象">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.power"
|
|
||||||
placeholder="请选择监测对象"
|
|
||||||
clearable
|
|
||||||
style="width: 130px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in powerList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<template v-slot:operation>
|
|
||||||
<el-button @click="downloadExcel" class="" type="primary" icon="el-icon-Download">导出excel</el-button>
|
|
||||||
</template>
|
|
||||||
</TableHeader>
|
|
||||||
|
|
||||||
<!-- 左右布局展示治理前后报表 -->
|
|
||||||
<div class="report-container">
|
|
||||||
<!-- 治理前报表 -->
|
|
||||||
<div class="report-panel before">
|
|
||||||
<div class="panel-header">治理前报表</div>
|
|
||||||
<div
|
|
||||||
id="luckysheet-before"
|
|
||||||
:style="{
|
|
||||||
width: '100%',
|
|
||||||
height: `calc(${prop.height} - ${fullscreen ? '114px' : '57px'} + ${fullscreen ? 0 : 56}px)`
|
|
||||||
}"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 治理后报表 -->
|
|
||||||
<div class="report-panel after">
|
|
||||||
<div class="panel-header">治理后报表</div>
|
|
||||||
<div
|
|
||||||
id="luckysheet-after"
|
|
||||||
:style="{
|
|
||||||
width: '100%',
|
|
||||||
height: `calc(${prop.height} - ${fullscreen ? '114px' : '57px'} + ${fullscreen ? 0 : 56}px)`
|
|
||||||
}"
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, onMounted, provide, watch, computed } from 'vue'
|
|
||||||
import TableStore from '@/utils/tableStore'
|
|
||||||
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
|
||||||
import Json from './index.json'
|
|
||||||
import JsonAfter from './index1.json'
|
|
||||||
|
|
||||||
const prop = defineProps({
|
|
||||||
w: { type: [String, Number] },
|
|
||||||
h: { type: [String, Number] },
|
|
||||||
width: { type: [String, Number] },
|
|
||||||
height: { type: [String, Number] },
|
|
||||||
timeKey: { type: [String, Number] },
|
|
||||||
timeValue: { type: Object }
|
|
||||||
})
|
|
||||||
|
|
||||||
const powerList: any = ref([
|
|
||||||
{
|
|
||||||
label: '1#变压器',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '2#变压器',
|
|
||||||
value: '2'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
|
||||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
|
||||||
method: 'POST',
|
|
||||||
showPage: false,
|
|
||||||
exportName: '治理效果报表',
|
|
||||||
column: [],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0]
|
|
||||||
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
|
||||||
},
|
|
||||||
loadCallback: () => {}
|
|
||||||
})
|
|
||||||
|
|
||||||
const tableRef = ref()
|
|
||||||
provide('tableRef', tableRef)
|
|
||||||
tableStore.table.params.power = '1'
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
|
||||||
|
|
||||||
// 下载表格
|
|
||||||
const downloadExcel = () => {
|
|
||||||
// 可以选择导出治理前、治理后或两个报表
|
|
||||||
const beforeSheets = luckysheetBefore.getAllSheets()
|
|
||||||
const afterSheets = luckysheetAfter.getAllSheets()
|
|
||||||
exportExcel([...beforeSheets, ...afterSheets], '治理效果对比报表')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 治理前和治理后的Luckysheet实例
|
|
||||||
let luckysheetBefore: any
|
|
||||||
let luckysheetAfter: any
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
// 创建治理前报表
|
|
||||||
luckysheetBefore = luckysheet.create({
|
|
||||||
container: 'luckysheet-before',
|
|
||||||
title: '治理前',
|
|
||||||
lang: 'zh',
|
|
||||||
showtoolbar: false,
|
|
||||||
showinfobar: false,
|
|
||||||
showsheetbar: true,
|
|
||||||
allowEdit: false,
|
|
||||||
data: Json
|
|
||||||
})
|
|
||||||
|
|
||||||
// 创建治理后报表
|
|
||||||
luckysheetAfter = luckysheet.create({
|
|
||||||
container: 'luckysheet-after',
|
|
||||||
title: '治理后',
|
|
||||||
lang: 'zh',
|
|
||||||
showtoolbar: false,
|
|
||||||
showinfobar: false,
|
|
||||||
showsheetbar: true,
|
|
||||||
allowEdit: false,
|
|
||||||
data: JsonAfter // 使用治理后的数据
|
|
||||||
})
|
|
||||||
|
|
||||||
tableStore.index()
|
|
||||||
})
|
|
||||||
|
|
||||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
|
||||||
if (datePickerValue && datePickerValue.timeValue) {
|
|
||||||
// 更新时间参数
|
|
||||||
tableStore.table.params.searchBeginTime = datePickerValue.timeValue[0]
|
|
||||||
tableStore.table.params.searchEndTime = datePickerValue.timeValue[1]
|
|
||||||
|
|
||||||
// 可以在这里更新报表数据
|
|
||||||
updateReportData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新报表数据的方法
|
|
||||||
const updateReportData = () => {
|
|
||||||
// 这里可以根据时间参数更新治理前后的报表数据
|
|
||||||
// 示例:重新加载数据或更新现有数据
|
|
||||||
console.log('更新报表数据:', {
|
|
||||||
beginTime: tableStore.table.params.searchBeginTime,
|
|
||||||
endTime: tableStore.table.params.searchEndTime
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 计算是否全屏展示
|
|
||||||
const fullscreen = computed(() => {
|
|
||||||
const w = Number(prop.w)
|
|
||||||
const h = Number(prop.h)
|
|
||||||
if (!isNaN(w) && !isNaN(h) && w === 12 && h === 6) {
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => prop.timeKey,
|
|
||||||
val => {
|
|
||||||
tableStore.index()
|
|
||||||
updateReportData()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => prop.timeValue,
|
|
||||||
(newVal, oldVal) => {
|
|
||||||
// 当外部时间值变化时,更新表格的时间参数
|
|
||||||
if (newVal && (!oldVal || newVal[0] !== oldVal[0] || newVal[1] !== oldVal[1])) {
|
|
||||||
tableStore.table.params.searchBeginTime = newVal[0]
|
|
||||||
tableStore.table.params.searchEndTime = newVal[1]
|
|
||||||
tableStore.index()
|
|
||||||
updateReportData()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.report-container {
|
|
||||||
display: flex;
|
|
||||||
height: calc(100% - 57px);
|
|
||||||
|
|
||||||
.report-panel {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
border: 1px solid var(--el-border-color);
|
|
||||||
|
|
||||||
&.before {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.after {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-header {
|
|
||||||
padding: 10px 15px;
|
|
||||||
background-color: var(--el-color-primary-light-9);
|
|
||||||
font-weight: bold;
|
|
||||||
border-bottom: 1px solid var(--el-border-color);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 确保Luckysheet容器占满剩余空间
|
|
||||||
:deep(#luckysheet-before),
|
|
||||||
:deep(#luckysheet-after) {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-select) {
|
|
||||||
min-width: 80px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
draggable
|
draggable
|
||||||
title="波形分析"
|
title="波形分析"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
v-if="isWaveCharts"
|
||||||
width="70%"
|
width="70%"
|
||||||
@close="handleHideCharts"
|
@close="handleHideCharts"
|
||||||
>
|
>
|
||||||
<waveFormAnalysis
|
<waveFormAnalysis
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-if="isWaveCharts"
|
|
||||||
ref="waveFormAnalysisRef"
|
ref="waveFormAnalysisRef"
|
||||||
@handleHideCharts="handleHideCharts"
|
@handleHideCharts="handleHideCharts"
|
||||||
:wp="wp"
|
:wp="wp"
|
||||||
@@ -85,27 +85,27 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '暂态时间',
|
title: '暂态时间',
|
||||||
field: 'startTime',
|
field: 'startTime',
|
||||||
minWidth: '150'
|
minWidth: '180'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '测点名称',
|
title: '测点名称',
|
||||||
field: 'lineName',
|
field: 'lineName',
|
||||||
width: '150'
|
minWidth: '150'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '暂态类型',
|
title: '暂态类型',
|
||||||
field: 'tag',
|
field: 'tag',
|
||||||
width: '100'
|
minWidth: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '特征幅值(%)',
|
title: '特征幅值(%)',
|
||||||
field: 'amplitude',
|
field: 'amplitude',
|
||||||
width: '100'
|
minWidth: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '暂降深度(%)',
|
title: '暂降深度(%)',
|
||||||
field: 'depth',
|
field: 'depth',
|
||||||
width: '100',
|
minWidth: '100',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
// 当暂态类型不是电压暂升时,计算暂降深度 = 100 - 特征幅值
|
// 当暂态类型不是电压暂升时,计算暂降深度 = 100 - 特征幅值
|
||||||
if (row.row.tag !== '电压暂升') {
|
if (row.row.tag !== '电压暂升') {
|
||||||
@@ -123,12 +123,12 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '持续时间(S)',
|
title: '持续时间(S)',
|
||||||
field: 'persistTime',
|
field: 'persistTime',
|
||||||
width: '100'
|
minWidth: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '严重度',
|
title: '严重度',
|
||||||
field: 'severity',
|
field: 'severity',
|
||||||
width: '80'
|
minWidth: '80'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '波形',
|
title: '波形',
|
||||||
|
|||||||
@@ -3,8 +3,12 @@
|
|||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="项目名称">
|
<el-form-item label="项目名称">
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
<el-input
|
||||||
placeholder="请输入项目名称"></el-input>
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
@@ -12,45 +16,75 @@
|
|||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<!-- <Table ref="tableRef" /> -->
|
<!-- <Table ref="tableRef" /> -->
|
||||||
<div style="overflow-x: hidden; overflow-y: scroll;padding: 0 10px;" v-loading="tableStore.table.loading"
|
<div
|
||||||
:style="{ height: tableStore.table.height }">
|
style="overflow-x: hidden; overflow-y: scroll; padding: 0 10px"
|
||||||
|
v-loading="tableStore.table.loading"
|
||||||
|
:style="{ height: tableStore.table.height }"
|
||||||
|
>
|
||||||
<el-row :gutter="12">
|
<el-row :gutter="12">
|
||||||
<el-col :span="6" v-for="item in tableStore.table.data" :key="item.id" class="mt10">
|
<el-col :span="6" v-for="item in tableStore.table.data" :key="item.id" class="mt10">
|
||||||
<el-card class="box-card" @click="querdata(item)" shadow="hover">
|
<el-card class="box-card" @click="querdata(item)" shadow="hover">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span style="display: flex;align-items: center">{{ item.name }}
|
<span style="display: flex; align-items: center">
|
||||||
|
{{ item.name }}
|
||||||
|
|
||||||
<el-tooltip class="item" effect="dark" content="修改项目" placement="top">
|
<el-tooltip class="item" effect="dark" content="修改项目" placement="top">
|
||||||
<Edit style="margin-left: 5px;width: 16px;" class=" xiaoshou color"
|
<Edit
|
||||||
@click="editd(item)" />
|
style="margin-left: 5px; width: 16px"
|
||||||
</el-tooltip></span>
|
class="xiaoshou color"
|
||||||
<div style="display: flex;justify-content: end;">
|
@click="editd(item)"
|
||||||
<el-button class="color" icon="el-icon-Share" style="padding: 3px 0" type="text"
|
/>
|
||||||
@click="Aclick(item)">设计</el-button>
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
<div style="display: flex; justify-content: end">
|
||||||
|
<el-button
|
||||||
|
class="color"
|
||||||
|
icon="el-icon-Share"
|
||||||
|
style="padding: 3px 0"
|
||||||
|
type="text"
|
||||||
|
@click="Aclick(item)"
|
||||||
|
>
|
||||||
|
设计
|
||||||
|
</el-button>
|
||||||
<!-- <el-button icon="el-icon-share" style="padding: 3px 0; color: green"
|
<!-- <el-button icon="el-icon-share" style="padding: 3px 0; color: green"
|
||||||
type="text" @click="shejid(item)">设计</el-button> -->
|
type="text" @click="shejid(item)">设计</el-button> -->
|
||||||
<!-- <el-button icon="el-icon-edit" style="padding: 3px 0; color: blue" type="text"
|
<!-- <el-button icon="el-icon-edit" style="padding: 3px 0; color: blue" type="text"
|
||||||
@click="shejid(item)">编辑</el-button> -->
|
@click="shejid(item)">编辑</el-button> -->
|
||||||
<el-button icon="el-icon-Delete" style="padding: 3px 0; color: red" type="text"
|
<el-button
|
||||||
@click="deleted(item)">删除</el-button>
|
icon="el-icon-Delete"
|
||||||
|
style="padding: 3px 0; color: red"
|
||||||
|
type="text"
|
||||||
|
@click="deleted(item)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img v-if="item.fileContent" :src="item.fileContent" class="image xiaoshou" @click="imgData(item)" />
|
<img
|
||||||
<el-empty v-else description="暂无设计" style="height: 220px;"/>
|
v-if="item.fileContent"
|
||||||
|
:src="item.fileContent"
|
||||||
|
class="image xiaoshou"
|
||||||
|
@click="imgData(item)"
|
||||||
|
/>
|
||||||
|
<el-empty v-else description="暂无设计" style="height: 220px" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-pagination">
|
<div class="table-pagination">
|
||||||
<el-pagination :currentPage="tableStore.table.params!.pageNum"
|
<el-pagination
|
||||||
:page-size="tableStore.table.params!.pageSize" :page-sizes="[10, 20, 50, 100]" background
|
:currentPage="tableStore.table.params!.pageNum"
|
||||||
:layout="'sizes,total, ->, prev, pager, next, jumper'" :total="tableStore.table.total"
|
:page-size="tableStore.table.params!.pageSize"
|
||||||
@size-change="onTableSizeChange" @current-change="onTableCurrentChange"></el-pagination>
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
background
|
||||||
|
:layout="'sizes,total, ->, prev, pager, next, jumper'"
|
||||||
|
:total="tableStore.table.total"
|
||||||
|
@size-change="onTableSizeChange"
|
||||||
|
@current-change="onTableCurrentChange"
|
||||||
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<popup ref="popupRef" @submit="tableStore.index()" />
|
<popup ref="popupRef" @submit="tableStore.index()" />
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -61,9 +95,12 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { deleteTopoTemplate, uploadTopo } from '@/api/cs-device-boot/topologyTemplate'
|
import { deleteTopoTemplate, uploadTopo } from '@/api/cs-device-boot/topologyTemplate'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { audit, add } from '@/api/cs-harmonic-boot/mxgraph';
|
import { audit, add } from '@/api/cs-harmonic-boot/mxgraph'
|
||||||
import { Edit } from '@element-plus/icons-vue'
|
import { Edit } from '@element-plus/icons-vue'
|
||||||
import popup from './components/popup.vue'
|
import popup from './components/popup.vue'
|
||||||
|
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'ypt'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'mxgraph/graph-list'
|
name: 'mxgraph/graph-list'
|
||||||
})
|
})
|
||||||
@@ -78,11 +115,8 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-harmonic-boot/csconfiguration/queryPage',
|
url: '/cs-harmonic-boot/csconfiguration/queryPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 60,
|
publicHeight: 60,
|
||||||
column: [
|
column: [],
|
||||||
],
|
loadCallback: () => {}
|
||||||
loadCallback: () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
@@ -93,12 +127,11 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
// 查询
|
// 查询
|
||||||
const onSubmitadd = () => {
|
const onSubmitadd = () => {
|
||||||
|
|
||||||
popupRef.value.open({
|
popupRef.value.open({
|
||||||
title: '新增项目'
|
title: '新增项目'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const querdata = (e: any) => { }
|
const querdata = (e: any) => {}
|
||||||
const editd = (e: any) => {
|
const editd = (e: any) => {
|
||||||
popupRef.value.open({
|
popupRef.value.open({
|
||||||
title: '修改项目',
|
title: '修改项目',
|
||||||
@@ -107,45 +140,48 @@ const editd = (e: any) => {
|
|||||||
}
|
}
|
||||||
// 设计
|
// 设计
|
||||||
const Aclick = (e: any) => {
|
const Aclick = (e: any) => {
|
||||||
window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
//window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
||||||
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
|
window.open(
|
||||||
|
'http://192.168.1.179:4001' +
|
||||||
|
`/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
const deleted = (e: any) => {
|
const deleted = (e: any) => {
|
||||||
ElMessageBox.confirm("此操作将永久删除该项目, 是否继续?", "提示", {
|
ElMessageBox.confirm('此操作将永久删除该项目, 是否继续?', '提示', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
let data = {
|
let data = {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
name: e.name,
|
name: e.name,
|
||||||
status: "0",
|
status: '0'
|
||||||
};
|
}
|
||||||
audit(data).then((res: any) => {
|
audit(data).then((res: any) => {
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "删除项目成功!",
|
message: '删除项目成功!'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: "info",
|
type: 'info',
|
||||||
message: "已取消删除",
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const imgData = (e: any) => {
|
const imgData = (e: any) => {
|
||||||
window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
|
window.open(
|
||||||
|
window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}#/preview_ZL`
|
||||||
|
)
|
||||||
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
|
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onTableSizeChange = (val: number) => {
|
const onTableSizeChange = (val: number) => {
|
||||||
@@ -155,7 +191,6 @@ const onTableSizeChange = (val: number) => {
|
|||||||
const onTableCurrentChange = (val: number) => {
|
const onTableCurrentChange = (val: number) => {
|
||||||
tableStore.onTableAction('current-page-change', { page: val })
|
tableStore.onTableAction('current-page-change', { page: val })
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.text {
|
.text {
|
||||||
@@ -179,7 +214,7 @@ span {
|
|||||||
.clearfix::before,
|
.clearfix::before,
|
||||||
.clearfix::after {
|
.clearfix::after {
|
||||||
display: table;
|
display: table;
|
||||||
content: "";
|
content: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
.clearfix::after {
|
.clearfix::after {
|
||||||
@@ -189,7 +224,7 @@ span {
|
|||||||
.box-card {
|
.box-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// border: 1px solid #000;
|
// border: 1px solid #000;
|
||||||
box-shadow: var(--el-box-shadow-light)
|
box-shadow: var(--el-box-shadow-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.xiaoshou {
|
.xiaoshou {
|
||||||
@@ -218,7 +253,7 @@ span {
|
|||||||
|
|
||||||
// 不可全选样式
|
// 不可全选样式
|
||||||
.el-tree-node {
|
.el-tree-node {
|
||||||
.is-leaf+.el-checkbox .el-checkbox__inner {
|
.is-leaf + .el-checkbox .el-checkbox__inner {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
106
src/views/govern/sensitiveLoadMange/detail.vue
Normal file
106
src/views/govern/sensitiveLoadMange/detail.vue
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog class="cn-operate-dialog" width="600px" v-model.trim="dialogVisible" :title="title">
|
||||||
|
<el-form :model="form" label-width="auto" ref="formRef" :rules="rules">
|
||||||
|
<el-form-item label="所属厂站名称" prop="substationName">
|
||||||
|
<el-input v-model.trim="form.substationName" placeholder="请输入所属厂站名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="敏感用户名称" prop="name">
|
||||||
|
<el-input v-model.trim="form.name" placeholder="请输入敏感用户名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="敏感负荷类型" prop="loadType">
|
||||||
|
<el-select v-model.trim="form.loadType" filterable clearable placeholder="请选择数据分类">
|
||||||
|
<el-option
|
||||||
|
v-for="item in DataTypeSelect"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户协议容量(MVA)" prop="userAgreementCapacity">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.userAgreementCapacity" placeholder="请输入用户协议容量"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="装机容量(MW)" prop="installedCapacity">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.installedCapacity" placeholder="请输入装机容量"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.trim="form.sort" placeholder="请输入排序"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref,inject } from 'vue'
|
||||||
|
import { reactive } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import { queryByCode, queryCsDictTree } from '@/api/system-boot/dictTree'
|
||||||
|
import { saveUser, updateUser } from '@/api/cs-device-boot/sensitiveLoadMange'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
|
const TypeOptions = ref()
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const DataTypeSelect = dictData.getBasicData('Sensitive_User_Type')
|
||||||
|
|
||||||
|
const tableStore = inject('tableStore') as TableStore
|
||||||
|
|
||||||
|
const formRef = ref()
|
||||||
|
const form = reactive<any>({
|
||||||
|
loadType: [],
|
||||||
|
substationName: null,
|
||||||
|
installedCapacity: null,
|
||||||
|
name: null,
|
||||||
|
userAgreementCapacity:null,
|
||||||
|
id: null,
|
||||||
|
sort:100
|
||||||
|
})
|
||||||
|
const rules = {
|
||||||
|
substationName: [{ required: true, message: '所属厂站名称不能为空', trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: '敏感用户名称不能为空', trigger: 'blur' }],
|
||||||
|
loadType: [{ required: true, message: '请选择敏感负荷类型', trigger: 'blur' }],
|
||||||
|
installedCapacity: [{ required: true, message: '用户协议容量不能为空', trigger: 'blur' }],
|
||||||
|
userAgreementCapacity: [{ required: true, message: '装机容量不能为空', trigger: 'blur' }],
|
||||||
|
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('新增')
|
||||||
|
const open = (text: string, data?: anyObj) => {
|
||||||
|
title.value = text
|
||||||
|
dialogVisible.value = true
|
||||||
|
if (data) {
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = data[key]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = null
|
||||||
|
form.sort = 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submit = () => {
|
||||||
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.id) {
|
||||||
|
await updateUser(form)
|
||||||
|
} else {
|
||||||
|
await saveUser(form)
|
||||||
|
}
|
||||||
|
ElMessage.success('操作成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
105
src/views/govern/sensitiveLoadMange/index.vue
Normal file
105
src/views/govern/sensitiveLoadMange/index.vue
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader date-picker>
|
||||||
|
<template #operation>
|
||||||
|
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<detail ref="detail"></detail>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import Detail from './detail.vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { deleteUser } from '@/api/cs-device-boot/sensitiveLoadMange'
|
||||||
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'govern/device/sensitiveLoadMange'
|
||||||
|
})
|
||||||
|
const detail = ref()
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const interferenceType = dictData.getBasicData('Sensitive_User_Type')
|
||||||
|
|
||||||
|
const tableStore: any = new TableStore({
|
||||||
|
url: '/cs-harmonic-boot/pqSensitiveUser/getList',
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '所属厂站名称', field: 'substationName', minWidth: 180 },
|
||||||
|
{ title: '敏感用户名称', field: 'name', minWidth: 180 },
|
||||||
|
{
|
||||||
|
title: '敏感负荷类型',
|
||||||
|
field: 'loadType',
|
||||||
|
minWidth: 120,
|
||||||
|
formatter: row => {
|
||||||
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
||||||
|
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: '180',
|
||||||
|
fixed: 'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
detail.value.open('编辑', row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'del',
|
||||||
|
title: '删除',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Delete',
|
||||||
|
render: 'confirmButton',
|
||||||
|
popconfirm: {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonType: 'danger',
|
||||||
|
title: '确定删除吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
deleteUser([row.id]).then(res => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
loadCallback: () => {}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
const addMenu = () => {
|
||||||
|
detail.value.open('新增')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user