From 4ff29e301de38488db0ff04f0209c99e37cf30b4 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期二, 07 十二月 2021 18:56:34 +0800 Subject: [PATCH] 对比库管理 --- src/pages/library/components/carList.vue | 729 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 452 insertions(+), 277 deletions(-) diff --git a/src/pages/library/components/carList.vue b/src/pages/library/components/carList.vue index 3470973..245779d 100644 --- a/src/pages/library/components/carList.vue +++ b/src/pages/library/components/carList.vue @@ -1,6 +1,6 @@ <template> <div class="table-parent"> - <el-row class style="margin:20px"> + <el-row class style="margin: 20px"> <!-- <el-col :span="4" class="tl"> <b class="f14">{{this.baseObject.tableName}}</b> </el-col> @@ -11,21 +11,22 @@ <b class="f14">鏈夋晥鏃堕棿锛歿{this.baseObject.startTime}}--{{this.baseObject.endTime?this.baseObject.endTime:'姘镐箙鏈夋晥'}}</b> </el-col>--> <div class="tl"> - <span - class="f14" - style="color:#000000;" - >{{this.baseObject.tableName?this.baseObject.tableName + '/ ':''}}</span> - <span - class="f14" - style="color:#000000;" - >{{this.baseObject.bwType === '1'?'榛戝悕鍗�/ ':'鐧藉悕鍗�/ '}}</span> - <span - class="f14" - style="color:#000000;" - >鏈夋晥鏃堕棿锛歿{this.baseObject.startTime}}--{{this.baseObject.endTime?this.baseObject.endTime:'姘镐箙鏈夋晥'}}</span> + <span class="f14" style="color: #000000">{{ + this.baseObject.tableName ? this.baseObject.tableName + "/ " : "" + }}</span> + <span class="f14" style="color: #000000">{{ + this.baseObject.bwType === "1" + ? "榛戝悕鍗�/ " + : "鐧藉悕鍗�/ " + }}</span> + <span class="f14" style="color: #000000" + >鏈夋晥鏃堕棿锛歿{ this.baseObject.startTime }}--{{ + this.baseObject.endTime ? this.baseObject.endTime : "姘镐箙鏈夋晥" + }}</span + > </div> </el-row> - <el-row class style="margin:40px 0 40px 20px"> + <el-row class style="margin: 40px 0 40px 20px"> <el-col :span="6"> <el-input placeholder="濮撳悕/鎬у埆/韬唤璇佸彿/鎵嬫満鍙�" @@ -37,7 +38,9 @@ ></el-input> </el-col> <el-col :span="2"> - <el-button size="small" type="primary" @click="handleSearch">鎼滅储</el-button> + <el-button size="small" type="primary" @click="handleSearch" + >鎼滅储</el-button + > </el-col> <el-col :offset="8" :span="3"> <fTemplate authority="library:set"> @@ -47,12 +50,15 @@ type="danger" @click="deleteBatch" v-if="isShow('library:set')" - >鎵归噺鍒犻櫎</el-button> + >鎵归噺鍒犻櫎</el-button + > </fTemplate> </el-col> <el-col :span="2"> <div class="text-left"> - <el-button size="small" class="ml10" type="primary" @click="addCar">娣诲姞杞﹁締</el-button> + <el-button size="small" class="ml10" type="primary" @click="addCar" + >娣诲姞杞﹁締</el-button + > <el-drawer title="杞﹁締淇℃伅" :modal="false" @@ -73,7 +79,7 @@ :file-list="form.carUrls" :before-remove="handleRemoveCarPic" > - <i class="el-icon-plus" style="margin-top:25px"></i> + <i class="el-icon-plus" style="margin-top: 25px"></i> <div>涓婁紶杞﹁締鐓х墖</div> </el-upload> </div> @@ -87,7 +93,7 @@ :file-list="form.faceUrl" :on-remove="handleRemoveFacePic" > - <i class="el-icon-plus" style="margin-top:25px"></i> + <i class="el-icon-plus" style="margin-top: 25px"></i> <div>涓婁紶杞︿富鐓х墖</div> </el-upload> </div> @@ -96,14 +102,22 @@ ref="formForCar" :model="form" label-width="100px" - style="margin-top:20px;margin-bottom: 50px" + style="margin-top: 20px; margin-bottom: 50px" :rule="rules" > <el-form-item label="*杞︾墝鍙凤細"> - <el-input placeholder="璇疯緭鍏ヨ溅鐗屽彿" v-model="form.carNo" class="inputWidth"></el-input> + <el-input + placeholder="璇疯緭鍏ヨ溅鐗屽彿" + v-model="form.carNo" + class="inputWidth" + ></el-input> </el-form-item> <el-form-item label="杞﹁締绫诲瀷锛�"> - <el-select v-model="form.carType" placeholder="璇烽�夋嫨杞﹁締绫诲瀷" class="inputWidth"> + <el-select + v-model="form.carType" + placeholder="璇烽�夋嫨杞﹁締绫诲瀷" + class="inputWidth" + > <el-option v-for="item in VideoPhotoData.dictionary.CARTYPE" :key="item.value" @@ -113,7 +127,11 @@ </el-select> </el-form-item> <el-form-item label="杞﹁締鍝佺墝锛�"> - <el-select v-model="form.carBrand" placeholder="璇烽�夋嫨杞﹁締鍝佺墝" class="inputWidth"> + <el-select + v-model="form.carBrand" + placeholder="璇烽�夋嫨杞﹁締鍝佺墝" + class="inputWidth" + > <el-option v-for="item in VideoPhotoData.dictionary.BRAND" :key="item.value" @@ -123,7 +141,11 @@ </el-select> </el-form-item> <el-form-item label="杞﹁韩棰滆壊锛�"> - <el-select v-model="form.carColor" placeholder="璇烽�夋嫨杞﹁韩棰滆壊" class="inputWidth"> + <el-select + v-model="form.carColor" + placeholder="璇烽�夋嫨杞﹁韩棰滆壊" + class="inputWidth" + > <el-option v-for="item in VideoPhotoData.dictionary.nColor" :key="item.value" @@ -133,7 +155,10 @@ </el-select> </el-form-item> <el-form-item label="杞︿富濮撳悕锛�"> - <el-input v-model="form.personName" class="inputWidth"></el-input> + <el-input + v-model="form.personName" + class="inputWidth" + ></el-input> </el-form-item> <el-form-item label="杞︿富鎬у埆锛�"> <el-radio-group v-model="form.sex"> @@ -145,13 +170,24 @@ <el-input v-model="form.idCard" class="inputWidth"></el-input> </el-form-item> <el-form-item label="鎵嬫満鍙凤細"> - <el-input v-model="form.phoneNum" class="inputWidth"></el-input> + <el-input + v-model="form.phoneNum" + class="inputWidth" + ></el-input> </el-form-item> <el-form-item label="鍏朵粬锛�"> - <el-input v-model="form.reserved" class="inputWidth"></el-input> + <el-input + v-model="form.reserved" + class="inputWidth" + ></el-input> </el-form-item> - <el-form-item style="text-align:tight"> - <el-button type="primary" @click="submitCar" style="margin-left:120px">淇濆瓨</el-button> + <el-form-item style="text-align: tight"> + <el-button + type="primary" + @click="submitCar" + style="margin-left: 120px" + >淇濆瓨</el-button + > <el-button @click="resetForm">鍙栨秷</el-button> </el-form-item> </el-form> @@ -161,7 +197,9 @@ </el-col> <el-col :span="3"> <div class="text-left"> - <el-button size="small" class="ml10" type="primary" @click="addBatch">鎵归噺涓婁紶杞︾墝</el-button> + <el-button size="small" class="ml10" type="primary" @click="addBatch" + >鎵归噺涓婁紶杞︾墝</el-button + > <el-drawer title="涓婁紶杞︾墝" :modal="false" @@ -176,11 +214,18 @@ type="textarea" :rows="25" v-model="plates" - style="width:90%" + style="width: 90%" placeholder="璇疯緭鍏ヨ溅鐗屽彿" ></el-input> - <p>杞︾墝鍙蜂互閫楀彿鎴栧洖杞﹂敭闅斿紑锛屽崟娆℃渶澶氭敮鎸�100鏉′笂浼狅紝渚嬪锛氫含YAB123,浜現34Y87</p> - <el-button type="primary" @click="platesBatch" style="margin-left:210px">淇濆瓨</el-button> + <p> + 杞︾墝鍙蜂互閫楀彿鎴栧洖杞﹂敭闅斿紑锛屽崟娆℃渶澶氭敮鎸�100鏉′笂浼狅紝渚嬪锛氫含YAB123,浜現34Y87 + </p> + <el-button + type="primary" + @click="platesBatch" + style="margin-left: 210px" + >淇濆瓨</el-button + > <el-button @click="resetForm('ruleForm')">鍙栨秷</el-button> </div> </div> @@ -188,23 +233,29 @@ </div> </el-col> </el-row> - <div style="display:flex;" class="border-tabl ml20"> + <div style="display: flex" class="border-tabl ml20"> <el-table id="multipleTable" ref="multipleTable" :data="BaseManageData.personList" tooltip-effect="dark" - style="width: 100%;" + style="width: 100%" :fit="true" - :default-sort="{prop: 'createTime', order: 'descending'}" + :default-sort="{ prop: 'createTime', order: 'descending' }" @selection-change="handleSelectionChange" - :header-cell-style="{background:'#f8f8f8',color:'#222222'}" + :header-cell-style="{ background: '#f8f8f8', color: '#222222' }" > <el-table-column type="selection" width="30"></el-table-column> <el-table-column label="搴忓彿" width="70" sortable align="center"> - <template slot-scope="scope">{{scope.$index+1}}</template> + <template slot-scope="scope">{{ scope.$index + 1 }}</template> </el-table-column> - <el-table-column prop="carNo" label="杞︾墝鍙�" sortable align="center" width="120"></el-table-column> + <el-table-column + prop="carNo" + label="杞︾墝鍙�" + sortable + align="center" + width="120" + ></el-table-column> <el-table-column prop="carType" label="杞﹁締绫诲瀷" @@ -213,7 +264,13 @@ sortable align="center" ></el-table-column> - <el-table-column prop="carBrand" label="杞﹁締鍝佺墝" min-width="100" sortable align="center"></el-table-column> + <el-table-column + prop="carBrand" + label="杞﹁締鍝佺墝" + min-width="100" + sortable + align="center" + ></el-table-column> <el-table-column prop="carColor" label="杞﹁韩棰滆壊" @@ -222,9 +279,9 @@ sortable align="center" > - <template - slot-scope="scope" - >{{getDataName(VideoPhotoData.dictionary.nColor,scope.row.carColor)}}</template> + <template slot-scope="scope">{{ + getDataName(VideoPhotoData.dictionary.nColor, scope.row.carColor) + }}</template> </el-table-column> <el-table-column prop="personName" @@ -234,7 +291,12 @@ sortable align="center" ></el-table-column> - <el-table-column prop="sex" label="杞︿富鎬у埆" align="center" width="80"></el-table-column> + <el-table-column + prop="sex" + label="杞︿富鎬у埆" + align="center" + width="80" + ></el-table-column> <el-table-column prop="carUrls" label="杞﹁締鐓х墖" @@ -246,13 +308,20 @@ > <template slot-scope="scope"> <el-carousel - style="height:100px;" + style="height: 100px" :autoplay="false" indicator-position="none" :arrow="scope.row.carUrls.length > 1 ? 'always' : 'never'" > - <el-carousel-item v-for="(item, index) in scope.row.carUrls" :key="index"> - <img style="width:100px;height:100px;object-fit:contain;" :src="item.url" alt /> + <el-carousel-item + v-for="(item, index) in scope.row.carUrls" + :key="index" + > + <img + style="width: 100px; height: 100px; object-fit: contain" + :src="item.url" + alt + /> </el-carousel-item> </el-carousel> </template> @@ -280,19 +349,34 @@ <el-table-column label="鎿嶄綔" min-width="200" align="center"> <template slot-scope="scope"> <fTemplate authority="library:set"> - <el-tooltip content="缂栬緫" placement="top" popper-class="atooltip"> + <el-tooltip + content="缂栬緫" + placement="top" + popper-class="atooltip" + > <span class="iconfont iconbianji iconStyle1" - style="font-size:15px;" + style="font-size: 15px" @click="handleClick(scope.row)" ></span> </el-tooltip> </fTemplate> - <el-tooltip content="鏌ユ壘姝や汉" placement="top" popper-class="atooltip"> - <span class="iconfont iconsousuoren iconStyle1" @click="tosearch(scope.row)"></span> + <el-tooltip + content="鏌ユ壘姝や汉" + placement="top" + popper-class="atooltip" + > + <span + class="iconfont iconsousuoren iconStyle1" + @click="tosearch(scope.row)" + ></span> </el-tooltip> <fTemplate authority="library:set"> - <el-tooltip content="澶嶅埗" placement="top" popper-class="atooltip"> + <el-tooltip + content="澶嶅埗" + placement="top" + popper-class="atooltip" + > <span class="iconfont iconfuzhi iconStyle1" title="澶嶅埗" @@ -301,20 +385,28 @@ </el-tooltip> </fTemplate> <fTemplate authority="library:set"> - <el-tooltip content="绉诲姩" placement="top" popper-class="atooltip"> + <el-tooltip + content="绉诲姩" + placement="top" + popper-class="atooltip" + > <span class="iconfont iconyidongzhi iconStyle1" - style="font-size:15px;" + style="font-size: 15px" title="绉诲姩" @click="moveClick(scope.row)" ></span> </el-tooltip> </fTemplate> <fTemplate authority="library:set"> - <el-tooltip content="鍒犻櫎" placement="top" popper-class="atooltip"> + <el-tooltip + content="鍒犻櫎" + placement="top" + popper-class="atooltip" + > <span class="iconfont iconshanchu iconStyle1" - style="color:#E74C3C;" + style="color: #e74c3c" @click="deleteThis(scope.row.id)" title="鍒犻櫎" ></span> @@ -324,12 +416,12 @@ </el-table-column> </el-table> </div> - <div class="pt5 pb20" style="height:40px;position:relative"> + <div class="pt5 pb20" style="height: 40px; position: relative"> <el-pagination @current-change="refrash" :current-page="BaseManageData.page" :page-size="BaseManageData.size" - style="position:absolute;right:10px;bottom:5px" + style="position: absolute; right: 10px; bottom: 5px" :total="BaseManageData.total" ></el-pagination> </div> @@ -342,19 +434,41 @@ > <div> <div class="tl"> - <span>涓婁紶鎴愬姛鐨勬暟閲忥細{{uploadResult.successList.length}}</span> + <span>涓婁紶鎴愬姛鐨勬暟閲忥細{{ uploadResult.successList.length }}</span> </div> <div class="flex-box mt10"> - <span>涓婁紶澶辫触鐨勬暟閲忥細{{uploadResult.failList.length}}</span> - <div class="ml20" v-for="(i,index) in uploadResult.failList" :key="index">{{i}}</div> + <span>涓婁紶澶辫触鐨勬暟閲忥細{{ uploadResult.failList.length }}</span> + <div + class="ml20" + v-for="(i, index) in uploadResult.failList" + :key="index" + > + {{ i }} + </div> </div> <div class="flex-box mt10"> - <span>鍖呭惈澶氬紶浜鸿劯鐨勫浘鐗囨暟閲忥細{{uploadResult.multiFaceList.length}}</span> - <div class="ml20" v-for="(i,index) in uploadResult.multiFaceList" :key="index">{{i}}</div> + <span + >鍖呭惈澶氬紶浜鸿劯鐨勫浘鐗囨暟閲忥細{{ + uploadResult.multiFaceList.length + }}</span + > + <div + class="ml20" + v-for="(i, index) in uploadResult.multiFaceList" + :key="index" + > + {{ i }} + </div> </div> <div class="flex-box mt10"> - <span>涓嶅惈浜鸿劯鐨勫浘鐗囨暟閲忥細{{uploadResult.noFaceList.length}}</span> - <div class="ml20" v-for="(i,index) in uploadResult.noFaceList" :key="index">{{i}}</div> + <span>涓嶅惈浜鸿劯鐨勫浘鐗囨暟閲忥細{{ uploadResult.noFaceList.length }}</span> + <div + class="ml20" + v-for="(i, index) in uploadResult.noFaceList" + :key="index" + > + {{ i }} + </div> </div> </div> </el-dialog> @@ -374,13 +488,21 @@ <p>榛戝悕鍗� ></p> </div> <div class="baseList"> - <el-checkbox-group v-model="BaseManageData.selectBlacks" @change="blackAngWhite"> - <div class="base" v-for="(item, index) in BaseManageData.blackList" :key="index"> + <el-checkbox-group + v-model="BaseManageData.selectBlacks" + @change="blackAngWhite" + > + <div + class="base" + v-for="(item, index) in BaseManageData.blackList" + :key="index" + > <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled" - >{{item.title}}</el-checkbox> + >{{ item.title }}</el-checkbox + > </div> </el-checkbox-group> </div> @@ -390,13 +512,21 @@ <p>鐧藉悕鍗� ></p> </div> <div class="baseList"> - <el-checkbox-group v-model="BaseManageData.selectWhites" @change="blackAngWhite"> - <div class="base" v-for="(item, index) in BaseManageData.whiteList" :key="index"> + <el-checkbox-group + v-model="BaseManageData.selectWhites" + @change="blackAngWhite" + > + <div + class="base" + v-for="(item, index) in BaseManageData.whiteList" + :key="index" + > <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled" - >{{item.title}}</el-checkbox> + >{{ item.title }}</el-checkbox + > </div> </el-checkbox-group> </div> @@ -404,7 +534,9 @@ </div> <div slot="footer" class="dialog-footer"> <el-button size="small" @click="copyClose" type="info">鍙� 娑�</el-button> - <el-button size="small" type="primary" @click="copySubmit()">纭� 瀹�</el-button> + <el-button size="small" type="primary" @click="copySubmit()" + >纭� 瀹�</el-button + > </div> </el-dialog> @@ -428,12 +560,17 @@ @change="blackAngWhite" :max="1" > - <div class="base" v-for="(item, index) in BaseManageData.blackList" :key="index"> + <div + class="base" + v-for="(item, index) in BaseManageData.blackList" + :key="index" + > <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled" - >{{item.title}}</el-checkbox> + >{{ item.title }}</el-checkbox + > </div> </el-checkbox-group> </div> @@ -448,12 +585,17 @@ @change="blackAngWhite" :max="1" > - <div class="base" v-for="(item, index) in BaseManageData.whiteList" :key="index"> + <div + class="base" + v-for="(item, index) in BaseManageData.whiteList" + :key="index" + > <el-checkbox :label="item.value" :title="item.title" :disabled="item.disabled" - >{{item.title}}</el-checkbox> + >{{ item.title }}</el-checkbox + > </div> </el-checkbox-group> </div> @@ -461,28 +603,35 @@ </div> <div slot="footer" class="dialog-footer"> <el-button size="small" @click="moveClose" type="info">鍙� 娑�</el-button> - <el-button size="small" type="primary" @click="moveSubmit()">纭� 瀹�</el-button> + <el-button size="small" type="primary" @click="moveSubmit()" + >纭� 瀹�</el-button + > </div> </el-dialog> </div> </template> <script> -import { addBaseCar, updateBaseCar, deleteBasePersons, plateBatch } from "@/api/baseLibrary"; +import { + addBaseCar, + updateBaseCar, + deleteBasePersons, + plateBatch, +} from "@/api/baseLibrary"; import axios from "axios"; // import { findByType } from '@/server/video.js' import Upload from "./upload"; import fTemplate from "@/components/fTemplate"; -import request from "@/scripts/httpRequest" +import request from "@/scripts/httpRequest"; export default { components: { // httpImg, - fTemplate + fTemplate, }, props: { baseObject: { - default: () => { }, - type: Object - } + default: () => {}, + type: Object, + }, }, data() { return { @@ -490,10 +639,23 @@ addDrawer: false, plates: "", addBatchDrawer: false, - direction: 'rtl', - dialogImageUrl: '', - fileList: [{ name: "fasjido.jpg", url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg" }, { name: "fasjido.jpg", url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg" }], - provinces: [{ name: '浜�', value: 1 }, { name: '娲�', value: 2 }, { name: '鍐�', value: 3 }], + direction: "rtl", + dialogImageUrl: "", + fileList: [ + { + name: "fasjido.jpg", + url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg", + }, + { + name: "fasjido.jpg", + url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg", + }, + ], + provinces: [ + { name: "浜�", value: 1 }, + { name: "娲�", value: 2 }, + { name: "鍐�", value: 3 }, + ], copyVisiabled: false, moveVisiabled: false, buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [], @@ -526,16 +688,16 @@ carBrand: "0", carNo: "", enable: 0, - reserved: "" + reserved: "", }, rules: { picDesc: [ - { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "change" } + { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "change" }, ], sex: [{ required: true, message: "璇峰嬀閫夋�у埆", trigger: "change" }], monitorLevel: [ - { required: true, message: "璇烽�夋嫨浜哄憳绛夌骇", trigger: "change" } - ] + { required: true, message: "璇烽�夋嫨浜哄憳绛夌骇", trigger: "change" }, + ], }, tableData: [], tableHeight: window.innerHeight - 320, @@ -546,89 +708,88 @@ // 涓婁紶鍚庣殑寮规鏄剧ず dialogVisible: false, // 鎵归噺涓婁紶鍚庣殑杩斿洖缁撴灉 - uploadResult: { failList: [], successList: [], multiFaceList: [], noFaceList: [] } + uploadResult: { + failList: [], + successList: [], + multiFaceList: [], + noFaceList: [], + }, }; }, computed: { isAdmin() { if ( - sessionStorage.getItem('userInfo') && - sessionStorage.getItem('userInfo') !== '' + sessionStorage.getItem("userInfo") && + sessionStorage.getItem("userInfo") !== "" ) { - let loginName = JSON.parse(sessionStorage.getItem('userInfo')).username - return ( - loginName === 'superadmin' || loginName === 'basic' - ) + let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; + return loginName === "superadmin" || loginName === "basic"; } return false; - } + }, }, methods: { handleRemoveCarPic(file, fileList) { console.log("鍒犻櫎鏂囦欢", file, fileList); - var index = fileList.findIndex(item => { + var index = fileList.findIndex((item) => { if (item.uid == file.uid) { - return true + return true; } - }) - console.log("鍒犻櫎鐨勭储寮�", index) - this.form.carUrls.splice(index, 1) - console.log("鍒犻櫎鍚庣殑fileList:", this.fileList) + }); + console.log("鍒犻櫎鐨勭储寮�", index); + this.form.carUrls.splice(index, 1); + console.log("鍒犻櫎鍚庣殑fileList:", this.fileList); }, handleRemoveFacePic(file, fileList) { - this.form.faceUrl.splice(0, 1) - console.log("鍒犻櫎鍚庣殑faceUrl:", this.fileList) + this.form.faceUrl.splice(0, 1); + console.log("鍒犻櫎鍚庣殑faceUrl:", this.fileList); }, - beforeUoload() { - - }, + beforeUoload() {}, handlePictureCardPreview(file) { this.dialogImageUrl = file.url; this.dialogVisible = true; }, async uploadCar(param) { - const fd = new FormData() - console.log("鏂囦欢鍙傛暟锛�", param) - fd.append('file', param.file) - fd.append('picType', '0') - console.log("鍙傛暟锛�", fd) + const fd = new FormData(); + console.log("鏂囦欢鍙傛暟锛�", param); + fd.append("file", param.file); + fd.append("picType", "0"); + console.log("鍙傛暟锛�", fd); let res = await request({ - method: 'post', + method: "post", url: `/data/api-v/dbperson/fileupload`, - data: fd - }) - console.log("鍥剧墖涓婁紶缁撴灉锛�", res.success) + data: fd, + }); + console.log("鍥剧墖涓婁紶缁撴灉锛�", res.success); if (res.success) { - this.form.carUrls.push({ url: "/httpImage/" + res.data.picUrl }) - console.log("carUrl:", this.form.carUrls) + this.form.carUrls.push({ url: "/httpImage/" + res.data.picUrl }); + console.log("carUrl:", this.form.carUrls); } }, async uploadPerson(param) { - const fd = new FormData() - fd.append('file', param.file) - fd.append('picType', '1') + const fd = new FormData(); + fd.append("file", param.file); + fd.append("picType", "1"); let res = await request({ - method: 'post', + method: "post", url: `/data/api-v/dbperson/fileupload`, - data: fd - }) + data: fd, + }); if (res.success) { - this.form.faceUrl.push({ url: "/httpImage/" + res.data.picUrl }) - this.form.faceFeature = res.data.faceFeature - console.log("faceUrl:", this.form.faceUrl) + this.form.faceUrl.push({ url: "/httpImage/" + res.data.picUrl }); + this.form.faceFeature = res.data.faceFeature; + console.log("faceUrl:", this.form.faceUrl); } }, addCar() { - this.addDrawer = true + this.addDrawer = true; }, addBatch() { - this.addBatchDrawer = true + this.addBatchDrawer = true; }, - resetForm() { - - }, + resetForm() {}, handleClose1(done) { - this.form = { + (this.form = { id: "", sex: "鐢�", name: "", @@ -647,9 +808,9 @@ carBrand: "0", carNo: "", enable: 0, - reserved: "" - }, - done() + reserved: "", + }), + done(); // this.$confirm('纭鍏抽棴锛�') // .then(_ => { // done(); @@ -657,7 +818,7 @@ // .catch(_ => {}); }, handleClose2(done) { - done() + done(); // this.$confirm('纭鍏抽棴锛�') // .then(_ => { // done(); @@ -666,18 +827,16 @@ }, isShow(authority) { if (this.isAdmin) { - return true - } else if ( - this.buttonAuthority.indexOf(',' + authority + ',') > -1 - ) { - return true + return true; + } else if (this.buttonAuthority.indexOf("," + authority + ",") > -1) { + return true; } else { - return false + return false; } }, toggleSelection(rows) { if (rows) { - rows.forEach(row => { + rows.forEach((row) => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { @@ -691,34 +850,34 @@ this.$confirm("鎻愮ず锛氱‘瀹氬垹闄よ搴曞簱浜哄憳锛�", { center: true, cancelButtonClass: "comfirm-class-cancle", - confirmButtonClass: "comfirm-class-sure" + confirmButtonClass: "comfirm-class-sure", }) - .then(_ => { + .then((_) => { fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${id}`, { method: "GET", headers: { "Content-Type": "application/json", - Authorization: token - } + Authorization: token, + }, }) - .then(res => { + .then((res) => { return res.json(); }) - .then(data => { + .then((data) => { // console.log(data.data); if (data.success) { this.$notify({ type: "success", - message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒" + message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒", }); } this.getCarList(); }) - .catch(err => { + .catch((err) => { console.log(err); }); }) - .catch(_ => { }); + .catch((_) => {}); }, sayHello() { console.log("hello"); @@ -735,14 +894,14 @@ // console.log("搴曞簱id", this.baseObject.id); this.BaseManageData.tableId = this.baseObject.id; // this.BaseManageData.queryPersonList(); - this.setLoadSearch(this.BaseManageData.queryPersonList()) + this.setLoadSearch(this.BaseManageData.queryPersonList()); } }, changeDialog(data) { data.erFileList.map((item, index) => { this.$notify({ type: "error", - message: item.errorMsg.message + message: item.errorMsg.message, }); }); }, @@ -761,31 +920,31 @@ handleClick(row) { this.form = row; // 杩欏潡鍎垮悗鍙扮殑瀛楀吀value鍊兼湁闂锛岄渶瑕佸墠绔潵鍥炶浆 - this.form.carColor += "" - this.form.carType += "" - this.form.carBrand += "" - console.log("this.form", this.form) + this.form.carColor += ""; + this.form.carType += ""; + this.form.carBrand += ""; + console.log("this.form", this.form); this.addDrawer = true; }, async submit() { - this.$refs["formForEdit"].validate(async valid => { + this.$refs["formForEdit"].validate(async (valid) => { // console.log("閫氳繃楠岃瘉", valid); if (valid) { let { ...json } = this.form; - delete (json["compareScore"]) + delete json["compareScore"]; // console.log("淇敼鐨勫弬鏁帮細", json); let res = await updateBasePerson(json); // console.log("淇濆瓨浜�", res); if (res.success) { this.$notify({ type: "success", - message: "浜哄憳淇敼鎴愬姛锛�" + message: "浜哄憳淇敼鎴愬姛锛�", }); this.dialogFormVisible = false; } else { this.$notify({ type: "error", - message: "浜哄憳淇敼澶辫触锛岃閲嶈瘯锛侊紒" + message: "浜哄憳淇敼澶辫触锛岃閲嶈瘯锛侊紒", }); } } else { @@ -798,7 +957,7 @@ title: "Confirm", content: "Bla bla ...", okText: "纭", - cancelText: "鍙栨秷" + cancelText: "鍙栨秷", }); }, async enable(item) { @@ -812,17 +971,17 @@ phoneNum: item.phoneNum, monitorLevel: item.monitorLevel, personPicUrl: item.personPicUrl, - reserved: item.reserved + reserved: item.reserved, }); if (res.success === true) { this.$notify({ type: "success", - message: "搴曞簱浜哄憳鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒" + message: "搴曞簱浜哄憳鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒", }); } else { this.$notify({ type: "error", - message: "搴曞簱浜哄憳鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒" + message: "搴曞簱浜哄憳鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒", }); } }, @@ -834,9 +993,9 @@ }, haveScore(row) { if (row.compareScore && row.compareScore !== "") { - return true + return true; } else { - return false + return false; } }, async searchImgList(faceUrl, threshold) { @@ -848,7 +1007,7 @@ faceUrl: faceUrl, threshold: threshold, orderType: this.orderType, - orderName: this.orderName + orderName: this.orderName, }; let res = await getPersonByPhoto(json); // console.log("鍒楄〃鏌ヨ", json); @@ -856,7 +1015,7 @@ this.total = res.data.total; this.compare = true; }, - updateThreshold() { }, + updateThreshold() {}, async updateFace(param) { const fd = new FormData(); fd.append("file", param.file); @@ -866,9 +1025,11 @@ method: "post", url: `/data/api-v/dbperson/updateFace`, headers: { - 'Authorization': sessionStorage.getItem('loginedInfo') && JSON.parse(sessionStorage.getItem('loginedInfo')).access_token + Authorization: + sessionStorage.getItem("loginedInfo") && + JSON.parse(sessionStorage.getItem("loginedInfo")).access_token, }, - data: fd + data: fd, }); if (res.data.success) { this.form.personPicUrl = res.data.data.personPicUrl; @@ -886,14 +1047,14 @@ if (this.selectedRowKeys.length === 0) { this.$notify({ type: "warning", - message: "璇烽�夋嫨瑕佸垹闄ょ殑浜哄憳" + message: "璇烽�夋嫨瑕佸垹闄ょ殑浜哄憳", }); } else { this.$confirm("鎻愮ず锛氱‘瀹氬垹闄よ搴曞簱閫変腑浜哄憳锛�", { center: true, cancelButtonClass: "comfirm-class-cancle", - confirmButtonClass: "comfirm-class-sure" - }).then(async _ => { + confirmButtonClass: "comfirm-class-sure", + }).then(async (_) => { let ids = []; this.selectedRowKeys.map((item, index) => { ids.push(item.id); @@ -904,13 +1065,13 @@ if (res.success) { this.$notify({ type: "success", - message: "鍒犻櫎鎴愬姛锛�" + message: "鍒犻櫎鎴愬姛锛�", }); this.getCarList(); } else { this.$notify({ type: "error", - message: "鍒犻櫎澶辫触锛�" + message: "鍒犻櫎澶辫触锛�", }); } }); @@ -942,25 +1103,25 @@ if (this.BaseManageData.selectBlacks.length > 0) { for (let i = 0; i < this.BaseManageData.whiteList.length; i++) { //this.VideoPhotoData.whiteList[i].disabled = true - this.$set(this.BaseManageData.whiteList[i], 'disabled', true) + this.$set(this.BaseManageData.whiteList[i], "disabled", true); } } if (this.BaseManageData.selectBlacks.length == 0) { for (let i = 0; i < this.BaseManageData.whiteList.length; i++) { //this.VideoPhotoData.whiteList[i].disabled = false - this.$set(this.BaseManageData.whiteList[i], 'disabled', false) + this.$set(this.BaseManageData.whiteList[i], "disabled", false); } } if (this.BaseManageData.selectWhites.length > 0) { for (let i = 0; i < this.BaseManageData.blackList.length; i++) { - // this.VideoPhotoData.blackList[i].disabled = true - this.$set(this.BaseManageData.blackList[i], 'disabled', true) + // this.VideoPhotoData.blackList[i].disabled = true + this.$set(this.BaseManageData.blackList[i], "disabled", true); } } if (this.BaseManageData.selectWhites.length == 0) { for (let i = 0; i < this.BaseManageData.blackList.length; i++) { - //this.VideoPhotoData.blackList[i].disabled = false - this.$set(this.BaseManageData.blackList[i], 'disabled', false) + //this.VideoPhotoData.blackList[i].disabled = false + this.$set(this.BaseManageData.blackList[i], "disabled", false); } } }, @@ -970,81 +1131,88 @@ var pathname = window.document.location.pathname; var pos = curWwwPath.indexOf(pathname); var localhostPath = curWwwPath.substring(0, pos); //ip+port - var href = localhostPath + "/Layout/Searching" - let captureId = item.id == "" ? item.personId : item.id - var url = item.personPicUrl ? item.personPicUrl : item.personPicUrl + var href = localhostPath + "/Layout/Searching"; + let captureId = item.id == "" ? item.personId : item.id; + var url = item.personPicUrl ? item.personPicUrl : item.personPicUrl; // console.log("璺宠浆鍦板潃",href,"url",url) - var compType = 0 - window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType) + var compType = 0; + window.open( + href + + "?showType=findByPic&targetId=" + + captureId + + "&picSmUrl=" + + url + + "&compType=" + + compType + ); }, async platesBatch() { var temp = this.plates.split(/[\n,]/g); var reg = /[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块]{1}[A-Z]{1}[A-Z0-9]{5,6}/; for (let i = 0; i < temp.length; i++) { - if (temp[i] == '') { - temp.splice(i, 1) - i-- + if (temp[i] == "") { + temp.splice(i, 1); + i--; } else { if (!reg.test(temp[i])) { this.$notify({ type: "error", - message: "杞︾墝鍙�:" + temp[i] + "涓嶇鍚堣鍒欙紝璇锋鏌�!" - }) - return + message: "杞︾墝鍙�:" + temp[i] + "涓嶇鍚堣鍒欙紝璇锋鏌�!", + }); + return; } } } if (temp.length == 0) { this.$notify({ - type: 'error', - message: '璇疯緭鍏ヨ溅鐗屽彿', - }) - return + type: "error", + message: "璇疯緭鍏ヨ溅鐗屽彿", + }); + return; } let param = { tableId: this.baseObject.id, - carNos: temp - } - let resp = await plateBatch(param) - console.log("resp:", resp) + carNos: temp, + }; + let resp = await plateBatch(param); + console.log("resp:", resp); if (resp && resp.success) { // 鍒锋柊car鍒楄〃 this.$notify({ type: "success", - message: resp.msg + message: resp.msg, }); this.getCarList(); this.addBatchDrawer = false; } else { this.$notify({ type: "error", - message: resp.msg + message: resp.msg, }); } - }, async submitCar() { - this.$refs["formForCar"].validate(async valid => { + this.$refs["formForCar"].validate(async (valid) => { // console.log("閫氳繃楠岃瘉", valid); if (valid) { let { ...json } = this.form; for (let index in json.carUrls) { if (index == 0) { - json.carPicUrls += json.carUrls[index].url.substring(11) + json.carPicUrls += json.carUrls[index].url.substring(11); } else { - json.carPicUrls += ";" + json.carUrls[index].url.substring(11) + json.carPicUrls += ";" + json.carUrls[index].url.substring(11); } } - json.carColor = parseInt(json.carColor) - json.carType = parseInt(json.carType) - json.carBrand = parseInt(json.carBrand) - json.personPicUrl = json.faceUrl[0].url.substring(11) - json.tableId = this.baseObject.id - console.log("琛ㄥ崟鐨刯son鍖栵細", json) - delete (json["compareScore"]) + json.carColor = parseInt(json.carColor); + json.carType = parseInt(json.carType); + json.carBrand = parseInt(json.carBrand); + json.personPicUrl = json.faceUrl[0].url.substring(11); + json.tableId = this.baseObject.id; + console.log("琛ㄥ崟鐨刯son鍖栵細", json); + delete json["compareScore"]; // console.log("淇敼鐨勫弬鏁帮細", json); - let res + let res; if (json.id == "") { res = await addBaseCar(json); } else { @@ -1054,14 +1222,14 @@ if (res.success) { this.$notify({ type: "success", - message: res.data.msg + message: res.data.msg, }); this.getCarList(); this.addDrawer = false; } else { this.$notify({ type: "error", - message: res.data.msg + message: res.data.msg, }); } } else { @@ -1070,103 +1238,109 @@ }); }, copyClick(row) { - this.BaseManageData.personId = row.id - this.copyVisiabled = true + this.BaseManageData.personId = row.id; + this.copyVisiabled = true; }, moveClick(row) { - this.BaseManageData.personId = row.id - this.moveVisiabled = true + this.BaseManageData.personId = row.id; + this.moveVisiabled = true; }, copyClose() { - this.copyVisiabled = false - this.BaseManageData.personId = "" - this.BaseManageData.selectBlacks = [] - this.BaseManageData.selectWhites = [] + this.copyVisiabled = false; + this.BaseManageData.personId = ""; + this.BaseManageData.selectBlacks = []; + this.BaseManageData.selectWhites = []; }, moveClose() { - this.moveVisiabled = false - this.BaseManageData.personId = "" - this.BaseManageData.selectBlacks = [] - this.BaseManageData.selectWhites = [] + this.moveVisiabled = false; + this.BaseManageData.personId = ""; + this.BaseManageData.selectBlacks = []; + this.BaseManageData.selectWhites = []; }, copySubmit() { - if (this.BaseManageData.selectBlacks.length === 0 && this.BaseManageData.selectWhites.length === 0) { + if ( + this.BaseManageData.selectBlacks.length === 0 && + this.BaseManageData.selectWhites.length === 0 + ) { this.$notify({ title: "娉ㄦ剰", message: "璇烽�夋嫨瑕佸鍒跺埌鐨勫簱", - type: "warning" - }) - return + type: "warning", + }); + return; } - var resp = this.BaseManageData.copyTo() - resp.then(data => { + var resp = this.BaseManageData.copyTo(); + resp.then((data) => { if (data.success) { this.$notify({ title: "鎴愬姛", message: data.data, - type: "success" - }) + type: "success", + }); } else { this.$notify({ title: "澶辫触", message: data.data, - type: "error" - }) + type: "error", + }); } - }) - this.copyVisiabled = false - this.BaseManageData.personId = "" - this.BaseManageData.selectBlacks = [] - this.BaseManageData.selectWhites = [] + }); + this.copyVisiabled = false; + this.BaseManageData.personId = ""; + this.BaseManageData.selectBlacks = []; + this.BaseManageData.selectWhites = []; }, getDataName: (dataList, key) => { - let name = "" + let name = ""; if (Array.isArray(dataList) && dataList.length > 0) { for (let i = 0; i < dataList.length; i++) { if (dataList[i].value == key) { - name = dataList[i].name + name = dataList[i].name; } } } - return name + return name; }, moveSubmit() { - if (this.BaseManageData.selectBlacks.length === 0 && this.BaseManageData.selectWhites.length === 0) { + if ( + this.BaseManageData.selectBlacks.length === 0 && + this.BaseManageData.selectWhites.length === 0 + ) { this.$notify({ title: "娉ㄦ剰", message: "璇烽�夋嫨瑕佺Щ鍔ㄥ埌鐨勫簱", - type: "warning" - }) - return + type: "warning", + }); + return; } - var resp = this.BaseManageData.moveTo() - resp.then(data => { + var resp = this.BaseManageData.moveTo(); + resp.then((data) => { if (data.success) { this.$notify({ title: "鎴愬姛", message: data.data, - type: "success" - }) + type: "success", + }); } else { this.$notify({ title: "澶辫触", message: data.data, - type: "error" - }) + type: "error", + }); } - this.moveVisiabled = false - this.BaseManageData.personId = "" - this.BaseManageData.selectBlacks = [] - this.BaseManageData.selectWhites = [] - this.BaseManageData.queryPersonList() - }) + this.moveVisiabled = false; + this.BaseManageData.personId = ""; + this.BaseManageData.selectBlacks = []; + this.BaseManageData.selectWhites = []; + this.BaseManageData.queryPersonList(); + }); }, setLoadSearch(fn) { this.AuthData.setLoading("multipleTable", this); - fn.then(_ => { + fn.then((_) => { this.AuthData.closeLoad(); - }) - } + }); + }, }, mounted() { this.getCarList(); @@ -1199,15 +1373,15 @@ this.BaseManageData.cleanData(); this.getCarList(); }, - deep: true + deep: true, }, "BaseManageData.selectBlacks": function (value) { - this.blackAngWhite() + this.blackAngWhite(); }, "BaseManageData.selectWhites": function (value) { - this.blackAngWhite() + this.blackAngWhite(); }, - } + }, }; </script> <style lang="scss"> @@ -1257,7 +1431,7 @@ } .table-parent { // position: relative; - height: 90%; + height: 100%; overflow: visible !important; .picture { .el-carousel__item { @@ -1312,7 +1486,8 @@ .border-tabl { border: 1px solid #ebeef5; border-bottom: none; - // border-bottom: none; + height: calc(100% - 100px); + overflow: auto; } .el-dialog__header { padding: 20px 0 10px; -- Gitblit v1.8.0