Commit 022c48c8 by 李乾广

聚类结果增加排序类型

1 parent c0fabd49
......@@ -104,6 +104,7 @@
>{{item.label}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="排序类型:" style="padding: 5px 0"> <a-select v-model:value="queryForm.sortType" style="width: 240px"> <a-select-option value="">按聚类数量</a-select-option> <a-select-option :value="1">按时间</a-select-option> </a-select> </a-form-item>
<a-form-item label="设备序列号:" style="padding: 5px 0;" class="label-width-wu">
<a-input v-model:value="queryForm.deviceSerialNum" style="width: 240px"/>
</a-form-item>
......@@ -322,6 +323,7 @@ export default {
maxPic: 100,
childAdult:[],
deviceSerialNum:'',
sortType:'',
}
)
const searchCondition = ref({})
......@@ -541,6 +543,7 @@ export default {
age: rawData.childAdult?rawData.childAdult.toString():'',
personUnid: rawData.personUnid,
deviceSerialNum: rawData.deviceSerialNum,
sortType: rawData.sortType?rawData.sortType:0,
}
)
const storageData = filterEmptyValueInObject(
......@@ -672,11 +675,7 @@ export default {
}
}
const sortDataList = function(list) {
list.sort(
(a, b) => {
return (b.perrsonList.length - a.perrsonList.length)
}
)
if(queryForm.sortType==1) { list.sort( (a, b) => { return (a.perrsonList[0].counttime - b.perrsonList[0].counttime) } ) } else { list.sort( (a, b) => { return (b.perrsonList.length - a.perrsonList.length) } ) }
}
const reqPersonType = (val) => {
personTypeList.value = []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!