任务树调整
This commit is contained in:
parent
6501cb0d1b
commit
c3bb3266a4
@ -10,8 +10,9 @@
|
||||
:highlight-current="false"
|
||||
style="background-color: transparent;max-height: calc(100% - 54px);overflow-y: auto;"
|
||||
:expand-on-click-node="false"
|
||||
@node-click="handleClick"
|
||||
>
|
||||
<div slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<div slot-scope="{ node, data }" class="custom-tree-node" :style="{ cursor: data.nodeType === 'MODULE_GROUP'? 'not-allowed':'pointer' }">
|
||||
<div :style="{ color: nowData.name === data.name && nowData.id === data.id? '#8f079d': '#fff' }">{{ data.name }}</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
@ -109,7 +110,6 @@ export default {
|
||||
this.nowKey = this.$route.query.nowKey || 0;
|
||||
}
|
||||
this.nowData = this.taskList[this.nowKey];
|
||||
// console.log(this.taskData, this.taskList, this.nowData, '===', data);
|
||||
}).catch(() => this.$message.error('加载数据失败!'));
|
||||
},
|
||||
methods: {
|
||||
@ -121,10 +121,15 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChange(data, node) {
|
||||
node.isCurrent = false;
|
||||
this.$set(node, 'isCurrent', false);
|
||||
this.nowData = data;
|
||||
handleClick(data) {
|
||||
const index = this.taskList.findIndex(ele => {
|
||||
return ele.id === data.id;
|
||||
});
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
this.nowKey = index;
|
||||
this.nowData = this.taskList[this.nowKey];
|
||||
},
|
||||
eachTask(list, data) {
|
||||
data.forEach(ele => {
|
||||
|
Loading…
Reference in New Issue
Block a user