chenmy vor 3 Jahren
Ursprung
Commit
c125882259

+ 1 - 0
TEAMModelBI/ClientApp/public/index.html

@@ -5,6 +5,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title>
         醍摩豆BI管理平台

+ 7 - 1
TEAMModelBI/ClientApp/src/router/index.js

@@ -169,7 +169,12 @@ const routes = [{
         path: "/404",
         name: "404",
         component: () => require.ensure([], (require) => require(`@/view/404.vue`))
-    }
+    },
+    // {
+    //     path: "/accesslayer",
+    //     name: "accesslayer",
+    //     component: () => require.ensure([], (require) => require(`@/view/accesslayer.vue`))
+    // },
 ];
 const router = createRouter({
     history: createWebHashHistory(),
@@ -178,6 +183,7 @@ const router = createRouter({
 router.beforeEach((to, from, next) => {
     console.log(to, 'router')
     if (to.path === '/login') return next()
+    if (to.path === '/accesslayer') return next()
     let recordUser = JSON.parse(localStorage.getItem('userData'));
     let token = jwt_decode(JSON.parse(localStorage.getItem('id_token')))
     if (!recordUser || !token) return next('/login')

+ 3 - 1
TEAMModelBI/ClientApp/src/view/ddlogin.vue

@@ -5,7 +5,9 @@
 </template>
 
 <script>
-const hosts = window.location.host === 'localhost:5001' ? 'localhost:5001' : window.location.host === 'bi.teammodel.cn' ? 'bi.teammodel.cn' : 'bitest.teammodel.cn'
+const hosts = window.location.host === 'localhost:5001' ? 'localhost:5001' :
+  window.location.host === 'bi.teammodel.cn' ? 'bi.teammodel.cn' :
+    'bitest.teammodel.cn'
 import axios from 'axios'
 export default {
   name: 'App',

+ 31 - 0
TEAMModelBI/ClientApp/src/view/login.vue

@@ -18,6 +18,13 @@
       <div class="usrpwd">
         <ddlogin></ddlogin>
       </div>
+      <!-- <div class="accessbox">
+        <div class="access" title="IES5应用接入说明文档" @click="openSkip('movement')">
+          <el-icon>
+            <Share color="#fff" style="width:20px;height:20px" />
+          </el-icon>
+        </div>
+      </div> -->
       <!-- <div class="cut" @click="loginModel = !loginModel">
                 <svg width="52" height="52" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" style="border-top-right-radius:10px">
                     <mask id="id-3757926926-a" width="52" height="52" x="0" y="0" maskUnits="userSpaceOnUse">
@@ -50,10 +57,12 @@ import { ElMessage, ElLoading } from 'element-plus'
 import { useRouter } from 'vue-router'
 import { useStore } from 'vuex'
 import jwt_decode from 'jwt-decode'
+import { Share } from '@element-plus/icons-vue'
 export default {
   components: {
     ddlogin,
     bind,
+    Share
   },
   setup () {
     var types = navigator.language
@@ -155,6 +164,17 @@ export default {
         res.authorityBIList ? (store.commit('getPermission', res.authorityBIList), localStorage.setItem('management', JSON.stringify(res.authorityBIList))) : []
       })
     }
+    //根据路由跳转IES5应用接入说明文档
+    function openSkip (value) {
+      console.log('调用方法了')
+      let nowUrl = window.location.host
+      console.log(nowUrl)
+      if (nowUrl.indexOf('open') != -1) {
+        window.open("http://doc.teammodel.cn:4999/web/#/16/130")
+      } else if (value === 'movement') {
+        window.open("http://doc.teammodel.cn:4999/web/#/16/130")
+      }
+    }
     // //钉钉账号或扫码登录
     // function userlogin(proxy) {
     //     loading = ElLoading.service({
@@ -203,6 +223,7 @@ export default {
     //         }
     //     })
     // }
+    openSkip()
     return {
       comRef,
       store,
@@ -221,6 +242,7 @@ export default {
       Allpermission,
       loginSuccess,
       loadings,
+      openSkip
     }
   },
 }
@@ -316,6 +338,15 @@ export default {
   top: 0px;
   right: 0px;
 }
+/* .access {
+  width: 35px;
+  height: 35px;
+  float: right;
+  margin-right: 5px;
+}
+.accessbox {
+  width: 100%;
+} */
 </style>
 <style>
 .userbox .el-input__inner {

+ 4 - 0
TEAMModelBI/ClientApp/src/view/systemConfig/operate.vue

@@ -80,6 +80,10 @@ export default {
         value: 'assist',
         label: '顾问',
       },
+      {
+        value: 'leader',
+        label: '领导',
+      },
       // {
       //     value: 'research',
       //     label: '研发部门人员',

+ 4 - 0
TEAMModelBI/ClientApp/src/view/teachermanage/manage.vue

@@ -229,6 +229,10 @@ export default {
         value: 'assist',
         label: '顾问',
       },
+      {
+        value: 'leader',
+        label: '领导者',
+      },
       // {
       //     value: 'research',
       //     label: '研发部门人员',

+ 29 - 23
TEAMModelBI/ClientApp/vue.config.js

@@ -1,23 +1,29 @@
-    module.exports = {
-        publicPath: './', // 默认'/',部署应用包时的基本 URL
-        outputDir: '../wwwroot', // 'dist', 生产环境构建文件的目录
-        assetsDir: 'static',
-        // lintOnSave: true,
-        // runtimeCompiler: true,
-        // chainWebpack: () => {},
-        // configureWebpack: () => {},
-        // assetsDir: '', // 相对于outputDir的静态资源(js、css、img、fonts)目录
-        // lintOnSave: false,
-        // runtimeCompiler: true, // 是否使用包含运行时编译器的 Vue 构建版本
-        // productionSourceMap: false, // 生产环境的 source map
-        // devServer: {
-        //     overlay: {
-        //         warnings: false,
-        //         errors: false
-        //     },
-        // },
-        lintOnSave: false, //关闭语法检查
-        devServer: {
-            progress: false
-        }
-    }
+const Timestamp = new Date().getTime();
+module.exports = {
+    publicPath: './', // 默认'/',部署应用包时的基本 URL
+    outputDir: '../wwwroot', // 'dist', 生产环境构建文件的目录
+    assetsDir: 'static',
+    productionSourceMap: false, // 生产环境的 source map
+    // lintOnSave: true,
+    // runtimeCompiler: true,
+    // chainWebpack: () => {},
+    // configureWebpack: () => {},
+    // assetsDir: '', // 相对于outputDir的静态资源(js、css、img、fonts)目录
+    // lintOnSave: false,
+    // runtimeCompiler: true, // 是否使用包含运行时编译器的 Vue 构建版本
+    // devServer: {
+    //     overlay: {
+    //         warnings: false,
+    //         errors: false
+    //     },
+    // },
+    lintOnSave: false, //关闭语法检查
+    devServer: {
+        progress: false
+    },
+    configureWebpack: config => {
+        config.optimization.minimizer[0].options.terserOptions.compress.drop_console = process.env.NODE_ENV === 'production'
+        config.output.filename = `js/[name].${Timestamp}.js`
+        config.output.chunkFilename = `js/[name].${Timestamp}.js`
+    },
+}