Commit 6578b62b by 陈岩

feat: 调整抓拍聚类年龄选项

1 parent a32b352b
...@@ -47,11 +47,12 @@ class DataRepairApi { ...@@ -47,11 +47,12 @@ class DataRepairApi {
{ {
method: 'POST', method: 'POST',
url: `/simulation/reid`, url: `/simulation/reid`,
timeout:5*60*1000,
data data
} }
) )
} }
} }
const dataRepairApi = new DataRepairApi() const dataRepairApi = new DataRepairApi()
......
...@@ -117,11 +117,11 @@ ...@@ -117,11 +117,11 @@
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
style="width: 240px"> style="width: 240px">
<a-select-option <a-select-option
v-for="item in childAdultAgeOptions" v-for="item in childAdultAgeOptions"
:key="item.value" :key="item.ageStr"
:value="item.value" :value="item.ageStr"
>{{item.label}}</a-select-option> >{{item.nameCn}}</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">
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
> >
<el-button type="text" :disabled="!isMultipleOperation">删除</el-button> <el-button type="text" :disabled="!isMultipleOperation">删除</el-button>
</a-popconfirm> </a-popconfirm>
</a-form-item> </a-form-item>
</a-form> </a-form>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
<div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div> <div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div>
<div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">机位号:{{ formatPosition(item.channelProductId)}}</div> <div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">机位号:{{ formatPosition(item.channelProductId)}}</div>
<div>持续时间:{{ item.duration!==null&&item.duration!==undefined&&item.duration>=0?item.duration+'秒':'--' }}</div> <div>持续时间:{{ item.duration!==null&&item.duration!==undefined&&item.duration>=0?item.duration+'秒':'--' }}</div>
</div> </div>
...@@ -336,6 +336,7 @@ import PersonGroupDialog from "./PersonGroupDialog.vue"; ...@@ -336,6 +336,7 @@ import PersonGroupDialog from "./PersonGroupDialog.vue";
import PersonGroupMover from "./PersonGroupMover.vue"; import PersonGroupMover from "./PersonGroupMover.vue";
import AddPersonnelPool from "./AddPersonnelPool.vue"; import AddPersonnelPool from "./AddPersonnelPool.vue";
import AddEditSnapshotClusterDialog from './components/AddEditSnapshotClusterDialog.vue' import AddEditSnapshotClusterDialog from './components/AddEditSnapshotClusterDialog.vue'
import snapshotRecordApi from "@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi";
export default { export default {
components:{ components:{
...@@ -490,6 +491,7 @@ export default { ...@@ -490,6 +491,7 @@ export default {
const onAccountChange = function() { const onAccountChange = function() {
getProductList(1) getProductList(1)
getPlazaList(1) getPlazaList(1)
getChildAdultAgeOptions()
} }
const onPlazaChange = function() { const onPlazaChange = function() {
...@@ -658,8 +660,8 @@ export default { ...@@ -658,8 +660,8 @@ export default {
} }
}) })
} }
const getAccountList = function() { const getAccountList = function() {
queryForm.account_id = '' queryForm.account_id = ''
...@@ -685,6 +687,7 @@ export default { ...@@ -685,6 +687,7 @@ export default {
} }
getPlazaList() getPlazaList()
getProductList() getProductList()
getChildAdultAgeOptions()
} }
} }
} }
...@@ -727,7 +730,7 @@ export default { ...@@ -727,7 +730,7 @@ export default {
maxPic: rawData.maxPic, maxPic: rawData.maxPic,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
age: rawData.childAdult?rawData.childAdult.toString():'', ageDis: rawData.childAdult?rawData.childAdult.toString():'',
gender: rawData.gender?rawData.gender.toString():'', gender: rawData.gender?rawData.gender.toString():'',
receptionType: rawData.receptionType?rawData.receptionType:0, receptionType: rawData.receptionType?rawData.receptionType:0,
sortType: rawData.sortType?rawData.sortType:0, sortType: rawData.sortType?rawData.sortType:0,
...@@ -796,14 +799,27 @@ export default { ...@@ -796,14 +799,27 @@ export default {
return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
} }
const childAdultAgeOptions = ref([ const childAdultAgeOptions = ref([
{ value: 0, label: '婴儿' }, // { value: 0, label: '婴儿' },
{ value: 1, label: '儿童' }, // { value: 1, label: '儿童' },
{ value: 2, label: '少年' }, // { value: 2, label: '少年' },
{ value: 3, label: '青年' }, // { value: 3, label: '青年' },
{ value: 4, label: '中年' }, // { value: 4, label: '中年' },
{ value: 5, label: '老年' }, // { value: 5, label: '老年' },
{ value: -1, label: '未知' }, // { value: -1, label: '未知' },
]) ])
const getChildAdultAgeOptions = async () => {
try {
queryForm.childAdult = []
const res = await snapshotRecordApi.getAgeDistributionConfig(queryForm.account_id)
childAdultAgeOptions.value = res || []
}catch (e) {
console.log(e)
}
}
const childAdultOptions = ref([ const childAdultOptions = ref([
{ value: 0, label: '儿童' }, { value: 0, label: '儿童' },
{ value: 1, label: '成人' }, { value: 1, label: '成人' },
...@@ -899,7 +915,7 @@ export default { ...@@ -899,7 +915,7 @@ export default {
} }
) )
} }
} }
const reqPersonType = (val) => { const reqPersonType = (val) => {
personTypeList.value = [] personTypeList.value = []
...@@ -956,7 +972,7 @@ export default { ...@@ -956,7 +972,7 @@ export default {
return return
} }
} }
// 上传数据 // 上传数据
const uploadGroupDataEditorRef = ref(); const uploadGroupDataEditorRef = ref();
const uploadGroupData = function(data) { const uploadGroupData = function(data) {
...@@ -1072,7 +1088,7 @@ export default { ...@@ -1072,7 +1088,7 @@ export default {
}) })
return return
} }
const strIdList = selectedPersonList.value.map(item => item.unid) const strIdList = selectedPersonList.value.map(item => item.unid)
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const params = { const params = {
......
...@@ -59,13 +59,23 @@ ...@@ -59,13 +59,23 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="年龄" name="age"> <a-form-item label="年龄" name="age">
<a-select <a-select v-model:value="submitForm.age"
v-model:value="submitForm.age" show-search
placeholder="请选择" placeholder="请选择"
optionFilterProp="label" style="width: 240px">
show-search <a-select-option
:options="optionsMap['ageList']" v-for="item in optionsMap['ageList']"
/> :key="item.ageStr"
:value="item.minAge"
>{{item.nameCn}}</a-select-option>
</a-select>
<!-- <a-select-->
<!-- v-model:value="submitForm.age"-->
<!-- optionFilterProp="label"-->
<!-- -->
<!-- :options=""-->
<!-- />-->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
...@@ -159,6 +169,7 @@ const handleSubmitData = async () => { ...@@ -159,6 +169,7 @@ const handleSubmitData = async () => {
const initDialog = (form, selectOptionsMap) => { const initDialog = (form, selectOptionsMap) => {
submitForm.value = cloneDeep(form) submitForm.value = cloneDeep(form)
optionsMap.value = selectOptionsMap optionsMap.value = selectOptionsMap
console.log(optionsMap,'-=s=s=s==s')
visible.value = true visible.value = true
} }
...@@ -180,4 +191,4 @@ defineExpose({ ...@@ -180,4 +191,4 @@ defineExpose({
.ant-select, .ant-picker { .ant-select, .ant-picker {
width: 100%; width: 100%;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template> <template>
<a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }"> <a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }">
<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"
@change="onAccountChange" @change="onAccountChange"
:options="accountList" :options="accountList"
optionFilterProp="label" optionFilterProp="label"
show-search show-search
> >
</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">
<a-select v-model:value="queryForm.plaza_id" <a-select v-model:value="queryForm.plaza_id"
style="width: 280px" style="width: 280px"
@change="onPlazaChange" @change="onPlazaChange"
:options="plazaList" :options="plazaList"
optionFilterProp="label" optionFilterProp="label"
show-search show-search
> >
</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">
<a-select v-model:value="queryForm.type" style="width: 280px"> <a-select v-model:value="queryForm.type" style="width: 280px">
<a-select-option :value="0">全场</a-select-option> <a-select-option :value="0">全场</a-select-option>
<a-select-option :value="1">广场出入口</a-select-option> <a-select-option :value="1">广场出入口</a-select-option>
<a-select-option :value="2">楼层出入口</a-select-option> <a-select-option :value="2">楼层出入口</a-select-option>
<a-select-option :value="3">店铺出入口</a-select-option> <a-select-option :value="3">店铺出入口</a-select-option>
<a-select-option :value="4">其他</a-select-option> <a-select-option :value="4">其他</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">
<a-select v-model:value="queryForm.zone_id" <a-select v-model:value="queryForm.zone_id"
style="width: 280px" style="width: 280px"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
@change="onZoneChange" @change="onZoneChange"
:options="zoneList" :options="zoneList"
optionFilterProp="label" optionFilterProp="label"
show-search show-search
> >
</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">
<a-select v-model:value="queryForm.gate_id" <a-select v-model:value="queryForm.gate_id"
style="width: 280px" style="width: 280px"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
:options="gateList" :options="gateList"
optionFilterProp="label" optionFilterProp="label"
show-search show-search
> >
</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">
<a-select v-model:value="queryForm.direction" <a-select v-model:value="queryForm.direction"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 280px">
<a-select-option :value="1"></a-select-option> <a-select-option :value="1"></a-select-option>
<a-select-option :value="-1"></a-select-option> <a-select-option :value="-1"></a-select-option>
<a-select-option :value="0">横穿</a-select-option> <a-select-option :value="0">横穿</a-select-option>
<a-select-option :value="2">过店</a-select-option> <a-select-option :value="2">过店</a-select-option>
<a-select-option :value="4">从左到右</a-select-option> <a-select-option :value="4">从左到右</a-select-option>
<a-select-option :value="5">从右到左</a-select-option> <a-select-option :value="5">从右到左</a-select-option>
<a-select-option :value="7">关注</a-select-option> <a-select-option :value="7">关注</a-select-option>
<a-select-option :value="8">触达</a-select-option> <a-select-option :value="8">触达</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">
<a-select v-model:value="queryForm.picType" style="width: 280px"> <a-select v-model:value="queryForm.picType" style="width: 280px">
<a-select-option :value="1">半身照</a-select-option> <a-select-option :value="1">半身照</a-select-option>
<a-select-option :value="2">全身照</a-select-option> <a-select-option :value="2">全身照</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">
<a-select v-model:value="queryForm.productId" <a-select v-model:value="queryForm.productId"
mode="multiple" mode="multiple"
:options="productList" :options="productList"
optionFilterProp="label" optionFilterProp="label"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 280px">
</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">
<a-select v-model:value="queryForm.positionId" <a-select v-model:value="queryForm.positionId"
mode="multiple" mode="multiple"
:options="positionList" :options="positionList"
optionFilterProp="label" optionFilterProp="label"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 280px">
</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">
<a-select v-model:value="queryForm.personType" <a-select v-model:value="queryForm.personType"
mode="multiple" mode="multiple"
:options="personTypeList" :options="personTypeList"
optionFilterProp="label" optionFilterProp="label"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 280px">
</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">
<a-select v-model:value="queryForm.childAdult" <a-select v-model:value="queryForm.childAdult"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
style="width: 280px"> style="width: 280px">
<a-select-option :value="1">成人</a-select-option> <a-select-option :value="1">成人</a-select-option>
<a-select-option :value="0">儿童</a-select-option> <a-select-option :value="0">儿童</a-select-option>
<a-select-option :value="-1">未知</a-select-option> <a-select-option :value="-1">未知</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">
<a-select v-model:value="queryForm.childAdult" <a-select v-model:value="queryForm.childAdult"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
style="width: 240px"> style="width: 240px">
<a-select-option <a-select-option
v-for="item in childAdultAgeOptions" v-for="item in childAdultAgeOptions"
:key="item.value" :key="item.ageStr"
:value="item.value" :value="item.ageStr"
>{{item.label}}</a-select-option> >{{item.nameCn}}</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">
<a-select v-model:value="queryForm.gender" <a-select v-model:value="queryForm.gender"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
style="width: 240px"> style="width: 240px">
<a-select-option <a-select-option
v-for="item in genderOptions" v-for="item in genderOptions"
:key="item.value" :key="item.value"
:value="item.value" :value="item.value"
>{{item.label}}</a-select-option> >{{item.label}}</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">
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 280px"/> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" 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 format="HH:mm:ss" valueFormat="HH:mm:ss" 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 format="HH:mm:ss" valueFormat="HH:mm:ss" 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>
</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="comparativeFun">特征对比验证</a-button> <a-button type="primary" @click="comparativeFun">特征对比验证</a-button>
</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="singleComparativeFun">单张特征对比</a-button> <a-button type="primary" @click="singleComparativeFun">单张特征对比</a-button>
</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="batchesResultFun">同组客流</a-button> <a-button type="primary" @click="batchesResultFun">同组客流</a-button>
</a-form-item> </a-form-item>
<a-form-item style="padding: 5px 0"> <a-form-item style="padding: 5px 0">
<a-button type="primary" :loading="allImagesLoading" @click="loadAllImages">加载当页图片</a-button> <a-button type="primary" :loading="allImagesLoading" @click="loadAllImages">加载当页图片</a-button>
</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="confirmSearch">刷新</a-button> <a-button type="primary" @click="confirmSearch">刷新</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}"> <div class="resultContent" :style="{'height':contentHeight+'px'}">
<el-row v-for="row in pagedTableDataList"> <el-row v-for="row in pagedTableDataList">
<el-col :span="3" v-for="item in row"> <el-col :span="3" v-for="item in row">
<div style="margin: 0 5px;cursor: pointer;" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''"> <div style="margin: 0 5px;cursor: pointer;" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
<div style=""> <div style="">
<span @click="downloadTrajectoryFile(item.track_url)" <span @click="downloadTrajectoryFile(item.track_url)"
class="downBtn"> class="downBtn">
轨迹 轨迹
</span> </span>
<span @click="downloadFile(item.features_url)" <span @click="downloadFile(item.features_url)"
class="downBtn downBtn1"> class="downBtn downBtn1">
特征 特征
</span> </span>
<a-popconfirm <a-popconfirm
title="删除后无法恢复,确认删除吗?" title="删除后无法恢复,确认删除吗?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="handleDeleteFileConfirm(item)" @confirm="handleDeleteFileConfirm(item)"
> >
<span <span
style="margin-right: 10px" style="margin-right: 10px"
class="downBtn downBtn1" class="downBtn downBtn1"
@click="handleDeleteFile(item, $event)" @click="handleDeleteFile(item, $event)"
>删除</span> >删除</span>
</a-popconfirm> </a-popconfirm>
</div> </div>
<el-image :src="item.picture_url" :fit="'fill'" class="single-image" :style="{'height':imgHeight+'px'}"> <el-image :src="item.picture_url" :fit="'fill'" class="single-image" :style="{'height':imgHeight+'px'}">
<template #error> <template #error>
<div class="image-slot"> <div class="image-slot">
{{dataSources==1?'去加载':'加载失败'}} {{dataSources==1?'去加载':'加载失败'}}
</div> </div>
</template> </template>
</el-image> </el-image>
<div @click="personUnidClick(item.person_unid)">人id: {{ item.person_unid }}</div> <div @click="personUnidClick(item.person_unid)">人id: {{ item.person_unid }}</div>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ personTypeStr(item.person_type)}}({{ formatChildAdult(item.childAdult) }})</div> <div>人员类型:{{ personTypeStr(item.person_type)}}({{ formatChildAdult(item.childAdult) }})</div>
<div> <div>
<span>性别:{{ formatGender(item.gender) }}({{item.age}})</span> <span>性别:{{ formatGender(item.gender) }}({{item.age}})</span>
<a-popover v-if="item.personLabel" trigger="click"> <a-popover v-if="item.personLabel" trigger="click">
<template #content> <template #content>
<div class="person-tag-one" v-if="item.personLabel.hairStyle!==null&&item.personLabel.hairStyle!==undefined"><span>发型:</span><span>{{hairStyleStr(item.personLabel.hairStyle)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.hairStyle!==null&&item.personLabel.hairStyle!==undefined"><span>发型:</span><span>{{hairStyleStr(item.personLabel.hairStyle)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.hairColor!==null&&item.personLabel.hairColor!==undefined"><span>发色:</span><span>{{jacketColorStr(item.personLabel.hairColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.hairColor!==null&&item.personLabel.hairColor!==undefined"><span>发色:</span><span>{{jacketColorStr(item.personLabel.hairColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.hat!==null&&item.personLabel.hat!==undefined"><span>帽子:</span><span>{{hatStr(item.personLabel.hat)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.hat!==null&&item.personLabel.hat!==undefined"><span>帽子:</span><span>{{hatStr(item.personLabel.hat)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.hatColor!==null&&item.personLabel.hatColor!==undefined"><span>帽子颜色:</span><span>{{jacketColorStr(item.personLabel.hatColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.hatColor!==null&&item.personLabel.hatColor!==undefined"><span>帽子颜色:</span><span>{{jacketColorStr(item.personLabel.hatColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.glasses!==null&&item.personLabel.glasses!==undefined"><span>眼镜:</span><span>{{glassesStr(item.personLabel.glasses)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.glasses!==null&&item.personLabel.glasses!==undefined"><span>眼镜:</span><span>{{glassesStr(item.personLabel.glasses)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.mask!==null&&item.personLabel.mask!==undefined"><span>口罩:</span><span>{{maskStr(item.personLabel.mask)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.mask!==null&&item.personLabel.mask!==undefined"><span>口罩:</span><span>{{maskStr(item.personLabel.mask)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.earring!==null&&item.personLabel.earring!==undefined"><span>耳饰:</span><span>{{earringStr(item.personLabel.earring)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.earring!==null&&item.personLabel.earring!==undefined"><span>耳饰:</span><span>{{earringStr(item.personLabel.earring)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.jacketType!==null&&item.personLabel.jacketType!==undefined"><span>上装种类:</span><span>{{jacketTypeStr(item.personLabel.jacketType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.jacketType!==null&&item.personLabel.jacketType!==undefined"><span>上装种类:</span><span>{{jacketTypeStr(item.personLabel.jacketType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.jacketColor!==null&&item.personLabel.jacketColor!==undefined"><span>上装颜色:</span><span>{{jacketColorStr(item.personLabel.jacketColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.jacketColor!==null&&item.personLabel.jacketColor!==undefined"><span>上装颜色:</span><span>{{jacketColorStr(item.personLabel.jacketColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.bottomsType!==null&&item.personLabel.bottomsType!==undefined"><span>下装种类:</span><span>{{bottomsTypeStr(item.personLabel.bottomsType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.bottomsType!==null&&item.personLabel.bottomsType!==undefined"><span>下装种类:</span><span>{{bottomsTypeStr(item.personLabel.bottomsType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.bottomsColor!==null&&item.personLabel.bottomsColor!==undefined"><span>下装颜色:</span><span>{{jacketColorStr(item.personLabel.bottomsColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.bottomsColor!==null&&item.personLabel.bottomsColor!==undefined"><span>下装颜色:</span><span>{{jacketColorStr(item.personLabel.bottomsColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.suitType!==null&&item.personLabel.suitType!==undefined"><span>套装种类:</span><span>{{suitTypeStr(item.personLabel.suitType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.suitType!==null&&item.personLabel.suitType!==undefined"><span>套装种类:</span><span>{{suitTypeStr(item.personLabel.suitType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.suitColor!==null&&item.personLabel.suitColor!==undefined"><span>套装颜色:</span><span>{{jacketColorStr(item.personLabel.suitColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.suitColor!==null&&item.personLabel.suitColor!==undefined"><span>套装颜色:</span><span>{{jacketColorStr(item.personLabel.suitColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.clothingBrand!==null&&item.personLabel.clothingBrand!==undefined"><span>文字与LOGO:</span><span>{{clothingBrandStr(item.personLabel.clothingBrand)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.clothingBrand!==null&&item.personLabel.clothingBrand!==undefined"><span>文字与LOGO:</span><span>{{clothingBrandStr(item.personLabel.clothingBrand)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.necklace!==null&&item.personLabel.necklace!==undefined"><span>佩戴项链:</span><span>{{necklaceStr(item.personLabel.necklace)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.necklace!==null&&item.personLabel.necklace!==undefined"><span>佩戴项链:</span><span>{{necklaceStr(item.personLabel.necklace)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.watch!==null&&item.personLabel.watch!==undefined"><span>佩戴手表:</span><span>{{watchStr(item.personLabel.watch)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.watch!==null&&item.personLabel.watch!==undefined"><span>佩戴手表:</span><span>{{watchStr(item.personLabel.watch)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.bracelet!==null&&item.personLabel.bracelet!==undefined"><span>佩戴手链:</span><span>{{braceletStr(item.personLabel.bracelet)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.bracelet!==null&&item.personLabel.bracelet!==undefined"><span>佩戴手链:</span><span>{{braceletStr(item.personLabel.bracelet)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.phone!==null&&item.personLabel.phone!==undefined"><span>手持手机:</span><span>{{phoneStr(item.personLabel.phone)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.phone!==null&&item.personLabel.phone!==undefined"><span>手持手机:</span><span>{{phoneStr(item.personLabel.phone)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.shoeType!==null&&item.personLabel.shoeType!==undefined"><span>鞋子类型:</span><span>{{shoeTypeStr(item.personLabel.shoeType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.shoeType!==null&&item.personLabel.shoeType!==undefined"><span>鞋子类型:</span><span>{{shoeTypeStr(item.personLabel.shoeType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.shoeColor!==null&&item.personLabel.shoeColor!==undefined"><span>鞋子颜色:</span><span>{{jacketColorStr(item.personLabel.shoeColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.shoeColor!==null&&item.personLabel.shoeColor!==undefined"><span>鞋子颜色:</span><span>{{jacketColorStr(item.personLabel.shoeColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.rucksackType!==null&&item.personLabel.rucksackType!==undefined"><span>背包类型:</span><span>{{rucksackTypeStr(item.personLabel.rucksackType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.rucksackType!==null&&item.personLabel.rucksackType!==undefined"><span>背包类型:</span><span>{{rucksackTypeStr(item.personLabel.rucksackType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.rucksackColor!==null&&item.personLabel.rucksackColor!==undefined"><span>背包颜色:</span><span>{{jacketColorStr(item.personLabel.rucksackColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.rucksackColor!==null&&item.personLabel.rucksackColor!==undefined"><span>背包颜色:</span><span>{{jacketColorStr(item.personLabel.rucksackColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.handbagType!==null&&item.personLabel.handbagType!==undefined"><span>拎包类型:</span><span>{{handbagTypeStr(item.personLabel.handbagType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.handbagType!==null&&item.personLabel.handbagType!==undefined"><span>拎包类型:</span><span>{{handbagTypeStr(item.personLabel.handbagType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.handbagColor!==null&&item.personLabel.handbagColor!==undefined"><span>拎包颜色:</span><span>{{jacketColorStr(item.personLabel.handbagColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.handbagColor!==null&&item.personLabel.handbagColor!==undefined"><span>拎包颜色:</span><span>{{jacketColorStr(item.personLabel.handbagColor)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.shoppingBagType!==null&&item.personLabel.shoppingBagType!==undefined"><span>提袋类型:</span><span>{{shoppingBagTypeStr(item.personLabel.shoppingBagType)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.shoppingBagType!==null&&item.personLabel.shoppingBagType!==undefined"><span>提袋类型:</span><span>{{shoppingBagTypeStr(item.personLabel.shoppingBagType)}}</span></div>
<div class="person-tag-one" v-if="item.personLabel.shoppingBagColor!==null&&item.personLabel.shoppingBagColor!==undefined"><span>提袋颜色:</span><span>{{jacketColorStr(item.personLabel.shoppingBagColor)}}</span></div> <div class="person-tag-one" v-if="item.personLabel.shoppingBagColor!==null&&item.personLabel.shoppingBagColor!==undefined"><span>提袋颜色:</span><span>{{jacketColorStr(item.personLabel.shoppingBagColor)}}</span></div>
</template> </template>
<span style="margin-right: 10px;" class="downBtn downBtn1">标签</span> <span style="margin-right: 10px;" class="downBtn downBtn1">标签</span>
</a-popover> </a-popover>
</div> </div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
<div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div> <div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div>
<div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">机位号:{{ formatPosition(item.channelProductId)}}</div> <div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">机位号:{{ formatPosition(item.channelProductId)}}</div>
<div>持续时间:{{ item.duration!==null&&item.duration!==undefined&&item.duration>=0?item.duration+'秒':'--' }}</div> <div>持续时间:{{ item.duration!==null&&item.duration!==undefined&&item.duration>=0?item.duration+'秒':'--' }}</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div>
<a-pagination
v-model:current="pageNum"
v-model:pageSize="pageSize"
:total="total"
:show-total="total => `共 ${total} 条`"
:pageSizeOptions="['24', '48', '96', '192']"
@change="onPageNumChange"
@showSizeChange="onPageSizeChange"
show-size-changer
show-quick-jumper
style="text-align:center;margin-top: 10px;"
/>
</div> </div>
<!-- <imgDialog ref='imgModelRef'></imgDialog> --> <a-pagination
<DetailDialog ref="DetailDialogRef" /> v-model:current="pageNum"
<batchesResultDialog ref="batchesResultDialogRef" /> v-model:pageSize="pageSize"
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog> :total="total"
:show-total="total => `共 ${total} 条`"
:pageSizeOptions="['24', '48', '96', '192']"
@change="onPageNumChange"
@showSizeChange="onPageSizeChange"
show-size-changer
show-quick-jumper
style="text-align:center;margin-top: 10px;"
/>
</div>
<!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" />
<batchesResultDialog ref="batchesResultDialogRef" />
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
</template> </template>
<script> <script>
...@@ -358,6 +358,8 @@ export default { ...@@ -358,6 +358,8 @@ export default {
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList(1) getPlazaList(1)
getProductList(1) getProductList(1)
// 获取当前集团的年龄分裂
getChildAdultAgeOptions()
} }
const onPlazaChange = function() { const onPlazaChange = function() {
...@@ -551,6 +553,7 @@ export default { ...@@ -551,6 +553,7 @@ export default {
} }
getPlazaList() getPlazaList()
getProductList() getProductList()
getChildAdultAgeOptions()
} }
} }
} }
...@@ -599,7 +602,7 @@ export default { ...@@ -599,7 +602,7 @@ export default {
endTime: formatDate(rawData.date) + ' ' + rawData.endTime, endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
age: rawData.childAdult?rawData.childAdult.toString():'', ageDis: rawData.childAdult?rawData.childAdult.toString():'',
gender: rawData.gender?rawData.gender.toString():'', gender: rawData.gender?rawData.gender.toString():'',
} }
) )
...@@ -663,14 +666,25 @@ export default { ...@@ -663,14 +666,25 @@ export default {
return (positionList.value.filter(v => v.value == val)[0] || {label:'--'}).label return (positionList.value.filter(v => v.value == val)[0] || {label:'--'}).label
} }
const childAdultAgeOptions = ref([ const childAdultAgeOptions = ref([
{ value: 0, label: '婴儿' }, // { value: 0, label: '婴儿' },
{ value: 1, label: '儿童' }, // { value: 1, label: '儿童' },
{ value: 2, label: '少年' }, // { value: 2, label: '少年' },
{ value: 3, label: '青年' }, // { value: 3, label: '青年' },
{ value: 4, label: '中年' }, // { value: 4, label: '中年' },
{ value: 5, label: '老年' }, // { value: 5, label: '老年' },
{ value: -1, label: '未知' }, // { value: -1, label: '未知' },
]) ])
const getChildAdultAgeOptions = async () => {
try {
queryForm.childAdult = []
const res = await snapshotRecordApi.getAgeDistributionConfig(queryForm.account_id)
childAdultAgeOptions.value = res || []
}catch (e) {
console.log(e)
}
}
const childAdultOptions = ref([ const childAdultOptions = ref([
{ value: 0, label: '儿童' }, { value: 0, label: '儿童' },
{ value: 1, label: '成人' }, { value: 1, label: '成人' },
...@@ -1591,6 +1605,7 @@ export default { ...@@ -1591,6 +1605,7 @@ export default {
genderOptions, genderOptions,
loadAllImages, loadAllImages,
allImagesLoading, allImagesLoading,
getChildAdultAgeOptions
} }
} }
} }
......
...@@ -135,6 +135,15 @@ class SnapshotRecordApi { ...@@ -135,6 +135,15 @@ class SnapshotRecordApi {
} }
) )
} }
// 获取集团配置下年龄分类
getAgeDistributionConfig(id) {
return axiosInstance.request(
{
method: 'GET',
url: `/accounts/ageDistributionConfig?accountId=${id}`,
}
)
}
} }
const snapshotRecordApi = new SnapshotRecordApi() const snapshotRecordApi = new SnapshotRecordApi()
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
> >
</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">
<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>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
<!-- <a-table :dataSource="dataList" v-loading="isLoading" :rowKey="dataList => dataList.id" :columns="columns" :pagination="false" :scroll="{ y: contentHeight }"> <!-- <a-table :dataSource="dataList" v-loading="isLoading" :rowKey="dataList => dataList.id" :columns="columns" :pagination="false" :scroll="{ y: contentHeight }">
</a-table> --> </a-table> -->
<el-table <el-table
:data="dataList" :data="dataList"
...@@ -88,218 +88,308 @@ ...@@ -88,218 +88,308 @@
/> />
<!-- <moreDialog ref='moreDialogRef'></moreDialog> --> <!-- <moreDialog ref='moreDialogRef'></moreDialog> -->
</template> </template>
<!--<template>-->
<!-- <a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '80px' } }">-->
<!-- &lt;!&ndash; <a-form-item label="apptype:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.apptype"-->
<!-- style="width: 280px"-->
<!-- :options="apptypeList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item> &ndash;&gt;-->
<!-- <a-form-item label="服务名称:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.appname"-->
<!-- style="width: 280px"-->
<!-- :options="appnameList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="日志等级:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.levels"-->
<!-- style="width: 280px"-->
<!-- mode="multiple"-->
<!-- :maxTagCount="1"-->
<!-- :options="levelList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- -->
<!-- <a-form-item label="选择日期:" style="padding: 5px 0">-->
<!-- <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="选择时间:" style="padding: 5px 0">-->
<!-- <a-time-picker v-model:value="queryForm.startTime" style="width: 140px"/>-->
<!-- <a-time-picker v-model:value="queryForm.endTime" style="width: 140px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="内容:" style="padding: 5px 0">-->
<!-- <a-input v-model:value="queryForm.content_like" placeholder="请输入内容" style="width: 280px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item style="padding: 5px 0">-->
<!-- <a-button type="primary" @click="confirmSearch(1)" :loading="isLoading">查询</a-button>-->
<!-- &lt;!&ndash; <a-button type="primary" @click="confirmSearch1">弹框</a-button> &ndash;&gt;-->
<!-- </a-form-item>-->
<!-- </a-form>-->
<!-- &lt;!&ndash; <a-table :dataSource="dataList" v-loading="isLoading" :rowKey="dataList => dataList.id" :columns="columns" :pagination="false" :scroll="{ y: contentHeight }">-->
<!-- -->
<!-- </a-table> &ndash;&gt;-->
<!-- <el-table-->
<!-- :data="dataList"-->
<!-- v-loading="isLoading"-->
<!-- :rowKey="id"-->
<!-- :height="contentHeight"-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="time"-->
<!-- label="时间"-->
<!-- width="180">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="thread"-->
<!-- label="线程号"-->
<!-- width="180">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="location"-->
<!-- label="日志位置"-->
<!-- width="300">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="content"-->
<!-- label="日志内容">-->
<!-- <template #default="{ row }">-->
<!-- <p v-html="stringFormatter(row.content)"></p>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <a-pagination-->
<!-- v-model:current="pageNum"-->
<!-- v-model:pageSize="pageSize"-->
<!-- :total="total"-->
<!-- :show-total="total => `共 ${total} 条`"-->
<!-- :pageSizeOptions="['20', '50', '100']"-->
<!-- @change="onPageNumChange"-->
<!-- @showSizeChange="onPageSizeChange"-->
<!-- show-size-changer-->
<!-- show-quick-jumper-->
<!-- style="text-align:center"-->
<!-- />-->
<!-- &lt;!&ndash; <moreDialog ref='moreDialogRef'></moreDialog> &ndash;&gt;-->
<!--</template>-->
<script> <!--<script>-->
import {reactive, ref, toRaw} from 'vue' <!--import {reactive, ref, toRaw} from 'vue'-->
import moment from 'moment' <!--import moment from 'moment'-->
import SystemLogApi from '@/views/SystemLog/SystemLog.js' <!--import SystemLogApi from '@/views/SystemLog/SystemLog.js'-->
import {isArray} from '@/PublicUtil/Judgment' <!--import {isArray} from '@/PublicUtil/Judgment'-->
import {filterEmptyValueInObject, formatDate, formatTime} from '@/PublicUtil/PublicUtil' <!--import {filterEmptyValueInObject, formatDate, formatTime} from '@/PublicUtil/PublicUtil'-->
import {PlusOutlined} from '@ant-design/icons-vue' <!--import {PlusOutlined} from '@ant-design/icons-vue'-->
import moreDialog from './moreDialog.vue' <!--import moreDialog from './moreDialog.vue'-->
export default { <!--export default {-->
components: { <!-- components: {-->
PlusOutlined, <!-- PlusOutlined,-->
VNodes: (_, {attrs}) => { <!-- VNodes: (_, {attrs}) => {-->
return attrs.vnodes <!-- return attrs.vnodes-->
}, <!-- },-->
moreDialog <!-- moreDialog-->
}, <!-- },-->
setup() { <!-- setup() {-->
const columns = ref([ <!-- const columns = ref([-->
{ <!-- {-->
title: '时间', <!-- title: '时间',-->
dataIndex: 'time', <!-- dataIndex: 'time',-->
align: 'center', <!-- align: 'center',-->
width: 220 <!-- width: 220-->
}, <!-- },-->
{ <!-- {-->
title: '线程号', <!-- title: '线程号',-->
dataIndex: 'thread', <!-- dataIndex: 'thread',-->
align: 'center', <!-- align: 'center',-->
width: 120 <!-- width: 120-->
}, <!-- },-->
{ <!-- {-->
title: '日志位置', <!-- title: '日志位置',-->
dataIndex: 'location', <!-- dataIndex: 'location',-->
align: 'center', <!-- align: 'center',-->
width: 300 <!-- width: 300-->
}, <!-- },-->
{ <!-- {-->
title: '日志内容', <!-- title: '日志内容',-->
dataIndex: 'content', <!-- dataIndex: 'content',-->
align: 'center', <!-- align: 'center',-->
customRender:({text,record})=>{ <!-- customRender:({text,record})=>{-->
const rawData = toRaw(queryForm) <!-- const rawData = toRaw(queryForm)-->
if (rawData.content_like && rawData.content_like !== '') { <!-- if (rawData.content_like && rawData.content_like !== '') {-->
text = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>") <!-- text = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
// console.log(str) <!-- // console.log(str)-->
// let pHtml = document.createElement("p"); <!-- // let pHtml = document.createElement("p");-->
return (<p v-html='str'>{text}</p>) <!-- return (<p v-html='str'>{text}</p>)-->
}else{ <!-- }else{-->
return text <!-- return text-->
} <!-- }-->
} <!-- }-->
}, <!-- },-->
// { <!-- // {-->
// title: '日志标识', <!-- // title: '日志标识',-->
// dataIndex: 'id', <!-- // dataIndex: 'id',-->
// align: 'center', <!-- // align: 'center',-->
// } <!-- // }-->
]) <!-- ])-->
//ref <!-- //ref-->
const moreDialogRef = ref() <!-- const moreDialogRef = ref()-->
// scalar <!-- // scalar-->
const isLoading = ref(false) <!-- const isLoading = ref(false)-->
const isSuspended = ref(false) <!-- const isSuspended = ref(false)-->
const pageNum = ref(1) <!-- const pageNum = ref(1)-->
const pageSize = ref(20) <!-- const pageSize = ref(20)-->
const total = ref() <!-- const total = ref()-->
// sequence <!-- // sequence-->
const dataList = ref([]) <!-- const dataList = ref([])-->
const apptypeList = ref([{ <!-- const apptypeList = ref([{-->
value: 'store', <!-- value: 'store',-->
label: 'store', <!-- label: 'store',-->
},{ <!-- },{-->
value: 'mall', <!-- value: 'mall',-->
label: 'mall', <!-- label: 'mall',-->
}]) <!-- }])-->
const appnameList = ref([{ <!-- const appnameList = ref([{-->
value: 'process', <!-- value: 'process',-->
label: 'process', <!-- label: 'process',-->
},{ <!-- },{-->
value: 'receive', <!-- value: 'receive',-->
label: 'receive', <!-- label: 'receive',-->
},{ <!-- },{-->
value: 'report', <!-- value: 'report',-->
label: 'report', <!-- label: 'report',-->
},{ <!-- },{-->
value: 'openapi', <!-- value: 'openapi',-->
label: 'openapi', <!-- label: 'openapi',-->
}]) <!-- }])-->
const levelList = ref([{ <!-- const levelList = ref([{-->
value: 'info', <!-- value: 'info',-->
label: 'info', <!-- label: 'info',-->
},{ <!-- },{-->
value: 'error', <!-- value: 'error',-->
label: 'error', <!-- label: 'error',-->
},{ <!-- },{-->
value: 'debug', <!-- value: 'debug',-->
label: 'debug', <!-- label: 'debug',-->
},{ <!-- },{-->
value: 'warn', <!-- value: 'warn',-->
label: 'warn', <!-- label: 'warn',-->
}]) <!-- }])-->
const queryForm = reactive( <!-- const queryForm = reactive(-->
{ <!-- {-->
// apptype:'store', <!-- // apptype:'store',-->
appname: 'process', <!-- appname: 'process',-->
levels: ['info','error','debug','warn'], <!-- levels: ['info','error','debug','warn'],-->
content_like: '', <!-- content_like: '',-->
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: moment('00:00:00', 'HH:mm:ss'),-->
endTime: moment('23:59:59', 'HH:mm:ss'), <!-- endTime: moment('23:59:59', 'HH:mm:ss'),-->
} <!-- }-->
) <!-- )-->
const onPageNumChange = function(num) { <!-- const onPageNumChange = function(num) {-->
pageNum.value = num <!-- pageNum.value = num-->
confirmSearch() <!-- confirmSearch()-->
} <!-- }-->
<!-- -->
const onPageSizeChange = function(current, size) { <!-- const onPageSizeChange = function(current, size) {-->
pageNum.value = 1 <!-- pageNum.value = 1-->
pageSize.value = size <!-- pageSize.value = size-->
confirmSearch() <!-- confirmSearch()-->
} <!-- }-->
const confirmSearch = function(val){ <!-- const confirmSearch = function(val){-->
isLoading.value = true <!-- isLoading.value = true-->
const rawData = toRaw(queryForm) <!-- const rawData = toRaw(queryForm)-->
pageNum.value = val?1:pageNum.value <!-- pageNum.value = val?1:pageNum.value-->
const data = filterEmptyValueInObject( <!-- const data = filterEmptyValueInObject(-->
{ <!-- {-->
// apptype: rawData.apptype, <!-- // apptype: rawData.apptype,-->
appname: rawData.appname, <!-- appname: rawData.appname,-->
levels: rawData.levels?rawData.levels.toString():null, <!-- levels: rawData.levels?rawData.levels.toString():null,-->
content_like: rawData.content_like, <!-- content_like: rawData.content_like,-->
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime), <!-- startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),-->
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime), <!-- endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),-->
page: pageNum.value, <!-- page: pageNum.value,-->
pageSize: pageSize.value, <!-- pageSize: pageSize.value,-->
} <!-- }-->
) <!-- )-->
SystemLogApi.getLogSelect(data).then( <!-- SystemLogApi.getLogSelect(data).then(-->
(r) => { <!-- (r) => {-->
isLoading.value = false <!-- isLoading.value = false-->
dataList.value = [] <!-- dataList.value = []-->
if(r.code==200){ <!-- if(r.code==200){-->
// r.forEach((item,index)=>{ <!-- // r.forEach((item,index)=>{-->
// item.index = index+1 <!-- // item.index = index+1-->
// }) <!-- // })-->
if(r.data){ <!-- if(r.data){-->
dataList.value = r.data.list <!-- dataList.value = r.data.list-->
total.value = r.data.total <!-- total.value = r.data.total-->
} <!-- }-->
<!-- -->
} <!-- }-->
<!-- -->
} <!-- }-->
) <!-- )-->
} <!-- }-->
const stringFormatter = function(text){ <!-- const stringFormatter = function(text){-->
const rawData = toRaw(queryForm) <!-- const rawData = toRaw(queryForm)-->
if (rawData.content_like && rawData.content_like !== '') { <!-- if (rawData.content_like && rawData.content_like !== '') {-->
let str = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>") <!-- let str = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
return str <!-- return str-->
}else{ <!-- }else{-->
return text <!-- return text-->
} <!-- }-->
} <!-- }-->
const contentHeight = ref(0) <!-- const contentHeight = ref(0)-->
const __main = function() { <!-- const __main = function() {-->
contentHeight.value = window.innerHeight - 230 <!-- contentHeight.value = window.innerHeight - 230-->
// confirmSearch() <!-- // confirmSearch()-->
} <!-- }-->
const confirmSearch1 = function(){ <!-- const confirmSearch1 = function(){-->
moreDialogRef.value.initDialog(); <!-- moreDialogRef.value.initDialog();-->
} <!-- }-->
__main() <!-- __main()-->
return { <!-- return {-->
// scalar <!-- // scalar-->
isLoading, <!-- isLoading,-->
pageNum, <!-- pageNum,-->
pageSize, <!-- pageSize,-->
total, <!-- total,-->
contentHeight, <!-- contentHeight,-->
// sequence <!-- // sequence-->
apptypeList, <!-- apptypeList,-->
appnameList, <!-- appnameList,-->
levelList, <!-- levelList,-->
dataList, <!-- dataList,-->
queryForm, <!-- queryForm,-->
columns, <!-- columns,-->
// function <!-- // function-->
confirmSearch, <!-- confirmSearch,-->
confirmSearch1, <!-- confirmSearch1,-->
stringFormatter, <!-- stringFormatter,-->
onPageNumChange, <!-- onPageNumChange,-->
onPageSizeChange, <!-- onPageSizeChange,-->
//ref <!-- //ref-->
moreDialogRef <!-- moreDialogRef-->
} <!-- }-->
} <!-- }-->
} <!--}-->
</script> <!--</script>-->
<style lang="less" scoped> <!--<style lang="less" scoped>-->
.success { <!-- .success {-->
color: #26ff29; <!-- color: #26ff29;-->
} <!-- }-->
// /deep/.el-table{ <!-- // /deep/.el-table{-->
// th,tr{ <!-- // th,tr{-->
// background-color: #fafafa; <!-- // background-color: #fafafa;-->
// } <!-- // }-->
// } <!-- // }-->
.failed { <!-- .failed {-->
color: red; <!-- color: red;-->
} <!-- }-->
</style> <!--</style>-->
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!