Commit 85f4750f by 夏新然

初版

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