| | |
| | | }, |
| | | methods: { |
| | | onSubmit(formName) { |
| | | debugger |
| | | if (this.form.id) { |
| | | // id不为空,修改底库 |
| | | this.$refs[formName].validate(async (valid) => { |
| | |
| | | this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1 |
| | | ); |
| | | }, |
| | | async init() { |
| | | async init(typ) { |
| | | await this.BaseManageData.querySyncTables(); |
| | | this.syncTableList = this.BaseManageData.syncTables; |
| | | if (typ) { |
| | | this.clickLast(typ); |
| | | } else { |
| | | this.defaultShow(); |
| | | } |
| | | await this.BaseManageData.queryLocalTables(); |
| | | this.localTableList = this.BaseManageData.localTables; |
| | | if (typ) { |
| | | this.clickLast(typ); |
| | | } else { |
| | | this.defaultShow(); |
| | | } |
| | | }, |
| | | add(type) { |
| | | this.$emit("changeShow", null, type); |
| | | }, |
| | | clickLast(type) { |
| | | this.$nextTick(() => { |
| | | // this.$nextTick(() => { |
| | | |
| | | // }); |
| | | this.clickCategory( |
| | | this.syncTableList.length - 1, |
| | | type, |
| | | this.syncTableList[this.syncTableList.length - 1] |
| | | ); |
| | | }); |
| | | }, |
| | | clickCategory(index, type, item) { |
| | | this.categoryIndex = type + index; |
| | |
| | | message: "底库删除成功!", |
| | | }); |
| | | } |
| | | this.askDeleteShow=false |
| | | this.$emit("onDelete"); |
| | | }) |
| | | .catch((err) => { |
| | |
| | | message: "底库删除成功!", |
| | | }); |
| | | } |
| | | this.askDeleteShow=false |
| | | |
| | | this.$emit("onDelete"); |
| | | }) |
| | | .catch((err) => { |
| | |
| | | } else { |
| | | this.baseForEdit = {}; |
| | | this.breeadCrumb[1].name = "添加底库"; |
| | | // this.$nextTick(() => { |
| | | // this.$refs.baseSync.clickLast(type) |
| | | // }) |
| | | } |
| | | this.syncType = type; |
| | | this.showList = false; |
| | |
| | | }, |
| | | closeAdd() { |
| | | this.showList = true; |
| | | this.$refs.baseSync.clickLast(this.syncType) |
| | | |
| | | this.$refs.baseSync.init(this.syncType); |
| | | }, |
| | | }, |
| | | props: { |