| | |
| | | },
|
| | | async treeNodeClick(data, first) {
|
| | | if (this.type === "batchApplyCode") {
|
| | | if (
|
| | | first === true ||
|
| | | this.localCodeClassifyOid === data.codeClassifyOid
|
| | | ) {
|
| | | if (first === true) {
|
| | | this.codeRuleOid = data.codeRuleOid;
|
| | | // 第一次打开直接赋值不校验
|
| | | this.batchApplyCodeTableData[data.codeRuleOid] = {
|
| | |
| | | codeRuleOid: data.codeRuleOid,
|
| | | };
|
| | | // 不是第一次打开需要优先校验
|
| | | } else if (this.localCodeClassifyOid === data.codeClassifyOid) {
|
| | | console.log("重复点击");
|
| | | } else {
|
| | | if (this.$refs.CodeApply) {
|
| | | if (!(await this.$refs.CodeApply.validate())) {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | // 第一次打开直接赋值不校验
|
| | | if (!this.batchApplyCodeTableData[data.codeRuleOid]) {
|
| | | this.batchApplyCodeTableData[data.codeRuleOid] = {
|
| | | name: data.name,
|
| | |
| | | :option="Treeoption" |
| | | style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px" |
| | | @node-click=" nodeClick" |
| | | @check-change="checkChange" |
| | | class="classifyTree" |
| | | > |
| | | </avue-tree> |
| | | </div> |
| | |
| | | mounted() { |
| | | this.type = this.tabOption.column[0]; |
| | | this.getAttr(); |
| | | const treeEle = this.$refs.tree.$el |
| | | treeEle.addEventListener('click', (e) => { |
| | | if (e.target.nodeName !== 'SPAN') { |
| | | this.$refs.tree.setCurrentKey(null) |
| | | this.nodeClickList = {} |
| | | } |
| | | }, true) |
| | | }, |
| | | computed:{ |
| | | crudTreeOption(){ |
| | |
| | | this.$message.error(error) |
| | | } |
| | | }, |
| | | treeClick(e) { |
| | | console.log(e); |
| | | }, |
| | | //克隆模板树的点击切换数据 |
| | | async ClonenodeClick(data){ |
| | | this.ClonenodeClickList=data; |