updated get tree by system
This commit is contained in:
parent
af56b950b1
commit
ffde0fe79c
27 changed files with 128 additions and 72 deletions
|
|
@ -367,7 +367,7 @@ async function getActive() {
|
||||||
async function getTreeData(id: string) {
|
async function getTreeData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { ref, watch, reactive } from "vue";
|
import { ref, watch, reactive } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -36,6 +38,8 @@ const {
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const title = defineModel<string>("title", { required: true });
|
const title = defineModel<string>("title", { required: true });
|
||||||
const type = defineModel<any>("type", { required: true });
|
const type = defineModel<any>("type", { required: true });
|
||||||
|
|
@ -343,7 +347,7 @@ async function getActive() {
|
||||||
async function getTreeData(id: string) {
|
async function getTreeData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { ref, watch, reactive } from "vue";
|
import { ref, watch, reactive } from "vue";
|
||||||
import type { QInput, QTableProps } from "quasar";
|
import type { QInput, QTableProps } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -38,6 +40,8 @@ const {
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const title = defineModel<string>("title", { required: true });
|
const title = defineModel<string>("title", { required: true });
|
||||||
const selectedModal = defineModel<any[]>("selectedModal");
|
const selectedModal = defineModel<any[]>("selectedModal");
|
||||||
|
|
@ -250,7 +254,7 @@ async function getActive() {
|
||||||
async function getTreeData(id: string) {
|
async function getTreeData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ function fetchTreeStrategy() {
|
||||||
function fetchTreeAgency(id: string) {
|
function fetchTreeAgency(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodeAgency.value = data;
|
nodeAgency.value = data;
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ function fetchActive() {
|
||||||
async function fetchTree(id: string) {
|
async function fetchTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ function fetchActive() {
|
||||||
async function fetchTree(id: string) {
|
async function fetchTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ async function fetchDataTree(id: string) {
|
||||||
isLoadTree.value = false;
|
isLoadTree.value = false;
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByid(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodeTree.value = data;
|
nodeTree.value = data;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ const idVal = ref("");
|
||||||
async function fetchDataTree(id: string) {
|
async function fetchDataTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByid(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ function clearSelect(t: string) {
|
||||||
async function fetchTree(id: string) {
|
async function fetchTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByIdSystem(id.toString(), route.meta.Key))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ import CardPosition from "@/modules/05_placement/components/PersonalList/CardPos
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useSelectOrgStore } from "@/modules/05_placement/stores/storeSelect";
|
import { useSelectOrgStore } from "@/modules/05_placement/stores/storeSelect";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -93,7 +96,7 @@ async function fetchOrganizationActive() {
|
||||||
async function fetchDataTree(id: string) {
|
async function fetchDataTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import type {
|
||||||
DataPositionNo,
|
DataPositionNo,
|
||||||
TreeMain,
|
TreeMain,
|
||||||
} from "@/modules/05_placement/interface/response/Receive";
|
} from "@/modules/05_placement/interface/response/Receive";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const {
|
const {
|
||||||
|
|
@ -33,6 +34,7 @@ const {
|
||||||
} = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
} = mixin; //ฟังก์ชันกลางที่เรียกใช้
|
||||||
|
|
||||||
const nodeLevel = ref<number>(0);
|
const nodeLevel = ref<number>(0);
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const isAll = ref<boolean>(false);
|
const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(false);
|
const isBlank = ref<boolean>(false);
|
||||||
|
|
@ -471,7 +473,7 @@ function getSumPosition(data: SumPosition) {
|
||||||
async function fetchDataTree(id: string) {
|
async function fetchDataTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ async function getActive() {
|
||||||
async function getTreeData(id: string) {
|
async function getTreeData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodes.value = data;
|
nodes.value = data;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue"; //หม
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
import { useroleUserDataStore } from "@/stores/roleUser";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
/**use */
|
/**use */
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
@ -24,6 +25,7 @@ const roleDataStore = useroleUserDataStore();
|
||||||
const DataStore = useInsigniaDataStore();
|
const DataStore = useInsigniaDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin;
|
const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin;
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ตัวแปร
|
* ตัวแปร
|
||||||
|
|
@ -137,7 +139,7 @@ function fetchActiveId() {
|
||||||
function fetchListOrg(id: string) {
|
function fetchListOrg(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import DialogHeader from "../DialogHeader.vue";
|
||||||
|
|
||||||
/** import Stores */
|
/** import Stores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
/** useStore*/
|
/** useStore*/
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -27,6 +28,7 @@ const {
|
||||||
dateToISO,
|
dateToISO,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const myForm = ref<any>();
|
const myForm = ref<any>();
|
||||||
|
|
||||||
|
|
@ -126,7 +128,7 @@ function fetchOrgList() {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(data.activeId))
|
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ async function fetchOrgList() {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(data.activeId))
|
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
@ -468,7 +468,6 @@ onMounted(async () => {
|
||||||
<q-td key="remain" :props="props">
|
<q-td key="remain" :props="props">
|
||||||
{{ props.row.remain }}
|
{{ props.row.remain }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,11 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
/** impotrStores */
|
/** impotrStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useBrrowDataStore } from "@/modules/07_insignia/storeBrrow";
|
import { useBrrowDataStore } from "@/modules/07_insignia/storeBrrow";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const myForm = ref<QForm>();
|
const myForm = ref<QForm>();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const DataStore = useBrrowDataStore();
|
const DataStore = useBrrowDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -133,7 +135,7 @@ async function fetchOrgList() {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(data.activeId))
|
.get(config.API.orgByIdSystem(data.activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ async function fetchOrganizationActive() {
|
||||||
async function fetchDataTree(id: string) {
|
async function fetchDataTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByIdSystem(id.toString(), route.meta.Key))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
showLoader,
|
showLoader,
|
||||||
downloadRenameFileByLink
|
downloadRenameFileByLink,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||||
|
|
||||||
|
|
@ -141,7 +141,6 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ลบไฟล์
|
* ลบไฟล์
|
||||||
* @param id id file
|
* @param id id file
|
||||||
|
|
@ -283,7 +282,7 @@ async function getActive() {
|
||||||
async function getOc(activeId: string) {
|
async function getOc(activeId: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(activeId))
|
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
organizationId: item.orgTreeId,
|
organizationId: item.orgTreeId,
|
||||||
|
|
@ -1041,7 +1040,10 @@ function filterOptionFnAgency(val: string, update: Function) {
|
||||||
color="blue"
|
color="blue"
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
@click="
|
@click="
|
||||||
downloadRenameFileByLink(data.pathName, data.fileName)
|
downloadRenameFileByLink(
|
||||||
|
data.pathName,
|
||||||
|
data.fileName
|
||||||
|
)
|
||||||
"
|
"
|
||||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const {
|
||||||
success,
|
success,
|
||||||
messageError,
|
messageError,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
downloadRenameFileByLink
|
downloadRenameFileByLink,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const investigateDis = useInvestigateDisStore();
|
const investigateDis = useInvestigateDisStore();
|
||||||
const countNum = ref<number>(1);
|
const countNum = ref<number>(1);
|
||||||
|
|
@ -465,7 +465,7 @@ async function getActive() {
|
||||||
async function getOc(activeId: string) {
|
async function getOc(activeId: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(activeId))
|
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: any) => ({
|
const data = await res.data.result.map((item: any) => ({
|
||||||
organizationId: item.orgTreeId,
|
organizationId: item.orgTreeId,
|
||||||
|
|
@ -1554,7 +1554,12 @@ onMounted(async () => {
|
||||||
round
|
round
|
||||||
color="blue"
|
color="blue"
|
||||||
icon="mdi-download-outline"
|
icon="mdi-download-outline"
|
||||||
@click="downloadRenameFileByLink(file.pathName, file.fileName)"
|
@click="
|
||||||
|
downloadRenameFileByLink(
|
||||||
|
file.pathName,
|
||||||
|
file.fileName
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -1658,7 +1663,12 @@ onMounted(async () => {
|
||||||
round
|
round
|
||||||
color="blue"
|
color="blue"
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
@click="downloadRenameFileByLink(file.pathName, file.fileName)"
|
@click="
|
||||||
|
downloadRenameFileByLink(
|
||||||
|
file.pathName,
|
||||||
|
file.fileName
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ async function getActive() {
|
||||||
async function getOc(activeId: string) {
|
async function getOc(activeId: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(activeId))
|
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
organizationOption.value = await res.data.result.map((item: any) => ({
|
organizationOption.value = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
@ -901,7 +901,6 @@ onMounted(async () => {
|
||||||
col.label
|
col.label
|
||||||
}}</span>
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
|
|
@ -1006,7 +1005,8 @@ onMounted(async () => {
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryDateInvestigation &&
|
formData.disciplinaryDateInvestigation &&
|
||||||
isReadonly === false &&!checkRoutePermisson
|
isReadonly === false &&
|
||||||
|
!checkRoutePermisson
|
||||||
"
|
"
|
||||||
v-slot:append
|
v-slot:append
|
||||||
>
|
>
|
||||||
|
|
@ -1067,7 +1067,8 @@ onMounted(async () => {
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryDateAllegation &&
|
formData.disciplinaryDateAllegation &&
|
||||||
isReadonly === false &&!checkRoutePermisson
|
isReadonly === false &&
|
||||||
|
!checkRoutePermisson
|
||||||
"
|
"
|
||||||
v-slot:append
|
v-slot:append
|
||||||
>
|
>
|
||||||
|
|
@ -1140,7 +1141,7 @@ onMounted(async () => {
|
||||||
<div v-if="extendStatus" class="col-3">
|
<div v-if="extendStatus" class="col-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
for="#daysExtend"
|
for="#daysExtend"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -1178,7 +1179,8 @@ onMounted(async () => {
|
||||||
<div v-if="!extendStatus" class="col-3">
|
<div v-if="!extendStatus" class="col-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
:readonly="checkRoutePermisson||
|
:readonly="
|
||||||
|
checkRoutePermisson ||
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length > 0
|
formData.disciplinaryExtendHistory.length > 0
|
||||||
"
|
"
|
||||||
|
|
@ -1201,7 +1203,8 @@ onMounted(async () => {
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
ref="dateRef"
|
ref="dateRef"
|
||||||
:class="inputEditExtend(isReadonly)"
|
:class="inputEditExtend(isReadonly)"
|
||||||
:readonly="checkRoutePermisson||
|
:readonly="
|
||||||
|
checkRoutePermisson ||
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory.length >
|
||||||
0
|
0
|
||||||
|
|
@ -1229,7 +1232,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
formData.disciplinaryDateStart &&
|
formData.disciplinaryDateStart &&
|
||||||
isReadonly === false &&
|
isReadonly === false &&
|
||||||
formData.disciplinaryExtendHistory
|
formData.disciplinaryExtendHistory
|
||||||
|
|
@ -1256,7 +1259,8 @@ onMounted(async () => {
|
||||||
:class="isReadonly ? '' : dateEndInputStyle"
|
:class="isReadonly ? '' : dateEndInputStyle"
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
v-model="formData.disciplinaryDateEnd"
|
v-model="formData.disciplinaryDateEnd"
|
||||||
:readonly="checkRoutePermisson||
|
:readonly="
|
||||||
|
checkRoutePermisson ||
|
||||||
formData.disciplinaryDateStart === null ||
|
formData.disciplinaryDateStart === null ||
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length > 0
|
formData.disciplinaryExtendHistory.length > 0
|
||||||
|
|
@ -1279,7 +1283,8 @@ onMounted(async () => {
|
||||||
for="#dateEnd"
|
for="#dateEnd"
|
||||||
:class="inputEditExtend(isReadonly)"
|
:class="inputEditExtend(isReadonly)"
|
||||||
ref="dateEndRef"
|
ref="dateEndRef"
|
||||||
:readonly="checkRoutePermisson||
|
:readonly="
|
||||||
|
checkRoutePermisson ||
|
||||||
formData.disciplinaryDateStart === null ||
|
formData.disciplinaryDateStart === null ||
|
||||||
isReadonly ||
|
isReadonly ||
|
||||||
formData.disciplinaryExtendHistory.length >
|
formData.disciplinaryExtendHistory.length >
|
||||||
|
|
@ -1307,7 +1312,8 @@ onMounted(async () => {
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="!checkRoutePermisson&&
|
v-if="
|
||||||
|
!checkRoutePermisson &&
|
||||||
formData.disciplinaryDateEnd &&
|
formData.disciplinaryDateEnd &&
|
||||||
isReadonly === false &&
|
isReadonly === false &&
|
||||||
formData.disciplinaryExtendHistory
|
formData.disciplinaryExtendHistory
|
||||||
|
|
@ -1360,7 +1366,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<datepicker
|
<datepicker
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
for="#dateEvident"
|
for="#dateEvident"
|
||||||
v-model="formData.disciplinaryDateEvident"
|
v-model="formData.disciplinaryDateEvident"
|
||||||
|
|
@ -1380,7 +1386,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
ref="disciplinaryDateEvidentRef"
|
ref="disciplinaryDateEvidentRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -1403,7 +1409,9 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryDateEvident && isReadonly === false &&!checkRoutePermisson
|
formData.disciplinaryDateEvident &&
|
||||||
|
isReadonly === false &&
|
||||||
|
!checkRoutePermisson
|
||||||
"
|
"
|
||||||
v-slot:append
|
v-slot:append
|
||||||
>
|
>
|
||||||
|
|
@ -1420,7 +1428,7 @@ onMounted(async () => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
|
|
||||||
<datepicker
|
<datepicker
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
for="#dateResult"
|
for="#dateResult"
|
||||||
v-model="formData.disciplinaryDateResult"
|
v-model="formData.disciplinaryDateResult"
|
||||||
|
|
@ -1441,7 +1449,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
ref="disciplinaryDateResultRef"
|
ref="disciplinaryDateResultRef"
|
||||||
outlined
|
outlined
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
|
|
@ -1464,7 +1472,9 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
formData.disciplinaryDateResult && isReadonly === false &&!checkRoutePermisson
|
formData.disciplinaryDateResult &&
|
||||||
|
isReadonly === false &&
|
||||||
|
!checkRoutePermisson
|
||||||
"
|
"
|
||||||
v-slot:append
|
v-slot:append
|
||||||
>
|
>
|
||||||
|
|
@ -1491,7 +1501,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
รายชื่อกรรมการเพื่อพิจารณาความผิดทางวินัย
|
รายชื่อกรรมการเพื่อพิจารณาความผิดทางวินัย
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!isReadonly&&!checkRoutePermisson"
|
v-if="!isReadonly && !checkRoutePermisson"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
@ -1522,11 +1532,15 @@ onMounted(async () => {
|
||||||
:titleText="''"
|
:titleText="''"
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props" >
|
<q-tr :props="props">
|
||||||
<q-td class="text-right">
|
<q-td class="text-right">
|
||||||
<!-- แก้ไขกรรมการ -->
|
<!-- แก้ไขกรรมการ -->
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!isReadonly && props.row.check === 'props' &&!checkRoutePermisson"
|
v-if="
|
||||||
|
!isReadonly &&
|
||||||
|
props.row.check === 'props' &&
|
||||||
|
!checkRoutePermisson
|
||||||
|
"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -1538,7 +1552,7 @@ onMounted(async () => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!isReadonly&&!checkRoutePermisson"
|
v-if="!isReadonly && !checkRoutePermisson"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -1574,7 +1588,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
ref="disciplinaryCaseFaultRef"
|
ref="disciplinaryCaseFaultRef"
|
||||||
|
|
@ -1589,7 +1603,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1604,7 +1618,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
for="#faultLevel"
|
for="#faultLevel"
|
||||||
|
|
@ -1647,7 +1661,7 @@ onMounted(async () => {
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
dense
|
dense
|
||||||
for="#refLaw"
|
for="#refLaw"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -1662,7 +1676,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1678,7 +1692,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1694,7 +1708,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1710,7 +1724,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -1745,7 +1759,7 @@ onMounted(async () => {
|
||||||
for="#fault"
|
for="#fault"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
ref="disciplinaryStatusResultRef"
|
ref="disciplinaryStatusResultRef"
|
||||||
v-model="formData.disciplinaryStatusResult"
|
v-model="formData.disciplinaryStatusResult"
|
||||||
:options="option"
|
:options="option"
|
||||||
|
|
@ -1773,7 +1787,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
for="#fault"
|
for="#fault"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -1802,7 +1816,7 @@ onMounted(async () => {
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
:readonly="isReadonly||checkRoutePermisson"
|
:readonly="isReadonly || checkRoutePermisson"
|
||||||
class="full-width cursor-pointer"
|
class="full-width cursor-pointer"
|
||||||
outlined
|
outlined
|
||||||
ref="disciplinaryResultRef"
|
ref="disciplinaryResultRef"
|
||||||
|
|
@ -1834,7 +1848,7 @@ onMounted(async () => {
|
||||||
:id="id"
|
:id="id"
|
||||||
type="relevant"
|
type="relevant"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
:is-readonly="isReadonly||checkRoutePermisson"
|
:is-readonly="isReadonly || checkRoutePermisson"
|
||||||
:return-count="returnCount"
|
:return-count="returnCount"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1846,7 +1860,7 @@ onMounted(async () => {
|
||||||
:id="id"
|
:id="id"
|
||||||
type="summaryEvidence"
|
type="summaryEvidence"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
:is-readonly="isReadonly||checkRoutePermisson"
|
:is-readonly="isReadonly || checkRoutePermisson"
|
||||||
:return-count="returnCount"
|
:return-count="returnCount"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1858,7 +1872,7 @@ onMounted(async () => {
|
||||||
:id="id"
|
:id="id"
|
||||||
type="recordAccuser"
|
type="recordAccuser"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
:is-readonly="isReadonly||checkRoutePermisson"
|
:is-readonly="isReadonly || checkRoutePermisson"
|
||||||
:return-count="returnCount"
|
:return-count="returnCount"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1870,7 +1884,7 @@ onMounted(async () => {
|
||||||
:id="id"
|
:id="id"
|
||||||
type="witnesses"
|
type="witnesses"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
:is-readonly="isReadonly||checkRoutePermisson"
|
:is-readonly="isReadonly || checkRoutePermisson"
|
||||||
:return-count="returnCount"
|
:return-count="returnCount"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1882,7 +1896,7 @@ onMounted(async () => {
|
||||||
:id="id"
|
:id="id"
|
||||||
type="other"
|
type="other"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
:is-readonly="isReadonly||checkRoutePermisson"
|
:is-readonly="isReadonly || checkRoutePermisson"
|
||||||
:return-count="returnCount"
|
:return-count="returnCount"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1890,7 +1904,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div v-if="!isReadonly&&!checkRoutePermisson" class="row col-12 q-pa-sm">
|
<div
|
||||||
|
v-if="!isReadonly && !checkRoutePermisson"
|
||||||
|
class="row col-12 q-pa-sm"
|
||||||
|
>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
for="ButtonOnSubmit"
|
for="ButtonOnSubmit"
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ async function getActive() {
|
||||||
async function getOc(activeId: string) {
|
async function getOc(activeId: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(activeId))
|
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
organizationOption.value = await res.data.result.map((item: any) => ({
|
organizationOption.value = await res.data.result.map((item: any) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,13 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
*/
|
*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
/**
|
/**
|
||||||
* use
|
* use
|
||||||
*/
|
*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ตัวแปรงาน
|
* ตัวแปรงาน
|
||||||
|
|
@ -148,7 +150,7 @@ function fetchActiveId() {
|
||||||
function fetchListOrg(id: string) {
|
function fetchListOrg(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.map((item: ResOrg) => ({
|
const data = await res.data.result.map((item: ResOrg) => ({
|
||||||
id: item.orgTreeId,
|
id: item.orgTreeId,
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ function fetchActive() {
|
||||||
function fetchTree(id: string) {
|
function fetchTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@ import config from "@/app.config";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { default: false });
|
const modal = defineModel<boolean>("modal", { default: false });
|
||||||
|
|
@ -47,7 +49,7 @@ function fetchActive() {
|
||||||
async function fetchTree(id: string) {
|
async function fetchTree(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, watch } from "vue";
|
import { ref, onMounted, reactive, watch } from "vue";
|
||||||
import { useQuasar, type QTableProps } from "quasar";
|
import { useQuasar, type QTableProps } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -31,6 +31,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const store = useDevelopmentDataStore();
|
const store = useDevelopmentDataStore();
|
||||||
const {
|
const {
|
||||||
|
|
@ -236,7 +237,7 @@ function fetchActive() {
|
||||||
*/
|
*/
|
||||||
function fetchTree(id: string) {
|
function fetchTree(id: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import Header from "@/components/DialogHeader.vue";
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -35,6 +36,7 @@ const {
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
success,
|
success,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
|
|
@ -56,7 +58,7 @@ async function fetchTree() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const id: string = store.activeId ? store.activeId?.toString() : "";
|
const id: string = store.activeId ? store.activeId?.toString() : "";
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgByid(id))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
nodeTree.value = res.data.result;
|
nodeTree.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,13 @@ import TreeTable from "@/modules/16_positionEmployee/components/TreeTable.vue";
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const store = usePositionEmp();
|
const store = usePositionEmp();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const nodeTree = ref<OrgTree[]>([]); // ข้อมูล Tree
|
const nodeTree = ref<OrgTree[]>([]); // ข้อมูล Tree
|
||||||
const nodeId = ref<string>(""); // id ของ Tree
|
const nodeId = ref<string>(""); // id ของ Tree
|
||||||
|
|
@ -56,7 +58,7 @@ function fetchDataTree(id: string) {
|
||||||
isLoadTree.value = false;
|
isLoadTree.value = false;
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgByid(id.toString()))
|
.get(config.API.orgByIdSystem(id, route.meta.Key as string))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodeTree.value = data;
|
nodeTree.value = data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue