From f11195779ab58206b5011a92dbdde7f6c44ed283 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 19 八月 2024 17:36:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/system/data-manage/equipment/index.vue | 40 +++++++++++++++++++++++++++++++--------- 1 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/views/system/data-manage/equipment/index.vue b/src/views/system/data-manage/equipment/index.vue index 49b781b..76b4ea0 100644 --- a/src/views/system/data-manage/equipment/index.vue +++ b/src/views/system/data-manage/equipment/index.vue @@ -41,9 +41,9 @@ </el-card> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> - <el-form-item label="鍏抽敭瀛�" prop="name"> + <el-form-item label="鍏抽敭瀛�" prop="keyword"> <el-input - v-model="queryParams.name" + v-model="queryParams.keyword" placeholder="璇疯緭鍏ュ叧閿瓧" clearable @keyup.enter.native="handleQuery" @@ -107,12 +107,17 @@ <el-table-column label="鏍囩" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> <el-table-column label="鍖哄煙" align="center" prop="address" width="180" v-if="columns[1].visible"/> <el-table-column label="璁惧鐘舵��" align="center" prop="onState" v-if="columns[2].visible"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> - </template> + <template slot-scope="scope"> + <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> + </template> </el-table-column> <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="installedTime" width="180" v-if="columns[3].visible"/> <el-table-column label="绠$悊鍗曚綅" align="center" prop="managementUnit" width="180" v-if="columns[4].visible"/> + <el-table-column v-for="(column, index) in dynamicColumnList" :key="index" :label="column.labelValue" :prop="column.propName" align="center"> + <template slot-scope="scope"> + {{ getDynamicValue(scope.row, column.propName) }} + </template> + </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> <template slot-scope="scope"> <el-button @@ -167,11 +172,14 @@ <script> import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; +import { getDynamicColumnList } from '@/api/platform/dynamicColumn' +import { dataCenter } from "@/api/platform/data-center"; export default { name: "Monitor", dicts: ['sys_normal_disable', 'platform_yes_no','camera_state'], data() { return { + dynamicColumnList: [], // 鍒椾俊鎭� columns: [ { key: 0, label: `鏍囩`, visible: true }, @@ -212,7 +220,7 @@ pageNum: 1, pageSize: 10, serialNumber: null, - name: null, + keyword: '鐞冩満', onState: null, address: null, installedTime: null, @@ -242,14 +250,28 @@ created() { this.getVideoCount(); this.getList(); - this.getCountyList(); + this.getDyColumn() }, methods: { + getDyColumn() { + // 鏌ヨ鍔ㄦ�佸垪 + let params = { + tableName: 't_monitor' + } + getDynamicColumnList(params).then(res => { + this.dynamicColumnList = res.data + }) + }, + getDynamicValue(row, propName) { + let target = row.dynamicColumnList.filter(item => item.propName === propName) + return target && target.length > 0 ? target[0].columnValue : '' + }, /** 鏌ヨ璁惧璧勪骇鍒楄〃 */ getList() { this.loading = true; - listMonitor(this.queryParams).then(response => { - this.monitorList = response.rows; + this.getDyColumn() + dataCenter('assetManagement', this.queryParams).then(response => { + this.monitorList = response.data; this.total = response.total; this.loading = false; }); -- Gitblit v1.8.0