จัดโค้ดวินัย

This commit is contained in:
setthawutttty 2023-12-25 16:31:24 +07:00
parent 71d3b54ef0
commit 7262000680
37 changed files with 492 additions and 697 deletions

View file

@ -1,27 +1,17 @@
<script setup lang="ts">
import {
ref,
computed,
watchEffect,
onMounted,
watch,
type PropType,
} from "vue";
import { ref, computed, watchEffect, watch, type PropType } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
import type { OpType } from "@/modules/05_placement/interface/response/Main";
import type {
DataListRow,
PersonType,
} from "@/modules/11_discipline/interface/request/result";
import { useRouter, useRoute } from "vue-router";
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
import { useRoute } from "vue-router";
import DialogHeader from "@/components/DialogHeader.vue";
import http from "@/plugins/http";
import config from "@/app.config";
const route = useRoute();
const optionsType = ref<[]>([]);
const idPath = ref<string>(route.params.id as string);
const type = ref<string>("");
const rows = ref<DataListRow[]>([]);
@ -79,8 +69,7 @@ const saveOrder = () => {
}
};
//
const Ordersave = async () => {
// const id = selected.value.map((r) => r.id);
async function Ordersave(){
const persons = selected.value.map((r) => r.id);
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
@ -127,21 +116,18 @@ const emit = defineEmits([
"update:selected",
"update:type",
]);
const updateInput = (value: any) => {
emit("update:filterKeyword2", value);
};
//
const Reset = () => {
function Reset(){
emit("update:filterKeyword2", "");
};
const updateInputType = (value: any) => {
emit("update:type", value);
};
//----()------//
const optionsType = ref<[]>([]);
const fecthTypeOption = async () => {
async function fecthTypeOption(){
showLoader();
await http
.get(config.API.typeOrder())
@ -174,14 +160,13 @@ watchEffect(() => {
if (props.Modal === true) {
selected.value = [];
type.value = "";
// console.log(props.data.status)
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
rows.value = props.data.persons.filter(
(item: any) => item.status !== "REPORT"
);
} else if (props.title == "ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ") {
rows.value = props.data.persons.filter(
(item: any) => item.status == "REPORT" && item.statusDiscard == 'NEW'
(item: any) => item.status == "REPORT" && item.statusDiscard == "NEW"
);
}
}