|
|
|
|
@ -101,7 +101,7 @@
|
|
|
|
|
import { request } from '../util/axios_config' |
|
|
|
|
import { onMounted, ref } from 'vue'; |
|
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
|
|
|
|
|
|
const { VITE_API_URL } = process.env; |
|
|
|
|
const loading = ref(true); |
|
|
|
|
const form = ref({ |
|
|
|
|
date: '', |
|
|
|
|
@ -126,8 +126,9 @@ const pageData = ref({
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const getData = (data) => { |
|
|
|
|
const url = VITE_API_URL +'/user/list-submit' |
|
|
|
|
request({ |
|
|
|
|
url: 'api/user/list-submit', |
|
|
|
|
url: url, |
|
|
|
|
method: 'POST', |
|
|
|
|
data: data, |
|
|
|
|
headers: { 'Content-Type': 'application/json' } |
|
|
|
|
@ -159,8 +160,9 @@ const flexColumnWidth = (label, prop) => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleDelete = (index) => { |
|
|
|
|
const url = VITE_API_URL +'/user/delete-user' |
|
|
|
|
request({ |
|
|
|
|
url: 'api/user/delete-user', |
|
|
|
|
url: url, |
|
|
|
|
method: 'POST', |
|
|
|
|
data: { id: tableData.value[index - 1].id }, |
|
|
|
|
}).then(function (response) { |
|
|
|
|
@ -220,8 +222,9 @@ const newUser = ref(false)
|
|
|
|
|
const submitNewUser = () => { |
|
|
|
|
const requestData = newForm.value |
|
|
|
|
const data = JSON.stringify(requestData) |
|
|
|
|
const url = VITE_API_URL +'/user/add-user' |
|
|
|
|
request({ |
|
|
|
|
url: 'api/user/add-user', |
|
|
|
|
url: url, |
|
|
|
|
method: 'POST', |
|
|
|
|
data: data, |
|
|
|
|
headers: { 'Content-Type': 'application/json' } |
|
|
|
|
|