| | |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | | :close-on-click-modal="false" |
| | | width="40%" |
| | | > |
| | | <el-form ref="form" :rules="rules" :model="form" label-width="80px"> |
| | |
| | | <el-button type="primary" class="btns" @click="AddelementManagement()" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="cancel()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | }); |
| | | }, |
| | | deleteById(val) { |
| | | console.log(123,val) |
| | | this.$confirm('确认删除吗','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(()=>{ |
| | | elementManagementDel({id:val}).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.elementManagementL(); |
| | |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | // message: res.data.message, |
| | | message: "当前A级要素仍然有已绑定的B级要素,无法删除" |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch(error =>{ |
| | | }); |
| | | }, |
| | | cancel(){ |
| | | this.elementManagementL(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | find(){ |
| | | this.elementManagementL(); |