Refactoring code module 11_discipline
This commit is contained in:
parent
202fbf27b6
commit
9653ae78cb
58 changed files with 1021 additions and 1305 deletions
|
|
@ -2,9 +2,10 @@
|
|||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||
|
||||
|
|
@ -168,28 +169,6 @@ async function clickCancel() {
|
|||
edit.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่น Save
|
||||
*/
|
||||
// async function conditionSave() {
|
||||
// if (myForm.value !== null) {
|
||||
// myForm.value.validate().then((success) => {
|
||||
// if (success) {
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
// "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ตกลง",
|
||||
// "public",
|
||||
// async () => await saveData(),
|
||||
// undefined
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่น Saveจาก API
|
||||
*/
|
||||
|
|
@ -274,60 +253,6 @@ onMounted(async () => {
|
|||
รายละเอียดการของ {{ data.name }}
|
||||
</div>
|
||||
|
||||
<!-- <q-card bordered class="row col-12 text-dark">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-subtitle2">
|
||||
{{ data.name }}
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
outline
|
||||
color="blue"
|
||||
dense
|
||||
icon-right="mdi-open-in-new"
|
||||
class="q-px-sm"
|
||||
label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="onclickViewinfo(data.personId)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-3 col-sm-2 col-md-1 row">
|
||||
<q-img
|
||||
:src="data.avatar"
|
||||
v-if="data.avatar !== '' && data.avatar !== null"
|
||||
/>
|
||||
<q-img src="@/assets/avatar_user.jpg" v-else />
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12 q-pl-md">
|
||||
<div class="col-12 text-top">ตำแหน่งในสายงาน</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{ data.position }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="col-12 text-top">ระดับ</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{ data.positionLevel }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="col-12 text-top">สังกัด</div>
|
||||
<div class="col-12 text-detail">
|
||||
{{ data.organization }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card> -->
|
||||
|
||||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted } from "vue";
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
|
|
@ -16,7 +17,6 @@ const selected = ref<any>([]);
|
|||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
import { ref, onMounted, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||
|
||||
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
|
@ -18,7 +19,6 @@ const dataStore = useDisciplineSuspendStore();
|
|||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { messageError, showLoader, hideLoader, success } = mixin;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -126,13 +126,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
const openModal = () => (modal.value = true);
|
||||
const closeModal = () => (modal.value = false);
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -149,6 +142,13 @@ const pagination = ref({
|
|||
rowsPerPage: rowsPerPage.value,
|
||||
});
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
getList();
|
||||
}
|
||||
|
||||
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
||||
function openModalOrder() {
|
||||
openModal();
|
||||
|
|
@ -213,6 +213,10 @@ function onSubmit(data: dataType[], type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentPage.value,
|
||||
() => {
|
||||
|
|
@ -230,10 +234,6 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
function filterFn() {
|
||||
getList();
|
||||
}
|
||||
|
||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue