Bladeren bron

文件存储地址修改

user5 2 jaren geleden
bovenliggende
commit
74de8426a0

File diff suppressed because it is too large
+ 35333 - 0
package-lock.json


+ 2 - 0
package.json

@@ -11,6 +11,7 @@
   },
   "dependencies": {
     "@jiaminghi/data-view": "^2.10.0",
+    "ali-oss": "^6.17.1",
     "axios": "^0.19.0",
     "bpmn-js-cli": "1.4.1",
     "bpmn-js-task-priorities": "^0.2.0",
@@ -25,6 +26,7 @@
     "jeeplus-flowable": "^2.1.5",
     "jeeplus-form": "2.1.2",
     "jeeplus-gencode": "^2.1.2",
+    "js-base64": "^3.7.2",
     "lodash": "^4.17.15",
     "lodash.omit": "^4.5.0",
     "lodash.pick": "^4.4.0",

File diff suppressed because it is too large
+ 13372 - 6
public/cdn/datav/avue/avue.min.js


+ 2 - 2
public/index.html

@@ -5,7 +5,7 @@
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
-  <title>Jeeplus vue快速开发平台</title>
+  <title>兴光评估系统平台</title>
   <meta name="renderer" content="webkit">
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
   <link rel="icon" href="/static/img/favicon.ico">
@@ -259,4 +259,4 @@
   </div>
 </body>
 </html>
-<script src="iconfont.js"></script>
+<script src="iconfont.js"></script>

public/static/img/favicon.ico → public/static/img/favicon1.ico


+ 7 - 0
src/api/auth/LoginService.js

@@ -20,4 +20,11 @@ export default class LoginService {
       method: 'get'
     })
   }
+  getLoginCodeNumber (userName) {
+    return request({
+      url: '/sys/getLoginCodeNumber',
+      method: 'get',
+      params: {userName: userName}
+    })
+  }
 }

+ 20 - 20
src/assets/scss/login.scss

@@ -43,8 +43,8 @@ html, body{
   margin: 0 auto;
   float: left;
   width: 66%;
-  -webkit-box-shadow: 4px 5px 20px rgba(0, 0, 0, 0.4);
-  box-shadow: 4px 5px 20px rgba(0, 0, 0, 0.4);
+  /*-webkit-box-shadow: 4px 5px 20px rgba(0, 0, 0, 0.4);
+  box-shadow: 4px 5px 20px rgba(0, 0, 0, 0.4);*/
   // box-shadow:25px 25px 5px #888 ;
   position: relative;
 }
@@ -59,19 +59,19 @@ html, body{
 }
 .login-border .right img {
   border-radius:20px;
-  width: auto;  
-  height: auto;  
-  max-width: 100%;  
-  max-height: 100%; 
+  width: auto;
+  height: auto;
+  max-width: 100%;
+  max-height: 100%;
   min-height: 342px;
 }
 .login-left img {
   border-radius:20px;
 
-  width: auto;  
-  height: auto;  
-  max-width: 100%;  
-  max-height: 100%; 
+  width: auto;
+  height: auto;
+  max-width: 100%;
+  max-height: 100%;
   min-height: 342px;
 }
 .login-time {
@@ -189,7 +189,7 @@ top:10%
     height: 20%;
     width: 20%;
   }
-  
+
   .login-form{
     margin-top:0
   }
@@ -202,7 +202,7 @@ top:10%
   .login-title {
     text-align: center;
   }
-  
+
   .login-sub-title {
     display:none;
   }
@@ -230,7 +230,7 @@ top:10%
     margin-top:0
   }
   }
-  
+
   @media (min-width: 992px) {
     .login-form .block{
       display: none !important;
@@ -238,7 +238,7 @@ top:10%
     .login-form{
       margin-top:10
     }
-  } 
+  }
   @media (min-width: 1200px) {
     .login-form .block{
       display: inline-block !important;
@@ -247,28 +247,28 @@ top:10%
       height: 60px;
       width: 60px;
     }
-    
+
     .login-form{
       margin-top:20px;
     }
-  } 
+  }
   @media (min-width: 1350px) {
     .mobile img{
       height: 80px;
       width: 80px;
     }
-    
+
     .login-form{
       margin-top:30px;
     }
-  } 
+  }
   @media (min-width: 1600px) {
     .mobile img{
       height: 100px;
       width: 100px;
     }
-    
+
     .login-form{
       margin-top:60px;
     }
-  } 
+  }

