YangZhiJie преди 2 години
родител
ревизия
c3fcf818ff
променени са 6 файла, в които са добавени 176 реда и са изтрити 120 реда
  1. 69 0
      src/assets/background.svg
  2. 1 1
      src/assets/common.css
  3. 77 116
      src/client/Login.vue
  4. 26 0
      src/client/top-nav-client-select.vue
  5. 1 1
      src/locales/en-US.json
  6. 2 2
      src/locales/zh-CN.json

+ 69 - 0
src/assets/background.svg

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1361px" height="609px" viewBox="0 0 1361 609" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
+    <title>Group 21</title>
+    <desc>Created with Sketch.</desc>
+    <defs></defs>
+    <g id="Ant-Design-Pro-3.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="账户密码登录-校验" transform="translate(-79.000000, -82.000000)">
+            <g id="Group-21" transform="translate(77.000000, 73.000000)">
+                <g id="Group-18" opacity="0.8" transform="translate(74.901416, 569.699158) rotate(-7.000000) translate(-74.901416, -569.699158) translate(4.901416, 525.199158)">
+                    <ellipse id="Oval-11" fill="#CFDAE6" opacity="0.25" cx="63.5748792" cy="32.468367" rx="21.7830479" ry="21.766008"></ellipse>
+                    <ellipse id="Oval-3" fill="#CFDAE6" opacity="0.599999964" cx="5.98746479" cy="13.8668601" rx="5.2173913" ry="5.21330997"></ellipse>
+                    <path d="M38.1354514,88.3520215 C43.8984227,88.3520215 48.570234,83.6838647 48.570234,77.9254015 C48.570234,72.1669383 43.8984227,67.4987816 38.1354514,67.4987816 C32.3724801,67.4987816 27.7006688,72.1669383 27.7006688,77.9254015 C27.7006688,83.6838647 32.3724801,88.3520215 38.1354514,88.3520215 Z" id="Oval-3-Copy" fill="#CFDAE6" opacity="0.45"></path>
+                    <path d="M64.2775582,33.1704963 L119.185836,16.5654915" id="Path-12" stroke="#CFDAE6" stroke-width="1.73913043" stroke-linecap="round" stroke-linejoin="round"></path>
+                    <path d="M42.1431708,26.5002681 L7.71190162,14.5640702" id="Path-16" stroke="#E0B4B7" stroke-width="0.702678964" opacity="0.7" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
+                    <path d="M63.9262187,33.521561 L43.6721326,69.3250951" id="Path-15" stroke="#BACAD9" stroke-width="0.702678964" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
+                    <g id="Group-17" transform="translate(126.850922, 13.543654) rotate(30.000000) translate(-126.850922, -13.543654) translate(117.285705, 4.381889)" fill="#CFDAE6">
+                        <ellipse id="Oval-4" opacity="0.45" cx="9.13482653" cy="9.12768076" rx="9.13482653" ry="9.12768076"></ellipse>
+                        <path d="M18.2696531,18.2553615 C18.2696531,13.2142826 14.1798519,9.12768076 9.13482653,9.12768076 C4.08980114,9.12768076 0,13.2142826 0,18.2553615 L18.2696531,18.2553615 Z" id="Oval-4" transform="translate(9.134827, 13.691521) scale(-1, -1) translate(-9.134827, -13.691521) "></path>
+                    </g>
+                </g>
+                <g id="Group-14" transform="translate(216.294700, 123.725600) rotate(-5.000000) translate(-216.294700, -123.725600) translate(106.294700, 35.225600)">
+                    <ellipse id="Oval-2" fill="#CFDAE6" opacity="0.25" cx="29.1176471" cy="29.1402439" rx="29.1176471" ry="29.1402439"></ellipse>
+                    <ellipse id="Oval-2" fill="#CFDAE6" opacity="0.3" cx="29.1176471" cy="29.1402439" rx="21.5686275" ry="21.5853659"></ellipse>
+                    <ellipse id="Oval-2-Copy" stroke="#CFDAE6" opacity="0.4" cx="179.019608" cy="138.146341" rx="23.7254902" ry="23.7439024"></ellipse>
+                    <ellipse id="Oval-2" fill="#BACAD9" opacity="0.5" cx="29.1176471" cy="29.1402439" rx="10.7843137" ry="10.7926829"></ellipse>
+                    <path d="M29.1176471,39.9329268 L29.1176471,18.347561 C23.1616351,18.347561 18.3333333,23.1796097 18.3333333,29.1402439 C18.3333333,35.1008781 23.1616351,39.9329268 29.1176471,39.9329268 Z" id="Oval-2" fill="#BACAD9"></path>
+                    <g id="Group-9" opacity="0.45" transform="translate(172.000000, 131.000000)" fill="#E6A1A6">
+                        <ellipse id="Oval-2-Copy-2" cx="7.01960784" cy="7.14634146" rx="6.47058824" ry="6.47560976"></ellipse>
+                        <path d="M0.549019608,13.6219512 C4.12262681,13.6219512 7.01960784,10.722722 7.01960784,7.14634146 C7.01960784,3.56996095 4.12262681,0.670731707 0.549019608,0.670731707 L0.549019608,13.6219512 Z" id="Oval-2-Copy-2" transform="translate(3.784314, 7.146341) scale(-1, 1) translate(-3.784314, -7.146341) "></path>
+                    </g>
+                    <ellipse id="Oval-10" fill="#CFDAE6" cx="218.382353" cy="138.685976" rx="1.61764706" ry="1.61890244"></ellipse>
+                    <ellipse id="Oval-10-Copy-2" fill="#E0B4B7" opacity="0.35" cx="179.558824" cy="175.381098" rx="1.61764706" ry="1.61890244"></ellipse>
+                    <ellipse id="Oval-10-Copy" fill="#E0B4B7" opacity="0.35" cx="180.098039" cy="102.530488" rx="2.15686275" ry="2.15853659"></ellipse>
+                    <path d="M28.9985381,29.9671598 L171.151018,132.876024" id="Path-11" stroke="#CFDAE6" opacity="0.8"></path>
+                </g>
+                <g id="Group-10" opacity="0.799999952" transform="translate(1054.100635, 36.659317) rotate(-11.000000) translate(-1054.100635, -36.659317) translate(1026.600635, 4.659317)">
+                    <ellipse id="Oval-7" stroke="#CFDAE6" stroke-width="0.941176471" cx="43.8135593" cy="32" rx="11.1864407" ry="11.2941176"></ellipse>
+                    <g id="Group-12" transform="translate(34.596774, 23.111111)" fill="#BACAD9">
+                        <ellipse id="Oval-7" opacity="0.45" cx="9.18534718" cy="8.88888889" rx="8.47457627" ry="8.55614973"></ellipse>
+                        <path d="M9.18534718,17.4450386 C13.8657264,17.4450386 17.6599235,13.6143199 17.6599235,8.88888889 C17.6599235,4.16345787 13.8657264,0.332739156 9.18534718,0.332739156 L9.18534718,17.4450386 Z" id="Oval-7"></path>
+                    </g>
+                    <path d="M34.6597385,24.809694 L5.71666084,4.76878945" id="Path-2" stroke="#CFDAE6" stroke-width="0.941176471"></path>
+                    <ellipse id="Oval" stroke="#CFDAE6" stroke-width="0.941176471" cx="3.26271186" cy="3.29411765" rx="3.26271186" ry="3.29411765"></ellipse>
+                    <ellipse id="Oval-Copy" fill="#F7E1AD" cx="2.79661017" cy="61.1764706" rx="2.79661017" ry="2.82352941"></ellipse>
+                    <path d="M34.6312443,39.2922712 L5.06366663,59.785082" id="Path-10" stroke="#CFDAE6" stroke-width="0.941176471"></path>
+                </g>
+                <g id="Group-19" opacity="0.33" transform="translate(1282.537219, 446.502867) rotate(-10.000000) translate(-1282.537219, -446.502867) translate(1142.537219, 327.502867)">
+                    <g id="Group-17" transform="translate(141.333539, 104.502742) rotate(275.000000) translate(-141.333539, -104.502742) translate(129.333539, 92.502742)" fill="#BACAD9">
+                        <circle id="Oval-4" opacity="0.45" cx="11.6666667" cy="11.6666667" r="11.6666667"></circle>
+                        <path d="M23.3333333,23.3333333 C23.3333333,16.8900113 18.1099887,11.6666667 11.6666667,11.6666667 C5.22334459,11.6666667 0,16.8900113 0,23.3333333 L23.3333333,23.3333333 Z" id="Oval-4" transform="translate(11.666667, 17.500000) scale(-1, -1) translate(-11.666667, -17.500000) "></path>
+                    </g>
+                    <circle id="Oval-5-Copy-6" fill="#CFDAE6" cx="201.833333" cy="87.5" r="5.83333333"></circle>
+                    <path d="M143.5,88.8126685 L155.070501,17.6038544" id="Path-17" stroke="#BACAD9" stroke-width="1.16666667"></path>
+                    <path d="M17.5,37.3333333 L127.466252,97.6449735" id="Path-18" stroke="#BACAD9" stroke-width="1.16666667"></path>
+                    <polyline id="Path-19" stroke="#CFDAE6" stroke-width="1.16666667" points="143.902597 120.302281 174.935455 231.571342 38.5 147.510847 126.366941 110.833333"></polyline>
+                    <path d="M159.833333,99.7453842 L195.416667,89.25" id="Path-20" stroke="#E0B4B7" stroke-width="1.16666667" opacity="0.6"></path>
+                    <path d="M205.333333,82.1372105 L238.719406,36.1666667" id="Path-24" stroke="#BACAD9" stroke-width="1.16666667"></path>
+                    <path d="M266.723424,132.231988 L207.083333,90.4166667" id="Path-25" stroke="#CFDAE6" stroke-width="1.16666667"></path>
+                    <circle id="Oval-5" fill="#C1D1E0" cx="156.916667" cy="8.75" r="8.75"></circle>
+                    <circle id="Oval-5-Copy-3" fill="#C1D1E0" cx="39.0833333" cy="148.75" r="5.25"></circle>
+                    <circle id="Oval-5-Copy-2" fill-opacity="0.6" fill="#D1DEED" cx="8.75" cy="33.25" r="8.75"></circle>
+                    <circle id="Oval-5-Copy-4" fill-opacity="0.6" fill="#D1DEED" cx="243.833333" cy="30.3333333" r="5.83333333"></circle>
+                    <circle id="Oval-5-Copy-5" fill="#E0B4B7" cx="175.583333" cy="232.75" r="5.25"></circle>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 1 - 1
src/assets/common.css

