รายการตัวชี้วัดตามแผนฯ แก้ API

This commit is contained in:
STW_TTTY\stwtt 2024-09-12 15:15:46 +07:00
parent eac72cdc5a
commit 82f5380f3e

View file

@ -2,11 +2,16 @@
import { ref, reactive, onMounted } from "vue";
import { QForm, useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import config from "@/app.config";
import http from "@/plugins/http";
import config from "@/app.config";
/** importType*/
import type { DataOption } from "@/modules/01_masterdata/interface/index/Main";
import type {
DataOption,
NodePlan,
OrgTreeNode,
} from "@/modules/01_masterdata/interface/index/Main";
/** importStore*/
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
@ -60,15 +65,15 @@ const roundOp = ref<DataOption[]>([
{ id: "OCT", name: "รอบตุลาคม" },
]);
const nodeplan = ref<any>([]);
const nodeAgency = ref<any>([]);
const nodeplan = ref<NodePlan[]>([]);
const nodeAgency = ref<OrgTreeNode[]>([]);
const filter = ref<string>("");
const filterAgency = ref<string>("");
const expandedPlan = ref<string[]>([]);
const expandedAgency = ref<string[]>([]);
const editStatus = ref<boolean>(false);
const inputRef = ref<any>(null);
const inputRef = ref<object | null>(null);
/** function fetch หาโครงสร้างที่ใช้งาน*/
function fetchOrganizationActive() {
@ -92,7 +97,7 @@ function fetchOrganizationActive() {
function fetchTreeStrategy() {
showLoader();
http
.get(config.API.devStrategy + `/edit`)
.get(config.API.devStrategy + `/indicator`)
.then((res) => {
const data = res.data.result;
nodeplan.value = data;
@ -105,7 +110,7 @@ function fetchTreeStrategy() {
});
}
/** functioon fetchcTree หน่วยงาน/ส่วนราชการ*/
/** ฟังชั่น fetchcTree หน่วยงาน/ส่วนราชการ*/
function fetchTreeAgency(id: string) {
showLoader();
http
@ -240,7 +245,6 @@ function onSubmit() {
documentInfoEvidence: planData.documentInfoEvidence,
};
showLoader();
// editStatus.value ? editData(id.value) : addData();
try {
const url = editStatus.value
? config.API.kpiPlanById(id.value)