Commit 6578b62b by 陈岩

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

1 parent a32b352b
......@@ -47,6 +47,7 @@ class DataRepairApi {
{
method: 'POST',
url: `/simulation/reid`,
timeout:5*60*1000,
data
}
)
......
......@@ -119,9 +119,9 @@
style="width: 240px">
<a-select-option
v-for="item in childAdultAgeOptions"
:key="item.value"
:value="item.value"
>{{item.label}}</a-select-option>
:key="item.ageStr"
:value="item.ageStr"
>{{item.nameCn}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="性别:" style="padding: 5px 0">
......@@ -336,6 +336,7 @@ import PersonGroupDialog from "./PersonGroupDialog.vue";
import PersonGroupMover from "./PersonGroupMover.vue";
import AddPersonnelPool from "./AddPersonnelPool.vue";
import AddEditSnapshotClusterDialog from './components/AddEditSnapshotClusterDialog.vue'
import snapshotRecordApi from "@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi";
export default {
components:{
......@@ -490,6 +491,7 @@ export default {
const onAccountChange = function() {
getProductList(1)
getPlazaList(1)
getChildAdultAgeOptions()
}
const onPlazaChange = function() {
......@@ -685,6 +687,7 @@ export default {
}
getPlazaList()
getProductList()
getChildAdultAgeOptions()
}
}
}
......@@ -727,7 +730,7 @@ export default {
maxPic: rawData.maxPic,
page: pageNum.value - 1,
pageSize: pageSize.value,
age: rawData.childAdult?rawData.childAdult.toString():'',
ageDis: rawData.childAdult?rawData.childAdult.toString():'',
gender: rawData.gender?rawData.gender.toString():'',
receptionType: rawData.receptionType?rawData.receptionType:0,
sortType: rawData.sortType?rawData.sortType:0,
......@@ -796,14 +799,27 @@ export default {
return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const childAdultAgeOptions = ref([
{ value: 0, label: '婴儿' },
{ value: 1, label: '儿童' },
{ value: 2, label: '少年' },
{ value: 3, label: '青年' },
{ value: 4, label: '中年' },
{ value: 5, label: '老年' },
{ value: -1, label: '未知' },
// { value: 0, label: '婴儿' },
// { value: 1, label: '儿童' },
// { value: 2, label: '少年' },
// { value: 3, label: '青年' },
// { value: 4, label: '中年' },
// { value: 5, 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([
{ value: 0, label: '儿童' },
{ value: 1, label: '成人' },
......
......@@ -59,13 +59,23 @@
</a-col>
<a-col :span="12">
<a-form-item label="年龄" name="age">
<a-select
v-model:value="submitForm.age"
placeholder="请选择"
optionFilterProp="label"
<a-select v-model:value="submitForm.age"
show-search
:options="optionsMap['ageList']"
/>
placeholder="请选择"
style="width: 240px">
<a-select-option
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-col>
<a-col :span="12">
......@@ -159,6 +169,7 @@ const handleSubmitData = async () => {
const initDialog = (form, selectOptionsMap) => {
submitForm.value = cloneDeep(form)
optionsMap.value = selectOptionsMap
console.log(optionsMap,'-=s=s=s==s')
visible.value = true
}
......
......@@ -117,9 +117,9 @@
style="width: 240px">
<a-select-option
v-for="item in childAdultAgeOptions"
:key="item.value"
:value="item.value"
>{{item.label}}</a-select-option>
:key="item.ageStr"
:value="item.ageStr"
>{{item.nameCn}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="性别:" style="padding: 5px 0">
......@@ -358,6 +358,8 @@ export default {
const onAccountChange = function() {
getPlazaList(1)
getProductList(1)
// 获取当前集团的年龄分裂
getChildAdultAgeOptions()
}
const onPlazaChange = function() {
......@@ -551,6 +553,7 @@ export default {
}
getPlazaList()
getProductList()
getChildAdultAgeOptions()
}
}
}
......@@ -599,7 +602,7 @@ export default {
endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
page: pageNum.value - 1,
pageSize: pageSize.value,
age: rawData.childAdult?rawData.childAdult.toString():'',
ageDis: rawData.childAdult?rawData.childAdult.toString():'',
gender: rawData.gender?rawData.gender.toString():'',
}
)
......@@ -663,14 +666,25 @@ export default {
return (positionList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const childAdultAgeOptions = ref([
{ value: 0, label: '婴儿' },
{ value: 1, label: '儿童' },
{ value: 2, label: '少年' },
{ value: 3, label: '青年' },
{ value: 4, label: '中年' },
{ value: 5, label: '老年' },
{ value: -1, label: '未知' },
// { value: 0, label: '婴儿' },
// { value: 1, label: '儿童' },
// { value: 2, label: '少年' },
// { value: 3, label: '青年' },
// { value: 4, label: '中年' },
// { value: 5, 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([
{ value: 0, label: '儿童' },
{ value: 1, label: '成人' },
......@@ -1591,6 +1605,7 @@ export default {
genderOptions,
loadAllImages,
allImagesLoading,
getChildAdultAgeOptions
}
}
}
......
......@@ -135,6 +135,15 @@ class SnapshotRecordApi {
}
)
}
// 获取集团配置下年龄分类
getAgeDistributionConfig(id) {
return axiosInstance.request(
{
method: 'GET',
url: `/accounts/ageDistributionConfig?accountId=${id}`,
}
)
}
}
const snapshotRecordApi = new SnapshotRecordApi()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!