zhangherong
2025-06-30 5d49c377895a2d2d88e794d6aae4bb309cbab0f3
src/views/system/modules/UserModal.vue
@@ -334,11 +334,11 @@
      </a-button>
    </div>
    <select-device-modal
      ref="selectDeviceModal"
      @selectFinished="selectOK"
      :title="'选择设备'"
    />
<!--    <select-device-modal-->
<!--      ref="selectDeviceModal"-->
<!--      @selectFinished="selectOK"-->
<!--      :title="'选择设备'"-->
<!--    />-->
  </a-drawer>
</template>
@@ -353,12 +353,12 @@
  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() {
@@ -435,10 +435,10 @@
      },
      '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 = ''
@@ -792,10 +792,10 @@
      },
      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(',') : []
      },
      /**