props roundId

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-23 16:17:17 +07:00
parent 8d45efa921
commit 5c50705f72
4 changed files with 33 additions and 10 deletions

View file

@ -2,6 +2,8 @@
import { ref, onMounted } from "vue";
// import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue";
import fileUploadview from "../components/3_result/fileUpload.vue";
@ -21,12 +23,25 @@ const selectTypeOption = ref<OptionData[]>([
{ id: "1", name: "เบญจมาภรณ์มงกุฎไทย" },
]);
const selectRound = ref<string>("1");
const selectRoundOption = ref<OptionData[]>([
{ id: "1", name: "รอบการเสนอขอพระราชทานเครื่องราชฯ ปี 2566" },
]);
const filterKeyword = ref<string>("");
const selectRound = ref<string>();
const selectRoundOption = ref<OptionData[]>([]);
onMounted(async () => {
await fecthRound();
});
const fecthRound = async () => {
await http
.get(config.API.noteround())
.then((res) => {
let data = res.data.result;
selectRoundOption.value = data;
selectRound.value = data[0].id;
})
.catch((err) => {
console.log(err);
});
};
const filterKeyword = ref<string>("");
const pagination = ref({
sortBy: "filename",
@ -670,7 +685,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
</div>
<div v-else-if="tab == 'doc'">
<fileUploadview />
<fileUploadview :roundId="selectRound" />
</div>
</div>