zenglf
2023-09-28 997835429a1d66643364091e8437ebbbeb8ff97a
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue
@@ -6,7 +6,7 @@
        <a-row :gutter="24">
          <a-col :md="7" :sm="7">
            <a-form-item label="时间">
              <a-range-picker @change="dateParamChange" v-model="dates"  format="YYYY-MM-DD HH:mm:ss" showTime/>
              <a-range-picker @change="dateParamChange" v-model="dates"  format="YYYY-MM-DD HH:mm:ss"/>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="4">
@@ -192,6 +192,7 @@
      Type(valmath){
        this.dataList = [];
        this.queryParams.typeTree = valmath
        console.log(valmath,'触发Type的watch方法')
        // console.log(this.queryParams.typeTree)
      },
      nodeTree(val) { //监听currSelected 变化,将变化后的数值传递给 getCurrSelected 事件
@@ -240,8 +241,12 @@
      onOk(value) {
        console.log('onOk: ', value);
      },
      /**
       * 查询区域重置按钮
       */
      searchReset() {
        if(this.queryParams.typeTree == "1"){
          console.log('第一个的typeTree',this.queryParams.typeTree)
          this.typeTree = this.queryParams.typeTree
          this.typeParent =  this.queryParams.parentId
          this.typeEquipment = this.queryParams.equipmentId
@@ -250,6 +255,7 @@
          this.dates = []
          this.queryParams.typeTree = this.typeTree
          this.queryParams.parentId = this.typeParent
          console.log('进入第一个')
          if(this.queryParams.parentId !=  ""){
            this.queryParams.equipmentId =  ""
          }else{
@@ -258,12 +264,12 @@
            }else{
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          this.ipagination.current = 1
          this.ResetloadData();
        }else{
          console.log('进入第二个')
          console.log('第二个的typeTree',this.queryParams.typeTree)
          this.typeTree = this.queryParams.typeTree
          this.typeParent =  this.queryParams.parentId
          // this.typeEquipment = this.queryParams.equipmentId
@@ -411,10 +417,8 @@
        if(this.queryParams.typeTree == "1"){
          this.queryParams.parentId =  this.queryParamEquip.parentId
          // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
        }else{
          this.queryParams.parentId = this.queryParamPeople.parentId
          // this.queryParams.equipmentId = ""
        }
        this.dataSource = [];
@@ -432,7 +436,7 @@
        param.equipmentId = this.queryParams.equipmentId;
        param.startTime = this.queryParam.startTime;
        param.endTime =  this.queryParam.endTime;
        // console.log(param);
        console.log('param',param);
        getAction(this.url.list,param).then((res) => {
          if(res.success){
            this.dataSource = res.result.records||res.result;
@@ -544,7 +548,7 @@
            //重新计算分页问题
            that.reCalculatePage(1)
            // that.$message.success(res.message);
            that.$notification.warning({
            that.$notification.success({
              message:'消息',
              description:res.message
            });
@@ -607,6 +611,7 @@
        }
      },
      handleAdd() {
        console.log(this.$refs.modalForm.edit)
        this.$refs.modalForm.add(this.node)
        this.$refs.modalForm.title = '新增'
        this.$refs.modalForm.disableSubmit = false
@@ -656,9 +661,19 @@
          exclude_inputs: true
        });
      },
      // /**
      //  * 车间选中项取消后触发此事件,由BaseTree组件由事件总线触发
      //  * @param value 提示信息
      //  */
      // treeClearSelected(value){
      //   this.queryParams.equipmentId=''
      //   this.queryParams.parentId=''
      //   this.ResetloadData()
      // }
    },
    created() {
      this.queryParam.typeTree = "1"
      // this.$bus.$on('treeClearSelected',this.treeClearSelected)
    }
  }
</script>