ปรับ Code เคื่องราช
This commit is contained in:
parent
51d072ccc0
commit
240862be2c
13 changed files with 548 additions and 885 deletions
|
|
@ -11,17 +11,9 @@ import type { OptionDataYear } from "@/modules/07_insignia/interface/index/Main"
|
|||
import type { QTableProps, QInput } from "quasar";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
// const router = useRouter();
|
||||
const DataStore = useBrrowDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
} = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const $q = useQuasar();
|
||||
const tab = ref<string>("");
|
||||
|
||||
|
|
@ -31,10 +23,8 @@ const selectRoundAllOption = ref<OptionDataYear[]>([]);
|
|||
|
||||
const modal = ref<boolean>(false);
|
||||
const action = ref<string>("");
|
||||
const personId = ref<string>();
|
||||
const profileId = ref<string>("");
|
||||
const roundYear = ref<any>();
|
||||
const insigniaListAll = ref<any>([]);
|
||||
const insigniaList = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -46,8 +36,6 @@ const fecthRound = async () => {
|
|||
.get(config.API.noteround())
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
|
|
@ -73,7 +61,7 @@ const fecthRound = async () => {
|
|||
roundYear.value = data[0].year;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -81,7 +69,6 @@ const fecthInsignia = async () => {
|
|||
await http
|
||||
.get(config.API.insignia)
|
||||
.then((res) => {
|
||||
// console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDataInsignia(data);
|
||||
})
|
||||
|
|
@ -98,7 +85,6 @@ const fecthInsignia = async () => {
|
|||
const fecthInsigniaType = async () => {
|
||||
await http(config.API.insigniaType)
|
||||
.then(async (res) => {
|
||||
// console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
|
|
@ -316,7 +302,6 @@ const fecthlistInsignia = async () => {
|
|||
rows.value = DataStore.rows;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -514,11 +499,7 @@ const resetFilter = () => {
|
|||
:modal="modal"
|
||||
:close="close"
|
||||
:close-and-fecth="closeAndFecth"
|
||||
:round-id="
|
||||
selectRound == '00000000-0000-0000-0000-000000000000'
|
||||
? 'all'
|
||||
: selectRound
|
||||
"
|
||||
:round-id="selectRound == '0' ? 'all' : selectRound"
|
||||
:action="action"
|
||||
:profile-id="profileId"
|
||||
:select-round-option="selectRoundOption"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue