| | |
| | | <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" /> |
| | |
| | | ], |
| | | |
| | | }, |
| | | showList: [], |
| | | tableHead: [], |
| | | cardList: [], |
| | | index: null |
| | |
| | | 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"); |