update 优化 整体代码结构
This commit is contained in:
parent
73df6a1b30
commit
f3195be732
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
extendDefaults: true,
|
extendDefaults: true,
|
||||||
types: {
|
types: {
|
||||||
'{}': false,
|
'{}': false,
|
||||||
'Function': false
|
Function: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -2,45 +2,45 @@
|
|||||||
* 代码格式化配置
|
* 代码格式化配置
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 一行最多多少个字符
|
// 一行最多多少个字符
|
||||||
printWidth: 150,
|
printWidth: 150,
|
||||||
// 指定每个缩进级别的空格数
|
// 指定每个缩进级别的空格数
|
||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
// 使用制表符而不是空格缩进行
|
// 使用制表符而不是空格缩进行
|
||||||
useTabs: false,
|
useTabs: false,
|
||||||
// 在语句末尾是否需要分号
|
// 在语句末尾是否需要分号
|
||||||
semi: true,
|
semi: true,
|
||||||
// 是否使用单引号
|
// 是否使用单引号
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
||||||
quoteProps: 'as-needed',
|
quoteProps: 'as-needed',
|
||||||
// 在JSX中使用单引号而不是双引号
|
// 在JSX中使用单引号而不是双引号
|
||||||
jsxSingleQuote: false,
|
jsxSingleQuote: false,
|
||||||
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
||||||
trailingComma: 'none',
|
trailingComma: 'none',
|
||||||
// 在对象文字中的括号之间打印空格
|
// 在对象文字中的括号之间打印空格
|
||||||
bracketSpacing: true,
|
bracketSpacing: true,
|
||||||
// jsx 标签的反尖括号需要换行
|
// jsx 标签的反尖括号需要换行
|
||||||
jsxBracketSameLine: false,
|
jsxBracketSameLine: false,
|
||||||
embeddedLanguageFormatting: 'off',
|
embeddedLanguageFormatting: 'off',
|
||||||
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
||||||
arrowParens: 'always',
|
arrowParens: 'always',
|
||||||
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
||||||
rangeStart: 0,
|
rangeStart: 0,
|
||||||
rangeEnd: Infinity,
|
rangeEnd: Infinity,
|
||||||
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
||||||
requirePragma: false,
|
requirePragma: false,
|
||||||
// 不需要自动在文件开头插入 @prettier
|
// 不需要自动在文件开头插入 @prettier
|
||||||
insertPragma: false,
|
insertPragma: false,
|
||||||
// 使用默认的折行标准 always\never\preserve
|
// 使用默认的折行标准 always\never\preserve
|
||||||
proseWrap: 'preserve',
|
proseWrap: 'preserve',
|
||||||
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
||||||
htmlWhitespaceSensitivity: 'css',
|
htmlWhitespaceSensitivity: 'css',
|
||||||
// Vue文件脚本和样式标签缩进
|
// Vue文件脚本和样式标签缩进
|
||||||
vueIndentScriptAndStyle: false,
|
vueIndentScriptAndStyle: false,
|
||||||
// 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF),
|
// 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF),
|
||||||
// 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。
|
// 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。
|
||||||
// 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾
|
// 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾
|
||||||
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
||||||
endOfLine: 'auto'
|
endOfLine: 'auto'
|
||||||
};
|
};
|
||||||
|
@ -43,7 +43,6 @@ export interface ClientVO {
|
|||||||
* 状态(0正常 1停用)
|
* 状态(0正常 1停用)
|
||||||
*/
|
*/
|
||||||
status: string;
|
status: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ClientForm extends BaseEntity {
|
export interface ClientForm extends BaseEntity {
|
||||||
@ -91,7 +90,6 @@ export interface ClientForm extends BaseEntity {
|
|||||||
* 状态(0正常 1停用)
|
* 状态(0正常 1停用)
|
||||||
*/
|
*/
|
||||||
status?: string;
|
status?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ClientQuery extends PageQuery {
|
export interface ClientQuery extends PageQuery {
|
||||||
@ -134,5 +132,4 @@ export interface ClientQuery extends PageQuery {
|
|||||||
* 状态(0正常 1停用)
|
* 状态(0正常 1停用)
|
||||||
*/
|
*/
|
||||||
status?: string;
|
status?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -175,8 +175,8 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => {
|
|||||||
*/
|
*/
|
||||||
export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]> => {
|
export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: "/system/user/list/dept/" + deptId,
|
url: '/system/user/list/dept/' + deptId,
|
||||||
method: "get"
|
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({
|
return request({
|
||||||
url: '/tool/gen/importTable',
|
url: '/tool/gen/importTable',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -83,4 +83,4 @@ export const getDataNames = () => {
|
|||||||
url: '/tool/gen/getDataNames',
|
url: '/tool/gen/getDataNames',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -78,8 +78,6 @@
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// refine element ui upload
|
// refine element ui upload
|
||||||
.upload-container {
|
.upload-container {
|
||||||
.el-upload {
|
.el-upload {
|
||||||
@ -109,10 +107,10 @@
|
|||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow {
|
.el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dropdown .el-dropdown-link {
|
.el-dropdown .el-dropdown-link {
|
||||||
color: var(--el-color-primary) !important;
|
color: var(--el-color-primary) !important;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@ html {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.dark .svg-icon, html.dark svg {
|
html.dark .svg-icon,
|
||||||
|
html.dark svg {
|
||||||
fill: var(--el-text-color-regular);
|
fill: var(--el-text-color-regular);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formJson: {
|
formJson: {
|
||||||
type: [String, Object],
|
type: [String, Object],
|
||||||
default: {}
|
default: ""
|
||||||
},
|
},
|
||||||
formData: {
|
formData: {
|
||||||
type: [String, Object],
|
type: [String, Object],
|
||||||
default: {}
|
default: ""
|
||||||
},
|
},
|
||||||
isView: {
|
isView: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -15,4 +15,4 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const height = ref(document.documentElement.clientHeight - 94.5 + "px");
|
const height = ref(document.documentElement.clientHeight - 94.5 + "px");
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,7 +3,7 @@ import FileSaver from 'file-saver';
|
|||||||
import errorCode from '@/utils/errorCode';
|
import errorCode from '@/utils/errorCode';
|
||||||
import { blobValidate } from '@/utils/ruoyi';
|
import { blobValidate } from '@/utils/ruoyi';
|
||||||
import { LoadingInstance } from 'element-plus/es/components/loading/src/loading';
|
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;
|
const baseURL = import.meta.env.VITE_APP_BASE_API;
|
||||||
let downloadLoadingInstance: LoadingInstance;
|
let downloadLoadingInstance: LoadingInstance;
|
||||||
@ -16,7 +16,7 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: url,
|
url: url,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: globalHeaders(),
|
headers: globalHeaders()
|
||||||
});
|
});
|
||||||
const isBlob = blobValidate(res.data);
|
const isBlob = blobValidate(res.data);
|
||||||
if (isBlob) {
|
if (isBlob) {
|
||||||
@ -40,7 +40,7 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: url,
|
url: url,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: globalHeaders(),
|
headers: globalHeaders()
|
||||||
});
|
});
|
||||||
const isBlob = blobValidate(res.data);
|
const isBlob = blobValidate(res.data);
|
||||||
if (isBlob) {
|
if (isBlob) {
|
||||||
|
@ -181,5 +181,4 @@ const router = createRouter({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
@ -16,10 +16,10 @@ let downloadLoadingInstance: LoadingInstance;
|
|||||||
export const isRelogin = { show: false };
|
export const isRelogin = { show: false };
|
||||||
export const globalHeaders = () => {
|
export const globalHeaders = () => {
|
||||||
return {
|
return {
|
||||||
Authorization: "Bearer " + getToken(),
|
Authorization: 'Bearer ' + getToken(),
|
||||||
clientid: import.meta.env.VITE_APP_CLIENT_ID
|
clientid: import.meta.env.VITE_APP_CLIENT_ID
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||||
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
|
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) => {
|
export const validEmail = (email: string) => {
|
||||||
const reg =
|
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);
|
return reg.test(email);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
<el-form-item label="部门状态">
|
<el-form-item label="部门状态">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -299,7 +299,6 @@
|
|||||||
<script setup name="User" lang="ts">
|
<script setup name="User" lang="ts">
|
||||||
import api from "@/api/system/user"
|
import api from "@/api/system/user"
|
||||||
import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
|
import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
|
||||||
import { getToken } from "@/utils/auth";
|
|
||||||
import { treeselect } from "@/api/system/dept";
|
import { treeselect } from "@/api/system/dept";
|
||||||
import { DeptVO } from "@/api/system/dept/types";
|
import { DeptVO } from "@/api/system/dept/types";
|
||||||
import { RoleVO } from "@/api/system/role/types";
|
import { RoleVO } from "@/api/system/role/types";
|
||||||
|
@ -9,6 +9,6 @@ export default () => {
|
|||||||
'panel-title':
|
'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'
|
'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