Commit c262f73a by Tianqing Liu

feat: 优化年龄类型,查询条件

1 parent 130e58c9
......@@ -81,7 +81,7 @@
style="width: 240px">
</a-select>
</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"
mode="multiple"
:maxTagCount="1"
......@@ -90,6 +90,21 @@
<a-select-option :value="0">儿童</a-select-option>
<a-select-option :value="-1">未知</a-select-option>
</a-select>
</a-form-item>-->
<a-form-item label="年龄类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.childAdult"
mode="multiple"
:maxTagCount="1"
style="width: 240px">
<a-select-option
v-for="item in childAdultOptions"
:key="item.value"
:value="item.value"
>{{item.label}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="人ID:" style="padding: 5px 0">
<a-input v-model:value="queryForm.personUnid" style="width: 240px"/>
</a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0">
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 240px"/>
......@@ -185,7 +200,7 @@
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ personTypeStr(item.person_type)}}({{ item.childAdult==1?'成人':(item.childAdult==0?'儿童':'未知') }})</div>
<div>人员类型:{{ personTypeStr(item.person_type)}}({{ formatChildAdult(item.childAdult) }})</div>
<div>性别:{{ formatGender(item.gender) }}({{item.age}})</div>
<div class="direction" :class="'direction'+item.direction">事件类型:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -505,7 +520,10 @@ export default {
maxPic: rawData.maxPic,
page: pageNum.value - 1,
pageSize: pageSize.value,
childAdult: rawData.childAdult?rawData.childAdult.toString():'',
// childAdult: rawData.childAdult?rawData.childAdult.toString():'',
// 查询条件
age: rawData.childAdult?rawData.childAdult.toString():'',
personUnid: rawData.personUnid,
}
)
const storageData = filterEmptyValueInObject(
......@@ -563,6 +581,20 @@ export default {
const personTypeStr = function(val){
return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const childAdultOptions = ref([
{ value: 0, label: '婴儿' },
{ value: 1, label: '儿童' },
{ value: 2, label: '少年' },
{ value: 3, label: '青年' },
{ value: 4, label: '中午' },
{ value: 5, label: '老年' },
{ value: -1, label: '未知' },
])
const formatChildAdult = function(val) {
const targetitem = childAdultOptions.value.find(item => item.value === val)
if (targetitem) return targetitem.label
else return '未知'
}
const formatGender = function(number){
switch (number)
{
......@@ -675,7 +707,7 @@ export default {
return
}
}
// 上传数据
const uploadGroupDataEditorRef = ref();
const uploadGroupData = function(data) {
......@@ -1063,6 +1095,9 @@ export default {
handleMutipleOperation,
mutipleOperationText,
deleteRealPersonRecord,
childAdultOptions,
formatChildAdult
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!