fixing insignia
This commit is contained in:
parent
dea45644d0
commit
cc1927a2f4
8 changed files with 64 additions and 54 deletions
|
|
@ -22,8 +22,10 @@ export default {
|
|||
insigniaPeriodId: any,
|
||||
ocId: string,
|
||||
role: string,
|
||||
status: any
|
||||
) => `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}`,
|
||||
status: any,
|
||||
isDeputy: boolean = false
|
||||
) =>
|
||||
`${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}/${isDeputy}`,
|
||||
insigniaReject: (profileId: string) =>
|
||||
`${insignia}/request/status/reject/${profileId}`,
|
||||
insigniaDelete: (profileId: string) =>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ interface DataStructureTree {
|
|||
children: DataStructureTree[];
|
||||
orgRootCode: string;
|
||||
orgRootShortName: string;
|
||||
isDeputy?: boolean;
|
||||
}
|
||||
|
||||
interface DataStrategy {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, computed, reactive, watch } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useQuasar, QForm, is } from "quasar";
|
||||
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -77,6 +77,7 @@ const modalEdit = ref<boolean>(false); //popup แก้ไขเครื่อ
|
|||
const modalPersonal = ref<boolean>(false); //popup ข้อมูลราชการ
|
||||
const rowid = ref<string>(""); // id ที่ต้องการ
|
||||
const organization = ref<string>(""); //หน่วยงาน
|
||||
const isDeputy = ref<boolean>(false); //เลือกสำนักปลัดหรือไม่
|
||||
|
||||
/** หมายเหตุ*/
|
||||
const dialogNote = ref<boolean>(false); //หมายเหตุ
|
||||
|
|
@ -315,13 +316,17 @@ const checkStatus = computed(() => {
|
|||
});
|
||||
|
||||
/** เลือกหน่วยงาน*/
|
||||
function changtypeOc() {
|
||||
async function changtypeOc() {
|
||||
if (organization.value !== null) {
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
props.fecthInsigniaByOc?.(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
|
|
@ -441,7 +446,8 @@ async function addlistperson(id: string) {
|
|||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
}
|
||||
modalAdd.value = false;
|
||||
|
|
@ -536,7 +542,8 @@ async function clickSave() {
|
|||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
success($q, "แก้ไขเครื่องราชฯ ที่ยื่นขอสำเร็จ");
|
||||
modalEdit.value = false;
|
||||
|
|
@ -589,7 +596,8 @@ async function listreject(profileId: string, reason: string) {
|
|||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -646,7 +654,8 @@ async function listdelete(id: string, reason: string) {
|
|||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closemodelPopupDelete();
|
||||
|
|
@ -884,11 +893,16 @@ onMounted(async () => {
|
|||
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, watch } from "vue";
|
|||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** import Type*/
|
||||
|
|
@ -17,7 +16,6 @@ import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
|||
const mixin = useCounterMixin();
|
||||
const { onSearchDataTable } = mixin;
|
||||
/** useStore*/
|
||||
const roleDataStore = useroleUserDataStore();
|
||||
const DataStore = useInsigniaDataStore();
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
|
|
@ -38,6 +36,7 @@ const organization = ref<string>("1");
|
|||
const filterOrganizationOP = ref<OptionData[]>([]); //หน่วยงาน
|
||||
const typeinsigniaOptions = ref<OptionData[]>(DataStore.typeinsigniaOptions); //ประเภทเครื่องราย
|
||||
const employeeClassOps = ref<OptionData[]>(DataStore.employeeClassOps); //ประเภทข้ารายกาช
|
||||
const isDeputy = ref<boolean>(false); //เลือกสำนักปลัดหรือไม่
|
||||
|
||||
/** หัวตาราง*/
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -156,13 +155,18 @@ const visibleColumns = ref<string[]>([
|
|||
]);
|
||||
|
||||
/** function เลือกหน่วยงาน */
|
||||
function changtypeOc() {
|
||||
async function changtypeOc() {
|
||||
if (organization.value !== null) {
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
|
||||
props.fecthInsigniaByOc?.(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
|
|
@ -268,11 +272,16 @@ onMounted(async () => {
|
|||
organization.value = await DataStore.typeOc;
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
await props.fecthInsigniaByOc(
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const typeinsigniaOptions = ref<OptionData[]>(DataStore.typeinsigniaOptions); //
|
|||
const employeeClassOps = ref<OptionData[]>(DataStore.employeeClassOps); //ประเภทข้ารายกาช
|
||||
const filterOrganizationOP = ref<OptionData[]>([]); // //หน่วยงาน
|
||||
const organization = ref<string>("1");
|
||||
const organizationOptions = ref<OptionData[]>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const isDeputy = ref<boolean>(false); //เลือกสำนักปลัดหรือไม่
|
||||
|
||||
/** หัวตาราง*/
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -158,11 +158,16 @@ const visibleColumns = ref<string[]>([
|
|||
/** function เลือกหน่วยงาน */
|
||||
async function changtypeOc() {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
await props.fecthInsigniaByOc(
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
|
|
@ -277,11 +282,16 @@ onMounted(async () => {
|
|||
organization.value = await DataStore.typeOc;
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
await props.fecthInsigniaByOc(
|
||||
isDeputy.value = await (DataStore.optionsTypeOc.findIndex(
|
||||
(v: OptionData) => v.id === organization.value && v.isDeputy === true
|
||||
) > -1);
|
||||
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
props.tab,
|
||||
isDeputy.value
|
||||
);
|
||||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
interface OptionData {
|
||||
id: string | number;
|
||||
name: string;
|
||||
isDeputy?: boolean;
|
||||
}
|
||||
|
||||
interface OptionDataList {
|
||||
id:string
|
||||
id: string;
|
||||
val: string | number;
|
||||
name: string;
|
||||
}
|
||||
|
|
@ -233,5 +234,5 @@ export type {
|
|||
Pagination,
|
||||
DataManageList,
|
||||
ResOrg,
|
||||
OptionDataList
|
||||
OptionDataList,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ async function fetchListOrg(id: string) {
|
|||
(item: DataStructureTree) => ({
|
||||
id: item.orgTreeId,
|
||||
name: item.orgName,
|
||||
isDeputy: item.isDeputy,
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -231,13 +232,14 @@ async function fecthInsigniaByOc(
|
|||
roundId: string,
|
||||
ocId: string,
|
||||
role: string,
|
||||
status: string
|
||||
status: string,
|
||||
isDeputy: boolean = false
|
||||
) {
|
||||
DataStore.rows = [];
|
||||
if (roundId && ocId && role && status) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.insigniaList(roundId, ocId, role, status))
|
||||
.get(config.API.insigniaList(roundId, ocId, role, status, isDeputy))
|
||||
.then(async (res) => {
|
||||
requestNote.value = res.data.result.requestNote;
|
||||
requestStatus.value = res.data.result.requestStatus;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import type {
|
|||
optionType,
|
||||
} from "../interface/request/main/main";
|
||||
import { tabList, tabListPlacement } from "../interface/request/main/main";
|
||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
||||
|
||||
import LoginLinkage from "@/components/LoginLinkage.vue";
|
||||
|
||||
|
|
@ -41,9 +40,6 @@ const {
|
|||
date2Thai,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const DataStore = useroleUserDataStore();
|
||||
const { fetchroleUser } = DataStore;
|
||||
|
||||
const $q = useQuasar();
|
||||
const { tabData, loader } = storeToRefs(store);
|
||||
const { changeTab } = store;
|
||||
|
|
@ -51,34 +47,12 @@ const miniState = ref<boolean>(true);
|
|||
const drawerR = ref<boolean>(false);
|
||||
const rightActive = ref<boolean>(false);
|
||||
const resize = ref<number>(0);
|
||||
const active = ref<number>(0);
|
||||
const drawerL = ref<boolean>(false);
|
||||
const fullname = ref<string>("");
|
||||
const role = ref<string[]>([]);
|
||||
const notiTrigger = ref<boolean>(false);
|
||||
const text = ref<string>("");
|
||||
|
||||
const notiList = ref<notiType[]>([]);
|
||||
const options = ref<optionType[]>([
|
||||
{
|
||||
icon: "mdi-account-cog",
|
||||
label: "ผู้ดูแลระบบ",
|
||||
value: "op1",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
icon: "mdi-account-group",
|
||||
label: "เจ้าหน้าที่",
|
||||
value: "op2",
|
||||
color: "blue",
|
||||
},
|
||||
{
|
||||
icon: "mdi-account-circle",
|
||||
label: "บุคคล",
|
||||
value: "op3",
|
||||
color: "indigo",
|
||||
},
|
||||
]);
|
||||
const modalLoginLinkage = ref<boolean>(false); //เข้าสู่ระบบ Linkage Center
|
||||
|
||||
// landing page redirect
|
||||
|
|
@ -252,9 +226,6 @@ onMounted(async () => {
|
|||
isSsoToken.value = SSO_TOKEN === "y" ? true : false;
|
||||
if (user) {
|
||||
fullname.value = user.name;
|
||||
role.value = user.role;
|
||||
|
||||
await fetchroleUser(user.role);
|
||||
}
|
||||
|
||||
fetchmsgNoread();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue