เครื่องราช
This commit is contained in:
parent
6642e3f25b
commit
a94bebd6d0
6 changed files with 136 additions and 77 deletions
|
|
@ -255,7 +255,7 @@ const person = ref<any>([]);
|
|||
/** เช็คสถานนะแสดงปุ่มเพิ่ม*/
|
||||
const checkStatus = computed(() => {
|
||||
if (
|
||||
roleDataStore.insignia1Role &&
|
||||
DataStore.isStaff &&
|
||||
(DataStore.requestStatus == "st1" || DataStore.requestStatus == "st4")
|
||||
) {
|
||||
return true;
|
||||
|
|
@ -789,8 +789,6 @@ function clearInsigniaFilters(name: string) {
|
|||
|
||||
/** Hook*/
|
||||
onMounted(async () => {
|
||||
console.log(DataStore.optionsTypeOc);
|
||||
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = DataStore.typeOc;
|
||||
|
||||
|
|
@ -806,6 +804,14 @@ onMounted(async () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => DataStore.typeOc,
|
||||
async () => {
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -813,7 +819,7 @@ onMounted(async () => {
|
|||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
v-if="roleDataStore.adminRole"
|
||||
v-if="DataStore.isOfficer"
|
||||
v-model="organization"
|
||||
label="หน่วยงาน"
|
||||
dense
|
||||
|
|
@ -869,7 +875,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
|
|
@ -877,7 +882,7 @@ onMounted(async () => {
|
|||
<q-card bordered class="q-pa-sm col-12 bg-grey-1 q-mt-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
:class="roleDataStore.adminRole ? 'col-1' : 'col-3'"
|
||||
:class="DataStore.isOfficer ? 'col-1' : 'col-3'"
|
||||
v-model="DataStore.typeinsignia"
|
||||
label="ประเภทเครื่องราชฯ ที่ยืนขอ"
|
||||
dense
|
||||
|
|
@ -993,7 +998,7 @@ onMounted(async () => {
|
|||
v-if="
|
||||
(DataStore.isLock == false &&
|
||||
DataStore.requestStatus == 'st5' &&
|
||||
roleDataStore.adminRole) ||
|
||||
DataStore.isOfficer) ||
|
||||
(checkStatus == true && checkPermission($route)?.attrIsCreate)
|
||||
"
|
||||
>
|
||||
|
|
@ -1041,14 +1046,14 @@ onMounted(async () => {
|
|||
v-if="
|
||||
(DataStore.isLock == false &&
|
||||
DataStore.requestStatus == 'st5' &&
|
||||
roleDataStore.adminRole) ||
|
||||
DataStore.isOfficer) ||
|
||||
checkStatus == true
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
roleDataStore.adminRole ||
|
||||
(roleDataStore.insignia1Role &&
|
||||
DataStore.isOfficer ||
|
||||
(DataStore.isStaff &&
|
||||
(requestStatus == 'st1' || requestStatus == 'st4') &&
|
||||
(checkPermission($route)?.attrIsGet ||
|
||||
checkPermission($route)?.attrIsUpdate))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
|
@ -273,13 +273,21 @@ onMounted(async () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => DataStore.typeOc,
|
||||
async () => {
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
v-if="roleDataStore.adminRole"
|
||||
v-if="DataStore.isOfficer"
|
||||
v-model="organization"
|
||||
label="หน่วยงาน"
|
||||
dense
|
||||
|
|
@ -335,7 +343,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
|
@ -273,6 +273,14 @@ onMounted(async () => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => DataStore.typeOc,
|
||||
async () => {
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -280,7 +288,7 @@ onMounted(async () => {
|
|||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
v-if="roleDataStore.adminRole"
|
||||
v-if="DataStore.isOfficer"
|
||||
v-model="organization"
|
||||
label="หน่วยงาน"
|
||||
dense
|
||||
|
|
@ -336,7 +344,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue