ปรับชื่อ defineStore ระบบ วินัย

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-10-18 10:09:11 +07:00
parent 074fc05412
commit 7c0284a87a
7 changed files with 42 additions and 13 deletions

View file

@ -118,6 +118,25 @@ const fileUploadDoc = async (files: any) => {
});
};
function selectLevel(val: string) {
let dayNum = 0;
if (val == "0") {
dayNum = 45;
} else if (val == "1") {
dayNum = 30;
} else {
dayNum = 15;
}
if (dateconsideration.value) {
const currentDate = new Date(dateconsideration.value);
const newDate = new Date(
currentDate.getTime() + dayNum * 24 * 60 * 60 * 1000
);
datewarn.value = newDate;
}
}
function onSubmit() {
dialogConfirm(
$q,
@ -341,6 +360,7 @@ function onSubmit() {
map-options
:rules="[(val) => !!val || `${'กรุณาเลือกระดับการพิจารณา'}`]"
lazy-rules
@update:model-value="selectLevel(considerationLevel)"
/>
</div>
<div class="col-xs-12 col-sm-3"></div>
@ -366,10 +386,10 @@ function onSubmit() {
dense
class="full-width datepicker"
:model-value="datewarn != null ? date2Thai(datewarn) : null"
label="วันที่แจ้งเตือนล่วงหน้า"
label="วันที่แจ้งเตือนล่วงหน้า"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่แจ้งเตือนล่วงหน้า'}`,
!!val || `${'กรุณาเลือกวันที่แจ้งเตือนล่วงหน้า'}`,
]"
lazy-rules
>

View file

@ -1,10 +1,12 @@
<script setup lang="ts">
import { ref } from "vue";
import { useQuasar } from "quasar";
// importStroe
import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin();
const { date2Thai, dialogConfirm } = mixin;
const $q = useQuasar();
const props = defineProps({
next: {
@ -23,7 +25,14 @@ const dateYear = ref<number>(2023);
const date = ref<Date | null>(null);
function onSubmit() {
next();
dialogConfirm(
$q,
async () => {
next();
},
"ยืนยันการบันทึกข้อมูล",
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่"
);
}
</script>
@ -207,12 +216,12 @@ function onSubmit() {
</div>
<q-card-actions align="right">
<q-btn
dense
flat
round
unelevated
label="next"
color="public"
color="secondary"
icon="mdi-content-save-outline"
type="submit"
class="q-px-md"
/>
</q-card-actions>
</q-form>

View file

@ -3,7 +3,7 @@ import { ref } from "vue";
import type { DataOption } from "../interface/index/Main";
export const useComplainstDataStore = defineStore("complainst", () => {
export const useComplainstDataStore = defineStore("DisciplineComplainst", () => {
const rows = ref<any>([])
const optionListName = ref<any>([{}])

View file

@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useInvestigateDisStore = defineStore("InvestigateDis", () => {
export const useInvestigateDisStore = defineStore("DisciplineInvestigateDis", () => {
const rows = ref<any>([]);
async function fecthList(data: any) {

View file

@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useInvestigateFactStore = defineStore("InvestigateFact", () => {
export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact", () => {
const rows = ref<any>([])
async function fecthList(data: any) {

View file

@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useOrderStore = defineStore("order", () => {
export const useOrderStore = defineStore("DisciplineOrder", () => {
const rows = ref<any>([])
async function fecthOrder(data: any) {
let datalist = data.map((e: any) => ({

View file

@ -1,13 +1,13 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useReportDataStore = defineStore("report11", () => {
export const useReportDataStore = defineStore("DisciplineReport11", () => {
interface OptionReport {
id: string;
title: string;
}
const optionReport = ref<OptionReport[]>([
{ id: "1", title: "รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี"},
{ id: "1", title: "รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี" },
{ id: "2", title: "รายงานเรื่องร้องเรียนข้าราชการสามัญฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน" },
{ id: "3", title: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด" },
{ id: "4", title: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },