Compare commits

..

3 Commits

Author SHA1 Message Date
sjl
d1e7aab876 微调 2025-11-05 15:12:06 +08:00
sjl
8a3e0263d2 Merge branch 'main' of http://192.168.1.22:3000/Web/admin-govern 2025-11-05 15:10:50 +08:00
sjl
35ce7314b0 微调 2025-11-05 15:10:44 +08:00
8 changed files with 41 additions and 32 deletions

View File

@@ -15,7 +15,7 @@
style='cursor: pointer' v-if='props.canExpand' /> -->
</div>
<el-tree :style="{ height: 'calc(100vh - 200px)' }"
style=' overflow: auto;' ref='treeRef' :props='defaultProps' highlight-current
style=' overflow: auto;' ref='treeRef' :props='defaultProps' highlight-current :default-expand-all="false"
@check-change="checkTreeNodeChange" :filter-node-method='filterNode' node-key='id' v-bind='$attrs'>
<template #default='{ node, data }'>
<span class='custom-tree-node'>
@@ -75,7 +75,6 @@ const filterNode = (value: string, data: any, node: any) => {
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配则返回该节点以及其下的所有子节点如果参数是子节点则返回该节点的父节点。name是中文字符enName是英文字符.
const chooseNode = (value: string, data: any, node: any) => {
if (data.name.indexOf(value) !== -1) {
return true
}

View File

@@ -29,7 +29,7 @@
</div>
<el-tree :style="{ height: 'calc(100vh - 200px)' }"
style=' overflow: auto;' ref='treeRef' :props='defaultProps' highlight-current
style=' overflow: auto;' ref='treeRef' :props='defaultProps' highlight-current :default-expand-all="false"
@check-change="checkTreeNodeChange" :filter-node-method='filterNode' node-key='id' v-bind='$attrs'>
<template #default='{ node, data }'>
<span class='custom-tree-node'>

View File

@@ -24,6 +24,7 @@
@node-click="handleNodeClick"
:default-checked-keys="defaultCheckedKeys"
v-bind='$attrs'
:default-expand-all="false"
>
<template #default='{ node, data }'>
<span class='custom-tree-node'>

View File

@@ -1,3 +1,5 @@
import { number } from "vue-types"
const dataProcessing = (arr: any[]) => {
return arr
.filter(item => typeof item === 'number' || (typeof item === 'string' && !isNaN(parseFloat(item))))
@@ -38,9 +40,10 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
calculatedValue = value - num * value
} else {
calculatedValue = value + num * value
}
}
console.log('🚀 ~ calculateValue ~ base:', base)
if (base === 0.1) {
return parseFloat(calculatedValue.toFixed(1))
} else if (isMin) {
@@ -62,6 +65,7 @@ export const yMethod = (arr: any) => {
minValue = Math.min(...numList)
const o = maxValue - minValue
min = calculateValue(o, minValue, num, true)
max = calculateValue(o, maxValue, num, false)
// if (-100 >= minValue) {
// min = Math.floor((minValue + num * minValue) / 100) * 100

View File

@@ -313,6 +313,7 @@ const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[1] || ''
tableStore.table.params.projectId = e[2] || ''
}
}
// tableStore.table.params.engineeringid = e[1] || ''

View File

@@ -2296,10 +2296,15 @@ const area = () => {
onMounted(() => {
nodeData.value.level = 0
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
}
nextTick(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom && dom.offsetHeight > 0) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
} else {
// 设置默认值
size.value = 20
}
})
})
area()
</script>

View File

@@ -99,11 +99,15 @@ tableStore.table.params.resourceType = 1
tableStore.table.params.customType = 1
const flag = ref(true)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = ((280 / (dom.offsetWidth - 7)) * 100)
}
nextTick(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom && dom.offsetHeight > 0) {
size.value = ((280 / (dom.offsetWidth - 7)) * 100)
} else {
// 设置默认值
size.value = 20
}
})
})
// getTemplateByDept({ id: dictData.state.area[0].id }).then((res: any) => {

View File

@@ -31,6 +31,7 @@
</template>
<template v-slot:operation>
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
</template>
</TableHeader>
<Table
@@ -81,17 +82,7 @@
</el-tooltip>
</template>
<template v-else>
<el-popconfirm
class="box-item"
title="确定重启吗?"
placement="bottom"
@confirm="restart(data)"
>
<template #actions="{ confirm, cancel }">
<el-button size="small" @click="cancel">取消</el-button>
<el-button type="warning" size="small" @click="confirm">确认</el-button>
</template>
<el-popconfirm title="确定重启吗?" placement="bottom" @confirm="restart(data)">
<template #reference>
<el-tooltip content="重启" placement="top">
<el-button
@@ -99,10 +90,13 @@
icon="el-icon-Refresh"
type="warning"
link
@click.stop
></el-button>
/>
</el-tooltip>
</template>
<template #actions="{ confirm, cancel }">
<el-button size="small" @click="cancel">取消</el-button>
<el-button type="warning" size="small" @click="confirm">确认</el-button>
</template>
</el-popconfirm>
</template>
</div>
@@ -433,6 +427,7 @@ const currentChangeEvent = () => {
// 重启进程
const restart = (data: any) => {
restartProcess({
nodeId: nodeId.value,
processNo: data.processNo