zhaowei
3 天以前 19aff1ac87030b21d2b01cdca5d5604c840ba7c0
src/views/system/modules/SelectDeviceModal.vue
@@ -103,36 +103,16 @@
        this.autoExpandParent = false
      },
      queryTreeData(value) {
        // this.loading = true
        // this.cardLoading = true
        // this.QueryProduction().then(res => {
        //   if (res.success) {
        //     this.dataList = []
        //     this.allTreeKeys = []
        //     this.getTreeDataSouce(res.result)
        //     this.treeDataSource = res.result
        //     this.generateList(this.treeDataSource)
        //     console.log('treeDataSource', this.treeDataSource)
        //     this.expandedKeys = this.allTreeKeys
        //   } else {
        //     this.$message.warn(res.message)
        //   }
        // }).finally(() => {
        //   this.loading = false
        //   this.cardLoading = false
        // })
        this.loading = true
        this.selectedWorkshopIds = value
        getAction(this.url.getDeviceTree, { ids: value })
          .then(res => {
            console.log('res===============', res)
            if (res.success) {
              this.dataList = []
              this.allTreeKeys = []
              this.getTreeDataSouce(res.result)
              this.treeDataSource = res.result
              this.generateList(this.treeDataSource)
              console.log('treeDataSource', this.treeDataSource)
              this.expandedKeys = this.allTreeKeys
            } else {
              this.$notification.warning({
@@ -188,9 +168,7 @@
      },
      onCheck(value, obj) {
        this.checkedKeys = value
        console.log('obj,', obj)
        this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId)
        console.log(this.deviceNodes)
      },
      handleCancel() {
        this.visible = false