fuliqi
2024-09-03 dae8cdecc05c1d64189d261364ce7fda9c4f505b
Merge remote-tracking branch 'origin/master'
3个文件已修改
2086 ■■■■■ 已修改文件
src/components/RightToolbar/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/data-detail/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/data-detail/list.js 2054 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/RightToolbar/index.vue
@@ -7,14 +7,14 @@
      <el-tooltip class="item" effect="dark" content="刷新" placement="top">
        <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="自定义列" placement="top">
      <el-tooltip v-show="$route.path.includes('equipment')" class="item" effect="dark" content="自定义列" placement="top">
        <el-button size="mini" circle icon="el-icon-collection-tag" @click="addDynamicColumn()" />
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
        <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/>
        <el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'">
          <el-button size="mini" circle icon="el-icon-menu" />
          <el-dropdown-menu slot="dropdown">
          <el-dropdown-menu slot="dropdown" style="max-height: 650px;overflow-y: auto">
            <template v-for="item in columns">
              <el-dropdown-item :key="item.key">
                <el-checkbox :checked="item.visible" @change="checkboxChange($event, item.label)" :label="item.label" />
@@ -115,7 +115,7 @@
    }
  },
  created() {
    if (this.$route.path.concat("equipment")) {
    if (this.$route.path.includes("equipment")) {
      this.getDyColumn()
    }
    if (this.showColumnsType == 'transfer') {
src/views/system/data-manage/data-detail/index.vue
@@ -82,12 +82,13 @@
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <div v-if="tableData.list && tableData.list.length >0">
    <right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery" :columns="showList"></right-toolbar>
    <div>
      <el-table v-loading="loading" :data="tableData.list">
        <el-table-column :prop="item.prop" :label="item.label" v-for="(item, index) in tableHead" :key="index" v-if="item"/>
        <el-table-column :prop="item.prop" :label="item.label" :width="item.width" v-for="(item, index) in tableHead" :key="index" v-if="showListPD(item)"/>
      </el-table>
    </div>
    <el-empty v-else description="暂无数据"></el-empty>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
@@ -238,6 +239,7 @@
        ],
      },
      showList: [],
      tableHead: [],
      cardList: [],
      index: null
@@ -261,29 +263,43 @@
    this.index = this.$route.query.index;
    if (this.$route.query.type === '1') {
      let data = videoData.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
      this.cardList = data.card;
      console.log(this.cardList, "wcnm")
      this.showList = data.showList;
    }
    if (this.$route.query.type === '2') {
      let data = carData.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
      this.cardList = data.card;
      this.showList = data.showList;
    }
    if (this.$route.query.type === '3') {
      let data = faceData.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
      this.cardList = data.card;
      this.showList = data.showList;
    }
    if (this.$route.query.type === '4') {
      let data = equipment.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
      this.cardList = data.card;
      this.showList = data.showList;
    }
    this.getList();
  },
  methods: {
    showListPD(item) {
      if (!this.showList) {
        return true
      }
      let arr = this.showList.filter(d => d.label === item.label)
      if (item && (!arr || arr.length <1)) {
        return true;
      } else {
        return item && arr && arr.length > 0 && arr[0].visible
      }
    },
    /** 修改按钮操作 */
    handleResourceUpdate(row) {
      this.reset("resourceForm");
src/views/system/data-manage/data-detail/list.js
Diff too large