fix: eslint

This commit is contained in:
xingyu4j 2022-11-23 10:41:14 +08:00
parent f20aff421b
commit 8333e9c3da
12 changed files with 39 additions and 59 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ruoyi-vue-pro-vue3", "name": "ruoyi-vue-pro-vue3",
"version": "1.6.4.1861", "version": "1.6.4.1862",
"description": "基于vue3、vite3、element-plus、typesScript", "description": "基于vue3、vite3、element-plus、typesScript",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,

View File

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref, watch } from 'vue' import { computed, ref, watch } from 'vue'
import { ElSwitch, ElInput, ElMessage } from 'element-plus' import { ElSwitch, ElInput } from 'element-plus'
import { setCssVar } from '@/utils' import { setCssVar } from '@/utils'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
@ -108,14 +108,6 @@ const greyModeChange = (show: boolean) => {
appStore.setGreyMode(show) 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) const fixedMenu = ref(appStore.getFixedMenu)
@ -207,11 +199,6 @@ watch(
<ElSwitch v-model="greyMode" @change="greyModeChange" /> <ElSwitch v-model="greyMode" @change="greyModeChange" />
</div> </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"> <div class="flex justify-between items-center">
<span class="text-14px">{{ t('setting.fixedMenu') }}</span> <span class="text-14px">{{ t('setting.fixedMenu') }}</span>
<ElSwitch v-model="fixedMenu" @change="fixedMenuChange" /> <ElSwitch v-model="fixedMenu" @change="fixedMenuChange" />

View File

@ -93,7 +93,6 @@ export default {
footer: 'Footer', footer: 'Footer',
uniqueOpened: 'Unique opened', uniqueOpened: 'Unique opened',
tagsViewIcon: 'Tags view icon', tagsViewIcon: 'Tags view icon',
dynamicRouter: 'Dynamic router',
reExperienced: 'Please exit the login experience again', reExperienced: 'Please exit the login experience again',
fixedMenu: 'Fixed menu' fixedMenu: 'Fixed menu'
}, },

View File

@ -93,7 +93,6 @@ export default {
footer: '页脚', footer: '页脚',
uniqueOpened: '菜单手风琴', uniqueOpened: '菜单手风琴',
tagsViewIcon: '标签页图标', tagsViewIcon: '标签页图标',
dynamicRouter: '动态路由',
reExperienced: '请重新退出登录体验', reExperienced: '请重新退出登录体验',
fixedMenu: '固定菜单' fixedMenu: '固定菜单'
}, },

View File

@ -24,7 +24,7 @@
:fixedNumber="options.fixedNumber" :fixedNumber="options.fixedNumber"
:fixedBox="options.fixedBox" :fixedBox="options.fixedBox"
:centerBox="options.centerBox" :centerBox="options.centerBox"
@realTime="realTime" @real-time="realTime"
/> />
</el-col> </el-col>
<el-col :xs="24" :md="12" :style="{ height: '350px' }"> <el-col :xs="24" :md="12" :style="{ height: '350px' }">

View File

@ -55,8 +55,7 @@ import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen' import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen'
import { ElForm, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus' import { ElForm, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'
import { getDataSourceConfigListApi } from '@/api/infra/dataSourceConfig' import { getDataSourceConfigListApi, DataSourceConfigVO } from '@/api/infra/dataSourceConfig'
import type { DataSourceConfigVO } from '@/api/infra/dataSourceConfig/types'
import type { DatabaseTableVO } from '@/api/infra/codegen/types' import type { DatabaseTableVO } from '@/api/infra/codegen/types'
import { VxeTableInstance } from 'vxe-table' import { VxeTableInstance } from 'vxe-table'
const { t } = useI18n() // const { t } = useI18n() //

View File

@ -45,13 +45,17 @@ const init = async () => {
/** 处理导出 */ /** 处理导出 */
const handleExport = async (type: string) => { const handleExport = async (type: string) => {
const res = await DbDocApi.exportHtmlApi() const res = await DbDocApi.exportHtmlApi()
if (type === 'HTML') { download.html(res, '数据库文档.html') } if (type === 'HTML') {
if (type === 'Word') { download.word(res, '数据库文档.doc') } download.html(res, '数据库文档.html')
if(type === 'Markdown') {download.markdown(res, '数据库文档.md')} }
if (type === 'Word') {
download.word(res, '数据库文档.doc')
}
if (type === 'Markdown') {
download.markdown(res, '数据库文档.md')
}
} }
onMounted(async () => { onMounted(async () => {
await init() await init()
}) })
</script> </script>

View File

@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
const BASE_URL = import.meta.env.VITE_BASE_URL const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/druid/index.html') const src = ref(BASE_URL + '/druid/index.html')
</script> </script>

View File

@ -1,4 +1,3 @@
<template> <template>
<ContentWrap> <ContentWrap>
<IFrame :src="src" /> <IFrame :src="src" />

View File

@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
const BASE_URL = import.meta.env.VITE_BASE_URL const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/doc.html') const src = ref(BASE_URL + '/doc.html')
</script> </script>

View File

@ -153,23 +153,20 @@ import {
ElSwitch, ElSwitch,
ElTag ElTag
} from 'element-plus' } 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 { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { FormExpose } from '@/components/Form' import { useVxeGrid } from '@/hooks/web/useVxeGrid'
import { rules, allSchemas } from './role.data'
import { handleTree } from '@/utils/tree' import { handleTree } from '@/utils/tree'
import { SystemDataScopeEnum } from '@/utils/constants' import { SystemDataScopeEnum } from '@/utils/constants'
import { useVxeGrid } from '@/hooks/web/useVxeGrid' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { VxeGridInstance } from 'vxe-table' import { rules, allSchemas } from './role.data'
import * as RoleApi from '@/api/system/role' import * as RoleApi from '@/api/system/role'
import { listSimpleMenusApi } from '@/api/system/menu' import { listSimpleMenusApi } from '@/api/system/menu'
import { listSimpleDeptApi } from '@/api/system/dept' import { listSimpleDeptApi } from '@/api/system/dept'
import * as PermissionApi from '@/api/system/permission' import * as PermissionApi from '@/api/system/permission'
import type {
PermissionAssignRoleDataScopeReqVO,
PermissionAssignRoleMenuReqVO
} from '@/api/system/permission/types'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
// //
@ -305,14 +302,14 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
const submitScope = async () => { const submitScope = async () => {
const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array<number> const keys = treeRef.value!.getCheckedKeys(false) as unknown as Array<number>
if ('data' === actionScopeType.value) { if ('data' === actionScopeType.value) {
const data = ref<PermissionAssignRoleDataScopeReqVO>({ const data = ref<PermissionApi.PermissionAssignRoleDataScopeReqVO>({
roleId: dataScopeForm.id, roleId: dataScopeForm.id,
dataScope: dataScopeForm.dataScope, dataScope: dataScopeForm.dataScope,
dataScopeDeptIds: dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : keys dataScopeDeptIds: dataScopeForm.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] : keys
}) })
await PermissionApi.assignRoleDataScopeApi(data.value) await PermissionApi.assignRoleDataScopeApi(data.value)
} else if ('menu' === actionScopeType.value) { } else if ('menu' === actionScopeType.value) {
const data = ref<PermissionAssignRoleMenuReqVO>({ const data = ref<PermissionApi.PermissionAssignRoleMenuReqVO>({
roleId: dataScopeForm.id, roleId: dataScopeForm.id,
menuIds: keys menuIds: keys
}) })

View File

@ -3,7 +3,6 @@
<IFrame :src="src" /> <IFrame :src="src" />
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref } from 'vue'
import { IFrame } from '@/components/IFrame' import { IFrame } from '@/components/IFrame'
@ -12,4 +11,3 @@ import { getAccessToken } from '@/utils/auth'
const BASE_URL = import.meta.env.VITE_BASE_URL const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
</script> </script>