From 0c7d2e6f5d16f85166888159ee7810de5c9e97a0 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 06 十一月 2024 10:05:56 +0800 Subject: [PATCH] 查询统一 --- src/views/system/monitor/recovery/index.vue | 107 +++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 83 insertions(+), 24 deletions(-) diff --git a/src/views/system/monitor/recovery/index.vue b/src/views/system/monitor/recovery/index.vue index 48112d3..f0c9ea2 100644 --- a/src/views/system/monitor/recovery/index.vue +++ b/src/views/system/monitor/recovery/index.vue @@ -1,13 +1,16 @@ <template> <div class="app-container"> <div - style="display: flex;flex-direction: row;min-width: 158px;max-width: 158px;margin-bottom: 5px;border-radius: 1px; user-select: none" + style="display: flex;flex-direction: row;min-width: 300px;max-width: 300px;margin-bottom: 5px;border-radius: 1px; user-select: none" > <div @click="clickTab(null)" class="tab" - :class="{tabActive: null == queryParams.provinceTag, tabInactive: null != queryParams.provinceTag}">鍏ㄩ儴 + :class="{tabActive: !queryParams.provinceTag && !queryParams.deptTag, tabInactive: queryParams.provinceTag || queryParams.deptTag}">鍏ㄩ儴 </div> <div @click="clickTab(0)" class="tab" - :class="{tabActive: 0 === queryParams.provinceTag, tabInactive: 0 !== queryParams.provinceTag}">鐪佸巺鑰冩牳 + :class="{tabActive: queryParams.provinceTag, tabInactive: !queryParams.provinceTag}">鐪佸巺鑰冩牳 + </div> + <div @click="clickTab(1)" class="tab" + :class="{tabActive: queryParams.deptTag, tabInactive: !queryParams.deptTag}">鍏畨閮ㄨ�冩牳 </div> </div> <el-card class="box-card"> @@ -32,6 +35,10 @@ <p>寮傚父鏁�</p> </div> <div class="dashboard-item"> + <h3 style="color: #4f4f4f">{{ count.unknownNumbers }}</h3> + <p>鏈煡鏁�</p> + </div> + <div class="dashboard-item"> <h3>{{ count.viewsPercentage }}%</h3> <p>璁惧杩愯鐜�</p> </div> @@ -47,6 +54,7 @@ placeholder="璇疯緭鍏ュ叧閿瓧" clearable @keyup.enter.native="handleQuery" + @clear="handleQuery" /> </el-form-item> <el-form-item label="鍖哄煙" prop="onState"> @@ -69,6 +77,7 @@ v-model="queryParams.cameraFunType" placeholder="璇烽�夋嫨鐩戞帶绫诲瀷" clearable + @change="handleQuery" > <el-option label="瑙嗛鐩戞帶" value="1"/> <el-option label="杞﹁締鐩戞帶" value="2"/> @@ -86,6 +95,7 @@ <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> <el-table-column label="璁惧鍚嶇О" align="center" prop="name" width="280" fixed show-overflow-tooltip/> <el-table-column label="璁惧缂栫爜" align="center" prop="serialNumber" width="180px"/> + <el-table-column label="ip" align="center" prop="ip" width="180"/> <el-table-column label="璁惧绫诲瀷" align="center" prop="cameraFunType" width="180px"> <template slot-scope="scope"> {{ translateCameraFunType(scope.row.cameraFunType) }} @@ -93,7 +103,13 @@ </el-table-column> <el-table-column label="鏍囩" align="center" width="180px" v-if="columns[0].visible"> <template slot-scope="scope"> - <div>{{ scope.row.provinceTag == 0 ? "鐪佸巺" : "甯傚眬" }}</div> + <div> + {{ + ( + (scope.row.provinceTag ? '鐪佸巺銆�' : '') + + (scope.row.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </div> </template> </el-table-column> <el-table-column label="鍖哄煙" align="center" prop="area" v-if="columns[1].visible"/> @@ -103,10 +119,14 @@ </template> </el-table-column> <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="error" width="180px" v-if="columns[3].visible"/> - <el-table-column label="寮傚父鍘熷洜" align="center" prop="reason" width="180px" v-if="columns[4].visible"/> - <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180px" v-if="columns[5].visible"> + <el-table-column label="寮傚父鎭㈠鏃堕棿" align="center" prop="recoveryTime" width="180px" v-if="columns[4].visible"> </el-table-column> - <el-table-column label="绠$悊鍗曚綅" align="center" prop="unitName" width="180px" v-if="columns[6].visible"/> + <el-table-column label="绠$悊鍗曚綅" align="center" prop="unitName" width="180px" v-if="columns[5].visible"/> + <el-table-column label="宸ュ崟缂栧彿" align="center" prop="workOrderNo" width="180px" v-if="columns[6].visible"/> + <el-table-column label="鑱旂郴浜�" align="center" prop="unitContact" width="180px" v-if="columns[7].visible"/> + <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="unitContactPhone" width="180px" v-if="columns[8].visible"/> + <el-table-column label="杩愮淮浜哄憳鍚嶇О" align="center" prop="ywPeopleName" width="180px" v-if="columns[9].visible"/> + <el-table-column label="鏁呴殰绫诲瀷" align="center" prop="errorType" width="180px" v-if="columns[10].visible"/> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -129,33 +149,58 @@ /> <!-- 璁惧璧勪骇璇︽儏 --> - <el-dialog title="鎿嶄綔鏃ュ織璇︾粏" :visible.sync="open" width="800px" append-to-body> + <el-dialog title="寮傚父鎭㈠鐩戞帶璇︽儏" :visible.sync="open" width="800px" append-to-body> <el-form ref="form" :model="form" label-width="150px" size="mini"> <el-row> + <el-form-item label="璁惧鍚嶇О锛�">{{ form.name }}</el-form-item> <el-col :span="12"> <el-form-item label="璁惧缂栫爜锛�">{{ form.serialNumber }}</el-form-item> - <el-form-item label="璁惧鍚嶇О锛�">{{ form.name }}</el-form-item> - <el-form-item label="鏍囩锛�">{{ form.deptName }}</el-form-item> + <el-form-item label="鏍囩锛�"> + {{ + ((form.provinceTag ? '鐪佸巺銆�' : '') + + (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> - <div v-if="form.onState === 1">鍙敤</div> - <div v-else-if="form.onState === 2">涓嶅彲鐢�</div> + <div v-if="form.onState === 0">鏈煡</div> + <div v-else-if="form.onState === 1">鍦ㄧ嚎</div> + <div v-else-if="form.onState === -1">绂荤嚎</div> </el-form-item> + <el-form-item label="绠$悊鍗曚綅锛�">{{ form.unitName }}</el-form-item> </el-col> - <el-col :span="24"> - <el-form-item label="鍦板潃锛�">{{ form.address }}</el-form-item> + <el-col :span="12"> + <el-form-item label="ip锛�">{{ form.ip }}</el-form-item> + <el-form-item label="鍦板尯锛�">{{ form.area }}</el-form-item> <el-form-item label="鏄惁鐢熸垚寮傚父宸ュ崟锛�"> - <div v-if="form.defaultOrder === 1">鏄�</div> - <div v-else-if="form.defaultOrder === 2">鍚�</div> + {{ form.error }} </el-form-item> + <el-form-item label="杩愮淮鏃堕棿锛�">{{ form.startTime + '鑷�' + form.endTime }}</el-form-item> </el-col> + </el-row> + <!-- 宸ュ崟鏁版嵁鐨勫垎闅旂寮�濮嬫柊鐨勮 --> + <el-row> <el-col :span="24"> - <el-form-item label="寮傚父鍘熷洜锛�">{{ form.reason }}</el-form-item> + <el-divider content-position="left">宸ュ崟鏁版嵁</el-divider> </el-col> + </el-row> + <el-row> <el-col :span="24"> - <el-form-item label="瀹夎鏃堕棿锛�">{{ form.installedTime }}</el-form-item> + <el-form-item label="宸ュ崟缂栧彿锛�">{{ form.workOrderNo }}</el-form-item> </el-col> - <el-col :span="24"> - <el-form-item label="绠$悊鍗曚綅锛�">{{ form.managementUnit }}</el-form-item> + <el-col :span="12"> + <el-form-item label="鑱旂郴浜猴細"> + {{ form.unitContact }} + </el-form-item> + <el-form-item label="杩愮淮浜哄憳鍚嶇О锛�"> + {{ form.ywPeopleName }} + </el-form-item> + <el-form-item label="鏁呴殰绫诲瀷锛�">{{ form.errorType }}</el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑱旂郴鐢佃瘽锛�"> + {{ form.unitContactPhone }} + </el-form-item> + <el-form-item label="寮傚父鎭㈠鏃堕棿锛�">{{ form.recoveryTime }}</el-form-item> </el-col> </el-row> </el-form> @@ -189,14 +234,19 @@ {key: 1, label: `鍖哄煙`, visible: true}, {key: 2, label: `璁惧鐘舵�乣, visible: true}, {key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true}, - {key: 4, label: `寮傚父鍘熷洜`, visible: true}, - {key: 5, label: `寮傚父鎭㈠鏃堕棿`, visible: true}, - {key: 6, label: `绠$悊鍗曚綅`, visible: true}, + {key: 4, label: `寮傚父鎭㈠鏃堕棿`, visible: true}, + {key: 5, label: `绠$悊鍗曚綅`, visible: true}, + {key: 6, label: `宸ュ崟缂栧彿`, visible: false}, + {key: 7, label: `鑱旂郴浜篳, visible: false}, + {key: 8, label: `鑱旂郴鐢佃瘽`, visible: false}, + {key: 9, label: `杩愮淮浜哄憳鍚嶇О`, visible: false}, + {key: 10, label: `鏁呴殰绫诲瀷`, visible: false}, ], count: { totalPosts: 0, totalMembers: 0, postsPercentage: 0, + unknownNumbers: 0, totalViews: 0, viewsPercentage: 0, totalErrors: 0, @@ -285,7 +335,16 @@ return translatedTypes.join(', '); }, clickTab(active) { - this.queryParams.provinceTag = active + if (active === 0) { + this.queryParams.provinceTag = true + this.queryParams.deptTag =null + } else if (active === 1) { + this.queryParams.provinceTag = null + this.queryParams.deptTag = true + }else { + this.queryParams.provinceTag = null + this.queryParams.deptTag = null + } this.getList() this.getVideoCount() }, -- Gitblit v1.8.0