zhaowei
15 小时以前 6c86748e1a987865cbf5bafa9b122c76bd24a695
src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue
@@ -47,6 +47,11 @@
      type:Boolean,
      default:()=>true,
      required:false
    },
    factoryOrgCode:{
      type:String,
      default:'',
      required:false
    }
  },
  data() {
@@ -80,7 +85,7 @@
    initSelectValue() {
      if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
        console.log("这才请求后台")
        getAction(`/eam/equipment/asyncLoadEquipment`, { id: this.value }).then(res=>{
        getAction(`/eam/equipment/asyncLoadEquipment`, { id: this.value,factoryOrgCode:this.factoryOrgCode }).then(res=>{
          if(res.success){
            if(res.result && res.result.length > 0){
              let obj = {
@@ -101,7 +106,7 @@
      this.options = []
      this.loading = true
      // 字典code格式:table,text,code
      getAction(`/eam/equipment/asyncLoadEquipment`, { keyword: value, pageSize: this.pageSize }).then(res => {
      getAction(`/eam/equipment/asyncLoadEquipment`, { keyword: value, pageSize: this.pageSize,factoryOrgCode:this.factoryOrgCode }).then(res => {
        this.loading = false
        if (res.success) {
          if (currentLoad != this.lastLoad) {
@@ -119,7 +124,7 @@
    initDictData() {
      //异步一开始也加载一点数据
      this.loading = true
      getAction(`/eam/equipment/asyncLoadEquipment`, { pageSize: this.pageSize, keyword: '' }).then(res => {
      getAction(`/eam/equipment/asyncLoadEquipment`, { pageSize: this.pageSize, keyword: '' ,factoryOrgCode:this.factoryOrgCode}).then(res => {
        this.loading = false
        if (res.success) {
          this.options = [...res.result]
@@ -137,12 +142,14 @@
        this.selectedAsyncValue = selectedObj
        //update-begin---author:wangshuai ---date:20221115  for:[issues/4213]JSearchSelectTag改造支持多选------------
        this.selectedValue = selectedObj.key
        this.$emit('autocompleteForm', this.options.find(item => item.equipmentId === selectedObj.value))
        //update-end---author:wangshuai ---date:20221115  for:[issues/4213]JSearchSelectTag改造支持多选------------
      } else {
        this.selectedAsyncValue = undefined
        this.selectedValue = undefined
        this.options = []
        this.loadData('')
        this.$emit('autocompleteForm', {})
      }
      this.callback()
      //update-end-author:scott date:20201222 for:【搜索】搜索查询组件,删除条件,默认下拉还是上次的缓存数据,不好 JT-191