@@ -9,7 +9,7 @@
 }
 
 .body-login{
-	background: #F7F7F7 !important;
+	background: #ffffff !important;
 }
 
 .body-bg{

+ 77 - 116
src/client/Login.vue

@@ -10,20 +10,10 @@
                   alt=""
                   src="/static/assets/client-base-v4/image/template-logo.png"
                   style="margin-top: -40px; width: 100px; height: 100px"
-                  @click="showAccount()"
                 />
+                <div class="desc" data-v-7b9d9b52="">Prodog 希望帮助您更好的管理物料</div>
               </h1>
-              <div>
-                <input
-                  v-model="accountItem.accountName"
-                  autocomplete="off"
-                  type="text"
-                  class="form-control"
-                  :placeholder="$t('lang.login.accountInfo')"
-                  readonly="true"
-                  disabled="true"
-                />
-              </div>
+              
               <div>
                 <input
                   v-model="userName"
@@ -118,70 +108,35 @@
                   "
                 >
                   <div>
+                    <a-switch v-model:checked="rememberPassword" />
                     <label
                       for="inputPassword2"
                       class="form-control-static remember-password"
-                    >{{ $t("lang.login.rememberPassword") }}</label>
+                      style="margin-left: 1rem"
+                    >
+                      {{ $t("lang.login.rememberPassword") }}
+                    </label>
                   </div>
                   <div>
-                    <Switches
-                      v-model="rememberPassword"
-                      :selected="rememberPassword"
-                      :show-text="false"
-                      style="width: 50px"
-                      color="green"
-                      :type-bold="true"
-                    />
+                    <a class="reset_pass forget-password" @click="toForgetPassword()">{{
+                      $t("lang.login.forgetPassword")
+                    }}</a>
                   </div>
                 </div>
                 <div class="clear" />
               </div>
               <div>
-                <div class="left">
-                  <a class="btn btn-default submit" @click="login">{{
+                <div>
+                  <a class="btn btn-default submit" style="width: 100%" @click="login">{{
                     $t("lang.login.login")
                   }}</a>
                 </div>
                 <div class="clear" />
               </div>
               <div class="clearfix" />
-              <div class="separator">
-                <p class="float-left">
-                  <a class="reset_pass" @click="toForgetPassword()">{{
-                    $t("lang.login.forgetPassword")
-                  }}</a>
-                </p>
-                <p class="float-left">
-                  <a
-                    v-show="showAccountCount > 15"
-                    class="reset_pass"
-                    @click="toInitClient()"
-                  >{{ $t("lang.login.initClient") }}</a>
-                </p>
-                <p v-if="allowCreateNewCount" class="change_link float-left">
-                  <a class="to_register" @click="toRegister()">{{
-                    $t("lang.login.createAccount")
-                  }}</a>
-                </p>
-                <p v-if="allowSystemManagement" class="change_link float-left">
-                  <a class="to_register" @click="toSystemMenu()">{{
-                    $t("lang.login.systemManagment")
-                  }}</a>
-                </p>
-                <p v-if="showSystemConfigPage" class="change_link float-left">
-                  <a @click="toSystemConfigPage()"><i class="glyphicon glyphicon-cog" />{{
-                    $t("lang.login.systemConfig")
-                  }}</a>
-                </p>
-                <p v-if="allowDownloadApp" class="float-right">
-                  <a
-                    class="to_register"
-                    style="margin-right: 0px"
-                    @click="toDownloadPage()"
-                  >{{ $t("lang.login.appDownload") }}</a>
-                </p>
-                <!-- <div class="clearfix" /> -->
-                <br />
+              <div class="separator" />
+              <div v-if="authSetting != null && authSetting.length > 0">
+                <div class="other-login-method">其他登录方式</div>
                 <div class="login-third-box">
                   <div class="login-third">
                     <div class="login-third-items">
@@ -206,22 +161,30 @@
         <!-- <p>{{ $t("lang.login.copyright") }}</p> -->
         <div class="copyright">
           {{ $t("lang.login.copyright") }}
-          &lt;&lt;&lt;|&gt;&gt;&gt;
-          <a href="https://beian.miit.gov.cn/" target="_blank">沪ICP备11017244号 </a>&nbsp; &nbsp;
+          &nbsp; &nbsp;
+          <a href="https://beian.miit.gov.cn/" target="_blank">
+            沪ICP备11017244号
+          </a>
+          &nbsp; &nbsp;
           <a
             href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011202004082"
             target="_blank"
-          >沪公网安备 31011202004082号
+          >
+            沪公网安备31011202004082号
           </a>
           &nbsp; &nbsp;
           <a
             href="http://fw.scjgj.sh.gov.cn/lz/licenseLink.do?method=licenceView&amp;entyId=20120314203547743"
             target="_blank"
-          >工商亮照
+          >
+            工商亮照
           </a>
         </div>
       </div>
     </div>
+    <div class="account-name">
+      {{ accountItem.accountName }}
+    </div>
     <Loading v-if="loading" />
   </div>
 </template>
@@ -243,13 +206,8 @@ export default {
       userName: '',
       password: '',
       accountItem: {},
-      showAccountCount: 1,
       rememberPassword: false,
       accountDateTime: '',
-      allowCreateNewCount: false, // 是否允许创建账户
-      allowSystemManagement: false, // 是否允许打开系统管理界面
-      allowDownloadApp: false, // 是否允许下载APP
-      showSystemConfigPage: false, //显示设置系统参数
       showLeanwoText: false,
       languageSelected: 'zh-CN',
       loading: false,
@@ -282,17 +240,13 @@ export default {
   mounted: function () {
     $('body').attr('class', 'body-login');
     $('body').children(':first').attr('class', '');
-    var path = location.href;
-    if (path.indexOf('mesapp') > 0) {
-      this.showSystemConfigPage = true;
-    }
+ 
     this.initView();
     this.queryAllAuthSetting();
     this.unqiueAccountManagementDto();
 
     this.getCurrentDate();
 
-    // this.allowCreateNewCount = CustomerEnvironment.INDEX_SHOW_REGISTER;
     this.showLeanwoText = CustomerEnvironment.LOGIN_SHOW_LEANWO_TEXT;
   },
 
@@ -536,40 +490,11 @@ export default {
       });
     },
 
-    showAccount: function () {
-      var _self = this;
-      _self.showAccountCount++;
-    },
-    /**
-     * 跳转到注册页面
-     * @return {void}
-     */
-    toRegister: function () {
-      this.$router.push('/register');
-    },
-
-    /**
-     * 跳转到产品下载页面
-     */
-    toDownloadPage: function () {
-      this.$router.push('/register/app-download');
-    },
-
-    toInitClient: function () {
-      this.$router.push('/register/register-client');
-    },
 
     toForgetPassword: function () {
       this.$router.push('/retrievePassword');
     },
 
-    /**
-     * 跳转到系统管理界面下
-     * @author GuoZhiBo 20200420
-     */
-    toSystemMenu: function () {
-      this.$router.push('/dictionary/Login');
-    },
 
     /**
      * 获取服务端当前时间
@@ -602,17 +527,19 @@ export default {
       console.log('自动生成时间成功:' + this.accountDateTime);
     },
 
-    /**
-     * 跳转到系统配置页面
-     */
-    toSystemConfigPage: function () {
-      this.$router.push('/desktop/systemConfig');
-    },
   },
 };
 </script>
 
 <style scoped>
+.login{
+  /* background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('../assets/background.svg'); */
+  background-image: url('../assets/background.svg');
+  background-repeat: no-repeat;
+  background-position: center 110px;
+  background-size: 100%;
+  background-position: 50% 85%;
+}
 .login_wrapper {
   margin: 0px auto;
   padding-top: 5%;
@@ -682,7 +609,7 @@ export default {
 .separator {
   border-top: 1px solid #d8d8d8;
   margin-top: 10px;
-  padding-top: 10px;
+  padding-top: 5px;
 }
 
 .login_content {
@@ -707,7 +634,7 @@ export default {
   font: normal 25px Helvetica, Arial, sans-serif;
   letter-spacing: -0.05em;
   line-height: 20px;
-  margin: 10px 0 30px;
+  margin: 10px 0 20px;
 }
 
 .login_content h1:before,
@@ -840,7 +767,7 @@ export default {
   color: #555666;
 }
 .login-third {
-  margin: 6px 0;
+  margin: 0px 6px 6px 0;
   box-sizing: border-box;
   text-align: center;
   margin-left: 12px;
@@ -856,11 +783,45 @@ export default {
 }
 .login-third-item img {
   display: inline-block;
-  width: 32px;
-  height: 32px;
-  border-radius: 50% 50%;
+  width: 64px;
+  height: 64px;
+  border-radius: 10% 10%;
   background: #ccc;
   cursor: pointer;
-  margin-left: 12px;
+}
+
+.forget-password {
+  margin: 0 !important;
+  position: relative;
+  top: 0.5rem;
+}
+
+.copyright {
+  font-size: small;
+    position: fixed;
+    bottom: 0;
+    text-align: center;
+    width: 100%;
+}
+
+.desc{
+  margin-top: 12px;
+  margin-bottom: 2rem;
+  font-size: 14px;
+  letter-spacing: 0;
+  color: rgba(0, 0, 0, 0.65);
+}
+
+.account-name{
+  position: fixed;
+  top: 1rem;
+  right: 1rem;
+  color: rgba(0, 0, 0, 0.45);
+}
+
+.other-login-method{
+      text-align: left;
+    font-size: 12px;
+    margin-bottom: 0.4rem;
 }
 </style>

+ 26 - 0
src/client/top-nav-client-select.vue

@@ -27,6 +27,19 @@
       </ul>
     </li>
   </ul>
+  <a-modal v-model:visible="visible" title="新用户未设置所属部门或岗位">
+    <p>
+      尊敬的用户,
+    </p>
+    <p>
+      您好,
+      您的账号还未设置所属部门或岗位,因此您可能看不到任何数据。请联系您公司的管理员为您分配权限。
+    </p>
+    <template #footer>
+      <a-button @click="visible = false">确定</a-button>
+      <a-button @click="goHome">退出</a-button>
+    </template>
+  </a-modal>
 </template>
 
 <script>
@@ -50,6 +63,7 @@ export default {
     return {
       clientCanAccessList: [],
       loginClientName:'',
+      visible: false,
     };
   },
 
@@ -68,6 +82,8 @@ export default {
       ClientResourceV2.listClientCanAccess().then(baseListResponse => {
         if (baseListResponse.errorCode == 0) {
           _self.clientCanAccessList = baseListResponse.datas;
+        } else if(baseListResponse.errorCode == -1){
+          _self.visible = true;
         } else {
           Notify.error(_self.$t('lang.Notify.error'), baseListResponse.errorMessage, false);
         }
@@ -109,11 +125,21 @@ export default {
       TokenClientResource.queryTokenClient().then(baseObjectResponse => {
         if (baseObjectResponse.errorCode == 0) {
           _self.loginClientName = baseObjectResponse.data.clientName;
+        }else if (baseObjectResponse.errorCode == -1){
+          // add by jack 2024-04-09
+          // see http://wuzhixin.vip:8080/#/knowledge/1/markdown/viewer/1239
+          _self.visible = true;
+        }else{
+          Notify.error(_self.$t('lang.Notify.error'), baseObjectResponse.errorMessage, false);
         }
       }, errorData => {
         Common.processException(errorData);
       });
     },
+
+    goHome: function(){
+      window.location.href = Common.getRootPath() + '/';
+    },
   },
 };
 </script>

+ 1 - 1
src/locales/en-US.json

@@ -12,7 +12,7 @@
           "systemManagment": "System Managment", 
           "systemConfig": "System Config", 
           "appDownload": "APP Download", 
-          "copyright": "©2011 Shang Hai Leanwo Information Technology Co., Ltd Copyright.",
+          "copyright": "©2011-2014 Shang Hai Leanwo Information Technology Co., Ltd Copyright.",
           "verificationCodeCannotBeEmpty": "Verification Code Cannot Be Empty",
           "getVerificationCodeErrorMssage": "Get Verification Code Error Mssage",
           "loginFailure": "Login Failure",

+ 2 - 2
src/locales/zh-CN.json

@@ -3,7 +3,7 @@
     "login": {
       "login": "登陆",
       "accountInfo": "账套信息",
-      "pleaseInputUserName": "请输入用户电子邮件地址",
+      "pleaseInputUserName": "请输入用户",
       "pleaseInputPassword": "请输入密码",
       "pleaseInputVerificationCode": "请输入验证码",
       "rememberPassword": "记住密码",
@@ -13,7 +13,7 @@
       "systemManagment": "系统管理",
       "systemConfig": "系统配置",
       "appDownload": "APP下载",
-      "copyright": "©2011-现在 上海联物信息科技有限公司. 版权所有.",
+      "copyright": "©2011-2014 上海联物信息科技有限公司. 版权所有.",
       "getVerificationCode": "获取验证码",
       "getVerificationCodeErrorMssage": "用户名或密码不允许为空",
       "verificationCodeCannotBeEmpty": "验证码不允许为空",