fix : 修复用户管理,角色管理提交时, 一直loading的bug

This commit is contained in:
2024-08-18 11:11:08 +08:00
parent b6b1c8a3ff
commit ce2d39e3bf
3 changed files with 91 additions and 84 deletions

View File

@@ -214,7 +214,10 @@ const checkBoxChange = (val) => {
const handleSubmit = async () => { const handleSubmit = async () => {
const loading = ElLoading.service({fullscreen: true}) const loading = ElLoading.service({fullscreen: true})
const { isValidate } = await form.value.validate() const { isValidate } = await form.value.validate()
if(!isValidate) return Promise.reject() if(!isValidate){
loading.close()
return Promise.reject()
}
const values = form.value.getValues() const values = form.value.getValues()
values.menuIds = checkChange() values.menuIds = checkChange()
operate(values).then(res=>{ operate(values).then(res=>{

View File

@@ -268,7 +268,10 @@ const getInfo = async () => {
const handleSubmit = async () => { const handleSubmit = async () => {
const loading = ElLoading.service({fullscreen: true}) const loading = ElLoading.service({fullscreen: true})
const {isValidate} = await form.value.validate() const {isValidate} = await form.value.validate()
if (!isValidate) return Promise.reject() if (!isValidate) {
loading.close()
return Promise.reject()
}
const values = form.value.getValues() const values = form.value.getValues()
operate(values, route.query.userType).then(res => { operate(values, route.query.userType).then(res => {
ElNotification({ ElNotification({

View File

@@ -69,32 +69,33 @@ export default defineConfig({
open: true, open: true,
proxy: { proxy: {
// '/api/workflow': { // '/api/workflow': {
// // target: 'http://frp.feashow.cn:31800/', // target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/', // // target: 'http://clay.frp.feashow.cn/',
// // target: 'http://192.168.31.175:8000', // // target: 'http://192.168.31.175:8000',
// changeOrigin: true, // changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '') // rewrite: (path) => path.replace(/^\/api/, '')
// }, // },
// '/api/admin': { // '/api/admin': {
// // target: 'http://frp.feashow.cn:31800/', // target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/', // // target: 'http://clay.frp.feashow.cn/',
// // target: 'http://192.168.31.175:8000', // // target: 'http://192.168.31.175:8000',
// changeOrigin: true, // changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '') // rewrite: (path) => path.replace(/^\/api/, '')
// }, // },
'/api': { '/api': {
// target: 'http://mosr.feashow.cn',
// target: 'http://kyglweb.scgzjy.com:8080/', // target: 'http://kyglweb.scgzjy.com:8080/',
target: 'http://clay.frp.feashow.cn/', target: 'http://mosr.feashow.cn',
// target: 'http://10.7.127.57:8000',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '') // target: 'http://clay.frp.feashow.cn',
// target: 'http://frp.feashow.cn:31800/',
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
}, },
'/api/notice-ws': { // '/api/notice-ws': {
target: 'ws://mosr.feashow.cn/api/notice-ws', // target: 'ws://mosr.feashow.cn/summary/notice-ws',
ws: true, // ws: true,
changeOrigin: true, // changeOrigin: true,
} // }
} }
} }
}) })