no message
This commit is contained in:
parent
5c1747262f
commit
b130568ef4
12 changed files with 938 additions and 472 deletions
|
|
@ -10,7 +10,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
/** importStore*/
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useDevelopmentDataStoreHistory } from "@/modules/15_development/store/developmentStoreHistory";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ const formFilter = reactive<FormFilter>({
|
|||
|
||||
/** use*/
|
||||
const router = useRouter();
|
||||
const store = useDevelopmentDataStore();
|
||||
const store = useDevelopmentDataStoreHistory();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
|
|
@ -135,11 +135,13 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
function onAdd() {
|
||||
store.status = false;
|
||||
router.push(`/development/history/add`);
|
||||
}
|
||||
function onDownload() {}
|
||||
|
||||
function onEdit(id:string) {
|
||||
function onEdit(id: string) {
|
||||
store.status = true;
|
||||
router.push(`/development/history/${id}`);
|
||||
}
|
||||
|
||||
|
|
@ -156,20 +158,17 @@ function getData() {
|
|||
.get(config.API.developmentHistoryList("officer"), { params: queryParams })
|
||||
.then((res) => {
|
||||
console.log(res.data.result.data);
|
||||
const data = res.data.result.data
|
||||
rows.value = data.map((item:any)=>({
|
||||
id:item.id ? item.id : null,
|
||||
citizenId:item.citizenId ? item.citizenId :null,
|
||||
name:item.firstName ? `${item.prefix}${item.firstName} ${item.lastName}` :null,
|
||||
prefix:item.prefix ? item.prefix : null,
|
||||
firstName:item.firstName ? item.firstName : null,
|
||||
lastName:item.lastName ? item.lastName : null,
|
||||
position:item.position ? item.position :null,
|
||||
type:item.type ? item.type :null,
|
||||
level:item.level ? item.level :null,
|
||||
positionSide:item.posExecutive ? item.posExecutive :null,
|
||||
projectName:item.projectName ? item.projectName :null,
|
||||
}))
|
||||
const data = res.data.result.data;
|
||||
rows.value = data.map((item: any) => ({
|
||||
id: item.id ? item.id : null,
|
||||
citizenId: item.citizenId ? item.citizenId : null,
|
||||
name: item.fullName ? item.fullName : null,
|
||||
position: item.position ? item.position : null,
|
||||
type: item.posType ? item.posType : null,
|
||||
level: item.posLevel ? item.posLevel : null,
|
||||
projectName: item.projectName ? item.projectName : null,
|
||||
positionSide: item.posExecutive ? item.posExecutive : null,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -192,118 +191,123 @@ onMounted(() => {
|
|||
รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ
|
||||
</div>
|
||||
<q-card flat bordered class="q-pa-md">
|
||||
<q-toolbar style="padding: 0px">
|
||||
<div class="row q-gutter-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="getData()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0
|
||||
? null
|
||||
: Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="yearAll"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="agency"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</div>
|
||||
<div class="row no-wrap shadow-1 justify-between">
|
||||
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm">
|
||||
<div class="col-3">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formFilter.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="getData()"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formFilter.year === 0 ? null : Number(formFilter.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formFilter.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="yearAll"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<q-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
@click="onAdd()"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="formFilter.keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="getData()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formFilter.keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="formFilter.keyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
formFilter.keyword = '';
|
||||
getData();
|
||||
"
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน"
|
||||
v-model="agency"
|
||||
:options="agencyOp"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar>
|
||||
<q-toolbar class="col-4 text-white q-pa-none q-gutter-x-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<div class="col-4">
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="formFilter.keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.prevent="getData()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formFilter.keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="formFilter.keyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
formFilter.keyword = '';
|
||||
getData();
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
for="table"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue