แก้ API
This commit is contained in:
parent
d78b7db124
commit
459428979b
12 changed files with 37 additions and 33 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue