ปิด api ที่ยังไม่ได่ใช้
This commit is contained in:
parent
6ab1a862d6
commit
a61dfb8789
6 changed files with 109 additions and 96 deletions
13
src/main.ts
13
src/main.ts
|
|
@ -1,22 +1,23 @@
|
|||
import { createApp, defineAsyncComponent } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import { Dialog, Notify, Quasar } from 'quasar'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import { Dialog, Notify, Quasar } from 'quasar'
|
||||
import quasarUserOptions from './quasar-user-options'
|
||||
|
||||
import '@vuepic/vue-datepicker/dist/main.css'
|
||||
import 'quasar/src/css/index.sass'
|
||||
import th from 'quasar/lang/th'
|
||||
|
||||
import '@vuepic/vue-datepicker/dist/main.css'
|
||||
import http from './plugins/http'
|
||||
import { createPinia } from 'pinia'
|
||||
|
||||
// import './assets/main.css'
|
||||
|
||||
const app = createApp(App)
|
||||
const pinia = createPinia()
|
||||
|
||||
app.use(pinia)
|
||||
app.use(router)
|
||||
app.use(pinia)
|
||||
|
||||
app.use(
|
||||
Quasar,
|
||||
|
|
@ -52,4 +53,6 @@ app.component(
|
|||
defineAsyncComponent(() => import('./plugins/FullLoader.vue'))
|
||||
)
|
||||
|
||||
app.config.globalProperties.$http = http
|
||||
|
||||
app.mount('#app')
|
||||
|
|
|
|||
|
|
@ -333,20 +333,20 @@ onMounted(async () => {
|
|||
|
||||
const fetchQualification = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.educationQualification)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
qualificationOptions.value = option
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
// await http
|
||||
// .get(config.API.educationQualification)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// qualificationOptions.value = option
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
|
||||
const fetchData = async () => {}
|
||||
|
|
|
|||
|
|
@ -342,72 +342,72 @@ const selectSubDistrict = (e: string, name: string) => {
|
|||
}
|
||||
|
||||
const fetchProvince = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
provinceOptions.value = option
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.province)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// provinceOptions.value = option
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
|
||||
const fetchDistrict = async (id: string, position: string) => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
if (position == '1') {
|
||||
districtOptions.value = option
|
||||
} else {
|
||||
districtCOptions.value = option
|
||||
}
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.listDistrict(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// if (position == '1') {
|
||||
// districtOptions.value = option
|
||||
// } else {
|
||||
// districtCOptions.value = option
|
||||
// }
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
|
||||
const fetchSubDistrict = async (id: string, position: string) => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.listSubDistrict(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: zipCodeOption[] = []
|
||||
// console.log(res);
|
||||
data.map((r: any) => {
|
||||
option.push({
|
||||
id: r.id.toString(),
|
||||
name: r.name.toString(),
|
||||
zipCode: r.zipCode.toString()
|
||||
})
|
||||
})
|
||||
if (position == '1') {
|
||||
subdistrictOptions.value = option
|
||||
} else {
|
||||
subdistrictCOptions.value = option
|
||||
}
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.listSubDistrict(id))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: zipCodeOption[] = []
|
||||
// // console.log(res);
|
||||
// data.map((r: any) => {
|
||||
// option.push({
|
||||
// id: r.id.toString(),
|
||||
// name: r.name.toString(),
|
||||
// zipCode: r.zipCode.toString()
|
||||
// })
|
||||
// })
|
||||
// if (position == '1') {
|
||||
// subdistrictOptions.value = option
|
||||
// } else {
|
||||
// subdistrictCOptions.value = option
|
||||
// }
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
|
||||
const cancelData = () => {}
|
||||
|
|
|
|||
|
|
@ -415,22 +415,22 @@ const changeBtn = async () => {
|
|||
}
|
||||
|
||||
const fetchProvince = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
// console.log(data);
|
||||
data.map((r: any) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
provinceOptions.value = option
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
// // loader.value = true;
|
||||
// await http
|
||||
// .get(config.API.province)
|
||||
// .then((res) => {
|
||||
// const data = res.data.result
|
||||
// let option: DataOption[] = []
|
||||
// // console.log(data);
|
||||
// data.map((r: any) => {
|
||||
// option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
// })
|
||||
// provinceOptions.value = option
|
||||
// })
|
||||
// .catch((e: any) => {})
|
||||
// .finally(() => {
|
||||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
|
||||
const savePic = () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
import { ref, computed } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useMetaStore = defineStore('meta', () => {
|
||||
const meta = ref<string>('')
|
||||
|
||||
return {
|
||||
meta
|
||||
}
|
||||
})
|
||||
|
|
@ -64,7 +64,7 @@ const doLogout = () => {
|
|||
<!-- แบบเก่า design แรก -->
|
||||
<!-- <q-layout view="lHh Lpr lff"> -->
|
||||
<!-- ปรับให้กับหน้า รายละเอียดรายการสอบทั้งหมด -->
|
||||
<q-layout view="lHh LpR lff" @scroll="onScroll">
|
||||
<q-layout view="lHh LpR lff">
|
||||
<!-- header -->
|
||||
<q-header flat class="bg-grey-2 text-dark" height-hint="7">
|
||||
<q-toolbar style="padding: 0 2%">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue