ปรับ Code เคื่องราช

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-29 10:59:58 +07:00
parent 51d072ccc0
commit 240862be2c
13 changed files with 548 additions and 885 deletions

View file

@ -63,10 +63,9 @@ const fecthRound = async () => {
}));
selectRound.value = data[0].id;
roundYear.value = data[0].year;
// console.log(roundYear.value);
})
.catch((err) => {
console.log(err);
messageError($q, err);
});
};
@ -82,7 +81,7 @@ const fecthInsignia = async () => {
})
.finally(async () => {
insigniaOp.value = await DataStore.insigniaOp.filter(
(x: any) => x.type == tab.value || x.type === ""
(x: any) => x.type == tab.value || x.type === ""
);
});
};
@ -90,16 +89,13 @@ const fecthInsignia = async () => {
const fecthInsigniaType = async () => {
await http(config.API.insigniaType)
.then((res) => {
// console.log(res);
let data = res.data.result;
DataStore.fetchDatainsigniaType(data);
tab.value = DataStore.insigniaType[0].name;
// fecthlistInsignia();
fecthInsignia();
})
.catch((err) => {
console.log(err);
messageError($q, err);
});
};
@ -159,7 +155,6 @@ const columns = ref<QTableProps["columns"]>([
},
]);
watch(tab, () => {
console.log(DataStore.insigniaOp);
insigniaOp.value = DataStore.insigniaOp.filter(
(x: any) => x.type == tab.value || x.type === ""
);
@ -182,7 +177,6 @@ const fecthlistInsignia = async () => {
DataStore.listinsignia(data);
})
.catch((err) => {
console.log(err);
messageError($q, err);
})
.finally(() => {
@ -542,31 +536,4 @@ const resetFilter = () => {
/>
</template>
<style lang="scss" scoped>
.arrow {
transition: transform 0.5s;
}
.arrow-active {
transition: transform 0.5s;
transform: rotate(-90deg);
}
.bg-base {
background-color: #f3f3f398;
}
.v-enter-active,
.v-leave-active {
transition: opacity 0.5s ease;
}
.v-enter-from,
.v-leave-to {
opacity: 0;
}
.flexsave {
display: flex;
justify-content: flex-end;
}
</style>