| | |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧树 --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <div style="height: calc(100vh - 260px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | // 新增 编辑 保存 |
| | | addSaveHandler() { |
| | | const saveFunction = this.dialogTitle === 'add' ? addVersionRule : updateVersionRule; |
| | | |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.visible = false; |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.visible = false; |
| | | } else { |
| | | this.$message.error(res.data.obj); |
| | | } |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }); |
| | | } else { |
| | | this.$message.error(res.data.obj); |
| | | return false; |
| | | } |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }); |
| | | }, |
| | | |
| | |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewData.filter(item => { |
| | | this.checkViewData = this.checkViewDataSearch.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | | }); |
| | | |