| | |
| | | </a-button> |
| | | </div> |
| | | |
| | | <select-device-modal |
| | | ref="selectDeviceModal" |
| | | @selectFinished="selectOK" |
| | | :title="'选择设备'" |
| | | /> |
| | | <!-- <select-device-modal--> |
| | | <!-- ref="selectDeviceModal"--> |
| | | <!-- @selectFinished="selectOK"--> |
| | | <!-- :title="'选择设备'"--> |
| | | <!-- />--> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import SelectDeviceModal from './SelectDeviceModal' |
| | | // import SelectDeviceModal from './SelectDeviceModal' |
| | | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | SelectDeviceModal, |
| | | // SelectDeviceModal, |
| | | JSelectProduction |
| | | }, |
| | | data() { |
| | |
| | | }, |
| | | 'model.selectedProduction': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal && this.$refs.selectDeviceModal) { |
| | | if (newVal) { |
| | | // 如果车间选择前后不一致则重置选择设备 |
| | | if ((oldVal && newVal !== oldVal)) this.model.equipmentIds = '' |
| | | this.$refs.selectDeviceModal.queryTreeData(newVal) |
| | | //this.$refs.selectDeviceModal.queryTreeData(newVal) |
| | | } |
| | | // 如果清空车间值则重置选择设备 |
| | | if (newVal === '') this.model.equipmentIds = '' |
| | |
| | | }, |
| | | |
| | | deviceSearch() { |
| | | this.$refs.selectDeviceModal.visible = true |
| | | this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | this.$refs.selectDeviceModal.selectedRows = [] |
| | | this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] |
| | | //this.$refs.selectDeviceModal.visible = true |
| | | //this.$refs.selectDeviceModal.selectedRowKeys = [] |
| | | //this.$refs.selectDeviceModal.selectedRows = [] |
| | | //this.$refs.selectDeviceModal.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] |
| | | }, |
| | | |
| | | /** |