| | |
| | | methods: { |
| | | initData() { |
| | | getDeptTree().then((res) => { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.dicData = res.data.data; |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.dicData = res.data.data; |
| | | } catch {} |
| | | }); |
| | | }, |
| | | handleAdd(row) { |
| | | this.parentId = row.id; |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = row.id; |
| | | column.addDisabled = true; |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = row.id; |
| | | column.addDisabled = true; |
| | | } catch {} |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | |
| | | }, |
| | | beforeClose(done) { |
| | | this.parentId = ""; |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = ""; |
| | | column.addDisabled = false; |
| | | try { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.value = ""; |
| | | column.addDisabled = false; |
| | | } catch {} |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |