| | |
| | | import org.springframework.http.converter.HttpMessageConverter; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | UserLoginInterceptor userLoginInterceptor; |
| | | @Resource |
| | | ModuleMissingInterceptor moduleMissingInterceptor; |
| | | |
| | | |
| | | @Override |
| | | public void addFormatters(FormatterRegistry registry) { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | # ------WIKI文档相关------ |
| | | wiki: |
| | | # WIKI文档的文件上传后的存储目录 |
| | | upload-path: ${WIKI_UPLOAD_PATH:D:/iailabDoc/wikiFiles} |
| | | upload-path: ${WIKI_UPLOAD_PATH:/sda2/iailab/iailab-platform/iailab-doc/iailabDoc/wikiFiles} |
| | | # 是否检查目录有被系统定期清理的风险,建议开启 |
| | | upload-path-check: true |
| | | upload-path-check: false |
| | | # ------数据库相关配置------ |
| | | db: |
| | | # 最大允许导出的行数,设置的过大有可能会导致内存溢出 |
| | |
| | | client-secret: test |
| | | tenant-id: 1 |
| | | domain: localhost |
| | | expire-time: 300 #min |
| | | expire-time: 5760 #min |
| | | |
| | | spring: |
| | | application: |
| | |
| | | # 线上环境 |
| | | |
| | | # base api |
| | | VITE_APP_BASE_API = 'http://localhost:3000/proxy-api' |
| | | VITE_APP_BASE_API = './' |
| | | |
| | | SSO_PASSWORD_OAUTH2_TOKEN_URL = 'http://localhost:48080/admin-api/system/oauth2/token' |
| | | |
| | |
| | | const userSignOut = () => { |
| | | userApi.userLogout().then(() => { |
| | | // location.reload(); |
| | | router.push('/') |
| | | router.push('/user/login') |
| | | }); |
| | | } |
| | | let aboutDialogVisible = ref(false); |
| | |
| | | |
| | | import {createApp} from 'vue' |
| | | import App from './App.vue' |
| | | import {createRouter, createWebHistory} from 'vue-router' |
| | | import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router' |
| | | |
| | | import ElementUI from 'element-plus' |
| | | import 'element-plus/dist/index.css' |
| | |
| | | import {createPinia} from 'pinia' |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(), |
| | | history: createWebHashHistory(), |
| | | routes, |
| | | }); |
| | | |
| | |
| | | import Callback from './views/user/Callback.vue' |
| | | |
| | | let routes = [ |
| | | {path: '/', redirect: '/user/login'}, |
| | | {path: '/', redirect: '/home'}, |
| | | { |
| | | path: '/user/login', |
| | | name: '系统登录', |
| | |
| | | 登录 |
| | | </el-button> |
| | | </el-form-item> |
| | | <!-- 统一身份登录--> |
| | | <el-divider content-position="center">统一身份登录</el-divider> |
| | | <el-col :span="24" style="padding-right: 10px; padding-left: 10px"> |
| | | <el-form-item> |
| | | <el-row :gutter="10" justify="space-between" style="width: 100%"> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" style="width: 100%;" |
| | | @click="ssoPasswordLogin"> |
| | | {{ ssoLoginPasswordTitle }} |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" style="width: 100%;" |
| | | @click="ssoCodeLogin"> |
| | | {{ ssoLoginCodeTitle }} |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <!– 统一身份登录–>--> |
| | | <!-- <el-divider content-position="center">统一身份登录</el-divider>--> |
| | | <!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-row :gutter="10" justify="space-between" style="width: 100%">--> |
| | | <!-- <el-col :span="8">--> |
| | | <!-- <el-button type="primary" style="width: 100%;"--> |
| | | <!-- @click="ssoPasswordLogin">--> |
| | | <!-- {{ ssoLoginPasswordTitle }}--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="8">--> |
| | | <!-- <el-button type="primary" style="width: 100%;"--> |
| | | <!-- @click="ssoCodeLogin">--> |
| | | <!-- {{ ssoLoginCodeTitle }}--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | </el-form> |
| | | </div> |
| | | <div class="power-by">Powered By <a target="_blank" href="https://xxxx">iailab-doc</a></div> |
| | |
| | | } |
| | | onMounted(() => { |
| | | redirect.value = route.params.redirect; |
| | | let token = Cookies.get('accessToken'); |
| | | console.log(token); |
| | | }) |
| | | const loginSubmit = async (params) => { |
| | | loginLoading.value = true; |
| | |
| | | }, |
| | | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] |
| | | }, |
| | | publicPath: './', |
| | | productionSourceMap: false, |
| | | pages: { |
| | | index: { |
| | | entry: 'src/main.js', |
| | | template: 'public/index.html', |
| | | filename: 'index.html', |
| | | }, |
| | | } |
| | | build: { |
| | | emptyOutDir: true, |
| | | cssCodeSplit: false, |
| | | outDir: '../../iailab-doc-wiki/src/main/resources/dist', |
| | | rollupOptions: { |
| | | input: { |
| | | main: resolve(__dirname, 'doc-wiki.html'), |
| | | }, |
| | | output: { |
| | | // 拆分包 |
| | | manualChunks: (id) => { |
| | | if (id.includes('node_modules')) { |
| | | const module = id.toString().split('node_modules/')[1].split('/')[0]; |
| | | if (['mermaid', 'highlight.js', 'katex', 'zrender', 'vant'].includes(module)) { |
| | | return module; |
| | | } |
| | | if (module === '@vue') return 'vue'; |
| | | if (module === '@wangeditor') return 'wangeditor'; |
| | | if (module.indexOf('markmap') === 0) return 'markmap'; |
| | | if (module.indexOf('markdown') === 0) return 'markdown'; |
| | | // 不可拆分:echarts、element-plus |
| | | if (!['echarts', 'element-plus'].includes(module)) { |
| | | return 'vendor'; |
| | | } |
| | | } |
| | | }, |
| | | assetFileNames: 'assets/[name].[hash].[ext]', |
| | | } |
| | | } |
| | | }, |
| | | }); |