แก้ไขบัค
This commit is contained in:
parent
a2ac793131
commit
f9fac262ef
10 changed files with 174 additions and 152 deletions
|
|
@ -8,7 +8,6 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import type {
|
||||
Address,
|
||||
DataOption,
|
||||
zipCodeOption,
|
||||
} from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||
import { defaultAddress } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||
|
|
@ -17,12 +16,12 @@ import type { RequestItemsHistoryObject } from "@/modules//05_placement/interfac
|
|||
import type { ResponseObject } from "@/modules//05_placement/interface/response/Address";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
|
||||
|
||||
import type {
|
||||
AddressOps,
|
||||
Address as AddressType,
|
||||
optionData,
|
||||
} from "@/modules//05_placement/interface/index/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { PropType } from "vue";
|
||||
|
|
@ -247,35 +246,35 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
case "provinceOps":
|
||||
update(() => {
|
||||
Ops.value.provinceOps = OpsFilter.value.provinceOps.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
(v: optionData) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "districtOps":
|
||||
update(() => {
|
||||
Ops.value.districtOps = OpsFilter.value.districtOps.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
(v: optionData) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "districtCOps":
|
||||
update(() => {
|
||||
Ops.value.districtCOps = OpsFilter.value.districtCOps.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
(v: optionData) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "subdistrictOps":
|
||||
update(() => {
|
||||
Ops.value.subdistrictOps = OpsFilter.value.subdistrictOps.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
(v: optionData) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
case "subdistrictCOps":
|
||||
update(() => {
|
||||
Ops.value.subdistrictCOps = OpsFilter.value.subdistrictCOps.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
(v: optionData) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
|
|
@ -465,7 +464,7 @@ const fetchProvince = async () => {
|
|||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
let option: optionData[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||
});
|
||||
|
|
@ -487,17 +486,17 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
|||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
let option: optionData[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||
});
|
||||
if (position == "1") {
|
||||
Ops.value.districtOps = option;
|
||||
OpsFilter.value.districtOps = option;
|
||||
} else {
|
||||
Ops.value.districtCOps = option;
|
||||
OpsFilter.value.districtCOps = option;
|
||||
}
|
||||
// if (position == "1") {
|
||||
// Ops.value.districtOps = option;
|
||||
// OpsFilter.value.districtOps = option;
|
||||
// } else {
|
||||
// Ops.value.districtCOps = option;
|
||||
// OpsFilter.value.districtCOps = option;
|
||||
// }
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue