master
yujialong 3 years ago
commit 77cffaf9bd
  1. 4
      src/App.vue
  2. 1
      src/components/myTree/src/tree.vue
  3. 3
      src/views/Catalog.vue
  4. 49
      src/views/Transaction.vue

@ -22,7 +22,9 @@ body {
margin: 0;
background-color: #f8f7f7;
}
/deep/.el-tree-node__content {
height: 20px!important;
}
#nav {
padding: 30px;
}

@ -486,7 +486,6 @@
},
mounted() {
console.log(this.data)
this.initTabIndex();
this.$el.addEventListener('keydown', this.handleKeydown);
},

@ -214,12 +214,15 @@ export default {
margin: 0 50px;
}
/deep/ .el-tree-node:focus > .el-tree-node__content {
height: 20px!important;
background-color: #f5f2ff;
}
/deep/ .el-tree-node__content:hover {
height: 20px!important;
background-color: #f5f2ff;
}
/deep/ .el-tree-node__label:active {
height: 20px!important;
color: #9278ff;
}
//

@ -69,9 +69,9 @@
<template slot-scope="scope" v-if="scope.row.isSubject">
<p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p>
<div class="tree-con">
<div class="block1" id="divTree">
<div class="block1" :id="'divTree'+scope.$index">
<my-tree
id="depTree"
:id="'depTree'+scope.$index"
class="action"
:ref="'tree-'+scope.$index"
:data="treeData"
@ -301,8 +301,12 @@
</div>
</template>
<template v-else-if="scope.row.type == 7">
<div style="line-height: 65px"></div>
</template>
<template v-else>
<div style="line-height: 65px">{{ checkChange[scope.$index]? '需点击' : '' }}</div>
<div style="line-height: 65px">{{ checkChange[scope.$index]? '需点击222' : checkChange[scope.$index] }}</div>
</template>
</div>
</template>
@ -395,16 +399,6 @@ export default {
if (item.operationIds) {
this.$nextTick(() => {
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
for (var i=0;i<this.treeData.length;i++){
if (this.treeData[i].children>0){
let children = this.treeData[i].children
for (var j=0;j<children.length;j++){
if (children[j].children>0) {
let childrens = children[i].children
}
}
}
}
// let currentNode = this.$refs[`tree-${index}`].getNode([item]);
// while ( parentLevel>0)//while ( 1!=parentLevel)
// let dom = document.querySelector("#divTree")
@ -426,7 +420,7 @@ export default {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
// console.log(err);
});
},
//1.+-
@ -486,12 +480,23 @@ export default {
this.$set(this.tableData, index, item);
}
}).catch(err => {
console.log(err);
// console.log(err);
});
},
handleCheckChange(data, checked, indeterminate, row, index) { //
console.log('---')
console.log(this.checkChange)
this.checkChange[this.checkChange.length -1 ] = true
this.checkChange.push(false)
let divTree = '#divTree'+index;
let dom = document.querySelector(divTree)
let depTree = '#depTree'+index;
let dom1 = document.querySelector(depTree)
let nodeHight =26
dom1.style.height = (data.number * nodeHight) + "px"
let contHeight=(data.number * nodeHight)//,
dom.scrollTo(0, contHeight)
this.checkChange = true
if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id
// for ()
@ -525,7 +530,7 @@ export default {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
// console.log(err);
});
},
toTreeId(data, parentId) { // id++,便key,id
@ -563,7 +568,7 @@ export default {
this.isNameRepeat = true;
}
}).catch(err => {
console.log(err);
// console.log(err);
});
}
},
@ -641,7 +646,7 @@ export default {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
// console.log(err);
});
} else if (this.isEdit) { //
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => {
@ -652,7 +657,7 @@ export default {
this.$message.warning(res.message);
}
}).catch(err => {
console.log(err);
// console.log(err);
});
}
},
@ -813,7 +818,11 @@ export default {
}
};
</script>
<style>
.el-tree-node__content {
height: 26Px!important;
}
</style>
<style lang="scss" scoped>
.content {
position: relative;

Loading…
Cancel
Save