添加地区

This commit is contained in:
liaozetao
2024-04-26 14:11:29 +08:00
parent 15578a4858
commit cee6376980

View File

@@ -55,6 +55,14 @@
</div>
</div>
<div class="col-sm-12">
<label for="partitionId" class="col-sm-1 control-label">地区</label>
<div class="col-sm-2">
<select name="partitionId" id="partitionId" class="form-control">
</select>
</div>
</div>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
@@ -76,6 +84,8 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper';
export default {
name: "UserDetailAdminView",
@@ -84,6 +94,7 @@ export default {
},
created() {
this.$nextTick(function () {
this.initPartition();
this.initData();
});
},
@@ -155,6 +166,7 @@ export default {
phone: $('#phone').val(),
startDate: $('#startDate').val(),
endDate: $('#endDate').val(),
partitionId: $('#partitionId').val(),
};
return param;
},
@@ -169,6 +181,7 @@ export default {
},
columns: [
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle' },
{ field: 'partitionDesc', title: '地区', align: 'center', valign: '15%' },
{ field: 'erbanNo', title: '平台号', align: 'center', valign: '10%' },
{ field: 'nick', title: '昵称', align: 'center', valign: '15%' },
{
@@ -229,7 +242,25 @@ export default {
});
}
},
initPartition() {
getPartitionInfoList().then(res => {
let data = res.data;
buildSelectOption(
"#partitionId",
null,
[{
value: '',
text: '全部'
}].concat(data.map((v) => {
return {
value: v.id,
text: v.desc,
};
}))
);
});
},
},
};