แก้ API

This commit is contained in:
STW_TTTY\stwtt 2024-09-02 16:04:53 +07:00
parent d78b7db124
commit 459428979b
12 changed files with 37 additions and 33 deletions

View file

@ -92,7 +92,7 @@ function fetchOrganizationActive() {
function fetchTreeStrategy() {
showLoader();
http
.get(config.API.devStrategy)
.get(config.API.devStrategy + `/edit`)
.then((res) => {
const data = res.data.result;
nodeplan.value = data;
@ -127,7 +127,7 @@ function fetchTreeAgency(id: string) {
function fetchDataById(id: string) {
showLoader();
http
.get(config.API.kpiPlanById(id))
.get(config.API.kpiPlanByIdEdit(id))
.then((res) => {
const data = res.data.result;
year.value = Number(data.year);

View file

@ -127,7 +127,7 @@ function selectAgency() {
/** บันทึกข้อมูล */
function onSubmit() {
const url = id.value
? config.API.kpiRoleMainEdit + `/${id.value}`
? config.API.kpiRoleMainList + `/${id.value}`
: config.API.kpiRoleMainList;
const body = {

View file

@ -85,7 +85,7 @@ async function fetchData() {
await http
.get(
config.API.kpiGroup +
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
`/edit?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
)
.then(async (res) => {
total.value = res.data.result.total;

View file

@ -98,7 +98,7 @@ async function getData() {
http
.get(
config.API.kpiLink +
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
`/edit?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
)
.then((res) => {
total.value = res.data.result.total;
@ -210,7 +210,7 @@ async function onEdit(data: any) {
function getDataEdit(id: string) {
showLoader();
http
.get(config.API.kpiLink + `/${id}`)
.get(config.API.kpiLink + `/edit/${id}`)
.then((res) => {
const data = res.data.result;
groupName.value = {

View file

@ -57,7 +57,7 @@ function onSubmit() {
function getData() {
showLoader();
http
.get(config.API.kpiEvaluation)
.get(config.API.kpiEvaluation+`/edit`)
.then((res) => {
dataLevel.value = res.data.result.data;
})