Commit 85f4750f by 夏新然

初版

1 parent b9af383f
......@@ -13,7 +13,7 @@ module.exports = {
proxyTable: {},
// Various Dev Server settings
host: '192.168.9.41', // can be overwritten by process.env.HOST
host: '192.168.9.161', // can be overwritten by process.env.HOST
port: 8990, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
......
No preview for this file type
......@@ -530,6 +530,11 @@
"@types/yargs": "^12.0.9"
}
},
"@openlayers/pepjs": {
"version": "0.5.3",
"resolved": "https://registry.npm.taobao.org/@openlayers/pepjs/download/@openlayers/pepjs-0.5.3.tgz",
"integrity": "sha1-KYxZlMwS3l8Un4Qa/92KPlBiKLU="
},
"@riophae/vue-treeselect": {
"version": "0.0.38",
"resolved": "https://registry.npmjs.org/@riophae/vue-treeselect/-/vue-treeselect-0.0.38.tgz",
......@@ -7080,8 +7085,7 @@
"ieee754": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
"dev": true
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"iferr": {
"version": "0.1.5",
......@@ -9465,6 +9469,17 @@
"integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
"dev": true
},
"ol": {
"version": "6.1.0",
"resolved": "https://registry.npm.taobao.org/ol/download/ol-6.1.0.tgz",
"integrity": "sha1-gYglJPVUpY4cWIoebb7CYrJrh9s=",
"requires": {
"@openlayers/pepjs": "^0.5.3",
"pbf": "3.2.1",
"pixelworks": "1.1.0",
"rbush": "^3.0.1"
}
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
......@@ -9840,6 +9855,15 @@
"pinkie-promise": "^2.0.0"
}
},
"pbf": {
"version": "3.2.1",
"resolved": "https://registry.npm.taobao.org/pbf/download/pbf-3.2.1.tgz",
"integrity": "sha1-tMG55yr5Zs2CxlMWkRFcwECf/io=",
"requires": {
"ieee754": "^1.1.12",
"resolve-protobuf-schema": "^2.1.0"
}
},
"pbkdf2": {
"version": "3.0.17",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
......@@ -9885,6 +9909,11 @@
"node-modules-regexp": "^1.0.0"
}
},
"pixelworks": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/pixelworks/download/pixelworks-1.1.0.tgz",
"integrity": "sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU="
},
"pkcs7": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/pkcs7/-/pkcs7-0.2.3.tgz",
......@@ -11497,6 +11526,11 @@
"integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=",
"dev": true
},
"protocol-buffers-schema": {
"version": "3.3.2",
"resolved": "https://registry.npm.taobao.org/protocol-buffers-schema/download/protocol-buffers-schema-3.3.2.tgz",
"integrity": "sha1-AENPYItOjfVMWeBw7+78N/tLuFk="
},
"proxy-addr": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
......@@ -11591,6 +11625,11 @@
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
"dev": true
},
"quickselect": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/quickselect/download/quickselect-2.0.0.tgz",
"integrity": "sha1-8ZaApIal7vtYEwPgI+mPqvJd0Bg="
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
......@@ -11628,6 +11667,14 @@
"unpipe": "1.0.0"
}
},
"rbush": {
"version": "3.0.1",
"resolved": "https://registry.npm.taobao.org/rbush/download/rbush-3.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frbush%2Fdownload%2Frbush-3.0.1.tgz",
"integrity": "sha1-X6+op5s7mv3+UAhAOnIMwd6ILs8=",
"requires": {
"quickselect": "^2.0.0"
}
},
"react-is": {
"version": "16.8.6",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
......@@ -12247,6 +12294,14 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
},
"resolve-protobuf-schema": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/resolve-protobuf-schema/download/resolve-protobuf-schema-2.1.0.tgz",
"integrity": "sha1-nKmp5pzxkrva8QBuwZc5SKpKN1g=",
"requires": {
"protocol-buffers-schema": "^3.3.1"
}
},
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
......
export let url = 'http://192.168.9.208:20080/api/v1'
// export let url = 'http://192.168.9.208:20080/api/v1'
// export let url = 'http://52.1.113.109:20080/api/v1'
export let IP = location.host
if (IP.indexOf('9.161') > -1 ||IP.indexOf('localhost')) {
IP = '192.168.9.208:20080'
}
export let url = `http://${IP}/api/v1`
export let menus = `${url}/auth/apps/23660e5593563b27832c2b8f490b458e/menus`
let timer = ()=>{
......
......@@ -4,7 +4,7 @@
:title="titlename"
:visible.sync="show"
width="40%"
:before-close="handleClose">
>
<div v-show="curshow == 'chart'" class="report-select">
<el-select class="flr" v-model="period" @change="chageperiod">
<el-option label="天" value="day"></el-option>
......@@ -12,12 +12,15 @@
<el-option label="月" value="month"></el-option>
</el-select>
</div>
<div class="activitychart" id="activitychart" v-show="curshow == 'chart'"></div>
<div class="imgbox" v-show="curshow == 'img'">
<div class="activitychart" id="activitychart" v-show="curshow == 'chart'&&!noImg"></div>
<div class="imgbox" v-show="curshow == 'img'&&!noImg">
<div v-for="(item,index) in imgData" class="item-img-box" :key="index">
<img :src="item.pic_url" alt="">
</div>
</div>
<div class="" v-show="noImg">
暂无数据
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="show = false">确 定</el-button>
......@@ -35,33 +38,59 @@ export default {
curshow:'img',
period:'week',
titlename:'抓拍图片',
xdata:['01','02','03','04','05','06'],
apperadata:[23,60,20,36,23,85],
imgData:[]
xdata:[],
apperadata:[],
imgData:[],
noImg:false
}
},
methods:{
initImg(){
initImg(data){
this.show = true
this.titlename = '抓拍图片'
this.curshow = 'img'
this.axios.get(this.API.url + '/faces/' + data.face_unid + '/face_events').then(res => {
this.imgData = res.data.list_data
this.axios.get(this.API.faceweb + '/faces/' + data.unid + '/face_events').then(res => {
if(res.data.list_data){
this.imgData = res.data.list_data;
this.noImg=false;
}else{
this.noImg=true;
}
})
},
chageperiod(){
this.xdata = ['00:00','00:01','00:02','00:03','00:04','00:05']
this.apperadata = [123,60,32,36,213,85]
this.initchart()
},
initchart(data){
this.titlename = '活动状态'
this.show = true;
this.curshow = 'chart'
this.detaildata = data
setTimeout(() => {
this.initactivityChart(this.data)
}, 0);
if(data){
this.detaildata = data;
}
this.xdata=[];
this.apperadata=[];
this.axios.get(this.API.faceweb + '/faces/' + this.detaildata.unid + '/active',{
params:{
statistical_unit:this.period
}
}).then(res => {
if(res.data.length>0){
this.noImg=false;
res.data.forEach(item=>{
this.xdata.push(item.statistical_dt)
this.apperadata.push(Number(item.total_num))
setTimeout(() => {
this.initactivityChart()
}, 0);
})
}else{
this.noImg=true;
}
}).catch(err=>{
this.$message.error('获取失败');
})
},
initactivityChart(){
var chart = this.$echarts.init(document.getElementById('activitychart'))
......@@ -154,11 +183,11 @@ export default {
overflow hidden
}
.imgbox{
overflow hidden
overflow auto
height 60vh
}
.item-img-box{
height 200px
width 200px
width 155px
float left
overflow hidden
border-radius 5px
......
<!---活动状态--->
<!--活动状态-->
<template>
<div class="template-box content_div_main">
<el-form :inline="true" class="search-form" size="small">
......@@ -12,7 +12,7 @@
<el-input type="text" class="bla bra br0" v-model="facename" placeholder=""></el-input>
</el-form-item>
<el-form-item label="证件号:">
<el-input type="text" class="bla" placeholder="请输入证件号" v-model="facecard_id"></el-input>
<el-input type="text" class="bla" placeholder="请输入证件号" v-model="facecardid"></el-input>
</el-form-item>
<el-form-item label="性别:">
<el-select v-model="facesex" class="br0 bra bla">
......@@ -23,7 +23,7 @@
</el-form-item>
<el-form-item>
<el-button class="search-btn" @click="getData" icon="el-icon-search">查询</el-button>
<el-button class="search-btn ml10" @click="addGroupUser()" icon="el-icon-upload">导出</el-button>
<!-- <el-button class="search-btn ml10" @click="addGroupUser()" icon="el-icon-upload">导出</el-button> -->
</el-form-item>
</el-form>
<el-row class="table_m_type">
......
......@@ -41,7 +41,7 @@
<el-dialog title="添加组织机构" :visible.sync="dialogVisible" width="30%" @close="dialogclose()">
<el-row>
<el-form ref="orgform" :model="orgform" label-width="170px" class="demo-ruleForm">
<el-form-item label="父节点名称" prop="name">
<el-form-item label="父节点名称" prop="org_name">
<el-input class v-model="curOrgData.org_name" disabled style="width:100%"></el-input>
</el-form-item>
<el-form-item
......@@ -82,6 +82,13 @@
<script>
export default {
data() {
var validate= (rule, value, callback) => {
if (value === '') {
callback(new Error('请先点击左侧选择父节点!'));
} else {
callback();
}
};
return {
loading:false,
tableData: [],
......@@ -114,6 +121,9 @@ export default {
};
},
methods: {
dialogclose(){
this.$refs.orgform.resetFields()
},
handleNodeClick(data) {
this.tableData = data.childs;
this.curOrgData = data;
......@@ -179,7 +189,13 @@ export default {
data.org_type = "org";
this.eiditroot = true;
}
if (this.curOrgData.unid == 0||!this.curOrgData.unid ) {
this.$message({
type: "warning",
message: "请点击左侧选择父节点!"
});
return;
}
if (this.curOrgData.org_type != "address") {
if (data.org_type == "address" && this.curOrgData.pid == 0) {
this.$message({
......@@ -201,7 +217,7 @@ export default {
if (this.orgform.oreType == "org") {
this.faceapi.getOrg();
}
console.log('aaa')
this.dialogVisible = false;
var obj = {
unid: response.data.unid,
......@@ -229,7 +245,7 @@ export default {
},
deleteorg(row) {
this.deleteorgData(this.treedata, row);
this.getorgtree();
// this.getorgtree();
},
deleteorgData(alldata, deleteData) {
for (var i = 0; i < alldata.length; i++) {
......@@ -247,18 +263,21 @@ export default {
this.axios.get(this.API.org.getorgtree).then(res => {
this.treedata = res.data;
this.loading = false;
if (res.data.length > 0) {
res.data.forEach(e => {
this.buildTree(e);
});
}
// if (res.data.length > 0) {
// res.data.forEach(e => {
// this.buildTree(e);
// });
// }
});
},
searchCurDate(alldata, childrenData) {
for (var i = 0; i < alldata.length; i++) {
if (alldata[i] == this.curOrgData) {
if (alldata[i].childs) {
console.log('www')
alldata[i].childs.push(childrenData);
// alldata[i].childs.$set(alldata[i].childs.length, childrenData)
console.log(alldata[i].childs)
}
} else {
if (alldata[i].childs)
......
......@@ -9,7 +9,7 @@
</el-menu-item>
<el-submenu v-for="(fristmenu,index) in permission_routers" :key="index" v-if="fristmenu.children.length > 0" :index="fristmenu.path" >
<template slot="title"><i :class="[fristmenu.meta.icon,'menu-icon']"></i>{{fristmenu.name}}</template>
<el-menu-item :class="{'dark-submenu':theme=='dark','white-submenu':them == 'white'}" v-for="(twomenu,index) in fristmenu.children" :key="index" :index="twomenu.path" v-if="twomenu.children.length < 1">{{twomenu.name}}</el-menu-item>
<el-menu-item :class="{'dark-submenu':theme=='dark','white-submenu':theme == 'white'}" v-for="(twomenu,index) in fristmenu.children" :key="index" :index="twomenu.path" v-if="twomenu.children.length < 1">{{twomenu.name}}</el-menu-item>
<el-submenu v-for="(twomenu,index) in fristmenu.children" :key="index" :index="twomenu.path" v-if="twomenu.children.length > 0">
<template slot="title">{{twomenu.name}}</template>
<el-menu-item v-for="(threemenu,index) in twomenu.children" :key="index" :index="threemenu.path">{{threemenu.name}}</el-menu-item>
......
<!---抓拍记录--->
<!-- 抓拍记录 -->
<template>
<div class="template-box content_div_main">
<el-form :inline="true" class="search-form" size="small">
<el-form-item label="抓拍地点:">
<el-input type="text" class="bla bra br0" v-model="search.communityunid" placeholder=""></el-input>
<el-select v-model="search.communityunid" placeholder="请选择">
<el-option
v-for="item in addrData"
:key="item.unid" :value="item.unid" :label="item.org_name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="抓拍相机:">
<el-input type="text" class="bla bra br0" v-model="search.cameraname" placeholder=""></el-input>
......@@ -27,19 +32,19 @@
</el-form-item>
<el-form-item>
<el-button class="search-btn" @click="searchFaceCheck" icon="el-icon-search">查询</el-button>
<el-button class="search-btn ml10" @click="addGroupUser()" icon="el-icon-upload">导出</el-button>
<!-- <el-button class="search-btn ml10" @click="exportCluster()" icon="el-icon-upload">导出</el-button> -->
</el-form-item>
</el-form>
<el-row class="table_m_type">
<el-table :data="tableData" height="690" v-loading="loading">
<el-table-column prop="lastAccessTime" label="日期">
<el-table-column prop="event_dt" label="日期">
<template slot-scope="scope">
{{showLocalTime(scope.row.lastAccessTime)}}
{{showLocalTime(scope.row.event_dt)}}
</template>
</el-table-column>
<el-table-column prop="accesses_count" label="出现次数" ></el-table-column>
<el-table-column prop="cameraname" label="相机名称"></el-table-column>
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="events_count" label="出现次数" ></el-table-column>
<el-table-column prop="camera.name" label="相机名称"></el-table-column>
<el-table-column prop="face.name" label="姓名"></el-table-column>
<el-table-column label="性别">
<template slot-scope="scope">
{{scope.row.sex |sexfn}}
......@@ -90,6 +95,7 @@ import tracks from './track'
export default {
data() {
return {
addrData: [],
communityData: [],
crucialData:[],
loading: false,
......@@ -140,6 +146,11 @@ export default {
this.crucialData = response.data.list_data;
});
},
initAddrData(){
this.axios.get(this.API.url + "/org/address").then((response)=> {
this.addrData = response.data.list_data;
});
},
getFaceData() {
this.loading = true;
var checknum_greater = this.search.dtNumber,
......@@ -155,15 +166,14 @@ export default {
}
var Vthis = this;
this.axios
.get("http://192.168.9.228:8080/api/v1/face_web/face_events"
// this.API.faceweb + "/face_events?", {
,{
.get( this.API.faceweb + "/face_events?",{
params: {
offset: Vthis.page.offset,
limit: Vthis.page.limit,
is_active: true,
camera_addr_unids: this.search.communityunid,
camera_name__like: this.search.camrename,
'face.crucial_type':this.search.crucial_type,
'camera.name':this.search.cameraname,
camera_addr_unid: this.search.communityunid,
event_dt__gte: this.setUtcTime(this.search.datatime[0]),
event_dt__lt: this.setUtcTime(this.search.datatime[1]),
}
......@@ -188,13 +198,12 @@ export default {
this.axios.get(this.API.faceweb + "/faces/aggregate/export",{
params:{
"camera_addr_unids":this.search.communityunid,
"camera_name__like": this.search.camrename,
"camera_name__like": this.search.cameraname,
"event_dt__gte": this.setUtcTime(this.search.datatime[0]),
"event_dt__lt": this.setUtcTime(this.search.datatime[1]),
"limit":100
}
}).then((response)=>{
debugger
if(response.data.handle_state == 4){
this.$message.error(response.data.response_json);
return
......@@ -233,6 +242,8 @@ export default {
tracks
},
created() {
this.initDbData();
this.initAddrData();
this.getFaceData();
this.communityData = this.$store.state.orgData;
}
......
<!---抓拍记录--->
<!--抓拍记录-->
<template>
<div class="pic-box template-box videobox">
<div class="pic-left-box">
......@@ -9,9 +9,9 @@
<el-tab-pane label="多人脸搜索" name="more">
<morepic @moreFace="moreFace"></morepic>
</el-tab-pane>
<el-tab-pane label="人脸比对" name="compar">
<!-- <el-tab-pane label="人脸比对" name="compar">
<compaarisonpic></compaarisonpic>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
......@@ -19,10 +19,10 @@
<div class="result-box" v-show="activeName == 'one'">
<div v-for="(item,index) in oncefaceData" :key="index" class="one-pic-box">
<div class="one-pic-item-box">
<img src="./1.jpg" alt="">
<img :src="item.pics[0].url_path" alt="">
</div>
<div class="pic-info">
<span class="info-item">姓名:{{item.age}}</span>
<span class="info-item">姓名:{{item.face.name}}</span>
<span class="info-item">年龄:{{item.age}}</span>
<span class="info-item">性别:{{setsex(item.gender)}}</span>
<span class="info-item">相似度:{{item.score}}</span>
......@@ -31,17 +31,8 @@
</div>
<div class="result-box" v-show="activeName == 'more'">
<div class="more-pic-box" v-for="(item,index) in morefaceData" :key="index">
<div class="more-item org-img" >
<img src="./1.jpg" alt="">
</div>
<div class="more-item">
<img src="./1.jpg" alt="">
</div>
<div class="more-item">
<img src="./1.jpg" alt="">
</div>
<div class="more-item">
<img src="./1.jpg" alt="">
<div class="more-item org-img" v-for="chilItem in item.pics">
<img :src="chilItem.url_path" alt="">
</div>
</div>
</div>
......@@ -91,12 +82,13 @@ export default {
this.imageUrl = URL.createObjectURL(file.raw);
},
handleClick(tab, event) {
console.log(tab.name);
sessionStorage.setItem('activename',tab.name)
},
onceFace (val) {
this.oncefaceData = val;
},
moreFace(val){
console.log(val)
this.morefaceData = val;
},
setsex(val){
......@@ -115,7 +107,9 @@ export default {
console.log(val)
}
},
created() {}
created() {
sessionStorage.setItem('activename',this.activeName)
}
};
</script>
<style lang="stylus" scoped>
......
<!---抓拍记录--->
<!--抓拍记录-->
<template>
<div >
<div >
......
......@@ -73,8 +73,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地区" prop="name">
<el-input v-model="faceForm.area"></el-input>
<el-form-item label="地区" prop="">
<el-select v-model="faceForm.area" placeholder="地区">
<el-option v-for="(item,index) in areaData" :label="item.org_name" :key="index" :value="item.unid"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -104,6 +106,7 @@ export default {
provenceData:[],
Substate:1,
cityData:[],
areaData:[],
dialogVisible: false,
faceunid:'',
fileList:[],
......@@ -146,6 +149,11 @@ export default {
};
},
methods: {
getAddress(){
this.faceapi.getAddress().then(res => {
this.areaData = res.list_data;
})
},
handlePictureCardPreview(){
},
......@@ -157,6 +165,7 @@ export default {
this.dialogVisible = true
},
editTable(index, val) {
console.log('aaaa')
this.Substate = 2;
this.dialogVisible = true;
this.getBlackInfo(val.unid);
......
......@@ -27,7 +27,14 @@
</el-form>
<el-dialog title="人员管理" :visible.sync="dialogVisible" size="small" >
<el-row>
<el-upload ref="upload" action="" :file-list="fileList" :http-request="uploadimg" list-type="picture-card" :before-upload="beforeAvatarUpload" :on-progress="successImg" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<el-upload ref="upload" action=""
:file-list="fileList"
:auto-upload=false
:http-request="uploadimg"
list-type="picture-card"
:before-upload="beforeAvatarUpload"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</el-row>
......@@ -125,6 +132,12 @@
</el-col>
</el-row>
</el-form>
<el-dialog
width="30%"
:visible.sync="dialogVisible1"
append-to-body>
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="subMitBlack">确 定</el-button>
......@@ -133,9 +146,7 @@
<el-row class="mt20">
<facetable @edit="editTable" :dbname="dbname" :facename="facename" :facesex="facesex" :facecardid="facecard_id" :communityunid="communityunid" ref="c1"></facetable>
</el-row>
<el-dialog v-model="dialogVisible1" size="tiny">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
......@@ -158,7 +169,7 @@ export default {
cityData: [],
provenceData: [],
faceunid: "",
communityData:"",
communityData:[],
communityunid:"",
cartypeData:"",
crucialData:"",
......@@ -179,6 +190,7 @@ export default {
},
formLabelWidth: "120px",
pickerOptions0: {},
deletStr:'',
rules: {
card_id: [
{ min: 0, max: 22, message: '请正确输入身份证号码!', trigger: 'blur' }
......@@ -194,6 +206,11 @@ export default {
},
computed: {},
methods: {
getAddress(){
this.faceapi.getAddress().then(res => {
this.communityData = res.list_data;
})
},
//搜索人员
searchFace() {
this.$refs.c1.initTable(); //调用子组件搜索方法
......@@ -234,14 +251,9 @@ export default {
},
handleRemove(file, fileList) {
//移除图片
this.axios
.delete(this.API.this.API.faceweb +
"/crucial_face_pics/" +
this.curEditData.unid +
"/pics/" +
file.unid
)
.then(function(response) {});
if(file.unid){
this.deletStr+=file.unid+','
}
},
handlePictureCardPreview(file) {
//预览大图
......@@ -249,6 +261,9 @@ export default {
this.dialogVisible1 = true;
},
successImg(response, file, fileList) {
console.log('r',response)
console.log('f',file)
console.log('fl',fileList)
//图片上传成功
},
beforeAvatarUpload(file) {
......@@ -256,9 +271,11 @@ export default {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
return false
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
return false
}
},
uploadimg(file) {
......@@ -286,7 +303,7 @@ export default {
},
initEditFaceInfo(data) {
for (var i = 0; i < data.pics.length; i++) {
data.pics[i].url = data.pics[i].pic_url;
data.pics[i].url = data.pics[i].url_path;
}
this.curEditData = data;
this.form.name = data.name;
......@@ -326,8 +343,6 @@ export default {
var Vthis = this;
this.axios.post(this.API.faceweb + "/faces", this.form).then(function(response) {
Vthis.savePersonnelImg(response.data.unid);
Vthis.$refs.upload.clearFiles();
Vthis.$refs.c1.initTable();
Vthis.$message({
message: "添加人员成功!",
type: 'success'
......@@ -335,6 +350,7 @@ export default {
});
},
saveEditPersonnel() {
this.$refs.upload.submit();
var Vthis = this;
var birthdayDate= new Date(new Date(this.form.birthday).getTime());
this.form.birthday = this.form.birthday?this.timeForm(birthdayDate).split(' ')[0]:'';
......@@ -350,8 +366,9 @@ export default {
})
},
savePersonnelImg(faceunid) {
var fileArr=[];
var Vthis = this;
this.$refs.upload.uploadFiles.forEach(function(ele) {
this.$refs.upload.uploadFiles.forEach(function(ele,index) {
Vthis.baseImg(ele.raw, function(srcs) {
var data = {
pic_base64: srcs,
......@@ -359,26 +376,51 @@ export default {
ofilename: ele.name,
t_format: "jpg"
};
Vthis.sendImg(faceunid, data);
fileArr.push(data)
if(index==Vthis.$refs.upload.uploadFiles.length-1){
var obj={
deletepics:'',
blackFacePicVos:fileArr
}
Vthis.sendImg(faceunid, obj);
}
});
}, this);
},
editPersonnelImg(file) {
var Vthis = this;
this.baseImg(file, function(srcs) {
var data = {
pic_base64: srcs,
format: file.type.split("/")[1],
ofilename: file.name,
t_format: "jpg"
};
Vthis.sendImg(Vthis.faceunid, data);
debugger
var fileArr=[];
var Vthis = this;
this.$refs.upload.uploadFiles.forEach((ele,index)=>{
if(ele.raw){
this.baseImg(ele.raw, function(srcs){
var data = {
pic_base64: srcs,
format: ele.raw.type.split("/")[1],
ofilename: ele.name,
t_format: "jpg"
};
fileArr.push(data)
if(index==Vthis.$refs.upload.uploadFiles.length-1){
var obj={
deletepics:Vthis.deletStr.substring(0,Vthis.deletStr.length-1),
blackFacePicVos:fileArr
}
Vthis.sendImg(Vthis.faceunid, obj);
}
},this);
}
});
},
sendImg(faceunid, data) {
this.axios
.post(this.API.faceweb + "/crucial_face_pics/" + faceunid + "/pics", data)
.then(function(response) {});
.then((response)=>{
this.deletStr=''
this.$refs.upload.clearFiles();
this.$refs.c1.initTable();
});
},
baseImg(file, callback) {
var srcs = "";
......@@ -404,6 +446,7 @@ export default {
},
created() {
var Vthis = this;
this.getAddress();
this.axios
.get(this.API.url + "/codes/countries/0E229CD043/provinces")
.then(function(response) {
......
<!---多人脸搜索--->
<!--多人脸搜索-->
<template>
<div >
<div >
......@@ -94,9 +94,15 @@ export default {
watch:{
alarmInfo(val){
if(val.params.msg_type === 'face_img_search'){
this.axios.get(val.params.msg_url).then(res => {
this.$emit('onceFace',res.data)
})
if(sessionStorage.getItem('activename')=='more'){
console.log('www')
setTimeout(()=>{
this.axios.get(val.params.msg_url).then(res => {
console.log('aaaa',res.data)
this.$emit('moreFace',res.data)
})
},500)
}
}
}
}
......
<!---单人脸搜索--->
<!--单人脸搜索-->
<template>
<div >
<div >
......@@ -98,9 +98,14 @@ export default {
watch:{
alarmInfo(val){
if(val.params.msg_type === 'face_img_search'){
this.axios.get(val.params.msg_url).then(res => {
this.$emit('onceFace',res.data)
})
if(sessionStorage.getItem('activename')=='one'){
console.log('one')
setTimeout(()=>{
this.axios.get(val.params.msg_url).then(res => {
this.$emit('onceFace',res.data)
})
},300)
}
}
}
}
......
......@@ -6,13 +6,19 @@
width="50%"
:before-close="handleClose">
<el-table :data="trackData">
<el-table-column property="date" label="日期"></el-table-column>
<el-table-column property="name" label="姓名"></el-table-column>
<el-table-column property="address" label="抓怕地址"></el-table-column>
<el-table-column property="address" label="抓怕图片">
<div class="img-box">
<img src="../videos/testimg/1.jpg" alt="">
</div>
<el-table-column prop="event_dt" label="日期">
<template slot-scope="scope">
{{showLocalTime(scope.row.event_dt)}}
</template>
</el-table-column>
<el-table-column property="face.name" label="姓名"></el-table-column>
<el-table-column property="camera.location" label="抓怕地址"></el-table-column>
<el-table-column property="pic_url" label="抓怕图片">
<template slot-scope="scope">
<div class="img-box">
<img :src="scope.row.pic_url" alt="">
</div>
</template>
</el-table-column>
<el-row>
<div class="block">
......@@ -51,7 +57,7 @@ export default {
init(data){
this.show = true;
console.log(data)
this.axios.get(this.API.url + '/faces/' + data.face_unid + '/face_events',{
this.axios.get(this.API.faceweb+ '/faces/' + data.face_unid + '/face_events',{
params: {
limit: this.page.limit,
offset: this.page.offset,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!