From 4ff29e301de38488db0ff04f0209c99e37cf30b4 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 07 十二月 2021 18:56:34 +0800
Subject: [PATCH] 对比库管理
---
src/components/searching/UploadIcon.vue | 35
src/components/searching/uploadForModel.vue | 195 ++-
src/pages/desktop/index/components/ToolsEntry.vue | 3
src/pages/library/components/upload.vue | 318 +++--
src/pages/library/components/baseList.vue | 538 ++++++---
src/pages/library/components/addBase.vue | 2
src/pages/ai/index/App.vue | 6
src/pages/ai/index/detail.vue | 3
src/pages/index/App.vue | 1
src/pages/library/components/carList.vue | 729 ++++++++-----
src/pages/library/index/App.vue | 282 ++--
src/pages/library/components/personList.vue | 1168 ++++++++++++++++-----
src/pages/settings/views/generalSettings.vue | 11
13 files changed, 2,159 insertions(+), 1,132 deletions(-)
diff --git a/src/components/searching/UploadIcon.vue b/src/components/searching/UploadIcon.vue
index 837ac72..6cfae58 100644
--- a/src/components/searching/UploadIcon.vue
+++ b/src/components/searching/UploadIcon.vue
@@ -1,44 +1,45 @@
<template>
<div class="uploadIconBox">
- <i class="el-input__icon el-icon-camera-solid" @click="showUpload"></i>
+ <i class="iconfont iconyitusousuo-09" @click="showUpload"></i>
+ <!-- <i class="el-input__icon el-icon-camera-solid" @click="showUpload"></i> -->
<SearchLeft v-show="visibile" @closeUpload="showUpload"></SearchLeft>
</div>
</template>
<script>
-import SearchLeft from './uploadForModel'
+import SearchLeft from "./uploadForModel";
export default {
components: {
- SearchLeft
+ SearchLeft,
},
data() {
return {
- visibile: false
- }
+ visibile: false,
+ };
},
methods: {
showUpload() {
- this.visibile = !this.visibile
- }
- }
-}
+ this.visibile = !this.visibile;
+ },
+ },
+};
</script>
<style lang="scss">
.uploadIconBox {
position: relative;
i {
- font-size: 20px;
- color: #999;
+ font-size: 24px;
+ color: rgb(209, 209, 209);
cursor: pointer;
}
.left-section1 {
- //border: 1px solid #ccc;
- border-radius: 5px;
+ border-radius: 8px;
position: absolute;
z-index: 2;
- height: 700px;
- left: -330px;
- top: 45px;
- box-shadow: #eee 0px 0px 10px 10px;
+ height: fit-content;
+ left: -270px;
+ top: 40px;
+ padding: 20px;
+ box-shadow: 0px 0px 10px rgb(0 0 0 / 12%);
}
}
</style>
\ No newline at end of file
diff --git a/src/components/searching/uploadForModel.vue b/src/components/searching/uploadForModel.vue
index 85365f2..9b481d3 100644
--- a/src/components/searching/uploadForModel.vue
+++ b/src/components/searching/uploadForModel.vue
@@ -1,15 +1,22 @@
<template>
<div class="left-section1">
<div class="source">
- <h2 class="title">鏁版嵁婧�</h2>
- <div class="icon">
- <i class="iconfont iconchushaixuanxiang" @click="closeUpload()"></i>
- </div>
+ <!-- <h2 class="title">鏁版嵁婧�</h2> -->
+ <!-- <div class="icon">
+ <i class="iconfont iconchushaixuanxiang" @click="closeUpload"></i>
+ </div> -->
</div>
<p class="compearValue">
<span
- style="font-family: PingFangSC-Regular;font-size: 13px;color: #333333;letter-spacing: 0.28px;margin-right:10px"
- >瀵规瘮闃堝��</span>
+ style="
+ letter-spacing: 0.4px;
+ margin-right: 10px;
+ font-size: 14px;
+ line-height: 20px;
+ color: #999999;
+ "
+ >瀵规瘮闃堝��</span
+ >
<el-input-number
size="mini"
v-model="picQuality"
@@ -17,6 +24,10 @@
:min="1"
:max="100"
></el-input-number>
+
+ <i class="iconfont iconchushaixuanxiang" style=" font-size: 16px;
+ color: #d1d1d1;
+ cursor: pointer;float:right;" @click="closeUpload"></i>
</p>
<div class="upload-img-box">
<el-upload
@@ -31,68 +42,105 @@
:on-error="uploadError"
:before-upload="beforeUpload"
>
- <i
+ <!-- <i
ref="uploadIcon"
class="el-icon-upload"
- style="color:#3D68E1;font-size:60px;position:relative;left:50px"
+ style="
+ color: #3d68e1;
+ font-size: 60px;
+ position: relative;
+ left: 50px;
+ "
+ ></i> -->
+ <i class="iconfont iconshangchuantupian-11"
+ ref="uploadIcon"
+ style="
+ color: rgb(187,210,249);
+ font-size: 70px;
+ position: relative;
+ left: 50px; top: -10px;
+ "
></i>
<span
class="el-upload__text"
- style="font-size:12px;color:#3D68E1;position:relative;top:25px;left:-30px"
+ style="
+ font-size: 12px;
+ color: #999999;
+ position: relative;
+ top: 20px;
+ left: -30px;
+ "
>
<em>鐐瑰嚮閫夋嫨涓婁紶鍥剧墖</em>
</span>
</el-upload>
</div>
- <div class="res-img-box" v-if="resReady" :style="oneLine? 'height:95px':'height:185px'">
- <div class="single-box fl" v-for="(item, index) in realSmallPath" :key="index">
+ <div
+ class="res-img-box"
+ v-if="resReady"
+ :style="oneLine ? 'height:95px' : 'height:185px'"
+ >
+ <div
+ class="single-box fl"
+ v-for="(item, index) in realSmallPath"
+ :key="index"
+ >
<img
- :src="item
- ? '/httpImage/'+item
- : tempImg
- "
- @click="selected($event,index)"
- style="max-height:100%"
- :style="index == clickNum ? 'border:1px solid #FF7733':''"
+ :src="item ? '/httpImage/' + item : tempImg"
+ @click="selected($event, index)"
+ style="max-height: 100%"
+ :style="index == clickNum ? 'border:1px solid #FF7733' : ''"
/>
- <img class="select" v-show="index == clickNum" :src="selectedIcon" alt />
+ <img
+ class="select"
+ v-show="index == clickNum"
+ :src="selectedIcon"
+ alt
+ />
</div>
- <div class="single-box fl" v-for="(item, index) in unrealSmallPath" :key="index+'t'">
- <img :src="item
- ? item
- : tempImg
- " />
+ <div
+ class="single-box fl"
+ v-for="(item, index) in unrealSmallPath"
+ :key="index + 't'"
+ >
+ <img :src="item ? item : tempImg" />
</div>
</div>
- <el-button-group v-if="resReady" style="margin-top:10px">
+ <el-button-group v-if="resReady" style="margin-top: 10px">
<el-button type="info" size="small" @click="reUpload">閲嶆柊涓婁紶</el-button>
- <el-button type="primary" size="small" style="margin-left:10px" @click="searchStart">寮�濮嬫绱�</el-button>
+ <el-button
+ type="primary"
+ size="small"
+ style="margin-left: 10px"
+ @click="searchStart"
+ >寮�濮嬫绱�</el-button
+ >
</el-button-group>
</div>
</template>
<script>
-import request from "@/scripts/httpRequest"
-import searchPhotoFromBase from "@/api/baseLibrary"
+import request from "@/scripts/httpRequest";
+import searchPhotoFromBase from "@/api/baseLibrary";
export default {
watch: {
"VideoPhotoData.tabsForUploadImg": function (value) {
- this.selectChange()
+ this.selectChange();
},
"VideoPhotoData.uploadImg": {
handler(val) {
// console.log('val:::', val)
if (val !== "") {
- this.tempUploadImg = val
- this.realSmallPath = [val]
- this.unrealSmallPath = [this.tempImg, this.tempImg]
- this.resReady = true
- this.displayUpload = false
+ this.tempUploadImg = val;
+ this.realSmallPath = [val];
+ this.unrealSmallPath = [this.tempImg, this.tempImg];
+ this.resReady = true;
+ this.displayUpload = false;
}
},
immediate: true,
- deep: true
- }
+ deep: true,
+ },
},
computed: {
getResImg() {
@@ -111,7 +159,7 @@
arr.length = 9;
}
return arr;
- }
+ },
},
data() {
return {
@@ -130,11 +178,11 @@
realSmallPath: [],
unrealSmallPath: [],
oneLine: true,
- multiSelect: false
+ multiSelect: false,
};
},
mounted() {
- this.selectChange()
+ this.selectChange();
},
methods: {
selectChange() {
@@ -144,7 +192,7 @@
this.VideoPhotoData.tabsForUploadImg[i].disabled = true;
}
}
- this.$emit('labelDisabled', true)
+ this.$emit("labelDisabled", true);
return;
}
if (this.compareTabs.includes("esData")) {
@@ -153,7 +201,7 @@
this.VideoPhotoData.tabsForUploadImg[i].disabled = true;
}
}
- this.$emit('labelDisabled', false)
+ this.$emit("labelDisabled", false);
} else {
for (let i = 0; i < this.VideoPhotoData.tabsForUploadImg.length; i++) {
this.VideoPhotoData.tabsForUploadImg[i].disabled = false;
@@ -161,65 +209,66 @@
}
},
selected(e, index) {
- console.log(index, '閫変腑浜嗙鍑犱釜', e)
- this.clickNum = index
+ console.log(index, "閫変腑浜嗙鍑犱釜", e);
+ this.clickNum = index;
},
async uploadImg(param) {
- const fd = new FormData()
- fd.append('file', param.file)
- fd.append('picQuality', this.picQuality)
- console.log("1121231", fd)
+ const fd = new FormData();
+ fd.append("file", param.file);
+ fd.append("picQuality", this.picQuality);
+ console.log("1121231", fd);
let res = await request({
- method: 'post',
+ method: "post",
url: `/data/api-v/dbperson/faceExtract`,
- data: fd
- })
- this.unrealSmallPath.length = 0
- console.log("鍒囧浘杩斿洖锛�", res)
+ data: fd,
+ });
+ this.unrealSmallPath.length = 0;
+ console.log("鍒囧浘杩斿洖锛�", res);
if (res.success) {
- document.querySelector(".el-upload-list").querySelector("img").src = "/httpImage/" + res.data.uploadImage
- this.realSmallPath = res.data.smImage
+ document.querySelector(".el-upload-list").querySelector("img").src =
+ "/httpImage/" + res.data.uploadImage;
+ this.realSmallPath = res.data.smImage;
if (res.data.smImage.length > 3) {
- this.oneLine = false
+ this.oneLine = false;
} else {
- this.oneLine = true
+ this.oneLine = true;
}
if (res.data.smImage.length % 3 !== 0) {
// 鐢ㄨ櫄鎷熶汉鍍忚ˉ鍏ㄦ暣琛�
- const length = res.data.smImage.length % 3
- console.log("鐪嬬湅length鐨勫��", length)
- this.unrealSmallPath.length = 0
+ const length = res.data.smImage.length % 3;
+ console.log("鐪嬬湅length鐨勫��", length);
+ this.unrealSmallPath.length = 0;
for (var i = 0; i < 3 - length; i++) {
- this.unrealSmallPath.push(this.tempImg)
+ this.unrealSmallPath.push(this.tempImg);
}
}
- console.log('--------------锛�', param)
+ console.log("--------------锛�", param);
}
},
uploadSuccess(resp, file, fileList) {
this.$notify({
title: "鎴愬姛",
message: "鍥剧墖涓婁紶鎴愬姛锛�",
- type: "success"
+ type: "success",
});
this.resReady = true;
- console.log("鏂囦欢鍒楄〃锛�", file, fileList)
- console.log("涓婁紶鐨勬枃浠讹細", this.bigPhoto)
+ console.log("鏂囦欢鍒楄〃锛�", file, fileList);
+ console.log("涓婁紶鐨勬枃浠讹細", this.bigPhoto);
},
closeUpload() {
- this.$emit("closeUpload")
+ this.$emit("closeUpload");
},
beforeUpload() {
this.$refs.uploadIcon.parentNode.classList.add("s-display");
- console.log("涓婁紶涔嬪墠鏂囦欢锛�", this.bigPhoto)
+ console.log("涓婁紶涔嬪墠鏂囦欢锛�", this.bigPhoto);
},
uploadError(err) {
this.$notify({
title: "澶辫触",
message: "鍥剧墖涓婁紶澶辫触锛�" + err,
- type: "warning"
+ type: "warning",
});
- console.log("涓婁紶澶辫触", err)
+ console.log("涓婁紶澶辫触", err);
this.dialogImageUrl = "";
this.dialogVisible = false;
this.$refs.uploadIcon.parentNode.classList.remove("s-display");
@@ -229,7 +278,7 @@
this.$refs.uploadIcon.parentNode.classList.remove("s-display");
},
reUpload() {
- this.displayUpload = true
+ this.displayUpload = true;
this.$refs.upload.clearFiles();
this.dialogImageUrl = "";
this.dialogVisible = false;
@@ -238,10 +287,10 @@
},
searchStart() {
this.BaseManageData.threshold = this.picQuality;
- this.BaseManageData.picUrl = this.realSmallPath[this.clickNum]
- this.BaseManageData.searchPhotoFromBase()
+ this.BaseManageData.picUrl = this.realSmallPath[this.clickNum];
+ this.BaseManageData.searchPhotoFromBase();
},
- }
+ },
};
</script>
<style lang="scss">
@@ -287,7 +336,7 @@
}
.compearValue {
text-align: left;
- padding: 15px 0px;
+ padding-bottom: 20px;
.el-input-number__decrease {
.el-icon-arrow-down {
font-size: 12px;
diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 6552cac..704b524 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -504,8 +504,8 @@
installedApps: [],
storeApps: [],
installFile: {},
- appUpgreading: true,
- sdkUpgreading: true,
+ appUpgreading: false,
+ sdkUpgreading: false,
autoRefresh: true,
productDetailVisible: false,
isUpgrading: false,
@@ -1054,7 +1054,7 @@
let _this = this;
setTimeout(() => {
_this.autoRefreshAppAndSdkState();
- }, 500);
+ }, 1000);
},
},
};
diff --git a/src/pages/ai/index/detail.vue b/src/pages/ai/index/detail.vue
index 7107391..ae5b132 100644
--- a/src/pages/ai/index/detail.vue
+++ b/src/pages/ai/index/detail.vue
@@ -275,7 +275,6 @@
isSDKDetail: true,
actType: "",
actId: "",
- input3: "",
select: "",
activedSdkOrApp: {
activateCode: "",
@@ -559,6 +558,7 @@
message: "鍗歌浇搴旂敤鎴愬姛",
type: "success",
});
+ this.goback()
}
})
.catch((e) => {
@@ -770,6 +770,7 @@
// _this.getAllSdk();
this.$emit("flushSdk")
window.parent.postMessage({ msg: "AppUpdate" }, "*");
+ this.goback()
}
})
.catch((e) => {
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index e9d95a5..dda3333 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -284,6 +284,9 @@
width: 1180px;
padding: 0 60px;
margin: 0 auto;
+ .el-carousel__indicator--horizontal {
+ padding: 0px 4px;
+ }
.app-list {
.app {
width: 16.6%;
diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index 2a3a431..40f7ac2 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -180,6 +180,7 @@
async getLoginUserData() {
let res = await getLoginUserData()
if (res.success) {
+ debugger
sessionStorage.setItem('userInfo', JSON.stringify(res.data))
this.$notify.success("鐧诲綍鎴愬姛锛�")
// 鑾峰彇鏉冮檺
diff --git a/src/pages/library/components/addBase.vue b/src/pages/library/components/addBase.vue
index 0cff106..dae89ce 100644
--- a/src/pages/library/components/addBase.vue
+++ b/src/pages/library/components/addBase.vue
@@ -277,8 +277,6 @@
// id涓虹┖锛屾柊澧炲簳搴�
this.$refs[formName].validate(async (valid) => {
if (valid) {
- // const { ...json } = this.form
- // console.log('鏂板鍙傛暟', json)
addBase({
tableName: this.form.tableName,
startTime: this.$moment(this.form.startTime).format('YYYY-MM-DD 00:00:00'),
diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue
index 61fc233..e2e91b9 100644
--- a/src/pages/library/components/baseList.vue
+++ b/src/pages/library/components/baseList.vue
@@ -1,138 +1,247 @@
<template>
- <div :style="listWidth?`width:${listWidth};`:''" class="out-div el-menu-vertical-demo">
+ <div
+ :style="listWidth ? `width:${listWidth};` : ''"
+ class="out-div el-menu-vertical-demo"
+ >
<el-collapse v-model="activeNames">
<el-collapse-item name="1" class="el-collapse-item__wrap">
<template slot="title">
<span
- :class="title==='鍚屾搴�'?'iconfont iconshuaxintongbu':'iconfont iconwenjianjia'"
- style="font-size:18px;"
+ :class="
+ title === '鍚屾搴�'
+ ? 'iconfont icontongbuku_v'
+ : 'iconfont iconbendiku_v'
+ "
+ style="font-size: 32px"
></span>
- <span class="m5">{{title}}</span>
- <i
- class="el-icon-circle-plus-outline ml10"
- style="font-size:20px;color:#3D68E1;"
- @click.stop="add('sync')"
- v-if="isShow('library:set')"
- ></i>
+ <span class="m5">{{ title }}</span>
<span
- class="m5"
- style="font-size:14px;color:#3D68E1;"
+ class="iconfont icontianjiaku-09"
+ style="
+ font-size: 22px;
+ color: #666666;
+ position: absolute;
+ right: 10px;
+ "
@click.stop="add('sync')"
v-if="isShow('library:set')"
- >鏂板</span>
+ ></span>
+ <!-- <i
+ class="el-icon-circle-plus-outline ml10"
+ style="font-size: 20px; color: #3d68e1"
+
+ ></i> -->
+ <!-- <span
+ class="m5"
+ style="font-size: 14px; color: #3d68e1"
+ @click.stop="add('sync')"
+ v-if="isShow('library:set')"
+ >鏂板</span
+ > -->
</template>
<div class="max-height">
<el-row
- class="p10 cursor-pointer"
- v-for="(item, index) in data"
+ class="p5 cursor-pointer"
+ v-for="(item, index) in syncTableList"
:key="item.id"
- @click.native="clickCategory(index, 'sync' ,item)"
- :class="{activeRow:categoryIndex=='sync' + index}"
+ @click.native="clickCategory(index, 'sync', item)"
+ :class="{ activeRow: categoryIndex == 'sync' + index }"
>
- <el-col :span="12" :class="item.bwType === '1'?'c-red':'c-green'">
+ <el-col
+ :span="12"
+ :class="item.bwType === '1' ? 'c-red' : 'c-green'"
+ >
<p
- style="text-align:left;margin-left:10px"
+ style="text-align: left; margin-left: 5px"
class="name-ellipsis"
:title="item.tableName"
- >{{item.tableName}}</p>
+ >
+ <span
+ class="iconfont iconrenyuanku-09"
+ v-if="item.tableType == 'person'"
+ ></span>
+ <span
+ class="iconfont iconcheliangku-09"
+ v-if="item.tableType == 'car'"
+ ></span>
+ <span style="font-size: 14px; font-weight: bold">
+ {{ item.tableName }}</span
+ >
+ </p>
</el-col>
<el-col :span="10" :offset="1">
- <el-switch
+ <!-- <el-switch
:active-value="1"
:inactive-value="0"
v-model="item.enable"
size="small"
- style="margin-top:-7px"
+ style="margin-top: -7px"
:disabled="isDisabled(item)"
- @change="enable(item)"
+ @change="setEnable(item)"
>
- <!-- :disabled="isDisa(item)" -->
- </el-switch>
- <el-tooltip content="缂栬緫" placement="top" popper-class="atooltip">
+
+ </el-switch> -->
+ <!-- <div class="status-dot"></div> -->
+ <div
+ class="status-dot"
+ :style="item.enable == 1 ? { background: '#4E94FF' } : {}"
+ ></div>
+ <!-- <el-tooltip
+ content="缂栬緫"
+ placement="top"
+ popper-class="atooltip"
+ >
<span
class="iconfont iconbianji iconStyle1"
- @click.stop="edit(item,'sync')"
+ @click.stop="edit(item, 'sync')"
v-if="isShow('library:set')"
></span>
- </el-tooltip>
- <el-tooltip content="鍒犻櫎" placement="top" popper-class="atooltip">
+ </el-tooltip> -->
+ <!-- <el-tooltip
+ content="鍒犻櫎"
+ placement="top"
+ popper-class="atooltip"
+ >
<span
class="iconfont iconshanchu iconStyle1"
- style="color:#E74C3C;"
+ style="color: #e74c3c"
v-if="isShow('library:set')"
@click.stop="deleteBase(item.id)"
></span>
- </el-tooltip>
+ </el-tooltip> -->
</el-col>
<el-col
:span="24"
- style="text-align:left;margin-left:10px; color:#888888"
- >{{item.startTime}}~{{item.endTime?item.endTime:'姘镐箙鏈夋晥'}}</el-col>
+ style="
+ text-align: left;
+ margin-left: 5px;
+ color: #888888;
+ font-size: 12px;
+ line-height: 17px;
+ "
+ >
+ <div class="time-start">{{ item.startTime }}~</div>
+ <div class="time-end">
+ {{ item.endTime ? item.endTime : "姘镐箙鏈夋晥" }}
+ </div>
+ </el-col>
</el-row>
</div>
</el-collapse-item>
<el-collapse-item name="2" class="el-collapse-item__wrap">
<template slot="title">
- <span class="iconfont iconwenjianjia" style="font-size:18px;"></span>
- <span class="m5">{{titleB}}</span>
- <i
- class="el-icon-circle-plus-outline ml10"
- style="font-size:20px;color:#3D68E1;"
- @click.stop="add('local')"
- v-if="isShow('library:set')"
- ></i>
+ <span class="iconfont iconbendiku_v" style="font-size: 32px"></span>
+ <span class="m5">{{ titleB }}</span>
<span
- class="m5"
- style="font-size:14px;color:#3D68E1;"
+ class="iconfont icontianjiaku-09"
+ style="
+ font-size: 22px;
+ color: #666666;
+ position: absolute;
+ right: 10px;
+ "
@click.stop="add('local')"
v-if="isShow('library:set')"
- >鏂板</span>
+ ></span>
+
+ <!-- <i
+ class="el-icon-circle-plus-outline ml10"
+ style="font-size: 20px; color: #3d68e1"
+
+ ></i> -->
+ <!-- <span
+ class="m5"
+ style="font-size: 14px; color: #3d68e1"
+ @click.stop="add('local')"
+ v-if="isShow('library:set')"
+ >鏂板</span
+ > -->
</template>
<div class="max-height">
<el-row
- class="p10 cursor-pointer"
- v-for="(item, index) in dataB"
+ class="p5 cursor-pointer"
+ v-for="(item, index) in localTableList"
:key="item.id"
- @click.native="clickCategory(index, 'local' ,item)"
- :class="{activeRow:categoryIndex=='local' + index}"
+ @click.native="clickCategory(index, 'local', item)"
+ :class="{ activeRow: categoryIndex == 'local' + index }"
>
- <el-col :span="12" :class="item.bwType === '1'?'c-red':'c-green'">
+ <el-col
+ :span="12"
+ :class="item.bwType === '1' ? 'c-red' : 'c-green'"
+ >
<p
- style="text-align:left;margin-left:10px"
+ style="text-align: left; margin-left: 5px"
class="name-ellipsis"
:title="item.tableName"
- >{{item.tableName}}</p>
+ >
+ <span
+ class="iconfont iconrenyuanku-09"
+ v-if="item.tableType == 'person'"
+ ></span>
+ <span
+ class="iconfont iconcheliangku-09"
+ v-if="item.tableType == 'car'"
+ ></span>
+ <span> {{ item.tableName }}</span>
+ </p>
</el-col>
<el-col :span="10" :offset="1">
- <el-switch
+ <!-- <el-switch
:active-value="1"
:inactive-value="0"
v-model="item.enable"
size="small"
- style="margin-top:-7px"
+ style="margin-top: -7px"
:disabled="isDisabled(item)"
- @change="enable(item)"
- ></el-switch>
- <el-tooltip content="缂栬緫" placement="top" popper-class="atooltip">
+ @change="setEnable(item)"
+ ></el-switch> -->
+ <div
+ class="status-dot"
+ :style="item.enable == 1 ? { background: '#4E94FF' } : {}"
+ ></div>
+
+ <!-- <el-tooltip
+ content="缂栬緫"
+ placement="top"
+ popper-class="atooltip"
+ >
<span
class="iconfont iconbianji iconStyle1"
- @click.stop="edit(item,'local')"
+ @click.stop="edit(item, 'local')"
v-if="isShow('library:set')"
></span>
- </el-tooltip>
- <el-tooltip content="鍒犻櫎" placement="top" popper-class="atooltip">
+ </el-tooltip> -->
+ <!-- <el-tooltip
+ content="鍒犻櫎"
+ placement="top"
+ popper-class="atooltip"
+ >
<span
class="iconfont iconshanchu iconStyle1"
- style="color:#E74C3C;"
+ style="color: #e74c3c"
v-if="isShow('library:set')"
@click.stop="deleteBase(item.id)"
></span>
- </el-tooltip>
+ </el-tooltip> -->
</el-col>
<el-col
:span="24"
- style="text-align:left;margin-left:10px; color:#888888"
- >{{item.startTime}}~{{item.endTime?item.endTime:'姘镐箙鏈夋晥'}}</el-col>
+ style="
+ text-align: left;
+ margin-left: 5px;
+ color: #888888;
+ font-size: 12px;
+ line-height: 17px;
+ "
+ >
+ <div class="time-start">{{ item.startTime }}~</div>
+ <div class="time-end">
+ {{ item.endTime ? item.endTime : "姘镐箙鏈夋晥" }}
+ </div>
+ <!-- {{ item.startTime }}~{{
+ item.endTime ? item.endTime : "姘镐箙鏈夋晥"
+ }} -->
+ </el-col>
</el-row>
</div>
</el-collapse-item>
@@ -140,223 +249,213 @@
</div>
</template>
<script>
-// const data = [{ name: '鍚告瘨搴�', id: '1', time: '2019-01-01 12:00:00 ~ 2019-01-04 12:00:00' },
-// { name: '鍦ㄩ�冨簱', id: '2', time: '2019-01-01 12:00:00 ~ 2019-01-04 12:00:00' }, { name: '鍚告瘨搴�', id: '3', time: '2019-01-01 12:00:00 ~ 2019-01-04 12:00:00' },
-// { name: '鍦ㄩ�冨簱', id: '4', time: '2019-01-01 12:00:00 ~ 2019-01-04 12:00:00' }]
-import { updateDbTableStatus } from '@/api/baseLibrary'
+import { updateDbTableStatus } from "@/api/baseLibrary";
export default {
- name: 'baseList',
+ name: "baseList",
data() {
return {
- buttonAuthority: sessionStorage.getItem('buttonAuthoritys') || [],
- activeNames: ['1', '2'],
- categoryIndex: '',
- data: [],
- dataB: [],
- clickBase: {} // 褰撳墠鐐瑰嚮鐨勫簳搴撳璞�
- }
+ buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
+ activeNames: ["1", "2"],
+ categoryIndex: "",
+ syncTableList: [],
+ localTableList: [],
+ clickBase: {}, // 褰撳墠鐐瑰嚮鐨勫簳搴撳璞�
+ };
},
computed: {
// eslint-disable-next-line vue/return-in-computed-property
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;
- }
+ },
},
mounted() {
- this.init()
+ this.init();
},
methods: {
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;
}
},
async init() {
- // console.log("鎵ц浜唅nit娌�")
- await this.BaseManageData.querySyncTables()
- this.data = this.BaseManageData.syncTables
- this.defaultShow()
- await this.BaseManageData.queryLocalTables()
- this.dataB = this.BaseManageData.localTables
- this.defaultShow()
+ await this.BaseManageData.querySyncTables();
+ this.syncTableList = this.BaseManageData.syncTables;
+ this.defaultShow();
+ await this.BaseManageData.queryLocalTables();
+ this.localTableList = this.BaseManageData.localTables;
+ this.defaultShow();
},
handleChange(val) {
- console.log(val)
+ console.log(val);
},
- async enable(item) {
+ async setEnable(item) {
let res = await updateDbTableStatus({
id: item.id,
- enable: item.enable
- })
+ enable: item.enable,
+ });
if (res.success === true) {
this.$notify({
- type: 'success',
- message: '搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒'
- })
+ type: "success",
+ message: "搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
+ });
} else {
this.$notify({
- type: 'error',
- message: '搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒'
- })
+ type: "error",
+ message: "搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
+ });
}
},
add(type) {
- this.$emit('changeShow', null, type)
+ this.$emit("changeShow", null, type);
},
isDisabled(item) {
- var flag = true
- if (this.isShow('library:set')) {
+ var flag = true;
+ if (this.isShow("library:set")) {
if (item.endTime == "") {
- flag = false
+ flag = false;
} else {
- flag = !this.$moment(new Date()).isBetween(item.startTime, item.endTime)
+ flag = !this.$moment(new Date()).isBetween(
+ item.startTime,
+ item.endTime
+ );
}
}
- return flag
+ return flag;
},
- clickCategory(index, type, item) { // 杩欓噷鎴戜滑浼犲叆涓�涓綋鍓嶅��
- this.categoryIndex = type + index
+ clickCategory(index, type, item) {
+ // 杩欓噷鎴戜滑浼犲叆涓�涓綋鍓嶅��
+ this.categoryIndex = type + index;
// 璋冪敤鍒囨崲鍙充晶闈㈡澘鐨勫嚱鏁板苟涓斿垏鎹㈢埗缁勪欢涓璱sSelected鐨勫�艰鍙︿竴涓粍浠舵竻闄よ閫変腑鐘舵��
// this.$emit('clearSelected')
- this.clickBase = item
- this.$emit('getList', item)
+ this.clickBase = item;
+ this.$emit("getList", item, type);
},
edit(item, type) {
- this.$emit('changeShow', item, type)
+ this.$emit("changeShow", item, type);
},
deleteBase(id) {
- let token = sessionStorage.getItem('loginedInfo') && JSON.parse(sessionStorage.getItem('loginedInfo')).access_token
- this.$confirm('鎻愮ず锛氱‘瀹氬垹闄ゅ簳搴擄紵', {
+ debugger;
+ let token =
+ sessionStorage.getItem("loginedInfo") &&
+ JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
+ this.$confirm("鎻愮ず锛氱‘瀹氬垹闄ゅ簳搴擄紵", {
center: true,
- cancelButtonClass: 'comfirm-class-cancle',
- confirmButtonClass: 'comfirm-class-sure'
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
}).then(() => {
fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${id}`, {
- method: 'GET',
+ method: "GET",
headers: {
- 'Content-Type': 'application/json',
- 'Authorization': token
- }
- }).then(res => {
- return res.json()
- }).then(data => {
- console.log(data.data)
- if (data.success) {
- this.$notify({
- type: 'success',
- message: '搴曞簱鍒犻櫎鎴愬姛锛�'
- })
- }
- this.init()
- }).catch(err => {
- this.$notify({
- type: 'error',
- message: err
- })
+ "Content-Type": "application/json",
+ Authorization: token,
+ },
})
- })
+ .then((res) => {
+ return res.json();
+ })
+ .then((res) => {
+ if (res.success) {
+ this.$notify({
+ type: "success",
+ message: "搴曞簱鍒犻櫎鎴愬姛锛�",
+ });
+ }
+ this.init();
+ })
+ .catch((err) => {
+ this.$notify({
+ type: "error",
+ message: err,
+ });
+ });
+ });
},
// 榛樿鏄剧ず绗竴涓簱鐨勬暟鎹�
defaultShow() {
- // console.log(this.data.length,'defaultShow')
- if (this.data !== undefined && this.data.length > 0) {
- this.clickCategory(0, 'sync', this.data[0])
+ if (this.syncTableList && this.syncTableList.length) {
+ this.clickCategory(0, "sync", this.syncTableList[0]);
} else {
- if (this.dataB !== undefined && this.dataB.length > 0) {
- this.clickCategory(0, 'local', this.data[0])
+ if (this.localTableList && this.localTableList.length) {
+ this.clickCategory(0, "local", this.syncTableList[0]);
}
}
},
// 娣诲姞鏃堕棿姣旇緝鍑芥暟
dateParse(dateString) {
- var SEPARATOR_BAR = '-'
- var SEPARATOR_SLASH = '/'
- var SEPARATOR_DOT = '.'
- var dateArray
+ var SEPARATOR_BAR = "-";
+ var SEPARATOR_SLASH = "/";
+ var SEPARATOR_DOT = ".";
+ var dateArray;
if (dateString.indexOf(SEPARATOR_BAR) > -1) {
- dateArray = dateString.split(SEPARATOR_BAR)
+ dateArray = dateString.split(SEPARATOR_BAR);
} else if (dateString.indexOf(SEPARATOR_SLASH) > -1) {
- dateArray = dateString.split(SEPARATOR_SLASH)
+ dateArray = dateString.split(SEPARATOR_SLASH);
} else {
- dateArray = dateString.split(SEPARATOR_DOT)
+ dateArray = dateString.split(SEPARATOR_DOT);
}
- return new Date(dateArray[0], dateArray[1] - 1, dateArray[2])
+ return new Date(dateArray[0], dateArray[1] - 1, dateArray[2]);
},
isEmpty(str) {
if (!str || str === undefined || str === null) {
- return true
+ return true;
} else {
- return false
+ return false;
}
},
dateCompare(dateString, compareDateString) {
// dateString:褰撳墠鏃堕棿
// compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
if (this.isEmpty(dateString)) {
- // alert('dateString涓嶈兘涓虹┖')
- return
+ return;
}
if (this.isEmpty(compareDateString)) {
- // alert('compareDateString涓嶈兘涓虹┖')
- return 1
+ return 1;
}
- var dateTime = this.dateParse(dateString).getTime()
- var compareDateTime = this.dateParse(compareDateString).getTime()
+ var dateTime = this.dateParse(dateString).getTime();
+ var compareDateTime = this.dateParse(compareDateString).getTime();
if (compareDateTime > dateTime) {
- return 1
+ return 1;
} else if (compareDateTime === dateTime) {
- return 0
+ return 0;
} else {
- return -1
+ return -1;
}
},
- // 宸︿晶搴曞簱鐢熸晥寮�鍏虫槸鍚﹀惎鐢ㄥ垽鏂�
- // isDisa(data) {
- // if (!this.isShow('library:set')) {
- // return true
- // } else {
- // return false
- // }
- // }
},
props: {
listWidth: {
- default: '300px',
- type: String
+ default: "234px",
+ type: String,
},
title: {
- default: '鍚屾搴�',
- type: String
+ default: "鍚屾搴�",
+ type: String,
},
titleB: {
- default: '鏈湴搴�',
- type: String
+ default: "鏈湴搴�",
+ type: String,
},
isSelected: {
default: false,
- type: Boolean
+ type: Boolean,
},
type: {
- default: '',
- type: String
- }
- }
-}
+ default: "",
+ type: String,
+ },
+ },
+};
</script>
<style lang="scss">
.iconStyle1 {
@@ -364,14 +463,29 @@
margin-left: 15px;
cursor: pointer;
}
-.activeRow {
- background: rgb(245, 247, 250);
-}
+
.cursor-pointer {
cursor: pointer;
}
.max-height {
max-height: 350px;
+ .el-col-10 {
+ height: 28px;
+ display: flex;
+ align-items: center;
+ justify-content: right;
+ float: right;
+ margin-right: 10px;
+ }
+ .el-col-12 {
+ width: auto;
+ }
+ .status-dot {
+ background: #bbbbbb;
+ height: 8px;
+ width: 8px;
+ border-radius: 50%;
+ }
}
.c-red {
color: red;
@@ -382,9 +496,8 @@
font-size: 14px;
}
.out-div {
- overflow: hidden auto;
+ // overflow: hidden auto;
max-height: 100%;
- // max-height: 890px;
.el-collapse-item__wrap {
will-change: height;
background-color: #fff;
@@ -393,6 +506,32 @@
box-sizing: border-box;
border-bottom: 0px solid #ebeef5;
}
+ .el-collapse-item__arrow {
+ display: none;
+ }
+ .el-row {
+ border-radius: 9px; background: rgba(239, 241, 245, 0.35);
+
+ }
+ .time-start {
+ display: inline-block;
+ }
+ .time-end {
+ display: inline-block;
+ }
+ .activeRow {
+ background: #4e94ff;
+ color: #fff;
+ .time-start {
+ color: #e9e9e9;
+ }
+ .time-end {
+ color: #e9e9e9;
+ }
+ .status-dot {
+ background: #fff !important;
+ }
+ }
}
.name-ellipsis {
max-width: 160px;
@@ -400,11 +539,22 @@
text-overflow: ellipsis;
white-space: nowrap;
margin: 0 auto;
+ display: flex;
+ align-items: center;
+ .iconfont {
+ font-size: 24px;
+ margin-right: 5px;
+ line-height: 28px;
+ }
}
.m5 {
- margin: 5px;
+ margin-left: 10px;
+ font-weight: bold;
+ font-size: 16px;
+ color: #5f5f5f;
+ font-family: PingFang SC;
}
-.p10 {
- padding: 10px;
+.p5 {
+ padding: 6px;
}
</style>
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;
diff --git a/src/pages/library/components/personList.vue b/src/pages/library/components/personList.vue
index 8149120..d2569b1 100644
--- a/src/pages/library/components/personList.vue
+++ b/src/pages/library/components/personList.vue
@@ -1,13 +1,56 @@
<template>
<div class="table-parent">
- <el-row style="margin-top:20px">
+ <el-row>
<div class="base-tip">
- <span>{{this.baseObject.tableName?this.baseObject.tableName + '/ ':''}}</span>
- <span>{{this.baseObject.bwType === '1'?'榛戝悕鍗�/ ':'鐧藉悕鍗�/ '}}</span>
- <span>鏈夋晥鏃堕棿锛歿{this.baseObject.startTime}}--{{this.baseObject.endTime?this.baseObject.endTime:'姘镐箙鏈夋晥'}}</span>
+ <div class="left-tips">
+ <span class="ku-name">{{ this.baseObject.tableName }}</span>
+ <span
+ class="list"
+ :class="
+ this.baseObject.bwType === '1' ? 'black-list' : 'white-list'
+ "
+ >{{ this.baseObject.bwType === "1" ? "榛戝悕鍗�" : "鐧藉悕鍗�" }}</span
+ >
+ <span class="ok-time"
+ >鏈夋晥鏃堕棿锛歿{ this.baseObject.startTime }}--{{
+ this.baseObject.endTime ? this.baseObject.endTime : "姘镐箙鏈夋晥"
+ }}</span
+ >
+ </div>
+
+ <div class="right-btns">
+ <el-switch
+ :active-value="1"
+ :width="52"
+ :inactive-value="0"
+ v-model="baseObject.enable"
+ active-color="#4E94FF"
+ inactive-color="#BBBBBB"
+ style="margin-right: 25px"
+ :disabled="isDisabled(baseObject)"
+ @change="setEnable(baseObject)"
+ >
+ </el-switch>
+
+ <el-tooltip content="鍒犻櫎" placement="top" popper-class="atooltip">
+ <span
+ class="iconfont iconfont-wrap iconshanchuku-09"
+ v-if="isShow('library:set')"
+ @click.stop="deleteBase"
+ ></span>
+ </el-tooltip>
+
+ <el-tooltip content="缂栬緫" placement="top" popper-class="atooltip">
+ <span
+ class="iconfont iconfont-wrap iconbianjiku-09"
+ @click.stop="edit"
+ v-if="isShow('library:set')"
+ ></span>
+ </el-tooltip>
+ </div>
</div>
</el-row>
- <el-row class style="margin:40px 0 40px 0px">
+ <!-- <el-row class style="margin: 40px 0 40px 0px">
<el-col :span="6">
<el-input
placeholder="濮撳悕/鎬у埆/韬唤璇佸彿/鎵嬫満鍙�"
@@ -21,7 +64,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="11" :span="3">
<fTemplate authority="library:set">
@@ -31,12 +76,13 @@
type="danger"
@click="deleteBatch"
v-if="isShow('library:set')"
- >鎵归噺鍒犻櫎</el-button>
+ >鎵归噺鍒犻櫎</el-button
+ >
</fTemplate>
</el-col>
<el-col :span="2">
<div class="text-left">
- <upload
+ <UploadBtn
limitTypes=".jpg,.png,.jpeg"
limitSize
uploadBtntext="涓婁紶鐓х墖"
@@ -46,35 +92,106 @@
:isDrag="true"
@addFilesBaBackFN="changeDialog"
@successFN="getUploadResult"
- :idJson="{tableId:baseObject.id}"
+ :idJson="{ tableId: baseObject.id }"
/>
</div>
</el-col>
- </el-row>
- <div style="display:flex;" class="border-tabl ml20">
+ </el-row> -->
+ <div class="border-tabl">
+ <div class="head-search">
+ <div class="desc">
+ 鏈簱鍏辨湁
+ <span class="nums">{{ BaseManageData.total }}鏉�</span>
+ 鏁版嵁
+ </div>
+ <div class="right-group">
+ <el-input
+ placeholder="濮撳悕 / 鎬у埆 / 韬唤璇佸彿 / 鎵嬫満鍙�"
+ autocomplete="off"
+ width="100%"
+ size="small"
+ v-model="BaseManageData.contentValue"
+ @keyup.enter.native="handleSearch"
+ >
+ <upload-icon slot="suffix"></upload-icon>
+ </el-input>
+ <el-button size="small" type="primary" @click="handleSearch"
+ >鎼滅储</el-button
+ >
+ <el-tooltip
+ content="鎵归噺鍒犻櫎"
+ placement="top"
+ popper-class="atooltip"
+ >
+ <span
+ class="iconfont iconfont-wrap iconpiliangshanchu-09"
+ title="鍒犻櫎"
+ @click="deleteBatch"
+ v-if="isShow('library:set')"
+ ></span>
+ </el-tooltip>
+
+ <el-tooltip
+ content="涓婁紶鐓х墖"
+ placement="top"
+ popper-class="atooltip"
+ >
+ <UploadBtn
+ limitTypes=".jpg,.png,.jpeg"
+ limitSize
+ uploadBtntext="涓婁紶鐓х墖"
+ uploadBtnIcon
+ v-if="isShow('library:set')"
+ uploadBtnSize="small"
+ :isDrag="true"
+ @addFilesBaBackFN="changeDialog"
+ @successFN="getUploadResult"
+ :idJson="{ tableId: baseObject.id }"
+ />
+ </el-tooltip>
+ </div>
+ </div>
<el-table
id="multipleTable"
ref="multipleTable"
:data="BaseManageData.personList"
tooltip-effect="dark"
- style="width: 100%;"
+ style="width: 100%; overflow: auto"
: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="60" sortable align="center">
- <template slot-scope="scope">{{scope.$index+1}}</template>
- </el-table-column>
- <el-table-column prop="personPicUrl" label="鐓х墖" align="center" width="120">
+ <!-- <el-table-column label="搴忓彿" width="60" sortable align="center">
+ <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+ </el-table-column> -->
+ <el-table-column
+ prop="personPicUrl"
+ label="鐓х墖"
+ align="center"
+ width="120"
+ >
<template slot-scope="scope">
<img
- :src="'/httpImage/'+scope.row.personPicUrl"
- style="width:84px;height:84px;object-fit:contain;"
+ :src="'/httpImage/' + scope.row.personPicUrl"
+ style="width: 84px; height: 84px; object-fit: contain"
alt
/>
- <p class="text-center fb f16" v-show="haveScore(scope.row)">{{scope.row.compareScore}}%</p>
+ <p class="text-center fb f16" v-show="haveScore(scope.row)">
+ {{ scope.row.compareScore }}%
+ </p>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢熸晥鐘舵��" align="center" width="80">
+ <template slot-scope="scope">
+ <el-switch
+ v-model="scope.row.enable"
+ :active-value="1"
+ :disabled="!isShow('library:set')"
+ :inactive-value="0"
+ @change="enable(scope.row)"
+ ></el-switch>
</template>
</el-table-column>
<el-table-column
@@ -85,7 +202,13 @@
sortable
align="center"
></el-table-column>
- <el-table-column prop="sex" label="鎬у埆" width="70" sortable align="center"></el-table-column>
+ <el-table-column
+ prop="sex"
+ label="鎬у埆"
+ width="70"
+ sortable
+ align="center"
+ ></el-table-column>
<el-table-column
prop="idCard"
label="韬唤璇佸彿"
@@ -102,7 +225,12 @@
sortable
align="center"
></el-table-column>
- <el-table-column prop="monitorLevel" label="绛夌骇" align="center" width="80"></el-table-column>
+ <el-table-column
+ prop="monitorLevel"
+ label="绛夌骇"
+ align="center"
+ width="80"
+ ></el-table-column>
<el-table-column
prop="createTime"
label="鍏ュ簱鏃堕棿"
@@ -112,58 +240,78 @@
align="center"
></el-table-column>
<!-- <el-table-column prop="reserved" label="鍏朵粬" align="center"></el-table-column> -->
- <el-table-column label="鐢熸晥鐘舵��" align="center" width="80">
- <template slot-scope="scope">
- <el-switch
- v-model="scope.row.enable"
- :active-value="1"
- :disabled="!isShow('library:set')"
- :inactive-value="0"
- @change="enable(scope.row)"
- ></el-switch>
- </template>
- </el-table-column>
+
<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;"
+ class="iconfont iconfont-wrap iconbianji"
+ 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"
+ @click="tosearch(scope.row)"
+ ></span>
</el-tooltip>
- <el-tooltip content="鏌ョ湅璇︽儏" placement="top" popper-class="atooltip">
- <span class="iconfont iconsousuoren iconStyle1" @click="showDetail(scope.row)"></span>
+ <el-tooltip
+ content="鏌ョ湅璇︽儏"
+ placement="top"
+ popper-class="atooltip"
+ >
+ <span
+ class="iconfont iconsousuoren"
+ @click="showDetail(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"
+ class="iconfont iconfuzhi"
title="澶嶅埗"
@click="copyClick(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 iconyidongzhi iconStyle1"
- style="font-size:15px;"
+ class="iconfont iconyidongzhi"
+ 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;"
+ class="iconfont iconshanchuku-09"
+ style="color: #e74c3c"
@click="deleteThis(scope.row.id)"
title="鍒犻櫎"
></span>
@@ -172,20 +320,34 @@
</template>
</el-table-column>
</el-table>
- </div>
- <div class="pt5" style="height:40px;position:relative">
<el-pagination
@size-change="handleSizeChange"
@current-change="refrash"
:current-page="BaseManageData.page"
:page-size="BaseManageData.size"
- :page-sizes="[10,20,50,100]"
- style="position:absolute;right:10px;bottom:5px"
+ :page-sizes="[10, 20, 50, 100]"
+ style="margin-top: 10px"
layout="total,sizes,prev,pager,next,jumper"
:total="BaseManageData.total"
></el-pagination>
</div>
- <el-dialog title="鎶撴媿璇︽儏" :visible.sync="cameraDetailVisible" okText="纭畾">
+ <!-- <div class="pt5" style="height: 40px; position: relative">
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="refrash"
+ :current-page="BaseManageData.page"
+ :page-size="BaseManageData.size"
+ :page-sizes="[10, 20, 50, 100]"
+ style="position: absolute; right: 10px; bottom: 5px"
+ layout="total,sizes,prev,pager,next,jumper"
+ :total="BaseManageData.total"
+ ></el-pagination>
+ </div> -->
+ <el-dialog
+ title="鎶撴媿璇︽儏"
+ :visible.sync="cameraDetailVisible"
+ okText="纭畾"
+ >
<div class="top-bar">
<el-date-picker
size="mini"
@@ -197,11 +359,18 @@
start-placeholder="寮�濮嬫椂闂�"
end-placeholder="缁撴潫鏃堕棿"
></el-date-picker>
- <div style="margin:0 10px;display:flex;">
- <span style="width:68px;">鍋滅暀鏃堕暱:</span>
- <el-input size="mini" style="width: 80px;" v-model.number="reqCameraParams.thresholdTime"></el-input>s
+ <div style="margin: 0 10px; display: flex">
+ <span style="width: 68px">鍋滅暀鏃堕暱:</span>
+ <el-input
+ size="mini"
+ style="width: 80px"
+ v-model.number="reqCameraParams.thresholdTime"
+ ></el-input
+ >s
</div>
- <el-button size="mini" type="primary" @click="postCameraData">鏌ヨ</el-button>
+ <el-button size="mini" type="primary" @click="postCameraData"
+ >鏌ヨ</el-button
+ >
</div>
<div class="member-info">
@@ -209,46 +378,76 @@
<ul>
<li>
<span>濮撳悕:</span>
- <span>{{memberInfo.personName}}</span>
+ <span>{{ memberInfo.personName }}</span>
</li>
<li>
<span>鎬у埆:</span>
- <span>{{memberInfo.sex}}</span>
+ <span>{{ memberInfo.sex }}</span>
</li>
<li>
<span>韬唤璇佸彿:</span>
- <span>{{memberInfo.idCard}}</span>
+ <span>{{ memberInfo.idCard }}</span>
</li>
<li>
<span>鎰忓浘:</span>
- <span>{{memberInfo.reserved}}</span>
+ <span>{{ memberInfo.reserved }}</span>
</li>
</ul>
</div>
<el-table :data="cameraDetailData" border>
- <el-table-column prop="faceImg" label="鎶撴媿瀹炴櫙" width="160" align="center">
+ <el-table-column
+ prop="faceImg"
+ label="鎶撴媿瀹炴櫙"
+ width="160"
+ align="center"
+ >
<template slot-scope="scope">
<div>
<img
v-if="scope.row.faceImg"
- :src="`/httpImage/`+scope.row.faceImg"
- style="max-height:84px;width:84px;object-fit:contain;background:rgba(0,0,0,0.35);"
+ :src="`/httpImage/` + scope.row.faceImg"
+ style="
+ max-height: 84px;
+ width: 84px;
+ object-fit: contain;
+ background: rgba(0, 0, 0, 0.35);
+ "
class="avatar"
/>
</div>
</template>
</el-table-column>
- <el-table-column prop="cameraName" label="鎽勫儚鏈哄悕绉�" width="100" align="center"></el-table-column>
- <el-table-column prop="startTime" label="寮�濮嬫椂闂�" align="center"></el-table-column>
- <el-table-column prop="endTime" label="缁撴潫鏃堕棿" align="center"></el-table-column>
- <el-table-column prop="stayTime" label="鍋滅暀鏃堕暱" width="99" align="center">
+ <el-table-column
+ prop="cameraName"
+ label="鎽勫儚鏈哄悕绉�"
+ width="100"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="startTime"
+ label="寮�濮嬫椂闂�"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="endTime"
+ label="缁撴潫鏃堕棿"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="stayTime"
+ label="鍋滅暀鏃堕暱"
+ width="99"
+ align="center"
+ >
<template slot-scope="scope">
- <span>{{scope.row.stayTime}} 绉�</span>
+ <span>{{ scope.row.stayTime }} 绉�</span>
</template>
</el-table-column>
</el-table>
- <p style="text-align:right; font-size: 14px;">鍏眥{faceDataCount}}鏉℃暟鎹�</p>
+ <p style="text-align: right; font-size: 14px">
+ 鍏眥{ faceDataCount }}鏉℃暟鎹�
+ </p>
</el-dialog>
<el-dialog
title="淇敼淇℃伅"
@@ -258,7 +457,12 @@
:before-close="handleClose"
cancelText="鍙栨秷"
>
- <el-form ref="formForEdit" :model="form" label-width="120px" :rules="rules">
+ <el-form
+ ref="formForEdit"
+ :model="form"
+ label-width="120px"
+ :rules="rules"
+ >
<div class="flex-center mb10">
<el-upload
class="avatar-uploader"
@@ -270,38 +474,73 @@
:on-error="uploadError"
>
<div class="mask1">
- <div slot="trigger" class="flex-center" style="position:absolute;top:120px;">
+ <div
+ slot="trigger"
+ class="flex-center"
+ style="position: absolute; top: 120px"
+ >
<p
- style="background:rgba(0,0,0,0.35);width:150px;line-height:30px;color:#fff;font-size:13px;opacity:1;"
- >鐐瑰嚮淇敼鐓х墖</p>
+ style="
+ background: rgba(0, 0, 0, 0.35);
+ width: 150px;
+ line-height: 30px;
+ color: #fff;
+ font-size: 13px;
+ opacity: 1;
+ "
+ >
+ 鐐瑰嚮淇敼鐓х墖
+ </p>
</div>
</div>
<img
- v-if="`httpImage/`+form.personPicUrl"
- :src="`/httpImage/`+form.personPicUrl"
- style="max-height:150px;width:150px;object-fit:contain;background:rgba(0,0,0,0.35);"
+ v-if="`httpImage/` + form.personPicUrl"
+ :src="`/httpImage/` + form.personPicUrl"
+ style="
+ max-height: 150px;
+ width: 150px;
+ object-fit: contain;
+ background: rgba(0, 0, 0, 0.35);
+ "
class="avatar"
/>
</el-upload>
</div>
<el-row>
<el-col :span="20">
- <el-form-item label="ID" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.id" disabled placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item label="ID" style="width: 100%; margin-bottom: 10px">
+ <el-input
+ size="small"
+ v-model="form.id"
+ disabled
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="鐓х墖鏍囪瘑" prop="picDesc" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.picDesc" placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item
+ label="鐓х墖鏍囪瘑"
+ prop="picDesc"
+ style="width: 100%; margin-bottom: 10px"
+ >
+ <el-input
+ size="small"
+ v-model="form.picDesc"
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="濮撳悕" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.personName" placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item label="濮撳悕" style="width: 100%; margin-bottom: 10px">
+ <el-input
+ size="small"
+ v-model="form.personName"
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -310,7 +549,7 @@
<el-form-item
label="鎬у埆"
prop="sex"
- style="width:100%;margin-bottom: 8px; text-align: left"
+ style="width: 100%; margin-bottom: 8px; text-align: left"
>
<el-radio-group v-model="form.sex" class="mt10">
<el-radio label="鐢�"></el-radio>
@@ -321,26 +560,44 @@
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="韬唤璇佸彿" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.idCard" placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item
+ label="韬唤璇佸彿"
+ style="width: 100%; margin-bottom: 10px"
+ >
+ <el-input
+ size="small"
+ v-model="form.idCard"
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="鎵嬫満鍙�" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.phoneNum" placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item
+ label="鎵嬫満鍙�"
+ style="width: 100%; margin-bottom: 10px"
+ >
+ <el-input
+ size="small"
+ v-model="form.phoneNum"
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="浜哄憳绛夌骇" prop="monitorLevel" style="width:100%;margin-bottom: 10px;">
+ <el-form-item
+ label="浜哄憳绛夌骇"
+ prop="monitorLevel"
+ style="width: 100%; margin-bottom: 10px"
+ >
<el-select
size="small"
v-model="form.monitorLevel"
placeholder="璇烽�夋嫨"
- style="width:100%"
+ style="width: 100%"
>
<el-option
v-for="item in VideoPhotoData.dictionary.MONITORLEVEL"
@@ -354,47 +611,98 @@
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="鍏ュ簱浣嶇疆" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.fromServerId" disabled placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item
+ label="鍏ュ簱浣嶇疆"
+ style="width: 100%; margin-bottom: 10px"
+ >
+ <el-input
+ size="small"
+ v-model="form.fromServerId"
+ disabled
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="鍏ュ簱鏃堕棿" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.createTime" disabled placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item
+ label="鍏ュ簱鏃堕棿"
+ style="width: 100%; margin-bottom: 10px"
+ >
+ <el-input
+ size="small"
+ v-model="form.createTime"
+ disabled
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
- <el-form-item label="鍏朵粬" style="width:100%;margin-bottom: 10px;">
- <el-input size="small" v-model="form.reserved" placeholder="璇疯緭鍏�"></el-input>
+ <el-form-item label="鍏朵粬" style="width: 100%; margin-bottom: 10px">
+ <el-input
+ size="small"
+ v-model="form.reserved"
+ placeholder="璇疯緭鍏�"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button size="small" @click="handleClose" type="info">鍙� 娑�</el-button>
- <el-button size="small" type="primary" @click="submit()">纭� 瀹�</el-button>
+ <el-button size="small" @click="handleClose" type="info"
+ >鍙� 娑�</el-button
+ >
+ <el-button size="small" type="primary" @click="submit()"
+ >纭� 瀹�</el-button
+ >
</div>
</el-dialog>
- <el-dialog title="鎻愮ず" :visible.sync="dialogVisible" :close="getPersonList" width="30%">
+ <el-dialog
+ title="鎻愮ず"
+ :visible.sync="dialogVisible"
+ :close="getPersonList"
+ width="30%"
+ >
<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>
@@ -413,13 +721,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>
@@ -429,13 +745,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>
@@ -443,7 +767,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>
@@ -466,12 +792,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>
@@ -486,12 +817,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>
@@ -499,51 +835,68 @@
</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 { updateBasePerson, deleteBasePersons } from "@/api/baseLibrary";
+import {
+ updateBasePerson,
+ deleteBasePersons,
+ updateDbTableStatus,
+} from "@/api/baseLibrary";
import { getCameraFaceData } from "@/api/es";
import axios from "axios";
// import { findByType } from '@/server/video.js'
-import Upload from "./upload";
+import UploadBtn from "./upload";
import fTemplate from "@/components/fTemplate";
import UploadIcon from "@/components/searching/UploadIcon.vue";
Date.prototype.Format = function (fmt) {
var o = {
- "M+": this.getMonth() + 1, //鏈堜唤
- "d+": this.getDate(), //鏃�
- "H+": this.getHours(), //灏忔椂
- "m+": this.getMinutes(), //鍒�
- "s+": this.getSeconds(), //绉�
- "q+": Math.floor((this.getMonth() + 3) / 3), //瀛e害
- "S": this.getMilliseconds() //姣
+ "M+": this.getMonth() + 1, //鏈堜唤
+ "d+": this.getDate(), //鏃�
+ "H+": this.getHours(), //灏忔椂
+ "m+": this.getMinutes(), //鍒�
+ "s+": this.getSeconds(), //绉�
+ "q+": Math.floor((this.getMonth() + 3) / 3), //瀛e害
+ S: this.getMilliseconds(), //姣
};
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+ if (/(y+)/.test(fmt))
+ fmt = fmt.replace(
+ RegExp.$1,
+ (this.getFullYear() + "").substr(4 - RegExp.$1.length)
+ );
for (var k in o)
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+ if (new RegExp("(" + k + ")").test(fmt))
+ fmt = fmt.replace(
+ RegExp.$1,
+ RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
+ );
return fmt;
-}
+};
export default {
data() {
return {
- timeRange: [new Date(2020, 7, 25, 8), new Date(new Date().setHours(23, 59, 59))],
+ timeRange: [
+ new Date(2020, 7, 25, 8),
+ new Date(new Date().setHours(23, 59, 59)),
+ ],
memberInfo: {
- personName: '',
- sex: '',
- idCard: '',
- reserved: ''
+ personName: "",
+ sex: "",
+ idCard: "",
+ reserved: "",
},
reqCameraParams: {
startTime: new Date(2020, 7, 25, 8).Format("yyyy-MM-dd HH:mm:ss"),
endTime: new Date().Format("yyyy-MM-dd HH:mm:ss"),
thresholdTime: 10,
- faceId: []
+ faceId: [],
},
cameraDetailData: [],
cameraDetailVisible: false,
@@ -573,16 +926,16 @@
monitorLevel: "one",
faceUrl: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg",
enable: 0,
- reserved: ""
+ reserved: "",
},
rules: {
picDesc: [
- { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "submit" }
+ { required: true, message: "璇疯緭鍏ョ収鐗囨爣璇�", trigger: "submit" },
],
sex: [{ required: true, message: "璇峰嬀閫夋�у埆", trigger: "submit" }],
monitorLevel: [
- { required: true, message: "璇烽�夋嫨浜哄憳绛夌骇", trigger: "submit" }
- ]
+ { required: true, message: "璇烽�夋嫨浜哄憳绛夌骇", trigger: "submit" },
+ ],
},
tableData: [],
tableHeight: window.innerHeight - 320,
@@ -594,39 +947,41 @@
// 涓婁紶鍚庣殑寮规鏄剧ず
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: {
postCameraData() {
- getCameraFaceData(this.reqCameraParams).then(res => {
+ getCameraFaceData(this.reqCameraParams).then((res) => {
if (res && res.rtnCode == 1) {
- this.cameraDetailData = res.rtnData
- this.faceDataCount = res.rtnData.length
+ this.cameraDetailData = res.rtnData;
+ this.faceDataCount = res.rtnData.length;
}
- })
+ });
},
timeChange(val) {
this.reqCameraParams.startTime = val[0];
this.reqCameraParams.endTime = val[1];
-
},
showDetail(row) {
- this.cameraDetailData = []
+ this.cameraDetailData = [];
this.memberInfo.reserved = row.reserved;
this.memberInfo.idCard = row.idCard;
this.memberInfo.personName = row.personName;
@@ -636,18 +991,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 {
@@ -661,63 +1014,129 @@
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 => {
- // console.log(data.data);
+ .then((data) => {
if (data.success) {
this.$notify({
type: "success",
- message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒"
+ message: "璇ヤ汉鍛樺垹闄ゆ垚鍔燂紒",
});
}
this.getPersonList();
})
- .catch(err => {
+ .catch((err) => {
console.log(err);
});
})
- .catch(_ => { });
+ .catch((_) => {});
},
sayHello() {
console.log("hello");
},
getUploadResult(result) {
- // console.log(result, "涓婁紶鐨勮繑鍥�");
this.uploadResult = result.data;
this.dialogVisible = true;
this.getPersonList();
},
+ async setEnable(item) {
+ let res = await updateDbTableStatus({
+ id: item.id,
+ enable: item.enable,
+ });
+ if (res.success) {
+ this.$notify({
+ type: "success",
+ message: "搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
+ });
+ } else {
+ this.$notify({
+ type: "error",
+ message: "搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
+ });
+ }
+ },
+ isDisabled(item) {
+ var flag = true;
+ if (this.isShow("library:set")) {
+ if (item.endTime == "") {
+ flag = false;
+ } else {
+ flag = !this.$moment(new Date()).isBetween(
+ item.startTime,
+ item.endTime
+ );
+ }
+ }
+ return flag;
+ },
+ edit() {
+ this.$emit("changeShow", this.baseObject, this.syncType);
+ },
+ deleteBase() {
+ debugger;
+ let id = this.baseObject.id;
+ let token =
+ sessionStorage.getItem("loginedInfo") &&
+ JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
+ this.$confirm("鎻愮ず锛氱‘瀹氬垹闄ゅ簳搴擄紵", {
+ center: true,
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
+ }).then(() => {
+ fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${id}`, {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: token,
+ },
+ })
+ .then((res) => {
+ return res.json();
+ })
+ .then((res) => {
+ if (res.success) {
+ this.$notify({
+ type: "success",
+ message: "搴曞簱鍒犻櫎鎴愬姛锛�",
+ });
+ }
+ this.$emit("onDelete");
+ })
+ .catch((err) => {
+ this.$notify({
+ type: "error",
+ message: err,
+ });
+ });
+ });
+ },
async getPersonList() {
- // console.log("鎵ц浜嗗埛鏂板嚱鏁�", this.BaseManageData.syncTables[0]);
if (this.baseObject.id && this.baseObject.id !== undefined) {
- // 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,
});
});
},
handleClose() {
- //this.getPersonList();
this.dialogFormVisible = false;
},
handleSelectionChange(val) {
@@ -738,24 +1157,24 @@
this.dialogFormVisible = 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 {
@@ -768,7 +1187,7 @@
title: "Confirm",
content: "Bla bla ...",
okText: "纭",
- cancelText: "鍙栨秷"
+ cancelText: "鍙栨秷",
});
},
async enable(item) {
@@ -782,17 +1201,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: "搴曞簱浜哄憳鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
});
}
},
@@ -804,9 +1223,9 @@
},
haveScore(row) {
if (row.compareScore && row.compareScore !== "") {
- return true
+ return true;
} else {
- return false
+ return false;
}
},
async searchImgList(faceUrl, threshold) {
@@ -818,7 +1237,7 @@
faceUrl: faceUrl,
threshold: threshold,
orderType: this.orderType,
- orderName: this.orderName
+ orderName: this.orderName,
};
let res = await getPersonByPhoto(json);
// console.log("鍒楄〃鏌ヨ", json);
@@ -826,7 +1245,7 @@
this.total = res.data.total;
this.compare = true;
},
- updateThreshold() { },
+ updateThreshold() {},
async updateFace(param) {
const fd = new FormData();
fd.append("file", param.file);
@@ -836,9 +1255,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;
@@ -856,14 +1277,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);
@@ -874,13 +1295,13 @@
if (res.success) {
this.$notify({
type: "success",
- message: "鍒犻櫎鎴愬姛锛�"
+ message: "鍒犻櫎鎴愬姛锛�",
});
this.getPersonList();
} else {
this.$notify({
type: "error",
- message: "鍒犻櫎澶辫触锛�"
+ message: "鍒犻櫎澶辫触锛�",
});
}
});
@@ -912,25 +1333,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);
}
}
},
@@ -949,102 +1370,117 @@
// },
tosearch(item) {
//let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id
- let captureId = item.id == "" ? item.personId : item.id
- let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl
+ let captureId = item.id == "" ? item.personId : item.id;
+ let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl;
let compType = 0;
- let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType;
- window.parent.postMessage({
- msg: message
- }, "*")
+ let message =
+ "toSearch?showType=findByPic&targetId=" +
+ captureId +
+ "&picSmUrl=" +
+ imgUrl +
+ "&compType=" +
+ compType;
+ window.parent.postMessage(
+ {
+ msg: message,
+ },
+ "*"
+ );
},
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 = [];
},
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.getPersonList();
@@ -1077,36 +1513,32 @@
this.BaseManageData.cleanData();
this.getPersonList();
},
- deep: true
+ deep: true,
},
"BaseManageData.selectBlacks": function (value) {
- this.blackAngWhite()
+ this.blackAngWhite();
},
"BaseManageData.selectWhites": function (value) {
- this.blackAngWhite()
+ this.blackAngWhite();
},
},
components: {
- // httpImg,
- Upload,
+ UploadBtn,
fTemplate,
- UploadIcon
+ UploadIcon,
},
props: {
baseObject: {
- default: () => { },
- type: Object
- }
- }
+ default: () => {},
+ type: Object,
+ },
+ syncType: {
+ type: String,
+ },
+ },
};
</script>
<style lang="scss">
-.iconStyle1 {
- font-size: 16px;
- margin-left: 8px;
- cursor: pointer;
- color: #303133;
-}
.activeRow {
background: rgb(245, 247, 250);
}
@@ -1146,15 +1578,87 @@
display: none;
}
.table-parent {
- // position: relative;
- margin-left: 5px;
- height: 90%;
+ height: 100%;
overflow: visible !important;
.base-tip {
text-align: left;
font-size: 14px;
color: #000000;
+ background: #ffffff;
+ border-radius: 8px;
+ box-shadow: 0px 0px 6px 1px rgb(143 159 191 / 15%);
+ height: 70px;
+ line-height: 70px;
+ color: rgb(102, 102, 102);
+ padding: 0 20px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .ku-name {
+ font-weight: bold;
+ font-size: 16px;
+ line-height: 22px;
+ color: #5f5f5f;
+ margin-right: 10px;
+ }
+ .right-btns {
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ .el-switch__core {
+ height: 26px;
+ border-radius: 18px;
+ }
+ .el-switch__core:after {
+ width: 22px;
+ height: 22px;
+ }
+ .el-switch.is-checked .el-switch__core::after {
+ margin-left: -22px;
+ }
+ .iconshanchuku-09 {
+ color: #fe6d68;
+ margin-right: 10px;
+ }
+ .iconshanchuku-09:hover {
+ background: #fe6d68;
+ border: 1px solid #fe6d68;
+ color: #fff;
+ }
+ .iconbianjiku-09 {
+ color: rgb(102, 102, 102);
+ }
+ .iconbianjiku-09:hover {
+ border: 1px solid #4e94ff;
+ background: #4e94ff;
+ color: #fff;
+ }
+ }
+ .ok-time {
+ color: #999999;
+ font-size: 12px;
+ line-height: 17px;
+ margin-left: 20px;
+ }
+ .list {
+ border-radius: 9px;
+ height: 18px;
+ width: 52px;
+ display: inline-block;
+ line-height: 18px;
+ font-weight: bold;
+ font-size: 12px;
+ text-align: center;
+ }
+ .white-list {
+ background: rgba(36, 178, 156, 0.3);
+ color: #24b29c;
+ }
+ .black-list {
+ background: rgba(255, 61, 59, 0.3);
+ color: #ff3d3b;
+ }
}
}
@@ -1166,13 +1670,124 @@
.border-tabl {
border: 1px solid #ebeef5;
border-bottom: none;
- // border-bottom: none;
+ display: flex;
+ flex-direction: column;
+ border-radius: 8px;
+ background: #ffffff;
+ padding: 10px;
+ margin-top: 8px;
+ box-shadow: 0px 0px 6px 1px rgb(143 159 191 / 15%);
+ .head-search {
+ font-size: 14px;
+ line-height: 20px;
+ color: #5f5f5f;
+ display: flex;
+ margin: 15px 10px 20px 10px;
+ justify-content: space-between;
+ align-items: center;
+ .right-group {
+ display: flex;
+ .el-input--small {
+ width: 320px;
+ }
+ .iconpiliangshanchu-09 {
+ color: #fe6d68;
+ margin-right: 10px;
+ margin-left: 20px;
+ }
+ .iconpiliangshanchu-09:hover {
+ background: #fe6d68;
+ border: 1px solid #fe6d68;
+ color: #fff;
+ }
+ .el-button--small {
+ padding: 8px 45px;
+ font-size: 14px;
+ background: #4e94ff !important;
+ border-radius: 0px 18px 18px 0px;
+ border-color: #4e94ff !important;
+ }
+ .el-input__suffix {
+ top: 6px;
+ right: 10px;
+ }
+ .el-input--small .el-input__inner {
+ height: 32px;
+ line-height: 33px;
+ border: 1px solid #d4d6d9;
+ border-radius: 18px 0px 0px 18px;
+ width: 320px;
+
+ .el-input__inner::placeholder {
+ font-size: 14px;
+ line-height: 20px;
+ color: #bbbbbb;
+ }
+ }
+ // .compearValue
+ .compearValue {
+ .el-input-number__decrease,
+ .el-input-number__increase {
+ background-color: transparent;
+ border: none;
+ width: fit-content;
+ margin-right: 10px;
+ margin: 2px 10px 2px 0;
+ }
+ .el-input-number--mini {
+ width: 72px;
+ }
+ }
+ .upload-img-box {
+ }
+ .uploadIconBox .left-section1 .el-input__inner {
+ height: 32px;
+ line-height: 32px;
+ border: 1px solid #d4d6d9;
+ width: inherit;
+ border-radius: 16px;
+ padding: 0;
+ padding-left: 10px;
+ text-align: left;
+ font-size: 14px;
+ color: #5f5f5f;
+ }
+ }
+ .nums {
+ font-weight: bold;
+ font-size: 15px;
+ }
+ }
+ ::-webkit-scrollbar-thumb {
+ border-radius: 6px;
+ background-color: #dfdfdf;
+ }
+ ::-webkit-scrollbar {
+ background-color: transparent;
+ }
+ ::-webkit-scrollbar-track {
+ background-color: transparent;
+ box-shadow: none;
+ }
}
.el-dialog {
min-width: 515px;
.el-button--info {
color: #222;
}
+}
+.iconfont-wrap {
+ border: 1px solid #d3d5d9;
+ box-sizing: border-box;
+ border-radius: 8px;
+ display: inline-block;
+ width: 32px;
+ height: 32px;
+ cursor: pointer;
+ line-height: 32px;
+ text-align: center;
+ font-size: 23px;
+ transition: all 0.2s;
}
.el-dialog__header {
padding: 20px 0 10px;
@@ -1253,7 +1868,6 @@
width: 15%;
margin-top: 10px;
float: left;
- //font-family: PingFangSC-Medium;
font-size: 14px;
font-weight: 600;
}
diff --git a/src/pages/library/components/upload.vue b/src/pages/library/components/upload.vue
index e137709..3c3c4aa 100644
--- a/src/pages/library/components/upload.vue
+++ b/src/pages/library/components/upload.vue
@@ -1,6 +1,6 @@
<template>
<span class="upload-content pr">
- <el-button
+ <!-- <el-button
type="primary"
:loading="upLoadLoading"
:size="uploadBtnSize"
@@ -9,12 +9,17 @@
>
<i :class="uploadBtnIcon"></i>
{{uploadBtntext}}
- </el-button>
+ </el-button> -->
+ <span
+ class="iconfont iconfont-wrap iconshangchuantupian-09"
+ @click="uploadStart"
+ :loading="upLoadLoading"
+ ></span>
<div class="upload-progress" v-if="isShowProgress">
<b-progress
variant="warning"
striped
- :style="`opacity: ${isShowProgress&&showProgress?1:0}`"
+ :style="`opacity: ${isShowProgress && showProgress ? 1 : 0}`"
:value="progressValue"
height="5px"
/>
@@ -23,83 +28,93 @@
<div class="drag-area py-4 px-4" v-show="isShowBox">
<div
ref="drag_area"
- :class="['text-center files-area py-4 px-4',drag_class]"
+ :class="['text-center files-area py-4 px-4', drag_class]"
@click="uploadStart('fileInput')"
@dragover="dragover($event)"
@drop="drop($event)"
@dragenter="dragenter($event)"
@dragleave="dragleave($event)"
>
- <i class="el-icon-upload text-primary" style="color:rgb(61, 104, 225)"></i>
- <div class="el-upload__text" style="color:#babbbc!important">
+ <i
+ class="el-icon-upload text-primary"
+ style="color: rgb(61, 104, 225)"
+ ></i>
+ <div class="el-upload__text" style="color: #babbbc !important">
灏嗘枃浠舵嫋鍒版澶勶紝鎴�
<em class="text-primary cursor-pointer">鐐瑰嚮涓婁紶</em>
</div>
<div
class="el-upload__tip text-light"
- style="color:#babbbc!important"
- >{{limitTypes?`鍙兘涓婁紶${limitTypes}鏂囦欢`:''}}{{limitSize?` 鏂囦欢澶у皬涓嶈秴杩�${limitSize}`:''}}</div>
+ style="color: #babbbc !important"
+ >
+ {{ limitTypes ? `鍙兘涓婁紶${limitTypes}鏂囦欢` : ""
+ }}{{ limitSize ? ` 鏂囦欢澶у皬涓嶈秴杩�${limitSize}` : "" }}
+ </div>
</div>
</div>
- <div class="upload-model" v-show="isShowBox" @click="isShowBox=false"></div>
+ <div
+ class="upload-model"
+ v-show="isShowBox"
+ @click="isShowBox = false"
+ ></div>
</span>
</template>
<script>
-import axios from 'axios'
-import { guid } from '@/scripts/util.js'
+import axios from "axios";
+import { guid } from "@/scripts/util.js";
export default {
- name: 'upload',
+ name: "upload",
props: {
/* 涓婁紶鎺т欢鍒楄〃鏄惁鍒犻櫎鍔熻兘 */
isDelFile: {
default: true,
- type: Boolean
+ type: Boolean,
},
/* 绫诲瀷闄愬埗锛堝悗缂�鍚�,鍒嗛殧锛� 浼犲叆绀轰緥'.png,.jpg' 涓嶉檺鍒朵负 '' */
limitTypes: {
- default: '',
- type: String
+ default: "",
+ type: String,
},
/* 鏂囦欢澶у皬闄愬埗 浼犲叆绀轰緥'1M' 鍗曚綅鏀寔G銆丮銆並銆丅 鏃犲崟浣嶆寜B璁$畻 涓嶉檺鍒朵负 '' */
limitSize: {
- default: '5M',
- type: String
+ default: "5M",
+ type: String,
},
/* 涓婁紶鎸夐挳鏂囧瓧 */
uploadBtntext: {
- default: '涓婁紶',
- type: String
+ default: "涓婁紶",
+ type: String,
},
/* 涓婁紶鎸夐挳icon */
uploadBtnIcon: {
- default: 'ion ion-md-cloud-upload',
- type: String
+ default: "ion ion-md-cloud-upload",
+ type: String,
},
uploadBtnSize: {
- default: '',
- type: String
+ default: "",
+ type: String,
},
uploadBtnStyle: {
- default: '',
- type: String
+ default: "",
+ type: String,
},
uploadBtnClass: {
- default: 'btn btn-primary',
- type: String
+ default: "btn btn-primary",
+ type: String,
},
isShowProgress: {
default: false,
- type: Boolean
+ type: Boolean,
},
isDrag: {
default: false,
- type: Boolean
+ type: Boolean,
},
idJson: {
default: null,
- type: Object
- }
+ type: Object,
+ },
/**
* 涓婁紶缁勪欢鍥炲�兼柟娉�
* @description 涓婁紶缁勪欢鍥炲�兼柟娉�
@@ -109,262 +124,261 @@
data() {
return {
isShowBox: false,
- drag_class: '',
+ drag_class: "",
fileList: [],
erFileList: [],
suFileList: [],
fileIds: [],
upLoadLoading: false,
showProgress: false,
- progressValue: 0
- }
+ progressValue: 0,
+ };
},
computed: {},
methods: {
islimitTypes(fileObj) {
- if (this.limitTypes === '') {
- return 'success'
+ if (this.limitTypes === "") {
+ return "success";
}
if (
this.limitTypes.indexOf(
- fileObj.name.toLowerCase().replace(/^.+\./, '')
+ fileObj.name.toLowerCase().replace(/^.+\./, "")
) === -1
) {
const msg = {
- type: 'error',
- errorType: '涓婁紶绫诲瀷閿欒',
+ type: "error",
+ errorType: "涓婁紶绫诲瀷閿欒",
message:
/* ${fileObj && fileObj.name ? '鈥�' + fileObj.name + '鈥�' : ''} */
- `涓婁紶鏂囦欢蹇呴』鏄�${this.limitTypes},璇锋偍鏍告煡`
- }
+ `涓婁紶鏂囦欢蹇呴』鏄�${this.limitTypes},璇锋偍鏍告煡`,
+ };
// this.$notify(msg)
- return msg
+ return msg;
}
- return 'success'
+ return "success";
},
islimitSize(fileObj) {
- if (this.limitSize === '') {
- return 'success'
+ if (this.limitSize === "") {
+ return "success";
}
- let size = 0
- if (this.limitSize.indexOf('G') !== -1) {
- size = this.limitSize.replace('G', '') * 1024 * 1024 * 1024
- } else if (this.limitSize.indexOf('M') !== -1) {
- size = this.limitSize.replace('M', '') * 1024 * 1024
- } else if (this.limitSize.indexOf('K') !== -1) {
- size = this.limitSize.replace('K', '') * 1024
- } else if (this.limitSize.indexOf('B') !== -1) {
- size = this.limitSize.replace('B', '')
+ let size = 0;
+ if (this.limitSize.indexOf("G") !== -1) {
+ size = this.limitSize.replace("G", "") * 1024 * 1024 * 1024;
+ } else if (this.limitSize.indexOf("M") !== -1) {
+ size = this.limitSize.replace("M", "") * 1024 * 1024;
+ } else if (this.limitSize.indexOf("K") !== -1) {
+ size = this.limitSize.replace("K", "") * 1024;
+ } else if (this.limitSize.indexOf("B") !== -1) {
+ size = this.limitSize.replace("B", "");
} else {
- size = this.limitSize
+ size = this.limitSize;
}
if (size < fileObj.size) {
const msg = {
- type: 'error',
- errorType: '涓婁紶澶у皬閿欒',
+ type: "error",
+ errorType: "涓婁紶澶у皬閿欒",
message:
`${
- fileObj && fileObj.name ? '鈥�' + fileObj.name + '鈥�' : ''
- }蹇呴』灏忎簬` + this.limitSize
- }
+ fileObj && fileObj.name ? "鈥�" + fileObj.name + "鈥�" : ""
+ }蹇呴』灏忎簬` + this.limitSize,
+ };
// this.$notify(msg)
- return msg
+ return msg;
}
- return 'success'
+ return "success";
},
uploadStart(type) {
- this.$refs.fileInput.value = ''
- this.fileList = []
- this.erFileList = []
- this.suFileList = []
- if (this.isDrag && type !== 'fileInput') {
- this.isShowBox = !this.isShowBox
+ this.$refs.fileInput.value = "";
+ this.fileList = [];
+ this.erFileList = [];
+ this.suFileList = [];
+ if (this.isDrag && type !== "fileInput") {
+ this.isShowBox = !this.isShowBox;
} else {
- this.$refs.fileInput.click()
+ this.$refs.fileInput.click();
}
},
/* 鐐瑰嚮涓婁紶 */
clickUpLoad(e) {
if (e.target && e.target.files) {
- this.handleUpLoad(e.target.files)
+ this.handleUpLoad(e.target.files);
}
},
// 涓婁紶闄勪欢
handleUpLoad(files) {
// 鍒ゆ柇鏄惁閫夋嫨搴曞簱
// console.log(this.idJson, 'upload this.idJson')
- if (this.idJson.tableId === undefined || this.idJson.tableId === '') {
+ if (this.idJson.tableId === undefined || this.idJson.tableId === "") {
this.$notify({
- type: 'error',
- message: '璇峰厛閫夋嫨涓�涓簳搴�!'
- })
- return
+ type: "error",
+ message: "璇峰厛閫夋嫨涓�涓簳搴�!",
+ });
+ return;
}
/* 鎷垮埌涓婁紶鏂囦欢 */
if (files.length === 0) {
- return false
+ return false;
}
- this.fileList = [...files]
+ this.fileList = [...files];
/* 閲嶇疆杩涘害鏉� */
- this.showProgress = true
- this.progressValue = 0
+ this.showProgress = true;
+ this.progressValue = 0;
/* 寮�鍚笂浼犳寜閽甽oding */
- this.upLoadLoading = true
+ this.upLoadLoading = true;
/* 鍒涘缓FormData鏂囦欢瀵硅薄 */
- const fd = new FormData()
+ const fd = new FormData();
this.fileList.map((file, index) => {
/* 鏂囦欢鏍¢獙 start */
- const islimitTypes = this.islimitTypes(file)
- const islimitSize = this.islimitSize(file)
- if (islimitTypes !== 'success') {
+ const islimitTypes = this.islimitTypes(file);
+ const islimitSize = this.islimitSize(file);
+ if (islimitTypes !== "success") {
this.erFileList.push({
uuId: guid(),
file: file,
- errorMsg: islimitTypes
- })
- return false
+ errorMsg: islimitTypes,
+ });
+ return false;
}
- if (islimitSize !== 'success') {
+ if (islimitSize !== "success") {
this.erFileList.push({
uuId: guid(),
file: file,
- errorMsg: islimitSize
- })
- return false
+ errorMsg: islimitSize,
+ });
+ return false;
}
- this.suFileList.push(file)
+ this.suFileList.push(file);
/* 鏂囦欢鏍¢獙 end */
// fd.append('files' + index, file)
- fd.append('files', file)
- })
+ fd.append("files", file);
+ });
// fd.append('files', this.suFileList)
/* 娣诲姞tableId start */
if (this.idJson && this.idJson.tableId) {
- console.log(this.idJson, 'upload this.idJson')
- fd.append('tableId', this.idJson.tableId)
+ console.log(this.idJson, "upload this.idJson");
+ fd.append("tableId", this.idJson.tableId);
}
/* 娣诲姞orgId officeId end */
// fd.append('fileSource', 'FDFS')
if (this.fileList.length > this.erFileList.length) {
- this.uploadServer(fd)
+ this.uploadServer(fd);
} else {
/* 鍥炶皟浼犲�� */
- this.$emit('addFilesBaBackFN', {
+ this.$emit("addFilesBaBackFN", {
suFileList: this.suFileList,
erFileList: this.erFileList,
fileList: this.fileList,
- result: null
- })
+ result: null,
+ });
/* 缁撴潫涓婁紶鎸夐挳loding */
- this.upLoadLoading = false
+ this.upLoadLoading = false;
/* 闅愯棌鎷栨嫿妗� */
- this.isShowBox = false
+ this.isShowBox = false;
}
},
async uploadServer(fd) {
// this.$store.commit('HANDLE_LOADING_OPEN')
- const token = JSON.parse(
- sessionStorage.getItem('loginedInfo')
- ).access_token
+ const token = JSON.parse(sessionStorage.getItem("loginedInfo"))
+ .access_token;
try {
let res = await axios({
- method: 'post',
- url: `/data/api-v/dbperson/moreFileUpload`,//?access_token=${token}
+ method: "post",
+ url: `/data/api-v/dbperson/moreFileUpload`, //?access_token=${token}
data: fd,
- name: 'files',
+ name: "files",
headers: {
- Authorization: token
+ Authorization: token,
},
- onUploadProgress: progressEvent => {
+ onUploadProgress: (progressEvent) => {
if (
this.isShowProgress &&
progressEvent.loaded &&
progressEvent.total
) {
this.progressValue =
- (progressEvent.loaded / progressEvent.total) * 100
+ (progressEvent.loaded / progressEvent.total) * 100;
}
- }
- })
+ },
+ });
if (res && res.data) {
- const result = res.data
+ const result = res.data;
// this.$notify({
// type: result && result.success ? 'success' : 'error',
// message: result.msg
// })
- this.progressValue = 0
- this.showProgress = false
- this.$emit('successFN', result)
+ this.progressValue = 0;
+ this.showProgress = false;
+ this.$emit("successFN", result);
}
} catch (error) {
- this.progressValue = 0
- this.showProgress = false
- const errorArr = this.suFileList.map(file => {
+ this.progressValue = 0;
+ this.showProgress = false;
+ const errorArr = this.suFileList.map((file) => {
return {
uuId: guid(),
file: file,
errorMsg: {
- type: 'error',
- errorType: '涓婁紶鏈嶅姟鍣ㄩ敊璇�',
- message: '涓婁紶鏈嶅姟鍣ㄩ敊璇�'
- }
- }
- })
- this.erFileList = [...this.erFileList, ...errorArr]
+ type: "error",
+ errorType: "涓婁紶鏈嶅姟鍣ㄩ敊璇�",
+ message: "涓婁紶鏈嶅姟鍣ㄩ敊璇�",
+ },
+ };
+ });
+ this.erFileList = [...this.erFileList, ...errorArr];
/* 鍥炶皟浼犲�� */
- this.$emit('addFilesBaBackFN', {
+ this.$emit("addFilesBaBackFN", {
suFileList: [],
erFileList: this.erFileList,
fileList: this.fileList,
- result: error
- })
+ result: error,
+ });
}
//this.$store.commit('HANDLE_LOADING_CLOSE')
/* 缁撴潫涓婁紶鎸夐挳loding */
- this.upLoadLoading = false
+ this.upLoadLoading = false;
/* 闅愯棌鎷栨嫿妗� */
- this.isShowBox = false
+ this.isShowBox = false;
},
/* 鎷栨嫿鍑芥暟 start */
dragleave(el) {
- this.drag_class = ''
- el.stopPropagation()
- el.preventDefault()
+ this.drag_class = "";
+ el.stopPropagation();
+ el.preventDefault();
},
dragenter(el) {
- this.drag_class = 'active'
- el.stopPropagation()
- el.preventDefault()
+ this.drag_class = "active";
+ el.stopPropagation();
+ el.preventDefault();
},
dragover(el) {
- this.drag_class = 'active'
- el.stopPropagation()
- el.preventDefault()
+ this.drag_class = "active";
+ el.stopPropagation();
+ el.preventDefault();
},
drop(el) {
- el.stopPropagation()
- el.preventDefault()
+ el.stopPropagation();
+ el.preventDefault();
if (el.dataTransfer && el.dataTransfer.files) {
- this.handleUpLoad(el.dataTransfer.files)
+ this.handleUpLoad(el.dataTransfer.files);
}
- }
+ },
/* 鎷栨嫿鍑芥暟 end */
},
- created() { },
+ created() {},
watch: {
progressValue(newVal, oldVal) {
if (newVal !== oldVal && newVal >= 100) {
setTimeout(() => {
- this.showProgress = false
- this.progressValue = 0
- }, 1500)
+ this.showProgress = false;
+ this.progressValue = 0;
+ }, 1500);
}
- }
+ },
},
components: {
//LaddaBtn
- }
-}
+ },
+};
</script>
<style lang="scss" scoped>
diff --git a/src/pages/library/index/App.vue b/src/pages/library/index/App.vue
index 2da0f8b..e57302c 100644
--- a/src/pages/library/index/App.vue
+++ b/src/pages/library/index/App.vue
@@ -1,9 +1,9 @@
<template>
<div class="s-base-manage">
- <div class="flex-box base-overflow" >
+ <div class="flex-box base-overflow">
<div class="data-left-box">
<div class="resize-bar"></div>
- <div class="resize-line"></div>
+ <!-- <div class="resize-line"></div> -->
<div class="resize-save">
<base-list
ref="baseSync"
@@ -16,9 +16,20 @@
</div>
</div>
<div class="bg-white ml20 data-right-box">
- <div v-show="showList">
- <person-list ref="personList" :baseObject="baseObject" v-show="showType == 'person'"></person-list>
- <car-list ref="carList" :baseObject="baseObject" v-show="showType == 'car'"></car-list>
+ <div v-show="showList" style="height: 100%;">
+ <person-list
+ ref="personList"
+ :baseObject="baseObject"
+ @changeShow="changeToAdd"
+ @onDelete="initBaseList"
+ :syncType="syncType"
+ v-show="showType == 'person'"
+ ></person-list>
+ <car-list
+ ref="carList"
+ :baseObject="baseObject"
+ v-show="showType == 'car'"
+ ></car-list>
</div>
<add-base
ref="addBase"
@@ -33,191 +44,190 @@
</div>
</template>
<script>
-import baseList from '../components/baseList'
-import addBase from '../components/addBase'
-import personList from '../components/personList'
-import carList from '../components/carList'
+import baseList from "../components/baseList";
+import addBase from "../components/addBase";
+import personList from "../components/personList";
+import carList from "../components/carList";
export default {
data() {
return {
isSelected: false,
showList: true,
- showType: 'person',
- syncType: 'sync',
+ showType: "person",
+ syncType: "sync",
syncTables: [],
localTables: [],
baseObject: {},
baseForEdit: {}, // 缁欑紪杈戦〉闈紶鐨�
breeadCrumb: [
{
- name: '搴曞簱绠$悊',
- path: '/baseManage',
- params: {}
+ name: "搴曞簱绠$悊",
+ path: "/baseManage",
+ params: {},
},
{
- name: '搴曞簱璇︽儏',
- path: '/baseManage',
- params: {}
- }
- ]
- }
+ name: "搴曞簱璇︽儏",
+ path: "/baseManage",
+ params: {},
+ },
+ ],
+ };
},
methods: {
clearSelect1() {
- this.$refs.baseLocal.categoryIndex = -1
+ this.$refs.baseLocal.categoryIndex = -1;
},
clearSelect2() {
- this.$refs.baseSync.categoryIndex = -1
+ this.$refs.baseSync.categoryIndex = -1;
},
- getPersonList(item) {
- console.log('浼犵粰鐖剁粍浠剁殑鍊�', item)
- this.baseObject = item
+ getPersonList(item,type) {
+ this.baseObject = item;
+ this.baseForEdit = item;
+ this.syncType = type
// 鐩存帴璋冪敤瀛愮粍浠跺埛鏂板垪琛ㄧ殑鏂规硶
// 鍒ゆ柇杩欐槸浜哄憳搴撹繕鏄溅杈嗗簱锛屽喅瀹歴howList鐨勫��
if (item.tableType == "person") {
- console.log("person搴�")
- this.showType = 'person'
- this.$refs.personList.getPersonList()
+ this.showType = "person";
+ this.$refs.personList.getPersonList();
} else if (item.tableType == "car") {
- console.log("car搴�")
- this.showType = "car"
- this.$refs.carList.getCarList()
+ this.showType = "car";
+ this.$refs.carList.getCarList();
}
- //this.showList = '1'
- this.breeadCrumb[1].name = '搴曞簱璇︽儏'
+ this.breeadCrumb[1].name = "搴曞簱璇︽儏";
},
changeToAdd(item, type) {
if (item !== null) {
- this.baseForEdit = item
- this.breeadCrumb[1].name = '搴曞簱淇℃伅'
+ this.baseForEdit = item;
+ this.breeadCrumb[1].name = "搴曞簱淇℃伅";
} else {
- this.baseForEdit = {}
- this.breeadCrumb[1].name = '娣诲姞搴曞簱'
+ this.baseForEdit = {};
+ this.breeadCrumb[1].name = "娣诲姞搴曞簱";
}
- this.syncType = type
- this.showList = false
+ this.syncType = type;
+ this.showList = false;
+ },
+ initBaseList(){
+ this.$refs.baseSync.init()
},
// 鏌ヨ鍚屾搴撳垪琛ㄦ暟鎹甛鏌ヨ鏈湴搴撳垪琛ㄦ暟鎹�
findBaseSync() {
- this.BaseManageData.querySyncTables()
- this.BaseManageData.queryLocalTables()
+ this.BaseManageData.querySyncTables();
+ this.BaseManageData.queryLocalTables();
},
closeAdd() {
- console.log('closeAdd')
- this.showList = true
- }
+ this.showList = true;
+ },
},
props: {
cameraId: {
- default: '',
- type: String
- }
+ default: "",
+ type: String,
+ },
},
components: {
baseList,
addBase,
personList,
- carList
+ carList,
},
mounted() {
//this.TreeDataPool.showTreeBox = false
- }
-}
+ },
+};
</script>
-<style lang="scss" scoped>
-.flex-box{
- display: flex;
-}
+<style lang="scss" >
.s-base-manage {
box-sizing: border-box;
background-color: #e9ebf2;
min-width: 1315px;
height: 100%;
-}
-.base-overflow {
- height: 100%;
- //overflow: visible !important;
- background-color: #ffffff;
- box-sizing: border-box;
- // padding: 20px 10px 0 10px;
-}
-.s-data-manage-breadcrumb {
- margin: 0 3px;
- height: 5%;
- box-sizing: border-box;
- border: 1px solid #e4e7ed;
- box-shadow: #e4e7ed 0px 0px 9px inset;
- border-radius: 5px;
-}
-.data-left-box {
- //height: 100%;
- height: 100vh;
- position: relative;
- background: #fff;
- box-sizing: border-box;
- border-right: 1px solid #e0e0e0;
-}
-.resize-save {
- position: absolute;
- top: 0;
- right: 5px;
- bottom: 0;
- left: 0;
- padding: 14px;
- overflow-x: hidden;
-}
-.resize-bar {
- width: 310px;
- height: inherit;
- resize: horizontal;
- cursor: ew-resize;
- opacity: 0;
- overflow: scroll;
- max-width: 500px; //璁惧畾鏈�澶ф媺浼搁暱搴�
- min-width: 33px; //璁惧畾鏈�灏忓搴�
-}
-/* 鎷栨嫿绾� */
-.resize-line {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- border-right: 2px solid #efefef;
- border-left: 1px solid #e0e0e0;
- pointer-events: none;
-}
-.resize-bar:hover ~ .resize-line,
-.resize-bar:active ~ .resize-line {
- border-left: 1px dashed skyblue;
-}
-.resize-bar::-webkit-scrollbar {
- width: 200px;
- height: inherit;
-}
-
-/* Firefox鍙湁涓嬮潰涓�灏忓潡鍖哄煙鍙互鎷変几 */
-@supports (-moz-user-select: none) {
+ .el-collapse {
+ border: none;
+ }
+ .flex-box {
+ display: flex;
+ }
+ .base-overflow {
+ height: 100%;
+ background-color: #eff1f5;
+ box-sizing: border-box;
+ }
+ .s-data-manage-breadcrumb {
+ margin: 0 3px;
+ height: 5%;
+ box-sizing: border-box;
+ border: 1px solid #e4e7ed;
+ box-shadow: #e4e7ed 0px 0px 9px inset;
+ border-radius: 5px;
+ }
+ .data-left-box {
+ height: 100vh;
+ position: relative;
+ background: #fff;
+ box-sizing: border-box;
+ // border-right: 1px solid #e0e0e0;
+ }
+ .resize-save {
+ position: absolute;
+ top: 0;
+ right: 5px;
+ bottom: 0;
+ left: 0;
+ padding: 14px 10px;
+ overflow-x: hidden;
+ }
+ .resize-bar {
+ width: 254px;
+ height: inherit;
+ resize: horizontal;
+ cursor: ew-resize;
+ opacity: 0;
+ overflow: scroll;
+ max-width: 500px; //璁惧畾鏈�澶ф媺浼搁暱搴�
+ min-width: 33px; //璁惧畾鏈�灏忓搴�
+ }
+ /* 鎷栨嫿绾� */
+ .resize-line {
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ border-right: 2px solid #efefef;
+ border-left: 1px solid #e0e0e0;
+ pointer-events: none;
+ }
.resize-bar:hover ~ .resize-line,
.resize-bar:active ~ .resize-line {
- border-left: 1px solid #bbb;
+ border-left: 1px dashed skyblue;
}
- .resize-bar:hover ~ .resize-line::after,
- .resize-bar:active ~ .resize-line::after {
- content: "";
- position: absolute;
- width: 16px;
- height: 16px;
- bottom: 0;
- right: -8px;
- // background: url(./resize.svg);
- background-size: 100% 100%;
+ .resize-bar::-webkit-scrollbar {
+ width: 200px;
+ height: inherit;
}
-}
-.data-right-box {
- height: calc(100% - 40px);
- overflow-y: auto;
- flex: 1;
- padding: 5px 20px 5px 5px;
- box-sizing: border-box;
+
+ /* Firefox鍙湁涓嬮潰涓�灏忓潡鍖哄煙鍙互鎷変几 */
+ @supports (-moz-user-select: none) {
+ .resize-bar:hover ~ .resize-line,
+ .resize-bar:active ~ .resize-line {
+ border-left: 1px solid #bbb;
+ }
+ .resize-bar:hover ~ .resize-line::after,
+ .resize-bar:active ~ .resize-line::after {
+ content: "";
+ position: absolute;
+ width: 16px;
+ height: 16px;
+ bottom: 0;
+ right: -8px;
+ background-size: 100% 100%;
+ }
+ }
+ .data-right-box {
+ height: calc(100%);
+ overflow-y: auto;
+ flex: 1;
+ padding: 20px;
+ box-sizing: border-box;
+ }
}
</style>
diff --git a/src/pages/settings/views/generalSettings.vue b/src/pages/settings/views/generalSettings.vue
index 906cf8b..4b6f2a1 100644
--- a/src/pages/settings/views/generalSettings.vue
+++ b/src/pages/settings/views/generalSettings.vue
@@ -380,6 +380,7 @@
}
});
const url = this.curUser.backgroundpic;
+ this.activeIcons = this.curUser.useIconType-1
if (url) {
// const arr = url.split("/");
this.activeBg = this.tableBGList.findIndex((x) => {
@@ -502,6 +503,16 @@
},
selectIcons(i) {
this.activeIcons = i;
+ updateUser({
+ id: this.curUser.id,
+ iconType: i+1,
+ }).then((res) => {
+ if (res.success) {
+ window.parent.postMessage({ msg: "AppUpdate" }, "*");
+ sessionStorage.setItem("userInfo", JSON.stringify(res.data))
+ this.$message.success(res.msg);
+ }
+ });
},
removeSound(item) {
const h = this.$createElement;
--
Gitblit v1.8.0