แก้ลูกจ้าง
This commit is contained in:
parent
aa65b8165d
commit
7d75535d15
25 changed files with 942 additions and 892 deletions
|
|
@ -119,7 +119,9 @@ export default {
|
||||||
developmentUserByType: (type: string) => `${org}/profile${type}/development/user`,
|
developmentUserByType: (type: string) => `${org}/profile${type}/development/user`,
|
||||||
|
|
||||||
upDateNumber: `${profileOrg}/updatePhoneNumber/user`,
|
upDateNumber: `${profileOrg}/updatePhoneNumber/user`,
|
||||||
|
upDateNumberByType: (type: string) => `${org}/profile${type}/updatePhoneNumber/user`,
|
||||||
updateEmail: `${profileOrg}/updateEmail/user`,
|
updateEmail: `${profileOrg}/updateEmail/user`,
|
||||||
|
updateEmailByType: (type: string) => `${org}/profile${type}/updateEmail/user`,
|
||||||
/**
|
/**
|
||||||
* workflow
|
* workflow
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useRegistryInFormationStore();
|
const store = useRegistryInFormationStore();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
|
|
@ -243,7 +244,7 @@ function onHistory() {
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.dataUserInformationByType(dataStore.officerLink))
|
.get(config.API.dataUserInformationByType(link.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
formDataInformation.citizenId = data.citizenId;
|
formDataInformation.citizenId = data.citizenId;
|
||||||
|
|
@ -318,7 +319,7 @@ function onSubmitEdit(type: string) {
|
||||||
/** บันทึกเบอร์โทร */
|
/** บันทึกเบอร์โทร */
|
||||||
async function onSavePhone() {
|
async function onSavePhone() {
|
||||||
await http
|
await http
|
||||||
.put(config.API.upDateNumber, {
|
.put(config.API.upDateNumberByType(link.value), {
|
||||||
phone: formDataInformation.phone,
|
phone: formDataInformation.phone,
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -335,7 +336,7 @@ async function onSavePhone() {
|
||||||
/** บันทึก email */
|
/** บันทึก email */
|
||||||
async function onSaveEmail() {
|
async function onSaveEmail() {
|
||||||
await http
|
await http
|
||||||
.put(config.API.updateEmail, {
|
.put(config.API.updateEmailByType(link.value), {
|
||||||
email: formDataInformation.email + `@bangkok.go.th`,
|
email: formDataInformation.email + `@bangkok.go.th`,
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -350,6 +351,7 @@ async function onSaveEmail() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import config from "@/app.config";
|
||||||
import type { ChangNameRows } from "@/modules/10_registry/interface/response/01_Information";
|
import type { ChangNameRows } from "@/modules/10_registry/interface/response/01_Information";
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
|
|
@ -161,10 +162,10 @@ function onHistory(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserChangeNameByType(dataStore.officerLink))
|
.get(config.API.dataUserChangeNameByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -183,7 +184,10 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserChangeNameHistoryByType(dataStore.officerLink) + `/${idByrow.value}`)
|
.get(
|
||||||
|
config.API.dataUserChangeNameHistoryByType(link.value) +
|
||||||
|
`/${idByrow.value}`
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -196,8 +200,9 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getData();
|
link.value = await dataStore.getProFileType();
|
||||||
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -240,7 +245,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -249,88 +253,87 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ดูประวัติการเปลี่ยนชื่อ-นามสกุล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดูประวัติการเปลี่ยนชื่อ-นามสกุล</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section>
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
|
}}</q-item-label>
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
</q-item-section>
|
||||||
<q-card bordered flat>
|
<q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
<q-btn
|
col.value ? col.value : "-"
|
||||||
icon="mdi-history"
|
}}</q-item-label>
|
||||||
color="info"
|
</q-item-section>
|
||||||
flat
|
</q-item>
|
||||||
dense
|
</q-list>
|
||||||
round
|
</q-card>
|
||||||
size="14px"
|
</div>
|
||||||
class="absolute_button"
|
</template>
|
||||||
@click="onHistory(props.row.id)"
|
</d-table>
|
||||||
>
|
</div>
|
||||||
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
:title="'ประวัติแก้ไขการเปลี่ยนชื่อ-นามสกุล'"
|
:title="'ประวัติแก้ไขการเปลี่ยนชื่อ-นามสกุล'"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import type {
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const store = useRegistryInFormationStore();
|
const store = useRegistryInFormationStore();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
const rowsHistory = ref<any[]>([]);
|
const rowsHistory = ref<any[]>([]);
|
||||||
|
|
@ -226,10 +227,10 @@ function onHistory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserAddressByType(dataStore.officerLink))
|
.get(config.API.dataUserAddressByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data: Address = res.data.result;
|
const data: Address = res.data.result;
|
||||||
fetchDistrict(data.registrationProvinceId, "1");
|
fetchDistrict(data.registrationProvinceId, "1");
|
||||||
|
|
@ -262,7 +263,7 @@ function getData() {
|
||||||
/** get history */
|
/** get history */
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
const url =
|
const url =
|
||||||
dataStore.officerType == "OFFICER"
|
dataStore.officerType == "OFFICER"
|
||||||
? config.API.dataUserHistory("")
|
? config.API.dataUserHistory("")
|
||||||
: config.API.dataUserHistory("-employee");
|
: config.API.dataUserHistory("-employee");
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -371,6 +372,7 @@ function convertSubDistrictName(id: string, type: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
await fetchProvince();
|
await fetchProvince();
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import type { FormChildren } from "@/modules/10_registry/interface/index/Family"
|
||||||
|
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
@ -146,10 +147,10 @@ function onHistory(type: string, id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
function getData(type: string) {
|
async function getData(type: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserFamilyByType(dataStore.officerLink,type))
|
.get(config.API.dataUserFamilyByType(link.value, type))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
@ -201,7 +202,7 @@ function getData(type: string) {
|
||||||
/** get history */
|
/** get history */
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
const url =
|
const url =
|
||||||
dataStore.officerType == "OFFICER"
|
dataStore.officerType == "OFFICER"
|
||||||
? config.API.dataUserFamilyHistory(typeForm.value, "", idFamily.value)
|
? config.API.dataUserFamilyHistory(typeForm.value, "", idFamily.value)
|
||||||
: config.API.dataUserFamilyHistory(
|
: config.API.dataUserFamilyHistory(
|
||||||
typeForm.value,
|
typeForm.value,
|
||||||
|
|
@ -233,7 +234,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
getData("father");
|
getData("father");
|
||||||
getData("mother");
|
getData("mother");
|
||||||
getData("couple");
|
getData("couple");
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import type { EducationProfile } from "@/modules/10_registry/interface/index/Mai
|
||||||
|
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
|
|
@ -440,10 +441,10 @@ function onHistory(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserEducationsByType(dataStore.officerLink))
|
.get(config.API.dataUserEducationsByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -462,7 +463,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserEducationsHistoryByType(dataStore.officerLink,idByRow.value))
|
.get(config.API.dataUserEducationsHistoryByType(link.value, idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -475,8 +476,10 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getData();
|
link.value = await dataStore.getProFileType();
|
||||||
|
|
||||||
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -519,7 +522,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -528,91 +530,89 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type { AbilityRows } from "@/modules/10_registry/interface/index/Main";
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const rows = ref<AbilityRows[]>([]);
|
const rows = ref<AbilityRows[]>([]);
|
||||||
const rowsHistory = ref<AbilityRows[]>([]);
|
const rowsHistory = ref<AbilityRows[]>([]);
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
|
|
@ -162,10 +163,10 @@ function onHistory(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserAbilityByType(dataStore.officerLink))
|
.get(config.API.dataUserAbilityByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -184,7 +185,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserAbilityHistoryByType(dataStore.officerLink,idByRow.value))
|
.get(config.API.dataUserAbilityHistoryByType(link.value, idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -197,8 +198,9 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getData();
|
link.value = await dataStore.getProFileType();
|
||||||
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -241,7 +243,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -250,92 +251,90 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
col.label
|
||||||
<template v-else v-slot:item="props">
|
}}</q-item-label>
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
</q-item-section>
|
||||||
<q-card bordered flat>
|
<q-item-section class="fix_top">
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
<q-btn
|
col.value ? col.value : "-"
|
||||||
icon="mdi-history"
|
}}</q-item-label>
|
||||||
color="info"
|
</q-item-section>
|
||||||
flat
|
</q-item>
|
||||||
dense
|
</q-list>
|
||||||
round
|
</q-card>
|
||||||
size="14px"
|
</div>
|
||||||
class="absolute_button"
|
</template>
|
||||||
@click="onHistory(props.row.id)"
|
</d-table>
|
||||||
>
|
|
||||||
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import type {
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataPerson = useDataStore()
|
const dataPerson = useDataStore()
|
||||||
|
|
@ -285,7 +286,7 @@ function onHistory() {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserGovernmentByType(dataPerson.officerLink))
|
.get(config.API.dataUserGovernmentByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
formData.org = data.org;
|
formData.org = data.org;
|
||||||
|
|
@ -336,7 +337,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type { DisciplineDetail } from "@/modules/10_registry/interface/index/Mai
|
||||||
|
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
|
|
@ -140,7 +141,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserDisciplineByType(dataStore.officerLink))
|
.get(config.API.dataUserDisciplineByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -157,7 +158,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserDisciplineHistoryByType(dataStore.officerLink,idByRow.value))
|
.get(config.API.dataUserDisciplineHistoryByType(link.value,idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -170,7 +171,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { useDataStore } from "@/stores/data";
|
||||||
import type { LeaveFormType } from "@/modules/10_registry/interface/index/Main";
|
import type { LeaveFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
|
|
@ -216,7 +217,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserLeaveByType(dataStore.officerLink))
|
.get(config.API.dataUserLeaveByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data.map((item: any) => ({
|
rows.value = data.map((item: any) => ({
|
||||||
|
|
@ -243,7 +244,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserLeaveHistoryByType(dataStore.officerLink,idByRow.value))
|
.get(config.API.dataUserLeaveHistoryByType(link.value,idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data.map((item: any) => ({
|
rowsHistory.value = data.map((item: any) => ({
|
||||||
|
|
@ -292,7 +293,8 @@ function dateThaiRange(val: [Date, Date]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import type { DutyFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<DutyFormType[]>([]);
|
const rows = ref<DutyFormType[]>([]);
|
||||||
|
|
@ -218,7 +219,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserDutyByType(dataStore.officerLink))
|
.get(config.API.dataUserDutyByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -235,7 +236,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserDutyHistoryByType(dataStore.officerLink,idByRow.value))
|
.get(config.API.dataUserDutyHistoryByType(link.value,idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -248,7 +249,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import type { SalaryFormType } from "@/modules/10_registry/interface/index/Main"
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataPerson = useDataStore();
|
const dataPerson = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -358,7 +359,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserSalaryByType(dataPerson.officerLink))
|
.get(config.API.dataUserSalaryByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -375,7 +376,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserSalaryHistoryByType(dataPerson.officerLink,idByRow.value))
|
.get(config.API.dataUserSalaryHistoryByType(link.value, idByRow.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -388,7 +389,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,14 @@ import { ref, onMounted } from "vue";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data"
|
import { useDataStore } from "@/stores/data";
|
||||||
|
|
||||||
import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main";
|
import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
|
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<NopaidFormType[]>([]);
|
const rows = ref<NopaidFormType[]>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -195,7 +196,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserNopaidByType(dataPerson.officerLink))
|
.get(config.API.dataUserNopaidByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -212,7 +213,9 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserSalaryNopaidHistoryByType(dataPerson.officerLink,idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserSalaryNopaidHistoryByType(link.value, idByRow.value)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -225,7 +228,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -269,7 +273,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -278,94 +281,91 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
>ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip
|
>ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip
|
|
||||||
>ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip
|
|
||||||
>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,14 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
|
||||||
|
|
||||||
import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main";
|
import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main";
|
||||||
|
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataPerson = useDataStore()
|
const dataPerson = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
||||||
|
|
||||||
|
|
@ -196,7 +196,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateByType(dataPerson.officerLink,"certificate"))
|
.get(config.API.dataUserCertificateByType(link.value, "certificate"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -213,7 +213,13 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateHistoryByType(dataPerson.officerLink,"certificate", idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserCertificateHistoryByType(
|
||||||
|
link.value,
|
||||||
|
"certificate",
|
||||||
|
idByRow.value
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -226,7 +232,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -270,7 +277,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -279,89 +285,89 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ import type { TrainingFormType } from "@/modules/10_registry/interface/index/Mai
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<TrainingFormType[]>([]);
|
const rows = ref<TrainingFormType[]>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -322,7 +323,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateByType(dataPerson.officerLink,"training"))
|
.get(config.API.dataUserCertificateByType(link.value, "training"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -339,7 +340,13 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateHistoryByType(dataPerson.officerLink,"training", idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserCertificateHistoryByType(
|
||||||
|
link.value,
|
||||||
|
"training",
|
||||||
|
idByRow.value
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -352,7 +359,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -396,7 +404,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -405,81 +412,81 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขการฝึกอบรม/ดูงาน</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขการฝึกอบรม/ดูงาน</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขการฝึกอบรม/ดูงาน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip>ประวัติแก้ไขการฝึกอบรม/ดูงาน</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
|
||||||
|
|
||||||
import type { InsigniaFormType } from "@/modules/10_registry/interface/index/Main";
|
import type { InsigniaFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
|
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<InsigniaFormType[]>([]);
|
const rows = ref<InsigniaFormType[]>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -400,7 +400,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateByType(dataPerson.officerLink,"insignia"))
|
.get(config.API.dataUserCertificateByType(link.value, "insignia"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -417,7 +417,13 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateHistoryByType(dataPerson.officerLink,"insignia", idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserCertificateHistoryByType(
|
||||||
|
link.value,
|
||||||
|
"insignia",
|
||||||
|
idByRow.value
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -431,7 +437,8 @@ function getHistory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
link.value = await dataPerson.getProFileType();
|
||||||
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -474,7 +481,6 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -483,104 +489,102 @@ onMounted(async () => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<div v-if="col.name == 'insignia'">
|
<div v-if="col.name == 'insignia'">
|
||||||
{{ props.row.insignia ? `${props.row.insignia.name} ` : "-"
|
{{ props.row.insignia ? `${props.row.insignia.name} ` : "-"
|
||||||
}}{{
|
}}{{
|
||||||
props.row.insignia.shortName
|
props.row.insignia.shortName
|
||||||
? `(${props.row.insignia.shortName})`
|
? `(${props.row.insignia.shortName})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section v-if="col.name == 'insignia'" class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium"
|
||||||
icon="mdi-history"
|
>{{
|
||||||
color="info"
|
props.row.insignia ? `${props.row.insignia.name} ` : "-"
|
||||||
flat
|
}}{{
|
||||||
dense
|
props.row.insignia.shortName
|
||||||
round
|
? `(${props.row.insignia.shortName})`
|
||||||
size="14px"
|
: ""
|
||||||
class="absolute_button"
|
}}</q-item-label
|
||||||
@click="onHistory(props.row.id)"
|
>
|
||||||
>
|
</q-item-section>
|
||||||
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
<q-item-section v-else class="fix_top">
|
||||||
</q-btn>
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
col.value ? col.value : "-"
|
||||||
<q-item-section class="fix_top">
|
}}</q-item-label>
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
</q-item-section>
|
||||||
col.label
|
</q-item>
|
||||||
}}</q-item-label>
|
</q-list>
|
||||||
</q-item-section>
|
</q-card>
|
||||||
<q-item-section v-if="col.name == 'insignia'" class="fix_top">
|
</div>
|
||||||
<q-item-label class="text-dark text-weight-medium"
|
</template>
|
||||||
>{{
|
</d-table>
|
||||||
props.row.insignia
|
|
||||||
? `${props.row.insignia.name} `
|
|
||||||
: "-"
|
|
||||||
}}{{
|
|
||||||
props.row.insignia.shortName
|
|
||||||
? `(${props.row.insignia.shortName})`
|
|
||||||
: ""
|
|
||||||
}}</q-item-label
|
|
||||||
>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section v-else class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ import type { HonorFormData } from "@/modules/10_registry/interface/index/Main";
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const store = useRegistryInFormationStore();
|
const store = useRegistryInFormationStore();
|
||||||
const rows = ref<HonorFormData[]>([]);
|
const rows = ref<HonorFormData[]>([]);
|
||||||
|
|
@ -196,7 +197,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateByType(dataPerson.officerLink,"honor"))
|
.get(config.API.dataUserCertificateByType(link.value, "honor"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -230,7 +231,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -274,7 +276,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -283,90 +284,89 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขประกาศเกียรติคุณ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขประกาศเกียรติคุณ</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขประกาศเกียรติคุณ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip>ประวัติแก้ไขประกาศเกียรติคุณ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ import type { AssessmentsFormType } from "@/modules/10_registry/interface/index/
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<AssessmentsFormType[]>([]);
|
const rows = ref<AssessmentsFormType[]>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -257,7 +258,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateByType(dataPerson.officerLink,"assessments"))
|
.get(config.API.dataUserCertificateByType(link.value, "assessments"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -274,7 +275,13 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateHistoryByType(dataPerson.officerLink,"assessments", idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserCertificateHistoryByType(
|
||||||
|
link.value,
|
||||||
|
"assessments",
|
||||||
|
idByRow.value
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -307,7 +314,8 @@ function textPoint(val: number | undefined) {
|
||||||
else return "-";
|
else return "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -351,7 +359,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -360,91 +367,89 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
<q-td v-for="(col, index) in props.cols" :key="col.name">
|
||||||
<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 == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
color="info"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="onHistory(props.row.id)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-else v-slot:item="props">
|
||||||
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
|
<q-card bordered flat>
|
||||||
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
size="14px"
|
size="14px"
|
||||||
icon="mdi-history"
|
class="absolute_button"
|
||||||
@click="onHistory(props.row.id)"
|
@click="onHistory(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-item-section class="fix_top">
|
||||||
<q-btn
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
icon="mdi-history"
|
col.value ? col.value : "-"
|
||||||
color="info"
|
}}</q-item-label>
|
||||||
flat
|
</q-item-section>
|
||||||
dense
|
</q-item>
|
||||||
round
|
</q-list>
|
||||||
size="14px"
|
</q-card>
|
||||||
class="absolute_button"
|
</div>
|
||||||
@click="onHistory(props.row.id)"
|
</template>
|
||||||
>
|
</d-table>
|
||||||
<q-tooltip
|
|
||||||
>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip
|
|
||||||
>
|
|
||||||
</q-btn>
|
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
|
||||||
col.label
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
</div>
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
import DialogDevelop from "@/modules/10_registry/Dialog/DialogDevelopmant.vue";
|
import DialogDevelop from "@/modules/10_registry/Dialog/DialogDevelopmant.vue";
|
||||||
|
|
||||||
const dataPerson = useDataStore()
|
const link = ref<string>("");
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
|
@ -118,7 +119,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.developmentUserByType(dataPerson.officerLink))
|
.get(config.API.developmentUserByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -135,7 +136,13 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserCertificateHistoryByType(dataPerson.officerLink,"assessments", idByRow.value))
|
.get(
|
||||||
|
config.API.dataUserCertificateHistoryByType(
|
||||||
|
link.value,
|
||||||
|
"assessments",
|
||||||
|
idByRow.value
|
||||||
|
)
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -157,7 +164,8 @@ function openDialogDevelop(data: any) {
|
||||||
kpiDevelopmentId.value = data.kpiDevelopmentId;
|
kpiDevelopmentId.value = data.kpiDevelopmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -201,7 +209,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
@ -210,136 +217,135 @@ onMounted(() => {
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<d-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:rows="rows.length !== 0 ? rows:[]"
|
:rows="rows.length !== 0 ? rows : []"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:grid="!mode"
|
:grid="!mode"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
: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"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="mode" v-slot:body="props">
|
<template v-if="mode" v-slot:body="props">
|
||||||
<q-tr :props="props" class="vertical-top">
|
<q-tr :props="props" class="vertical-top">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
(paginationPlan.page - 1) * paginationPlan.rowsPerPage +
|
(paginationPlan.page - 1) * paginationPlan.rowsPerPage +
|
||||||
props.rowIndex +
|
props.rowIndex +
|
||||||
1
|
1
|
||||||
}}
|
}}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name == 'developmentProjects'">
|
||||||
|
<div class="column">
|
||||||
|
<q-checkbox
|
||||||
|
size="xs"
|
||||||
|
:model-value="props.row.isDevelopment70"
|
||||||
|
label="70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)"
|
||||||
|
/>
|
||||||
|
<q-checkbox
|
||||||
|
size="xs"
|
||||||
|
:model-value="props.row.isDevelopment20"
|
||||||
|
label="20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)"
|
||||||
|
/>
|
||||||
|
<q-checkbox
|
||||||
|
size="xs"
|
||||||
|
:model-value="props.row.isDevelopment10"
|
||||||
|
label="10 การฝึกอบรมอื่นๆ"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'developmentProjects'">
|
</div>
|
||||||
<div class="column">
|
<div v-else class="table_ellipsis">
|
||||||
<q-checkbox
|
{{ col.value ? col.value : "-" }}
|
||||||
size="xs"
|
</div>
|
||||||
:model-value="props.row.isDevelopment70"
|
</q-td>
|
||||||
label="70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)"
|
<q-td auto-width>
|
||||||
/>
|
<q-btn
|
||||||
<q-checkbox
|
flat
|
||||||
size="xs"
|
round
|
||||||
:model-value="props.row.isDevelopment20"
|
dense
|
||||||
label="20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)"
|
color="info"
|
||||||
/>
|
icon="mdi-eye"
|
||||||
<q-checkbox
|
@click="openDialogDevelop(props.row)"
|
||||||
size="xs"
|
>
|
||||||
:model-value="props.row.isDevelopment10"
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
label="10 การฝึกอบรมอื่นๆ"
|
</q-btn></q-td
|
||||||
/>
|
>
|
||||||
</div>
|
</q-tr>
|
||||||
</div>
|
</template>
|
||||||
<div v-else class="table_ellipsis">
|
<template v-else v-slot:item="props">
|
||||||
{{ col.value ? col.value : "-" }}
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
</div>
|
<q-card bordered flat>
|
||||||
</q-td>
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
color="info"
|
color="info"
|
||||||
icon="mdi-eye"
|
icon="mdi-eye"
|
||||||
|
size="14px"
|
||||||
|
class="absolute_button"
|
||||||
@click="openDialogDevelop(props.row)"
|
@click="openDialogDevelop(props.row)"
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
</q-btn></q-td
|
</q-btn>
|
||||||
>
|
<q-item v-for="col in props.cols" :key="col.name">
|
||||||
</q-tr>
|
<q-item-section class="fix_top">
|
||||||
</template>
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
<template v-else v-slot:item="props">
|
col.label
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
}}</q-item-label>
|
||||||
<q-card bordered flat>
|
</q-item-section>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
|
||||||
<q-btn
|
<q-item-section
|
||||||
flat
|
v-if="col.name == 'developmentProjects'"
|
||||||
round
|
class="fix_top"
|
||||||
dense
|
|
||||||
color="info"
|
|
||||||
icon="mdi-eye"
|
|
||||||
size="14px"
|
|
||||||
class="absolute_button"
|
|
||||||
@click="openDialogDevelop(props.row)"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<div class="column">
|
||||||
</q-btn>
|
<q-checkbox
|
||||||
<q-item v-for="col in props.cols" :key="col.name">
|
class="check_box"
|
||||||
<q-item-section class="fix_top">
|
size="xs"
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
:model-value="props.row.isDevelopment70"
|
||||||
col.label
|
label="70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)"
|
||||||
}}</q-item-label>
|
/>
|
||||||
</q-item-section>
|
<q-checkbox
|
||||||
|
class="check_box"
|
||||||
<q-item-section
|
size="xs"
|
||||||
v-if="col.name == 'developmentProjects'"
|
:model-value="props.row.isDevelopment20"
|
||||||
class="fix_top"
|
label="20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)"
|
||||||
>
|
/>
|
||||||
<div class="column">
|
<q-checkbox
|
||||||
<q-checkbox
|
class="check_box"
|
||||||
class="check_box"
|
size="xs"
|
||||||
size="xs"
|
:model-value="props.row.isDevelopment10"
|
||||||
:model-value="props.row.isDevelopment70"
|
label="10 การฝึกอบรมอื่นๆ"
|
||||||
label="70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)"
|
/>
|
||||||
/>
|
</div>
|
||||||
<q-checkbox
|
</q-item-section>
|
||||||
class="check_box"
|
|
||||||
size="xs"
|
|
||||||
:model-value="props.row.isDevelopment20"
|
|
||||||
label="20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)"
|
|
||||||
/>
|
|
||||||
<q-checkbox
|
|
||||||
class="check_box"
|
|
||||||
size="xs"
|
|
||||||
:model-value="props.row.isDevelopment10"
|
|
||||||
label="10 การฝึกอบรมอื่นๆ"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
|
|
||||||
<q-item-section v-else class="fix_top">
|
|
||||||
<q-item-label class="text-dark text-weight-medium">{{
|
|
||||||
col.value ? col.value : "-"
|
|
||||||
}}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
|
|
||||||
|
<q-item-section v-else class="fix_top">
|
||||||
|
<q-item-label class="text-dark text-weight-medium">{{
|
||||||
|
col.value ? col.value : "-"
|
||||||
|
}}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" />
|
<DialogDevelop v-model:modal="modalDevelop" v-model:id="kpiDevelopmentId" />
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import type { OtherFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
//history dialog
|
//history dialog
|
||||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
|
|
||||||
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataPerson = useDataStore();
|
const dataPerson = useDataStore();
|
||||||
|
|
@ -113,7 +114,7 @@ function onHistory(id: string) {
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.dataUserOtherByType(dataPerson.officerLink))
|
.get(config.API.dataUserOtherByType(link.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
|
@ -128,12 +129,7 @@ function getData() {
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(
|
.get(config.API.dataUserOtherHistoryByType(link.value, idByRow.value))
|
||||||
config.API.dataUserOtherHistoryByType(
|
|
||||||
dataPerson.officerLink,
|
|
||||||
idByRow.value
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rowsHistory.value = data;
|
rowsHistory.value = data;
|
||||||
|
|
@ -146,7 +142,8 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
* use
|
* use
|
||||||
*/
|
*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const link = ref<string>('')
|
||||||
const store = useRequestEditStore();
|
const store = useRequestEditStore();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||||
|
|
@ -55,7 +56,7 @@ function onSubmit() {
|
||||||
async () => {
|
async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.requestsEditByType(dataStore.officerLink), {
|
.post(config.API.requestsEditByType(link.value), {
|
||||||
topic: formData.topic,
|
topic: formData.topic,
|
||||||
detail: formData.detail,
|
detail: formData.detail,
|
||||||
[dataStore.officerType === "OFFICER"
|
[dataStore.officerType === "OFFICER"
|
||||||
|
|
@ -191,8 +192,9 @@ function onInfo(val: string) {
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
() => {
|
async () => {
|
||||||
modal.value && fetchProfile();
|
modal.value && fetchProfile();
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import type { DataOption } from "@/modules/10_registry/interface/index/Main";
|
||||||
import Workflow from "@/components/Workflow/Main.vue";
|
import Workflow from "@/components/Workflow/Main.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const link = ref<string>('')
|
||||||
const store = useRequestEditStore();
|
const store = useRequestEditStore();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -39,7 +40,7 @@ const statusOption = ref<DataOption[]>(statusOptionMain.value); //ตัวเ
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.requestEditByType(dataStore.officerLink) + `${requestId.value}`)
|
.get(config.API.requestEditByType(link.value) + `${requestId.value}`)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
dataRequest.value = {
|
dataRequest.value = {
|
||||||
|
|
@ -122,6 +123,7 @@ async function downloadUrl(id: string, fileName: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
*/
|
*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useRequestEditStore();
|
const store = useRequestEditStore();
|
||||||
|
const link = ref<string>('')
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const { showLoader, hideLoader, messageError, dialogRemove, success } =
|
const { showLoader, hideLoader, messageError, dialogRemove, success } =
|
||||||
|
|
@ -149,7 +150,7 @@ function fetchListRequset() {
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.requestEditByType(dataStore.officerLink) + `user`, { params: queryParams })
|
.get(config.API.requestEditByType(link.value) + `user`, { params: queryParams })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
maxPage.value = Math.ceil(data.total / pageSize.value);
|
maxPage.value = Math.ceil(data.total / pageSize.value);
|
||||||
|
|
@ -275,7 +276,8 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
link.value = await dataStore.getProFileType();
|
||||||
fetchListRequset();
|
fetchListRequset();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,7 @@ export const useDataStore = defineStore("data", () => {
|
||||||
async function getData(dataPerson: any) {
|
async function getData(dataPerson: any) {
|
||||||
const data = await dataPerson;
|
const data = await dataPerson;
|
||||||
isProbation.value = data.isProbation;
|
isProbation.value = data.isProbation;
|
||||||
officerType.value = data.type;
|
|
||||||
officerLink.value = await convertEmType(data.type);
|
|
||||||
formData.prefix = data.prefix;
|
formData.prefix = data.prefix;
|
||||||
formData.firstName = data.firstName;
|
formData.firstName = data.firstName;
|
||||||
formData.lastName = data.lastName;
|
formData.lastName = data.lastName;
|
||||||
|
|
@ -107,17 +106,18 @@ export const useDataStore = defineStore("data", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getProFileType() {
|
async function getProFileType() {
|
||||||
http
|
if (officerType.value == "") {
|
||||||
.get(config.API.proFileType)
|
await http
|
||||||
.then(async (res) => {
|
.get(config.API.proFileType)
|
||||||
const data = res.data.result;
|
.then(async (res) => {
|
||||||
officerType.value = data.type;
|
const data = await res.data.result;
|
||||||
officerLink.value = await convertEmType(data.type);
|
officerType.value = data;
|
||||||
hideLoader();
|
})
|
||||||
})
|
.catch((e) => {
|
||||||
.catch((e) => {
|
messageError($q, e);
|
||||||
messageError($q, e);
|
});
|
||||||
});
|
}
|
||||||
|
return convertEmType(officerType.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const profileImg = ref<string>("");
|
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -52,10 +51,11 @@ async function checkUser() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
await dataStore.getData(data);
|
await dataStore.getData(data);
|
||||||
|
await dataStore.getProFileType();
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
await getImg(data.profileId, data.avatarName);
|
await getImg(data.profileId, data.avatarName);
|
||||||
} else {
|
} else {
|
||||||
profileImg.value = avatar;
|
|
||||||
dataStore.profileImg = avatar;
|
dataStore.profileImg = avatar;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -83,7 +83,6 @@ function getImg(id: string, pathName: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, pathName))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
profileImg.value = res.data.downloadUrl;
|
|
||||||
dataStore.profileImg = res.data.downloadUrl;
|
dataStore.profileImg = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -471,7 +470,7 @@ function onInfo() {
|
||||||
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
||||||
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
||||||
<q-img
|
<q-img
|
||||||
:src="profileImg"
|
:src="dataStore.profileImg"
|
||||||
class="border-100"
|
class="border-100"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
style="height: 30px; max-width: 30px"
|
style="height: 30px; max-width: 30px"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue