田源
2023-10-19 b387f71a88ba507e207f0a42c69b62975888e980
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -35,15 +35,15 @@
                <el-option label="审核中" value="Auditing"></el-option>
              </el-select></span>
            </div>
            <el-table ref="dataTable" v-loading="isLoading" :data="tableData"
                      :height="tableHeight"
            <el-table class="custom-scrollbar" ref="dataTable" v-loading="isLoading" :data="tableData"
                      :height="tableHeight"  border
                      @select="handleSelection" @cell-click="handleCellClick" @row-click="handleRowClick"
                      @select-all="handleSelectionAll" @selection-change="handleSelectionChange"
                      @sort-change="sortChange">
              <el-table-column v-if="tableData.length != 0" fixed type="selection" width="55"></el-table-column>
              <el-table-column v-if="tableData.length != 0" fixed label="序号" type="index" width="55">
              </el-table-column>
              <el-table-column v-for="item in CodeArray" v-if="!item.hidden" :label="item.label" :prop="item.prop"
              <el-table-column  v-for="item in CodeArray" v-if="CodeArray.length !== 0 && !item.hidden" :label="item.label" :prop="item.prop"
                               :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width"
                               align="center">
                <template slot-scope="scope">
@@ -52,7 +52,7 @@
                  </el-link>
                </template>
              </el-table-column>
              <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id'"
              <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id' && item.prop !== 'lcstatus'"
                               :key="item.id"
                               :formatter="item.formatter"
                               :label="item.label" :prop="item.prop"
@@ -60,6 +60,13 @@
                               :sortable="item.sortable"
                               :width="item.width"
                               align="center">
              </el-table-column>
              <el-table-column v-for="item in lcstatusArray" v-if=" lcstatusArray.length !== 0 && !item.hidden" label="生命周期值" prop="lcstatus"
                                :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width"
                                align="center">
                <template slot-scope="scope">
                  <span>{{ scope.row.lcstatus_text }}</span>
                </template>
              </el-table-column>
            </el-table>
          </el-row>
@@ -220,6 +227,8 @@
      LinkList: [],
      isCodeArrayPushed: false, // 编码数组添加标识变量
      CodeArray: [],
      lcstatusArray:[],
      islcstatusPushed:false,
      // 状态搜索
      statusSelect: "all",
      // 关键字查询
@@ -372,9 +381,24 @@
          }
        })
        this.tableHeadFindDatas = newval;
        console.log('new',newval)
        if (!this.isCodeArrayPushed) {
          this.CodeArray.push(newval.find(item => item.prop === 'id'))
          this.isCodeArrayPushed = true
          if (newval.find(item => item.prop === 'id')) {
            this.CodeArray.push(newval.find(item => item.prop === 'id'));
          } else {
            this.CodeArray.push([]);
          }
          console.log('CodeArray', this.CodeArray);
          this.isCodeArrayPushed = true;
        }
        if (!this.islcstatusPushed) {
          if (newval.find(item => item.prop === 'lcstatus')) {
            this.lcstatusArray.push(newval.find(item => item.prop === 'lcstatus'));
          } else {
            this.lcstatusArray.push([]);
          }
          console.log('lcstatusArray', this.lcstatusArray);
          this.islcstatusPushed = true;
        }
        // console.log('new',newval)
        this.WupinFindValue = ''
@@ -750,7 +774,7 @@
    },
    // 排序
    sortChange(val) {
      console.log(val)
      // console.log(val)
      this.isLoading = true;
      let order = "";
      if (val.order == "ascending") {
@@ -942,5 +966,16 @@
.bottom {
  margin-top: 10px;
}
//.custom-scrollbar::-webkit-scrollbar {
//  width: 10px  !important;;/* 设置滚动条的宽度 */
//}
//
//.custom-scrollbar::-webkit-scrollbar-thumb {
//  background-color: #a11313  !important;; /* 设置滚动条的颜色 */
//  border-radius: 5px  !important;; /* 设置滚动条的边框弧度 */
//}
//
//.custom-scrollbar::-webkit-scrollbar-track {
//  background-color: #f1f1f1  !important;; /* 设置滚动条的轨道颜色 */
//}
</style>