ปิด pop up เเล้วดึงข้อมูลใหม่
This commit is contained in:
parent
e997e096dc
commit
74e204b5cc
3 changed files with 13 additions and 4 deletions
|
|
@ -49,7 +49,6 @@ onMounted(() => {
|
|||
/>
|
||||
</q-tabs>
|
||||
<q-separator size="2px" />
|
||||
<!-- person -->
|
||||
<ListPrefix v-if="currentTab == 'list_prefix'" />
|
||||
<ListRank v-if="currentTab == 'list_rank'" />
|
||||
<ListBloodGroup v-if="currentTab == 'list_bloodGroup'" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { ref, reactive, watch,defineProps } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -28,6 +28,10 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const props = defineProps({
|
||||
fetchDataTable: Function,
|
||||
});
|
||||
|
||||
function onDrop(from: any, to: any) {
|
||||
onDropRow(from, to);
|
||||
}
|
||||
|
|
@ -40,6 +44,7 @@ function save() {
|
|||
dialogConfirm($q, () => {
|
||||
const data = rows.value;
|
||||
const dataId = data.map((item: any) => item.id);
|
||||
showLoader()
|
||||
http
|
||||
.post(config.API.orgPosSort, {
|
||||
id: store.treeId,
|
||||
|
|
@ -49,11 +54,14 @@ function save() {
|
|||
.then((res) => {
|
||||
modal.value = false;
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchDataTable?.(store.treeId,store.level,false)
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader()
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +94,8 @@ function getData() {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ function updatePagination(newPagination: NewPagination) {
|
|||
|
||||
<!-- รายละเอียดตำแหน่ง -->
|
||||
<DialogPositionDetail v-model:position-detail="dialogDetail" />
|
||||
<DialogSort v-model:sort-position="modalSort" />
|
||||
<DialogSort v-model:sort-position="modalSort" :fetchDataTable="props.fetchDataTable"/>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue