Merge branch 'develop' into devTee
This commit is contained in:
commit
acbf16dd14
36 changed files with 212 additions and 121 deletions
|
|
@ -21,6 +21,7 @@ export default {
|
||||||
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
|
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
|
||||||
organizationHistoryNew: `${organization}/history`,
|
organizationHistoryNew: `${organization}/history`,
|
||||||
organizationHistoryPostNew: `${organization}/history/publish`,
|
organizationHistoryPostNew: `${organization}/history/publish`,
|
||||||
|
orgChart: (id: string) => `${organization}/org-chart/${id}`,
|
||||||
|
|
||||||
/** position*/
|
/** position*/
|
||||||
orgPosPosition: `${orgPos}/position`,
|
orgPosPosition: `${orgPos}/position`,
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ export default {
|
||||||
file: (name: string, group: string, id: string) =>
|
file: (name: string, group: string, id: string) =>
|
||||||
`${url}/file/${name}/${group}/${id}`,
|
`${url}/file/${name}/${group}/${id}`,
|
||||||
KpiFile,
|
KpiFile,
|
||||||
fileByPath: (name: string) =>
|
fileByPath: (name: string) => `${url}/file/${name}`,
|
||||||
`${url}/file/${name}`,
|
|
||||||
fileByFile: (name: string, group: string, id: string, fileName: string) =>
|
fileByFile: (name: string, group: string, id: string, fileName: string) =>
|
||||||
`${url}/file/${name}/${group}/${id}/${fileName}`,
|
`${url}/file/${name}/${group}/${id}/${fileName}`,
|
||||||
|
|
||||||
|
filefullPath: (path: string) => `${url}/file/${path}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -8,60 +8,36 @@ import config from "@/app.config";
|
||||||
import { OrgChart } from "bma-org-chart";
|
import { OrgChart } from "bma-org-chart";
|
||||||
import "bma-org-chart/org-chart.css";
|
import "bma-org-chart/org-chart.css";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
import chartData from "@/assets/orgChartData";
|
import chartData from "@/assets/orgChartData";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const store = useOrganizational();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
|
|
||||||
const dataSource = ref(chartData);
|
const dataSource = ref(chartData); // ข้อมูล Chart
|
||||||
// const dataSource = ref() // ข้อมูล Chart
|
|
||||||
|
|
||||||
const rootOrgID = ref(); // org id ของ root ตัวปัจจุบันที่เลือกอยู่
|
const rootOrgID = ref(); // org id ของ root ตัวปัจจุบันที่เลือกอยู่
|
||||||
const dataSourceLock = ref(); // ข้อมูลตั้งต้นของ Chart ใช้ให้กดกลับไปที่ home
|
const dataSourceLock = ref(); // ข้อมูลตั้งต้นของ Chart ใช้ให้กดกลับไปที่ home
|
||||||
const chartRef = ref(); // อ้างอิงไปที่ตัว chart
|
const chartRef = ref(); // อ้างอิงไปที่ตัว chart
|
||||||
const savePNG = () => {
|
|
||||||
chartRef.value.savePNG();
|
|
||||||
};
|
|
||||||
const savePDF = () => {
|
|
||||||
chartRef.value.savePDF();
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await fetchTreeRoot();
|
|
||||||
await fetchOrgChart();
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* อ่าน Root ของข้อมูลทั้งหมดก่อน
|
* fetch ข้อมูล Chart โครงสร้าง
|
||||||
*/
|
*/
|
||||||
const fetchTreeRoot = async () => {
|
function fetchOrgChart() {
|
||||||
showLoader();
|
showLoader();
|
||||||
let urlRequest = config.API.chartGetTreeRoot;
|
let urlRequest = config.API.orgChart(rootOrgID.value);
|
||||||
await http
|
http
|
||||||
.get(urlRequest)
|
.get(urlRequest)
|
||||||
.then((response) => {
|
.then(async (response) => {
|
||||||
if (response.data.result.length > 0) {
|
if (response.data.result.length > 0) {
|
||||||
rootOrgID.value = response.data.result[0].organizationId;
|
const data = response.data.result;
|
||||||
}
|
|
||||||
})
|
const updatedData = await Promise.all(data.map(addAvatarToData));
|
||||||
.catch((e) => {
|
dataSource.value = updatedData[0];
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchOrgChart = async () => {
|
|
||||||
showLoader();
|
|
||||||
let urlRequest = config.API.chartGetOrg(rootOrgID.value);
|
|
||||||
await http
|
|
||||||
.get(urlRequest)
|
|
||||||
.then((response) => {
|
|
||||||
if (response.data.result.length > 0) {
|
|
||||||
dataSource.value = response.data.result[0];
|
|
||||||
if (dataSourceLock.value === undefined)
|
if (dataSourceLock.value === undefined)
|
||||||
dataSourceLock.value = dataSource.value;
|
dataSourceLock.value = dataSource.value;
|
||||||
}
|
}
|
||||||
|
|
@ -72,24 +48,79 @@ const fetchOrgChart = async () => {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* map ข้อมูล Chart
|
||||||
|
* @param item ข้อมูล Chart
|
||||||
|
*/
|
||||||
|
async function addAvatarToData(item: any) {
|
||||||
|
// เพิ่ม avatar ให้กับ item
|
||||||
|
const updatedItem = {
|
||||||
|
...item,
|
||||||
|
avatar: item.avatar ? await fetchProfile(item.avatar) : avatar,
|
||||||
|
// ตรวจสอบว่า item มี children หรือไม่
|
||||||
|
children: item.children
|
||||||
|
? await Promise.all(item.children.map(addAvatarToData))
|
||||||
|
: [],
|
||||||
|
};
|
||||||
|
return updatedItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fetch รูปโปรไฟล์ return ลิงค์ download ไฟล์
|
||||||
|
* @param path ไฟล์รูป
|
||||||
|
*/
|
||||||
|
async function fetchProfile(path: string) {
|
||||||
|
try {
|
||||||
|
const res = await http.get(config.API.filefullPath(path));
|
||||||
|
return res.data.downloadUrl; // คืนค่า URL ของ avatar
|
||||||
|
} catch (err) {
|
||||||
|
return avatar; // คืนค่า default avatar ถ้าเกิดข้อผิดพลาด
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อมีการคลิกที่ Chart ให้อ่าน ID ของหน่วยงานที่ถูกคลิก แล้วดึงข้อมูล Chart ของหน่วยงานนั้น ๆ จาก API
|
* เมื่อมีการคลิกที่ Chart ให้อ่าน ID ของหน่วยงานที่ถูกคลิก แล้วดึงข้อมูล Chart ของหน่วยงานนั้น ๆ จาก API
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const refreshChart = async (data: any) => {
|
async function refreshChart(data: any) {
|
||||||
if (data.value !== undefined) rootOrgID.value = data.value;
|
if (data.value !== undefined) rootOrgID.value = data.value;
|
||||||
else rootOrgID.value = data;
|
else rootOrgID.value = data;
|
||||||
if (rootOrgID.value !== 0) await fetchOrgChart();
|
if (rootOrgID.value !== 0) await fetchOrgChart();
|
||||||
if (data.value !== undefined) data.value = 0;
|
if (data.value !== undefined) data.value = 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* โหลด Chart รูป
|
||||||
|
*/
|
||||||
|
function savePNG() {
|
||||||
|
chartRef.value.savePNG();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* โหลด Chart PDF
|
||||||
|
*/
|
||||||
|
function savePDF() {
|
||||||
|
chartRef.value.savePDF();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
rootOrgID.value =
|
||||||
|
store.typeOrganizational === "current"
|
||||||
|
? store.activeId
|
||||||
|
: store.typeOrganizational === "draft"
|
||||||
|
? store.draftId
|
||||||
|
: store.historyId;
|
||||||
|
|
||||||
|
await fetchOrgChart();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- <div class="toptitle text-dark col-12 row items-center">แผนภูมิองค์กร</div> -->
|
<!-- <div class="toptitle text-dark col-12 row items-center">แผนภูมิองค์กร</div> -->
|
||||||
<div class="text-dark">
|
<div class="text-dark">
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card class="col-12 q-mt-sm">
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
<q-btn flat round color="primary" @click="savePNG()" icon="mdi-image">
|
<q-btn flat round color="primary" @click="savePNG()" icon="mdi-image">
|
||||||
<q-tooltip> ดาวน์โหลด PNG </q-tooltip>
|
<q-tooltip> ดาวน์โหลด PNG </q-tooltip>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
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";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { ListMenu } from "@/modules/02_organization/interface/index/Main";
|
import type { ListMenu } from "@/modules/02_organization/interface/index/Main";
|
||||||
|
|
@ -547,7 +548,7 @@ watch(
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-else
|
v-else-if="checkPermission($route)?.attrIsGet"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
color="grey-13"
|
color="grey-13"
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import genreport from "@/plugins/genreportxlsx";
|
import genreport from "@/plugins/genreportxlsx";
|
||||||
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -683,7 +684,7 @@ watch(
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-else
|
v-else-if="checkPermission($route)?.attrIsGet"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
color="deep-purple"
|
color="deep-purple"
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ watch(
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
|
|
@ -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