Merge branch 'master' of https://gitee.com/youlaiorg/vue3-element-admin into feature/noticews
This commit is contained in:
@@ -134,8 +134,8 @@ export default defineMock([
|
||||
|
||||
// 重置密码
|
||||
{
|
||||
url: "users/:userId/password",
|
||||
method: ["PATCH"],
|
||||
url: "users/:userId/password/reset",
|
||||
method: ["PUT"],
|
||||
body({ query }) {
|
||||
return {
|
||||
code: "00000",
|
||||
@@ -156,6 +156,51 @@ export default defineMock([
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
url: "users/profile",
|
||||
method: ["GET"],
|
||||
body: {
|
||||
code: "00000",
|
||||
data: {
|
||||
id: 2,
|
||||
username: "admin",
|
||||
nickname: "系统管理员",
|
||||
avatar:
|
||||
"https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif",
|
||||
gender: 1,
|
||||
mobile: "17621210366",
|
||||
email: null,
|
||||
deptName: "有来技术",
|
||||
roleNames: "系统管理员",
|
||||
createTime: "2019-10-10",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
url: "users/profile",
|
||||
method: ["PUT"],
|
||||
body({ query }) {
|
||||
return {
|
||||
code: "00000",
|
||||
data: null,
|
||||
msg: "修改个人信息成功",
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
url: "users/password",
|
||||
method: ["PUT"],
|
||||
body({ query }) {
|
||||
return {
|
||||
code: "00000",
|
||||
data: null,
|
||||
msg: "修改密码成功",
|
||||
};
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
// 用户映射表数据
|
||||
|
||||
47
package.json
47
package.json
@@ -45,16 +45,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@stomp/stompjs": "^7.0.0",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "5.1.10",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.7.4",
|
||||
"axios": "^1.7.7",
|
||||
"codemirror": "^5.65.17",
|
||||
"codemirror-editor-vue3": "^2.7.0",
|
||||
"color": "^4.2.3",
|
||||
"echarts": "^5.5.1",
|
||||
"element-plus": "^2.8.0",
|
||||
"element-plus": "^2.8.1",
|
||||
"exceljs": "^4.4.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nprogress": "^0.2.0",
|
||||
@@ -62,45 +63,44 @@
|
||||
"path-to-regexp": "^6.2.2",
|
||||
"pinia": "^2.2.2",
|
||||
"qs": "^6.13.0",
|
||||
"sortablejs": "^1.15.2",
|
||||
"@stomp/stompjs": "^7.0.0",
|
||||
"vue": "^3.4.38",
|
||||
"sortablejs": "^1.15.3",
|
||||
"vue": "^3.5.1",
|
||||
"vue-i18n": "9.9.1",
|
||||
"vue-router": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^18.6.1",
|
||||
"@commitlint/config-conventional": "^18.6.3",
|
||||
"@iconify-json/ep": "^1.1.16",
|
||||
"@iconify-json/ep": "^1.2.0",
|
||||
"@types/codemirror": "^5.60.15",
|
||||
"@types/color": "^3.0.6",
|
||||
"@types/lodash": "^4.17.7",
|
||||
"@types/node": "^20.14.15",
|
||||
"@types/node": "^20.16.5",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.2",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qs": "^6.9.15",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"@vitejs/plugin-vue": "^5.1.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"commitizen": "^4.3.0",
|
||||
"cz-git": "^1.9.4",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-import": "^2.30.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-vue": "^9.27.0",
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"husky": "^9.1.4",
|
||||
"lint-staged": "^15.2.9",
|
||||
"postcss": "^8.4.41",
|
||||
"husky": "^9.1.5",
|
||||
"lint-staged": "^15.2.10",
|
||||
"postcss": "^8.4.45",
|
||||
"postcss-html": "^1.7.0",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.3.3",
|
||||
"sass": "^1.77.8",
|
||||
"stylelint": "^16.8.2",
|
||||
"sass": "^1.78.0",
|
||||
"stylelint": "^16.9.0",
|
||||
"stylelint-config-html": "^1.1.0",
|
||||
"stylelint-config-recess-order": "^4.6.0",
|
||||
"stylelint-config-recommended-scss": "^14.1.0",
|
||||
@@ -112,16 +112,17 @@
|
||||
"unplugin-auto-import": "^0.17.8",
|
||||
"unplugin-icons": "^0.18.5",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.4.1",
|
||||
"vite": "^5.4.3",
|
||||
"vite-plugin-mock-dev-server": "^1.7.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-vue-devtools": "^7.3.8",
|
||||
"vue-tsc": "^2.0.29"
|
||||
"vite-plugin-vue-devtools": "^7.4.4",
|
||||
"vue-tsc": "^2.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.0.0 || ^20.7.0",
|
||||
"pnpm": ">=9"
|
||||
},
|
||||
"repository": "https://gitee.com/youlaiorg/vue3-element-admin.git",
|
||||
"author": "有来开源组织",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -77,7 +77,7 @@ class UserAPI {
|
||||
*/
|
||||
static resetPassword(id: number, password: string) {
|
||||
return request({
|
||||
url: `${USER_BASE_URL}/${id}/password`,
|
||||
url: `${USER_BASE_URL}/${id}/password/reset`,
|
||||
method: "put",
|
||||
params: { password: password },
|
||||
});
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
@@ -147,6 +147,11 @@ interface SearchItem {
|
||||
}
|
||||
}
|
||||
|
||||
.search-content {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.search-space {
|
||||
padding: 20px;
|
||||
color: #999;
|
||||
|
||||
@@ -96,7 +96,7 @@ function changeLayout(layout: string) {
|
||||
/** 重新激活顶部菜单 */
|
||||
function againActiveTop(newVal: string) {
|
||||
const parent = findOutermostParent(permissionStore.routes, newVal);
|
||||
if (appStore.activeTopMenu !== parent.path) {
|
||||
if (appStore.activeTopMenuPath !== parent.path) {
|
||||
appStore.activeTopMenu(parent.path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,15 +97,16 @@
|
||||
v-show="active == 0"
|
||||
:model="genConfigFormData"
|
||||
:label-width="100"
|
||||
:rules="genConfigFormRules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="表名">
|
||||
<el-form-item label="表名" prop="tableName">
|
||||
<el-input v-model="genConfigFormData.tableName" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="业务名">
|
||||
<el-form-item label="业务名" prop="businessName">
|
||||
<el-input
|
||||
v-model="genConfigFormData.businessName"
|
||||
placeholder="用户"
|
||||
@@ -116,18 +117,18 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="模块名">
|
||||
<el-form-item label="包名" prop="packageName">
|
||||
<el-input
|
||||
v-model="genConfigFormData.moduleName"
|
||||
placeholder="system"
|
||||
v-model="genConfigFormData.packageName"
|
||||
placeholder="com.youlai.boot"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="包名">
|
||||
<el-form-item label="模块名" prop="moduleName">
|
||||
<el-input
|
||||
v-model="genConfigFormData.packageName"
|
||||
placeholder="com.youlai.boot"
|
||||
v-model="genConfigFormData.moduleName"
|
||||
placeholder="system"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -135,7 +136,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实体名">
|
||||
<el-form-item label="实体名" prop="entityName">
|
||||
<el-input
|
||||
v-model="genConfigFormData.entityName"
|
||||
placeholder="User"
|
||||
@@ -154,7 +155,23 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上级菜单">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<div class="flex-y-between">
|
||||
<span>上级菜单</span>
|
||||
<el-tooltip effect="dark">
|
||||
<template #content>
|
||||
选择上级菜单,生成代码后会自动创建对应菜单。
|
||||
<br />
|
||||
注意1:生成菜单后需分配权限给角色,否则菜单将无法显示。
|
||||
<br />
|
||||
注意2:演示环境默认不生成菜单,如需生成,请在本地部署数据库。
|
||||
</template>
|
||||
<i-ep-QuestionFilled class="cursor-pointer" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-tree-select
|
||||
v-model="genConfigFormData.parentMenuId"
|
||||
placeholder="选择上级菜单"
|
||||
@@ -435,6 +452,13 @@ import GeneratorAPI, {
|
||||
import DictAPI from "@/api/dict";
|
||||
import MenuAPI from "@/api/menu";
|
||||
|
||||
interface TreeNode {
|
||||
label: string;
|
||||
content?: string;
|
||||
children?: TreeNode[];
|
||||
}
|
||||
const treeData = ref<TreeNode[]>([]);
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
const queryParams = reactive<TablePageQuery>({
|
||||
pageNum: 1,
|
||||
@@ -455,6 +479,14 @@ const genConfigFormData = ref<GenConfigForm>({
|
||||
fieldConfigs: [],
|
||||
});
|
||||
|
||||
const genConfigFormRules = {
|
||||
tableName: [{ required: true, message: "请输入表名", trigger: "blur" }],
|
||||
businessName: [{ required: true, message: "请输入业务名", trigger: "blur" }],
|
||||
packageName: [{ required: true, message: "请输入包名", trigger: "blur" }],
|
||||
moduleName: [{ required: true, message: "请输入模块名", trigger: "blur" }],
|
||||
entityName: [{ required: true, message: "请输入实体名", trigger: "blur" }],
|
||||
};
|
||||
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: "",
|
||||
@@ -473,12 +505,12 @@ const active = ref(0);
|
||||
const currentTableName = ref("");
|
||||
const sortFlag = ref<Object>();
|
||||
|
||||
interface TreeNode {
|
||||
label: string;
|
||||
content?: string;
|
||||
children?: TreeNode[];
|
||||
}
|
||||
const treeData = ref<TreeNode[]>([]);
|
||||
// 查询是否全选
|
||||
const isCheckAllQuery = ref(false);
|
||||
// 列表是否全选
|
||||
const isCheckAllList = ref(false);
|
||||
// 表单是否全选
|
||||
const isCheckAllForm = ref(false);
|
||||
|
||||
watch(active, (val) => {
|
||||
if (val === 0) {
|
||||
@@ -550,6 +582,7 @@ const setNodeSort = (oldIndex: number, newIndex: number) => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 上一步 */
|
||||
function handlePrevClick() {
|
||||
if (active.value === 2) {
|
||||
//这里需要重新获取一次数据,如果第一次生成代码后,再次点击上一步,数据不重新获取,再次点击下一步,会再次插入数据,导致索引重复报错
|
||||
@@ -571,6 +604,7 @@ function handlePrevClick() {
|
||||
if (active.value-- <= 0) active.value = 0;
|
||||
}
|
||||
|
||||
/** 下一步 */
|
||||
function handleNextClick() {
|
||||
if (active.value === 0) {
|
||||
initSort();
|
||||
@@ -680,6 +714,7 @@ function handleResetConfig(tableName: string) {
|
||||
|
||||
type FieldConfigKey = "isShowInQuery" | "isShowInList" | "isShowInForm";
|
||||
|
||||
/** 全选 */
|
||||
const toggleCheckAll = (key: FieldConfigKey, value: boolean) => {
|
||||
const fieldConfigs = genConfigFormData.value?.fieldConfigs;
|
||||
|
||||
@@ -690,10 +725,6 @@ const toggleCheckAll = (key: FieldConfigKey, value: boolean) => {
|
||||
}
|
||||
};
|
||||
|
||||
const isCheckAllQuery = ref(false);
|
||||
const isCheckAllList = ref(false);
|
||||
const isCheckAllForm = ref(false);
|
||||
|
||||
const checkAllSelected = (key: keyof FieldConfig, isCheckAllRef: any) => {
|
||||
const fieldConfigs = genConfigFormData.value?.fieldConfigs || [];
|
||||
isCheckAllRef.value = fieldConfigs.every(
|
||||
@@ -740,7 +771,6 @@ function buildTree(
|
||||
const parts = item.path.split(separator);
|
||||
|
||||
// 定义特殊路径
|
||||
// TODO: 如果菜单有多个节点,需要将此菜单作为独立一级的节点,而不是合并到上一级。 按照此规则, com.youlai.system 则是三个节点,而不是合并到一起,但是这里需要将 com.youlai.system 合并到一起,所以需要特殊处理
|
||||
const specialPaths = [
|
||||
"src" + separator + "main",
|
||||
"java",
|
||||
@@ -753,8 +783,6 @@ function buildTree(
|
||||
).replace(/\./g, separator),
|
||||
];
|
||||
|
||||
console.log("specialPaths", specialPaths);
|
||||
|
||||
// 检查路径中的特殊部分并合并它们
|
||||
const mergedParts: string[] = [];
|
||||
let buffer: string[] = [];
|
||||
|
||||
@@ -208,7 +208,8 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
"element-plus/es/components/steps/style/css",
|
||||
"element-plus/es/components/step/style/css",
|
||||
"element-plus/es/components/avatar/style/css",
|
||||
"sockjs-client/dist/sockjs.min.js",
|
||||
"element-plus/es/components/descriptions/style/css",
|
||||
"element-plus/es/components/descriptions-item/style/css",
|
||||
],
|
||||
},
|
||||
// 构建配置
|
||||
|
||||
Reference in New Issue
Block a user