ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -774,7 +774,6 @@ import type {
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useManageDataStore } from "@/modules/01_metadata/store";
|
||||
|
||||
const props = defineProps({
|
||||
statusEdit: {
|
||||
|
|
@ -790,10 +789,10 @@ const emit = defineEmits(["update:statusEdit"]);
|
|||
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const store = useManageDataStore();
|
||||
const { getPrefix } = store;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const { date2Thai, success, messageError } = mixin;
|
||||
const edit = ref<boolean>(false);
|
||||
const fix = ref<boolean>(true);
|
||||
const myform = ref<QForm | null>(null);
|
||||
|
|
@ -858,34 +857,24 @@ const refreshData = async () => {
|
|||
};
|
||||
|
||||
const fetchPrefix = async () => {
|
||||
const result = await getPrefix(true, false);
|
||||
const data = result.data;
|
||||
let option: DataOption[] = [];
|
||||
if (data.length > 0) {
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||
});
|
||||
Ops.value.prefixOps = option;
|
||||
OpsFilter.value.prefixOps = option;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
});
|
||||
}
|
||||
Ops.value.prefixOps = option;
|
||||
OpsFilter.value.prefixOps = option;
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.prefix)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// let option: DataOption[] = [];
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||
// });
|
||||
// Ops.value.prefixOps = option;
|
||||
// OpsFilter.value.prefixOps = option;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
const addChildren = async () => {
|
||||
|
|
@ -912,7 +901,7 @@ const deleteChildren = (items: childrenFamily) => {
|
|||
|
||||
const fetchHistory = async () => {
|
||||
familyDataHistory.value = [];
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileFamiHisId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -944,7 +933,7 @@ const fetchHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
if (familyDataHistory.value.length == 0) {
|
||||
// modalError(
|
||||
// $q,
|
||||
|
|
@ -966,7 +955,7 @@ const fetchHistory = async () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileFamiId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -1011,12 +1000,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const editData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
const body: ResponseObject = {
|
||||
couple: familyData.value.same == "1",
|
||||
couplePrefixId: familyData.value.prefixIdC,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue