From a0bcdf0cde10fd94f03a127138b1af0f8ee2f2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 20 Apr 2023 18:02:36 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20oss=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E9=A1=B5=E9=9D=A2=E6=9D=83=E9=99=90=E6=A0=87?= =?UTF-8?q?=E8=AF=86=E7=AC=A6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.ts b/src/router/index.ts index bbfc448..9540ab2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -134,7 +134,7 @@ export const dynamicRoutes: RouteOption[] = [ path: '/system/oss-config', component: Layout, hidden: true, - permissions: ['monitor:job:list'], + permissions: ['system:oss:list'], children: [ { path: 'index', From 61417032b79f99ecb462f7f7f2263c2d98d1b558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 20 Apr 2023 18:45:29 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E8=8F=9C=E5=8D=95=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/gen/editTable.vue | 79 +++++++++++++++--------------- src/views/tool/gen/genInfoForm.vue | 69 +++++++++++++------------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue index eb11b88..15e6edd 100644 --- a/src/views/tool/gen/editTable.vue +++ b/src/views/tool/gen/editTable.vue @@ -136,54 +136,53 @@ const genInfo = ref(genInfoForm); /** 提交按钮 */ const submitForm = () => { - const basicForm = basicInfo.value.$refs.basicInfoForm; - const genForm = genInfo.value.$refs.genInfoForm; + const basicForm = basicInfo.value.$refs.basicInfoForm; + const genForm = genInfo.value.$refs.genInfoForm; - Promise.all([basicForm, genForm].map(getFormPromise)).then(async res => { - const validateResult = res.every(item => !!item); - if (validateResult) { - const genTable: any = Object.assign({}, info.value); - genTable.columns = columns.value; - genTable.params = { - treeCode: info.value?.treeCode, - treeName: info.value.treeName, - treeParentCode: info.value.treeParentCode, - parentMenuId: info.value.parentMenuId - }; - const response = await updateGenTable(genTable); - proxy?.$modal.msgSuccess(response.msg); - if (response.code === 200) { - close(); - } - } else { - proxy?.$modal.msgError("表单校验未通过,请重新检查提交内容"); - } - }); + Promise.all([basicForm, genForm].map(getFormPromise)).then(async res => { + const validateResult = res.every(item => !!item); + if (validateResult) { + const genTable: any = Object.assign({}, info.value); + genTable.columns = columns.value; + genTable.params = { + treeCode: info.value?.treeCode, + treeName: info.value.treeName, + treeParentCode: info.value.treeParentCode, + parentMenuId: info.value.parentMenuId + }; + const response = await updateGenTable(genTable); + proxy?.$modal.msgSuccess(response.msg); + if (response.code === 200) { + close(); + } + } else { + proxy?.$modal.msgError("表单校验未通过,请重新检查提交内容"); + } + }); } const getFormPromise = (form: any) => { - return new Promise(resolve => { - form.validate((res: any) => { - resolve(res); - }); + return new Promise(resolve => { + form.validate((res: any) => { + resolve(res); }); + }); } const close = () => { - const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } }; - proxy?.$tab.closeOpenPage(obj); + const obj = {path: "/tool/gen", query: {t: Date.now(), pageNum: route.query.pageNum}}; + proxy?.$tab.closeOpenPage(obj); } (async () => { - const tableId = route.params && route.params.tableId as string; - if (tableId) { - // 获取表详细信息 - const res = await getGenTable(tableId); - res.data.info.parentMenuId = Number(res.data.info.parentMenuId); - columns.value = res.data.rows; - info.value = res.data.info; - tables.value = res.data.tables; - /** 查询字典下拉列表 */ - const response = await getDictOptionselect(); - dictOptions.value = response.data; - } + const tableId = route.params && route.params.tableId as string; + if (tableId) { + // 获取表详细信息 + const res = await getGenTable(tableId); + columns.value = res.data.rows; + info.value = res.data.info; + tables.value = res.data.tables; + /** 查询字典下拉列表 */ + const response = await getDictOptionselect(); + dictOptions.value = response.data; + } })(); diff --git a/src/views/tool/gen/genInfoForm.vue b/src/views/tool/gen/genInfoForm.vue index 54a9a19..ab6e714 100644 --- a/src/views/tool/gen/genInfoForm.vue +++ b/src/views/tool/gen/genInfoForm.vue @@ -226,9 +226,9 @@ import { listMenu } from '@/api/system/menu'; import { ComponentInternalInstance, PropType } from 'vue'; interface MenuOptionsType { - menuId: number; - menuName: string; - children: MenuOptionsType[] | undefined; + menuId: number | string; + menuName: string; + children: MenuOptionsType[] | undefined; } const subColumns = ref([]); @@ -236,14 +236,14 @@ const menuOptions = ref>([]); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const props = defineProps({ - info: { - type: Object as PropType, - default: null - }, - tables: { - type: Array as PropType, - default: null - } + info: { + type: Object as PropType, + default: null + }, + tables: { + type: Array as PropType, + default: null + } }); const infoForm = computed(() => props.info); @@ -252,45 +252,46 @@ const table = computed(() => props.tables); // 表单校验 const rules = ref({ - tplCategory: [{ required: true, message: "请选择生成模板", trigger: "blur" }], - packageName: [{ required: true, message: "请输入生成包路径", trigger: "blur" }], - moduleName: [{ required: true, message: "请输入生成模块名", trigger: "blur" }], - businessName: [{ required: true, message: "请输入生成业务名", trigger: "blur" }], - functionName: [{ required: true, message: "请输入生成功能名", trigger: "blur" }] + tplCategory: [{required: true, message: "请选择生成模板", trigger: "blur"}], + packageName: [{required: true, message: "请输入生成包路径", trigger: "blur"}], + moduleName: [{required: true, message: "请输入生成模块名", trigger: "blur"}], + businessName: [{required: true, message: "请输入生成业务名", trigger: "blur"}], + functionName: [{required: true, message: "请输入生成功能名", trigger: "blur"}] }); const subSelectChange = () => { - infoForm.value.subTableFkName = ""; + infoForm.value.subTableFkName = ""; } const tplSelectChange = (value: string) => { - if (value !== "sub") { - infoForm.value.subTableName = ""; - infoForm.value.subTableFkName = ""; - } + if (value !== "sub") { + infoForm.value.subTableName = ""; + infoForm.value.subTableFkName = ""; + } } const setSubTableColumns = (value: string) => { - table.value.forEach(item => { - const name = item.tableName; - if (value === name) { - subColumns.value = item.columns; - return; - } - }) + table.value.forEach(item => { + const name = item.tableName; + if (value === name) { + subColumns.value = item.columns; + return; + } + }) } /** 查询菜单下拉树结构 */ const getMenuTreeselect = async () => { - const res = await listMenu(); - const data = proxy?.handleTree(res.data, "menuId"); + const res = await listMenu(); + res.data.forEach(m => m.menuId = m.menuId.toString()); + const data = proxy?.handleTree(res.data, "menuId"); if (data) { - menuOptions.value = data - } + menuOptions.value = data + } } watch(() => props.info.subTableName, val => { - setSubTableColumns(val); + setSubTableColumns(val); }); onMounted(() => { - getMenuTreeselect(); + getMenuTreeselect(); }) From 0ba7e31e0997be1110e2899c1e73dd457a96f92c Mon Sep 17 00:00:00 2001 From: LiuHao Date: Thu, 20 Apr 2023 22:57:33 +0800 Subject: [PATCH 03/12] =?UTF-8?q?fix=20=E9=83=A8=E9=97=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=B8=8A=E7=BA=A7=E8=8F=9C=E5=8D=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/dept/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 2f45839..fad48a3 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -229,7 +229,7 @@ const handleAdd = (row?: DeptVO) => { nextTick(() => { reset(); if (row && row.deptId) { - form.value.parentId = row?.parentId; + form.value.parentId = row?.deptId; } }) } From 5dda9da40d6bcbaa306837a0e6cbea352d9d2af5 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 21 Apr 2023 11:24:26 +0800 Subject: [PATCH 04/12] =?UTF-8?q?update=20=20=E5=8D=87=E7=BA=A7vite?= =?UTF-8?q?=E7=89=88=E6=9C=AC4.1.4->4.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f64123..b78f8fe 100644 --- a/package.json +++ b/package.json @@ -69,11 +69,11 @@ "unplugin-auto-import": "0.13.0", "unplugin-icons": "0.15.1", "unplugin-vue-components": "0.23.0", - "vite": "4.1.4", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", "vite-plugin-vue-setup-extend": "^0.4.0", "vitest": "^0.29.7", + "vite": "4.3.1", "vue-eslint-parser": "9.1.0", "vue-tsc": "0.35.0" } From b9dccb325f6e8e4d5dc4f65e1c9974b2a5f90c88 Mon Sep 17 00:00:00 2001 From: Yjoioooo <693337446@qq.com> Date: Tue, 25 Apr 2023 10:13:27 +0800 Subject: [PATCH 05/12] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9oss=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=B7=AF=E7=94=B1=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/oss/index.ts | 6 +++--- src/api/system/ossConfig/index.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/api/system/oss/index.ts b/src/api/system/oss/index.ts index 6821d4e..4472112 100644 --- a/src/api/system/oss/index.ts +++ b/src/api/system/oss/index.ts @@ -5,7 +5,7 @@ import { AxiosPromise } from 'axios'; // 查询OSS对象存储列表 export function listOss(query: OssQuery): AxiosPromise { return request({ - url: '/system/oss/list', + url: '/resource/oss/list', method: 'get', params: query }); @@ -14,7 +14,7 @@ export function listOss(query: OssQuery): AxiosPromise { // 查询OSS对象基于id串 export function listByIds(ossId: string | number): AxiosPromise { return request({ - url: '/system/oss/listByIds/' + ossId, + url: '/resource/oss/listByIds/' + ossId, method: 'get' }); } @@ -22,7 +22,7 @@ export function listByIds(ossId: string | number): AxiosPromise { // 删除OSS对象存储 export function delOss(ossId: string | number | Array) { return request({ - url: '/system/oss/' + ossId, + url: '/resource/oss/' + ossId, method: 'delete' }); } diff --git a/src/api/system/ossConfig/index.ts b/src/api/system/ossConfig/index.ts index b9ff537..d0faefe 100644 --- a/src/api/system/ossConfig/index.ts +++ b/src/api/system/ossConfig/index.ts @@ -5,7 +5,7 @@ import { AxiosPromise } from 'axios'; // 查询对象存储配置列表 export function listOssConfig(query: OssConfigQuery): AxiosPromise { return request({ - url: '/system/oss/config/list', + url: '/resource/oss/config/list', method: 'get', params: query }); @@ -14,7 +14,7 @@ export function listOssConfig(query: OssConfigQuery): AxiosPromise { return request({ - url: '/system/oss/config/' + ossConfigId, + url: '/resource/oss/config/' + ossConfigId, method: 'get' }); } @@ -22,7 +22,7 @@ export function getOssConfig(ossConfigId: string | number): AxiosPromise) { return request({ - url: '/system/oss/config/' + ossConfigId, + url: '/resource/oss/config/' + ossConfigId, method: 'delete' }); } @@ -53,7 +53,7 @@ export function changeOssConfigStatus(ossConfigId: string | number, status: stri configKey }; return request({ - url: '/system/oss/config/changeStatus', + url: '/resource/oss/config/changeStatus', method: 'put', data: data }); From 67864e67b33e2c320e7ac5c8d5db48ab8124e1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 26 Apr 2023 22:47:28 +0800 Subject: [PATCH 06/12] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20oss=20?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=BC=8F=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 2 +- src/components/FileUpload/index.vue | 2 +- src/components/ImageUpload/index.vue | 2 +- src/plugins/download.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index e250050..a0728eb 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -68,7 +68,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const upload = reactive({ headers: { Authorization: "Bearer " + getToken() }, - url: import.meta.env.VITE_APP_BASE_API + '/system/oss/upload' + url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }) const myQuillEditor = ref(); diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 9d8f742..a46d5ee 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -78,7 +78,7 @@ const number = ref(0); const uploadList = ref([]); const baseUrl = import.meta.env.VITE_APP_BASE_API; -const uploadFileUrl = ref(baseUrl + "/system/oss/upload"); // 上传文件服务器地址 +const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址 const headers = ref({ Authorization: "Bearer " + getToken() }); const fileList = ref([]); diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 57697fa..0791f3e 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -76,7 +76,7 @@ const dialogImageUrl = ref(""); const dialogVisible = ref(false); const baseUrl = import.meta.env.VITE_APP_BASE_API; -const uploadImgUrl = ref(baseUrl + "/system/oss/upload"); // 上传的图片服务器地址 +const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址 const headers = ref({ Authorization: "Bearer " + getToken() }); const fileList = ref([]); diff --git a/src/plugins/download.ts b/src/plugins/download.ts index 2640763..e1c4414 100644 --- a/src/plugins/download.ts +++ b/src/plugins/download.ts @@ -9,7 +9,7 @@ const baseURL = import.meta.env.VITE_APP_BASE_API; let downloadLoadingInstance: LoadingInstance; export default { async oss(ossId: string | number) { - const url = baseURL + '/system/oss/download/' + ossId; + const url = baseURL + '/resource/oss/download/' + ossId; downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); try { const res = await axios({ From 351eedacec20bf9c0bf047e344c77515395d7441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 28 Apr 2023 22:40:55 +0800 Subject: [PATCH 07/12] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=B8=8E=E7=94=A8=E6=88=B7=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/authUser.vue | 2 +- src/views/system/role/index.vue | 2 +- src/views/system/user/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/system/role/authUser.vue b/src/views/system/role/authUser.vue index 4b2bec8..ae4f73f 100644 --- a/src/views/system/role/authUser.vue +++ b/src/views/system/role/authUser.vue @@ -63,7 +63,7 @@ :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" - @pagination="handleQuery" + @pagination="getList" /> diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 48ed9c9..56c14c5 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -93,7 +93,7 @@ v-model:total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" - @pagination="handleQuery" + @pagination="getList" /> diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 33ca77a..63c2adf 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -138,7 +138,7 @@ :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" - @pagination="handleQuery" + @pagination="getList" /> From d192f73ca41c573718420c859711c0e6da05063d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 4 May 2023 19:48:40 +0800 Subject: [PATCH 08/12] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=87=BA=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=9A=90=E8=97=8F=E6=BB=9A=E5=8A=A8=E6=9D=A1=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/sidebar.scss | 2 +- src/layout/index.vue | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 4c2f3f1..1db15fa 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -1,6 +1,6 @@ #app { .main-container { - min-height: 100%; + height: 100%; transition: margin-left 0.28s; margin-left: $base-sidebar-width; position: relative; diff --git a/src/layout/index.vue b/src/layout/index.vue index 4c6ab94..d49de04 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,17 +1,17 @@ From 0e736c889f9cd3ca51c54becf81b6433549c4b78 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 5 May 2023 10:23:41 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=B8=8B=E6=8B=89=E5=9B=BE=E6=A0=87=E9=AB=98=E4=BA=AE?= =?UTF-8?q?=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IconSelect/index.vue | 45 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index 330c44f..22b9484 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -2,7 +2,7 @@
@@ -19,7 +19,7 @@
    -
  • +
  • @@ -33,15 +33,15 @@ import icons from '@/components/IconSelect/requireIcons'; const props = defineProps({ - modelValue: { - type: String, - require: true - }, - width: { - type: String, - require: false, - default: '400px' - } + modelValue: { + type: String, + require: true + }, + width: { + type: String, + require: false, + default: '400px' + } }); const emit = defineEmits(['update:modelValue']); @@ -55,22 +55,21 @@ const filterValue = ref(''); * 筛选图标 */ const filterIcons = () => { - if (filterValue.value) { - iconNames.value = icons.filter(iconName => - iconName.includes(filterValue.value) - ); - } else { - iconNames.value = icons; - } + if (filterValue.value) { + iconNames.value = icons.filter(iconName => + iconName.includes(filterValue.value) + ); + } else { + iconNames.value = icons; + } } - /** * 选择图标 * @param iconName 选择的图标名称 */ const selectedIcon = (iconName: string) => { - emit('update:modelValue', iconName); - visible.value = false; + emit('update:modelValue', iconName); + visible.value = false; } @@ -101,5 +100,9 @@ const selectedIcon = (iconName: string) => { transform: scaleX(1.1); } } + .active { + border-color: var(--el-color-primary); + color: var(--el-color-primary); + } } From ec29c057c4a283127fe5f09b7c4b52b5195e5ca1 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 5 May 2023 10:36:21 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AFTopNa?= =?UTF-8?q?v=E5=90=8E=E4=B8=80=E7=BA=A7=E8=8F=9C=E5=8D=95=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TopNav/index.vue | 10 ++++++++-- src/types/router.d.ts | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 79b7786..2092415 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -104,7 +104,7 @@ const setVisibleNumber = () => { visibleNumber.value = parseInt(String(width / 85)); } -const handleSelect = (key: string, keyPath: string[]) => { +const handleSelect = (key: string) => { currentIndex.value = key; const route = routers.value.find(item => item.path === key); if (isHttp(key)) { @@ -112,7 +112,13 @@ const handleSelect = (key: string, keyPath: string[]) => { window.open(key, "_blank"); } else if (!route || !route.children) { // 没有子路由路径内部打开 - router.push({ path: key, fullPath: '' }); + const routeMenu = childrenMenus.value.find(item => item.path === key); + if (routeMenu && routeMenu.query) { + let query = JSON.parse(routeMenu.query); + router.push({ path: key, query: query }); + } else { + router.push({ path: key }); + } appStore.toggleSideBarHide(true); } else { // 显示左侧联动菜单 diff --git a/src/types/router.d.ts b/src/types/router.d.ts index 0f2b026..b60b831 100644 --- a/src/types/router.d.ts +++ b/src/types/router.d.ts @@ -13,6 +13,7 @@ declare module 'vue-router' { title: string; icon: string; }; + query?: string; } & RouteRecordRaw; interface _RouteLocationBase { From 46e7d070a297fac1d9bf0a8cf2656484dd74f59c Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 5 May 2023 11:06:32 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=BF=BB=E9=A1=B5/?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E6=BB=9A=E5=8A=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/AppMain.vue | 22 +++++++++++ src/layout/components/TagsView/ScrollPane.vue | 2 +- src/layout/components/TagsView/index.vue | 2 +- src/layout/index.vue | 38 ++++++++----------- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 463224d..8a73232 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -56,3 +56,25 @@ watch(()=> useSettingsStore().animationEnable, (val) => { } } + diff --git a/src/layout/components/TagsView/ScrollPane.vue b/src/layout/components/TagsView/ScrollPane.vue index e4624dc..64d9fdb 100644 --- a/src/layout/components/TagsView/ScrollPane.vue +++ b/src/layout/components/TagsView/ScrollPane.vue @@ -96,7 +96,7 @@ defineExpose({ bottom: 0px; } :deep(.el-scrollbar__wrap) { - height: 49px; + height: 39px; } } diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 43b122f..cbf0a84 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -246,7 +246,7 @@ onMounted(() => { position: relative; cursor: pointer; height: 26px; - line-height: 26px; + line-height: 23px; border: 1px solid #d8dce5; color: #495060; background: #fff; diff --git a/src/layout/index.vue b/src/layout/index.vue index d49de04..5c01f90 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,16 +1,22 @@ @@ -54,17 +60,17 @@ const navbarRef = ref(Navbar); const settingRef = ref(Settings); onMounted(() => { - nextTick(() => { - navbarRef.value.initTenantList(); - }) + nextTick(() => { + navbarRef.value.initTenantList(); + }) }) const handleClickOutside = () => { - useAppStore().closeSideBar({ withoutAnimation: false }) + useAppStore().closeSideBar({ withoutAnimation: false }) } const setLayout = () => { - settingRef.value.openSetting(); + settingRef.value.openSetting(); } @@ -78,18 +84,6 @@ const setLayout = () => { height: 100%; width: 100%; - .el-scrollbar { - height: 100%; - } - - :deep(.el-scrollbar__bar).is-vertical { - z-index: 10; - } - - :deep(.el-scrollbar__wrap) { - overflow-x: hidden; - } - &.mobile.openSidebar { position: fixed; top: 0; From 9b6cd8b047cf21f28b254956d5cec2ccf3d15d00 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 5 May 2023 11:34:55 +0800 Subject: [PATCH 12/12] =?UTF-8?q?DictTag=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E5=BD=93value=E6=B2=A1=E6=9C=89=E5=8C=B9=E9=85=8D=E7=9A=84?= =?UTF-8?q?=E5=80=BC=E6=97=B6=EF=BC=8C=E5=B1=95=E7=A4=BAvalue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/index.vue | 90 ++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 21 deletions(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index 827a7af..f27b16a 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -2,13 +2,9 @@
    +