Commit b9af383f by 潘建波

青岛社保2次提交

修改以图搜图部分
人脸事件部分
1 parent d515cb9a
......@@ -13,7 +13,7 @@ module.exports = {
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
host: '192.168.9.41', // 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,
......
......@@ -806,7 +806,6 @@ div[data-v-4ab5ed42] .el-col-16,div[data-v-0a498488] .el-col-16,div[data-v-012f6
}
.content_div_main .el-transfer-panel{
width: 10.6vw;
height:43vh
}
.content_div_main .el-transfer__buttons{
padding:0 1vw
......
......@@ -117,11 +117,13 @@ export const asyncRouterMap = [{
path: '/equipment/vchan',
name: '相机配置',
component: reslove => require(['@/views/Equipment/vchan.vue'], reslove),
},{
path: '/equipment/dev',
name: '设备状态',
component: reslove => require(['@/views/Equipment/dev.vue'], reslove),
}]
}
// ,{
// path: '/equipment/dev',
// name: '设备状态',
// component: reslove => require(['@/views/Equipment/dev.vue'], reslove),
// }
]
}, {
path: '/system',
name: '系统管理',
......
......@@ -3,6 +3,7 @@ const getters = {
permission_routers: state => state.menu.addRouter,
three_menu:state => state.menu.threeMenu,
dev_unid:state => state.initinfo.dev_unid,
faceInfo:state => state.alarm.faceInfo
faceInfo:state => state.alarm.faceInfo,
alarmInfo:state => state.alarm.alarmInfo,
}
export default getters
......@@ -6,7 +6,7 @@ import {url} from '../../util/api'
*/
function getMenuInfo(token) {
return new Promise((reslove, reject) =>{
axios.get(url + "/auth/apps/" + 'e38b9e91e27df7295282cd1d876f5f26' + "/menus?shape=list").then(response => {
axios.get(url + "/auth/apps/" + '23660e5593563b27832c2b8f490b458e' + "/menus?shape=list").then(response => {
reslove(response);
})
});
......@@ -43,8 +43,8 @@ function hasPerminssion(router, roles) {
return true;
}
}
// let status = false
let status = true
let status = false
// let status = true
if (roles) {
for(let i = 0; i < roles.length; i++){
if(roles[i].path === router.path){
......
export let url = 'http://192.168.9.208:20080/api/v1'
// export let url = 'http://52.1.113.109:20080/api/v1'
export let menus = `${url}/auth/apps/e38b9e91e27df7295282cd1d876f5f26/menus`
export let menus = `${url}/auth/apps/23660e5593563b27832c2b8f490b458e/menus`
let timer = ()=>{
return new Date().getTime()
......@@ -17,7 +17,7 @@ export let auth = {
return `${url}/auth/roles/${roleid}`
},
menusRole(roleid){
return `${url}/auth/roles/${roleid}/apps/e38b9e91e27df7295282cd1d876f5f26/menus`
return `${url}/auth/roles/${roleid}/apps/23660e5593563b27832c2b8f490b458e/menus`
},
userRole(userid) {
return `${url}/auth/users/${userid}/roles`
......
......@@ -29,16 +29,7 @@ router.beforeEach((to, from, next) => {
faceapi.getAddress();
faceapi.getFaceDbData();
faceapi.getProvince();
//添加路由守卫确定是否打开新的页面
// router.beforeEach((to, from, next) => {
// if(to.matched.some(record => record.meta.openwin)) {
// let url = location.origin +'/#'+ to.meta.url
// window.open (url, 'newwindow', 'left=100, top=100 toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
// return
// }else{
// next()
// }
// })
}).catch(() => {
})
......
<template>
<div class="statusdetail">
<el-dialog
title="活动状态"
:title="titlename"
:visible.sync="show"
width="40%"
:before-close="handleClose">
......@@ -13,7 +13,11 @@
</el-select>
</div>
<div class="activitychart" id="activitychart" v-show="curshow == 'chart'"></div>
<div class="imgbox" v-show="curshow == 'img'"></div>
<div class="imgbox" v-show="curshow == 'img'">
<div v-for="(item,index) in imgData" class="item-img-box" :key="index">
<img :src="item.pic_url" alt="">
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="show = false">确 定</el-button>
......@@ -30,14 +34,20 @@ export default {
detaildata:'',
curshow:'img',
period:'week',
titlename:'抓拍图片',
xdata:['01','02','03','04','05','06'],
apperadata:[23,60,20,36,23,85]
apperadata:[23,60,20,36,23,85],
imgData:[]
}
},
methods:{
initImg(){
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
})
},
chageperiod(){
this.xdata = ['00:00','00:01','00:02','00:03','00:04','00:05']
......@@ -45,6 +55,7 @@ export default {
this.initchart()
},
initchart(data){
this.titlename = '活动状态'
this.show = true;
this.curshow = 'chart'
this.detaildata = data
......@@ -142,4 +153,19 @@ export default {
width 100%
overflow hidden
}
.imgbox{
overflow hidden
}
.item-img-box{
height 200px
width 200px
float left
overflow hidden
border-radius 5px
margin 0 0 20px 20px
img {
height 100%
width 100%
}
}
</style>
......@@ -2,33 +2,27 @@
<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="address" placeholder=""></el-input>
<el-form-item label="人口库:">
<el-select v-model="dbname" class="br0 bra bla">
<el-option value="" label="请选择库类型"></el-option>
<el-option v-for="item in crucialData" :key="item.unid" :value="item.code" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="抓拍相机:">
<el-input type="text" class="bla bra br0" v-model="camera" placeholder=""></el-input>
<el-form-item label="姓名:">
<el-input type="text" class="bla bra br0" v-model="facename" placeholder=""></el-input>
</el-form-item>
<el-form-item label="查询库:">
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-form-item label="证件号:">
<el-input type="text" class="bla" placeholder="请输入证件号" v-model="facecard_id"></el-input>
</el-form-item>
<el-form-item label="查询时间:">
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-form-item label="性别:">
<el-select v-model="facesex" class="br0 bra bla">
<el-option value="" label="请选择性别"></el-option>
<el-option :value="1" label="男"></el-option>
<el-option :value="2" label="女"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button class="search-btn" @click="searchUser" 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-form-item>
</el-form>
......@@ -36,24 +30,13 @@
<el-table :data="tableData" style="width: 100%" height="680" >
<el-table-column type="index" label="#"></el-table-column>
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" align="center"></el-table-column>
<el-table-column prop="carid" label="身份证号"></el-table-column>
<el-table-column prop="address" label="地点"></el-table-column>
<el-table-column prop="appearnum" label="出现次数" align="center"></el-table-column>
<el-table-column prop="lastappear" label="最后出现时间" ></el-table-column>
<el-table-column prop="signin" label="注册时间" ></el-table-column>
<el-table-column prop="pic" label="人脸图片">
<template slot-scope="scope">
<div class="show-img-box">
<img :src="scope.row.pic" alt="">
</div>
</template>
</el-table-column>
<el-table-column prop="sex" label="性别" :formatter="setSex" align="center"></el-table-column>
<el-table-column label="出生日期" property="birthday" :formatter="setBirthday"> </el-table-column>
<el-table-column label="身份证号" property="card_id"></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<div class="tab-btn-box">
<span @click="showImg(scope.row)" class="table-btn">所有抓图片</span>
<span @click="showImg(scope.row)" class="table-btn">抓拍图片</span>
<span @click="activityStatus(scope.row)" class="table-btn">活动状态</span>
</div>
</template>
......@@ -63,9 +46,11 @@
<el-row class="block">
<el-pagination
class="mt10"
@current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="limit"
background
layout="prev, pager, next"
:total="1000">
:total="total">
</el-pagination>
</el-row>
<el-row>
......@@ -84,76 +69,20 @@ export default {
return {
address: "",
camera: "",
options: [
{
value: "选项1",
label: "社保库1"
},
{
value: "选项2",
label: "社保库2"
},
{
value: "选项3",
label: "社保库3"
},
{
value: "选项4",
label: "社保库4"
},
{
value: "选项5",
label: "社保库5"
}
],
tableData: [
{
name: "王小虎",
age:'23',
sex:"男",
carid:"211232211221233341",
address: "上海市普陀区金沙江路 1518 弄",
appearnum:4,
lastappear:'2019-08-01 10:00:09',
signin:'2016-08-01 10:00:09',
pic:require('../videos/testimg/1.jpg')
},
{
name: "王小虎",
age:'23',
sex:"男",
carid:"211232211221233341",
address: "上海市普陀区金沙江路 1518 弄",
appearnum:4,
lastappear:'2019-08-01 10:00:09',
signin:'2016-08-01 10:00:09',
pic:require('../videos/testimg/1.jpg')
},
{
name: "王小虎",
age:'23',
sex:"男",
carid:"211232211221233341",
address: "上海市普陀区金沙江路 1518 弄",
appearnum:4,
lastappear:'2019-08-01 10:00:09',
signin:'2016-08-01 10:00:09',
pic:require('../videos/testimg/1.jpg')
},
{
name: "王小虎",
age:'23',
sex:"男",
carid:"211232211221233341",
address: "上海市普陀区金沙江路 1518 弄",
appearnum:4,
lastappear:'2019-08-01 10:00:09',
signin:'2016-08-01 10:00:09',
pic:require('../videos/testimg/1.jpg')
}
],
crucialData: [],
tableData: [],
value: "",
value1: ""
value1: "",
offset:0,
limit:20,
total:0,
currentPage:0,
dbname:'',
facename:'',
communityunid:'',
facecardid:'',
facesex:''
};
},
methods: {
......@@ -162,9 +91,50 @@ export default {
},
activityStatus(data){
this.$refs.detail.initchart(data)
},
setSex(row, column, cellValue) {
var sex = "";
if (cellValue == "1") sex = "男";
if (cellValue == "2") sex = "女";
return sex;
},
setBirthday(row, column, cellValue) {
var data = "";
if (cellValue) data = cellValue.split(" ")[0];
return data;
},
initDbData(){
this.axios.get(this.API.url + "/codes/custom/cates/4DD23AF66E/codes").then((response)=> {
this.crucialData = response.data.list_data;
});
},
getData() {
this.axios
.get(this.API.faceweb + "/faces/crucial_faces", {
params: {
offset: this.offset,
limit: this.limit,
is_crucial: true,
is_active: true,
sex: this.facesex,
name__like: this.facename,
card_id__like: this.facecardid,
crucial_type: this.dbname,
resident_unids: this.communityunid,
}
}).then( (response) =>{
this.tableData = response.data.list_data;
this.total = response.data.total_num;
});
},
handleCurrentChange(){
}
},
created() {}
created() {
this.getData();
this.initDbData();
}
};
</script>
<style lang="stylus" scoped>
......
......@@ -24,7 +24,7 @@
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="search-btn" @click="searchUser" icon="el-icon-search">查询</el-button>
<el-button class="search-btn" @click="getFace" icon="el-icon-search">查询</el-button>
<el-button class="search-btn ml10" @click="addGroupUser()" icon="el-icon-plus">添加</el-button>
</el-form-item>
</el-form>
......
......@@ -107,8 +107,7 @@
}
},
props: ["addvdialog","editData","state"],
computed:{
},
methods: {
closeaddvdialog(state) {
this.state = "add";
......@@ -164,7 +163,10 @@
}
},
created(){
this.address = this.$store.state.initinfo.address;
debugger
this.faceapi.getAddress().then(res => {
this.address = res.list_data;
})
},
watch:{
editData(val){
......
......@@ -110,7 +110,7 @@ export default {
                                                    dataProjection : 'EPSG:4326'
                                                  })
});
var path = "http://192.168.9.62:20080/static/pics/gaodeMap/roadmap/{z}/{x}/{y}.png"
var path = "http://192.168.9.62:20080/static/pics/qingdaoMap/roadmap/{z}/{x}/{y}.png"
var offlineMapLayer = new TileLayer({
source: new XYZ({
// 设置本地离线瓦片所在路径,由于例子里面只有一张瓦片,页面显示时就只看得到一张瓦片。
......@@ -121,9 +121,9 @@ export default {
Views = new View({
projection: 'EPSG:4326',
zoom: 2,// 并且定义地图显示层级为2
minZoom:11,
minZoom:13,
maxZoom:18,
center:[116.397477,39.908692]
center:[120.324447,36.064594]
})
map = new Map({
// 设置地图图层
......@@ -153,27 +153,18 @@ export default {
// 添加一个使用离线瓦片地图的层
var CameraVertorlayer = new VectorLayer({
source: _this.addCameraLayer([116.397477,39.908692],"相机A")
source: _this.addCameraLayer([120.324447,36.064594],"相机A")
});
map.addLayer(CameraVertorlayer);
this.addLayer();
var container = document.getElementById("popup");
var content = document.getElementById("popup-content");
var popupCloser = document.getElementById("popup-closer");
var overlay = new Overlay({
element: container,
autoPan: true
});
map.on('click',(e)=>{
var pixel = map.getEventPixel(e.originalEvent);
console.log(pixel);
//点击标注点信息
//点击相机标注点
map.forEachFeatureAtPixel(pixel,function(feature){
debugger
console.log(feature);
//return feature;
var coodinate = e.coordinate;
_this.unid = feature.getProperties().unid;
overlay.setPosition(coodinate);
......@@ -187,22 +178,7 @@ export default {
});
},
removeclass(e){
e.currentTarget.classList.remove('canvasDiv');
},
removeAlarmclass(e){
e.currentTarget.parentElement.classList.remove('alarm-makerbox');
},
addAlarmBox(data){
document.getElementById('alarmMarker').className = 'alarm-makerbox alarm-active';
var pos = data;
var marker = new Overlay({
position: pos,
positioning: 'center-center',
element: document.getElementById('alarmMarker')
});
map.addOverlay(marker);
},
addLayer(data){
var pos = data;
var marker = new Overlay({
......@@ -251,9 +227,7 @@ export default {
vectorSource.addFeature(icon);
return vectorSource;
},
switchalarminfo(){
this.openstate = true
},
addFeature(){
function createStyle(src, img) {
return new Style({
......@@ -275,13 +249,7 @@ export default {
});
map.addLayer(this.CameraVertorlayer);
},
moveCenter(data){
Views.animate({
center:data,
zoom: 15
});
this.addAlarmBox(data)
}
},
created(){
......@@ -291,9 +259,6 @@ export default {
let _this = this;
setTimeout(() => {
// 添加一个使用离线瓦片地图的层
var CameraVertorlayer = new VectorLayer({
source: _this.addCameraLayer([116.507372,39.932443],'相机B')
});
map.addLayer(CameraVertorlayer);
}, 200);
......
......@@ -13,10 +13,10 @@
<menus ref="menus"></menus>
</el-col>
<el-col :span="6" class>
<el-col :span="10" :offset="8">
<el-col :span="13" :offset="4">
<div class="timer">{{timer}}</div>
</el-col>
<el-col :span="2">
<el-col :span="2" class="line55">
<el-dropdown @command="handleClick">
<i class="el-icon-setting quit-icon"></i>
<el-dropdown-menu slot="dropdown">
......@@ -25,7 +25,7 @@
</el-dropdown-menu>
</el-dropdown>
</el-col>
<el-col :span="2">
<el-col :span="2" class="line55">
<div class="quitsystem-btn">
<i class="el-icon-switch-button quit-icon" @click="quit"></i>
......@@ -215,5 +215,9 @@ body {
line-height 55px
font-size 20px
}
.line55{
height 55px;
line-height 55px;
}
</style>
<template>
<div class="login">
<div class="login_div_">
<!-- <div class="left_login_mc">
<el-row style="font-size:15px;width:100%;" class="ml_l">
<a href="http://193.5.103.166:8089/illimg/76.0.3809.87_chrome_installer_32.exe">谷歌浏览器下载</a>
</el-row>
</div> -->
<div class="login-box">
<div class="left-box">
<div class="ploce-box"></div>
......@@ -34,48 +29,14 @@
suffix-icon="el-icon-lock"
class="item-input"
type="passWord"
@keyup.enter.native="login"
v-model="passWord">
</el-input>
</div>
<div class="login-button" @click="login">登录</div>
<div class="login-button" @click="login" >登录</div>
<div class="login-about">技术支持:北京文安智能科技股份有限公司</div>
</div>
</div>
<!-- <el-col :span="10" :offset="4" class="login-box">
<el-col :span="24" class="login-header mt20">
<div class="login-header-box pl10">
<div class="pl25 header-box-title">系统登录</div>
</div>
</el-col>
<el-row class="login-info">
<el-col :span="20" :offset="2" class="box">
<el-input
:span="10"
class="el_input_b"
oninput="if(value.length>6)value=value.slice(0,6)"
v-model="userName"
placeholder="用户ID"
></el-input>
</el-col>
</el-row>
<el-row class="mt20">
<el-col :span="20" :offset="2" class="box">
<el-input
v-model="passWord"
class="el_input_b"
type="password"
onkeyup="this.value=this.value.replace(/[^\w_]/g,'');"
@keyup.enter.native="login"
placeholder="密码"
></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="20" :offset="2" class="box mt20">
<el-button type="primary pull-right" class="login-btn" @click="login">登录</el-button>
</el-col>
</el-row>
</el-col> -->
</div>
</div>
</template>
......@@ -105,9 +66,6 @@ export default {
this.$message.error("请输入密码在继续");
return;
}
//--------\
// this.$router.push("/layout");
// this.$router.push("/show");
var data = { username: this.userName, password: this.passWord };
this.axios
.post(this.API.auth.login, data)
......
......@@ -3,24 +3,22 @@
<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="address" placeholder=""></el-input>
<el-input type="text" class="bla bra br0" v-model="search.communityunid" placeholder=""></el-input>
</el-form-item>
<el-form-item label="抓拍相机:">
<el-input type="text" class="bla bra br0" v-model="camera" placeholder=""></el-input>
<el-input type="text" class="bla bra br0" v-model="search.cameraname" placeholder=""></el-input>
</el-form-item>
<el-form-item label="查询库:">
<el-select v-model="value" placeholder="请选择">
<el-select v-model="search.crucial_type" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in crucialData"
:key="item.unid" :value="item.code" :label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="查询时间:">
<el-date-picker
v-model="value1"
v-model="search.datatime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
......@@ -28,29 +26,40 @@
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button class="search-btn" @click="searchUser" 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-form-item>
</el-form>
<el-row class="table_m_type">
<el-table :data="tableData" height="690">
<el-table-column prop="date" label="日期">
<el-table :data="tableData" height="690" v-loading="loading">
<el-table-column prop="lastAccessTime" label="日期">
<template slot-scope="scope">
{{showLocalTime(scope.row.event_dt)}}
{{showLocalTime(scope.row.lastAccessTime)}}
</template>
</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 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 label="性别">
<template slot-scope="scope">
{{scope.row.face.sex |sexfn}}
{{scope.row.sex |sexfn}}
</template>
</el-table-column>
<el-table-column prop="face.age" label="年龄"></el-table-column>
<el-table-column prop="camera.name" label="抓拍人像">
<template slot-scope="scope" class="accomimg-box">
<img :src="scope.row.pic_url" class="accomimg"/>
<el-table-column prop="age" label="年龄"></el-table-column>
<el-table-column label="抓拍人像">
<template slot-scope="scope">
<div class="accomimg-box">
<el-popover
placement="left"
width="150"
trigger="hover"
>
<div class="pop-img">
<img slot="reference" :src="scope.row.pic_url"/>
</div>
<img slot="reference" :src="scope.row.pic_url" class="accomimg"/>
</el-popover>
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="300px" align="center">
......@@ -82,19 +91,16 @@ export default {
data() {
return {
communityData: [],
loading: true,
crucialData:[],
loading: false,
Progressdialog:false,
search: {
communityunid: "",
camrename: "",
identity: "",
dt: "1",
sex: "",
dtNumber: "",
cameraname: "",
crucial_type:'',
datatime: ""
},
camrefid: "",
cameraname: "",
page: {
limit: 20,
offset: 0,
......@@ -116,7 +122,7 @@ export default {
handleSizeChange(val) {},
handleCurrentChange(val) {
this.page.offset = (val - 1) * this.page.limit;
this.faceCheck();
this.getFaceData();
this.page.currentPage = val;
},
handleEdit(index, row) {
......@@ -125,12 +131,16 @@ export default {
this.dialogVisible = true;
},
searchFaceCheck() {
this.faceCheck();
this.getFaceData();
this.page.offset = 0;
this.page.currentPage = 0;
},
faceCheck() {
initDbData(){
this.axios.get(this.API.url + "/codes/custom/cates/4DD23AF66E/codes").then((response)=> {
this.crucialData = response.data.list_data;
});
},
getFaceData() {
this.loading = true;
var checknum_greater = this.search.dtNumber,
gte_checknum_greater,
......@@ -145,20 +155,17 @@ export default {
}
var Vthis = this;
this.axios
.get(this.API.faceweb + "/faces/aggregate?", {
.get("http://192.168.9.228:8080/api/v1/face_web/face_events"
// this.API.faceweb + "/face_events?", {
,{
params: {
offset: Vthis.page.offset,
limit: Vthis.page.limit,
addr_unid_is_null: "",
is_active: true,
events_count__gte: gte_checknum_greater,
events_count__lt: lt_checknum_greater,
camera_addr_unids: this.search.communityunid,
camera_name__like: this.search.camrename,
event_dt__gte: this.setUtcTime(this.search.datatime[0]),
event_dt__lt: this.setUtcTime(this.search.datatime[1]),
name_flag: this.search.identity,
sex: this.search.sex,
}
}).then(function(response) {
Vthis.tableData = response.data.list_data;
......@@ -180,14 +187,10 @@ export default {
}
this.axios.get(this.API.faceweb + "/faces/aggregate/export",{
params:{
"events_count__gte":gte_checknum_greater,
"events_count__lt":lt_checknum_greater,
"camera_addr_unids":this.search.communityunid,
"camera_name__like": this.search.camrename,
"event_dt__gte": this.setUtcTime(this.search.datatime[0]),
"event_dt__lt": this.setUtcTime(this.search.datatime[1]),
"name_flag": this.search.identity,
"sex": this.search.sex,
"limit":100
}
}).then((response)=>{
......@@ -205,8 +208,7 @@ export default {
})
},
showDownloadsize(unid){
this.axios.get(this.API.this.API.faceweb + "/consume_time_request/"+unid).then((response)=>{
// this.axios.get("http://192.168.9.225:8080/FACE-DETECT-WEB/api/v1/face_web" + "/consume_time_request/"+unid).then((response)=>{
this.axios.get(this.API.faceweb + "/consume_time_request/"+unid).then((response)=>{
if(response.data.response_json){
var sizeInfo = JSON.parse(response.data.response_json);
debugger
......@@ -222,8 +224,8 @@ export default {
}
});
},
handleSee(){
this.$refs.track.init()
handleSee(index,data){
this.$refs.track.init(data)
}
},
components: {
......@@ -231,7 +233,7 @@ export default {
tracks
},
created() {
this.faceCheck();
this.getFaceData();
this.communityData = this.$store.state.orgData;
}
};
......@@ -249,4 +251,20 @@ export default {
width 100%
}
}
.accomimg-box{
height 60px
width 60px
img{
height 100%
width 100%
}
}
.pop-img{
height 150px
width 150px
img {
height 100%
width 100%
}
}
</style>
......@@ -4,10 +4,10 @@
<div class="pic-left-box">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="单人脸搜索" name="one">
<onpice></onpice>
<onpice @onceFace="onceFace"></onpice>
</el-tab-pane>
<el-tab-pane label="多人脸搜索" name="more">
<morepic></morepic>
<morepic @moreFace="moreFace"></morepic>
</el-tab-pane>
<el-tab-pane label="人脸比对" name="compar">
<compaarisonpic></compaarisonpic>
......@@ -17,12 +17,20 @@
<div class="pic-right-box">
<div class="result-box" v-show="activeName == 'one'">
<div class="one-pic-box" v-for="item in 15">
<div v-for="(item,index) in oncefaceData" :key="index" class="one-pic-box">
<div class="one-pic-item-box">
<img src="./1.jpg" alt="">
</div>
<div class="pic-info">
<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">相似度:{{item.score}}</span>
</div>
</div>
</div>
<div class="result-box" v-show="activeName == 'more'">
<div class="more-pic-box" v-for="item in 15">
<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>
......@@ -69,6 +77,8 @@ export default {
value1: "",
imageUrl:'',
activeName: 'one',
oncefaceData:[],
morefaceData:[]
};
},
components:{
......@@ -83,6 +93,16 @@ export default {
handleClick(tab, event) {
console.log(tab.name);
},
onceFace (val) {
this.oncefaceData = val;
},
moreFace(val){
this.morefaceData = val;
},
setsex(val){
if(val == "male") return "男"
if(val == "female") return "女"
},
connectws(){
}
......@@ -148,15 +168,26 @@ export default {
.one-pic-box{
float left
width 200px
height 200px
height 240px
margin 0 0 20px 20px
border-radius 5px
box-shadow 0 0 3px rgba(0,0,0,.3)
overflow hidden
.one-pic-item-box {
width 200px
height 200px
box-shadow 0 0 3px rgba(0,0,0,.3)
}
img{
height 100%
width 100%
}
.pic-info{
.info-item{
display inline-block
width 90px
}
}
}
}
.more-pic-box {
......
......@@ -7,7 +7,7 @@
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
......@@ -16,7 +16,7 @@
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
......
......@@ -7,6 +7,7 @@
drag
action=""
:http-request="uploadsearchimg"
:on-remove="handleRemove"
multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
......@@ -20,6 +21,7 @@
</template>
<script>
import {mapGetters} from 'vuex'
export default {
data() {
return {
......@@ -28,15 +30,76 @@ export default {
value: "",
value1: "",
imageUrl:'',
dbname:''
dbname:'',
base64List:[]
};
},
methods: {
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file){
const isJPG = file.type === "image/jpeg";
const isLt1M = file.size / 1024 / 1024 < 1;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
}
if (!isLt1M) {
this.$message.error("上传头像图片大小不能超过 1MB!");
}
return isJPG && isLt1M;
},
handleRemove(file){
this.base64List.forEach((ele,index) => {
if(file.uid == ele.uid){
this.base64List.splice(index,1)
console.log(this.base64List)
}
})
},
created() {}
uploadsearchimg(file){
var file = file;
this.base64Img(file).then(res => {
this.imageUrl = res.src
this.base64 = res.pic_base64
debugger
let obj = {}
obj.uid = file.file.uid
obj.pic_base64 = res.pic_base64
this.base64List.push(obj)
})
},
searchPic(){
let baseData = []
this.base64List.forEach(ele => {
baseData.push(ele.pic_base64)
})
let data = {
sessionId: localStorage.getItem("user_id"),
similarity:this.similarity,
crucial_type:this.dbname,
limit:20,
pics_base64:baseData
}
console.log(data);
this.axios.post(this.API.faceweb + '/faces/image_search', data).then((res)=> {
});
}
},
computed:{
...mapGetters(['faceinfo','alarmInfo'])
},
created() {},
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)
})
}
}
}
};
</script>
<style lang="stylus" scoped>
......
......@@ -8,7 +8,7 @@
:http-request="uploadsearchimg"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
......@@ -34,6 +34,7 @@
</template>
<script>
import {mapGetters} from 'vuex'
export default {
data() {
return {
......@@ -65,7 +66,6 @@ export default {
uploadsearchimg(file){
var file = file;
this.base64Img(file).then(res => {
debugger
this.imageUrl = res.src
this.base64 = res.pic_base64
})
......@@ -77,7 +77,7 @@ export default {
},
searchPic(){
let data = {
sessionId:this.$store.state.sessionId,
sessionId: localStorage.getItem("user_id"),
similarity:this.similarity,
crucial_type:this.dbname,
limit:20,
......@@ -89,9 +89,20 @@ export default {
});
}
},
computed:{
...mapGetters(['faceinfo','alarmInfo'])
},
created() {
this.initDbData()
},
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)
})
}
}
}
};
</script>
......@@ -110,7 +121,7 @@ export default {
}
.pic-search-box{
width 90%
margin 0 auto
margin 10px auto 0
color #333
}
.sim-box{
......
......@@ -5,7 +5,7 @@
:visible.sync="show"
width="50%"
:before-close="handleClose">
<el-table :data="gridData">
<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>
......@@ -37,26 +37,10 @@ export default {
page: {
offset: 0,
currentPage: 1,
limit: 5,
limit: 10,
total: 0
},
gridData: [{
date: '2016-05-02 16:00:00',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04 16:00:0',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01 16:00:0',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-03 16:00:0',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
trackData: [],
}
},
props: {
......@@ -64,14 +48,17 @@ export default {
faceunid: {}
},
methods:{
init(){
init(data){
this.show = true;
console.log(data)
this.axios.get(this.API.url + '/faces/' + this.faceunid + '/face_events',{
this.axios.get(this.API.url + '/faces/' + data.face_unid + '/face_events',{
params: {
limit: this.page.limit,
offset: this.page.offset,
}
}).then(res => {
console.log(res.data)
this.trackData = res.data.list_data;
})
},
handleCurrentChange(val) {
......@@ -79,7 +66,9 @@ export default {
this.page.offset = (val - 1) * this.page.limit;
this.init();
},
handleClose(){
this.show = false;
},
},
mounted(){
}
......
......@@ -127,6 +127,7 @@ export default {
"offset":this.page.offset
}
}).then(response => {
debugger
this.tableData = response.data.list_data;
this.page.total = response.data.total_num;
});
......
<template>
<div class="template-box content_div_main setting-box">
<div>推送设置</div>
<div class="template-box content_div_main">
<div class="setting-box">
<el-row class="mb10">
<el-col :span="2">
<el-checkbox v-model="daychecked">天计划</el-checkbox>
</el-col>
<el-col :span="10">
<el-time-select
v-model="timer"
:picker-options="{
start: '08:00',
step: '01:00',
end: '18:00'
}"
placeholder="选择时间">
</el-time-select>
</el-col>
</el-row>
<el-row class="mb10">
<el-col :span="2">
<el-checkbox v-model="weekchecked">周计划</el-checkbox>
</el-col>
<el-col :span="10">
<el-select v-model="week" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row class="mb10">
<el-col :span="2">
<el-checkbox v-model="monthchecked">月计划</el-checkbox>
</el-col>
<el-col :span="10">
<el-select v-model="month" placeholder="请选择">
<el-option
v-for="item in 31"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<span class="month-title">不满31天月份将按照当月月底进行调整</span>
</el-col>
</el-row>
<div class="persion-box">
<el-transfer v-model="user"
:titles="['成员列表', '选中成员']"
:data="sysData"></el-transfer>
</div>
<div class="btn-box">
<el-button type="primary">保存设置</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
radio:3,
userdata:[],
daychecked:false,
weekchecked:false,
monthchecked:false,
value:[1,4],
options:[{
value: '1',
label: '星期一'
},{
value: '2',
label: '星期二'
},{
value: '3',
label: '星期三'
},{
value: '4',
label: '星期四'
},{
value: '5',
label: '星期五'
},{
value: '6',
label: '星期六'
},{
value: '7',
label: '星期日'
}],
week:'',
timer:'',
month:'',
user:[],
sysData:[]
}
},
methods: {
saveSet(){
let data = {
day:"09:00",
week:1,
month:12,
openState:'day'
}
this.axios.post('',data).then(res => {
console.log(res.data);
})
},
getSysUser() {
var Vthis = this;
this.axios
.get(this.API.auth.user, {
params: {
limit: 10000,
offset: 0,
is_active: true,
user_type: "user",
norm_type: "login"
}
}).then((response) => {
let resdata = response.data.list_data;
let sysArr = []
resdata.forEach(ele => {
let obj = {
key:ele.user_unid,
label:ele.name
}
sysArr.push(obj)
});
this.sysData = sysArr
});
},
},
created() {
this.getSysUser()
},
};
</script>
<style lang="stylus" scoped>
.setting-box{
margin 20px 40px
color #333
.el-checkbox{
color #666
}
}
.sysuser{
background #fff
......@@ -55,4 +182,16 @@ export default {
right 10px
button
float right
.mb10
margin-bottom 10px
.persion-box{
margin-top 30px
}
.btn-box{
margin-top 20px
}
.month-title{
font-size 12px
color #e4393c
}
</style>
......@@ -21,13 +21,13 @@
<div class="play-video-box">
<div class="play-box"></div>
<div class="show-pic-box">
<div v-for="item in 15" class="pic-box">
<img src="./testimg/2.jpg" alt="">
<div v-for="(item,index) in eventfaceData" class="pic-box" :key="index">
<img :src="item.pic_url" alt="">
</div>
</div>
</div>
<div class="comparison-box">
<div class="item-box" v-for="item in 5">
<div class="item-box" v-for="item in 5" :key="item">
<div class="org-img">
<img src="./testimg/1.jpg" alt="">
<div class="img-info">
......@@ -61,6 +61,8 @@ export default {
data() {
return {
treedata: [],
eventfaceData:[],
faceclock:null,
searchvideo:'',
defaultProps: {
children: 'childs',
......@@ -118,15 +120,29 @@ export default {
filterNode(value, data) {
if (!value) return true;
return data.org_name.indexOf(value) !== -1;
},
geteventData(){
this.axios.get(this.API.faceweb + "/face_events").then(res => {
// console.log(res.data);
this.eventfaceData = res.data.list_data;
})
}
},
beforeDestroy(){
clearInterval(this.faceclock);
this.faceclock = null;
},
watch: {
searchvideo(val) {
this.$refs.videotree.filter(val);
}
},
},
created() {
this.getorgtree()
this.getorgtree();
this.faceclock = setInterval((res)=>{
this.geteventData();
},2000)
}
};
</script>
......
<template>
<div id="sim">
<canvas :id="cid" class="simcav"></canvas>
</div>
</template>
<script>
export default {
props:['cid'],
data(){
return{
}
},
methods:{
drawoutround(){
let c=document.getElementById(this.cid);
debugger
let ctx = c.getContext("2d")
c.width = 300
c.height = 150
ctx.beginPath();
var gradient=ctx.createLinearGradient(0,0,170,0);
gradient.addColorStop("1","rgba(0,0,237,.4)");
gradient.addColorStop("0.3","rgba(33,149,237,.4)");
gradient.addColorStop("0.6","rgba(33,149,237,.8)");
gradient.addColorStop("0","rgba(33,149,237,1)");
// 用渐变进行填充
ctx.strokeStyle=gradient;
ctx.lineWidth=10;
ctx.arc(135,70,40,0,1.8*Math.PI,false)
ctx.lineCap = "round"
ctx.stroke();
ctx.font="18px Verdana";
var gradient=ctx.createLinearGradient(0,0,c.width,0);
gradient.addColorStop("0","magenta");
gradient.addColorStop("0.5","blue");
gradient.addColorStop("1.0","red");
// 用渐变填色
ctx.fillStyle=gradient;
ctx.fillText("80%",115,75);
}
},
mounted(){
this.drawoutround()
}
}
</script>
<style>
.simcav{
height: 150px;
width: 300px;
position: absolute;
left: -80px
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!