ปรับ code รายชื่อผู้ถูกพักราชการ
This commit is contained in:
parent
4068fd8b74
commit
7668b4f002
6 changed files with 125 additions and 167 deletions
|
|
@ -35,13 +35,6 @@ const {
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const roleAdmin = ref<boolean>(false);
|
const roleAdmin = ref<boolean>(false);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const organizationPositionOld = ref<string>("");
|
|
||||||
const positionTypeOld = ref<string>("");
|
|
||||||
const positionLevelOld = ref<string>("");
|
|
||||||
const posNo = ref<string>("");
|
|
||||||
const organization = ref<string>("");
|
|
||||||
const date = ref<Date | null>(null);
|
|
||||||
const reason = ref<string>("");
|
|
||||||
|
|
||||||
const data = reactive<dataDetail>({
|
const data = reactive<dataDetail>({
|
||||||
id: "",
|
id: "",
|
||||||
|
|
@ -67,16 +60,8 @@ const data = reactive<dataDetail>({
|
||||||
disciplinaryCaseFault: "",
|
disciplinaryCaseFault: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Hook */
|
/**นำข้อมูลจาก API มาแสดง */
|
||||||
onMounted(async () => {
|
async function getData(){
|
||||||
if (keycloak.tokenParsed != null) {
|
|
||||||
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
|
||||||
}
|
|
||||||
await getData();
|
|
||||||
});
|
|
||||||
|
|
||||||
//นำข้อมูลจาก API มาแสดง
|
|
||||||
const getData = async () => {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.suspendById(dataId))
|
.get(config.API.suspendById(dataId))
|
||||||
|
|
@ -117,7 +102,7 @@ const getData = async () => {
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Cancle
|
* ฟังก์ชั่น Cancle
|
||||||
*/
|
*/
|
||||||
const clickCancel = async () => {
|
async function clickCancel(){
|
||||||
await getData();
|
await getData();
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
};
|
};
|
||||||
|
|
@ -125,7 +110,7 @@ const clickCancel = async () => {
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Save
|
* ฟังก์ชั่น Save
|
||||||
*/
|
*/
|
||||||
const conditionSave = async () => {
|
async function conditionSave(){
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((success) => {
|
myForm.value.validate().then((success) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
@ -147,7 +132,7 @@ const conditionSave = async () => {
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Saveจาก API
|
* ฟังก์ชั่น Saveจาก API
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
async function saveData(){
|
||||||
const body = {
|
const body = {
|
||||||
organization: data.organization,
|
organization: data.organization,
|
||||||
position: data.position,
|
position: data.position,
|
||||||
|
|
@ -178,12 +163,21 @@ const saveData = async () => {
|
||||||
* Function เพิ่ม Class เวลา Edit
|
* Function เพิ่ม Class เวลา Edit
|
||||||
* @param val เมื่อเป็นEdit จะเปลี่ยน Class
|
* @param val เมื่อเป็นEdit จะเปลี่ยน Class
|
||||||
*/
|
*/
|
||||||
const getClass = (val: boolean) => {
|
function getClass(val: boolean){
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** Hook */
|
||||||
|
onMounted(async () => {
|
||||||
|
if (keycloak.tokenParsed != null) {
|
||||||
|
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
||||||
|
}
|
||||||
|
await getData();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
import { ref, computed, watch } from "vue";
|
import { ref, computed, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -12,8 +14,12 @@ import config from "@/app.config";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
const { success, dialogConfirm } = mixin;
|
||||||
|
const emit = defineEmits([
|
||||||
|
"update:filterKeyword2",
|
||||||
|
"update:selected",
|
||||||
|
"returnPerson",
|
||||||
|
]);
|
||||||
/** คอลัมน์ */
|
/** คอลัมน์ */
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns2 = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -92,9 +98,6 @@ const props = defineProps({
|
||||||
filterKeyword2: String,
|
filterKeyword2: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชั่นการ Selected Data
|
|
||||||
*/
|
|
||||||
const checkSelected = computed(() => {
|
const checkSelected = computed(() => {
|
||||||
if (selected.value.length === 0) {
|
if (selected.value.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -102,29 +105,31 @@ const checkSelected = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
//popup ยืนยันส่งัว
|
//popup ยืนยันส่งัว
|
||||||
const saveOrder = () => {
|
function saveOrder() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
|
success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
|
||||||
emit("returnPerson", selected.value);
|
emit("returnPerson", selected.value);
|
||||||
props.closeModal?.();
|
props.closeModal?.();
|
||||||
},
|
},
|
||||||
`ยืนยันการส่งไปออกคำสั่ง`,
|
`ยืนยันการส่งไปออกคำสั่ง`,
|
||||||
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
|
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
const emit = defineEmits(["update:filterKeyword2", "update:selected",'returnPerson']);
|
* ส่งค่ากลับไปหน้าหลัก
|
||||||
const updateInput = (value: any) => {
|
* @param value ค่าที่รับจาก input
|
||||||
|
*/
|
||||||
|
function updateInput(value: any) {
|
||||||
emit("update:filterKeyword2", value);
|
emit("update:filterKeyword2", value);
|
||||||
};
|
}
|
||||||
|
|
||||||
//รีเซ็ตค่าในช่องค้นหา
|
//รีเซ็ตค่าในช่องค้นหา
|
||||||
const Reset = () => {
|
function Reset() {
|
||||||
emit("update:filterKeyword2", "");
|
emit("update:filterKeyword2", "");
|
||||||
};
|
}
|
||||||
// watch([()=>props.modal],() => {
|
// watch([()=>props.modal],() => {
|
||||||
// selected.value = props.modal ? [] : [];
|
// selected.value = props.modal ? [] : [];
|
||||||
// if (props.modal === true) {
|
// if (props.modal === true) {
|
||||||
|
|
@ -161,6 +166,7 @@ const Reset = () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="visibleColumns2"
|
v-model="visibleColumns2"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -189,7 +195,7 @@ const Reset = () => {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>
|
<q-th auto-width>
|
||||||
<!-- <q-checkbox
|
<!-- <q-checkbox
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,29 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useTransferDataStore } from "@/modules/05_placement/store";
|
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 http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
||||||
import type { dataType } from '@/modules/11_discipline/interface/response/suspend'
|
|
||||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
const dataStore = useDisciplineSuspendStore();
|
const dataStore = useDisciplineSuspendStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const transferStore = useTransferDataStore();
|
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
|
||||||
dialogMessage,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const { statusText } = transferStore;
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
|
|
||||||
/** คอลัมน์ที่แสดง */
|
/** คอลัมน์ที่แสดง */
|
||||||
|
|
@ -121,23 +119,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
onMounted(async () => {
|
|
||||||
await getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
function openModalOrder(){
|
|
||||||
openModal();
|
|
||||||
const dataMap = dataStore.rows.filter((r: dataType) =>
|
|
||||||
r.statusEn == "PENDING" &&
|
|
||||||
r.name &&
|
|
||||||
r.organization &&
|
|
||||||
r.position &&
|
|
||||||
r.positionLevel &&
|
|
||||||
r.posNo &&
|
|
||||||
r.organization
|
|
||||||
)
|
|
||||||
rows2.value = dataMap;
|
|
||||||
};
|
|
||||||
|
|
||||||
const openModal = () => (modal.value = true);
|
const openModal = () => (modal.value = true);
|
||||||
const closeModal = () => (modal.value = false);
|
const closeModal = () => (modal.value = false);
|
||||||
|
|
@ -162,22 +143,20 @@ const pagination = ref({
|
||||||
rowsPerPage: rowsPerPage.value,
|
rowsPerPage: rowsPerPage.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
||||||
() => currentPage.value,
|
function openModalOrder(){
|
||||||
() => {
|
openModal();
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
const dataMap = dataStore.rows.filter((r: dataType) =>
|
||||||
getList();
|
r.statusEn == "PENDING" &&
|
||||||
}
|
r.name &&
|
||||||
);
|
r.organization &&
|
||||||
|
r.position &&
|
||||||
watch(
|
r.positionLevel &&
|
||||||
() => pagination.value.rowsPerPage,
|
r.posNo &&
|
||||||
() => {
|
r.organization
|
||||||
rowsPerPage.value = pagination.value.rowsPerPage;
|
)
|
||||||
currentPage.value = 1;
|
rows2.value = dataMap;
|
||||||
getList();
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
/** ดึงข้อมูลหน้าหลัก */
|
/** ดึงข้อมูลหน้าหลัก */
|
||||||
async function getList() {
|
async function getList() {
|
||||||
|
|
@ -203,6 +182,10 @@ async function getList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ยืนยัน ส่งไปออกคำสั่ง
|
||||||
|
* @param data ข้อมูลรายบุคคล
|
||||||
|
*/
|
||||||
function onSubmit(data:dataType[]){
|
function onSubmit(data:dataType[]){
|
||||||
console.log(data)
|
console.log(data)
|
||||||
const dataMapId = data.map((item: dataType) => item.id);
|
const dataMapId = data.map((item: dataType) => item.id);
|
||||||
|
|
@ -221,11 +204,31 @@ function onSubmit(data:dataType[]){
|
||||||
getList()
|
getList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => currentPage.value,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => pagination.value.rowsPerPage,
|
||||||
|
() => {
|
||||||
|
rowsPerPage.value = pagination.value.rowsPerPage;
|
||||||
|
currentPage.value = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
dataStore.columns = columns.value;
|
dataStore.columns = columns.value;
|
||||||
dataStore.visibleColumns = visibleColumns.value;
|
dataStore.visibleColumns = visibleColumns.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
|
@ -246,8 +249,8 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
standout
|
standout
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
watchEffect,
|
|
||||||
watch,
|
|
||||||
onMounted,
|
|
||||||
type PropType,
|
|
||||||
} from "vue";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -123,17 +116,19 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** แสดงจำนวนในตาราง */
|
||||||
|
const pagination = ref({
|
||||||
|
descending: true,
|
||||||
|
page: Number(props.page),
|
||||||
|
rowsPerPage: props.rowsPerPage,
|
||||||
|
});
|
||||||
|
|
||||||
const checkSelected = computed(() => {
|
const checkSelected = computed(() => {
|
||||||
if (selected.value.length === 0) {
|
if (selected.value.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/** เลือกกรรมการ */
|
|
||||||
async function directorSave() {
|
|
||||||
emit("returnDirector", selected.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
"update:filterKeyword2",
|
"update:filterKeyword2",
|
||||||
"update:selected",
|
"update:selected",
|
||||||
|
|
@ -141,6 +136,11 @@ const emit = defineEmits([
|
||||||
"returnDirector",
|
"returnDirector",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** เลือกกรรมการ */
|
||||||
|
async function directorSave() {
|
||||||
|
emit("returnDirector", selected.value);
|
||||||
|
}
|
||||||
|
|
||||||
function updateInput(value: any) {
|
function updateInput(value: any) {
|
||||||
emit("update:filterKeyword2", value);
|
emit("update:filterKeyword2", value);
|
||||||
}
|
}
|
||||||
|
|
@ -150,6 +150,11 @@ function Reset() {
|
||||||
emit("update:filterKeyword2", "");
|
emit("update:filterKeyword2", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateProp(newPagination: any, page: number) {
|
||||||
|
// ส่ง event ไปยัง parent component เพื่ออัพเดทค่า props
|
||||||
|
emit("update:pagination", newPagination, page);
|
||||||
|
}
|
||||||
|
|
||||||
/** เช็คค่า props.Modal === true */
|
/** เช็คค่า props.Modal === true */
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
|
|
@ -158,18 +163,6 @@ watchEffect(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/** แสดงจำนวนในตาราง */
|
|
||||||
const pagination = ref({
|
|
||||||
descending: true,
|
|
||||||
page: Number(props.page),
|
|
||||||
rowsPerPage: props.rowsPerPage,
|
|
||||||
});
|
|
||||||
|
|
||||||
const updateProp = (newPagination: any, page: number) => {
|
|
||||||
// ส่ง event ไปยัง parent component เพื่ออัพเดทค่า props
|
|
||||||
emit("update:pagination", newPagination, page);
|
|
||||||
};
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => currentPage.value,
|
() => currentPage.value,
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const table = ref<any>(null);
|
const table = ref<any>(null);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
|
|
||||||
const initialPagination = ref<Pagination>({
|
|
||||||
rowsPerPage: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
count: Number,
|
count: Number,
|
||||||
|
|
@ -49,14 +44,6 @@ const emit = defineEmits([
|
||||||
"update:editvisible",
|
"update:editvisible",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function updateInput(value: string | number | null){
|
|
||||||
emit("update:inputfilter", value);
|
|
||||||
};
|
|
||||||
|
|
||||||
function updateVisible(value: []){
|
|
||||||
emit("update:inputvisible", value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "desc",
|
sortBy: "desc",
|
||||||
descending: false,
|
descending: false,
|
||||||
|
|
@ -69,16 +56,6 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
return " " + start + " ใน " + end + " จากจำนวน " + total + " รายการ";
|
return " " + start + " ใน " + end + " จากจำนวน " + total + " รายการ";
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkAdd = () => {
|
|
||||||
props.add();
|
|
||||||
};
|
|
||||||
|
|
||||||
const resetFilter = () => {
|
|
||||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
|
||||||
emit("update:inputfilter", "");
|
|
||||||
filterRef.value.focus();
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,11 @@ import { useQuasar } from "quasar";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const { dialogConfirm,dialogMessageNotify } = mixin;
|
const { dialogConfirm, dialogMessageNotify } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -60,20 +59,21 @@ const initialPagination = ref<any>({
|
||||||
});
|
});
|
||||||
|
|
||||||
function onclickSend() {
|
function onclickSend() {
|
||||||
if(selected.value.length === 0){
|
if (selected.value.length === 0) {
|
||||||
dialogMessageNotify($q,'กรุณาเลือกอย่างน้อย 1 บุคคล')
|
dialogMessageNotify($q, "กรุณาเลือกอย่างน้อย 1 บุคคล");
|
||||||
}else{
|
} else {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
// success($q, `ส่งข้อมูล${props.title}สำเร็จ`);
|
||||||
emit("returnPerson", selected.value);
|
emit("returnPerson", selected.value);
|
||||||
props.close?.();
|
props.close?.();
|
||||||
},
|
},
|
||||||
`ยืนยันการ${props.title}`,
|
`ยืนยันการ${props.title}`,
|
||||||
`ต้องการยืนยันการ${props.title}หรือไม่`
|
`ต้องการยืนยันการ${props.title}หรือไม่`
|
||||||
);
|
);
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onClickClose() {
|
function onClickClose() {
|
||||||
props.close?.();
|
props.close?.();
|
||||||
|
|
@ -194,21 +194,6 @@ watch([() => props.modal], () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
<!-- <div class="col-xs-12 col-sm-12 q-mt-sm">
|
|
||||||
<q-input
|
|
||||||
for="inputInspectionResults"
|
|
||||||
ref="inputRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
hide-bottom-space
|
|
||||||
v-model="inspectionResults"
|
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกผลการตรวจสอบเรื่องร้องเรียน']"
|
|
||||||
lazy-rules
|
|
||||||
label="ผลการตรวจสอบเรื่องร้องเรียน"
|
|
||||||
type="textarea"
|
|
||||||
rows="5"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue