|
@@ -62,7 +62,7 @@ let fields: Ref<any[]> = ref([
|
|
{ label: '账号', model: 'account', isSearch: true },
|
|
{ label: '账号', model: 'account', isSearch: true },
|
|
{ label: '姓名', model: 'name', isSearch: true },
|
|
{ label: '姓名', model: 'name', isSearch: true },
|
|
{ label: '手机号', model: 'phone', isSearch: true },
|
|
{ label: '手机号', model: 'phone', isSearch: true },
|
|
- { label: '所属辖区', model: 'area' },
|
|
|
|
|
|
+ { label: '所属辖区', model: 'area', format: (i) => getDict(i, 'area') },
|
|
{ label: '状态', model: 'status', format: (i) => getDict(i, 'status') }
|
|
{ label: '状态', model: 'status', format: (i) => getDict(i, 'status') }
|
|
]);
|
|
]);
|
|
// 操作
|
|
// 操作
|
|
@@ -79,6 +79,7 @@ let formFields: Ref<any[]> = ref([{ label: '状态', model: 'status', type: 'sel
|
|
// 查询数据
|
|
// 查询数据
|
|
let searchForm: Ref<any> = ref({});
|
|
let searchForm: Ref<any> = ref({});
|
|
let statusList: Ref<any> = ref([]);
|
|
let statusList: Ref<any> = ref([]);
|
|
|
|
+let areaList: Ref<any> = ref([]);
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
await searchOther();
|
|
await searchOther();
|
|
@@ -105,6 +106,10 @@ const getDict = (e, model) => {
|
|
let data: any = statusList.value.find((i: any) => i.value == e);
|
|
let data: any = statusList.value.find((i: any) => i.value == e);
|
|
if (data) return data.label;
|
|
if (data) return data.label;
|
|
else return '暂无';
|
|
else return '暂无';
|
|
|
|
+ } else if (model == 'area') {
|
|
|
|
+ let data: any = areaList.value.find((i: any) => i.value == e);
|
|
|
|
+ if (data) return data.label;
|
|
|
|
+ else return '暂无';
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// 新增
|
|
// 新增
|
|
@@ -155,6 +160,9 @@ const searchOther = async () => {
|
|
// 状态
|
|
// 状态
|
|
res = await dictData.query({ type: 'common_status' });
|
|
res = await dictData.query({ type: 'common_status' });
|
|
if (res.errcode == 0) statusList.value = res.data;
|
|
if (res.errcode == 0) statusList.value = res.data;
|
|
|
|
+ // 状态
|
|
|
|
+ res = await dictData.query({ type: 'jl_area' });
|
|
|
|
+ if (res.errcode == 0) areaList.value = res.data;
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|