From 434fda2bd16d78e9596fc98f7ec290e90103037c Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 04 九月 2024 16:01:11 +0800 Subject: [PATCH] 阈值卡片调整、登录路由 --- src/views/system/data-manage/data-detail/index.vue | 79 +++++++++++++++++++++------------------ 1 files changed, 43 insertions(+), 36 deletions(-) diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue index 0f60c0a..247f092 100644 --- a/src/views/system/data-manage/data-detail/index.vue +++ b/src/views/system/data-manage/data-detail/index.vue @@ -2,13 +2,14 @@ <div class="app-container"> <el-card class="box-card" v-show="index !== 'image_resource_security'"> <el-row style="display: flex; flex-direction: row; align-items: center" justify="space-between"> - <div v-for="card in cardList" style="display: flex;flex-direction: row; margin-right: 50px" :key="card.label"> + <div style="font-size: 18px;min-width: 200px">{{ruleName}}</div> + <div v-if="cardList && cardList.length > 0" v-for="card in cardList" style="display: flex;flex-direction: row; margin-right: 50px;margin-left: 20px;align-items: center" :key="card.label"> <div> <div class="icon-container"> <i :class="card.icon"></i> </div> </div> - <div v-if="card.dataList && card.dataList.length > 0"> + <div v-if="card.dataList && card.dataList.length > 0" style="display: flex; flex-direction: row"> <div v-if="data" v-for="(data, index) in card.dataList" class="dashboard-item" :key="data.label"> <div style="color: #5C9BF8;margin-bottom: 20px;font-size: 20px">{{ tableData.count[index] }}</div> <div>{{ data.label }}</div> @@ -25,7 +26,7 @@ </el-row> </el-card> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form-item label="鍏抽敭璇�" prop="bayonetNumber"> <el-input v-model="queryParams.keyword" placeholder="鍏抽敭璇嶆悳绱�" clearable @keyup.enter.native="handleQuery" /> @@ -64,7 +65,7 @@ </el-button> </div> <div style="font-size: 14px;height: 50px; font-weight: bold;">{{ item.deptName }}</div> - <div style="font-size: 14px;">璧勬簮锛歿{ item.imageResourceSecurity }}</div> + <div style="font-size: 14px;">寰楀垎锛歿{ item.imageResourceSecurity }}</div> <!-- <div style="font-size: 14px;">瑙嗛浼犺緭缃戣祫浜у噯纭巼锛歿{ item.propertyAccuracy }}</div> <div style="font-size: 14px;">寮卞彛浠ゅ緱鍒嗭細{{ item.weakPassword }}</div> <div style="font-size: 14px;">瑙嗛浼犺緭缃戝嵄闄╄祫浜ф瘮渚嬶細{{ item.riskProperty }}</div> @@ -79,15 +80,16 @@ v-hasPermi="['platform:platform:export']">瀵煎叆 </el-button> </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <div v-if="tableData.list && tableData.list.length >0"> + <right-toolbar v-show="index !== 'image_resource_security'" :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" :width="item.width" 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" /> @@ -99,20 +101,23 @@ <el-input v-model="resourceForm.deptName" disabled /> </el-form-item> <el-form-item label="骞冲彴杩愯鐜�" prop="platformOnline"> - <el-input-number v-model="resourceForm.platformOnline" /> + <el-input-number v-model="resourceForm.platformOnline" :precision="2" :step="0.1" :min="0" :max="1"/> </el-form-item> <el-form-item label="瑙嗛浼犺緭缃戣祫浜у噯纭巼" prop="propertyAccuracy"> - <el-input-number v-model="resourceForm.propertyAccuracy" /> + <el-input-number v-model="resourceForm.propertyAccuracy" :precision="2" :step="0.1" :min="0" :max="1"/> </el-form-item> <el-form-item label="寮卞彛浠ゅ緱鍒�" prop="weakPassword"> - <el-input-number v-model="resourceForm.weakPassword" /> + <el-input-number v-model="resourceForm.weakPassword" :precision="2" :step="0.1" :min="0" :max="1"/> </el-form-item> <el-form-item label="瑙嗛浼犺緭缃戝嵄闄╄祫浜ф瘮渚�" prop="riskProperty"> - <el-input-number v-model="resourceForm.riskProperty" /> + <el-input-number v-model="resourceForm.riskProperty" :precision="2" :step="0.1" :min="0" :max="1"/> </el-form-item> - <el-form-item label="瑙嗛浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」" prop="boundaryIntegrity"> - <el-input-number v-model="resourceForm.boundaryIntegrity" /> - </el-form-item> + <el-tooltip class="item" effect="dark" content="杩濊杩炴帴浜掕仈缃戞墸鍑�20涓櫨鍒嗙偣/娆★紝杩濊鏃犵嚎AP鎺ュ叆銆侀殢韬玾ifi鎺ュ叆銆佸叡浜綉缁滃悇鎵e噺5涓櫨鍒嗙偣/娆★紝鐩磋嚦姝ら」鎸囨爣鎵e畬涓烘銆�" placement="top-start"> + <el-form-item label="瑙嗛浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」" prop="boundaryIntegrity"> + <el-input-number v-model="resourceForm.boundaryIntegrity" :precision="2" :step="0.1" :min="0" :max="1"/> + </el-form-item> + </el-tooltip> + </el-form> <div slot="footer" class="dialog-footer"> <el-button @click="cancelR">鍙� 娑�</el-button> @@ -149,27 +154,13 @@ import { getToken } from "@/utils/auth"; export default { name: "Platform", - // watch: { - // tableData: { - // immediate: true, - // deep: true, - // handler(newVal) { - // if(newVal && newVal.list) { - // this.list = newVal.detail; - // } - // } - // } - // }, - // computed: { - // startTime() { - // var date = new Date(); - // var s1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()-1); - // return s1; - // } - // }, + computed: { + ruleName() { + return this.$route.query.ruleName + } + }, data() { return { - list: [], // 瀵煎叆鍙傛暟 upload: { // 鏄惁鏄剧ず寮瑰嚭灞� @@ -238,6 +229,7 @@ ], }, + showList: [], tableHead: [], cardList: [], index: null @@ -261,29 +253,43 @@ 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"); @@ -427,5 +433,6 @@ justify-content: center; align-items: center; width: 150px; + margin: 0 30px; } </style> -- Gitblit v1.8.0