' +
+ ElMessage.error({
+ duration: 5,
+ offset: 300,
+ dangerouslyUseHTMLString: true,
+ message:
+ '
' +
t('sys.api.errMsg901') +
'
' +
'
' +
'
参考 https://doc.iocoder.cn/ 教程
' +
'
' +
'
5 分钟搭建本地环境
'
- )
+ })
return Promise.reject(new Error(msg))
} else if (code !== 200) {
if (msg === '无效的刷新令牌') {
diff --git a/yudao-ui-admin-vue3/src/directives/permission/hasPermi.ts b/yudao-ui-admin-vue3/src/directives/permission/hasPermi.ts
index 6a28c390d..643510155 100644
--- a/yudao-ui-admin-vue3/src/directives/permission/hasPermi.ts
+++ b/yudao-ui-admin-vue3/src/directives/permission/hasPermi.ts
@@ -1,5 +1,5 @@
import type { App } from 'vue'
-import { useCache } from '@/hooks/web/useCache'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() // 国际化
@@ -8,7 +8,7 @@ export function hasPermi(app: App
) {
const { wsCache } = useCache()
const { value } = binding
const all_permission = '*:*:*'
- const permissions = wsCache.get('user').permissions
+ const permissions = wsCache.get(CACHE_KEY.USER).permissions
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value
diff --git a/yudao-ui-admin-vue3/src/directives/permission/hasRole.ts b/yudao-ui-admin-vue3/src/directives/permission/hasRole.ts
index f584ea690..29d1611e1 100644
--- a/yudao-ui-admin-vue3/src/directives/permission/hasRole.ts
+++ b/yudao-ui-admin-vue3/src/directives/permission/hasRole.ts
@@ -1,5 +1,5 @@
import type { App } from 'vue'
-import { useCache } from '@/hooks/web/useCache'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() // 国际化
@@ -8,7 +8,7 @@ export function hasRole(app: App) {
const { wsCache } = useCache()
const { value } = binding
const super_admin = 'admin'
- const roles = wsCache.get('user').roles
+ const roles = wsCache.get(CACHE_KEY.USER).roles
if (value && value instanceof Array && value.length > 0) {
const roleFlag = value
diff --git a/yudao-ui-admin-vue3/src/hooks/web/useCache.ts b/yudao-ui-admin-vue3/src/hooks/web/useCache.ts
index 97a7df68a..6d2a93183 100644
--- a/yudao-ui-admin-vue3/src/hooks/web/useCache.ts
+++ b/yudao-ui-admin-vue3/src/hooks/web/useCache.ts
@@ -6,6 +6,16 @@ import WebStorageCache from 'web-storage-cache'
type CacheType = 'localStorage' | 'sessionStorage'
+export const CACHE_KEY = {
+ IS_DARK: 'isDark',
+ USER: 'user',
+ LANG: 'lang',
+ THEME: 'theme',
+ LAYOUT: 'layout',
+ ROLE_ROUTERS: 'roleRouters',
+ DICT_CACHE: 'dictCache'
+}
+
export const useCache = (type: CacheType = 'localStorage') => {
const wsCache: WebStorageCache = new WebStorageCache({
storage: type
diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
index 7fe7fb4ae..45bf85b7d 100644
--- a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
+++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
@@ -208,7 +208,8 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns
const tableSchemaItem = {
...schemaItem.table,
field: schemaItem.field,
- title: schemaItem.table?.title || schemaItem.title
+ title: schemaItem.table?.title || schemaItem.title,
+ minWidth: '80px'
}
tableSchemaItem.showOverflow = 'tooltip'
if (schemaItem?.formatter) {
@@ -231,6 +232,7 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns
const tableSchemaItem = {
title: crudSchema.actionTitle ? crudSchema.actionTitle : t('table.action'),
field: 'actionbtns',
+ fixed: 'right' as unknown as VxeColumnPropTypes.Fixed,
width: crudSchema.actionWidth ? crudSchema.actionWidth : '200px',
slots: {
default: 'actionbtns_default'
diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
index af930b7ce..34106be2a 100644
--- a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
+++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
@@ -11,10 +11,12 @@ const message = useMessage() // 消息弹窗
interface UseVxeGridConfig {
allSchemas: VxeAllSchemas
+ height?: number // 高度 默认730
topActionSlots?: boolean // 是否开启表格内顶部操作栏插槽
treeConfig?: VxeTablePropTypes.TreeConfig // 树形表单配置
isList?: boolean // 是否不带分页的list
getListApi: (option: any) => Promise // 获取列表接口
+ getAllListApi?: (option: any) => Promise // 获取全部数据接口 用于VXE导出
deleteApi?: (option: any) => Promise // 删除接口
exportListApi?: (option: any) => Promise // 导出接口
exportName?: string // 导出文件夹名称
@@ -47,7 +49,7 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
const gridOptions = reactive>({
loading: true,
size: currentSize as any,
- height: 730, // 1080高度
+ height: config?.height ? config.height : 730,
rowConfig: {
isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
isHover: true // 当鼠标移到行时,是否要高亮当前行
@@ -99,8 +101,8 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
queryAll: ({ form }) => {
const queryParams = Object.assign({}, JSON.parse(JSON.stringify(form)))
return new Promise(async (resolve) => {
- if (config?.exportListApi) {
- resolve(await config?.exportListApi(queryParams))
+ if (config?.getAllListApi) {
+ resolve(await config?.getAllListApi(queryParams))
} else {
resolve(await config?.getListApi(queryParams))
}
@@ -113,7 +115,7 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
// 默认选中类型
type: 'csv',
// 自定义数据量列表
- modes: ['current', 'all'],
+ modes: config?.getAllListApi ? ['current', 'all'] : ['current'],
columns: config?.allSchemas.printSchema
}
})
diff --git a/yudao-ui-admin-vue3/src/layout/Layout.vue b/yudao-ui-admin-vue3/src/layout/Layout.vue
index 9d34f2a09..5c43e52d0 100644
--- a/yudao-ui-admin-vue3/src/layout/Layout.vue
+++ b/yudao-ui-admin-vue3/src/layout/Layout.vue
@@ -2,7 +2,7 @@
import { computed, defineComponent, unref } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { Backtop } from '@/components/Backtop'
-import { Setting } from '@/components/Setting'
+import { Setting } from '@/layout/components/Setting'
import { useRenderLayout } from './components/useRenderLayout'
import { useDesign } from '@/hooks/web/useDesign'
diff --git a/yudao-ui-admin-vue3/src/layout/components/AppView.vue b/yudao-ui-admin-vue3/src/layout/components/AppView.vue
index 2000ca977..6f33a07a4 100644
--- a/yudao-ui-admin-vue3/src/layout/components/AppView.vue
+++ b/yudao-ui-admin-vue3/src/layout/components/AppView.vue
@@ -1,7 +1,7 @@
diff --git a/yudao-ui-admin-vue3/src/components/Setting/src/components/ColorRadioPicker.vue b/yudao-ui-admin-vue3/src/layout/components/Setting/src/components/ColorRadioPicker.vue
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/Setting/src/components/ColorRadioPicker.vue
rename to yudao-ui-admin-vue3/src/layout/components/Setting/src/components/ColorRadioPicker.vue
diff --git a/yudao-ui-admin-vue3/src/components/Setting/src/components/InterfaceDisplay.vue b/yudao-ui-admin-vue3/src/layout/components/Setting/src/components/InterfaceDisplay.vue
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/Setting/src/components/InterfaceDisplay.vue
rename to yudao-ui-admin-vue3/src/layout/components/Setting/src/components/InterfaceDisplay.vue
diff --git a/yudao-ui-admin-vue3/src/components/Setting/src/components/LayoutRadioPicker.vue b/yudao-ui-admin-vue3/src/layout/components/Setting/src/components/LayoutRadioPicker.vue
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/Setting/src/components/LayoutRadioPicker.vue
rename to yudao-ui-admin-vue3/src/layout/components/Setting/src/components/LayoutRadioPicker.vue
diff --git a/yudao-ui-admin-vue3/src/components/SizeDropdown/index.ts b/yudao-ui-admin-vue3/src/layout/components/SizeDropdown/index.ts
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/SizeDropdown/index.ts
rename to yudao-ui-admin-vue3/src/layout/components/SizeDropdown/index.ts
diff --git a/yudao-ui-admin-vue3/src/components/SizeDropdown/src/SizeDropdown.vue b/yudao-ui-admin-vue3/src/layout/components/SizeDropdown/src/SizeDropdown.vue
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/SizeDropdown/src/SizeDropdown.vue
rename to yudao-ui-admin-vue3/src/layout/components/SizeDropdown/src/SizeDropdown.vue
diff --git a/yudao-ui-admin-vue3/src/components/TabMenu/index.ts b/yudao-ui-admin-vue3/src/layout/components/TabMenu/index.ts
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/TabMenu/index.ts
rename to yudao-ui-admin-vue3/src/layout/components/TabMenu/index.ts
diff --git a/yudao-ui-admin-vue3/src/components/TabMenu/src/TabMenu.vue b/yudao-ui-admin-vue3/src/layout/components/TabMenu/src/TabMenu.vue
similarity index 99%
rename from yudao-ui-admin-vue3/src/components/TabMenu/src/TabMenu.vue
rename to yudao-ui-admin-vue3/src/layout/components/TabMenu/src/TabMenu.vue
index f70ee9402..0e5b69081 100644
--- a/yudao-ui-admin-vue3/src/components/TabMenu/src/TabMenu.vue
+++ b/yudao-ui-admin-vue3/src/layout/components/TabMenu/src/TabMenu.vue
@@ -5,7 +5,7 @@ import { computed, unref, defineComponent, watch, ref, onMounted } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { ElScrollbar } from 'element-plus'
import { Icon } from '@/components/Icon'
-import { Menu } from '@/components/Menu'
+import { Menu } from '@/layout/components/Menu'
import { useRouter } from 'vue-router'
import { pathResolve } from '@/utils/routerHelper'
import { cloneDeep } from 'lodash-es'
diff --git a/yudao-ui-admin-vue3/src/components/TabMenu/src/helper.ts b/yudao-ui-admin-vue3/src/layout/components/TabMenu/src/helper.ts
similarity index 94%
rename from yudao-ui-admin-vue3/src/components/TabMenu/src/helper.ts
rename to yudao-ui-admin-vue3/src/layout/components/TabMenu/src/helper.ts
index 221313379..37a1a6869 100644
--- a/yudao-ui-admin-vue3/src/components/TabMenu/src/helper.ts
+++ b/yudao-ui-admin-vue3/src/layout/components/TabMenu/src/helper.ts
@@ -1,4 +1,4 @@
-import { getAllParentPath } from '@/components/Menu/src/helper'
+import { getAllParentPath } from '@/layout/components/Menu/src/helper'
import type { RouteMeta } from 'vue-router'
import { isUrl } from '@/utils/is'
import { cloneDeep } from 'lodash-es'
diff --git a/yudao-ui-admin-vue3/src/components/TagsView/index.ts b/yudao-ui-admin-vue3/src/layout/components/TagsView/index.ts
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/TagsView/index.ts
rename to yudao-ui-admin-vue3/src/layout/components/TagsView/index.ts
diff --git a/yudao-ui-admin-vue3/src/components/TagsView/src/TagsView.vue b/yudao-ui-admin-vue3/src/layout/components/TagsView/src/TagsView.vue
similarity index 99%
rename from yudao-ui-admin-vue3/src/components/TagsView/src/TagsView.vue
rename to yudao-ui-admin-vue3/src/layout/components/TagsView/src/TagsView.vue
index aa5a52f20..eeff97c9a 100644
--- a/yudao-ui-admin-vue3/src/components/TagsView/src/TagsView.vue
+++ b/yudao-ui-admin-vue3/src/layout/components/TagsView/src/TagsView.vue
@@ -7,7 +7,7 @@ import { useTagsViewStore } from '@/store/modules/tagsView'
import { useAppStore } from '@/store/modules/app'
import { useI18n } from '@/hooks/web/useI18n'
import { filterAffixTags } from './helper'
-import { ContextMenu, ContextMenuExpose } from '@/components/ContextMenu'
+import { ContextMenu, ContextMenuExpose } from '@/layout/components/ContextMenu'
import { useDesign } from '@/hooks/web/useDesign'
import { useTemplateRefsList } from '@vueuse/core'
import { ElScrollbar } from 'element-plus'
@@ -114,8 +114,8 @@ const toLastView = () => {
addTags()
return
}
- // You can set another route
- push(permissionStore.getAddRouters[0].path)
+ // TODO: You can set another route
+ push('/')
}
}
@@ -128,7 +128,6 @@ const moveToCurrentTag = async () => {
if (v.fullPath !== unref(currentRoute).fullPath) {
tagsViewStore.updateVisitedView(unref(currentRoute))
}
-
break
}
}
diff --git a/yudao-ui-admin-vue3/src/components/TagsView/src/helper.ts b/yudao-ui-admin-vue3/src/layout/components/TagsView/src/helper.ts
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/TagsView/src/helper.ts
rename to yudao-ui-admin-vue3/src/layout/components/TagsView/src/helper.ts
diff --git a/yudao-ui-admin-vue3/src/components/ThemeSwitch/index.ts b/yudao-ui-admin-vue3/src/layout/components/ThemeSwitch/index.ts
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/ThemeSwitch/index.ts
rename to yudao-ui-admin-vue3/src/layout/components/ThemeSwitch/index.ts
diff --git a/yudao-ui-admin-vue3/src/components/ThemeSwitch/src/ThemeSwitch.vue b/yudao-ui-admin-vue3/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue
similarity index 100%
rename from yudao-ui-admin-vue3/src/components/ThemeSwitch/src/ThemeSwitch.vue
rename to yudao-ui-admin-vue3/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue
diff --git a/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue b/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue
index 9fde55358..674886c4c 100644
--- a/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue
+++ b/yudao-ui-admin-vue3/src/layout/components/ToolHeader.vue
@@ -1,11 +1,11 @@
diff --git a/yudao-ui-admin-vue3/src/views/system/role/index.vue b/yudao-ui-admin-vue3/src/views/system/role/index.vue
index 9b1323281..5ff8543f5 100644
--- a/yudao-ui-admin-vue3/src/views/system/role/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/role/index.vue
@@ -64,7 +64,7 @@
@@ -92,9 +92,9 @@
@@ -105,7 +105,7 @@
actionScopeType === 'menu' || dataScopeForm.dataScope === SystemDataScopeEnum.DEPT_CUSTOM
"
>
-
+
父子联动(选中父节点,自动选择子节点):
@@ -164,9 +164,9 @@ import { FormExpose } from '@/components/Form'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
-import { handleTree } from '@/utils/tree'
+import { handleTree, defaultProps } from '@/utils/tree'
import { SystemDataScopeEnum } from '@/utils/constants'
-import { DICT_TYPE, getDictOptions } from '@/utils/dict'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { rules, allSchemas } from './role.data'
import * as RoleApi from '@/api/system/role'
import { listSimpleMenusApi } from '@/api/system/menu'
@@ -189,7 +189,7 @@ const actionType = ref('') // 操作按钮的类型
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const formRef = ref() // 表单 Ref
-const detailRef = ref() // 详情 Ref
+const detailData = ref() // 详情 Ref
// 设置标题
const setDialogTile = (type: string) => {
@@ -216,7 +216,7 @@ const handleDetail = async (rowId: number) => {
setDialogTile('detail')
// 设置数据
const res = await RoleApi.getRoleApi(rowId)
- detailRef.value = res
+ detailData.value = res
}
// 删除操作
@@ -259,11 +259,6 @@ const dataScopeForm = reactive({
dataScope: 0,
checkList: []
})
-const defaultProps = {
- children: 'children',
- label: 'name',
- value: 'id'
-}
const treeOptions = ref([]) // 菜单树形结构
const treeRef = ref>()
const dialogScopeVisible = ref(false)
@@ -306,18 +301,20 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
}
// 保存权限
const submitScope = async () => {
- const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array
if ('data' === actionScopeType.value) {
const data = ref({
roleId: dataScopeForm.id,
dataScope: dataScopeForm.dataScope,
- dataScopeDeptIds: dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : keys
+ dataScopeDeptIds:
+ dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM
+ ? []
+ : (treeRef.value!.getCheckedKeys(false) as unknown as Array)
})
await PermissionApi.assignRoleDataScopeApi(data.value)
} else if ('menu' === actionScopeType.value) {
const data = ref({
roleId: dataScopeForm.id,
- menuIds: keys
+ menuIds: treeRef.value!.getCheckedKeys(false) as unknown as Array
})
await PermissionApi.assignRoleMenuApi(data.value)
}
@@ -325,7 +322,7 @@ const submitScope = async () => {
dialogScopeVisible.value = false
}
const init = () => {
- dataScopeDictDatas.value = getDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE)
+ dataScopeDictDatas.value = getIntDictOptions(DICT_TYPE.SYSTEM_DATA_SCOPE)
}
// ========== 初始化 ==========
onMounted(() => {
diff --git a/yudao-ui-admin-vue3/src/views/system/role/role.data.ts b/yudao-ui-admin-vue3/src/views/system/role/role.data.ts
index 26f632ad4..172b8c892 100644
--- a/yudao-ui-admin-vue3/src/views/system/role/role.data.ts
+++ b/yudao-ui-admin-vue3/src/views/system/role/role.data.ts
@@ -28,7 +28,8 @@ const crudSchemas = reactive({
title: '角色类型',
field: 'type',
dictType: DICT_TYPE.SYSTEM_ROLE_TYPE,
- dictClass: 'number'
+ dictClass: 'number',
+ isForm: false
},
{
title: '角色标识',
@@ -39,6 +40,21 @@ const crudSchemas = reactive({
title: '显示顺序',
field: 'sort'
},
+ {
+ title: t('form.remark'),
+ field: 'remark',
+ isTable: false,
+ form: {
+ component: 'Input',
+ componentProps: {
+ type: 'textarea',
+ rows: 4
+ },
+ colProps: {
+ span: 24
+ }
+ }
+ },
{
title: t('common.status'),
field: 'status',
diff --git a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
index f73383dbc..f7b82e52e 100644
--- a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
@@ -64,8 +64,8 @@
:rules="rules"
ref="formRef"
>
-
-
+
+
@@ -130,7 +130,6 @@ const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const formRef = ref() // 表单 Ref
const detailData = ref() // 详情 Ref
-const tags = ref()
// 获取标签
const tagsOptions = ref()
@@ -148,7 +147,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
- tags.value = null
setDialogTile('create')
}
@@ -162,7 +160,6 @@ const handleUpdate = async (rowId: number) => {
setDialogTile('update')
// 设置数据
const res = await SensitiveWordApi.getSensitiveWordApi(rowId)
- tags.value = res.tags
unref(formRef)?.setValues(res)
}
@@ -188,7 +185,6 @@ const submitForm = async () => {
// 提交请求
try {
const data = unref(formRef)?.formModel as SensitiveWordApi.SensitiveWordVO
- data.tags = tags.value
if (actionType.value === 'create') {
await SensitiveWordApi.createSensitiveWordApi(data)
message.success(t('common.createSuccess'))
diff --git a/yudao-ui-admin-vue3/src/views/system/sms/smsLog/index.vue b/yudao-ui-admin-vue3/src/views/system/sms/smsLog/index.vue
index db5df8cea..d38f17baf 100644
--- a/yudao-ui-admin-vue3/src/views/system/sms/smsLog/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/sms/smsLog/index.vue
@@ -22,7 +22,7 @@
@@ -53,10 +53,10 @@ const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const actionType = ref('') // 操作按钮的类型
// ========== 详情相关 ==========
-const detailRef = ref() // 详情 Ref
+const detailData = ref() // 详情 Ref
const handleDetail = (row: SmsLoglApi.SmsLogVO) => {
// 设置数据
- detailRef.value = row
+ detailData.value = row
dialogVisible.value = true
}
diff --git a/yudao-ui-admin-vue3/src/views/system/tenant/index.vue b/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
index 9fed3f39e..f7cf6cab1 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
@@ -63,7 +63,7 @@
系统租户
@@ -112,7 +112,7 @@ const actionType = ref('') // 操作按钮的类型
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const formRef = ref() // 表单 Ref
-const detailRef = ref() // 详情 Ref
+const detailData = ref() // 详情 Ref
const getPackageName = (packageId: number) => {
for (let item of tenantPackageOption) {
if (item.value === packageId) {
@@ -147,7 +147,7 @@ const handleUpdate = async (rowId: number) => {
const handleDetail = async (rowId: number) => {
// 设置数据
const res = await TenantApi.getTenantApi(rowId)
- detailRef.value = res
+ detailData.value = res
setDialogTile('detail')
}
diff --git a/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue b/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
index 43a3c6679..c45e9adc0 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
@@ -66,7 +66,7 @@
`
- }
- }
- })
- ],
+ // 项目使用的vite插件。 单独提取到build/vite/plugin中管理
+ plugins: createVitePlugins(env.VITE_APP_TITLE),
css: {
preprocessorOptions: {
scss: {
@@ -139,32 +76,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
}
}
},
- optimizeDeps: {
- include: [
- 'vue',
- 'vue-router',
- 'vue-types',
- 'vue-i18n',
- 'vxe-table',
- 'xe-utils',
- 'lodash-es',
- 'element-plus/es',
- 'element-plus/es/locale/lang/zh-cn',
- 'element-plus/es/locale/lang/en',
- '@iconify/iconify',
- '@vueuse/core',
- 'axios',
- 'qs',
- 'dayjs',
- 'echarts',
- 'echarts-wordcloud',
- 'intro.js',
- 'qrcode',
- 'pinia',
- 'crypto-js',
- '@wangeditor/editor',
- '@wangeditor/editor-for-vue'
- ]
- }
+ optimizeDeps: { include, exclude }
}
}
diff --git a/yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue b/yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue
index 4927ccacd..58c20c978 100644
--- a/yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue
+++ b/yudao-ui-admin/src/components/Verifition/Verify/VerifyPoints.vue
@@ -223,7 +223,6 @@ export default {
this.checkPosArr.splice(0, this.checkPosArr.length)
this.num = 1
this.getPictrue()
- this.text = '验证失败'
this.showRefresh = true
},
diff --git a/yudao-ui-admin/src/views/login.vue b/yudao-ui-admin/src/views/login.vue
index 280cbd2d7..b7b76aaba 100644
--- a/yudao-ui-admin/src/views/login.vue
+++ b/yudao-ui-admin/src/views/login.vue
@@ -53,10 +53,10 @@
-
+
-
+
获取验证码
{{ mobileCodeTimer }}秒后可重新获取
@@ -115,6 +115,7 @@ import {
} from "@/utils/auth";
import Verify from '@/components/Verifition/Verify';
+import {resetUserPwd} from "@/api/system/user";
export default {
name: "Login",
@@ -254,19 +255,40 @@ export default {
}
});
},
- doSocialLogin(socialTypeEnum) {
+ async doSocialLogin(socialTypeEnum) {
// 设置登录中
this.loading = true;
- // 计算 redirectUri
- const redirectUri = location.origin + '/social-login?'
- + encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
- // const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
- // const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
- // 进行跳转
- socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
- // console.log(res.url);
- window.location.href = res.data;
- });
+ let tenant = false;
+ if (this.tenantEnable) {
+ await this.$prompt('请输入租户名称', "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消"
+ }).then(({value}) => {
+ getTenantIdByName(value).then(res => {
+ const tenantId = res.data;
+ tenant = true
+ if (tenantId && tenantId >= 0) {
+ setTenantId(tenantId)
+ }
+ });
+ }).catch(() => {
+ return false
+ });
+ } else {
+ tenant = true
+ }
+ if(tenant){
+ // 计算 redirectUri
+ const redirectUri = location.origin + '/social-login?'
+ + encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
+ // const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
+ // const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
+ // 进行跳转
+ socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
+ // console.log(res.url);
+ window.location.href = res.data;
+ });
+ }
},
/** ========== 以下为升级短信登录 ========== */
getSmsCode() {