主界面,系数校准界面调整
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<div class='search_view'>
|
||||
<el-input
|
||||
placeholder='请输入计划名称'
|
||||
clearable
|
||||
v-model='searchForm.planName'
|
||||
></el-input>
|
||||
<Menu style='width: 26px;height: 26px; margin-left: 8px;cursor: pointer;color:var(--el-color-primary)'
|
||||
@@ -15,7 +16,8 @@
|
||||
:filter-node-method='filterNode'
|
||||
:props='defaultProps'
|
||||
node-key='id'
|
||||
class="filter-tree"
|
||||
class="filter-tree"
|
||||
:highlight-current="true"
|
||||
default-expand-all
|
||||
:default-checked-keys='defaultChecked'
|
||||
@node-click='handleNodeClick'
|
||||
@@ -35,13 +37,14 @@
|
||||
<script lang='ts' setup>
|
||||
import { type Plan } from '@/api/plan/interface';
|
||||
import { Menu, Platform, CircleCheck,Loading } from '@element-plus/icons-vue'
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
|
||||
const router = useRouter()
|
||||
const checkStore = useCheckStore()
|
||||
|
||||
const filterText = ref('')
|
||||
const treeRef = ref()
|
||||
const data: any = ref([])
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
@@ -62,12 +65,16 @@ const getTreeData = (val: any) => {
|
||||
checkStore.setPlanCode(node.code)
|
||||
checkStore.setScriptId(node.scriptId)
|
||||
checkStore.setErrorSysId(node.errorSysId)
|
||||
console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
||||
// 高亮显示第一个节点
|
||||
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
|
||||
nextTick(() => {
|
||||
treeRef.value?.setCurrentKey(node.id);
|
||||
});
|
||||
//console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
||||
}
|
||||
|
||||
}
|
||||
const filterText = ref('')
|
||||
const treeRef = ref()
|
||||
|
||||
const {updateSelectedTreeNode} = defineProps<{
|
||||
updateSelectedTreeNode:Function;
|
||||
}>();
|
||||
@@ -89,8 +96,10 @@ const handleNodeClick = (data: Plan.ResPlan) => {
|
||||
}
|
||||
const filterNode = (value: string, data: any) => {
|
||||
if (!value) return true
|
||||
return data.name.includes(value)
|
||||
return data.name.includes(value)
|
||||
}
|
||||
|
||||
|
||||
// 点击详情
|
||||
const detail = () => {
|
||||
router.push('/plan')
|
||||
@@ -99,6 +108,8 @@ onMounted(() => {
|
||||
// console.log()
|
||||
})
|
||||
defineExpose({ getTreeData })
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.plan_tree {
|
||||
@@ -108,7 +119,7 @@ defineExpose({ getTreeData })
|
||||
flex-direction: column;
|
||||
padding: 5px;
|
||||
// height: calc(100% - 70px);
|
||||
background-color: #fff;
|
||||
background-color: #ffffff;
|
||||
|
||||
.search_view {
|
||||
width: 100%;
|
||||
@@ -142,13 +153,16 @@ defineExpose({ getTreeData })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.filter-tree {
|
||||
// border: 1px solid #dcdfe6;
|
||||
min-width: 100%;
|
||||
height: 97%;
|
||||
height: 97%;
|
||||
display: inline-block;
|
||||
overflow: auto;
|
||||
margin-top: 12px;
|
||||
|
||||
}
|
||||
|
||||
//.filter-tree span {
|
||||
@@ -160,7 +174,6 @@ defineExpose({ getTreeData })
|
||||
// text-overflow:ellipsis;
|
||||
// padding-right: 12px;
|
||||
//}
|
||||
|
||||
.leftBox {
|
||||
// float: left;
|
||||
// width: 20%;
|
||||
|
||||
Reference in New Issue
Block a user