From b3be6406c8105376eef209af3bd6635cb95fa81d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 24 九月 2024 12:15:22 +0800
Subject: [PATCH] 增加部级考核标签
---
src/views/system/data-manage/equipment/index.vue | 48 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 35 insertions(+), 13 deletions(-)
diff --git a/src/views/system/data-manage/equipment/index.vue b/src/views/system/data-manage/equipment/index.vue
index 1b6dd83..019fd03 100644
--- a/src/views/system/data-manage/equipment/index.vue
+++ b/src/views/system/data-manage/equipment/index.vue
@@ -5,7 +5,7 @@
<el-card class="box-card" >
<el-row type="flex" align="middle" justify="space-between">
<el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6">
- <div class="icon-container" style="background-color: #5599F7">
+ <div class="icon-container" style="background-color: #1890FF">
<i class="el-icon-wallet"></i>
</div>
</el-col>
@@ -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"
@@ -82,8 +82,8 @@
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+ <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="small" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -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;
});
@@ -370,7 +392,7 @@
display: flex;
justify-content: center;
align-items: center;
- border-radius: 20px;
+ border-radius: 10px;
width: 20%;
height: 80px;
margin-left: 5%;
--
Gitblit v1.8.0