Commit 29779967 by 李金轩

初始版本

1 parent 6620a84a
...@@ -1065,6 +1065,12 @@ ...@@ -1065,6 +1065,12 @@
</el-menu> </el-menu>
<div v-if="currentIndex6 === '1'"> <div v-if="currentIndex6 === '1'">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<!-- <el-form-item label="平台:">-->
<!-- <el-select>-->
<!-- <el-option :label="'Store'" :value="'Store'"></el-option>-->
<!-- <el-option :label="'Mall'" :value="'Store'"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="集团:"> <el-form-item label="集团:">
<el-select <el-select
v-model="accountVal" v-model="accountVal"
...@@ -1098,12 +1104,12 @@ ...@@ -1098,12 +1104,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="广场:">--> <!-- <el-form-item label="广场:">-->
<!-- <el-select>--> <!-- <el-select>-->
<!-- <el-option :label="'Store'"></el-option>--> <!-- <el-option :label="'Store'"></el-option>-->
<!-- <el-option :label="'Mall'"></el-option>--> <!-- <el-option :label="'Mall'"></el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="出入类型:"> <el-form-item label="出入类型:">
<el-select v-model="type6"> <el-select v-model="type6">
<el-option :label="'广场出入口'" :value="1"></el-option> <el-option :label="'广场出入口'" :value="1"></el-option>
...@@ -1112,7 +1118,7 @@ ...@@ -1112,7 +1118,7 @@
<el-option :label="'其他'" :value="4"></el-option> <el-option :label="'其他'" :value="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="门店:"> <el-form-item label="商场/门店:">
<el-select <el-select
v-model="mallVal" v-model="mallVal"
filterable filterable
...@@ -1145,6 +1151,28 @@ ...@@ -1145,6 +1151,28 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="区域信息:">
<el-select
v-model="zoneValue"
filterable
multiple
collapse-tags
:clearable="false"
class="query-select mall-sel-box"
>
<el-option
v-for="item in zoneList"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="监控点名称:"> <el-form-item label="监控点名称:">
<el-select <el-select
v-model="gateVal" v-model="gateVal"
...@@ -1182,10 +1210,8 @@ ...@@ -1182,10 +1210,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择日期:"> <el-form-item label="选择日期:">
<el-select> <el-date-picker v-model="time6" type="datetimerange" range-separator="至">
<el-option :label="'Store'"></el-option> </el-date-picker>
<el-option :label="'Mall'"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="confirmSearch" type="primary">搜索</el-button> <el-button @click="confirmSearch" type="primary">搜索</el-button>
...@@ -1193,82 +1219,218 @@ ...@@ -1193,82 +1219,218 @@
</el-form> </el-form>
<el-row> <el-row v-for="row in pagedTableDataList1">
<el-col :span="6"> <el-col :span="3" v-for="item in row">
<div class="folder-cover-image"> <div style="margin: 0 5px">
<img :src="'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'" <img :src="item.picture_url"
style="width: 100%; height: auto"> style="width: 100%; height: auto;">
<div>时间:</div> <div>时间:{{item.counttime}}</div>
<div>方向:</div> <div>{{formatDirection(item.direction)}}</div>
<div>地点:</div> <div>地点:{{item.gate_name}}</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-pagination @current-change="onPageNumChange1"
@size-change="onPageSizeChange1"
:current-page="pageNum1"
:page-size="pageSize1"
:total="total1"
:page-sizes="[24, 48, 96, 192]"
layout="total, sizes, prev, pager, next, jumper"
style="text-align:center"
>
</el-pagination>
</div> </div>
<div v-if="currentIndex6 === '2'"> <div v-if="currentIndex6 === '2'">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<el-form-item label="平台:">
<el-select>
<el-option :label="'Store'"></el-option>
<el-option :label="'Mall'"></el-option>
</el-select>
</el-form-item>
<el-form-item label="集团:"> <el-form-item label="集团:">
<el-select> <el-select
<el-option :label="'Store'"></el-option> v-model="accountVal"
<el-option :label="'Mall'"></el-option> filterable
multiple
collapse-tags
:clearable="false"
placeholder="请选择集团"
class="query-select mall-sel-box"
@change="accountchange"
>
<div
:class="isAccoutSelAll ? 'sel-all-box selected' : 'sel-all-box'"
@click="selAllHandle('accout')"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">全选</span>
</div>
<el-option
v-for="item in accoutOpts"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">{{ item.name }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="广场:"> <!-- <el-form-item label="广场:">-->
<el-select> <!-- <el-select>-->
<el-option :label="'Store'"></el-option> <!-- <el-option :label="'Store'"></el-option>-->
<el-option :label="'Mall'"></el-option> <!-- <el-option :label="'Mall'"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="出入类型:">
<el-select v-model="type6">
<el-option :label="'广场出入口'" :value="1"></el-option>
<el-option :label="'楼层出入口'" :value="2"></el-option>
<el-option :label="'店铺出入口'" :value="3"></el-option>
<el-option :label="'其他'" :value="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="出入类型:"> <el-form-item label="商场/门店:">
<el-select> <el-select
<el-option :label="'Store'"></el-option> v-model="mallVal"
<el-option :label="'Mall'"></el-option> filterable
multiple
collapse-tags
:clearable="false"
placeholder="请选择商场"
class="query-select mall-sel-box"
@change="mallchange"
>
<div
:class="isMallSelAll ? 'sel-all-box selected' : 'sel-all-box'"
@click="selAllHandle()"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">全选</span>
</div>
<el-option
v-for="item in mallOpts"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">{{ item.name }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="门店:"> <el-form-item label="区域信息:">
<el-select> <el-select
<el-option :label="'Store'"></el-option> v-model="zoneValue"
<el-option :label="'Mall'"></el-option> filterable
multiple
collapse-tags
:clearable="false"
class="query-select mall-sel-box"
>
<el-option
v-for="item in zoneList"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span class="custom-checkbox__input">
<span class="custom-checkbox__inner"></span>
</span>
<span style="padding-left: 5px;">{{ item.name }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="监控点:"> <el-form-item label="监控点名称:">
<el-select> <el-select
<el-option :label="'Store'"></el-option> v-model="gateVal"
<el-option :label="'Mall'"></el-option> filterable
clearable
placeholder="请选择监控点"
@change="getChannel"
>
<el-option
v-for="(item, index) in gateOpt"
:key="item.index"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="方向:"> <el-form-item label="方向:">
<el-select> <el-select v-model="direction6">
<el-option :label="'Store'"></el-option> <el-option :label="'进'" :value="1"></el-option>
<el-option :label="'Mall'"></el-option> <el-option :label="'出'" :value="0"></el-option>
<el-option :label="'横穿'" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="抓拍类型:"> <el-form-item label="抓拍类型:">
<el-select> <el-select v-model="picType6">
<el-option :label="'Store'"></el-option> <el-option :label="'半身照'" :value="1"></el-option>
<el-option :label="'Mall'"></el-option> <el-option :label="'全身照'" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="人员类型:"> <el-form-item label="人员类型:">
<el-select> <el-select v-model="personType6">
<el-option :label="'Store'"></el-option> <el-option :label="'店员'" :value="1"></el-option>
<el-option :label="'Mall'"></el-option> <el-option :label="'顾客'" :value="0"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择日期:"> <el-form-item label="选择日期:">
<el-select> <el-date-picker v-model="time6" type="datetimerange" range-separator="至">
<el-option :label="'Store'"></el-option> </el-date-picker>
<el-option :label="'Mall'"></el-option> </el-form-item>
</el-select> <el-form-item label="图片数量:">
<el-row>
<el-col :span="10">
<el-input v-model="minPic"></el-input>
</el-col>
<el-col :span="1">
</el-col>
<el-col :span="10">
<el-input v-model="maxPic"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<el-button @click="confirmSearch2" type="primary">搜索</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button type="primary">搜索</el-button>
<div v-for="person in dataList2" style="margin: 10px 0;border: solid 1px black">
人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }}
<el-row v-for="row in getPagedList(person.perrsonList, 8)">
<el-col :span="3" v-for="item in row">
<div style="margin: 0 5px">
<img :src="item.picture_url"
style="width: 100%; height: auto;">
<div>时间:{{item.counttime}}</div>
<div>{{formatDirection(item.direction)}}</div>
<div>地点:{{item.gate_name}}</div>
</div>
</el-col>
</el-row>
</div>
<el-pagination @current-change="onPageNumChange2"
@size-change="onPageSizeChange2"
:current-page="pageNum2"
:page-size="pageSize2"
:total="total2"
:page-sizes="[24, 48, 96, 192]"
layout="total, sizes, prev, pager, next, jumper"
style="text-align:center"
>
</el-pagination>
</div> </div>
</div> </div>
<!-- <div class="clear-select"> <!-- <div class="clear-select">
...@@ -1329,6 +1491,9 @@ ...@@ -1329,6 +1491,9 @@
<script src="./js/common.js" type="text/javascript" charset="utf-8"></script> <script src="./js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/request.js"></script> <script src="./js/request.js"></script>
<script src="./js/api.js"></script> <script src="./js/api.js"></script>
<script src="./js/lodash.js"></script>
<script src="./js/moment.js"></script>
<script src="./js/utility.js"></script>
<script src="./js/home.js"></script> <script src="./js/home.js"></script>
</body> </body>
</html> </html>
...@@ -19,10 +19,23 @@ new Vue({ ...@@ -19,10 +19,23 @@ new Vue({
data: function() { data: function() {
return { return {
currentIndex6: '1', currentIndex6: '1',
type6: '', type6: 1,
direction6: '', direction6: 1,
picType6: '', picType6: 1,
personType6: '', personType6: 1,
time6: [new Date(), new Date()],
minPic: 0,
maxPic: 10,
pageNum1: 1,
pageSize1: 24,
total1: 0,
pageNum2: 1,
pageSize2: 24,
total2: 0,
dataList1: [],
dataList2: [],
zoneList: [],
zoneValue: [],
pickerOpts: { pickerOpts: {
disabledDate(time) { disabledDate(time) {
return Date.parse(time) > Date.parse(new Date()) return Date.parse(time) > Date.parse(new Date())
...@@ -204,6 +217,12 @@ new Vue({ ...@@ -204,6 +217,12 @@ new Vue({
} }
}, },
computed: { computed: {
pagedTableDataList1: function() {
return getPagedList(this.dataList1, 8)
},
pagedTableDataList2: function() {
return getPagedList(this.dataList2, 8)
},
isResultsShow() { isResultsShow() {
return this.dateFormat === 'revisitFeature' || return this.dateFormat === 'revisitFeature' ||
this.dateFormat === 'rebuildFeatureLib' || this.dateFormat === 'rebuildFeatureLib' ||
...@@ -283,6 +302,20 @@ new Vue({ ...@@ -283,6 +302,20 @@ new Vue({
}, },
methods: { methods: {
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
getPagedList: function(list, columnNum) {
const baseArray = list
const len = baseArray.length
const lineNum = len % columnNum === 0 ? len / columnNum : Math.floor((len / columnNum) + 1)
let result = []
for (let i = 0; i < lineNum; i++)
{
// slice() 方法返回一个从开始到结束(不包括结束)选择的数组的一部分浅拷贝到一个新数组对象。且原始数组不会被修改。
const temp = baseArray.slice(i * columnNum, i * columnNum + columnNum)
result.push(temp)
}
return result
},
dateLevel: function() { dateLevel: function() {
if (this.dateFormat == "repair") if (this.dateFormat == "repair")
{ {
...@@ -291,8 +324,13 @@ new Vue({ ...@@ -291,8 +324,13 @@ new Vue({
else if (this.dateFormat == "snapGatherClass") else if (this.dateFormat == "snapGatherClass")
{ {
this.getGate() this.getGate()
get('http://36.112.68.214:9999' + '/faceRecognitions/faceRecord', {}).then( get(
function(r) { 'http://36.112.68.214:9999' + '/malls',
{
accountIds: 2
}
).then(
(r) => {
log(r) log(r)
} }
) )
...@@ -305,18 +343,117 @@ new Vue({ ...@@ -305,18 +343,117 @@ new Vue({
onMenuSelect: function(value) { onMenuSelect: function(value) {
this.currentIndex6 = value this.currentIndex6 = value
}, },
formatDirection: function(number) {
switch (number)
{
case 1:
{
return '进'
}
case 0:
{
return '出'
}
case 2:
{
return '横穿'
}
default:
{
break
}
}
},
confirmSearch: function() { confirmSearch: function() {
log( const data = filterEmptyValueInObject(
// this.accountVal, {
this.type6, account_id: this.accountVal.toString(),
// this.mallVal, // account_id: 16,
// this.gateVal, type: this.type6,
this.direction6, // type: 3,
this.picType6, zone_id: this.mallVal.toString(),
this.personType6, // zone_id: 48,
gate_id: this.gateVal,
// gate_id: 268,
direction: this.direction6,
picType: this.picType6,
personType: this.personType6,
// personType: 0,
// plaza_id: 40,
plaza_id: this.zoneValue.toString(),
startTime: formatDate(this.time6[0]),
endTime: formatDate(this.time6[1]),
page: this.pageNum1 - 1,
pageSize: this.pageSize1,
}
)
get(
'http://36.112.68.214:9999' + '/faceRecognitions/faceRecord',
data
).then(
(r) => {
this.dataList1 = r.data.persons
this.total1 = r.data.pageNum
}
)
},
confirmSearch2: function() {
const data = filterEmptyValueInObject(
{
account_id: this.accountVal.toString(),
// account_id: 16,
type: this.type6,
// type: 3,
zone_id: this.mallVal.toString(),
// zone_id: 48,
gate_id: this.gateVal,
// gate_id: 268,
direction: this.direction6,
picType: this.picType6,
personType: this.personType6,
// personType: 0,
// plaza_id: 40,
plaza_id: this.zoneValue.toString(),
startTime: formatDate(this.time6[0]),
endTime: formatDate(this.time6[1]),
minPic: this.minPic,
maxPic: this.maxPic,
page: this.pageNum2 - 1,
pageSize: this.pageSize2,
}
)
get(
'http://36.112.68.214:9999' + '/faceRecognitions/faceRecordGroup',
data
).then(
(r) => {
this.dataList2 = r.data.persons
this.total2 = r.data.pageNum
}
) )
}, },
onPageNumChange1(num) {
this.pageNum1 = num
this.confirmSearch()
},
onPageSizeChange1(size) {
this.pageNum1 = 1
this.pageSize1 = size
this.confirmSearch()
},
onPageNumChange2(num) {
this.pageNum2 = num
this.confirmSearch2()
},
onPageSizeChange2(size) {
this.pageNum2 = 1
this.pageSize2 = size
this.confirmSearch2()
},
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
createDate() { createDate() {
var nowDate = new Date() var nowDate = new Date()
...@@ -412,8 +549,23 @@ new Vue({ ...@@ -412,8 +549,23 @@ new Vue({
if (this.accountVal.length > 0) if (this.accountVal.length > 0)
{ {
this.getMall(linkGate) this.getMall(linkGate)
this.getZone()
} }
}, },
getZone() {
let _this = this
_this.mallOpts = []
get('http://36.112.68.214:9999' + '/zones/zoneList', {
account_id: _this.accountVal.join(","),
plaza_id: _this.mallVal.join(",")
// account_id: 16,
// plaza_id: 40,
}).then(
(data) => {
_this.zoneList = data
}
)
},
mallchange(linkGate) { mallchange(linkGate) {
this.isMallSelAll = this.isMallSelAll this.isMallSelAll = this.isMallSelAll
? this.mallVal.length < this.mallOpts.length ? this.mallVal.length < this.mallOpts.length
...@@ -425,6 +577,7 @@ new Vue({ ...@@ -425,6 +577,7 @@ new Vue({
if (linkGate) if (linkGate)
{ {
this.getGate() this.getGate()
this.getZone()
} }
}, },
selAllHandle(level) { selAllHandle(level) {
...@@ -435,6 +588,7 @@ new Vue({ ...@@ -435,6 +588,7 @@ new Vue({
this.accountVal = [] this.accountVal = []
this.isAccoutSelAll = false this.isAccoutSelAll = false
this.getMall() this.getMall()
this.getZone()
} }
else else
{ {
...@@ -444,6 +598,7 @@ new Vue({ ...@@ -444,6 +598,7 @@ new Vue({
}) })
this.isAccoutSelAll = true this.isAccoutSelAll = true
this.getMall() this.getMall()
this.getZone()
} }
} }
else else
...@@ -466,7 +621,6 @@ new Vue({ ...@@ -466,7 +621,6 @@ new Vue({
getAccount: function() { getAccount: function() {
var _this = this var _this = this
_this.accoutOpts = [] _this.accoutOpts = []
log(454, window._CONF_.apiUrl + API.Accounts)
get(window._CONF_.apiUrl + API.Accounts).then(function(data) { get(window._CONF_.apiUrl + API.Accounts).then(function(data) {
_this.accoutOpts = data _this.accoutOpts = data
if (_this.accoutOpts.length > 0) if (_this.accoutOpts.length > 0)
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -12,7 +12,7 @@ Axios.interceptors.request.use( ...@@ -12,7 +12,7 @@ Axios.interceptors.request.use(
const atoken = Cookies.get('atoken') const atoken = Cookies.get('atoken')
// console.log('atoken', atoken) // console.log('atoken', atoken)
// atoken && (config.headers.Authorization = atoken) // atoken && (config.headers.Authorization = atoken)
config.headers.Authorization = '3a9b4412-12c8-473c-8216-8c9b6db00ea3' config.headers.Authorization = 'a054367f-717d-47fb-b870-7c599e030e16'
return config return config
}, },
error => { error => {
......
const formatDate = function(date) {
return moment(date).format("YYYY-MM-DD HH:mm:ss")
}
const getPagedList = function(list, columnNum) {
const baseArray = list
const len = baseArray.length
const lineNum = len % columnNum === 0 ? len / columnNum : Math.floor((len / columnNum) + 1)
let result = []
for (let i = 0; i < lineNum; i++)
{
// slice() 方法返回一个从开始到结束(不包括结束)选择的数组的一部分浅拷贝到一个新数组对象。且原始数组不会被修改。
const temp = baseArray.slice(i * columnNum, i * columnNum + columnNum)
result.push(temp)
}
return result
}
const isEqual = (value, other) => {
return _.isEqual(value, other)
}
const isOneOfTheseValue = function(value, expectedValueList) {
for (let expectedValue of expectedValueList)
{
if (isEqual(value, expectedValue))
{
return true
}
}
return false
}
const filterEmptyValueInObject = function(object) {
for (let key in object)
{
let value = object[key]
if (isOneOfTheseValue(value, ['', NaN, undefined, null]))
{
delete object[key]
}
}
return object
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!