no message
This commit is contained in:
parent
ae3cee9e2a
commit
72eb47e4e5
4 changed files with 72 additions and 7 deletions
|
|
@ -33,7 +33,7 @@ const { fetchDataList } = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const isReadOnly = ref<boolean>(false); //อ่านอย่างเดียว
|
const isReadOnly = ref<boolean>(false); //อ่านอย่างเดียว
|
||||||
|
const isDone = ref<string>('')
|
||||||
//ฟอร์มข้อมูลการพัฒนารายบุคคล
|
//ฟอร์มข้อมูลการพัฒนารายบุคคล
|
||||||
const formData = reactive<FormDataIDP>({
|
const formData = reactive<FormDataIDP>({
|
||||||
topic: "", //ชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา
|
topic: "", //ชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา
|
||||||
|
|
@ -161,6 +161,8 @@ function fetchDataByid(id: string) {
|
||||||
formData.reason = data.reason;
|
formData.reason = data.reason;
|
||||||
formData.createdFullName = data.createdFullName;
|
formData.createdFullName = data.createdFullName;
|
||||||
formData.createdAt = data.createdAt;
|
formData.createdAt = data.createdAt;
|
||||||
|
|
||||||
|
isDone.value = data.status
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -263,7 +265,7 @@ watch(modal, (val) => {
|
||||||
|
|
||||||
<!-- สถานะคำร้อง -->
|
<!-- สถานะคำร้อง -->
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<q-card-section v-if="formData.status == 'PENDING'">
|
<q-card-section v-if="isDone == 'PENDING'">
|
||||||
<q-card bordered class="col-12">
|
<q-card bordered class="col-12">
|
||||||
<div class="row q-pa-md q-col-gutter-sm">
|
<div class="row q-pa-md q-col-gutter-sm">
|
||||||
<!-- สถานะ -->
|
<!-- สถานะ -->
|
||||||
|
|
|
||||||
10
src/modules/17_acting/store/Main.ts
Normal file
10
src/modules/17_acting/store/Main.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { defineStore } from "pinia";
|
||||||
|
|
||||||
|
export const useActingStore = defineStore("actingStore", () => {
|
||||||
|
const rootId = ref<string>("");
|
||||||
|
const isOfficer = ref<boolean | null>(null);
|
||||||
|
const isStaff = ref<boolean | null>(null);
|
||||||
|
const orgPublishDate = ref<Date | null>(null);
|
||||||
|
return { isOfficer, isStaff, rootId,orgPublishDate };
|
||||||
|
});
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useStructureTree } from "@/stores/structureTree";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useActingStore } from "@/modules/17_acting/store/Main";
|
||||||
|
import { useStructureTree } from "@/stores/structureTree";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -17,22 +18,24 @@ import type {
|
||||||
} from "@/modules/17_acting/interface/response/Main";
|
} from "@/modules/17_acting/interface/response/Main";
|
||||||
|
|
||||||
import LoadView from "@/components/LoadView.vue";
|
import LoadView from "@/components/LoadView.vue";
|
||||||
|
import DialogCreateCommandORG from "@/modules/18_command/components/DialogCreateCommandORG.vue";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { fetchTreeActing } = useStructureTree();
|
const { fetchTreeActing } = useStructureTree();
|
||||||
const storeTree = useStructureTree();
|
const storeTree = useStructureTree();
|
||||||
|
const storeActing = useActingStore();
|
||||||
const { showLoader, hideLoader, messageError, dialogRemove } =
|
const { showLoader, hideLoader, messageError, dialogRemove } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
|
|
||||||
/** โครงสร้าง*/
|
/** โครงสร้าง*/
|
||||||
|
const keycloakSystem = ref<string>("ORG_COMMAND");
|
||||||
const expanded = ref<Array<string>>([]);
|
const expanded = ref<Array<string>>([]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const nodeTree = ref<DataTree[]>([]);
|
const nodeTree = ref<DataTree[]>([]);
|
||||||
const posmasterId = ref<string>("");
|
const posmasterId = ref<string>("");
|
||||||
const isAll = ref<boolean>(false);
|
const isAll = ref<boolean>(false);
|
||||||
|
const modalCommand = ref<boolean>(false);
|
||||||
/**
|
/**
|
||||||
* function เรียกข้อมูลโครงสร้าง แบบปัจุบัน
|
* function เรียกข้อมูลโครงสร้าง แบบปัจุบัน
|
||||||
*/
|
*/
|
||||||
|
|
@ -254,8 +257,28 @@ function onDelete(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getWorkFlow() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.workflowKeycloakSystem(keycloakSystem.value))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
storeActing.isOfficer = data.isOfficer;
|
||||||
|
storeActing.isStaff = data.isStaff;
|
||||||
|
hideLoader();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
hideLoader();
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchOrganizationActive();
|
fetchOrganizationActive();
|
||||||
|
if (storeActing.isOfficer == null && storeActing.isStaff == null) {
|
||||||
|
getWorkFlow();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -438,7 +461,25 @@ onMounted(() => {
|
||||||
<q-card bordered style="height: 100%; border: 1px solid #d6dee1">
|
<q-card bordered style="height: 100%; border: 1px solid #d6dee1">
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
รายชื่อรักษาการ
|
รายชื่อรักษาการ
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
storeActing.isOfficer === true ||
|
||||||
|
storeActing.isStaff === true
|
||||||
|
"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
:disable="
|
||||||
|
storeActing.isStaff == true && storeActing.rootId == ''
|
||||||
|
"
|
||||||
|
color="add"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
@click.prevent="modalCommand = true"
|
||||||
|
>
|
||||||
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -580,6 +621,17 @@ onMounted(() => {
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
<!-- dialog ส่งไปออกคำสั่ง -->
|
||||||
|
<DialogCreateCommandORG
|
||||||
|
v-model:modal="modalCommand"
|
||||||
|
command-type-code="C-PM-40"
|
||||||
|
:org-publish-date="storeActing.orgPublishDate as Date||undefined"
|
||||||
|
v-model:is-officer="storeActing.isOfficer as boolean"
|
||||||
|
v-model:is-staff="storeActing.isStaff as boolean"
|
||||||
|
v-model:root-id="storeActing.rootId"
|
||||||
|
:system-name="'acting'"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,7 @@ function getPerson() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
|
selected.value = data; //select all
|
||||||
hideLoader();
|
hideLoader();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue