mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 03:01:53 +08:00
fix: eslint
This commit is contained in:
parent
f20aff421b
commit
8333e9c3da
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ruoyi-vue-pro-vue3",
|
||||
"version": "1.6.4.1861",
|
||||
"version": "1.6.4.1862",
|
||||
"description": "基于vue3、vite3、element-plus、typesScript",
|
||||
"author": "xingyu",
|
||||
"private": false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { ElSwitch, ElInput, ElMessage } from 'element-plus'
|
||||
import { ElSwitch, ElInput } from 'element-plus'
|
||||
import { setCssVar } from '@/utils'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
@ -108,14 +108,6 @@ const greyModeChange = (show: boolean) => {
|
||||
appStore.setGreyMode(show)
|
||||
}
|
||||
|
||||
// 动态路由
|
||||
const dynamicRouter = ref(appStore.getDynamicRouter)
|
||||
|
||||
const dynamicRouterChange = (show: boolean) => {
|
||||
ElMessage.info(t('setting.reExperienced'))
|
||||
appStore.setDynamicRouter(show)
|
||||
}
|
||||
|
||||
// 固定菜单
|
||||
const fixedMenu = ref(appStore.getFixedMenu)
|
||||
|
||||
@ -207,11 +199,6 @@ watch(
|
||||
<ElSwitch v-model="greyMode" @change="greyModeChange" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-14px">{{ t('setting.dynamicRouter') }}</span>
|
||||
<ElSwitch v-model="dynamicRouter" @change="dynamicRouterChange" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-14px">{{ t('setting.fixedMenu') }}</span>
|
||||
<ElSwitch v-model="fixedMenu" @change="fixedMenuChange" />
|
||||
|
@ -93,7 +93,6 @@ export default {
|
||||
footer: 'Footer',
|
||||
uniqueOpened: 'Unique opened',
|
||||
tagsViewIcon: 'Tags view icon',
|
||||
dynamicRouter: 'Dynamic router',
|
||||
reExperienced: 'Please exit the login experience again',
|
||||
fixedMenu: 'Fixed menu'
|
||||
},
|
||||
|
@ -93,7 +93,6 @@ export default {
|
||||
footer: '页脚',
|
||||
uniqueOpened: '菜单手风琴',
|
||||
tagsViewIcon: '标签页图标',
|
||||
dynamicRouter: '动态路由',
|
||||
reExperienced: '请重新退出登录体验',
|
||||
fixedMenu: '固定菜单'
|
||||
},
|
||||
|
@ -24,7 +24,7 @@
|
||||
:fixedNumber="options.fixedNumber"
|
||||
:fixedBox="options.fixedBox"
|
||||
:centerBox="options.centerBox"
|
||||
@realTime="realTime"
|
||||
@real-time="realTime"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
|
@ -55,8 +55,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen'
|
||||
import { ElForm, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'
|
||||
import { getDataSourceConfigListApi } from '@/api/infra/dataSourceConfig'
|
||||
import type { DataSourceConfigVO } from '@/api/infra/dataSourceConfig/types'
|
||||
import { getDataSourceConfigListApi, DataSourceConfigVO } from '@/api/infra/dataSourceConfig'
|
||||
import type { DatabaseTableVO } from '@/api/infra/codegen/types'
|
||||
import { VxeTableInstance } from 'vxe-table'
|
||||
const { t } = useI18n() // 国际化
|
||||
|
@ -2,24 +2,24 @@
|
||||
<ContentWrap title="数据库文档">
|
||||
<!-- 操作工具栏 -->
|
||||
<div class="mb-10px">
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' HTML'"
|
||||
@click="handleExport('HTML')"
|
||||
/>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' Word'"
|
||||
@click="handleExport('Word')"
|
||||
/>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' Markdown'"
|
||||
@click="handleExport('Markdown')"
|
||||
/>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' HTML'"
|
||||
@click="handleExport('HTML')"
|
||||
/>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' Word'"
|
||||
@click="handleExport('Word')"
|
||||
/>
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:download"
|
||||
:title="t('action.export') + ' Markdown'"
|
||||
@click="handleExport('Markdown')"
|
||||
/>
|
||||
</div>
|
||||
<IFrame v-if="!loding" v-loading="loding" :src="src" />
|
||||
</ContentWrap>
|
||||
@ -45,13 +45,17 @@ const init = async () => {
|
||||
/** 处理导出 */
|
||||
const handleExport = async (type: string) => {
|
||||
const res = await DbDocApi.exportHtmlApi()
|
||||
if (type === 'HTML') { download.html(res, '数据库文档.html') }
|
||||
if (type === 'Word') { download.word(res, '数据库文档.doc') }
|
||||
if(type === 'Markdown') {download.markdown(res, '数据库文档.md')}
|
||||
|
||||
if (type === 'HTML') {
|
||||
download.html(res, '数据库文档.html')
|
||||
}
|
||||
if (type === 'Word') {
|
||||
download.word(res, '数据库文档.doc')
|
||||
}
|
||||
if (type === 'Markdown') {
|
||||
download.markdown(res, '数据库文档.md')
|
||||
}
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
|
||||
const BASE_URL = import.meta.env.VITE_BASE_URL
|
||||
const src = ref(BASE_URL + '/druid/index.html')
|
||||
</script>
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<IFrame :src="src" />
|
||||
|
@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
|
||||
const BASE_URL = import.meta.env.VITE_BASE_URL
|
||||
const src = ref(BASE_URL + '/doc.html')
|
||||
</script>
|
||||
|
||||
|
@ -153,23 +153,20 @@ import {
|
||||
ElSwitch,
|
||||
ElTag
|
||||
} from 'element-plus'
|
||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||
import { VxeGridInstance } from 'vxe-table'
|
||||
import { FormExpose } from '@/components/Form'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { FormExpose } from '@/components/Form'
|
||||
import { rules, allSchemas } from './role.data'
|
||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||
import { handleTree } from '@/utils/tree'
|
||||
import { SystemDataScopeEnum } from '@/utils/constants'
|
||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||
import { VxeGridInstance } from 'vxe-table'
|
||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||
import { rules, allSchemas } from './role.data'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
import { listSimpleMenusApi } from '@/api/system/menu'
|
||||
import { listSimpleDeptApi } from '@/api/system/dept'
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
import type {
|
||||
PermissionAssignRoleDataScopeReqVO,
|
||||
PermissionAssignRoleMenuReqVO
|
||||
} from '@/api/system/permission/types'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
@ -305,14 +302,14 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
|
||||
const submitScope = async () => {
|
||||
const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array<number>
|
||||
if ('data' === actionScopeType.value) {
|
||||
const data = ref<PermissionAssignRoleDataScopeReqVO>({
|
||||
const data = ref<PermissionApi.PermissionAssignRoleDataScopeReqVO>({
|
||||
roleId: dataScopeForm.id,
|
||||
dataScope: dataScopeForm.dataScope,
|
||||
dataScopeDeptIds: dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : keys
|
||||
})
|
||||
await PermissionApi.assignRoleDataScopeApi(data.value)
|
||||
} else if ('menu' === actionScopeType.value) {
|
||||
const data = ref<PermissionAssignRoleMenuReqVO>({
|
||||
const data = ref<PermissionApi.PermissionAssignRoleMenuReqVO>({
|
||||
roleId: dataScopeForm.id,
|
||||
menuIds: keys
|
||||
})
|
||||
|
@ -3,7 +3,6 @@
|
||||
<IFrame :src="src" />
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { IFrame } from '@/components/IFrame'
|
||||
@ -12,4 +11,3 @@ import { getAccessToken } from '@/utils/auth'
|
||||
const BASE_URL = import.meta.env.VITE_BASE_URL
|
||||
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user