cuijian
11 小时以前 135b5b2e497514dc4456e33b0db0fe5e7fa4e62f
src/views/tms/modules/baseTools/BaseToolsListRight.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false">
  <a-card :bordered="false" style="flex: 1;overflow:auto;max-height: 600px; min-height: 600px">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -206,8 +206,8 @@
        /* 分页参数 */
      ipagination:{
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '50'],
        pageSize: 5,
        pageSizeOptions: ['5', '10', '30'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " 共" + total + "条"
        },
@@ -406,22 +406,23 @@
        this.$bus.$emit('queryTreeData') //刷新左侧树
      },
      onSelectChange(selectedRowKeys) {
      onSelectChange(selectedRowKeys,selectionRows) {
        this.selectedRowKeys = selectedRowKeys;
        this.selectionRows = selectionRows;
        //通过id查询管理参数和参数数据
        getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => {
        getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.selectionRows[0].paraTypeFlag}).then((res) => {
          if (res.success) {
            if(this.paraTypeFlag === "1"){
            if(this.selectionRows[0].paraTypeFlag === "1"){
              this.$refs.paraCommonToolList.getPara(res.result);
            }else if(this.paraTypeFlag === "2"){
            }else if(this.selectionRows[0].paraTypeFlag === "2"){
              this.$refs.paraHoleToolsList.getPara(res.result);
            }else if(this.paraTypeFlag === "3"){
            }else if(this.selectionRows[0].paraTypeFlag === "3"){
              this.$refs.paraThreadingToolList.getPara(res.result);
            }else if(this.paraTypeFlag === "4"){
            }else if(this.selectionRows[0].paraTypeFlag === "4"){
              this.$refs.paraMillToolList.getPara(res.result);
            }else if(this.paraTypeFlag === "5"){
            }else if(this.selectionRows[0].paraTypeFlag === "5"){
              this.$refs.paraTurningToolsList.getPara(res.result);
            }else if(this.paraTypeFlag === "6"){
            }else if(this.selectionRows[0].paraTypeFlag === "6"){
              this.$refs.paraBladeList.getPara(res.result);
            }
          } else {
@@ -519,7 +520,7 @@
      },
      loadData() {
        let params = this.getQueryParams();
        if (this.nodeSelected && this.nodeSelected.key !== '-1') {
        if (this.nodeSelected) {
          // 加载选中节点的子类
          params.classifyId = this.nodeSelected.key;
          this.loading = true;
@@ -537,8 +538,11 @@
        }else if(this.paraTypeFlag === '6'){
            httpUrl = this.url.paraBladeList
        }else{
          this.dataSource = [];
          this.clearPara()
          //this.dataSource = [];
          // this.clearPara()
          // this.loading = false;
          // return
          httpUrl = this.url.paraCommonToolList
        }
        getAction(httpUrl, params)
          .then((res) => {
@@ -547,9 +551,10 @@
              this.ipagination.total = res.result.total
              //默认选中第一条数据
              this.selectedRowKeys[0] = res.result.records[0].id
              this.onSelectChange(this.selectedRowKeys)
              this.selectionRows[0] = res.result.records[0]
              this.onSelectChange(this.selectedRowKeys,this.selectionRows)
            } else {
              this.$message.warning("请选择叶子节点进行查询");
              //this.$message.warning("请选择叶子节点进行查询");
              this.ipagination.total = 0
            }
          })
@@ -557,7 +562,7 @@
            this.loading = false;
          });
        } else {
          this.$message.warning("请选择叶子节点进行查询");
          //this.$message.warning("请选择叶子节点进行查询");
        }
      },
      onClearSelected() {