Commit 80f9966d by 李乾广

修改bug,抓拍聚类类型筛选改为系统级人员类型

1 parent 2fba9702
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 230px" /> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 230px" />
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 120px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 120px" />
<a-time-picker v-model:value="queryForm.endTime" style="width: 120px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 120px" />
</a-form-item> </a-form-item>
<a-form-item label="图片数量:" style="padding: 5px 0"> <a-form-item label="图片数量:" style="padding: 5px 0">
<a-input-number v-model:value="queryForm.minPic" :min="0" style="width: 100px"/> <a-input-number v-model:value="queryForm.minPic" :min="0" style="width: 100px"/>
...@@ -197,8 +197,8 @@ ...@@ -197,8 +197,8 @@
picType: 2, picType: 2,
personType: [1, 0], personType: [1, 0],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
minPic:'', minPic:'',
maxPic:'', maxPic:'',
}) })
...@@ -379,8 +379,8 @@ ...@@ -379,8 +379,8 @@
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
minPic:rawData.minPic, minPic:rawData.minPic,
maxPic:rawData.maxPic, maxPic:rawData.maxPic,
page: pageNum.value - 1, page: pageNum.value - 1,
...@@ -399,8 +399,8 @@ ...@@ -399,8 +399,8 @@
date: rawData.date, date: rawData.date,
minPic: rawData.minPic, minPic: rawData.minPic,
maxPic: rawData.maxPic, maxPic: rawData.maxPic,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: rawData.endTime,
} }
) )
let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition')); let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
...@@ -500,8 +500,8 @@ ...@@ -500,8 +500,8 @@
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
person_unid:boxObj.value.person_unid, person_unid:boxObj.value.person_unid,
} }
comparsionResultApi.getPersonsDetailList(parmas).then((r) => { comparsionResultApi.getPersonsDetailList(parmas).then((r) => {
...@@ -537,8 +537,8 @@ ...@@ -537,8 +537,8 @@
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
person_unid:boxObj.value.person_unid, person_unid:boxObj.value.person_unid,
} }
comparsionResultApi.getPersonsDetailList(parmas).then((r) => { comparsionResultApi.getPersonsDetailList(parmas).then((r) => {
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 230px" /> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 230px" />
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 100px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 100px" />
<a-time-picker v-model:value="queryForm.endTime" style="width: 100px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 100px" />
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
picType: 2, picType: 2,
personType: [1, 0], personType: [1, 0],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
}) })
const searchCondition = ref({}) const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){ if(window.localStorage.getItem('searchCondition')){
...@@ -424,8 +424,8 @@ ...@@ -424,8 +424,8 @@
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
}) })
...@@ -440,8 +440,8 @@ ...@@ -440,8 +440,8 @@
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType, personType: rawData.personType,
date: rawData.date, date: rawData.date,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: rawData.endTime,
} }
) )
let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition')); let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
<a-form-item label="集团:" style="padding: 5px 0"> <a-form-item label="集团:" style="padding: 5px 0">
<a-select v-model:value="queryForm.account_id" <a-select v-model:value="queryForm.account_id"
style="width: 240px" style="width: 240px"
mode="multiple"
:maxTagCount="1"
@change="onAccountChange" @change="onAccountChange"
:options="accountList" :options="accountList"
optionFilterProp="label" optionFilterProp="label"
...@@ -16,8 +14,6 @@ ...@@ -16,8 +14,6 @@
<a-form-item label="广场:" style="padding: 5px 0"> <a-form-item label="广场:" style="padding: 5px 0">
<a-select v-model:value="queryForm.plaza_id" <a-select v-model:value="queryForm.plaza_id"
style="width: 240px" style="width: 240px"
mode="multiple"
:maxTagCount="1"
@change="onPlazaChange" @change="onPlazaChange"
:options="plazaList" :options="plazaList"
optionFilterProp="label" optionFilterProp="label"
...@@ -78,11 +74,10 @@ ...@@ -78,11 +74,10 @@
<a-form-item label="人员类型:" style="padding: 5px 0"> <a-form-item label="人员类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.personType" <a-select v-model:value="queryForm.personType"
mode="multiple" mode="multiple"
:options="personTypeList"
optionFilterProp="label"
:maxTagCount="1" :maxTagCount="1"
style="width: 240px"> style="width: 240px">
<a-select-option :value="1">店员</a-select-option>
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="-99">未知</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="年龄类型:" style="padding: 5px 0"> <a-form-item label="年龄类型:" style="padding: 5px 0">
...@@ -129,14 +124,14 @@ ...@@ -129,14 +124,14 @@
<a-button type="primary" @click="handleMutipleOperation">{{mutipleOperationText}}</a-button> <a-button type="primary" @click="handleMutipleOperation">{{mutipleOperationText}}</a-button>
<i class="el-icon-arrow-right" style="margin: 0px 10px;"></i> <i class="el-icon-arrow-right" style="margin: 0px 10px;"></i>
<el-button type="text" :disabled="!isMultipleOperation" @click="movePersonRecord(person)">移动</el-button> <el-button type="text" :disabled="!isMultipleOperation" @click="movePersonRecord(person)">移动</el-button>
<a-popconfirm <!-- <a-popconfirm
title="将从本组中剔除,您确认吗?" title="将从本组中剔除,您确认吗?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="deletePersonRecord(person)" "
> >
<el-button type="text" :disabled="!isMultipleOperation">剔除</el-button> </a-popconfirm> -->
</a-popconfirm> <el-button type="text" :disabled="!isMultipleOperation" @click="deletePersonRecord(person)">剔除</el-button>
<a-popconfirm <a-popconfirm
title="将彻底删除,您确认吗?" title="将彻底删除,您确认吗?"
ok-text="是" ok-text="是"
...@@ -267,6 +262,7 @@ export default { ...@@ -267,6 +262,7 @@ export default {
const dataList = ref([]) const dataList = ref([])
const accountList = ref([]) const accountList = ref([])
const plazaList = ref([]) const plazaList = ref([])
const personTypeList = ref([])
const zoneList = ref([]) const zoneList = ref([])
const gateList = ref([]) const gateList = ref([])
// const imgModelRef = ref(); // const imgModelRef = ref();
...@@ -281,14 +277,14 @@ export default { ...@@ -281,14 +277,14 @@ export default {
const singleImgComparisonRef = ref() const singleImgComparisonRef = ref()
const queryForm = reactive( const queryForm = reactive(
{ {
account_id: [], account_id: '',
plaza_id: [], plaza_id: '',
zone_id: [], zone_id: [],
gate_id: [], gate_id: [],
type: 0, type: 0,
direction: [1, -1, 0], direction: [1, -1, 0],
picType: 2, picType: 2,
personType: [1, 0], personType: [],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: '00:00:00', startTime: '00:00:00',
endTime: '23:59:59', endTime: '23:59:59',
...@@ -300,6 +296,7 @@ export default { ...@@ -300,6 +296,7 @@ export default {
const searchCondition = ref({}) const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){ if(window.localStorage.getItem('searchCondition')){
searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition')); searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition'));
console.log(13,searchCondition.value)
queryForm.type = searchCondition.value.type; queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id; queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id; queryForm.gate_id = searchCondition.value.gate_id;
...@@ -331,6 +328,7 @@ export default { ...@@ -331,6 +328,7 @@ export default {
} }
const onPlazaChange = function() { const onPlazaChange = function() {
reqPersonType()
getZoneList() getZoneList()
getGateList() getGateList()
} }
...@@ -340,11 +338,11 @@ export default { ...@@ -340,11 +338,11 @@ export default {
} }
const getPlazaList = function(val) { const getPlazaList = function(val) {
queryForm.plaza_id = [] queryForm.plaza_id = ''
plazaList.value = [] plazaList.value = []
clusterResultApi.getPlazaList( clusterResultApi.getPlazaList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'' account_id: queryForm.account_id
} }
).then( ).then(
(r) => { (r) => {
...@@ -361,13 +359,13 @@ export default { ...@@ -361,13 +359,13 @@ export default {
} }
if(plazaList.value.length>0){ if(plazaList.value.length>0){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){ if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id queryForm.plaza_id = searchCondition.value.plaza_id[0]
}else{ }else{
queryForm.plaza_id.push(plazaList.value[0].value) queryForm.plaza_id = plazaList.value[0].value
} }
reqPersonType(1)
getZoneList(1) getZoneList(1)
getGateList(1) getGateList(1)
confirmSearch()
} }
} }
} }
...@@ -378,8 +376,8 @@ export default { ...@@ -378,8 +376,8 @@ export default {
zoneList.value = [] zoneList.value = []
clusterResultApi.getZoneList( clusterResultApi.getZoneList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'', account_id: queryForm.account_id,
plaza_id: queryForm.plaza_id?queryForm.plaza_id.toString():'', plaza_id: queryForm.plaza_id,
} }
).then( ).then(
(r) => { (r) => {
...@@ -412,8 +410,8 @@ export default { ...@@ -412,8 +410,8 @@ export default {
gateList.value = [] gateList.value = []
clusterResultApi.getGateList( clusterResultApi.getGateList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'', account_id: queryForm.account_id,
plaza_id: queryForm.plaza_id?queryForm.plaza_id.toString():'', plaza_id: queryForm.plaza_id,
zone_id: queryForm.zone_id?queryForm.zone_id.toString():'', zone_id: queryForm.zone_id?queryForm.zone_id.toString():'',
type: queryForm.type, type: queryForm.type,
} }
...@@ -445,7 +443,7 @@ export default { ...@@ -445,7 +443,7 @@ export default {
} }
const getAccountList = function() { const getAccountList = function() {
queryForm.account_id = [] queryForm.account_id = ''
accountList.value = [] accountList.value = []
clusterResultApi.getAccountList().then( clusterResultApi.getAccountList().then(
(r) => { (r) => {
...@@ -462,9 +460,9 @@ export default { ...@@ -462,9 +460,9 @@ export default {
} }
if(accountList.value.length){ if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){ if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id queryForm.account_id = searchCondition.value.account_id[0]
}else{ }else{
queryForm.account_id.push(accountList.value[0].value) queryForm.account_id = accountList.value[0].value
} }
getPlazaList() getPlazaList()
} }
...@@ -492,9 +490,9 @@ export default { ...@@ -492,9 +490,9 @@ export default {
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const data = filterEmptyValueInObject( const data = filterEmptyValueInObject(
{ {
account_id: rawData.account_id?rawData.account_id.toString():'', account_id: rawData.account_id,
type: rawData.type, type: rawData.type,
plaza_id: rawData.plaza_id?rawData.plaza_id.toString():'', plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id?rawData.zone_id.toString():'', zone_id: rawData.zone_id?rawData.zone_id.toString():'',
gate_id: rawData.gate_id?rawData.gate_id.toString():'', gate_id: rawData.gate_id?rawData.gate_id.toString():'',
direction: rawData.direction?rawData.direction.toString():'', direction: rawData.direction?rawData.direction.toString():'',
...@@ -511,9 +509,9 @@ export default { ...@@ -511,9 +509,9 @@ export default {
) )
const storageData = filterEmptyValueInObject( const storageData = filterEmptyValueInObject(
{ {
account_id: rawData.account_id, account_id: [rawData.account_id],
type: rawData.type, type: rawData.type,
plaza_id: rawData.plaza_id, plaza_id: [rawData.plaza_id],
zone_id: rawData.zone_id, zone_id: rawData.zone_id,
gate_id: rawData.gate_id, gate_id: rawData.gate_id,
direction: rawData.direction, direction: rawData.direction,
...@@ -612,6 +610,30 @@ export default { ...@@ -612,6 +610,30 @@ export default {
} }
) )
} }
const reqPersonType = (val) => {
personTypeList.value = []
clusterResultApi.getPersonType({plaza_id:queryForm.plaza_id}).then(
(r) => {
console.log(1122,r)
if (isArray(r)) {
let personType = []
for (const item of r){
personType.push(item.id)
personTypeList.value.push({
value: item.id,
label: item.name,
})
}
if(personTypeList.value.length>0){
queryForm.personType = personType
}
}
if(val) {
confirmSearch()
}
}
)
};
// 人员类型修正 // 人员类型修正
const personGroupEditorRef = ref(); const personGroupEditorRef = ref();
...@@ -619,7 +641,8 @@ export default { ...@@ -619,7 +641,8 @@ export default {
const updatePersonInfoByGroup = function() { const updatePersonInfoByGroup = function() {
let par = { let par = {
person_unids:[], person_unids:[],
perrsonList:[] perrsonList:[],
personTypeList:personTypeList.value
} }
dataList.value.forEach(item=>{ dataList.value.forEach(item=>{
if (item.checked && item.checked == true) { if (item.checked && item.checked == true) {
...@@ -973,6 +996,7 @@ export default { ...@@ -973,6 +996,7 @@ export default {
// sequence // sequence
accountList, accountList,
plazaList, plazaList,
personTypeList,
zoneList, zoneList,
gateList, gateList,
pagedTableDataList, pagedTableDataList,
...@@ -1020,6 +1044,7 @@ export default { ...@@ -1020,6 +1044,7 @@ export default {
DetailDialogComparisonRef, DetailDialogComparisonRef,
singleImgComparisonRef, singleImgComparisonRef,
personGroupMoverRef, personGroupMoverRef,
reqPersonType,
isMultipleOperation, isMultipleOperation,
handleMutipleOperation, handleMutipleOperation,
......
...@@ -51,6 +51,20 @@ class ClusterResultApi { ...@@ -51,6 +51,20 @@ class ClusterResultApi {
} }
) )
} }
// 查询系统级人员类型
getPersonType(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/persontype/getByMallId`,
params: filterEmptyValueInObject(
{
plaza_id: data.plaza_id,
},
)
}
)
}
getGateList(data) { getGateList(data) {
return axiosInstance.request( return axiosInstance.request(
......
...@@ -29,10 +29,7 @@ ...@@ -29,10 +29,7 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="类型"> <a-form-item label="类型">
<a-select v-model:value="formData.type" :allowClear="true"> <a-select v-model:value="formData.type" :options="formData.personTypeList" optionFilterProp="label" :allowClear="true"></a-select>
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="1">员工</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-form> </a-form>
...@@ -61,6 +58,7 @@ export default { ...@@ -61,6 +58,7 @@ export default {
gender: 0, gender: 0,
type: 0, type: 0,
countdate: '', countdate: '',
personTypeList:[]
} }
} }
const formData = ref(getInitialFormData()) const formData = ref(getInitialFormData())
...@@ -69,6 +67,7 @@ export default { ...@@ -69,6 +67,7 @@ export default {
console.log('initDialog', data) console.log('initDialog', data)
formData.value = getInitialFormData() formData.value = getInitialFormData()
formData.value.personUnid = data.person_unids formData.value.personUnid = data.person_unids
formData.value.personTypeList = data.personTypeList
if (data.perrsonList.length > 0) { if (data.perrsonList.length > 0) {
formData.value.age = data.perrsonList[0].age formData.value.age = data.perrsonList[0].age
formData.value.gender = data.perrsonList[0].gender formData.value.gender = data.perrsonList[0].gender
...@@ -79,6 +78,8 @@ export default { ...@@ -79,6 +78,8 @@ export default {
} }
isVisible.value = true; isVisible.value = true;
}; };
const onCancel = () => { const onCancel = () => {
isVisible.value = false; isVisible.value = false;
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
<a-form-item label="集团:" style="padding: 5px 0"> <a-form-item label="集团:" style="padding: 5px 0">
<a-select v-model:value="queryForm.account_id" <a-select v-model:value="queryForm.account_id"
style="width: 280px" style="width: 280px"
mode="multiple"
:maxTagCount="1"
@change="onAccountChange" @change="onAccountChange"
:options="accountList" :options="accountList"
optionFilterProp="label" optionFilterProp="label"
...@@ -15,8 +13,6 @@ ...@@ -15,8 +13,6 @@
<a-form-item label="广场:" style="padding: 5px 0"> <a-form-item label="广场:" style="padding: 5px 0">
<a-select v-model:value="queryForm.plaza_id" <a-select v-model:value="queryForm.plaza_id"
style="width: 280px" style="width: 280px"
mode="multiple"
:maxTagCount="1"
@change="onPlazaChange" @change="onPlazaChange"
:options="plazaList" :options="plazaList"
optionFilterProp="label" optionFilterProp="label"
...@@ -76,11 +72,10 @@ ...@@ -76,11 +72,10 @@
<a-form-item label="人员类型:" style="padding: 5px 0"> <a-form-item label="人员类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.personType" <a-select v-model:value="queryForm.personType"
mode="multiple" mode="multiple"
:options="personTypeList"
optionFilterProp="label"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 240px">
<a-select-option :value="1">店员</a-select-option>
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="-99">未知</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="年龄类型:" style="padding: 5px 0"> <a-form-item label="年龄类型:" style="padding: 5px 0">
...@@ -230,6 +225,7 @@ export default { ...@@ -230,6 +225,7 @@ export default {
const dataList = ref([]) const dataList = ref([])
const accountList = ref([]) const accountList = ref([])
const plazaList = ref([]) const plazaList = ref([])
const personTypeList = ref([])
const zoneList = ref([]) const zoneList = ref([])
const gateList = ref([]) const gateList = ref([])
const imgModelRef = ref(); const imgModelRef = ref();
...@@ -245,14 +241,14 @@ export default { ...@@ -245,14 +241,14 @@ export default {
const queryForm = reactive( const queryForm = reactive(
{ {
account_id: [], account_id: '',
plaza_id: [], plaza_id: '',
zone_id: [], zone_id: [],
gate_id: [], gate_id: [],
type: 0, type: 0,
direction: [1, -1, 0], direction: [1, -1, 0],
picType: 2, picType: 2,
personType: [1, 0], personType: [],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: '00:00:00', startTime: '00:00:00',
endTime: '23:59:59', endTime: '23:59:59',
...@@ -292,6 +288,7 @@ export default { ...@@ -292,6 +288,7 @@ export default {
} }
const onPlazaChange = function() { const onPlazaChange = function() {
reqPersonType()
getZoneList() getZoneList()
getGateList() getGateList()
} }
...@@ -301,11 +298,11 @@ export default { ...@@ -301,11 +298,11 @@ export default {
} }
const getPlazaList = function(val) { const getPlazaList = function(val) {
queryForm.plaza_id = [] queryForm.plaza_id = ''
plazaList.value = [] plazaList.value = []
snapshotRecordApi.getPlazaList( snapshotRecordApi.getPlazaList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'' account_id: queryForm.account_id
} }
).then( ).then(
(r) => { (r) => {
...@@ -320,26 +317,50 @@ export default { ...@@ -320,26 +317,50 @@ export default {
} }
if(plazaList.value.length){ if(plazaList.value.length){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){ if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id queryForm.plaza_id = searchCondition.value.plaza_id[0]
}else{ }else{
queryForm.plaza_id.push(plazaList.value[0].value) queryForm.plaza_id = plazaList.value[0].value
} }
reqPersonType(1)
getZoneList(1) getZoneList(1)
getGateList(1) getGateList(1)
confirmSearch()
} }
} }
} }
) )
} }
const reqPersonType = (val) => {
personTypeList.value = []
snapshotRecordApi.getPersonType({plaza_id:queryForm.plaza_id}).then(
(r) => {
console.log(1122,r)
if (isArray(r)) {
let personType = []
for (const item of r){
personType.push(item.id)
personTypeList.value.push({
value: item.id,
label: item.name,
})
}
if(personTypeList.value.length>0){
queryForm.personType = personType
}
}
if(val) {
confirmSearch()
}
}
)
};
const getZoneList = function(val) { const getZoneList = function(val) {
// queryForm.zone_id = [] // queryForm.zone_id = []
zoneList.value = [] zoneList.value = []
snapshotRecordApi.getZoneList( snapshotRecordApi.getZoneList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'', account_id: queryForm.account_id,
plaza_id: queryForm.plaza_id?queryForm.plaza_id.toString():'', plaza_id: queryForm.plaza_id,
} }
).then( ).then(
(r) => { (r) => {
...@@ -372,8 +393,8 @@ export default { ...@@ -372,8 +393,8 @@ export default {
gateList.value = [] gateList.value = []
snapshotRecordApi.getGateList( snapshotRecordApi.getGateList(
{ {
account_id: queryForm.account_id?queryForm.account_id.toString():'', account_id: queryForm.account_id,
plaza_id: queryForm.plaza_id?queryForm.plaza_id.toString():'', plaza_id: queryForm.plaza_id,
zone_id: queryForm.zone_id?queryForm.zone_id.toString():'', zone_id: queryForm.zone_id?queryForm.zone_id.toString():'',
type: queryForm.type, type: queryForm.type,
} }
...@@ -405,7 +426,7 @@ export default { ...@@ -405,7 +426,7 @@ export default {
} }
const getAccountList = function() { const getAccountList = function() {
queryForm.account_id = [] queryForm.account_id = ''
accountList.value = [] accountList.value = []
snapshotRecordApi.getAccountList().then( snapshotRecordApi.getAccountList().then(
(r) => { (r) => {
...@@ -422,9 +443,9 @@ export default { ...@@ -422,9 +443,9 @@ export default {
} }
if(accountList.value.length){ if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){ if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id queryForm.account_id = searchCondition.value.account_id[0]
}else{ }else{
queryForm.account_id.push(accountList.value[0].value) queryForm.account_id = accountList.value[0].value
} }
getPlazaList() getPlazaList()
} }
...@@ -438,9 +459,9 @@ export default { ...@@ -438,9 +459,9 @@ export default {
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const data = filterEmptyValueInObject( const data = filterEmptyValueInObject(
{ {
account_id: rawData.account_id?rawData.account_id.toString():'', account_id: rawData.account_id,
type: rawData.type, type: rawData.type,
plaza_id: rawData.plaza_id?rawData.plaza_id.toString():'', plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id?rawData.zone_id.toString():'', zone_id: rawData.zone_id?rawData.zone_id.toString():'',
gate_id: rawData.gate_id?rawData.gate_id.toString():'', gate_id: rawData.gate_id?rawData.gate_id.toString():'',
direction: rawData.direction?rawData.direction.toString():'', direction: rawData.direction?rawData.direction.toString():'',
...@@ -455,9 +476,9 @@ export default { ...@@ -455,9 +476,9 @@ export default {
) )
const storageData = filterEmptyValueInObject( const storageData = filterEmptyValueInObject(
{ {
account_id: rawData.account_id, account_id: [rawData.account_id],
type: rawData.type, type: rawData.type,
plaza_id: rawData.plaza_id, plaza_id: [rawData.plaza_id],
zone_id: rawData.zone_id, zone_id: rawData.zone_id,
gate_id: rawData.gate_id, gate_id: rawData.gate_id,
direction: rawData.direction, direction: rawData.direction,
...@@ -895,6 +916,7 @@ export default { ...@@ -895,6 +916,7 @@ export default {
// sequence // sequence
accountList, accountList,
plazaList, plazaList,
personTypeList,
zoneList, zoneList,
gateList, gateList,
pagedTableDataList, pagedTableDataList,
......
...@@ -22,6 +22,20 @@ class SnapshotRecordApi { ...@@ -22,6 +22,20 @@ class SnapshotRecordApi {
} }
) )
} }
// 查询系统级人员类型
getPersonType(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/persontype/getByMallId`,
params: filterEmptyValueInObject(
{
plaza_id: data.plaza_id,
},
)
}
)
}
getPlazaList(data) { getPlazaList(data) {
return axiosInstance.request( return axiosInstance.request(
......
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 240px"/> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 240px"/>
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 140px"/> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 140px"/>
<a-time-picker v-model:value="queryForm.endTime" style="width: 140px"/> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 140px"/>
</a-form-item> </a-form-item>
<a-form-item label="图片数量:" style="padding: 5px 0"> <a-form-item label="图片数量:" style="padding: 5px 0">
<a-input v-model:value="queryForm.minPic" style="width: 129px"/> <a-input v-model:value="queryForm.minPic" style="width: 129px"/>
...@@ -239,8 +239,8 @@ export default { ...@@ -239,8 +239,8 @@ export default {
picType: 2, picType: 2,
personType: [1, 0], personType: [1, 0],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
minPic: 0, minPic: 0,
maxPic: 100, maxPic: 100,
childAdult:[], childAdult:[],
...@@ -255,8 +255,8 @@ export default { ...@@ -255,8 +255,8 @@ export default {
queryForm.direction = searchCondition.value.direction; queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType; queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date; queryForm.date = searchCondition.value.date;
// queryForm.startTime = searchCondition.value.startTime; queryForm.startTime = searchCondition.value.startTime;
// queryForm.endTime = searchCondition.value.endTime; queryForm.endTime = searchCondition.value.endTime;
queryForm.minPic = searchCondition.value.minPic||0; queryForm.minPic = searchCondition.value.minPic||0;
queryForm.maxPic = searchCondition.value.maxPic||100; queryForm.maxPic = searchCondition.value.maxPic||100;
} }
...@@ -437,8 +437,8 @@ export default { ...@@ -437,8 +437,8 @@ export default {
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
minPic: rawData.minPic, minPic: rawData.minPic,
maxPic: rawData.maxPic, maxPic: rawData.maxPic,
page: pageNum.value - 1, page: pageNum.value - 1,
...@@ -459,8 +459,8 @@ export default { ...@@ -459,8 +459,8 @@ export default {
date: rawData.date, date: rawData.date,
minPic: rawData.minPic, minPic: rawData.minPic,
maxPic: rawData.maxPic, maxPic: rawData.maxPic,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: rawData.endTime,
} }
) )
let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition')); let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px"/> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px"/>
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 140px"/> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 140px"/>
<a-time-picker v-model:value="queryForm.endTime" style="width: 140px"/> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 140px"/>
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
...@@ -204,8 +204,8 @@ export default { ...@@ -204,8 +204,8 @@ export default {
picType: 2, picType: 2,
personType: [1, 0], personType: [1, 0],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
childAdult:[], childAdult:[],
} }
) )
...@@ -218,8 +218,8 @@ export default { ...@@ -218,8 +218,8 @@ export default {
queryForm.direction = searchCondition.value.direction; queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType; queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date; queryForm.date = searchCondition.value.date;
// queryForm.startTime = searchCondition.value.startTime; queryForm.startTime = searchCondition.value.startTime;
// queryForm.endTime = searchCondition.value.endTime; queryForm.endTime = searchCondition.value.endTime;
} }
// function // function
const onPageNumChange = function(num) { const onPageNumChange = function(num) {
...@@ -394,8 +394,8 @@ export default { ...@@ -394,8 +394,8 @@ export default {
direction: rawData.direction.toString(), direction: rawData.direction.toString(),
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType.toString(), personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
childAdult: rawData.childAdult.toString(), childAdult: rawData.childAdult.toString(),
...@@ -412,8 +412,8 @@ export default { ...@@ -412,8 +412,8 @@ export default {
picType: rawData.picType, picType: rawData.picType,
personType: rawData.personType, personType: rawData.personType,
date: rawData.date, date: rawData.date,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: rawData.endTime,
} }
) )
let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition')); let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px" /> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px" />
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 140px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 140px" />
<span style="padding: 0 4px"></span> <span style="padding: 0 4px"></span>
<a-time-picker v-model:value="queryForm.endTime" style="width: 140px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 140px" />
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
zone_id: [], zone_id: [],
gate_id: [], gate_id: [],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
}) })
const searchCondition = ref({}) const searchCondition = ref({})
if (window.localStorage.getItem('searchCondition')) { if (window.localStorage.getItem('searchCondition')) {
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
queryForm.zone_id = searchCondition.value.zone_id; queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id; queryForm.gate_id = searchCondition.value.gate_id;
queryForm.date = searchCondition.value.date; queryForm.date = searchCondition.value.date;
// queryForm.startTime = searchCondition.value.startTime; queryForm.startTime = searchCondition.value.startTime;
// queryForm.endTime = searchCondition.value.endTime; queryForm.endTime = searchCondition.value.endTime;
} }
const onPageNumChange = function(num) { const onPageNumChange = function(num) {
pageNum.value = num pageNum.value = num
...@@ -273,8 +273,8 @@ ...@@ -273,8 +273,8 @@
zoneIds: rawData.zone_id?rawData.zone_id.toString():'', zoneIds: rawData.zone_id?rawData.zone_id.toString():'',
gateIds: rawData.gate_id?rawData.gate_id.toString():'', gateIds: rawData.gate_id?rawData.gate_id.toString():'',
countDate: formatDate(rawData.date), countDate: formatDate(rawData.date),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
pageNum: pageNum.value, pageNum: pageNum.value,
pageSize: pageSize.value, pageSize: pageSize.value,
}) })
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px" /> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px" />
</a-form-item> </a-form-item>
<a-form-item label="选择时间:" style="padding: 5px 0"> <a-form-item label="选择时间:" style="padding: 5px 0">
<a-time-picker v-model:value="queryForm.startTime" style="width: 140px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.startTime" style="width: 140px" />
<span style="padding: 0 4px"></span> <span style="padding: 0 4px"></span>
<a-time-picker v-model:value="queryForm.endTime" style="width: 140px" /> <a-time-picker format="HH:mm:ss" valueFormat="HH:mm:ss" v-model:value="queryForm.endTime" style="width: 140px" />
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button> <a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
zone_id: [], zone_id: [],
gate_id: [], gate_id: [],
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'), startTime: '00:00:00',
endTime: moment('23:59:59', 'HH:mm:ss'), endTime: '23:59:59',
}) })
const searchCondition = ref({}) const searchCondition = ref({})
if (window.localStorage.getItem('searchCondition')) { if (window.localStorage.getItem('searchCondition')) {
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
queryForm.zone_id = searchCondition.value.zone_id; queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id; queryForm.gate_id = searchCondition.value.gate_id;
queryForm.date = searchCondition.value.date; queryForm.date = searchCondition.value.date;
// queryForm.startTime = searchCondition.value.startTime; queryForm.startTime = searchCondition.value.startTime;
// queryForm.endTime = searchCondition.value.endTime; queryForm.endTime = searchCondition.value.endTime;
} }
const onPageNumChange = function(num) { const onPageNumChange = function(num) {
pageNum.value = num pageNum.value = num
...@@ -277,8 +277,8 @@ ...@@ -277,8 +277,8 @@
mallId: rawData.plaza_id?rawData.plaza_id.toString():'', mallId: rawData.plaza_id?rawData.plaza_id.toString():'',
zoneIds: rawData.zone_id?rawData.zone_id.toString():'', zoneIds: rawData.zone_id?rawData.zone_id.toString():'',
gateIds: rawData.gate_id?rawData.gate_id.toString():'', gateIds: rawData.gate_id?rawData.gate_id.toString():'',
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
pageNum: pageNum.value - 1, pageNum: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!