แก้ API
This commit is contained in:
parent
c01031c687
commit
cfd79ee40b
11 changed files with 18 additions and 17 deletions
|
|
@ -65,7 +65,7 @@ const roundOp = ref<DataOption[]>([
|
|||
function fetchspecialByid(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiSpecial + `/${id}`)
|
||||
.get(config.API.kpiSpecial + `/edit/${id}`)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const data = res.data.result;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ function selectAgency() {
|
|||
/** บันทึกข้อมูล */
|
||||
function onSubmit() {
|
||||
const url = id.value
|
||||
? config.API.kpiRoleMainList + `/${id.value}`
|
||||
? config.API.kpiRoleMainEdit + `/${id.value}`
|
||||
: config.API.kpiRoleMainList;
|
||||
|
||||
const body = {
|
||||
|
|
@ -177,7 +177,7 @@ function onSubmit() {
|
|||
function getDetail() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiRoleMainList + `/${id.value}`)
|
||||
.get(config.API.kpiRoleMainEdit + `/${id.value}`)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
form.position = data.position;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ async function fetchList() {
|
|||
await http
|
||||
.get(
|
||||
config.API.kpiCapacity +
|
||||
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyTypeVal}`
|
||||
`/edit?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyTypeVal}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
total.value = res.data.result.total;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const formData = reactive({
|
|||
function fetchDetail() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.kpiCapacity + `/${competencyId.value}`)
|
||||
.get(config.API.kpiCapacity + `/edit/${competencyId.value}`)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formData.competencyType = data.type;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue