Merge branch 'nice' into develop
This commit is contained in:
commit
4d225f860b
29 changed files with 423 additions and 418 deletions
|
|
@ -5,7 +5,6 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { ResponsePreson } from "@/interface/response/listPerson";
|
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
const mainStore = useDisciplineMainStore();
|
const mainStore = useDisciplineMainStore();
|
||||||
|
|
@ -255,7 +254,6 @@ watch(
|
||||||
ref="searchRef"
|
ref="searchRef"
|
||||||
v-model="search"
|
v-model="search"
|
||||||
outlined
|
outlined
|
||||||
clearable
|
|
||||||
dense
|
dense
|
||||||
label="คำค้น"
|
label="คำค้น"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -638,7 +638,7 @@ onMounted(async () => {
|
||||||
node-key="orgTreeName"
|
node-key="orgTreeName"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
:filter="filterMain"
|
:filter="filterMain.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
v-model:selected="nodeData.nodeId"
|
v-model:selected="nodeData.nodeId"
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ onMounted(() => {
|
||||||
:nodes="lazy"
|
:nodes="lazy"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
|
|
|
||||||
|
|
@ -504,7 +504,7 @@ onBeforeMount(async () => {
|
||||||
:nodes="lazy"
|
:nodes="lazy"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="orgTreeName"
|
label-key="orgTreeName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
|
|
|
||||||
|
|
@ -15,20 +15,21 @@ const { showLoader, hideLoader, success, messageError } = mixin;
|
||||||
|
|
||||||
/** บันทึกข้อมูล */
|
/** บันทึกข้อมูล */
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
/** post */
|
console.log(data);
|
||||||
showLoader();
|
|
||||||
http
|
// showLoader();
|
||||||
.post(config.API.complaintAdd(), data)
|
// http
|
||||||
.then((res) => {
|
// .post(config.API.complaintAdd(), data)
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
// .then((res) => {
|
||||||
router.push(`/discipline/complaints/${res.data.result}`);
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
// router.push(`/discipline/complaints/${res.data.result}`);
|
||||||
.catch((e) => {
|
// })
|
||||||
messageError($q, e);
|
// .catch((e) => {
|
||||||
})
|
// messageError($q, e);
|
||||||
.finally(async () => {
|
// })
|
||||||
hideLoader();
|
// .finally(async () => {
|
||||||
});
|
// hideLoader();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, computed } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
|
@ -137,6 +137,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
label: "เงินเดือน",
|
label: "เงินเดือน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "salary",
|
field: "salary",
|
||||||
|
format(val, row) {
|
||||||
|
return val.toLocaleString();
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -211,7 +214,6 @@ async function getData() {
|
||||||
*/
|
*/
|
||||||
async function onSubmit(data: any) {
|
async function onSubmit(data: any) {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
http
|
http
|
||||||
.put(config.API.complaintbyId(id.value), data)
|
.put(config.API.complaintbyId(id.value), data)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
@ -221,7 +223,7 @@ async function onSubmit(data: any) {
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,8 +224,6 @@ async function getActive() {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
await getOc(formData.activeId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
|
||||||
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
// impoet Components
|
// impoet Components
|
||||||
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
import TableComplaint from "@/modules/11_discipline/components/1_Complaint/TableComplaint.vue";
|
||||||
|
|
||||||
|
|
@ -15,21 +17,19 @@ import http from "@/plugins/http";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
|
||||||
|
|
||||||
const { showLoader, messageError, hideLoader } = mixin;
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
/** stoer */
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const { fetchComplainst } = complainstStore;
|
const { fetchComplainst } = complainstStore;
|
||||||
|
const { showLoader, messageError, hideLoader } = mixin;
|
||||||
|
|
||||||
const filterRef = ref<HTMLInputElement | null>(null);
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
const filterTable = ref<string>("");
|
const filterTable = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
||||||
const toptitle = ref<number>(0);
|
const toptitle = ref<number>(0);
|
||||||
const statusFilter = ref<string>("NEW");
|
const statusFilter = ref<string>("NEW");
|
||||||
const option = ref<any[]>(complainstStore.statusOptions);
|
const option = ref<DataOption[]>(complainstStore.statusOptions);
|
||||||
|
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
const totalList = ref<number>(1);
|
const totalList = ref<number>(1);
|
||||||
|
|
@ -53,14 +53,14 @@ async function getList() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
res.data.result.total / pagination.value.rowsPerPage
|
res.data.result.total / pagination.value.rowsPerPage
|
||||||
);
|
);
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
toptitle.value = res.data.result.total;
|
toptitle.value = res.data.result.total;
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
fetchComplainst(data);
|
await fetchComplainst(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -75,16 +75,6 @@ function redirectToPageadd() {
|
||||||
router.push(`/discipline/complaints/add`);
|
router.push(`/discipline/complaints/add`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ล้างค่าใน input */
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
pagination.value.page = 1;
|
|
||||||
if (filterRef.value) {
|
|
||||||
filterRef.value.focus();
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function ค้นหาข้อมูลใน option
|
* function ค้นหาข้อมูลใน option
|
||||||
* @param val คำค้นหา
|
* @param val คำค้นหา
|
||||||
|
|
@ -93,7 +83,7 @@ function resetFilter() {
|
||||||
function filterOptionFn(val: string, update: Function) {
|
function filterOptionFn(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
option.value = complainstStore.statusOptions.filter(
|
option.value = complainstStore.statusOptions.filter(
|
||||||
(e: any) => e.name.search(val) !== -1
|
(e: DataOption) => e.name.search(val) !== -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -106,7 +96,7 @@ function getSearch() {
|
||||||
watch(
|
watch(
|
||||||
() => pagination.value.rowsPerPage,
|
() => pagination.value.rowsPerPage,
|
||||||
async () => {
|
async () => {
|
||||||
await getSearch();
|
getSearch();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -122,41 +112,40 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row col-12 q-col-gutter-sm q-mb-sm items-center">
|
<div class="row col-12 q-col-gutter-sm q-mb-sm items-center">
|
||||||
<div class="col-4">
|
<q-select
|
||||||
<q-select
|
v-model="statusFilter"
|
||||||
v-model="statusFilter"
|
label="สถานะ"
|
||||||
label="สถานะ"
|
dense
|
||||||
dense
|
outlined
|
||||||
outlined
|
emit-value
|
||||||
emit-value
|
map-options
|
||||||
map-options
|
option-label="name"
|
||||||
option-label="name"
|
option-value="id"
|
||||||
option-value="id"
|
hide-selected
|
||||||
hide-selected
|
fill-input
|
||||||
fill-input
|
:options="option"
|
||||||
:options="option"
|
@update:model-value="getSearch()"
|
||||||
@update:model-value="getSearch()"
|
use-input
|
||||||
use-input
|
@filter="filterOptionFn"
|
||||||
@filter="filterOptionFn"
|
>
|
||||||
>
|
<template v-slot:no-option>
|
||||||
<template v-slot:no-option>
|
<q-item>
|
||||||
<q-item>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
</q-item>
|
||||||
</q-item>
|
</template>
|
||||||
</template>
|
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
||||||
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
<q-icon
|
||||||
<q-icon
|
name="cancel"
|
||||||
name="cancel"
|
@click.stop.prevent="
|
||||||
@click.stop.prevent="
|
(option = complainstStore.statusOptions),
|
||||||
(option = complainstStore.statusOptions),
|
(statusFilter = 'ALL'),
|
||||||
(statusFilter = 'ALL'),
|
getSearch()
|
||||||
getSearch()
|
"
|
||||||
"
|
class="cursor-pointer"
|
||||||
class="cursor-pointer"
|
/>
|
||||||
/>
|
</template>
|
||||||
</template>
|
</q-select>
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsCreate"
|
v-if="checkPermission($route)?.attrIsCreate"
|
||||||
|
|
@ -175,7 +164,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -203,7 +191,6 @@ onMounted(async () => {
|
||||||
:options="complainstStore.columns"
|
:options="complainstStore.columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { useInvestigateFactStore } from "@/modules/11_discipline/store/Investiga
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||||
|
|
||||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||||
|
|
@ -70,7 +70,6 @@ const pagination = ref({
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = ref<string>("");
|
|
||||||
const isUpdate = ref<boolean>(false);
|
const isUpdate = ref<boolean>(false);
|
||||||
const filterTable = ref<string>("");
|
const filterTable = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
@ -226,9 +225,9 @@ function uploadFileRelevant() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.investigateRelevantUploadFile(formData.id), Data)
|
.put(config.API.investigateRelevantUploadFile(formData.id), Data)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
countNum.value = 2;
|
countNum.value = 2;
|
||||||
props.getData();
|
await props.getData();
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -1326,9 +1325,7 @@ onMounted(async () => {
|
||||||
style="max-height: 80vh"
|
style="max-height: 80vh"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="investigateDis.columnsDirector"
|
:columns="investigateDis.columnsDirector"
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="investigateDis.visibleColumnsDirector"
|
:visible-columns="investigateDis.visibleColumnsDirector"
|
||||||
v-model:inputfilter="filter"
|
|
||||||
v-model:inputvisible="
|
v-model:inputvisible="
|
||||||
investigateDis.visibleColumnsDirector
|
investigateDis.visibleColumnsDirector
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,6 @@ const pagination = ref({
|
||||||
|
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
|
|
||||||
/** ล้างค่า Input */
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
if (filterRef.value) {
|
|
||||||
filterRef.value.focus();
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ดึงข้อมูลบสวน */
|
/** ดึงข้อมูลบสวน */
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -54,7 +45,7 @@ async function getList() {
|
||||||
statusFilter.value
|
statusFilter.value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
res.data.result.total / pagination.value.rowsPerPage
|
res.data.result.total / pagination.value.rowsPerPage
|
||||||
);
|
);
|
||||||
|
|
@ -62,7 +53,7 @@ async function getList() {
|
||||||
toptitle.value = res.data.result.total;
|
toptitle.value = res.data.result.total;
|
||||||
|
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
dataInvestigate.fecthList(data);
|
await dataInvestigate.fecthList(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -95,7 +86,6 @@ async function detailPage(id: string) {
|
||||||
* @param update function
|
* @param update function
|
||||||
*/
|
*/
|
||||||
function filterOptionFn(val: string, update: Function) {
|
function filterOptionFn(val: string, update: Function) {
|
||||||
statusFilter.value = "";
|
|
||||||
update(() => {
|
update(() => {
|
||||||
option.value = dataInvestigate.statusOptions.filter(
|
option.value = dataInvestigate.statusOptions.filter(
|
||||||
(e: any) => e.name.search(val) !== -1
|
(e: any) => e.name.search(val) !== -1
|
||||||
|
|
@ -127,52 +117,51 @@ onMounted(async () => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
รายการสืบสวนข้อเท็จจริง
|
รายการสืบสวนข้อเท็จจริง
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||||
<div class="col-xs-12 col-sm-4 col-md-3">
|
<q-select
|
||||||
<q-select
|
v-model="statusFilter"
|
||||||
v-model="statusFilter"
|
label="สถานะ"
|
||||||
label="สถานะ"
|
dense
|
||||||
dense
|
outlined
|
||||||
outlined
|
emit-value
|
||||||
emit-value
|
map-options
|
||||||
map-options
|
hide-selected
|
||||||
hide-selected
|
fill-input
|
||||||
fill-input
|
option-label="name"
|
||||||
option-label="name"
|
option-value="id"
|
||||||
option-value="id"
|
:options="option"
|
||||||
:options="option"
|
@update:model-value="getSerach()"
|
||||||
@update:model-value="getSerach()"
|
use-input
|
||||||
use-input
|
@filter="filterOptionFn"
|
||||||
@filter="filterOptionFn"
|
>
|
||||||
>
|
<template v-slot:no-option>
|
||||||
<template v-slot:no-option>
|
<q-item>
|
||||||
<q-item>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
</q-item>
|
||||||
</q-item>
|
</template>
|
||||||
</template>
|
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
||||||
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
<q-icon
|
||||||
<q-icon
|
name="cancel"
|
||||||
name="cancel"
|
@click.stop.prevent="
|
||||||
@click.stop.prevent="
|
(option = dataInvestigate.statusOptions),
|
||||||
(option = dataInvestigate.statusOptions),
|
(statusFilter = 'ALL'),
|
||||||
(statusFilter = 'ALL'),
|
getSerach()
|
||||||
getSerach()
|
"
|
||||||
"
|
class="cursor-pointer"
|
||||||
class="cursor-pointer"
|
/>
|
||||||
/>
|
</template>
|
||||||
</template>
|
</q-select>
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -182,7 +171,7 @@ onMounted(async () => {
|
||||||
@keydown.enter.prevent="getSerach()"
|
@keydown.enter.prevent="getSerach()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
@ -199,7 +188,6 @@ onMounted(async () => {
|
||||||
:options="dataInvestigate.columns"
|
:options="dataInvestigate.columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import type {
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ const modal = ref<boolean>(false);
|
||||||
const rows = ref<Director[]>([]);
|
const rows = ref<Director[]>([]);
|
||||||
const modalPerson = ref<boolean>(false);
|
const modalPerson = ref<boolean>(false);
|
||||||
/** search data table*/
|
/** search data table*/
|
||||||
const filter = ref<string>("");
|
|
||||||
|
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
const totalList = ref<number>(1);
|
const totalList = ref<number>(1);
|
||||||
|
|
@ -1527,9 +1526,7 @@ onMounted(async () => {
|
||||||
style="max-height: 80vh"
|
style="max-height: 80vh"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="investigateDis.columnsDirector"
|
:columns="investigateDis.columnsDirector"
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="investigateDis.visibleColumnsDirector"
|
:visible-columns="investigateDis.visibleColumnsDirector"
|
||||||
v-model:inputfilter="filter"
|
|
||||||
v-model:inputvisible="
|
v-model:inputvisible="
|
||||||
investigateDis.visibleColumnsDirector
|
investigateDis.visibleColumnsDirector
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import { useRouter } from "vue-router";
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
|
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue";
|
||||||
|
|
||||||
|
|
@ -19,10 +19,11 @@ const pagination = ref({
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataInvestigateDis = useInvestigateDisStore();
|
const dataInvestigateDis = useInvestigateDisStore();
|
||||||
const { showLoader, hideLoader } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const { fetchList } = dataInvestigateDis;
|
const { fetchList } = dataInvestigateDis;
|
||||||
|
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
|
@ -33,17 +34,21 @@ async function fetchListDisciplinary() {
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.disciplineDisciplinary() +
|
config.API.disciplineDisciplinary() +
|
||||||
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filter.value.trim()}&status=${status.value}`
|
`?page=${pagination.value.page}&pageSize=${
|
||||||
|
pagination.value.rowsPerPage
|
||||||
|
}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
res.data.result.total / pagination.value.rowsPerPage
|
res.data.result.total / pagination.value.rowsPerPage
|
||||||
);
|
);
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
fetchList(data);
|
await fetchList(data);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.catch((err) => {})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -66,7 +71,7 @@ function openDetail(id: string) {
|
||||||
|
|
||||||
function filterStatus(statusReturn: string) {
|
function filterStatus(statusReturn: string) {
|
||||||
status.value = statusReturn;
|
status.value = statusReturn;
|
||||||
getSearch()
|
getSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch() {
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,6 @@ const emit = defineEmits([
|
||||||
"update:pagination",
|
"update:pagination",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function paginationLabel(start: string, end: string, total: string) {
|
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateInput(value: string | number | null) {
|
function updateInput(value: string | number | null) {
|
||||||
emit("update:inputfilter", value);
|
emit("update:inputfilter", value);
|
||||||
}
|
}
|
||||||
|
|
@ -138,41 +133,40 @@ function updatePagination(newPagination: any) {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
<div class="col-xs-12 col-sm-4 col-md-4">
|
<q-select
|
||||||
<q-select
|
v-model="statusFilter"
|
||||||
v-model="statusFilter"
|
label="สถานะ"
|
||||||
label="สถานะ"
|
dense
|
||||||
dense
|
outlined
|
||||||
outlined
|
emit-value
|
||||||
emit-value
|
hide-selected
|
||||||
hide-selected
|
fill-input
|
||||||
fill-input
|
map-options
|
||||||
map-options
|
option-label="name"
|
||||||
option-label="name"
|
option-value="id"
|
||||||
option-value="id"
|
:options="option"
|
||||||
:options="option"
|
@update:model-value="dataUpdate"
|
||||||
@update:model-value="dataUpdate"
|
use-input
|
||||||
use-input
|
@filter="filterOptionFn"
|
||||||
@filter="filterOptionFn"
|
>
|
||||||
>
|
<template v-slot:no-option>
|
||||||
<template v-slot:no-option>
|
<q-item>
|
||||||
<q-item>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
</q-item>
|
||||||
</q-item>
|
</template>
|
||||||
</template>
|
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
||||||
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
<q-icon
|
||||||
<q-icon
|
name="cancel"
|
||||||
name="cancel"
|
@click.stop.prevent="
|
||||||
@click.stop.prevent="
|
(option = dataInvestigateDis.statusOptions),
|
||||||
(option = dataInvestigateDis.statusOptions),
|
(statusFilter = 'ALL'),
|
||||||
(statusFilter = 'ALL'),
|
dataUpdate()
|
||||||
dataUpdate()
|
"
|
||||||
"
|
class="cursor-pointer"
|
||||||
class="cursor-pointer"
|
/>
|
||||||
/>
|
</template>
|
||||||
</template>
|
</q-select>
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -184,7 +178,6 @@ function updatePagination(newPagination: any) {
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
|
|
@ -204,7 +197,6 @@ function updatePagination(newPagination: any) {
|
||||||
option-value="name"
|
option-value="name"
|
||||||
map-options
|
map-options
|
||||||
emit-value
|
emit-value
|
||||||
class="col-xs-12 col-sm-3 col-md-2 gt-xs"
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
dialogMessageNotify,
|
onSearchDataTable,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const commandType = ref<string>(""); //ตัวแปรเก็บคำสั่งที่เลือก
|
const commandType = ref<string>(""); //ตัวแปรเก็บคำสั่งที่เลือก
|
||||||
|
|
@ -34,10 +34,10 @@ const commandOp = ref<ListCommand[]>([]);
|
||||||
const listCommand = ref<ListCommand[]>([]); // เก็บคำสั่งทั้งหมด
|
const listCommand = ref<ListCommand[]>([]); // เก็บคำสั่งทั้งหมด
|
||||||
|
|
||||||
const modalCommand = ref<boolean>(false);
|
const modalCommand = ref<boolean>(false);
|
||||||
const optionsType = ref<[]>([]);
|
|
||||||
const idPath = ref<string>(route.params.id as string);
|
const idPath = ref<string>(route.params.id as string);
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
const rows = ref<DataPerson[]>([]);
|
const rows = ref<DataPerson[]>([]);
|
||||||
|
const rowsMain = ref<DataPerson[]>([]);
|
||||||
const selected = ref<ResponseData[]>([]);
|
const selected = ref<ResponseData[]>([]);
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -72,12 +72,6 @@ const props = defineProps({
|
||||||
title: String,
|
title: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkSelected = computed(() => {
|
|
||||||
if (selected.value.length === 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//popup ยืนยันส่งัว
|
//popup ยืนยันส่งัว
|
||||||
function saveOrder() {
|
function saveOrder() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
|
|
@ -136,13 +130,20 @@ function Reset() {
|
||||||
*/
|
*/
|
||||||
function filterSelector(val: string, update: Function) {
|
function filterSelector(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
commandType.value = val ? "" : commandType.value;
|
|
||||||
commandOp.value = listCommand.value.filter(
|
commandOp.value = listCommand.value.filter(
|
||||||
(v: any) => v.name.indexOf(val) > -1
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function serchDataTable() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
props?.filterKeyword2 ? props?.filterKeyword2 : "",
|
||||||
|
rowsMain.value,
|
||||||
|
props.columns ? props.columns : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||||
|
|
@ -157,6 +158,8 @@ watch(
|
||||||
? props.data.persons.filter((item: any) => item.status == "NEW")
|
? props.data.persons.filter((item: any) => item.status == "NEW")
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
rowsMain.value = rows.value;
|
||||||
|
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
listCommand.value = data.filter(
|
listCommand.value = data.filter(
|
||||||
(v: any) =>
|
(v: any) =>
|
||||||
|
|
@ -178,78 +181,65 @@ watch(
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
<DialogHeader :tittle="props.title" :close="closeModal" />
|
<DialogHeader :tittle="props.title" :close="closeModal" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section>
|
||||||
<div class="row justify-between">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
<div class="col-5">
|
<q-select
|
||||||
<q-toolbar style="padding: 0">
|
v-model="commandType"
|
||||||
<q-select
|
dense
|
||||||
v-model="commandType"
|
outlined
|
||||||
dense
|
label="ประเภทคำสั่ง"
|
||||||
outlined
|
:options="commandOp"
|
||||||
label="ประเภทคำสั่ง"
|
option-label="name"
|
||||||
:options="commandOp"
|
option-value="code"
|
||||||
option-label="name"
|
emit-value
|
||||||
option-value="code"
|
map-options
|
||||||
emit-value
|
hide-selected
|
||||||
map-options
|
fill-input
|
||||||
hide-selected
|
use-input
|
||||||
fill-input
|
style="width: 350px; max-width: auto"
|
||||||
use-input
|
@update:model-value="selected = []"
|
||||||
style="width: 350px; max-width: auto"
|
@filter="(inputValue:any,
|
||||||
@update:model-value="selected = []"
|
doneFn:Function) => filterSelector(inputValue, doneFn
|
||||||
@filter="(inputValue:any,
|
) "
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn
|
>
|
||||||
) "
|
<template v-slot:no-option>
|
||||||
>
|
<q-item>
|
||||||
<template v-slot:no-option>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
<q-item>
|
</q-item>
|
||||||
<q-item-section class="text-grey">
|
</template></q-select
|
||||||
ไม่มีข้อมูล
|
>
|
||||||
</q-item-section>
|
<q-space />
|
||||||
</q-item>
|
<q-input
|
||||||
</template></q-select
|
borderless
|
||||||
>
|
outlined
|
||||||
</q-toolbar>
|
dense
|
||||||
</div>
|
:model-value="filterKeyword2"
|
||||||
|
@update:model-value="updateInput"
|
||||||
<div class="col-5">
|
placeholder="ค้นหา"
|
||||||
<q-toolbar style="padding: 0">
|
@keydown.enter.pervent="serchDataTable"
|
||||||
<q-input
|
>
|
||||||
borderless
|
<template v-slot:append>
|
||||||
outlined
|
<q-icon name="search" />
|
||||||
dense
|
</template>
|
||||||
debounce="300"
|
</q-input>
|
||||||
:model-value="filterKeyword2"
|
<q-select
|
||||||
@update:model-value="updateInput"
|
v-model="props.visibleColumns"
|
||||||
placeholder="ค้นหา"
|
multiple
|
||||||
style="width: 850px; max-width: auto"
|
outlined
|
||||||
>
|
dense
|
||||||
<template v-slot:append>
|
options-dense
|
||||||
<q-icon name="search" />
|
:display-value="$q.lang.table.columns"
|
||||||
</template>
|
emit-value
|
||||||
</q-input>
|
map-options
|
||||||
<q-select
|
:options="props.columns"
|
||||||
v-model="props.visibleColumns"
|
option-value="name"
|
||||||
multiple
|
style="min-width: 140px"
|
||||||
outlined
|
/>
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="props.columns"
|
|
||||||
option-value="name"
|
|
||||||
style="min-width: 140px"
|
|
||||||
class="gt-xs q-ml-sm"
|
|
||||||
/>
|
|
||||||
</q-toolbar>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<d-table
|
<d-table
|
||||||
:columns="props.columns"
|
:columns="props.columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword2?.trim()"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="props.visibleColumns"
|
:visible-columns="props.visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
|
|
@ -288,8 +278,9 @@ watch(
|
||||||
<div v-else-if="col.name === 'salary'">
|
<div v-else-if="col.name === 'salary'">
|
||||||
{{ props.row.salary.toLocaleString() }}
|
{{ props.row.salary.toLocaleString() }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||||
|
|
||||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/Result";
|
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
FormData,
|
FormData,
|
||||||
FormRef,
|
FormRef,
|
||||||
DataOption,
|
DataOption,
|
||||||
} from "@/modules/11_discipline/interface/request/Result";
|
} from "@/modules/11_discipline/interface/request/result";
|
||||||
|
|
||||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
|
|
@ -175,8 +175,8 @@ function uploadFile() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.upLoadFileResult(id.value), Data)
|
.put(config.API.upLoadFileResult(id.value), Data)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
props.fetchData();
|
await props.fetchData();
|
||||||
countNum.value = 2;
|
countNum.value = 2;
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
})
|
})
|
||||||
|
|
@ -202,14 +202,15 @@ function confirmDelete(docid: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.delete(config.API.deleteFileResult(id.value, docid))
|
.delete(config.API.deleteFileResult(id.value, docid))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
|
await props.fetchData();
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.fetchData();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,41 +113,39 @@ function updatePagination(newPagination: any) {
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
||||||
<div class="col-xs-12 col-sm-4 col-md-4">
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="statusFilter"
|
v-model="statusFilter"
|
||||||
label="สถานะ"
|
label="สถานะ"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
hide-selected
|
hide-selected
|
||||||
fill-input
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:options="option"
|
:options="option"
|
||||||
@update:model-value="dataUpdate"
|
@update:model-value="dataUpdate"
|
||||||
use-input
|
use-input
|
||||||
@filter="filterOptionFn"
|
@filter="filterOptionFn"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
<template v-if="statusFilter !== 'ALL'" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="cancel"
|
name="cancel"
|
||||||
@click.stop.prevent="
|
@click.stop.prevent="
|
||||||
(option = store.statusOptions),
|
(option = store.statusOptions), (statusFilter = 'ALL'), dataUpdate()
|
||||||
(statusFilter = 'ALL'),
|
"
|
||||||
dataUpdate()
|
class="cursor-pointer"
|
||||||
"
|
/>
|
||||||
class="cursor-pointer"
|
</template>
|
||||||
/>
|
</q-select>
|
||||||
</template>
|
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
|
|
@ -159,7 +157,6 @@ function updatePagination(newPagination: any) {
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -177,7 +174,6 @@ function updatePagination(newPagination: any) {
|
||||||
option-value="name"
|
option-value="name"
|
||||||
map-options
|
map-options
|
||||||
emit-value
|
emit-value
|
||||||
class="col-xs-12 col-sm-3 col-md-2 gt-xs"
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
import { ref, computed, watch } from "vue";
|
import { ref, computed, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||||
|
|
||||||
|
|
@ -18,12 +16,13 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const storeCommand = useCommandMainStore();
|
const storeCommand = useCommandMainStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm, onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const modalCommand = ref<boolean>(false); // ตัวแปร popup สร้างคำสั่ง
|
const modalCommand = ref<boolean>(false); // ตัวแปร popup สร้างคำสั่ง
|
||||||
|
|
||||||
const rows = ref<dataType[]>([]);
|
const rows = ref<dataType[]>([]);
|
||||||
|
const rowsMain = ref<dataType[]>([]);
|
||||||
const selected = ref<dataType[]>([]);
|
const selected = ref<dataType[]>([]);
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -128,7 +127,6 @@ function closeModal() {
|
||||||
*/
|
*/
|
||||||
function filterSelector(val: string, update: Function) {
|
function filterSelector(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
commandType.value = val ? "" : commandType.value;
|
|
||||||
commandOp.value = listCommand.value.filter(
|
commandOp.value = listCommand.value.filter(
|
||||||
(v: any) => v.name.indexOf(val) > -1
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
);
|
);
|
||||||
|
|
@ -148,6 +146,14 @@ function saveOrder() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function serchDataTable() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filterKeyword.value,
|
||||||
|
rowsMain.value,
|
||||||
|
columns.value ? columns.value : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อ props.modal เป็น true
|
* เมื่อ props.modal เป็น true
|
||||||
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||||
|
|
@ -157,6 +163,7 @@ watch(
|
||||||
async () => {
|
async () => {
|
||||||
if (modal.value === true) {
|
if (modal.value === true) {
|
||||||
rows.value = props.rows ? props.rows : [];
|
rows.value = props.rows ? props.rows : [];
|
||||||
|
rowsMain.value = props.rows ? props.rows : [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
const data = await storeCommand.getCommandTypes();
|
const data = await storeCommand.getCommandTypes();
|
||||||
listCommand.value = data.filter(
|
listCommand.value = data.filter(
|
||||||
|
|
@ -189,7 +196,7 @@ watch(
|
||||||
use-input
|
use-input
|
||||||
style="width: 350px; max-width: auto"
|
style="width: 350px; max-width: auto"
|
||||||
@update:model-value="selected = []"
|
@update:model-value="selected = []"
|
||||||
@filter="(inputValue:any,
|
@filter="(inputValue:string,
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn
|
doneFn:Function) => filterSelector(inputValue, doneFn
|
||||||
) "
|
) "
|
||||||
>
|
>
|
||||||
|
|
@ -205,10 +212,10 @@ watch(
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="width: 200px; max-width: auto"
|
style="width: 200px; max-width: auto"
|
||||||
|
@keydown.enter.pervent="serchDataTable"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -234,7 +241,6 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:filter="filterKeyword.trim()"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
|
|
|
||||||
|
|
@ -175,13 +175,13 @@ async function getList() {
|
||||||
);
|
);
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
await dataStore.getData(data);
|
await dataStore.getData(data);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
|
|
@ -221,23 +221,24 @@ onMounted(async () => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row col-12">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<q-btn
|
<div>
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
<q-btn
|
||||||
@click="openModalOrder"
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
flat
|
@click="openModalOrder"
|
||||||
round
|
flat
|
||||||
dense
|
round
|
||||||
color="primary"
|
dense
|
||||||
icon="mdi-account-arrow-right"
|
color="primary"
|
||||||
>
|
icon="mdi-account-arrow-right"
|
||||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
>
|
||||||
</q-btn>
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
for="#search"
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
|
|
@ -263,7 +264,6 @@ onMounted(async () => {
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,78 +171,104 @@ watch(
|
||||||
<DialogHeader tittle="เลือกรายชื่อกรรมการ" :close="clickClose" />
|
<DialogHeader tittle="เลือกรายชื่อกรรมการ" :close="clickClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<q-input
|
<div class="row q-col-gutter-sm">
|
||||||
borderless
|
<div class="row col-12">
|
||||||
outlined
|
<q-space />
|
||||||
dense
|
<div class="row q-col-gutter-sm">
|
||||||
v-model="filterKeyword2"
|
<q-input
|
||||||
@keydown.enter.prevent="updateInput"
|
borderless
|
||||||
placeholder="ค้นหารายชื่อ"
|
outlined
|
||||||
style="max-width: 100%"
|
dense
|
||||||
>
|
v-model="filterKeyword2"
|
||||||
<template v-slot:append>
|
@keydown.enter.prevent="updateInput"
|
||||||
<q-icon name="search" />
|
placeholder="ค้นหารายชื่อ"
|
||||||
</template>
|
style="max-width: 100%"
|
||||||
</q-input>
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
<d-table
|
<q-select
|
||||||
:columns="columns2"
|
v-model="visibleColumns2"
|
||||||
:rows="rows2"
|
multiple
|
||||||
row-key="id"
|
outlined
|
||||||
:visible-columns="visibleColumns2"
|
dense
|
||||||
selection="multiple"
|
options-dense
|
||||||
v-model:selected="selected"
|
:display-value="$q.lang.table.columns"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
emit-value
|
||||||
@update:pagination="updatePagination"
|
map-options
|
||||||
>
|
:options="columns2"
|
||||||
<template v-slot:pagination="scope">
|
option-value="name"
|
||||||
ทั้งหมด {{ total }} รายการ
|
style="min-width: 140px"
|
||||||
<q-pagination
|
/>
|
||||||
v-model="pagination.page"
|
</div>
|
||||||
active-color="primary"
|
</div>
|
||||||
color="dark"
|
<div class="col-12">
|
||||||
:max="Number(totalList)"
|
<d-table
|
||||||
size="sm"
|
:columns="columns2"
|
||||||
boundary-links
|
:rows="rows2"
|
||||||
direction-links
|
row-key="id"
|
||||||
:max-pages="5"
|
:visible-columns="visibleColumns2"
|
||||||
@update:model-value="props.getList?.()"
|
selection="multiple"
|
||||||
></q-pagination>
|
v-model:selected="selected"
|
||||||
</template>
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
@update:pagination="updatePagination"
|
||||||
|
>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="Number(totalList)"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
:max-pages="5"
|
||||||
|
@update:model-value="props.getList?.()"
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:header-selection="scope">
|
<template v-slot:header-selection="scope">
|
||||||
<q-checkbox
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="scope.selected"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td>
|
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
v-model="props.selected"
|
v-model="scope.selected"
|
||||||
/>
|
/>
|
||||||
</q-td>
|
</template>
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<template v-slot:body="props">
|
||||||
<div v-if="col.name == 'no'">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
{{
|
<q-td>
|
||||||
(pagination.page - 1) * pagination.rowsPerPage +
|
<q-checkbox
|
||||||
props.rowIndex +
|
keep-color
|
||||||
1
|
color="primary"
|
||||||
}}
|
dense
|
||||||
</div>
|
v-model="props.selected"
|
||||||
<div v-else>
|
/>
|
||||||
{{ col.value }}
|
</q-td>
|
||||||
</div>
|
<q-td
|
||||||
</q-td>
|
v-for="col in props.cols"
|
||||||
</q-tr>
|
:key="col.name"
|
||||||
</template>
|
:props="props"
|
||||||
</d-table>
|
>
|
||||||
|
<div v-if="col.name == 'no'">
|
||||||
|
{{
|
||||||
|
(pagination.page - 1) * pagination.rowsPerPage +
|
||||||
|
props.rowIndex +
|
||||||
|
1
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ col.value }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,11 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||||
import { title } from "process";
|
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { dialogConfirm, dialogMessageNotify } = mixin;
|
const { dialogConfirm, dialogMessageNotify, onSearchDataTable } = mixin;
|
||||||
|
|
||||||
const dataMapToSend = computed(() => {
|
const dataMapToSend = computed(() => {
|
||||||
return selected.value.map((i: any) => ({
|
return selected.value.map((i: any) => ({
|
||||||
|
|
@ -24,6 +23,7 @@ const dataMapToSend = computed(() => {
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const rowsMain = ref<any[]>([]);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -114,11 +114,21 @@ function onClickClose() {
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function serchDataTable() {
|
||||||
|
rows.value = onSearchDataTable(
|
||||||
|
filter.value,
|
||||||
|
rowsMain.value,
|
||||||
|
props.columns ? props.columns : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
() => {
|
() => {
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
inspectionResults.value = modal ? "" : "";
|
inspectionResults.value = modal ? "" : "";
|
||||||
|
rows.value = props.rows;
|
||||||
|
rowsMain.value = props.rows;
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +136,7 @@ watch(
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="width: 820px; max-width: 80vw">
|
<q-card style="min-width: 70%">
|
||||||
<DialogHeader :tittle="props.title" :close="onClickClose" />
|
<DialogHeader :tittle="props.title" :close="onClickClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none q-mt-md">
|
<q-card-section class="q-pt-none q-mt-md">
|
||||||
|
|
@ -140,10 +150,10 @@ watch(
|
||||||
dense
|
dense
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
@keydown.enter.pervent="serchDataTable"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -170,8 +180,7 @@ watch(
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="props.columns"
|
:columns="props.columns"
|
||||||
:rows="props.rows"
|
:rows="rows"
|
||||||
:filter="filter.trim()"
|
|
||||||
row-key="personId"
|
row-key="personId"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -205,9 +214,7 @@ watch(
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name === 'salary'">
|
|
||||||
{{ props.row.salary.toLocaleString() }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import type {
|
||||||
DataList,
|
DataList,
|
||||||
DataListRow,
|
DataListRow,
|
||||||
ocListType,
|
ocListType,
|
||||||
} from "@/modules/11_discipline/interface/response/Complaint";
|
} from "@/modules/11_discipline/interface/response/complaint";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ export const useComplainstDataStore = defineStore(
|
||||||
const visibleColumns = ref<string[]>([]);
|
const visibleColumns = ref<string[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([]);
|
const columns = ref<QTableProps["columns"]>([]);
|
||||||
|
|
||||||
function fetchComplainst(data: DataList[]) {
|
async function fetchComplainst(data: DataList[]) {
|
||||||
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
personId: e.personId,
|
personId: e.personId,
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,9 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
field: "salary",
|
field: "salary",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return val.toLocaleString();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "organization",
|
name: "organization",
|
||||||
|
|
@ -185,6 +188,13 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
field: "positionLevel",
|
field: "positionLevel",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return row.positionLevel
|
||||||
|
? row.positionLevel
|
||||||
|
: row.posLevelName
|
||||||
|
? row.posLevelName
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "salary",
|
name: "salary",
|
||||||
|
|
@ -192,6 +202,9 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
label: "เงินเดือน",
|
label: "เงินเดือน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "salary",
|
field: "salary",
|
||||||
|
format(val, row) {
|
||||||
|
return val.toLocaleString();
|
||||||
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ onMounted(async () => {
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!$q.screen.gt.xs"
|
:grid="!$q.screen.gt.xs"
|
||||||
:filter="filter"
|
:filter="filter.trim()"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
:virtual-scroll-sticky-size-start="48"
|
:virtual-scroll-sticky-size-start="48"
|
||||||
|
|
|
||||||
|
|
@ -587,7 +587,7 @@ onMounted(() => {
|
||||||
node-key="orgTreeName"
|
node-key="orgTreeName"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
v-model:expanded="expandedDialog"
|
v-model:expanded="expandedDialog"
|
||||||
:filter="filter"
|
:filter="filter.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ watch(
|
||||||
:nodes="nodeTree"
|
:nodes="nodeTree"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ function clearForm() {
|
||||||
:nodes="nodeTree"
|
:nodes="nodeTree"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue