Compare commits
3 Commits
5538d18127
...
d1e7aab876
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1e7aab876 | ||
|
|
8a3e0263d2 | ||
|
|
35ce7314b0 |
@@ -15,7 +15,7 @@
|
|||||||
style='cursor: pointer' v-if='props.canExpand' /> -->
|
style='cursor: pointer' v-if='props.canExpand' /> -->
|
||||||
</div>
|
</div>
|
||||||
<el-tree :style="{ height: 'calc(100vh - 200px)' }"
|
<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'>
|
@check-change="checkTreeNodeChange" :filter-node-method='filterNode' node-key='id' v-bind='$attrs'>
|
||||||
<template #default='{ node, data }'>
|
<template #default='{ node, data }'>
|
||||||
<span class='custom-tree-node'>
|
<span class='custom-tree-node'>
|
||||||
@@ -75,7 +75,6 @@ const filterNode = (value: string, data: any, node: any) => {
|
|||||||
|
|
||||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||||
const chooseNode = (value: string, data: any, node: any) => {
|
const chooseNode = (value: string, data: any, node: any) => {
|
||||||
|
|
||||||
if (data.name.indexOf(value) !== -1) {
|
if (data.name.indexOf(value) !== -1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-tree :style="{ height: 'calc(100vh - 200px)' }"
|
<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'>
|
@check-change="checkTreeNodeChange" :filter-node-method='filterNode' node-key='id' v-bind='$attrs'>
|
||||||
<template #default='{ node, data }'>
|
<template #default='{ node, data }'>
|
||||||
<span class='custom-tree-node'>
|
<span class='custom-tree-node'>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
:default-checked-keys="defaultCheckedKeys"
|
:default-checked-keys="defaultCheckedKeys"
|
||||||
v-bind='$attrs'
|
v-bind='$attrs'
|
||||||
|
:default-expand-all="false"
|
||||||
>
|
>
|
||||||
<template #default='{ node, data }'>
|
<template #default='{ node, data }'>
|
||||||
<span class='custom-tree-node'>
|
<span class='custom-tree-node'>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { number } from "vue-types"
|
||||||
|
|
||||||
const dataProcessing = (arr: any[]) => {
|
const dataProcessing = (arr: any[]) => {
|
||||||
return arr
|
return arr
|
||||||
.filter(item => typeof item === 'number' || (typeof item === 'string' && !isNaN(parseFloat(item))))
|
.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
|
calculatedValue = value - num * value
|
||||||
} else {
|
} else {
|
||||||
calculatedValue = value + num * value
|
calculatedValue = value + num * value
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ calculateValue ~ base:', base)
|
|
||||||
if (base === 0.1) {
|
if (base === 0.1) {
|
||||||
return parseFloat(calculatedValue.toFixed(1))
|
return parseFloat(calculatedValue.toFixed(1))
|
||||||
} else if (isMin) {
|
} else if (isMin) {
|
||||||
@@ -62,6 +65,7 @@ export const yMethod = (arr: any) => {
|
|||||||
minValue = Math.min(...numList)
|
minValue = Math.min(...numList)
|
||||||
const o = maxValue - minValue
|
const o = maxValue - minValue
|
||||||
min = calculateValue(o, minValue, num, true)
|
min = calculateValue(o, minValue, num, true)
|
||||||
|
|
||||||
max = calculateValue(o, maxValue, num, false)
|
max = calculateValue(o, maxValue, num, false)
|
||||||
// if (-100 >= minValue) {
|
// if (-100 >= minValue) {
|
||||||
// min = Math.floor((minValue + num * minValue) / 100) * 100
|
// min = Math.floor((minValue + num * minValue) / 100) * 100
|
||||||
|
|||||||
@@ -313,6 +313,7 @@ const sourceChange = (e: any) => {
|
|||||||
tableStore.table.params.engineeringid = e[1] || ''
|
tableStore.table.params.engineeringid = e[1] || ''
|
||||||
tableStore.table.params.projectId = e[2] || ''
|
tableStore.table.params.projectId = e[2] || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// tableStore.table.params.engineeringid = e[1] || ''
|
// tableStore.table.params.engineeringid = e[1] || ''
|
||||||
|
|||||||
@@ -2296,10 +2296,15 @@ const area = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nodeData.value.level = 0
|
nodeData.value.level = 0
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
nextTick(() => {
|
||||||
if (dom) {
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
if (dom && dom.offsetHeight > 0) {
|
||||||
}
|
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
||||||
|
} else {
|
||||||
|
// 设置默认值
|
||||||
|
size.value = 20
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
area()
|
area()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -99,11 +99,15 @@ tableStore.table.params.resourceType = 1
|
|||||||
tableStore.table.params.customType = 1
|
tableStore.table.params.customType = 1
|
||||||
const flag = ref(true)
|
const flag = ref(true)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
nextTick(() => {
|
||||||
if (dom) {
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
|
if (dom && dom.offsetHeight > 0) {
|
||||||
size.value = ((280 / (dom.offsetWidth - 7)) * 100)
|
size.value = ((280 / (dom.offsetWidth - 7)) * 100)
|
||||||
}
|
} else {
|
||||||
|
// 设置默认值
|
||||||
|
size.value = 20
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// getTemplateByDept({ id: dictData.state.area[0].id }).then((res: any) => {
|
// getTemplateByDept({ id: dictData.state.area[0].id }).then((res: any) => {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
|
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table
|
<Table
|
||||||
@@ -81,30 +82,23 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-popconfirm
|
<el-popconfirm title="确定重启吗?" placement="bottom" @confirm="restart(data)">
|
||||||
class="box-item"
|
<template #reference>
|
||||||
title="确定重启吗?"
|
<el-tooltip content="重启" placement="top">
|
||||||
placement="bottom"
|
<el-button
|
||||||
@confirm="restart(data)"
|
style="margin-left: 4px"
|
||||||
>
|
icon="el-icon-Refresh"
|
||||||
|
type="warning"
|
||||||
|
link
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #actions="{ confirm, cancel }">
|
<template #actions="{ confirm, cancel }">
|
||||||
<el-button size="small" @click="cancel">取消</el-button>
|
<el-button size="small" @click="cancel">取消</el-button>
|
||||||
<el-button type="warning" size="small" @click="confirm">确认</el-button>
|
<el-button type="warning" size="small" @click="confirm">确认</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #reference>
|
|
||||||
<el-tooltip content="重启" placement="top">
|
|
||||||
<el-button
|
|
||||||
style="margin-left: 4px"
|
|
||||||
icon="el-icon-Refresh"
|
|
||||||
type="warning"
|
|
||||||
link
|
|
||||||
@click.stop
|
|
||||||
></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -433,6 +427,7 @@ const currentChangeEvent = () => {
|
|||||||
|
|
||||||
// 重启进程
|
// 重启进程
|
||||||
const restart = (data: any) => {
|
const restart = (data: any) => {
|
||||||
|
|
||||||
restartProcess({
|
restartProcess({
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeId.value,
|
||||||
processNo: data.processNo
|
processNo: data.processNo
|
||||||
|
|||||||
Reference in New Issue
Block a user