| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <template v-if="queryParam.baseFactoryId"> |
| | | <template v-if="queryParam.factoryId"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | |
| | | visible: false, |
| | | url: { |
| | | list: '/eam/BaseFactoryUser/BaseFactoryUserList', |
| | | add: '/eam/BaseFactory/add', |
| | | delete: '/eam/BaseFactory/delete', |
| | | deleteBatch: '/eam/BaseFactory/deleteBatch' |
| | | add: '/eam/BaseFactoryUser/add', |
| | | delete: '/eam/BaseFactoryUser/delete', |
| | | deleteBatch: '/eam/BaseFactoryUser/deleteBatch' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | show(baseFactoryId) { |
| | | this.$set(this.queryParam, 'baseFactoryId', baseFactoryId) |
| | | show(factoryId) { |
| | | this.$set(this.queryParam, 'factoryId', factoryId) |
| | | this.loadData(1) |
| | | }, |
| | | |
| | |
| | | |
| | | handleDelete(id) { |
| | | const that = this |
| | | deleteAction(that.url.delete, { id, baseFactoryId: this.queryParam.baseFactoryId }) |
| | | deleteAction(that.url.delete, { id, factoryId: this.queryParam.factoryId }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | |
| | | that.loading = true |
| | | deleteAction(that.url.deleteBatch, { |
| | | ids, |
| | | baseFactoryId: that.queryParam.baseFactoryId |
| | | factoryId: that.queryParam.factoryId |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | |
| | | const that = this |
| | | const params = { |
| | | userId: selectedUserIdsArray.join(), |
| | | baseFactoryId: this.queryParam.baseFactoryId |
| | | factoryId: this.queryParam.factoryId |
| | | } |
| | | that.loading = true |
| | | postAction(that.url.add, params) |
| | |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = { baseFactoryId: this.queryParam.baseFactoryId } |
| | | this.queryParam = { factoryId: this.queryParam.factoryId } |
| | | this.loadData(1) |
| | | } |
| | | |