update 优化 整体代码结构
This commit is contained in:
parent
73df6a1b30
commit
f3195be732
@ -30,7 +30,7 @@ module.exports = {
|
||||
extendDefaults: true,
|
||||
types: {
|
||||
'{}': false,
|
||||
'Function': false
|
||||
Function: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -43,7 +43,6 @@ export interface ClientVO {
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ClientForm extends BaseEntity {
|
||||
@ -91,7 +90,6 @@ export interface ClientForm extends BaseEntity {
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ClientQuery extends PageQuery {
|
||||
@ -134,5 +132,4 @@ export interface ClientQuery extends PageQuery {
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => {
|
||||
*/
|
||||
export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: "/system/user/list/dept/" + deptId,
|
||||
method: "get"
|
||||
url: '/system/user/list/dept/' + deptId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ export const updateGenTable = (data: DbTableForm) => {
|
||||
};
|
||||
|
||||
// 导入表
|
||||
export const importTable = (data: { tables: string, dataName: string }) => {
|
||||
export const importTable = (data: { tables: string; dataName: string }) => {
|
||||
return request({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
|
@ -78,8 +78,6 @@
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// refine element ui upload
|
||||
.upload-container {
|
||||
.el-upload {
|
||||
|
@ -26,7 +26,8 @@ html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html.dark .svg-icon, html.dark svg {
|
||||
html.dark .svg-icon,
|
||||
html.dark svg {
|
||||
fill: var(--el-text-color-regular);
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
const props = defineProps({
|
||||
formJson: {
|
||||
type: [String, Object],
|
||||
default: {}
|
||||
default: ""
|
||||
},
|
||||
formData: {
|
||||
type: [String, Object],
|
||||
default: {}
|
||||
default: ""
|
||||
},
|
||||
isView: {
|
||||
type: Boolean,
|
||||
|
@ -3,7 +3,7 @@ import FileSaver from 'file-saver';
|
||||
import errorCode from '@/utils/errorCode';
|
||||
import { blobValidate } from '@/utils/ruoyi';
|
||||
import { LoadingInstance } from 'element-plus/es/components/loading/src/loading';
|
||||
import { globalHeaders } from "@/utils/request";
|
||||
import { globalHeaders } from '@/utils/request';
|
||||
|
||||
const baseURL = import.meta.env.VITE_APP_BASE_API;
|
||||
let downloadLoadingInstance: LoadingInstance;
|
||||
@ -16,7 +16,7 @@ export default {
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: globalHeaders(),
|
||||
headers: globalHeaders()
|
||||
});
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: globalHeaders(),
|
||||
headers: globalHeaders()
|
||||
});
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
|
@ -181,5 +181,4 @@ const router = createRouter({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
export default router;
|
||||
|
@ -16,10 +16,10 @@ let downloadLoadingInstance: LoadingInstance;
|
||||
export const isRelogin = { show: false };
|
||||
export const globalHeaders = () => {
|
||||
return {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
Authorization: 'Bearer ' + getToken(),
|
||||
clientid: import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
|
@ -68,7 +68,7 @@ export const validAlphabets = (str: string) => {
|
||||
*/
|
||||
export const validEmail = (email: string) => {
|
||||
const reg =
|
||||
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
/^(([^<>()\]\\.,;:\s@"]+(\.[^<>()\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return reg.test(email);
|
||||
};
|
||||
|
||||
|
@ -299,7 +299,6 @@
|
||||
<script setup name="User" lang="ts">
|
||||
import api from "@/api/system/user"
|
||||
import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { treeselect } from "@/api/system/dept";
|
||||
import { DeptVO } from "@/api/system/dept/types";
|
||||
import { RoleVO } from "@/api/system/role/types";
|
||||
|
@ -9,6 +9,6 @@ export default () => {
|
||||
'panel-title':
|
||||
'pb-[5px] font-sans leading-[1.1] font-medium text-base text-[#6379bb] border-b border-b-solid border-[var(--el-border-color-light)] mb-5 mt-0'
|
||||
},
|
||||
hmrTopLevelAwait: false, // unocss默认是true,低版本浏览器是不支持的,启动后会报错
|
||||
hmrTopLevelAwait: false // unocss默认是true,低版本浏览器是不支持的,启动后会报错
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user