updated format code
This commit is contained in:
parent
b75d69ea08
commit
b14bad2249
241 changed files with 14012 additions and 13811 deletions
|
|
@ -26,7 +26,9 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineComplaintsDetail");
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineComplaintsDetail"
|
||||
);
|
||||
|
||||
const modalPopup = ref<boolean>(false);
|
||||
|
||||
|
|
@ -188,7 +190,7 @@ async function getData() {
|
|||
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||
data.activeId = dataList.activeId;
|
||||
|
||||
mainStore.fetchDataRowsSend(dataList.persons)
|
||||
mainStore.fetchDataRowsSend(dataList.persons);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -351,7 +353,13 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="$router.push(`/discipline/complaints`)"
|
||||
/>
|
||||
<div class="q-ma-none">{{ checkRoutePermisson ? 'รายละเอียดเรื่องร้องเรียน':'แก้ไขเรื่องร้องเรียน'}}</div>
|
||||
<div class="q-ma-none">
|
||||
{{
|
||||
checkRoutePermisson
|
||||
? "รายละเอียดเรื่องร้องเรียน"
|
||||
: "แก้ไขเรื่องร้องเรียน"
|
||||
}}
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ watch(
|
|||
* ฟังชั่นสำหรับ เปลี่ยน route ตาม id ที่รับมา
|
||||
* @param id ไอดีระบุ
|
||||
*/
|
||||
function onDetail(id: string) {
|
||||
function onDetail(id: string) {
|
||||
router.push(`/discipline/complaints-detail/${id}`);
|
||||
}
|
||||
|
||||
|
|
@ -216,7 +216,10 @@ onMounted(() => {
|
|||
><q-tooltip>รายละเอียด</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsGet"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import { useRoute, useRouter } from "vue-router";
|
|||
const router = useRouter();
|
||||
|
||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||
async function onSubmit(){
|
||||
async function onSubmit() {
|
||||
router.push(`/discipline/investigatefacts`);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ const dateMonth = ref<DataDateMonthObject>({
|
|||
async function fetchCalendar() {
|
||||
showLoader();
|
||||
const defaultColor = "#e3fdda";
|
||||
const gradientColors = '#f7d0dd'
|
||||
const gradientColors = "#f7d0dd";
|
||||
|
||||
const events = await props.lists.map(
|
||||
(e: ExtendHistoryObject, index: number) => ({
|
||||
|
|
@ -91,9 +91,7 @@ async function fetchCalendar() {
|
|||
end: moment(e.dateEnd).format("YYYY-MM-DD") + " 23:59:59",
|
||||
allDay: false,
|
||||
color:
|
||||
props.lists.length > 1 && index > 0
|
||||
? gradientColors
|
||||
: defaultColor,
|
||||
props.lists.length > 1 && index > 0 ? gradientColors : defaultColor,
|
||||
})
|
||||
);
|
||||
calendarOptions.value.events = events;
|
||||
|
|
|
|||
|
|
@ -132,29 +132,29 @@ async function cancel(text: string) {
|
|||
* ฟังก์ชั่นเปิด model
|
||||
* @param text
|
||||
*/
|
||||
async function view(text: string){
|
||||
async function view(text: string) {
|
||||
title.value = text;
|
||||
modalCancel.value = true;
|
||||
modeCancel.value = false;
|
||||
};
|
||||
}
|
||||
|
||||
async function updateMonth(e: DataDateMonthObject){
|
||||
async function updateMonth(e: DataDateMonthObject) {
|
||||
if (e != null) {
|
||||
dateYear.value = e.year;
|
||||
|
||||
changCalendar();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function monthYearThai(val: DataDateMonthObject){
|
||||
function monthYearThai(val: DataDateMonthObject) {
|
||||
if (val == null) return "";
|
||||
else return monthYear2Thai(val.month, val.year);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
onMounted(async () => {
|
||||
fetchCalendar();
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineInvestigatefactsDetail");
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineInvestigatefactsDetail"
|
||||
);
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const modalPopup = ref<boolean>(false);
|
||||
|
||||
|
|
@ -351,7 +353,13 @@ watch(
|
|||
class="q-mr-sm"
|
||||
@click="$router.push(`/discipline/investigatefacts`)"
|
||||
/>
|
||||
<div class="q-ma-none">{{ checkRoutePermisson ? 'รายละเอียดรายการสืบสวนข้อเท็จจริง':'แก้ไขรายการสืบสวนข้อเท็จจริง'}}</div>
|
||||
<div class="q-ma-none">
|
||||
{{
|
||||
checkRoutePermisson
|
||||
? "รายละเอียดรายการสืบสวนข้อเท็จจริง"
|
||||
: "แก้ไขรายการสืบสวนข้อเท็จจริง"
|
||||
}}
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const dateMonth = ref<DataDateMonthObject>({
|
|||
async function fetchCalendar() {
|
||||
showLoader();
|
||||
const defaultColor = "#e3fdda";
|
||||
const gradientColors = '#f7d0dd'
|
||||
const gradientColors = "#f7d0dd";
|
||||
|
||||
const events = await props.lists.map(
|
||||
(e: ExtendHistoryObject, index: number) => ({
|
||||
|
|
@ -90,9 +90,7 @@ async function fetchCalendar() {
|
|||
end: moment(e.dateEnd).format("YYYY-MM-DD") + " 23:59:59",
|
||||
allDay: false,
|
||||
color:
|
||||
props.lists.length > 1 && index > 0
|
||||
? gradientColors
|
||||
: defaultColor,
|
||||
props.lists.length > 1 && index > 0 ? gradientColors : defaultColor,
|
||||
})
|
||||
);
|
||||
calendarOptions.value.events = events;
|
||||
|
|
@ -107,7 +105,6 @@ async function fetchCalendar() {
|
|||
}, 1000);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function convert เดือนปี
|
||||
* @param val เดือนปี
|
||||
|
|
@ -234,7 +231,6 @@ watch(
|
|||
</div>
|
||||
</template>
|
||||
</FullCalendar>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -135,8 +135,7 @@ async function fetchCalendar() {
|
|||
year: dateMonth.value.year,
|
||||
mouth: dateMonth.value.month,
|
||||
})
|
||||
.then((res) => {
|
||||
})
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
messageError($q);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -30,14 +30,16 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
|||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const isSaveInfo = ref<boolean>(false)
|
||||
const isSaveInfo = ref<boolean>(false);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useInvestigateDisStore();
|
||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineDisciplinaryDetail");
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
);
|
||||
const modalPopup = ref<boolean>(false);
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const data = ref<object>();
|
||||
|
|
@ -396,7 +398,13 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="$router.push(`/discipline/disciplinary`)"
|
||||
/>
|
||||
<div class="q-ma-none">{{ checkRoutePermisson ? 'รายละเอียดการสอบสวนความผิดทางวินัย':'แก้ไขการสอบสวนความผิดทางวินัย'}}</div>
|
||||
<div class="q-ma-none">
|
||||
{{
|
||||
checkRoutePermisson
|
||||
? "รายละเอียดการสอบสวนความผิดทางวินัย"
|
||||
: "แก้ไขการสอบสวนความผิดทางวินัย"
|
||||
}}
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch } from "vue";
|
||||
import { ref, computed, watchEffect, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
|
|
@ -56,7 +56,7 @@ const checkSelected = computed(() => {
|
|||
});
|
||||
|
||||
//popup ยืนยันส่งัว
|
||||
function saveOrder(){
|
||||
function saveOrder() {
|
||||
if (type.value) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -67,7 +67,7 @@ function saveOrder(){
|
|||
} else {
|
||||
dialogMessageNotify($q, "กรุณาเลือกประเภทคำสั่ง");
|
||||
}
|
||||
};
|
||||
}
|
||||
//ส่งไปออกคำสั่ง
|
||||
async function Ordersave() {
|
||||
const persons = selected.value.map((r) => r.id);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ const modal = ref<boolean>(false);
|
|||
const dataResult = ref<DataListRow[]>([]);
|
||||
const filterKeyword = ref<string>("");
|
||||
const dataDisciplinary = ref<object>([]);
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineResultDetail");
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineResultDetail"
|
||||
);
|
||||
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||
id: "",
|
||||
idComplaint: "",
|
||||
|
|
@ -285,7 +287,13 @@ onMounted(async () => {
|
|||
class="q-mr-sm"
|
||||
@click="$router.push(`/discipline-result`)"
|
||||
/>
|
||||
<div class="q-ma-none">{{checkRoutePermisson ? 'รายละเอียดผลการพิจารณาทางวินัย':'แก้ไขผลการพิจารณาทางวินัย'}}</div>
|
||||
<div class="q-ma-none">
|
||||
{{
|
||||
checkRoutePermisson
|
||||
? "รายละเอียดผลการพิจารณาทางวินัย"
|
||||
: "แก้ไขผลการพิจารณาทางวินัย"
|
||||
}}
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -230,13 +230,24 @@ function filterOptionFn(val: string, update: Function) {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" >
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn flat round dense icon="mdi-eye" color="info" @click="openDetail(props.row.id)" v-if="checkPermission($route)?.attrIsGet">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click="openDetail(props.row.id)"
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate && checkPermission($route)?.attrIsGet"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ function nextPage(type: string, title: string) {
|
|||
<div class="q-pa-md">
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage('1', 'รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี') "
|
||||
@click="
|
||||
nextPage('1', 'รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี')
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -36,7 +38,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '2', 'รายงานเรื่องร้องเรียนข้าราชการสามัญ ฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'2',
|
||||
'รายงานเรื่องร้องเรียนข้าราชการสามัญ ฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -51,7 +58,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '3', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'3',
|
||||
'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -66,7 +78,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '4', 'รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'4',
|
||||
'รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -81,7 +98,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '5', 'รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดแยกตามระดับความผิด' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'5',
|
||||
'รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดแยกตามระดับความผิด'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -95,7 +117,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '6', 'รายงานรายชื่อข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'6',
|
||||
'รายงานรายชื่อข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -110,7 +137,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '7', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'7',
|
||||
'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
@ -125,7 +157,12 @@ function nextPage(type: string, title: string) {
|
|||
|
||||
<q-item
|
||||
clickable
|
||||
@click=" nextPage( '8', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง' ) "
|
||||
@click="
|
||||
nextPage(
|
||||
'8',
|
||||
'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง'
|
||||
)
|
||||
"
|
||||
dense
|
||||
class="hover-green"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -280,11 +280,7 @@ onMounted(() => {
|
|||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<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'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const router = useRouter();
|
|||
* บันทึกข้อมูลที่เเก้ไข
|
||||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
function onSubmit(formData:FormDataPost) {
|
||||
function onSubmit(formData: FormDataPost) {
|
||||
dialogConfirm($q, () => addData(formData));
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ function addData(formData: FormDataPost) {
|
|||
showLoader();
|
||||
http
|
||||
.post(config.API.director(), {
|
||||
personalId:formData.personalId ?? '',
|
||||
personalId: formData.personalId ?? "",
|
||||
prefix: formData.prefix,
|
||||
firstName: formData.firstname,
|
||||
lastName: formData.lastname,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function onSubmit() {
|
|||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.getList?.()
|
||||
props.getList?.();
|
||||
closeDialog();
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import http from "@/plugins/http";
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
const listCheck = ref<number|null>();
|
||||
const listCheck = ref<number | null>();
|
||||
|
||||
const props = defineProps({
|
||||
modal: Boolean,
|
||||
|
|
@ -40,15 +40,15 @@ function clickList(index: number, data: any) {
|
|||
prefix: i.prefix,
|
||||
firstName: i.firstName,
|
||||
lastName: i.lastName,
|
||||
fullName:`${i.prefix}${i.firstName} ${i.lastName}`
|
||||
fullName: `${i.prefix}${i.firstName} ${i.lastName}`,
|
||||
}));
|
||||
}
|
||||
|
||||
watch(props, () => {
|
||||
if (props) {
|
||||
listCheck.value = null
|
||||
listInvestigateDetail.value = []
|
||||
dataList.value = []
|
||||
listCheck.value = null;
|
||||
listInvestigateDetail.value = [];
|
||||
dataList.value = [];
|
||||
const data: DirectorRowsResponse = props.dataList as DirectorRowsResponse;
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -134,7 +134,9 @@ watch(props, () => {
|
|||
separator
|
||||
>
|
||||
<q-item clickable v-ripple>
|
||||
<q-item-section>{{ `${item.fullName} ${item.duty ? `(${item.duty})`:''}` }}</q-item-section>
|
||||
<q-item-section>{{
|
||||
`${item.fullName} ${item.duty ? `(${item.duty})` : ""}`
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const data = reactive<FormData>({
|
|||
/**
|
||||
* ดึงค่าจาก api
|
||||
*/
|
||||
async function fetchData(){
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.directorbyId(personalId.value))
|
||||
|
|
@ -53,7 +53,7 @@ async function fetchData(){
|
|||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
|
|
@ -89,7 +89,7 @@ function putData(formData: FormData) {
|
|||
/**เมื่อเริ่มโหลดหน้า
|
||||
* เรียกใช้งาน fetchData เพื่อดึงข้อมูล
|
||||
*/
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,14 @@ import config from "@/app.config";
|
|||
const $q = useQuasar();
|
||||
const selected = ref<any>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader,dialogMessageNotify } = mixin;
|
||||
const {
|
||||
showLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
hideLoader,
|
||||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
const emit = defineEmits([
|
||||
"update:filterKeyword2",
|
||||
"update:selected",
|
||||
|
|
@ -111,7 +118,7 @@ const optionsType = ref<[]>([]);
|
|||
//popup ยืนยันส่งัว
|
||||
function saveOrder() {
|
||||
if (type.value === "") {
|
||||
dialogMessageNotify($q,'กรุณาเลือกประเภทคำสั่ง')
|
||||
dialogMessageNotify($q, "กรุณาเลือกประเภทคำสั่ง");
|
||||
} else {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ onMounted(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" >
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const router = useRouter();
|
|||
|
||||
/**
|
||||
* บันทึกข้อมูล อุทธรณ์/ร้องทุกข์
|
||||
* @param data ชุดข้อมูล
|
||||
* @param data ชุดข้อมูล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
const formData = new FormData();
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ const { showLoader, messageError, hideLoader, dialogConfirm, success } = mixin;
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const checkRoutePermission = ref<boolean>(route.name == 'appealComplainDetail')
|
||||
const checkRoutePermission = ref<boolean>(route.name == "appealComplainDetail");
|
||||
const historyStatusOb = reactive<HistoryStatusType>({
|
||||
status: "",
|
||||
createdFullName: "",
|
||||
createdAt: new Date,
|
||||
createdAt: new Date(),
|
||||
});
|
||||
|
||||
const fileOb = reactive<FileObType>({
|
||||
|
|
@ -53,7 +53,7 @@ const data = reactive<EditDataList>({
|
|||
|
||||
/**
|
||||
* บันทึกข้อมูล อุทธรณ์/ร้องทุกข์
|
||||
* @param data ชุดข้อมูล
|
||||
* @param data ชุดข้อมูล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
const dataList = {
|
||||
|
|
@ -103,9 +103,9 @@ function getData() {
|
|||
data.oc = dataList.oc;
|
||||
data.position = dataList.position;
|
||||
data.lastUpdatedAt = dataList.lastUpdatedAt;
|
||||
data.disciplineComplaint_Appeal_Docs = dataList.disciplineComplaint_Appeal_Docs
|
||||
data.historyStatus = dataList.historyStatus
|
||||
|
||||
data.disciplineComplaint_Appeal_Docs =
|
||||
dataList.disciplineComplaint_Appeal_Docs;
|
||||
data.historyStatus = dataList.historyStatus;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -134,7 +134,7 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push('/discipline-appealcomplain')"
|
||||
/>
|
||||
{{ checkRoutePermission ? `รายละเอียด`:`แก้ไข` }}การอุทธรณ์/ร้องทุกข์
|
||||
{{ checkRoutePermission ? `รายละเอียด` : `แก้ไข` }}การอุทธรณ์/ร้องทุกข์
|
||||
</div>
|
||||
|
||||
<Form :on-submit="onSubmit" :data="data" :get-data="getData" />
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ const {
|
|||
messageError,
|
||||
dialogMessageNotify,
|
||||
hideLoader,
|
||||
downloadRenameFileByLink
|
||||
downloadRenameFileByLink,
|
||||
} = mixin;
|
||||
const dataStore = useAppealComplainStore();
|
||||
|
||||
|
|
@ -702,7 +702,9 @@ onMounted(() => {
|
|||
dense
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadRenameFileByLink(data.pathName, data.fileName)"
|
||||
@click="
|
||||
downloadRenameFileByLink(data.pathName, data.fileName)
|
||||
"
|
||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ onMounted(async () => {
|
|||
<!-- use-input -->
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ function Reset() {
|
|||
|
||||
/**
|
||||
* ส่งเลขหน้า กลับไปหน้าหลัก
|
||||
* @param newPagination จำนวนข้อมูลที่ต้องการแสดง
|
||||
* @param newPagination จำนวนข้อมูลที่ต้องการแสดง
|
||||
* @param page เลขหน้าปัจจุบัน
|
||||
*/
|
||||
function updateProp(newPagination: any, page: number) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,14 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
const $q = useQuasar();
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, success, messageError, dialogRemove ,downloadRenameFileByLink} = mixin;
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogRemove,
|
||||
downloadRenameFileByLink,
|
||||
} = mixin;
|
||||
|
||||
const fileRef = ref<Object | null>(null);
|
||||
const file = ref<any>();
|
||||
|
|
@ -99,7 +106,7 @@ function popupRemove(id: string) {
|
|||
|
||||
/**
|
||||
* ฟังชั่นลบไฟล์
|
||||
* @param id id ของไฟล์
|
||||
* @param id id ของไฟล์
|
||||
*/
|
||||
async function removeFile(id: string) {
|
||||
showLoader();
|
||||
|
|
@ -135,85 +142,81 @@ function downloadFile(link: string) {
|
|||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
||||
<div v-if="!isReadonly" class="col-12">
|
||||
<q-file
|
||||
outlined
|
||||
dense
|
||||
ref="fileRef"
|
||||
for="#files"
|
||||
v-model="file"
|
||||
:label="label"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf,.xlsx,.docx,.png,.jpg"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
v-if="file"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile()"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
<q-file
|
||||
outlined
|
||||
dense
|
||||
ref="fileRef"
|
||||
for="#files"
|
||||
v-model="file"
|
||||
:label="label"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf,.xlsx,.docx,.png,.jpg"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
v-if="file"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile()"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
|
||||
<div v-if="props.files.length > 0" class="col-xs-12 row">
|
||||
<q-list
|
||||
bordered
|
||||
separator
|
||||
class="full-width rounded-borders"
|
||||
>
|
||||
<q-item
|
||||
v-for="(f, index) in props.files"
|
||||
:key="index"
|
||||
clickable
|
||||
v-ripple>
|
||||
<q-item-section>{{ f.fileName }}</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
<div>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadRenameFileByLink(f.pathName,f.fileName)"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดเอกสาร</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-if="props.files.length > 0" class="col-xs-12 row">
|
||||
<q-list bordered separator class="full-width rounded-borders">
|
||||
<q-item
|
||||
v-for="(f, index) in props.files"
|
||||
:key="index"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<q-item-section>{{ f.fileName }}</q-item-section>
|
||||
<q-item-section avatar>
|
||||
<div class="row">
|
||||
<div>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadRenameFileByLink(f.pathName, f.fileName)"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดเอกสาร</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
icon="mdi-delete"
|
||||
@click="popupRemove(f.id)"
|
||||
><q-tooltip>ลบเอกสาร</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
icon="mdi-delete"
|
||||
@click="popupRemove(f.id)"
|
||||
><q-tooltip>ลบเอกสาร</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
|
||||
<div class="col-12" v-if="props.files.length == 0">
|
||||
<q-card class="q-py-sm q-px-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12" v-if="props.files.length == 0">
|
||||
<q-card class="q-py-sm q-px-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue