修改冀北现场问题

This commit is contained in:
GGJ
2025-12-12 09:26:56 +08:00
parent b36f765d07
commit 46c55d48ec
38 changed files with 1489 additions and 1370 deletions

View File

@@ -3,10 +3,15 @@
<!-- 算法库 -->
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<algorithmTree ref="treeRef" :default-expand-all="false"
<algorithmTree
ref="treeRef"
:default-expand-all="false"
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
@init="handleNodeClick" @onAddTree="onAddTree"></algorithmTree>
:current-node-key="monitoringPoint.state.lineId"
@node-click="handleNodeClick"
@init="handleNodeClick"
@onAddTree="onAddTree"
></algorithmTree>
</pane>
<pane style="background: #fff" :style="height">
<div class="boxTop">
@@ -16,9 +21,7 @@
</el-radio-group>
</div>
<div v-if="information">
<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-Delete" type="primary" @click="deletes">删除</el-button>
</div>
@@ -35,12 +38,12 @@
row.period == 0
? '日'
: row.period == 1
? '月'
: row.period == 2
? '季'
: row.period == 3
? '年'
: ''
? '月'
: row.period == 2
? '季'
: row.period == 3
? '年'
: ''
}}
</template>
</vxe-column>
@@ -55,10 +58,8 @@
</vxe-column> -->
<vxe-column field="definition" title="定义">
<template #default="{ row }">
<el-button type="primary" link @click="view(row)">查看</el-button>
</template>
</vxe-column>
<!-- <vxe-column title="操作" width="150px">
<template #default="{ row }">
@@ -78,19 +79,28 @@
<!-- 树弹框 -->
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
<!-- 弹框 -->
<PopupEdit ref="popupEditRef" v-if="popupEditFlag"
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" />
<PopupEdit
ref="popupEditRef"
v-if="popupEditFlag"
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
/>
<!-- 定义 -->
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
<div style="min-height: 300px; max-height: 55vh;">
<div style="min-height: 300px; max-height: 55vh">
<div class="editor" ref="editorRef" v-html="summary" />
</div>
</el-dialog>
<!-- 删除 -->
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
<el-tree-select v-model="TreeValue" :data="TreeData" filterable check-strictly :props="defaultProps"
default-expand-all :render-after-expand="false" />
<el-tree-select
v-model="TreeValue"
:data="TreeData"
filterable
check-strictly
:props="defaultProps"
default-expand-all
:render-after-expand="false"
/>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
@@ -115,8 +125,8 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteyById } from '@/api/supervision-boot/database/index'
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
import { useAdminInfo } from '@/stores/adminInfo'
import katex from "katex";
import "katex/dist/katex.css";
import katex from 'katex'
import 'katex/dist/katex.css'
const adminInfo = useAdminInfo()
defineOptions({
name: 'database/algorithm'
@@ -124,7 +134,7 @@ defineOptions({
const monitoringPoint = useMonitoringPoint()
const height = mainHeight(20)
const heightTab = mainHeight(82)
const size = ref(0)
const size = ref(23)
const addTreeRef = ref()
const editorRef = ref()
const dialogVisible = ref(false)
@@ -213,31 +223,26 @@ onMounted(() => {
})
const view = (row: any) => {
viewFlag.value = true
summary.value = row.definition
setTimeout(() => {
const spans = document.querySelectorAll('span[data-value]');
// 遍历每个 span 标签
const spans = document.querySelectorAll('span[data-value]')
// 遍历每个 span 标签
spans.forEach(function (span) {
let val = katex.renderToString(span.getAttribute('data-value'), {
throwOnError: false,
throwOnError: false
})
// var newDiv = document.createElement('div');
var newDiv = span
newDiv.innerHTML = val;
span.parentNode.replaceChild(newDiv, span);
});
newDiv.innerHTML = val
span.parentNode.replaceChild(newDiv, span)
})
}, 100)
//
//
}
const handleNodeClick = (data: any, node: any) => {
if (data.pid != '0') {
dotList.value = data