添加 标准库 模版库 页面
修改 终端台账管理 页面
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Tree ref="treRef" :data="tree" :expanded="expanded" />
|
<Tree ref="treRef" :data="tree" style="height: 100%" :width="'100%'" :expanded="expanded" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -17,7 +17,6 @@ const expanded: any = ref([])
|
|||||||
const tree = ref()
|
const tree = ref()
|
||||||
const treRef = ref()
|
const treRef = ref()
|
||||||
const info = (id: any) => {
|
const info = (id: any) => {
|
||||||
|
|
||||||
expanded.value = [id]
|
expanded.value = [id]
|
||||||
getTerminalTree().then(res => {
|
getTerminalTree().then(res => {
|
||||||
// let arr: any[] = []
|
// let arr: any[] = []
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<Icon
|
<!-- <Icon
|
||||||
@click="onMenuCollapse"
|
@click="onMenuCollapse"
|
||||||
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||||
:class="menuCollapse ? 'unfold' : ''"
|
:class="menuCollapse ? 'unfold' : ''"
|
||||||
size="18"
|
size="18"
|
||||||
class="fold ml10 menu-collapse"
|
class="fold ml10 menu-collapse"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<el-tree
|
<el-tree
|
||||||
style="flex: 1; overflow: auto"
|
style="flex: 1; overflow: auto"
|
||||||
@@ -131,7 +131,7 @@ defineExpose({ treeRef, setCurrentKey })
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 10px;
|
padding-right: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
:deep(.el-tree) {
|
:deep(.el-tree) {
|
||||||
|
|||||||
81
src/components/tree/pqs/standardTree.vue
Normal file
81
src/components/tree/pqs/standardTree.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<template>
|
||||||
|
<div class="point-tree">
|
||||||
|
<div style="flex: 1; overflow: hidden">
|
||||||
|
<Tree ref="treeRef" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||||
|
import Tree from '../index.vue'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||||
|
import { useConfig } from '@/stores/config'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'pms/pointTree'
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['init'])
|
||||||
|
const attrs = useAttrs()
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
const dictData = useDictData()
|
||||||
|
const config = useConfig()
|
||||||
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
|
const tree = ref()
|
||||||
|
const treeRef = ref()
|
||||||
|
|
||||||
|
const loadData = () => {
|
||||||
|
let nodeKey = ''
|
||||||
|
let res = {
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: '运行管理',
|
||||||
|
id: '1',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: '运行指标',
|
||||||
|
id: '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '数据质量核查',
|
||||||
|
id: '3'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
// getTerminalTreeForFive(form).then(res => {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
item.icon = 'el-icon-FolderOpened'
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
item.children.forEach((item2: any) => {
|
||||||
|
item2.icon = 'el-icon-Document'
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
nodeKey = res.data[0].children[0].id
|
||||||
|
emit('init', res.data[0].children[0])
|
||||||
|
|
||||||
|
tree.value = res.data
|
||||||
|
if (nodeKey) {
|
||||||
|
setTimeout(() => {
|
||||||
|
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
loadData()
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.point-tree {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,14 +1,102 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" title="越限详情" width="50%" draggable>
|
<el-dialog v-model="dialogVisible" :title="title" width="50%" draggable>
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="500px" :data="tableData">
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="500px" :data="tableData">
|
||||||
<vxe-column field="num2" title="指标" />
|
<vxe-colgroup field="anotherName" title="指标" width="180" />
|
||||||
<vxe-column field="num2" title="时间" />
|
<!-- <vxe-colgroup field="unit" title="单位" /> -->
|
||||||
<vxe-column field="num3" title="最小值" />
|
<vxe-colgroup title="最小值">
|
||||||
<vxe-column field="num3" title="最大值" />
|
<vxe-column field="minphaseA" title="A">
|
||||||
<vxe-column field="num3" title="平均值" />
|
<template #default="{ row }">
|
||||||
<vxe-column field="num3" title="cp95值" />
|
<span :style="{ color: row.limit < row.minphaseA ? 'red' : '' }">
|
||||||
<vxe-column field="num3" title="国际限值" />
|
{{ row.minphaseA }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="minphaseB" title="B">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.minphaseB ? 'red' : '' }">
|
||||||
|
{{ row.minphaseB }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="minphaseC" title="C">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.minphaseC ? 'red' : '' }">
|
||||||
|
{{ row.minphaseC }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-colgroup>
|
||||||
|
<vxe-colgroup title="最大值">
|
||||||
|
<vxe-column field="maxphaseA" title="A">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.maxphaseA ? 'red' : '' }">
|
||||||
|
{{ row.maxphaseA }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="maxphaseB" title="B">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.maxphaseB ? 'red' : '' }">
|
||||||
|
{{ row.maxphaseB }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="maxphaseC" title="C">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.maxphaseC ? 'red' : '' }">
|
||||||
|
{{ row.maxphaseC }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-colgroup>
|
||||||
|
<vxe-colgroup title="平均值">
|
||||||
|
<vxe-column field="avgphaseA" title="A">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.avgphaseA ? 'red' : '' }">
|
||||||
|
{{ row.avgphaseA }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="avgphaseB" title="B">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.avgphaseB ? 'red' : '' }">
|
||||||
|
{{ row.avgphaseB }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="avgphaseC" title="C">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.avgphaseC ? 'red' : '' }">
|
||||||
|
{{ row.avgphaseC }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-colgroup>
|
||||||
|
<vxe-colgroup title="cp95值">
|
||||||
|
<vxe-column field="cp95PhaseA" title="A">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.cp95PhaseA ? 'red' : '' }">
|
||||||
|
{{ row.cp95PhaseA }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="cp95PhaseB" title="B">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.cp95PhaseB ? 'red' : '' }">
|
||||||
|
{{ row.cp95PhaseB }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="cp95PhaseC" title="C">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :style="{ color: row.limit < row.cp95PhaseC ? 'red' : '' }">
|
||||||
|
{{ row.cp95PhaseC }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-colgroup>
|
||||||
|
|
||||||
|
<vxe-column field="limit" title="国际限值" />
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -17,8 +105,11 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableData = ref([])
|
const title = ref('')
|
||||||
const open = () => {
|
const tableData: any = ref([])
|
||||||
|
const open = (row: any) => {
|
||||||
|
title.value = row.title + ' - ' + row.row.time + ' - 越限详情'
|
||||||
|
tableData.value = row.row[row.key]
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '指标',
|
title: '指标',
|
||||||
field: 'anotherName',
|
field: 'anotherName',
|
||||||
|
minWidth: '120px',
|
||||||
formatter: row => {
|
formatter: row => {
|
||||||
row.column.title =
|
row.column.title =
|
||||||
radio2.value == '1' ? '指标' : (row.column.title = radio2.value == '4' ? '间谐波次数' : '谐波次数')
|
radio2.value == '1' ? '指标' : (row.column.title = radio2.value == '4' ? '间谐波次数' : '谐波次数')
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="card-top mt15">
|
<el-card class="card-top mt15">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in powerList2"
|
v-for="(item, index) in powerList2"
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.voltageOffset == '1' ? 'danger' : 'success'"
|
:type="row.voltageOffset == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '电压偏差', 'voltageOffsetList')"
|
||||||
>
|
>
|
||||||
{{ row.voltageOffset == '1' ? '越限' : '合格' }}
|
{{ row.voltageOffset == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.vtimes == '1' ? 'danger' : 'success'"
|
:type="row.vtimes == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '谐波电压', 'vtimesList')"
|
||||||
>
|
>
|
||||||
{{ row.vtimes == '1' ? '越限' : '合格' }}
|
{{ row.vtimes == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.itimes == '1' ? 'danger' : 'success'"
|
:type="row.itimes == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '谐波电流', 'itimesList')"
|
||||||
>
|
>
|
||||||
{{ row.itimes == '1' ? '越限' : '合格' }}
|
{{ row.itimes == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.ubalance == '1' ? 'danger' : 'success'"
|
:type="row.ubalance == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '三相电压不平衡度', 'ubalanceList')"
|
||||||
>
|
>
|
||||||
{{ row.ubalance == '1' ? '越限' : '合格' }}
|
{{ row.ubalance == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.voltageFluctuation == '1' ? 'danger' : 'success'"
|
:type="row.voltageFluctuation == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '电压波动', 'voltageFluctuationList')"
|
||||||
>
|
>
|
||||||
{{ row.voltageFluctuation == '1' ? '越限' : '合格' }}
|
{{ row.voltageFluctuation == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.flicker == '1' ? 'danger' : 'success'"
|
:type="row.flicker == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '闪变', 'flickerList')"
|
||||||
>
|
>
|
||||||
{{ row.flicker == '1' ? '越限' : '合格' }}
|
{{ row.flicker == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.interHarmonic == '1' ? 'danger' : 'success'"
|
:type="row.interHarmonic == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '间谐波电压含有率', 'interHarmonicList')"
|
||||||
>
|
>
|
||||||
{{ row.interHarmonic == '1' ? '越限' : '合格' }}
|
{{ row.interHarmonic == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
<el-link
|
<el-link
|
||||||
:type="row.sequenceCurrentUnbalance == '1' ? 'danger' : 'success'"
|
:type="row.sequenceCurrentUnbalance == '1' ? 'danger' : 'success'"
|
||||||
class="percentage"
|
class="percentage"
|
||||||
@click="detailClick(row)"
|
@click="detailClick(row, '电流不平衡度', 'sequenceCurrentUnbalanceList')"
|
||||||
>
|
>
|
||||||
{{ row.sequenceCurrentUnbalance == '1' ? '越限' : '合格' }}
|
{{ row.sequenceCurrentUnbalance == '1' ? '越限' : '合格' }}
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -697,8 +697,13 @@ const timeClick = (row: any) => {
|
|||||||
timePopUpBox.value = data
|
timePopUpBox.value = data
|
||||||
}
|
}
|
||||||
// 点击越限
|
// 点击越限
|
||||||
const detailClick = (row: any) => {
|
const detailClick = (row: any, title: string, key: string) => {
|
||||||
detailRef.value.open()
|
console.log('🚀 ~ detailClick ~ row:', row)
|
||||||
|
detailRef.value.open({
|
||||||
|
row: row,
|
||||||
|
title: title,
|
||||||
|
key: key
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// // 获取有功功率趋势分析数据
|
// // 获取有功功率趋势分析数据
|
||||||
// const analyse = (e: any) => {
|
// const analyse = (e: any) => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<el-option v-for="item in scaleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in scaleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="额定有功功率(kV):" prop="ratedPower">
|
<el-form-item label="额定有功功率(kW):" prop="ratedPower">
|
||||||
<el-input-number v-model="addData.ratedPower" :min="0" style="width: 100%" />
|
<el-input-number v-model="addData.ratedPower" :min="0" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="经度:" prop="longitude">
|
<el-form-item label="经度:" prop="longitude">
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
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: '额定有功功率(kV)' },
|
{ field: 'ratedPower', title: '额定有功功率(kW)' },
|
||||||
{ field: 'longitude', title: '经度' },
|
{ field: 'longitude', title: '经度' },
|
||||||
{ field: 'latitude', title: '纬度' },
|
{ field: 'latitude', title: '纬度' },
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 算法库 -->
|
|
||||||
<div class="default-main" :style="height">
|
<div class="default-main" :style="height">
|
||||||
|
<!-- 算法库 -->
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<algorithmTree
|
<algorithmTree
|
||||||
|
|||||||
@@ -1,22 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="700px">
|
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="1200px">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-form :inline="false" :model="form" label-width="auto" :rules="rules" ref="formRef">
|
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||||
<el-form-item label="算法名称">
|
<el-form-item label="事件名称">
|
||||||
<el-input v-model="form.name" placeholder="请输入算法名称" />
|
<el-input v-model="form.name" placeholder="请输入事件名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="定义">
|
<el-form-item label="发生事件">
|
||||||
<el-input v-model="form.code" placeholder="请输入定义" />
|
<el-input v-model="form.code" placeholder="请输入发生事件" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计算公式">
|
<el-form-item label="发生地点">
|
||||||
<el-input v-model="form.remark" :rows="2" type="textarea" placeholder="请输入计算公式" />
|
<el-input v-model="form.remark" placeholder="请输入发生地点" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="计算周期">
|
<el-form-item label="事件简介">
|
||||||
<el-input v-model="form.code" placeholder="请输入计算周期" />
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入事件简介"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据来源">
|
<el-form-item label="事件经过">
|
||||||
<el-input v-model="form.code" placeholder="请输入数据来源" />
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入事件经过"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="处理措施">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入处理措施"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="治理效果">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入治理效果"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="附件">
|
||||||
|
<el-upload v-model:file-list="fileList" action="" multiple :limit="3" :on-exceed="handleExceed">
|
||||||
|
<el-button type="primary">Click to upload</el-button>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip">jpg/png files with a size less than 500KB.</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
@@ -38,6 +72,7 @@ const dialogVisible = ref(false)
|
|||||||
const title = ref('')
|
const title = ref('')
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const fileList = ref([])
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = reactive<anyObj>({
|
const form = reactive<anyObj>({
|
||||||
code: '',
|
code: '',
|
||||||
@@ -50,6 +85,8 @@ const rules = {
|
|||||||
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleExceed = (files: any, uploadFiles: any) => {}
|
||||||
|
|
||||||
const open = (text: string, data?: anyObj) => {
|
const open = (text: string, data?: anyObj) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 案例库 -->
|
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
|
<!-- 案例库 -->
|
||||||
<TableHeader ref="TableHeaderRef" datePicker>
|
<TableHeader ref="TableHeaderRef" datePicker>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||||
@@ -73,7 +73,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
// 弹框
|
// 弹框
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
popupEditRef.value.open('新增算法')
|
popupEditRef.value.open('新增案例')
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|||||||
@@ -1,11 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="default-main" :style="height">
|
||||||
<div> 标准</div>
|
<!-- 标准库 -->
|
||||||
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
|
<pane :size="size">
|
||||||
|
<standardTree
|
||||||
|
:default-expand-all="false"
|
||||||
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
|
:current-node-key="monitoringPoint.state.lineId"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
@init="handleNodeClick"
|
||||||
|
></standardTree>
|
||||||
|
</pane>
|
||||||
|
<pane style="background: #fff" :style="height">
|
||||||
|
<div class="pd10" style="display: flex; justify-content: end">
|
||||||
|
<el-button icon="el-icon-Plus" type="primary">新增</el-button>
|
||||||
|
<el-button icon="el-icon-Edit" type="primary">修改</el-button>
|
||||||
|
<el-button icon="el-icon-Delete" type="primary">删除</el-button>
|
||||||
|
</div>
|
||||||
|
<div :style="`height: calc(${height.height} - 60px) `"></div>
|
||||||
|
</pane>
|
||||||
|
</splitpanes>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
</script>
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
<style lang="scss" scoped>
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
|
import standardTree from '@/components/tree/pqs/standardTree.vue'
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
||||||
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
defineOptions({
|
||||||
|
name: 'database/standard'
|
||||||
|
})
|
||||||
|
const monitoringPoint = useMonitoringPoint()
|
||||||
|
const height = mainHeight(20)
|
||||||
|
const size = ref(0)
|
||||||
|
|
||||||
|
const TableHeaderRef = ref()
|
||||||
|
const dotList: any = ref({
|
||||||
|
name: monitoringPoint.state.lineName.split('>')[3],
|
||||||
|
id: monitoringPoint.state.lineId,
|
||||||
|
level: 6
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
|
if (dom) {
|
||||||
|
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
|
dotList.value = data
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
|
background: #eaeef1;
|
||||||
|
}
|
||||||
|
.grid-content {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.divBox {
|
||||||
|
width: 250px;
|
||||||
|
height: 31px;
|
||||||
|
margin: auto;
|
||||||
|
line-height: 32px;
|
||||||
|
border: 1px solid #c9c9c9;
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid #002255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
padding: 10px;
|
||||||
|
// margin-top: 10px;
|
||||||
|
overflow-y: auto;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.el-divider--horizontal {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
.mTop {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
121
src/views/pqs/database/stencil/components/form.vue
Normal file
121
src/views/pqs/database/stencil/components/form.vue
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="1200px">
|
||||||
|
<el-scrollbar>
|
||||||
|
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||||
|
<el-form-item label="事件名称">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入事件名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发生事件">
|
||||||
|
<el-input v-model="form.code" placeholder="请输入发生事件" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发生地点">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入发生地点" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="事件简介">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入事件简介"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="事件经过">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入事件经过"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="处理措施">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入处理措施"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="治理效果">
|
||||||
|
<el-input
|
||||||
|
v-model="form.code"
|
||||||
|
placeholder="请输入治理效果"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="附件">
|
||||||
|
<el-upload v-model:file-list="fileList" action="" multiple :limit="3" :on-exceed="handleExceed">
|
||||||
|
<el-button type="primary">Click to upload</el-button>
|
||||||
|
<template #tip>
|
||||||
|
<div class="el-upload__tip">jpg/png files with a size less than 500KB.</div>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, inject } from 'vue'
|
||||||
|
import { reactive } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||||
|
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('')
|
||||||
|
const tableStore = inject('tableStore') as TableStore
|
||||||
|
const formRef = ref()
|
||||||
|
const fileList = ref([])
|
||||||
|
// 注意不要和表单ref的命名冲突
|
||||||
|
const form = reactive<anyObj>({
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
remark: '',
|
||||||
|
id: ''
|
||||||
|
})
|
||||||
|
const rules = {
|
||||||
|
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
|
||||||
|
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleExceed = (files: any, uploadFiles: any) => {}
|
||||||
|
|
||||||
|
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] = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submit = () => {
|
||||||
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.id) {
|
||||||
|
// await update(form)
|
||||||
|
} else {
|
||||||
|
// await create(form)
|
||||||
|
}
|
||||||
|
ElMessage.success('保存成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
@@ -1,11 +1,84 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
<div> 模版</div>
|
<!-- 模版 -->
|
||||||
|
<TableHeader ref="TableHeaderRef" datePicker>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef"></Table>
|
||||||
|
<!-- 弹框 -->
|
||||||
|
<PopupEdit ref="popupEditRef" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import PopupEdit from './components/form.vue'
|
||||||
|
defineOptions({
|
||||||
|
name: 'database/case'
|
||||||
|
})
|
||||||
|
|
||||||
|
const popupEditRef = ref()
|
||||||
|
|
||||||
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/user-boot/dept/deptTree',
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{ title: '模版名称', field: 'name' },
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
field: 'name1'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '发生地点',
|
||||||
|
// field: 'name2'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '处理措施',
|
||||||
|
// field: 'name3'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '治理效果',
|
||||||
|
// field: 'name4'
|
||||||
|
// }
|
||||||
|
],
|
||||||
|
loadCallback: () => {
|
||||||
|
tableStore.table.data = [
|
||||||
|
{
|
||||||
|
name: '测试名称',
|
||||||
|
name1: 'xxx',
|
||||||
|
name2: 'XXX',
|
||||||
|
name3: '1月',
|
||||||
|
name4: '单体系统',
|
||||||
|
name5: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '测试名称',
|
||||||
|
name1: 'xxx',
|
||||||
|
name2: 'XXX',
|
||||||
|
name3: '1月',
|
||||||
|
name4: '单体系统',
|
||||||
|
name5: '0'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 弹框
|
||||||
|
const addUser = () => {
|
||||||
|
popupEditRef.value.open('新增案例')
|
||||||
|
}
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="scss"></style>
|
||||||
|
|||||||
@@ -173,9 +173,9 @@ const title = ref('')
|
|||||||
const planAddition = ref(false)
|
const planAddition = ref(false)
|
||||||
const key: any = ref(0)
|
const key: any = ref(0)
|
||||||
const dynamicProp = computed(() => {
|
const dynamicProp = computed(() => {
|
||||||
return supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code == 'Technical_Super'
|
// report_supervision
|
||||||
? ''
|
let code = supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code
|
||||||
: 'substation'
|
return code == 'Technical_Super' ? '' : code == 'report_supervision' ? '' : 'substation'
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultProps = ref({
|
const defaultProps = ref({
|
||||||
|
|||||||
Reference in New Issue
Block a user