From 9e5caf43d7059cd5b28703b138e95b7f4df94699 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 27 九月 2024 17:00:42 +0800
Subject: [PATCH] 首页图表
---
src/views/system/work-order/threshold/index.vue | 1064 +++++++++++-----------------------------------------------
1 files changed, 206 insertions(+), 858 deletions(-)
diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue
index 8754259..feb4b44 100644
--- a/src/views/system/work-order/threshold/index.vue
+++ b/src/views/system/work-order/threshold/index.vue
@@ -14,8 +14,8 @@
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
- <el-col :span="8">
- <el-card style="margin-bottom: 20px; height: 340px; margin-right: 20px">
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
+ <el-card style="margin-bottom: 20px; height: 350px; margin-right: 20px;color: #656565;">
<div style="display: flex; justify-content: space-between">
<div class="header鈥攖ext">瑙嗛</div>
<div>
@@ -24,11 +24,15 @@
type="text"
icon="el-icon-edit"
v-hasPermi="['ycl:threshold:edit']"
- @click="a()"
- v-if="!ifEdit"
+ @click="showEdit('video')"
+ v-if="!ifEditVideo"
>淇敼
</el-button>
- <el-button size="mini" type="primary" @click="a()" v-if="ifEdit"
+ <el-button
+ size="mini"
+ type="primary"
+ @click="saveEdit('video')"
+ v-if="ifEditVideo"
>淇濆瓨
</el-button>
</div>
@@ -37,99 +41,70 @@
style="
margin: 20px;
display: flex;
- width: 350px;
+ width: 400px;
justify-content: space-between;
"
>
<div>
- <span style="font-size: small">宸ュ崟闃堝��</span>
+ <div
+ style="
+ font-size: small;
+ display: flex;
+ flex-direction: row-reverse;
+ width: 192px;
+ "
+ >
+ 宸ュ崟闃堝��
+ </div>
<div>
- <el-form label-width="100px">
- <el-form-item label="鍥惧儚璐ㄩ噺">
+ <el-form label-width="140px">
+ <el-form-item
+ v-for="(item, index) in thresholdList.video"
+ :label="item.name + '锛�'"
+ :key="item.id"
+ >
<el-input
- v-model="videoList.imageQuality"
+ v-model="videoList[index].value"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditVideo"
></el-input>
- <span v-else>{{
- thresholdList[0].imageQuality
- }}</span></el-form-item
- >
- <el-form-item label="瑙嗛璐ㄩ噺">
- <el-input
- v-model="videoList.videoQuality"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{
- thresholdList[0].videoQuality
- }}</span></el-form-item
- >
- <el-form-item label="鏍囨敞鍑嗙‘鐜�">
- <el-input
- v-model="videoList.annotationAccuracy"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{
- thresholdList[0].annotationAccuracy
- }}</span></el-form-item
- >
+ <span v-else>{{ item.value }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item>
</el-form>
</div>
</div>
<div>
<span style="font-size: small">涓嬪彂闃堝��</span>
<div>
- <el-form
- ref="form"
- :model="thresholdList[0]"
- label-width="100px"
- >
- <el-form-item label="鍥惧儚璐ㄩ噺">
+ <el-form ref="form">
+ <el-form-item
+ v-for="(item, index) in thresholdList.video"
+ label=""
+ :key="item.id"
+ >
<el-input
- v-model="videoList.imageQualityAuto"
+ v-model="videoList[index].valueAuto"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditVideo"
></el-input>
- <span v-else>{{
- thresholdList[0].imageQualityAuto
- }}</span></el-form-item
- >
- <el-form-item label="瑙嗛璐ㄩ噺">
- <el-input
- v-model="videoList.videoQualityAuto"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{
- thresholdList[0].videoQualityAuto
- }}</span></el-form-item
- >
- <el-form-item label="鏍囨敞鍑嗙‘鐜�">
- <el-input
- v-model="videoList.annotationAccuracyAuto"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{
- thresholdList[0].annotationAccuracyAuto
- }}</span></el-form-item
- >
+ <span v-else>{{ item.valueAuto }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item>
</el-form>
</div>
</div>
</div>
</el-card>
</el-col>
- <el-col :span="8">
- <el-card style="margin-bottom: 20px; height: 340px; margin-right: 20px">
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
+ <el-card style="margin-bottom: 20px; height: 350px; margin-right: 20px;color: #656565;">
<div style="display: flex; justify-content: space-between">
<div class="header鈥攖ext">浜鸿劯</div>
<div>
@@ -138,11 +113,15 @@
type="text"
icon="el-icon-edit"
v-hasPermi="['ycl:threshold:edit']"
- @click="a()"
- v-if="!ifEdit"
+ @click="showEdit('face')"
+ v-if="!ifEditFace"
>淇敼
</el-button>
- <el-button size="mini" type="primary" @click="a()" v-if="ifEdit"
+ <el-button
+ size="mini"
+ type="primary"
+ @click="saveEdit('face')"
+ v-if="ifEditFace"
>淇濆瓨
</el-button>
</div>
@@ -151,134 +130,62 @@
style="
margin: 20px;
display: flex;
- width: 350px;
+ width: 400px;
justify-content: space-between;
"
>
<div>
- <span style="font-size: small">宸ュ崟闃堝��</span>
+ <div
+ style="
+ font-size: small;
+ display: flex;
+ flex-direction: row-reverse;
+ width: 190px;
+ "
+ >
+ 宸ュ崟闃堝��
+ </div>
<div>
- <el-form label-width="100px">
- <el-form-item label="鎶撴媿閲�">
+ <el-form label-width="140px">
+ <el-form-item
+ v-for="(item, index) in thresholdList.face"
+ :label="item.name + '锛�'"
+ :key="item.id"
+ >
<el-input
- v-model="faceList.captureNum"
+ v-model="faceList[index].value"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditFace"
></el-input>
- <span v-else>{{ thresholdList[1].captureNum }}</span></el-form-item
- >
- <el-form-item label="鍙婃椂鐜�">
- <el-input
- v-model="faceList.timelyRate"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ thresholdList[1].timelyRate }}</span></el-form-item
- >
- <el-form-item label="寤惰繜閲�">
- <el-input
- v-model="faceList.delayAmount"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ thresholdList[1].delayAmount }}</span></el-form-item
- >
- <el-form-item label="璁惧娲昏穬鐜�">
- <el-input
- v-model="faceList.deviceActiveRate"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ thresholdList[1].deviceActiveRate }}</span></el-form-item
- >
- <el-form-item label="鎶撴媿鍙婃椂鐜�">
- <el-input
- v-model="faceList.name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ thresholdList[1].deviceActiveRate }}</span></el-form-item
- >
- <el-form-item label="鏃堕挓鍑嗙‘鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
+ <span v-else>{{ item.value }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item>
</el-form>
</div>
</div>
<div>
<span style="font-size: small">涓嬪彂闃堝��</span>
<div>
- <el-form
- ref="form"
- :model="thresholdList[0]"
- label-width="100px"
- >
- <el-form-item label="鎶撴媿閲�">
- <el-input
- v-model="thresholdList[1].captureNum"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{
- thresholdList[1].captureNum
- }}</span></el-form-item
+ <el-form ref="form">
+ <el-form-item
+ v-for="(item, index) in thresholdList.face"
+ label=""
+ :key="item.id"
>
- <el-form-item label="鍙婃椂鐜�">
<el-input
- v-model="thresholdList[0].name"
+ v-model="faceList[index].valueAuto"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditFace"
></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="寤惰繜閲�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="璁惧娲昏穬鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鎶撴媿鍙婃椂鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鏃堕挓鍑嗙‘鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
+ <span v-else>{{ item.valueAuto }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item
>
</el-form>
</div>
@@ -286,8 +193,8 @@
</div>
</el-card></el-col
>
- <el-col :span="8">
- <el-card style="margin-bottom: 20px; height: 340px; margin-right: 20px">
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
+ <el-card style="margin-bottom: 20px; height: 350px; margin-right: 20px;color: #656565;">
<div style="display: flex; justify-content: space-between">
<div class="header鈥攖ext">杞﹁締</div>
<div>
@@ -296,11 +203,15 @@
type="text"
icon="el-icon-edit"
v-hasPermi="['ycl:threshold:edit']"
- @click="a()"
- v-if="!ifEdit"
+ @click="showEdit('car')"
+ v-if="!ifEditCar"
>淇敼
</el-button>
- <el-button size="mini" type="primary" @click="a()" v-if="ifEdit"
+ <el-button
+ size="mini"
+ type="primary"
+ @click="saveEdit('car')"
+ v-if="ifEditCar"
>淇濆瓨
</el-button>
</div>
@@ -309,137 +220,62 @@
style="
margin: 20px;
display: flex;
- width: 350px;
+ width: 400px;
justify-content: space-between;
"
>
<div>
- <span style="font-size: small">宸ュ崟闃堝��</span>
+ <div
+ style="
+ font-size: small;
+ display: flex;
+ flex-direction: row-reverse;
+ width: 206px;
+ "
+ >
+ 宸ュ崟闃堝��
+ </div>
<div>
- <el-form
- ref="form"
- :model="thresholdList[0]"
- label-width="120px"
- >
- <el-form-item label="杩囪溅鏁版嵁閲�">
+ <el-form ref="form" label-width="160px">
+ <el-form-item
+ v-for="(item, index) in thresholdList.car"
+ :label="item.name + '锛�'"
+ :key="item.id"
+ >
<el-input
- v-model="thresholdList[0].name"
+ v-model="carList[index].value"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditCar"
></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="杩囪溅缂哄け鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鏈夋晥杩囪溅鏁版嵁閲�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="璁惧娲昏穬鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鎶撴媿鍙婃椂鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鏃堕挓鍑嗙‘鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
+ <span v-else>{{ item.value }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item>
</el-form>
</div>
</div>
<div>
<span style="font-size: small">涓嬪彂闃堝��</span>
<div>
- <el-form
- ref="form"
- :model="thresholdList[0]"
- label-width="120px"
- >
- <el-form-item label="杩囪溅鏁版嵁閲�">
+ <el-form ref="form">
+ <el-form-item
+ v-for="(item, index) in thresholdList.car"
+ label=""
+ :key="item.id"
+ >
<el-input
- v-model="thresholdList[0].name"
+ v-model="carList[index].valueAuto"
size="mini"
style="width: 100px"
- v-if="ifEdit"
+ :type="item.countType=='int'?'number':''"
+ v-if="ifEditCar"
></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="杩囪溅缂哄け鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鏈夋晥杩囪溅鏁版嵁閲�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="璁惧娲昏穬鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鎶撴媿鍙婃椂鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
- <el-form-item label="鏃堕挓鍑嗙‘鐜�">
- <el-input
- v-model="thresholdList[0].name"
- size="mini"
- style="width: 100px"
- v-if="ifEdit"
- ></el-input>
- <span v-else>{{ 10 }}</span></el-form-item
- >
+ <span v-else>{{ item.valueAuto }}</span>
+ <span class="unit" v-if="item.countType=='percent'">%</span>
+ <span class="unit" v-if="item.countType=='second'">绉�</span>
+ </el-form-item>
</el-form>
</div>
</div>
@@ -447,536 +283,6 @@
</el-card></el-col
>
</el-row>
-
- <!-- <el-table
- v-loading="loading"
- :data="thresholdList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="璁惧绫诲瀷" align="center" prop="monitorType">
- <template slot-scope="scope">
- <span v-show="scope.row['monitorType'] === 'face'">浜鸿劯</span>
- <span v-show="scope.row['monitorType'] === 'car'">杞﹁締</span>
- <span v-show="scope.row['monitorType'] === 'video'">瑙嗛</span>
- </template>
- </el-table-column>
- <el-table-column label="宸ュ崟闃堝��" align="center">
- <template slot-scope="scope">
- <template v-if="scope.row.monitorType === 'face'">
- <div class="table-row">
- <div class="table-row-item">鎶撴媿閲�</div>
- <div class="table-row-item">{{ scope.row.captureNum }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鍙婃椂鐜�</div>
- <div class="table-row-item">{{ scope.row.timelyRate }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">寤惰繜閲�</div>
- <div class="table-row-item">{{ scope.row.delayAmount }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">璁惧娲昏穬鐜�</div>
- <div class="table-row-item">{{ scope.row.deviceActiveRate }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鎶撴媿鍙婃椂鐜�</div>
- <div class="table-row-item">{{ scope.row.timelyCapture }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏃堕挓鍑嗙‘鐜�</div>
- <div class="table-row-item">{{ scope.row.timeAccuracy }}</div>
- </div>
- </template>
- <template v-else-if="scope.row.monitorType === 'car'">
- <div class="table-row">
- <div class="table-row-item">杩囪溅鏁版嵁閲�</div>
- <div class="table-row-item">{{ scope.row.passCarNum }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">杩囪溅缂哄け鐜�</div>
- <div class="table-row-item">{{ scope.row.passCarMissRate }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏈夋晥杩囪溅鏁版嵁閲�</div>
- <div class="table-row-item">
- {{ scope.row.passCarEffectiveNum }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">璁惧娲昏穬鐜�</div>
- <div class="table-row-item">{{ scope.row.deviceActiveRate }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鎶撴媿鍙婃椂鐜�</div>
- <div class="table-row-item">{{ scope.row.timelyCapture }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏃堕挓鍑嗙‘鐜�</div>
- <div class="table-row-item">{{ scope.row.timeAccuracy }}</div>
- </div>
- </template>
- <template v-else-if="scope.row.monitorType === 'video'">
- <div class="table-row" style="display: flex; flex-direction: row">
- <div class="table-row-item">鍥惧儚璐ㄩ噺</div>
- <div class="table-row-item">{{ scope.row.imageQuality }}</div>
- </div>
- <div class="table-row" style="display: flex; flex-direction: row">
- <div class="table-row-item">瑙嗛璐ㄩ噺</div>
- <div class="table-row-item">{{ scope.row.videoQuality }}</div>
- </div>
- <div class="table-row" style="display: flex; flex-direction: row">
- <div class="table-row-item">鏍囨敞鍑嗙‘鐜�</div>
- <div class="table-row-item">
- {{ scope.row.annotationAccuracy }}
- </div>
- </div>
- </template>
- </template>
- </el-table-column>
- <el-table-column label="涓嬪彂闃堝��" align="center">
- <template slot-scope="scope">
- <template v-if="scope.row.monitorType === 'face'">
- <div class="table-row">
- <div class="table-row-item">鎶撴媿閲�</div>
- <div class="table-row-item">{{ scope.row.captureNumAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鍙婃椂鐜�</div>
- <div class="table-row-item">{{ scope.row.timelyRateAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">寤惰繜閲�</div>
- <div class="table-row-item">{{ scope.row.delayAmountAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">璁惧娲昏穬鐜�</div>
- <div class="table-row-item">
- {{ scope.row.deviceActiveRateAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鎶撴媿鍙婃椂鐜�</div>
- <div class="table-row-item">
- {{ scope.row.timelyCaptureAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏃堕挓鍑嗙‘鐜�</div>
- <div class="table-row-item">{{ scope.row.timeAccuracyAuto }}</div>
- </div>
- </template>
- <template v-else-if="scope.row.monitorType === 'car'">
- <div class="table-row">
- <div class="table-row-item">杩囪溅鏁版嵁閲�</div>
- <div class="table-row-item">{{ scope.row.passCarNumAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">杩囪溅缂哄け鐜�</div>
- <div class="table-row-item">
- {{ scope.row.passCarMissRateAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏈夋晥杩囪溅鏁版嵁閲�</div>
- <div class="table-row-item">
- {{ scope.row.passCarEffectiveNumAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">璁惧娲昏穬鐜�</div>
- <div class="table-row-item">
- {{ scope.row.deviceActiveRateAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鎶撴媿鍙婃椂鐜�</div>
- <div class="table-row-item">
- {{ scope.row.timelyCaptureAuto }}
- </div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏃堕挓鍑嗙‘鐜�</div>
- <div class="table-row-item">{{ scope.row.timeAccuracyAuto }}</div>
- </div>
- </template>
- <template v-else-if="scope.row.monitorType === 'video'">
- <div class="table-row">
- <div class="table-row-item">鍥惧儚璐ㄩ噺</div>
- <div class="table-row-item">{{ scope.row.imageQualityAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">瑙嗛璐ㄩ噺</div>
- <div class="table-row-item">{{ scope.row.videoQualityAuto }}</div>
- </div>
- <div class="table-row">
- <div class="table-row-item">鏍囨敞鍑嗙‘鐜�</div>
- <div class="table-row-item">
- {{ scope.row.annotationAccuracyAuto }}
- </div>
- </div>
- </template>
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- v-hasPermi="['ycl:threshold:edit']"
- @click="updateWho(scope.row)"
- >淇敼
- </el-button>
- </template>
- </el-table-column>
- </el-table> -->
-
- <!-- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- /> -->
-
- <!-- 浜鸿劯闃堝�� -->
- <el-dialog
- title="淇敼浜鸿劯宸ュ崟闃堝��"
- :visible.sync="faceOpen"
- width="700px"
- append-to-body
- >
- <el-form
- ref="faceForm"
- :model="faceForm"
- label-width="150px"
- :inline="true"
- >
- <el-form-item class="fixedWidth" label="鎶撴媿閲�" prop="captureNum">
- <el-input
- clearable
- size="small"
- v-model="faceForm.captureNum"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.captureNumAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item class="fixedWidth" label="杩囪溅缂哄け鐜�" prop="timelyRate">
- <el-input
- clearable
- size="small"
- v-model="faceForm.timelyRate"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.timelyRateAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item class="fixedWidth" label="寤惰繜閲�" prop="delayAmount">
- <el-input
- clearable
- size="small"
- v-model="faceForm.delayAmount"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.delayAmountAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="璁惧娲昏穬鐜�"
- prop="deviceActiveRate"
- >
- <el-input
- clearable
- size="small"
- v-model="faceForm.deviceActiveRate"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.deviceActiveRateAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="鎶撴媿鍙婃椂鐜�"
- prop="timelyCapture"
- >
- <el-input
- clearable
- size="small"
- v-model="faceForm.timelyCapture"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.timelyCaptureAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="鏃堕挓鍑嗙‘鐜�"
- prop="deviceActiveRate"
- >
- <el-input
- clearable
- size="small"
- v-model="faceForm.timeAccuracy"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="faceForm.timeAccuracyAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="editFace">纭� 瀹�</el-button>
- <el-button @click="cancelFace">鍙� 娑�</el-button>
- </div>
- </el-dialog>
-
- <!-- 杞﹁締闃堝�� -->
- <el-dialog
- title="淇敼杞﹁締宸ュ崟闃堝��"
- :visible.sync="carOpen"
- width="700px"
- append-to-body
- >
- <el-form
- ref="faceForm"
- :model="faceForm"
- label-width="150px"
- :inline="true"
- >
- <el-form-item class="fixedWidth" label="杩囪溅鏁版嵁閲�" prop="passCarNum">
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarNum"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarNumAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="杩囪溅缂哄け鐜�"
- prop="passCarMissRate"
- >
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarMissRate"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarMissRateAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="鏈夋晥杩囪溅鏁版嵁閲�"
- prop="passCarEffectiveNum"
- >
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarEffectiveNum"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.passCarEffectiveNumAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="璁惧娲昏穬鐜�"
- prop="deviceActiveRate"
- >
- <el-input
- clearable
- size="small"
- v-model="carForm.deviceActiveRate"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.deviceActiveRateAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="鎶撴媿鍙婃椂鐜�"
- prop="timelyCapture"
- >
- <el-input
- clearable
- size="small"
- v-model="carForm.timelyCapture"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.timelyCaptureAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- <el-form-item class="fixedWidth" label="鏃堕挓鍑嗙‘鐜�" prop="timeAccuracy">
- <el-input
- clearable
- size="small"
- v-model="carForm.timeAccuracy"
- placeholder="宸ュ崟闃堝��"
- />
- <el-input
- clearable
- size="small"
- v-model="carForm.timeAccuracyAuto"
- placeholder="涓嬪彂闃堝��"
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="editCar">纭� 瀹�</el-button>
- <el-button @click="cancelCar">鍙� 娑�</el-button>
- </div>
- </el-dialog>
-
- <!-- 瑙嗛闃堝�� -->
- <el-dialog
- title="淇敼瑙嗛宸ュ崟闃堝��"
- :visible.sync="videoOpen"
- width="700px"
- append-to-body
- >
- <el-form
- ref="videoForm"
- :model="videoForm"
- label-width="100px"
- :inline="true"
- >
- <el-form-item
- class="fixedWidth"
- label="鍥惧儚璐ㄩ噺"
- prop="imageQuality"
- label-width="100px"
- >
- <el-select
- v-model="videoForm.imageQuality"
- placeholder="宸ュ崟闃堝��"
- @change="handleModeNameChange"
- >
- <el-option
- :key="dict.value"
- :label="dict.value"
- v-for="dict in dict.type.image_qualify"
- />
- </el-select>
- <el-select
- v-model="videoForm.imageQualityAuto"
- placeholder="涓嬪彂闃堝��"
- @change="handleModeNameChange"
- >
- <el-option
- :key="dict.value"
- :label="dict.value"
- v-for="dict in dict.type.image_qualify"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="瑙嗛璐ㄩ噺"
- prop="videoQuality"
- label-width="100px"
- >
- <el-select
- v-model="videoForm.videoQuality"
- placeholder="宸ュ崟闃堝��"
- @change="handleModeNameChange"
- >
- <el-option
- :key="dict.value"
- :label="dict.value"
- v-for="dict in dict.type.video_qualify"
- />
- </el-select>
- <el-select
- v-model="videoForm.videoQualityAuto"
- placeholder="涓嬪彂闃堝��"
- @change="handleModeNameChange"
- >
- <el-option
- :key="dict.value"
- :label="dict.value"
- v-for="dict in dict.type.video_qualify"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- class="fixedWidth"
- label="鏍囨敞鍑嗙‘鐜�"
- prop="annotationAccuracy"
- label-width="100px"
- >
- <el-input
- v-model="videoForm.annotationAccuracy"
- type="number"
- size="small"
- placeholder="宸ュ崟闃堝��"
- ></el-input>
- <el-input
- v-model="videoForm.annotationAccuracy"
- type="number"
- size="small"
- placeholder="涓嬪彂闃堝��"
- ></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="editVideo">纭� 瀹�</el-button>
- <el-button @click="cancelVideo">鍙� 娑�</el-button>
- </div>
- </el-dialog>
</div>
</template>
@@ -984,7 +290,7 @@
import {
listThreshold,
getThreshold,
- editVideo,
+ updateThreshold,
} from "@/api/platform/threshold";
import {
editCar,
@@ -999,7 +305,9 @@
name: "Threshold",
data() {
return {
- ifEdit: false,
+ ifEditVideo: false,
+ ifEditFace: false,
+ ifEditCar: false,
indicators: [],
// 閬僵灞�
loading: true,
@@ -1014,9 +322,10 @@
// 鎬绘潯鏁�
total: 0,
// 杩愮淮闃堝�艰〃鏍兼暟鎹�
- thresholdList: [],
+ thresholdList: {},
videoList: [],
faceList: [],
+ carList: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -1104,9 +413,38 @@
this.getList();
},
methods: {
- a() {
- this.ifEdit = true;
- console.log(this.ifEdit);
+ showEdit(value) {
+ if (value == "video") {
+ this.videoList = JSON.parse(JSON.stringify(this.thresholdList.video));
+ this.ifEditVideo = true;
+ }
+ if (value == "face") {
+ this.faceList = JSON.parse(JSON.stringify(this.thresholdList.face));
+ this.ifEditFace = true;
+ }
+ if (value == "car") {
+ this.carList = JSON.parse(JSON.stringify(this.thresholdList.car));
+ this.ifEditCar = true;
+ }
+ },
+ saveEdit(value) {
+ let data = []
+ if (value == "video") {
+ data = this.videoList;
+ this.ifEditVideo = false;
+ }
+ if (value == "face") {
+ data = this.faceList;
+ this.ifEditFace = false;
+ }
+ if (value == "car") {
+ data = this.carList;
+ this.ifEditCar = false;
+ }
+ updateThreshold(data).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.getList();
+ });
},
showContent(row) {
if (row.monitorType === "car") {
@@ -1161,8 +499,10 @@
getList() {
this.loading = true;
listThreshold(this.queryParams).then((response) => {
- this.thresholdList = response.rows;
- this.videoList = thresholdList[0];
+ this.thresholdList = response.data;
+ this.videoList = JSON.parse(JSON.stringify(this.thresholdList.video));
+ this.faceList = JSON.parse(JSON.stringify(this.thresholdList.face));
+ this.carList = JSON.parse(JSON.stringify(this.thresholdList.car));
this.total = response.total;
this.loading = false;
});
@@ -1233,28 +573,28 @@
this.resetForm("carForm");
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
+ // handleQuery() {
+ // this.queryParams.pageNum = 1;
+ // this.getList();
+ // },
/** 閲嶇疆鎸夐挳鎿嶄綔 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
+ // resetQuery() {
+ // this.resetForm("queryForm");
+ // this.handleQuery();
+ // },
// 澶氶�夋閫変腑鏁版嵁
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
+ // handleSelectionChange(selection) {
+ // this.ids = selection.map((item) => item.id);
+ // this.single = selection.length !== 1;
+ // this.multiple = !selection.length;
+ // },
/** 鏂板鎸夐挳鎿嶄綔 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "娣诲姞杩愮淮闃堝��";
- this.handleModeNameChange();
- },
+ // handleAdd() {
+ // this.reset();
+ // this.open = true;
+ // this.title = "娣诲姞杩愮淮闃堝��";
+ // this.handleModeNameChange();
+ // },
/** 淇敼鎸夐挳鎿嶄綔 */
updateWho(row) {
if (row.monitorType === "face") {
@@ -1434,8 +774,16 @@
.header鈥攖ext {
font-weight: bold;
+ font-size: large;
}
::v-deep .el-form-item {
margin-bottom: 0px; /* 鏍规嵁闇�姹傝皟鏁磋繖涓�� */
}
+::v-deep .el-form-item__label {
+ color: #8d8d8d;
+}
+.unit {
+ margin-left: 5px;
+ display: inline-block;
+}
</style>
--
Gitblit v1.8.0