Browse Source

继续优化

master
dai 3 years ago
parent
commit
68b17fcbcd
  1. 53
      src/views/modules/visual/warning/components/screen-table/index.vue

53
src/views/modules/visual/warning/components/screen-table/index.vue

@ -1,5 +1,6 @@
<template>
<div class="warning-table">
<div>
<!-- <div class="warning-table">
<div class="table">
<div class="table-header">
<div
@ -40,6 +41,16 @@
</div>
</div>
</div>
</div> -->
<cpt-tb
:highlight-top3="true"
:col-list="tableContentStyle"
:loading="visibleLoading"
:header="headerList.map((item) => item.title)"
:list="cptTbData"
@operate="handleOperate"
></cpt-tb>
<people-list
v-if="showedPeopleList && buildingId"
@ -53,14 +64,15 @@
<script>
import ScreenLoading from "../screen-loading/index";
import Vue from "vue";
import peopleList from "./people-list";
import cptTb from "@/views/modules/visual/cpts/tb";
export default {
name: "warning-table",
components: {
ScreenLoading,
peopleList,
cptTb,
},
props: {
headerList: {
@ -133,22 +145,8 @@ export default {
type: Boolean,
default: true,
},
// //
// ava: {
// type: Number,
// default: 8
// },
// // --10%
// headerHeightAva: {
// type: String,
// default: '10%'
// },
// //
// tableContentAva: {
// type: Number,
// default: 5
// },
},
data() {
return {
//
@ -158,6 +156,22 @@ export default {
gridName: "",
};
},
computed: {
cptTbData() {
return this.tableData.map((item) => {
return item.map((subitem) => {
if (subitem.type && subitem.type == "btn") {
subitem.type = "operate";
subitem.list = [subitem.name];
}
console.log(subitem);
return subitem;
});
});
},
},
watch: {},
mounted() {},
@ -165,6 +179,11 @@ export default {
created() {},
methods: {
handleOperate(index) {
let item = this.tableData[index];
this.handleClickBtn(item[item.length - 1]);
},
handleClickBtn(item) {
this.showedPeopleList = true;
this.buildingId = item.buildingId;

Loading…
Cancel
Save