From 81b39a2f9b00ab6be4b2075a28ef5f1f8e497da8 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期二, 08 九月 2020 14:48:50 +0800
Subject: [PATCH] 取消摄像机树的锁定按钮, 修复检索便签选择请求两次的bug
---
src/pages/cameraAccess/index/App.vue | 13 +
src/pages/example/index/App.vue | 318 +++++++++++++++++++++++++++++++++++++++++++++
src/pages/example/index/api.ts | 20 ++
src/pages/search/index/Searching.vue | 5
src/components/LeftNav.vue | 1
src/pages/example/index/main.ts | 13 +
src/pages/library/components/personList.vue | 26 ++-
7 files changed, 380 insertions(+), 16 deletions(-)
diff --git a/src/components/LeftNav.vue b/src/components/LeftNav.vue
index fc28117..98e72a4 100644
--- a/src/components/LeftNav.vue
+++ b/src/components/LeftNav.vue
@@ -391,7 +391,6 @@
},
lockSwitch() {
this.TreeDataPool.readonly = !this.TreeDataPool.readonly;
- console.log(this.TreeDataPool.readonly)
},
gbLockSwitch() {
this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly;
diff --git a/src/pages/cameraAccess/index/App.vue b/src/pages/cameraAccess/index/App.vue
index e10d808..7aa5017 100644
--- a/src/pages/cameraAccess/index/App.vue
+++ b/src/pages/cameraAccess/index/App.vue
@@ -4,10 +4,10 @@
<div class="resize-bar"></div>
<div class="resize-line"></div>
<div class="resize-save">
- <left-nav :appName="app" :edit="editTree" :height="screenHeight"></left-nav>
+ <left-nav :appName="app" :height="screenHeight"></left-nav>
</div>
</div>
- <div class="column-right" >
+ <div class="column-right">
<right-side />
</div>
</div>
@@ -32,8 +32,7 @@
data() {
return {
leftWith: 0,
- screenHeight: 0,
- editTree: true
+ screenHeight: 0
}
},
mounted() {
@@ -45,6 +44,10 @@
};
this.leftWith = this.$refs['left'].offsetWidth;
+ this.TreeDataPool.readonly = false;
+ this.TreeDataPool.gbReadonly = false;
+ this.DataStackPool.readonly = false;
+
},
methods: {
getUrlKey() {
@@ -72,7 +75,7 @@
}
.column-right {
position: relative;
- flex:1;
+ flex: 1;
background-color: #fff;
box-sizing: border-box;
overflow-y: hidden;
diff --git a/src/pages/example/index/App.vue b/src/pages/example/index/App.vue
new file mode 100644
index 0000000..52e2765
--- /dev/null
+++ b/src/pages/example/index/App.vue
@@ -0,0 +1,318 @@
+<template>
+ <div class="searching-box">
+ <div class="searching-right">
+ <div class="searching-right-content">
+ <div class="top">
+ <p class="p-label" style="width:16%">
+ <b>搴曞簱锛�</b>
+ <el-select
+ v-model="tagTable"
+ collapse-tags
+ size="mini"
+ style="width:calc(100% - 40px);min-width: 120px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in tables"
+ style="font-size:12px"
+ :key="item.id"
+ :label="item.tableName"
+ :value="item.id"
+ :title="item.tableName"
+ ></el-option>
+ </el-select>
+ </p>
+
+ <p class="p-input" style="width:19%">
+ <el-button type="primary" size="mini" @click="searchingBtn">鎼滅储</el-button>
+ </p>
+ </div>
+
+ <div ref="mid" style="height:calc(100% - 50px);">
+ <el-row v-for="(item, index) in cmpData" :key="index">
+ <el-col :span="3" v-for="target in item.targets" :key="target.personPicUrl">
+ <el-card :body-style="{padding: '5px'}">
+ <img
+ :src="'/httpImage/' + item.curPicUrl"
+ style="max-height:84px;width:84px;object-fit:contain;background:rgba(0,0,0,0.35);"
+ />
+ <span> </span>
+ <img
+ :src="'/httpImage/' + target.personPicUrl"
+ style="max-height:84px;width:84px;object-fit:contain;background:rgba(0,0,0,0.35);"
+ />
+ <div style="padding: 5px">
+ <span>姣斿垎: {{target.score}} %</span>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { testDBCompare } from "./api";
+import { getSyncTables } from "@/api/baseLibrary"
+
+export default {
+ data() {
+ return {
+ tables: "",
+ tagTable: "",
+ cmpData: []
+
+ };
+ },
+
+ created() {
+ },
+ mounted() {
+ this.getDBTables()
+ },
+ destroyed() {
+ },
+ methods: {
+ getDBTables() {
+ getSyncTables().then(rsp => {
+ if (rsp && rsp.success) {
+ this.tables = rsp.data.datalist
+ }
+ })
+ },
+
+ searchingBtn() {
+ testDBCompare({ tableId: this.tagTable }).then(rsp => {
+ rsp.data.forEach(element => {
+ element.targets.sort(function (obj1, obj2) {
+ var val1 = obj1.score;
+ var val2 = obj2.score;
+ if (val1 > val2) {
+ return -1;
+ } else if (val1 < val2) {
+ return 1;
+ } else {
+ return 0;
+ }
+ });
+ });
+ this.cmpData = rsp.data
+ })
+ }
+ }
+};
+</script>
+
+<style lang="scss">
+.searching-box {
+ width: 100%;
+ height: 100% !important;
+ float: left;
+ //position: relative;
+ .searching-right {
+ width: 100%;
+ height: 100%;
+ padding: 0px 20px;
+ box-sizing: border-box;
+
+ //涓存椂
+ .el-carousel__item.is-active {
+ z-index: 0 !important;
+ }
+ //涓存椂
+
+ .searching-right-nav {
+ height: 50px;
+ width: 100%;
+ line-height: 58px;
+ text-align: left;
+ font-size: 14px !important;
+ box-sizing: border-box;
+ color: rgba(0, 0, 0, 0.78) !important;
+ }
+ .searching-right-content {
+ height: calc(100% - 80px);
+ width: 100%;
+ box-sizing: border-box;
+ .top {
+ background-image: linear-gradient(-180deg, #ffffff 13%, #e9ebf2 100%);
+ height: 76px;
+ width: 100%;
+ padding: 5px 22px;
+ box-sizing: border-box;
+ text-align: left;
+ // line-height: 55px;
+ white-space: nowrap;
+ overflow-x: auto;
+ overflow-y: hidden;
+ .p-label,
+ .p-task,
+ .p-level,
+ .p-date,
+ .p-input,
+ .p-clear {
+ display: inline-block;
+ padding-right: 10px;
+ box-sizing: border-box;
+ margin-top: 20px;
+ b:hover {
+ color: #2249b4;
+ }
+ }
+ .clear-searching {
+ cursor: pointer;
+ text-decoration: underline;
+ width: 40px;
+ font-size: 13px;
+ color: #3d68e1;
+ }
+ }
+ .mid {
+ //width: 100%;
+ //height: 100%;
+ padding: 5px;
+ overflow: auto;
+ position: relative;
+ .my-card {
+ float: left;
+ margin: 0px 14px 10px 0px;
+ cursor: pointer;
+ }
+ }
+ .foot {
+ overflow: hidden;
+ width: 100%;
+ height: 80px;
+ //line-height: 80px;
+ padding-top: 20px;
+ padding-right: 24px;
+ box-sizing: border-box;
+ text-align: right;
+ }
+ }
+ }
+ .el-select__tags {
+ max-width: 250px !important;
+ }
+}
+.el-select-dropdown {
+ width: 200px !important;
+}
+.el-tag {
+ max-width: 85% !important;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.titlebar {
+ height: 10px !important;
+ background: #fff !important;
+ .button {
+ position: absolute;
+ font-size: 25px !important;
+ right: 10px;
+ top: 10px;
+ z-index: 3;
+ }
+}
+.addToBase {
+ width: 98%;
+ height: 430px;
+ position: relative;
+ .topLabel {
+ margin-top: 20px;
+ height: 40px;
+ border-bottom: 1px solid #eee;
+ font-family: PingFangSC-Medium;
+ font-size: 20px;
+ font-weight: 600;
+ line-height: 1rem;
+ color: #222222;
+ text-align: left;
+ margin-left: 15px;
+ }
+ .items {
+ width: 100%;
+ height: auto;
+ max-height: 35%;
+ overflow-y: auto;
+ margin: 20px 0px;
+ .lable {
+ width: 15%;
+ margin-top: 10px;
+ float: left;
+ //font-family: PingFangSC-Medium;
+ font-size: 14px;
+ font-weight: 600;
+ }
+ .baseList {
+ width: 85%;
+ height: 100%;
+ float: left;
+
+ // display: flex;
+ // justify-content: flex-start;
+ .base {
+ //flex-wrap: wrap;
+ width: calc(33% - 10px);
+ padding: 0px 5px;
+ line-height: 30px;
+ float: left;
+ text-align: left;
+ font-size: 12px !important;
+ .el-checkbox {
+ width: 100%;
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ .el-checkbox__label {
+ display: inline !important;
+ }
+ }
+ }
+ }
+ }
+ .buttons {
+ position: absolute;
+ right: 0px;
+ bottom: 15px;
+ }
+}
+.search {
+ background-color: #eee;
+}
+</style>
+<style lang="scss" scoped>
+.left-selection {
+ width: 300px;
+ height: 100%;
+ float: left;
+ margin-right: 15px;
+}
+#searchMid {
+ height: 100%;
+ box-sizing: border-box;
+ .el-loading-mask {
+ .el-loading-spinner {
+ width: 100%;
+ height: 100%;
+ .el-loading-spinner-search {
+ background: url("/images/search/searchLoading.gif") no-repeat;
+ }
+ }
+ }
+
+ .right-section {
+ //width: calc(100% - 315px);
+ height: 100%;
+ padding-bottom: 20px;
+ box-sizing: border-box;
+ //float: left;
+ overflow: auto;
+ position: relative;
+ }
+}
+</style>
diff --git a/src/pages/example/index/api.ts b/src/pages/example/index/api.ts
new file mode 100644
index 0000000..05fb010
--- /dev/null
+++ b/src/pages/example/index/api.ts
@@ -0,0 +1,20 @@
+import request from '@/scripts/httpRequest'
+import qs from 'qs'
+
+// Post
+export const tologin = (query: any) => {
+ return request({
+ url: '/data/api-u/sys/login',
+ method: 'post',
+ data: qs.stringify(query)
+ })
+}
+
+// get
+export const testDBCompare = (query: any) => {
+ return request({
+ url: '../../data/api-v/face/testEachCompareAll',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/pages/example/index/main.ts b/src/pages/example/index/main.ts
new file mode 100644
index 0000000..72eb673
--- /dev/null
+++ b/src/pages/example/index/main.ts
@@ -0,0 +1,13 @@
+import Vue from 'vue';
+import App from './App.vue'
+
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+import "@/assets/css/element-variables.scss";
+
+Vue.use(ElementUI);
+
+new Vue({
+ el: '#app',
+ render: h => h(App)
+});
diff --git a/src/pages/library/components/personList.vue b/src/pages/library/components/personList.vue
index 1d615ba..b4e92ce 100644
--- a/src/pages/library/components/personList.vue
+++ b/src/pages/library/components/personList.vue
@@ -219,15 +219,27 @@
<el-button size="mini" type="primary" @click="postCameraData">鏌ヨ</el-button>
</div>
- <p class="member-info">
- <label class="">浜哄憳淇℃伅:</label>
+ <div class="member-info">
+ <label class>浜哄憳淇℃伅:</label>
<ul>
- <li><span>濮撳悕:</span><span>{{memberInfo.personName}}</span></li>
- <li><span>鎬у埆:</span><span>{{memberInfo.sex}}</span></li>
- <li><span>韬唤璇佸彿:</span><span>{{memberInfo.idCard}}</span></li>
- <li><span>鎰忓浘:</span><span>{{memberInfo.reserved}}</span></li>
+ <li>
+ <span>濮撳悕:</span>
+ <span>{{memberInfo.personName}}</span>
+ </li>
+ <li>
+ <span>鎬у埆:</span>
+ <span>{{memberInfo.sex}}</span>
+ </li>
+ <li>
+ <span>韬唤璇佸彿:</span>
+ <span>{{memberInfo.idCard}}</span>
+ </li>
+ <li>
+ <span>鎰忓浘:</span>
+ <span>{{memberInfo.reserved}}</span>
+ </li>
</ul>
- </p>
+ </div>
<el-table :data="cameraDetailData" border>
<el-table-column prop="faceImg" label="鎶撴媿瀹炴櫙" width="160" align="center">
diff --git a/src/pages/search/index/Searching.vue b/src/pages/search/index/Searching.vue
index cfbaa35..5e0457a 100644
--- a/src/pages/search/index/Searching.vue
+++ b/src/pages/search/index/Searching.vue
@@ -27,7 +27,6 @@
<el-select
v-model="tagValues"
multiple
- @change="searchingBtn"
:disabled="isDisabled"
collapse-tags
size="mini"
@@ -456,8 +455,8 @@
}
},
methods: {
- isShowUpload(){
- console.log('isShowUpload',this.VideoPhotoData.uploadDiaplay)
+ isShowUpload() {
+ console.log('isShowUpload', this.VideoPhotoData.uploadDiaplay)
this.getHeight();
console.log("upload鐨勫�兼槸锛�", this.VideoPhotoData.uploadDiaplay)
if (this.VideoPhotoData.uploadDiaplay) {
--
Gitblit v1.8.0