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