+ 1 - 1
src/router/index.js

@@ -30,7 +30,7 @@ const mainRoutes = {
   meta: {title: '整体布局'},
   children: [
     {path: '/redirect/:path(.*)', component: _import('modules/redirect/index')},
-    {path: '/home', redirect: '/sys/dashboard/analysis/index', name: 'home'},
+    {path: '/home', redirect: '/sys/project/AssessList', name: 'home'},
     {path: '/flowable/task/TaskForm', component: _import('modules/flowable/task/TaskForm'), name: 'task-form', meta: {title: '流程表单'}},
     {path: '/flowable/task/TaskFormEdit', component: _import('modules/flowable/task/TaskFormEdit'), name: 'task-form-edit', meta: {title: '流程表单'}},
     {path: '/flowable/task/TaskFormDetail', component: _import('modules/flowable/task/TaskFormDetail'), name: 'task-form-detail', meta: {title: '流程表单详情'}},

+ 1 - 1
src/utils/index.js

@@ -166,7 +166,7 @@ export function unescapeHTML (a) {
 
 export function printLogo () {
   console.info(
-    '%c欢迎使用%cJEEPLUS',
+    '%c欢迎使用%c兴光评估系统平台',
     'color: #ffffff; background: #000000; padding:5px 10px 5px 10px;font-size:40px;border-radius:12px 0 0 12px;', 'color: #000000; background: #FE9A00; padding:5px 10px;font-size:40px;border-radius:0 12px 12px 0;')
 }
 

+ 1 - 1
src/views/modules/sys/file/index.vue

@@ -107,4 +107,4 @@ export default {
            normalize.css 中也包含这行 */
 		overflow: hidden;
 	}
-</style>
+</style>

+ 77 - 19
src/views/modules/sys/login/login.vue

@@ -1,7 +1,7 @@
 <template>
 
   <div class="login-container">
- 
+
 
     <div class="login-weaper animated bounceInDown" style="z-index:100">
       <div class="login-left">
@@ -13,19 +13,19 @@
         <el-image src="/static/img/login.png">
     </el-image>
 
-        
+
       </div>
       <div class="login-border">
         <div class="login-main">
-              
+
           <h4 class="login-title">
            登录
           </h4>
           <h3 class="login-sub-title">
             请使用账号密码登录
-          </h3> 
+          </h3>
             <el-form size="small" ref="inputForm" :model="inputForm" :rules="rules" class="login-form"  @keyup.enter.native="login()" @submit.native.prevent>
-       
+
               <el-form-item  prop="username">
                 <el-input type="text" placeholder="请输入账号" v-model="inputForm.username">
                    <i slot="prefix" class="el-input__icon el-icon-user-solid"></i>
@@ -36,41 +36,47 @@
                    <i slot="prefix" class="el-input__icon el-icon-female"></i>
                 </el-input>
               </el-form-item>
-              <el-form-item>
-                 <el-row :gutter="10">
-                   <el-col :span="8"><el-image @click="getCaptcha" :src="captchaImg" style="height:34px"></el-image></el-col>
-                   <el-col :span="16">
-                      <el-form-item prop="code">
+              <el-form-item v-if="this.isShow">
+                <el-row :gutter="10">
+                  <el-col :span="8"><el-image @click="getCaptcha" :src="captchaImg" style="height:34px"></el-image></el-col>
+                  <el-col :span="16">
+                    <el-form-item prop="code">
                       <el-input placeholder="请输入验证码" v-model="inputForm.code"></el-input>
-                      </el-form-item>
+                    </el-form-item>
                   </el-col>
-                 </el-row>
+                </el-row>
               </el-form-item>
+              <div style ="margin: 20px">
+                <!-- 记住我 -->
+                <el-checkbox v-model="checked" class="rememberMe">记住我</el-checkbox>
+                <!-- 找回密码 -->
+                <!--<el-button type="text" @click="open()" class="forgetPw">忘记密码?</el-button>-->
+              </div>
               <el-form-item>
                 <el-button type="primary" :loading="loading" class="login-submit" @click="login">登录</el-button>
               </el-form-item>
-              <el-form-item>
+              <!--<el-form-item>
               <div class="block">
-               
+
                 <el-image class="mobile" src="/static/img/mobile.png"></el-image>
                   <span class="demonstration">H5</span>
               </div>
                   <div class="block">
-               
+
                 <el-image class="mobile" src="/static/img/mobile.png"></el-image>
                   <span class="demonstration">Android</span>
               </div>
                   <div class="block">
-               
+
                 <el-image class="mobile" src="/static/img/mobile.png"></el-image>
                  <span class="demonstration">IOS</span>
               </div>
-              </el-form-item>
+              </el-form-item>-->
             </el-form>
         </div>
          <el-image class="right" src="/static/img/right.png"></el-image>
 
- 
+
       </div>
     </div>
   </div>
@@ -88,6 +94,8 @@
         productName: '',
         loading: false,
         captchaImg: '',
+        isShow: false,
+        checked: false,
         inputForm: {
           username: 'admin',
           password: 'admin',
@@ -129,6 +137,9 @@
     methods: {
       // 提交表单
       login () {
+        var checked = this.checked
+        var password = this.inputForm.password
+        var username = this.inputForm.username
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true
@@ -141,6 +152,16 @@
                 localStorage.setItem('dictList', JSON.stringify(data.dictList || '[]'))
                 this.$router.push({name: 'home'})
               })
+              let Base64 = require('js-base64').Base64
+              /* ------ 账号密码的存储 ------ */
+              if (checked) {
+                // eslint-disable-next-line no-undef
+                // let password = Base64.encode(passwordLogin) // base64加密
+                this.setCookie(username, Base64.encode(password), 7)
+              } else {
+                this.setCookie('', '', -1) // 修改2值都为空,天数为负1天就好了
+              }
+              /* ------ http登录请求 ------ */
               this.$notify({
                 title: '登录成功',
                 message: `欢迎回来!<br/>你上次的登录IP是 ${data.oldLoginIp},登录时间是 ${data.oldLoginDate}。`,
@@ -164,6 +185,43 @@
           this.captchaImg = 'data:image/gif;base64,' + data.codeImg
           this.inputForm.uuid = data.uuid
         })
+      },
+      // 获取验证码
+      getLoginCodeNumber (username) {
+        this.loginService.getLoginCodeNumber(username).then(({data}) => {
+          if (data.redisLoginNumber >= data.loginNumber) {
+            this.getCaptcha()
+            this.isShow = true
+          }
+        })
+      },
+      // 设置cookie
+      setCookie (username, password, days) {
+        let date = new Date() // 获取时间
+        date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * days) // 保存的天数
+        // 字符串拼接cookie
+        window.document.cookie =
+          'username' + '=' + username + ';path=/;expires=' + date.toGMTString()
+        window.document.cookie =
+          'password' + '=' + password + ';path=/;expires=' + date.toGMTString()
+      },
+
+      // 读取cookie 将用户名和密码回显到input框中
+      getCookie () {
+        let Base64 = require('js-base64').Base64
+        if (document.cookie.length > 0) {
+          let arr = document.cookie.split('; ') // 分割成一个个独立的“key=value”的形式
+          for (let i = 0; i < arr.length; i++) {
+            let arr2 = arr[i].split('=') // 再次切割,arr2[0]为key值,arr2[1]为对应的value
+            if (arr2[0] === 'username') {
+              this.inputForm.username = arr2[1]
+            } else if (arr2[0] === 'password') {
+              // eslint-disable-next-line no-undef
+              this.inputForm.password = Base64.decode(arr2[1])// base64解密
+              this.checked = true
+            }
+          }
+        }
       }
     }
   }
@@ -171,4 +229,4 @@
 
 <style lang="scss">
 @import '~@/assets/scss/login.scss';
-</style>
+</style>

+ 8 - 0
src/views/modules/sys/project/AssessForm.vue

@@ -577,6 +577,14 @@
             window.open('https://view.officeapps.live.com/op/view.aspx?src=' + row.raw.url, '_blank')
           }
         }
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
       }
     }
   }

+ 0 - 1
src/views/modules/sys/project/AssessList.vue

@@ -234,7 +234,6 @@
         this.projectService.importExcel(formBody).then(result => {
           this.$message.success(result.data)
           this.refreshList()
-          this.loading = false
         }).catch(() => {
           this.refreshList()
           this.loading = false

+ 0 - 1
src/views/modules/sys/project/ConsultationList.vue

@@ -236,7 +236,6 @@
         this.projectService.importExcel(formBody).then(result => {
           this.$message.success(result.data)
           this.refreshList()
-          this.loading = false
         }).catch(() => {
           this.refreshList()
           this.loading = false