筛选日期:
-
+
近7天
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
@@ -83,169 +179,208 @@
清空筛选条件
-
-
-
-
-
-
-
-
- {{ row.orgName }}
-
-
-
-
-
-
-
- {{ row.avgExacutiveRate || 0 }}%
+
+
+
+ 设备使用统计
-
-
-
-
+
+
-
-
- {{ row.area }}
+
+
+
+ 查看详情
-
-
-
-
- {{ row.operationStaffName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
- 设备使用统计
+
+
+
+ 查看详情
-
-
+
+
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- 查看详情
+ 查看详情
-
+ -->
-
-
-
-
-
-
-
- {{ row.avgExacutiveRate || 0 }}%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查看详情
-
-
-
-
-
+
@@ -256,6 +391,24 @@ import { getAreaList } from "@/api/modules/api";
export default {
data() {
return {
+ tableIdName: "buildCount1", // 当前页面需要的变量
+ tableOption: this.$tableOption.buildCount1, // 当前table配置项
+ showColumn: [], // 监听的显示列的变量
+ tableLoading: false, // 是否显示加载中
+ page: {
+ total: 0, // 总页数
+ currentPage: 1, // 当前页数
+ pageSize: 30, // 每页显示多少条
+ },
+
+ tableIdName1: "buildCount2", // 当前页面需要的变量
+ tableOption1: this.$tableOption.buildCount2, // 当前table配置项
+ showColumn1: [], // 监听的显示列的变量
+
+ tableIdName2: "buildCount3", // 当前页面需要的变量
+ tableOption2: this.$tableOption.buildCount3, // 当前table配置项
+ showColumn2: [], // 监听的显示列的变量
+
props: {
lazy: true,
checkStrictly: true,
@@ -321,7 +474,33 @@ export default {
computed: {
...mapGetters(["permissions"]),
},
+ watch: {
+ showColumn(nowV) {
+ let params = {
+ tableIdName: this.tableIdName,
+ optionData: nowV,
+ };
+ this.$db.upDate(params);
+ },
+ showColumn1(nowV) {
+ let params = {
+ tableIdName: this.tableIdName1,
+ optionData: nowV,
+ };
+ this.$db.upDate(params);
+ },
+ showColumn2(nowV) {
+ let params = {
+ tableIdName: this.tableIdName2,
+ optionData: nowV,
+ };
+ this.$db.upDate(params);
+ },
+ },
+
created() {
+ // 获取显隐的列表
+ this.setTableOption();
this.cus_build_area_record = this.permissions["cus_build_area_record"];
this.cus_build_count_download =
this.permissions["cus_build_count_download"];
@@ -330,12 +509,58 @@ export default {
if (this.orgType == 1) {
this.selflag = "3";
}
+
+ this.checkOption();
+
// 获取项目列表
this.tabtimetap(4);
this.getOperaList();
this.houseStatistics();
},
methods: {
+ // 获取当前页面的显隐
+ setTableOption() {
+ this.$db.getDataByKey(this.tableIdName).then((res) => {
+ console.log(res, "获取存储的res");
+ if (res.tableIdName == this.tableIdName) {
+ this.showColumn = res.optionData;
+ }
+ });
+ },
+
+ // 切换table选项后获取缓存的数据
+ getNowTable() {
+ let name =
+ this.activeTotal == 0
+ ? this.tableIdName
+ : this["tableIdName" + this.activeTotal];
+ let showArr =
+ this.activeTotal == 0 ? "showColumn" : `showColumn${this.activeTotal}`;
+ this.$db.getDataByKey(name).then((res) => {
+ console.log(res, "获取存储的res");
+ if (res.tableIdName == name) {
+ this[showArr] = res.optionData;
+ }
+ });
+ },
+
+ // 检测是否可以展示某些字段
+ checkOption() {
+ const checkArr = ["运营人员"];
+ checkArr.forEach((item) => {
+ let index = this.$tableOption[this.tableIdName].column.findIndex(
+ (findObj) => item == findObj.label
+ );
+ if (index >= 0) {
+ let obj = this.$tableOption[this.tableIdName].column[index];
+ if (obj.label == "运营人员" && this.orgType != 2) {
+ obj.hide = false;
+ obj.showColumn = true;
+ }
+ }
+ });
+ },
+
downLoad() {
let obj = {
...this.searchForm,
@@ -488,6 +713,7 @@ export default {
}
}
this.clascreen();
+ this.getNowTable()
// this.houseStatistics();
},
timeChange(e) {
@@ -516,7 +742,7 @@ export default {
this.searchForm.orgName = "";
},
screen() {
- this.currentPage = 1;
+ this.page.currentPage = 1;
console.log(this.searchForm);
this.houseStatistics();
},
@@ -535,13 +761,13 @@ export default {
startDate: "",
endDate: "",
};
- this.currentPage = 1;
+ this.page.currentPage = 1;
this.houseStatistics();
},
houseStatistics() {
let obj = {
- current: this.currentPage,
- size: this.size,
+ current: this.page.currentPage,
+ size: this.page.pageSize,
...this.searchForm,
agentId: localStorage.getItem("agentId"),
orgCode: localStorage.getItem("orgCode"),
@@ -560,7 +786,11 @@ export default {
this.$api.api.houseStatistics1(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
- this.total = res.data.total;
+ this.page.total = res.data.total;
+ // 表格中设置ref属性,在数据渲染之后或者updated()之后
+ this.$nextTick(() => {
+ this.$refs.crud.doLayout();
+ });
});
} else if (this.activeTotal == 1) {
obj.operationType = null;
@@ -568,7 +798,11 @@ export default {
this.$api.api.agentStatistics(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
- this.total = res.data.total;
+ this.page.total = res.data.total;
+ // 表格中设置ref属性,在数据渲染之后或者updated()之后
+ this.$nextTick(() => {
+ this.$refs.crud.doLayout();
+ });
});
} else {
if (this.orgType == 0) {
@@ -582,10 +816,10 @@ export default {
this.$api.api.companyStatistics(obj).then((res) => {
// console.log(res);
this.tableData = res.data.records;
- this.total = res.data.total;
- // 表格中设置ref属性,在数据渲染之后或者updated()之后
+ this.page.total = res.data.total;
+ // 表格中设置ref属性,在数据渲染之后或者updated()之后
this.$nextTick(() => {
- this.$refs.table.doLayout();
+ this.$refs.crud.doLayout();
});
});
}
@@ -595,12 +829,12 @@ export default {
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
- this.size = val;
+ this.page.pageSize = val;
this.houseStatistics();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
- this.currentPage = val;
+ this.page.currentPage = val;
this.houseStatistics();
},
},
@@ -700,7 +934,7 @@ export default {
thead {
tr {
th {
- background: #F5F7FA;
+ background: #f5f7fa;
color: #333333;
}
}
@@ -708,11 +942,11 @@ export default {
}
/deep/ .el-button--primary {
- background: #2671E2 !important;
- border: 1px solid #2671E2 !important;
+ background: #2671e2 !important;
+ border: 1px solid #2671e2 !important;
}
/deep/ .el-button--text {
- color: #2671E2;
+ color: #2671e2;
}
diff --git a/src/views/building/table.js b/src/views/building/table.js
index 74691ac..41e5c0b 100644
--- a/src/views/building/table.js
+++ b/src/views/building/table.js
@@ -66,13 +66,13 @@ export default {
dicData: [{
label: '正式',
value: 0
- },{
+ }, {
label: '试用',
value: 1
- },{
+ }, {
label: '演示',
value: 2
- },{
+ }, {
label: '测试',
value: 3
}]
@@ -142,5 +142,293 @@ export default {
prop: "provinceName",
},
]
- }
+ },
+
+ buildCount1: {
+ border: true,
+ index: false,
+ height: 420,
+ indexLabel: "序号",
+ stripe: true,
+ menuAlign: "center",
+ menuWidth: 146,
+ menu: true,
+ align: "left",
+ refreshBtn: false,
+ searchSize: "mini",
+ searchMenuSpan: 9,
+ delBtn: false,
+ addBtn: false,
+ editBtn: false,
+ viewBtn: false,
+ size: "small",
+ column: [
+ {
+ label: "项目名称",
+ prop: "propertyName",
+ },
+ {
+ label: "公司名称",
+ prop: "orgName",
+ minWidth: '100px',
+ },
+ {
+ label: "代理商",
+ prop: "agentName",
+ minWidth: '100px',
+ },
+ {
+ label: "平均执行率",
+ prop: "avgExacutiveRate",
+ sortable: true,
+ minWidth: '110px',
+ formatter: row => {
+ return (row.avgExacutiveRate || 0) + '%'
+ }
+ },
+ {
+ label: "设备总数",
+ prop: "equipmentNum",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "地区",
+ prop: "area",
+ formatter: row => {
+ return row.area || '-'
+ }
+ },
+ {
+ label: "运营人员",
+ prop: "operationStaffName",
+ hide: true,
+ showColumn: false,
+ formatter: row => {
+ return row.operationStaffName || '-'
+ }
+ },
+ {
+ label: "在线设备",
+ prop: "onlineQuantity",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "离线设备",
+ prop: "noOnlineQuantity",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "活跃设备",
+ prop: "activeQuantity",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "活跃顾问",
+ prop: "activeAccount",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "接待量",
+ prop: "sumReception",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "接待时长",
+ prop: "sumRecordTime",
+ minWidth: '100px',
+ sortable: true,
+ },
+ {
+ label: "违禁次数",
+ prop: "sumProhibitedQuantity",
+ minWidth: '100px',
+ sortable: true,
+ },
+ ]
+ },
+
+ buildCount2: {
+ border: true,
+ index: false,
+ height: 420,
+ indexLabel: "序号",
+ stripe: true,
+ menuAlign: "center",
+ menuWidth: 146,
+ menu: true,
+ align: "left",
+ refreshBtn: false,
+ searchSize: "mini",
+ searchMenuSpan: 9,
+ delBtn: false,
+ addBtn: false,
+ editBtn: false,
+ viewBtn: false,
+ size: "small",
+ column: [
+ {
+ label: "代理商名称",
+ prop: "agentName",
+ minWidth: '120px',
+ },
+ {
+ label: "平均执行率",
+ prop: "avgExacutiveRate",
+ minWidth: '140px',
+ formatter: row => {
+ return (row.avgExacutiveRate || 0) + '%'
+ }
+ },
+ {
+ label: "运营人员",
+ prop: "operationStaffName",
+ minWidth: '140px',
+ formatter: row => {
+ return row.operationStaffName || '-'
+ }
+ },
+ {
+ label: "服务期内项目",
+ prop: "houseQuantityOfEnough",
+ minWidth: '120px',
+ sortable: true,
+ },
+ {
+ label: "接待量",
+ prop: "sumReception",
+ minWidth: '110px',
+ sortable: true,
+ },
+ {
+ label: "设备总数",
+ prop: "equipmentNum",
+ minWidth: '110px',
+ sortable: true,
+ },
+ {
+ label: "接待时长",
+ prop: "sumRecordTime",
+ minWidth: '110px',
+ sortable: true,
+ },
+ {
+ label: "违禁次数",
+ prop: "sumProhibitedQuantity",
+ minWidth: '110px',
+ sortable: true,
+ },
+ ]
+ },
+
+ buildCount3: {
+ border: true,
+ index: false,
+ height: 500,
+ indexLabel: "序号",
+ stripe: true,
+ menuAlign: "center",
+ menuWidth: 146,
+ menu: true,
+ align: "left",
+ refreshBtn: false,
+ searchSize: "mini",
+ searchMenuSpan: 9,
+ delBtn: false,
+ addBtn: false,
+ editBtn: false,
+ viewBtn: false,
+ size: "small",
+ column: [
+ {
+ label: "公司名称",
+ minWidth: '120px',
+ prop: "orgName",
+ },
+ {
+ label: "服务期内项目",
+ minWidth: '100px',
+ prop: "houseQuantityOfEnough",
+ },
+ {
+ label: "平均执行率",
+ minWidth: '120px',
+ sortable: true,
+ prop: "avgExacutiveRate",
+ formatter: row => {
+ return (row.avgExacutiveRate || 0) + '%'
+ }
+ },
+ {
+ label: "在线设备",
+ sortable: true,
+ minWidth: '100px',
+ prop: "onlineQuantity",
+ },
+ {
+ label: "地区",
+ minWidth: '120px',
+ prop: "area",
+ formatter: row => {
+ return row.area || '-'
+ }
+ },
+ {
+ label: "运营人员",
+ minWidth: '120px',
+ prop: "operationStaffName",
+ formatter: row => {
+ return row.operationStaffName || '-'
+ }
+ },
+ {
+ label: "设备总数",
+ minWidth: '120px',
+ sortable: true,
+ prop: "equipmentNum",
+ },
+ {
+ label: "离线设备",
+ minWidth: '120px',
+ sortable: true,
+ prop: "noOnlineQuantity",
+ },
+ {
+ label: "活跃设备",
+ minWidth: '120px',
+ sortable: true,
+ prop: "activeQuantity",
+ },
+ {
+ label: "活跃顾问",
+ minWidth: '120px',
+ sortable: true,
+ prop: "activeAccount",
+ },
+ {
+ label: "接待量",
+ minWidth: '120px',
+ sortable: true,
+ prop: "sumReception",
+ },
+ {
+ label: "接待时长",
+ minWidth: '120px',
+ sortable: true,
+ prop: "sumRecordTime",
+ },
+ {
+ label: "违禁次数",
+ minWidth: '120px',
+ sortable: true,
+ prop: "sumProhibitedQuantity",
+ },
+ ]
+ },
+
}
\ No newline at end of file