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/monitor/recovery/index.vue | 35 ++ src/views/system/check/result/detail/detail.vue | 9 src/views/system/monitor/video/index.vue | 68 ++++-- public/index.html | 4 src/views/system/check/result/index.vue | 9 src/views/system/monitor/face/index.vue | 35 ++ src/views/system/monitor/car/index.vue | 150 ++++++++----- src/views/system/check/result/detail/index.vue | 93 +++++--- src/views/system/check/template/index.vue | 251 ++++++++++++---------- 9 files changed, 404 insertions(+), 250 deletions(-) diff --git a/public/index.html b/public/index.html index 0d260d5..fd0af84 100644 --- a/public/index.html +++ b/public/index.html @@ -12,9 +12,7 @@ </title> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <style> - html { - font-size: 14px - } + html body, #app { height: 100%; diff --git a/src/views/system/check/result/detail/detail.vue b/src/views/system/check/result/detail/detail.vue index f4d2a72..56792d9 100644 --- a/src/views/system/check/result/detail/detail.vue +++ b/src/views/system/check/result/detail/detail.vue @@ -5,6 +5,7 @@ > <el-menu-item index="0">鐪佸巺鑰冩牳</el-menu-item> <el-menu-item index="1">鍖哄幙鑰冩牳</el-menu-item> + <el-menu-item index="2">鍏畨閮ㄨ�冩牳</el-menu-item> </el-menu> </div> <el-container> @@ -133,7 +134,11 @@ fixed > <template slot-scope="scope"> - {{ scope.row.examine_tag === 0 ? '鐪佸巺鑰冩牳' : '鍖哄幙鑰冩牳' }} + {{ + scope.row.examine_tag === 0 ? '鐪佸巺鑰冩牳' : + scope.row.examine_tag === 1 ? '鍖哄幙鑰冩牳' : + scope.row.examine_tag === 2 ? '鍏畨閮ㄨ�冩牳' : '鏈煡' + }} </template> </el-table-column> <template v-for="item in tableData"> @@ -307,6 +312,7 @@ date: null, quarter: null, examineTag: null, + examineTags: [], deptId: null }, // 琛ㄥ崟鏍¢獙 @@ -332,6 +338,7 @@ let examineTag = this.$route.query.examineTag; this.activeIndex = examineTag; this.queryParams.examineTag = examineTag; + this.queryParams.examineTags.push(examineTag); // 鑰冩牳绉垎鍒楄〃 this.getList(); this.areaSelect(); diff --git a/src/views/system/check/result/detail/index.vue b/src/views/system/check/result/detail/index.vue index f72a15c..c7507dd 100644 --- a/src/views/system/check/result/detail/index.vue +++ b/src/views/system/check/result/detail/index.vue @@ -2,9 +2,10 @@ <div style="padding: 0px 10px"> <div> <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" - style="margin-bottom: 10px"> + style="margin-bottom: 10px"> <el-menu-item index="0">鐪佸巺鑰冩牳</el-menu-item> <el-menu-item index="1">鍖哄幙鑰冩牳</el-menu-item> + <el-menu-item index="2">鍏畨閮ㄨ�冩牳</el-menu-item> </el-menu> </div> @@ -15,7 +16,7 @@ <h1>鑰冩牳鎴愮哗</h1> <div class="select-container"> <el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="閫夋嫨鏃ユ湡" - @change="dateChange"> + @change="dateChange"> </el-date-picker> </div> </div> @@ -37,12 +38,16 @@ </el-table-column> <el-table-column label="鏍囩" prop="examineTag" align="center"> <template slot-scope="scope"> - {{ scope.row.examineTag == 0 ? '鐪佸巺鑰冩牳' : '鍖哄幙鑰冩牳' }} + {{ + scope.row.examineTag === 0 ? '鐪佸巺鑰冩牳' : + scope.row.examineTag === 1 ? '鍖哄幙鑰冩牳' : + scope.row.examineTag === 2 ? '鍏畨閮ㄨ�冩牳' : '鏈煡' + }} </template> </el-table-column> <el-table-column label="鑰冩牳绫诲瀷" prop="examineCategory" align="center"> <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory" /> + <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/> </template> </el-table-column> @@ -51,32 +56,37 @@ </el-table-column> <el-table-column label="鐘舵��" prop="publish" align="center"> <template slot-scope="scope"> - <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish" /> + <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish"/> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center"> <template slot-scope="scope"> <div style="display: flex;justify-content: center;"> - <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'UNPUBLISHED'" >纭鍙戝竷</el-button> - <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'PUBLISHED'">鍙栨秷鍙戝竷</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-view" - @click="handleDetail(scope.row.id)" - >璇︾粏</el-button> + <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" + v-if="scope.row.publish === 'UNPUBLISHED'">纭鍙戝竷 + </el-button> + <el-button v-hasPermi="['check:score:publish']" size="small" type="text" @click="handlePublish(scope.row)" + v-if="scope.row.publish === 'PUBLISHED'">鍙栨秷鍙戝竷 + </el-button> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="handleDetail(scope.row.id)" + >璇︾粏 + </el-button> </div> </template> </el-table-column> </el-table> - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParamsList.pageNum" - :limit.sync="queryParamsList.pageSize" - @pagination="getList" - /> + <pagination + v-show="total>0" + :total="total" + :page.sync="queryParamsList.pageNum" + :limit.sync="queryParamsList.pageSize" + @pagination="getList" + /> </div> @@ -84,14 +94,23 @@ </template> <script> -import { chartScore, getScore, delScore, addScore, updateScore, publishScore, detailScore } from "@/api/platform/check-score"; -import { areaSelect } from '@/api/system/dept'; +import { + chartScore, + getScore, + delScore, + addScore, + updateScore, + publishScore, + detailScore +} from "@/api/platform/check-score"; +import {areaSelect} from '@/api/system/dept'; import * as echarts from 'echarts'; + let lineChart = null; let observer = null; export default { name: 'index', - dicts: ['platform_examine_category','platform_is_publish'], + dicts: ['platform_examine_category', 'platform_is_publish'], data() { return { activeIndex: '0', @@ -114,7 +133,7 @@ pageNum: 1, pageSize: 10, deptId: null, - examineTag:0 + examineTag: 0 }, tableData: [], tableLoading: false, @@ -136,26 +155,32 @@ this.date = year + '-' + month; this.queryParams.date = this.date; let examineTag = this.$route.query.examineTag; - if (examineTag === '2') { examineTag = '0' } - if (examineTag === '3') { examineTag = '1' } + if (examineTag === '2') { + examineTag = '0' + } + if (examineTag === '3') { + examineTag = '1' + } this.queryParams.examineTag = examineTag; this.queryParamsList.examineTag = examineTag; this.activeIndex = examineTag; this.areaSelect(); this.getList(this.$route.query.index); }, - computed: { - - }, + computed: {}, methods: { //鍙戝竷 handlePublish(row) { const getExamineCategoryText = category => { switch (category) { - case 1: return '瑙嗛鑰冩牳'; - case 2: return '杞﹁締鑰冩牳'; - case 3: return '浜鸿劯鑰冩牳'; - default: return '鏈煡'; + case 1: + return '瑙嗛鑰冩牳'; + case 2: + return '杞﹁締鑰冩牳'; + case 3: + return '浜鸿劯鑰冩牳'; + default: + return '鏈煡'; } }; @@ -293,7 +318,7 @@ if (!data) return this.getAllDay().map((item) => [item, []]); const tempGroup = {}; data.forEach((item) => { - let { createTime } = item; + let {createTime} = item; let tempTime = createTime.split('-'); createTime = tempTime[1] + '-' + tempTime[2]; if (!tempGroup[createTime]) { diff --git a/src/views/system/check/result/index.vue b/src/views/system/check/result/index.vue index faaacc2..4551ab5 100644 --- a/src/views/system/check/result/index.vue +++ b/src/views/system/check/result/index.vue @@ -5,9 +5,11 @@ <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" style="margin-bottom: 10px"> <el-menu-item index="0">鐪佸巺鏈堝害</el-menu-item> - <el-menu-item index="2">鐪佸巺瀛e害</el-menu-item> - <el-menu-item index="1">鍖哄幙鏈堝害</el-menu-item> + <el-menu-item index="1">鐪佸巺瀛e害</el-menu-item> + <el-menu-item index="2">鍖哄幙鏈堝害</el-menu-item> <el-menu-item index="3">鍖哄幙瀛e害</el-menu-item> + <el-menu-item index="4">鍏畨閮ㄦ湀搴�</el-menu-item> + <el-menu-item index="5">鍏畨閮ㄥ搴�</el-menu-item> </el-menu> </div> <!-- 瀵煎嚭鎸夐挳 --> @@ -128,7 +130,8 @@ return { tagOptions: [ {value: 0, label: '鐪佸巺'}, - {value: 1, label: '鍖哄幙'} + {value: 1, label: '鍖哄幙'}, + {value: 2, label: '鍏畨閮�'} ], pickerOptions: { shortcuts: [{ diff --git a/src/views/system/check/template/index.vue b/src/views/system/check/template/index.vue index 01208d4..f790db1 100644 --- a/src/views/system/check/template/index.vue +++ b/src/views/system/check/template/index.vue @@ -1,16 +1,17 @@ <template> <div class="app-container"> - <el-form style="margin-left :20px" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form style="margin-left :20px" :model="queryParams" ref="queryForm" size="small" :inline="true" + v-show="showSearch" label-width="68px"> <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> - <el-select v-model="queryParams.examineCategory" placeholder="鑰冩牳绫诲瀷" clearable @keyup.enter.native="handleQuery"> - <el-option - v-for="dict in dict.type.platform_examine_category" - :key="dict.value" - :label="dict.label" - :value="parseInt(dict.value)" - /> - </el-select> - </el-form-item> + <el-select v-model="queryParams.examineCategory" placeholder="鑰冩牳绫诲瀷" clearable @keyup.enter.native="handleQuery"> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> + </el-select> + </el-form-item> <el-form-item label="鑰冩牳鏍囩" prop="examineTag"> <el-select v-model="queryParams.examineTag" placeholder="鑰冩牳鏍囩" clearable @keyup.enter.native="handleQuery"> <el-option @@ -35,7 +36,8 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - >鏂板</el-button> + >鏂板 + </el-button> </el-col> <!-- <el-col :span="1.5"> <el-button @@ -57,46 +59,51 @@ @click="handleDelete" >鍒犻櫎</el-button> </el-col> --> -<!-- <el-col :span="1.5">--> -<!-- <el-button--> -<!-- type="warning"--> -<!-- plain--> -<!-- icon="el-icon-download"--> -<!-- size="mini"--> -<!-- @click="handleExport"--> -<!-- >瀵煎嚭</el-button>--> -<!-- </el-col>--> + <!-- <el-col :span="1.5">--> + <!-- <el-button--> + <!-- type="warning"--> + <!-- plain--> + <!-- icon="el-icon-download"--> + <!-- size="mini"--> + <!-- @click="handleExport"--> + <!-- >瀵煎嚭</el-button>--> + <!-- </el-col>--> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <div class="card-container"> - <el-card class="box-card" v-for="item in checkTemplateList" :key="item"> - <div class="text item">妯℃澘鍚嶇О锛歿{ item.templateName }}</div> - <div class="text item">鑰冩牳鏍囩锛歿{ item.examineTag == 0 ? '鐪佸巺鑰冩牳' : '甯傚眬鑰冩牳' }}</div> - <div class="text item" style="display: flex"> - <span>鑰冩牳绫诲瀷锛�</span> - <dict-tag :options="dict.type.platform_examine_category" :value="item.examineCategory"/> - </div> - <!-- <div class="text item">鑰冩牳棰戠巼锛歿{ item.frequency == 0 ? '鏈堝害鑰冩牳' : '瀛e害鑰冩牳' }}</div> --> - <div class="text item" style="display: flex"> - <span>鑰冩牳瀵硅薄锛�</span> - <el-tooltip effect="dark" :content="translateDeptIdList(item.deptId)" placement="top"> - <div class="item" style="margin-bottom: 0" v-for = "(deptId,index) in item.deptId" :key = index> - {{ translateDeptIdList(item.deptId) }} - </div> + <el-card class="box-card" v-for="item in checkTemplateList" :key="item"> + <div class="text item">妯℃澘鍚嶇О锛歿{ item.templateName }}</div> + <div class="text item">鑰冩牳鏍囩锛歿{ + item.examineTag === 0 ? '鐪佸巺鑰冩牳' : + item.examineTag === 1 ? '鍖哄幙鑰冩牳' : + item.examineTag === 2 ? '鍏畨閮ㄨ�冩牳' : '鏈煡' + }} + </div> + <div class="text item" style="display: flex"> + <span>鑰冩牳绫诲瀷锛�</span> + <dict-tag :options="dict.type.platform_examine_category" :value="item.examineCategory"/> + </div> + <!-- <div class="text item">鑰冩牳棰戠巼锛歿{ item.frequency == 0 ? '鏈堝害鑰冩牳' : '瀛e害鑰冩牳' }}</div> --> + <div class="text item" style="display: flex"> + <span>鑰冩牳瀵硅薄锛�</span> + <el-tooltip effect="dark" :content="translateDeptIdList(item.deptId)" placement="top"> + <div class="item" style="margin-bottom: 0" v-for="(deptId,index) in item.deptId" :key=index> + {{ translateDeptIdList(item.deptId) }} + </div> </el-tooltip> - </div> - <div class="text item" style="display: flex"> - <span style="padding: 3px 0;">浣跨敤鐘舵�侊細</span> - <dict-tag :options="dict.type.platform_use_state" :value="item.status"/> - </div> - <div class="bottom clearfix"> - <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 1" >鍚敤</el-button> - <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 0" >鍋滅敤</el-button> - <el-button type="text" class="button" @click="handleCopy(item)">澶嶅埗</el-button> - <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> - <el-button type="text" class="button" @click="handleDelete(item)">鍒犻櫎</el-button> - </div> - </el-card> + </div> + <div class="text item" style="display: flex"> + <span style="padding: 3px 0;">浣跨敤鐘舵�侊細</span> + <dict-tag :options="dict.type.platform_use_state" :value="item.status"/> + </div> + <div class="bottom clearfix"> + <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 1">鍚敤</el-button> + <el-button type="text" class="button" @click="handleStatus(item)" v-show="item.status == 0">鍋滅敤</el-button> + <el-button type="text" class="button" @click="handleCopy(item)">澶嶅埗</el-button> + <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button> + <el-button type="text" class="button" @click="handleDelete(item)">鍒犻櫎</el-button> + </div> + </el-card> </div> <pagination @@ -111,7 +118,7 @@ <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="妯℃澘鍚嶇О" prop="templateName"> - <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�" /> + <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�"/> </el-form-item> <el-form-item label="鑰冩牳鏍囩" prop="examineTag"> <el-select v-model="form.examineTag" placeholder="鑰冩牳绫诲瀷"> @@ -123,16 +130,16 @@ /> </el-select> </el-form-item> -<!-- <el-form-item label="鑰冩牳棰戠巼" prop="frequency">--> -<!-- <el-select v-model="form.frequency" placeholder="鑰冩牳棰戠巼">--> -<!-- <el-option--> -<!-- v-for="dict in dict.type.platform_examine_frequency"--> -<!-- :key="dict.value"--> -<!-- :label="dict.label"--> -<!-- :value="parseInt(dict.value)"--> -<!-- />--> -<!-- </el-select>--> -<!-- </el-form-item>--> + <!-- <el-form-item label="鑰冩牳棰戠巼" prop="frequency">--> + <!-- <el-select v-model="form.frequency" placeholder="鑰冩牳棰戠巼">--> + <!-- <el-option--> + <!-- v-for="dict in dict.type.platform_examine_frequency"--> + <!-- :key="dict.value"--> + <!-- :label="dict.label"--> + <!-- :value="parseInt(dict.value)"--> + <!-- />--> + <!-- </el-select>--> + <!-- </el-form-item>--> <el-form-item label="鑰冩牳瀵硅薄" prop="deptId"> <el-select v-model="form.deptId" multiple placeholder="璇烽�夋嫨"> <el-option @@ -157,40 +164,40 @@ <div class="row-warp"> <div class="row" v-for="(form) in tempRuleFormList"> <div class="row-left"> - <div>瑙勫垯</div> - <div class="margin-5"> - <el-select v-model="form.ruleId" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in currentRuleList" - :key="item.id" - :label="item.ruleName" - :value="item.id" - :disabled="isRuleDisabled(item.id, index)" - > - </el-option> - </el-select> + <div>瑙勫垯</div> + <div class="margin-5"> + <el-select v-model="form.ruleId" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in currentRuleList" + :key="item.id" + :label="item.ruleName" + :value="item.id" + :disabled="isRuleDisabled(item.id, index)" + > + </el-option> + </el-select> </div> </div> <div class="row-right"> - <div>鏉冮噸</div> - <div class="margin-5"> - <el-input type="number" v-model.number="form.weight" /> - </div> + <div>鏉冮噸</div> + <div class="margin-5"> + <el-input type="number" v-model.number="form.weight"/> + </div> </div> <div class="item-op"> <el-button @click="removeRule(form)" type="danger" icon="el-icon-delete" circle></el-button> </div> </div> <div style="margin-top: 25px"> - <el-button type="success" @click="nextAdd()" size="mini" plain>娣诲姞</el-button> + <el-button type="success" @click="nextAdd()" size="mini" plain>娣诲姞</el-button> </div> </div> </el-form-item> <el-form-item label="鎶ヨ鍒嗘暟" prop="alarmScore"> - <el-input v-model="form.alarmScore" placeholder="璇疯緭鍏ユ姤璀﹀垎鏁�" /> + <el-input v-model="form.alarmScore" placeholder="璇疯緭鍏ユ姤璀﹀垎鏁�"/> </el-form-item> <el-form-item label="璋冩暣绯绘暟" prop="adjustCoefficient"> - <el-input v-model="form.adjustCoefficient" placeholder="璇疯緭鍏ョ郴鏁板��" /> + <el-input v-model="form.adjustCoefficient" placeholder="璇疯緭鍏ョ郴鏁板��"/> </el-form-item> <el-form-item label="璋冩暣鏂瑰紡" prop="adjustWay"> <el-select v-model="form.adjustWay" placeholder="璇烽�夋嫨璋冩暣绯绘暟璁$畻鏂瑰紡"> @@ -205,11 +212,12 @@ </el-select> </el-form-item> <el-form-item label="瑙勫垯鎻忚堪" prop="description"> - <el-input v-model="form.description" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> + <el-input v-model="form.description" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" + placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/> </el-form-item> <el-form-item label="鐘舵��" prop="status"> - <el-radio v-model="form.status" label="0" >鍚敤</el-radio> - <el-radio v-model="form.status" label="1" >鍋滅敤</el-radio> + <el-radio v-model="form.status" label="0">鍚敤</el-radio> + <el-radio v-model="form.status" label="1">鍋滅敤</el-radio> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -221,18 +229,25 @@ </template> <script> -import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate,copyCheckTemplate } from "@/api/platform/check-template"; -import { areaSelect } from '@/api/system/dept' -import { listCheckRule } from "../../../../api/platform/check-rule"; +import { + listCheckTemplate, + getCheckTemplate, + delCheckTemplate, + addCheckTemplate, + updateCheckTemplate, + copyCheckTemplate +} from "@/api/platform/check-template"; +import {areaSelect} from '@/api/system/dept' +import {listCheckRule} from "../../../../api/platform/check-rule"; export default { name: "CheckTemplate", - dicts: ['platform_use_state','platform_examine_category','platform_rule_category','platform_examine_frequency','platform_examine_tag'], + dicts: ['platform_use_state', 'platform_examine_category', 'platform_rule_category', 'platform_examine_frequency', 'platform_examine_tag'], data() { return { - props: { multiple: true }, + props: {multiple: true}, value: [], - areaList:[], + areaList: [], ruleList: [], unitList: [], selectedRuleIds: [], @@ -274,28 +289,28 @@ // 琛ㄥ崟鏍¢獙 rules: { templateName: [ - { required: true, message: "妯℃澘鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + {required: true, message: "妯℃澘鍚嶇О涓嶈兘涓虹┖", trigger: "blur"} ], examineTag: [ - { required: true, message: "璇烽�夋嫨鑰冩牳鏍囩", trigger: "change" } + {required: true, message: "璇烽�夋嫨鑰冩牳鏍囩", trigger: "change"} ], frequency: [ - { required: true, message: "璇烽�夋嫨鐘舵�佽�冩牳棰戠巼", trigger: "change" } + {required: true, message: "璇烽�夋嫨鐘舵�佽�冩牳棰戠巼", trigger: "change"} ], deptId: [ - { required: true, message: "璇疯嚦灏戦�夋嫨涓�涓�冩牳瀵硅薄", trigger: "change" } + {required: true, message: "璇疯嚦灏戦�夋嫨涓�涓�冩牳瀵硅薄", trigger: "change"} ], examineCategory: [ - { required: true, message: "璇烽�夋嫨鑰冩牳绫诲瀷", trigger: "change" } + {required: true, message: "璇烽�夋嫨鑰冩牳绫诲瀷", trigger: "change"} ], adjustCoefficient: [ - { required: true, message: "璋冩暣绯绘暟涓嶈兘涓虹┖", trigger: "blur" } + {required: true, message: "璋冩暣绯绘暟涓嶈兘涓虹┖", trigger: "blur"} ], adjustWay: [ - { required: true, message: "璇烽�夋嫨璋冩暣鏂瑰紡", trigger: "change" } + {required: true, message: "璇烽�夋嫨璋冩暣鏂瑰紡", trigger: "change"} ], status: [ - { required: true, message: "璇烽�夋嫨鐘舵��", trigger: "change" } + {required: true, message: "璇烽�夋嫨鐘舵��", trigger: "change"} ], }, }; @@ -418,7 +433,7 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length!==1 + this.single = selection.length !== 1 this.multiple = !selection.length }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -430,23 +445,24 @@ this.title = "娣诲姞鑰冩牳妯℃澘"; }, /** 澶嶅埗鎸夐挳鎿嶄綔 */ - handleCopy(row){ + handleCopy(row) { copyCheckTemplate(row).then(response => { this.$modal.msgSuccess("澶嶅埗鎴愬姛"); this.open = false; this.getList(); }); }, - handleStatus(row){ + handleStatus(row) { let text = row.status == 1 ? '鍚敤' : '鍋滅敤'; const templateName = row.templateName; - this.$modal.confirm('鏄惁纭' + text + '鑰冩牳鍚嶄负"' + templateName + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭' + text + '鑰冩牳鍚嶄负"' + templateName + '"鐨勬暟鎹」锛�').then(function () { row.status = row.status == 1 ? "0" : "1"; return updateCheckTemplate(row); }).then(() => { this.getList(); this.$modal.msgSuccess(text + "鎴愬姛"); - }).catch(() => {}); + }).catch(() => { + }); }, /** 淇敼鎸夐挳鎿嶄綔 */ @@ -495,12 +511,13 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const id = row.id - this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳妯℃澘鍚嶄负"' + row.templateName + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳妯℃澘鍚嶄负"' + row.templateName + '"鐨勬暟鎹」锛�').then(function () { return delCheckTemplate(id); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); + }).catch(() => { + }); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { @@ -516,10 +533,12 @@ .margin-5 { margin-left: 5px; } + .row-warp { display: flex; flex-direction: column; } + .row { display: flex; flex-direction: row; @@ -527,33 +546,37 @@ justify-content: center; margin: 5px 0; } + .row-left { flex: 1; display: flex; flex-direction: row; } + .row-right { flex: 1; display: flex; flex-direction: row; } + .text { - font-size: 14px; - } + font-size: 14px; +} - .item { - margin-bottom: 15px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } +.item { + margin-bottom: 15px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} - .box-card { - width: 20%; +.box-card { + width: 20%; - margin-right: 50px; - margin-bottom: 30px; - } + margin-right: 50px; + margin-bottom: 30px; +} + .card-container { display: flex; flex-wrap: wrap; diff --git a/src/views/system/monitor/car/index.vue b/src/views/system/monitor/car/index.vue index 09caedc..d5fe796 100644 --- a/src/views/system/monitor/car/index.vue +++ b/src/views/system/monitor/car/index.vue @@ -1,16 +1,19 @@ <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" > + <el-card class="box-card"> <el-row type="flex" align="middle" justify="space-between"> <el-col :span="4"> <div class="icon-container" style="background-color: #1890FF"> @@ -21,19 +24,19 @@ <div class="dashboard"> <div class="dashboard-item"> <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> - <p>璁惧鎬绘暟</p > + <p>璁惧鎬绘暟</p> </div> <div class="dashboard-item"> <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> - <p>姝e父鏁�</p > + <p>姝e父鏁�</p> </div> <div class="dashboard-item"> <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> - <p>寮傚父鏁�</p > + <p>寮傚父鏁�</p> </div> <div class="dashboard-item"> <h3>{{ count.viewsPercentage }}%</h3> - <p>璁惧杩愯鐜�</p > + <p>璁惧杩愯鐜�</p> </div> </div> </el-col> @@ -56,7 +59,7 @@ clearable @change="handleQuery" > - <el-option + <el-option v-for="dept in deptList" :key="dept.deptId" :label="dept.area" @@ -71,12 +74,12 @@ clearable style="width: 100px" > - <el-option - v-for="dict in dict.type.camera_state" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> + <el-option + v-for="dict in dict.type.camera_state" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> </el-select> </el-form-item> @@ -93,16 +96,22 @@ <el-table-column label="ip" align="center" prop="ip" width="180"/> <el-table-column label="鏍囩" align="center" width="180" 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" width="180" v-if="columns[1].visible" /> + <el-table-column label="鍖哄煙" align="center" prop="area" 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="error" width="180" v-if="columns[3].visible" /> + <el-table-column label="鏄惁鐢熸垚寮傚父宸ュ崟" align="center" prop="error" width="180" v-if="columns[3].visible"/> <el-table-column label="绠$悊鍗曚綅" align="center" prop="unitName" width="180" v-if="columns[4].visible"/> <el-table-column label="鏁版嵁鏃堕棿" align="center" prop="mongoCreateTime" width="180" v-if="columns[5].visible"/> <el-table-column label="涓�鏈轰竴妗g姸鎬�" align="center" prop="monitorQualify" width="180" v-if="columns[6].visible"> @@ -125,19 +134,21 @@ <el-table-column label="褰撴棩鎶撴媿閲�" align="center" prop="snapCount" width="180" v-if="columns[9].visible"/> <el-table-column label="鏃堕挓鍑嗙‘鐜�" align="center" prop="clockPercent" width="180" v-if="columns[10].visible"/> <el-table-column label="涓婁紶鍙婃椂鐜�" align="center" prop="uploadPercent" width="180" v-if="columns[11].visible"/> - <el-table-column label="涓昏灞炴�т竴鑷寸巼" align="center" prop="importantConPercent" width="180" v-if="columns[12].visible"/> + <el-table-column label="涓昏灞炴�т竴鑷寸巼" align="center" prop="importantConPercent" width="180" + v-if="columns[12].visible"/> <el-table-column label="鍏ㄩ噺灞炴�т竴鑷寸巼" align="center" prop="majorConPercent" width="180" v-if="columns[13].visible"/> <el-table-column label="澶у浘鍙敤鐜�" align="center" prop="bigUsefulPercent" width="180" v-if="columns[14].visible"/> <el-table-column label="url鍙敤鐜�" align="center" prop="urlPercent" width="180" v-if="columns[15].visible"/> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-view" - @click="handleView(scope.row,scope.index)" - >璇︾粏</el-button> - </template> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-view" + @click="handleView(scope.row,scope.index)" + >璇︾粏 + </el-button> + </template> </el-table-column> </el-table> @@ -156,7 +167,12 @@ <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.provinceTag == 0 ? '鐪佸巺' : '甯傚眬' }}</el-form-item> + <el-form-item label="鏍囩锛�"> + {{ + ((form.provinceTag ? '鐪佸巺銆�' : '') + + (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> <div v-if="form.onState === 0">绂荤嚎</div> <div v-else-if="form.onState === 1">鍦ㄧ嚎</div> @@ -216,32 +232,33 @@ </template> <script> -import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; -import { listDept } from "@/api/system/dept"; +import {videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor} from "@/api/platform/monitor"; +import {listDept} from "@/api/system/dept"; + export default { name: "Monitor", - dicts: ['sys_normal_disable','platform_yes_no','camera_state'], + dicts: ['sys_normal_disable', 'platform_yes_no', 'camera_state'], data() { return { deptList: [], // 鍒椾俊鎭� columns: [ - { key: 0, label: `鏍囩`, visible: true }, - { key: 1, label: `鍖哄煙`, visible: true }, - { key: 2, label: `璁惧鐘舵�乣, visible: true }, - { key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true }, - { key: 4, label: `绠$悊鍗曚綅`, visible: true }, - { key: 5, label: `鏁版嵁鏃堕棿`, visible: false }, - { key: 6, label: `涓�鏈轰竴妗g姸鎬乣, visible: false }, - { key: 7, label: `鏄惁涓烘湭娉ㄥ唽璁惧`, visible: false }, - { key: 8, label: `鎶撴媿鏁版嵁閲忕洃娴媊, visible: false }, - { key: 9, label: `褰撴棩鎶撴媿閲廯, visible: false }, - { key: 10, label: `鏃堕挓鍑嗙‘鐜嘸, visible: false }, - { key: 11, label: `涓婁紶鍙婃椂鐜嘸, visible: false }, - { key: 12, label: `涓昏灞炴�т竴鑷寸巼`, visible: false }, - { key: 13, label: `鍏ㄩ噺灞炴�т竴鑷寸巼`, visible: false }, - { key: 14, label: `鍥剧墖璁块棶寮傚父閲廯, visible: false }, - { key: 15, label: `澶у浘涓嶅彲鐢ㄩ噺`, visible: false } + {key: 0, label: `鏍囩`, visible: true}, + {key: 1, label: `鍖哄煙`, visible: true}, + {key: 2, label: `璁惧鐘舵�乣, visible: true}, + {key: 3, label: `鏄惁鐢熸垚寮傚父宸ュ崟`, visible: true}, + {key: 4, label: `绠$悊鍗曚綅`, visible: true}, + {key: 5, label: `鏁版嵁鏃堕棿`, visible: false}, + {key: 6, label: `涓�鏈轰竴妗g姸鎬乣, visible: false}, + {key: 7, label: `鏄惁涓烘湭娉ㄥ唽璁惧`, visible: false}, + {key: 8, label: `鎶撴媿鏁版嵁閲忕洃娴媊, visible: false}, + {key: 9, label: `褰撴棩鎶撴媿閲廯, visible: false}, + {key: 10, label: `鏃堕挓鍑嗙‘鐜嘸, visible: false}, + {key: 11, label: `涓婁紶鍙婃椂鐜嘸, visible: false}, + {key: 12, label: `涓昏灞炴�т竴鑷寸巼`, visible: false}, + {key: 13, label: `鍏ㄩ噺灞炴�т竴鑷寸巼`, visible: false}, + {key: 14, label: `鍥剧墖璁块棶寮傚父閲廯, visible: false}, + {key: 15, label: `澶у浘涓嶅彲鐢ㄩ噺`, visible: false} ], count: { totalPosts: 0, @@ -287,16 +304,16 @@ // 琛ㄥ崟鏍¢獙 rules: { serialNumber: [ - { required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur" } + {required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur"} ], name: [ - { required: true, message: "璁惧鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + {required: true, message: "璁惧鍚嶇О涓嶈兘涓虹┖", trigger: "blur"} ], onState: [ - { required: true, message: "璁惧鐘舵��", trigger: "blur" } + {required: true, message: "璁惧鐘舵��", trigger: "blur"} ], address: [ - { required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur" } + {required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur"} ], } }; @@ -304,13 +321,22 @@ created() { this.getVideoCount(); this.getList(); - listDept({ status: 0 }).then(response => { + listDept({status: 0}).then(response => { this.deptList = response.data.filter(item => item.area); }); }, methods: { 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() }, @@ -368,7 +394,7 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length!==1 + this.single = selection.length !== 1 this.multiple = !selection.length }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -410,12 +436,13 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎璁惧璧勪骇缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎璁惧璧勪骇缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () { return delMonitor(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); + }).catch(() => { + }); }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { @@ -454,13 +481,13 @@ } - .box-card { background-color: #ffffff; width: 100%; margin-bottom: 20px; height: 120px } + .icon-container { display: flex; justify-content: center; @@ -470,6 +497,7 @@ height: 80px; margin-left: 5%; } + .el-icon-truck { font-size: 50px; color: #FFFFFF; diff --git a/src/views/system/monitor/face/index.vue b/src/views/system/monitor/face/index.vue index 007b042..900920d 100644 --- a/src/views/system/monitor/face/index.vue +++ b/src/views/system/monitor/face/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" > @@ -92,7 +95,13 @@ <el-table-column label="ip" align="center" prop="ip" width="180"/> <el-table-column label="鏍囩" align="center" width="180" 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" width="180" v-if="columns[1].visible"/> @@ -197,7 +206,12 @@ <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.provinceTag == 0 ? '鐪佸巺' : '甯傚眬' }}</el-form-item> + <el-form-item label="鏍囩锛�"> + {{ + ((form.provinceTag ? '鐪佸巺銆�' : '') + + (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> <div v-if="form.onState === 0">绂荤嚎</div> <div v-else-if="form.onState === 1">鍦ㄧ嚎</div> @@ -350,7 +364,16 @@ }, methods: { 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() }, diff --git a/src/views/system/monitor/recovery/index.vue b/src/views/system/monitor/recovery/index.vue index fcd5a92..f2de806 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"> @@ -94,7 +97,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"/> @@ -140,7 +149,12 @@ <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.provinceTag == 0 ? '鐪佸巺' : '甯傚眬' }}</el-form-item> + <el-form-item label="鏍囩锛�"> + {{ + ((form.provinceTag ? '鐪佸巺銆�' : '') + + (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> <div v-if="form.onState === 0">寮傚父</div> <div v-else-if="form.onState === 1">姝e父</div> @@ -313,7 +327,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() }, diff --git a/src/views/system/monitor/video/index.vue b/src/views/system/monitor/video/index.vue index 317c8c5..da9caf1 100644 --- a/src/views/system/monitor/video/index.vue +++ b/src/views/system/monitor/video/index.vue @@ -2,13 +2,17 @@ <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"> @@ -127,22 +131,22 @@ </el-form-item> <el-form-item label="鏁版嵁绫诲瀷" prop="dataType" required> <el-radio-group v-model="exportForm.dataType"> -<!-- <div style="display: flex;margin-bottom: 10px;">--> -<!-- <div style="width: 48%">--> - <el-radio :label="0">鎬婚噺鏁版嵁</el-radio> -<!-- </div>--> -<!-- <div style="width: 48%">--> - <el-radio :label="1">姣忔棩鍦ㄧ嚎鎯呭喌</el-radio> -<!-- </div>--> -<!-- </div>--> -<!-- <div style="display: flex;">--> -<!-- <div style="width: 48%">--> - <el-radio :label="2">姣忔棩褰曞儚鎯呭喌</el-radio> -<!-- </div>--> -<!-- <div style="width: 48%">--> - <el-radio :label="3">姣忔棩褰曞儚缂哄け鏃堕暱</el-radio> -<!-- </div>--> -<!-- </div>--> + <!-- <div style="display: flex;margin-bottom: 10px;">--> + <!-- <div style="width: 48%">--> + <el-radio :label="0">鎬婚噺鏁版嵁</el-radio> + <!-- </div>--> + <!-- <div style="width: 48%">--> + <el-radio :label="1">姣忔棩鍦ㄧ嚎鎯呭喌</el-radio> + <!-- </div>--> + <!-- </div>--> + <!-- <div style="display: flex;">--> + <!-- <div style="width: 48%">--> + <el-radio :label="2">姣忔棩褰曞儚鎯呭喌</el-radio> + <!-- </div>--> + <!-- <div style="width: 48%">--> + <el-radio :label="3">姣忔棩褰曞儚缂哄け鏃堕暱</el-radio> + <!-- </div>--> + <!-- </div>--> </el-radio-group> </el-form-item> <el-button type="primary" size="small" style="width: 400px" @click="handleExport">瀵煎嚭</el-button> @@ -161,7 +165,13 @@ <el-table-column label="ip" align="center" prop="ip" width="180"/> <el-table-column label="鏍囩" align="center" width="180" 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" width="180" v-if="columns[1].visible"/> @@ -237,7 +247,12 @@ <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.provinceTag == 0 ? '鐪佸巺' : '甯傚眬' }}</el-form-item> + <el-form-item label="鏍囩锛�"> + {{ + ((form.provinceTag ? '鐪佸巺銆�' : '') + + (form.deptTag ? '鍏畨閮ㄣ��' : '')).replace(/銆�$/, '') + }} + </el-form-item> <el-form-item label="璁惧鐘舵�侊細"> <div v-if="form.onState === 0">绂荤嚎</div> <div v-else-if="form.onState === 1">鍦ㄧ嚎</div> @@ -414,7 +429,16 @@ }, methods: { 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