zhangzengfei
2020-09-08 81b39a2f9b00ab6be4b2075a28ef5f1f8e497da8
取消摄像机树的锁定按钮, 修复检索便签选择请求两次的bug
3个文件已添加
4个文件已修改
396 ■■■■■ 已修改文件
src/components/LeftNav.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/index/App.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/example/index/App.vue 318 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/example/index/api.ts 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/example/index/main.ts 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/library/components/personList.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/Searching.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
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;
src/pages/example/index/App.vue
New file
@@ -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>&nbsp;</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>
src/pages/example/index/api.ts
New file
@@ -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
  })
}
src/pages/example/index/main.ts
New file
@@ -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)
});
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">
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) {