From 2cfbc714c3e96e6f0f4cb69b4b1ee4f928c1c919 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: 星期一, 28 十一月 2022 16:48:47 +0800
Subject: [PATCH] 修改样式

---
 src/views/login/index.vue |  246 +++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 216 insertions(+), 30 deletions(-)

diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index e2a3bf2..78b072d 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -11,6 +11,50 @@
                 />
             </div>
         </div>
+
+      <el-dialog
+          title="账户到期提醒"
+          :visible.sync="dialogTip"
+          :close-on-click-modal="false"
+          width="45%"
+          top="28vh"
+          :show-close="false"
+          center>
+          <div class="dateTip">
+              <div v-if="isOverTime">尊敬的烟花爆竹生产、经营厂家,您的账户免费使用权限已过期(<span>截止到:{{deadline}}</span>),为不影响您的正常使用,请尽快缴(续)费,过期未缴费期间您的账户将不能继续登录使用。</div>
+              <div v-else>尊敬的烟花爆竹生产、经营厂家,您的账户免费使用权限即将过期,为不影响您的正常使用,请于<span>{{ deadline }}</span>之前缴(续)费,逾期未缴费您的账户将不能继续登录使用。</div>
+              <div style="margin-bottom: 10px">系统年度技术服务费人民币<span class="money">1800</span>元,点击下方“去缴费”即可进行缴(续)费操作。</div>
+              <div>感谢您的配合!</div>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="holdOn()">再等等</el-button>
+            <el-button type="primary" @click="toPay()">去缴费</el-button>
+          </span>
+      </el-dialog>
+      <el-dialog
+          title="缴(续)费须知"
+          :visible.sync="dialogPay"
+          :close-on-click-modal="false"
+          width="45%"
+          top="23vh"
+          @closed="isLogin()"
+          center>
+          <div class="payTip">
+              <div>
+                  <h2>付款方式:</h2>
+                  <span>苏州国科鸿宇智能科技有限公司</span>
+                  <div><span>纳税人识别号:</span><span>91320594MA1YCQQ60E</span></div>
+                  <div><span>开户行:</span><span>中国银行股份有限公司苏州独墅湖支行</span></div>
+                  <div><span>账号:</span><span>517073268476</span></div>
+                  <div><span>地址:</span><span>苏州工业园区若水路398号D0313</span></div>
+                  <div><span>联系电话:</span><span>0512-62872586</span></div>
+              </div>
+              <div class="payInfo">
+                  <h3>提醒:</h3>
+                  请您在完成付款之后,联系<br/>田老师 18796814417<br/>为您的账户进行续期,为您开具发票。
+              </div>
+          </div>
+      </el-dialog>
       <div class="bottom-container">
         <span class="bottom-container_title">中国科学院苏州纳米技术与纳米仿生研究所监制</span>
       </div>
@@ -34,14 +78,18 @@
   data() {
     return {
       websocket:'',
-      url:process.env.BASE_API.replace("http","ws").replace("https","wss"),
+      url: process.env.BASE_API.replace("http","ws").replace("https","wss"),
       action: 'login',
       screenWidth: '',
       screenHeight: '',
       logincontainer: 'login-container',
       isSafe: process.env.isSafe,
       titleName: '新疆维吾尔自治区烟花爆竹流向管理信息实名登记系统',
-      safeLoginTitle: '新疆维吾尔自治区烟花爆竹流向管理信息实名登记系统'
+      safeLoginTitle: '新疆维吾尔自治区烟花爆竹流向管理信息实名登记系统',
+      dialogTip: false,
+      dialogPay: false,
+      deadline: '',
+      isOverTime: true
     }
   },
   watch: {
@@ -74,7 +122,28 @@
         this.logincontainer = 'login-container'
       }
     },
-    handleLogin(loginForm) {
+    holdOn(){
+        const t = this
+        if(!t.isOverTime){
+            // 加载菜单
+            initRouter(t)
+            t.$router.replace('/enterprise/basic')
+        }
+        t.dialogTip = false
+    },
+    toPay(){
+        this.dialogTip = false
+        this.dialogPay = true
+    },
+      isLogin(){
+          const t = this
+          if(!t.isOverTime){
+              // 加载菜单
+              initRouter(t)
+              t.$router.replace('/enterprise/basic')
+          }
+      },
+      handleLogin(loginForm) {
       const _this = this
       _this.$refs.getdata.submitLoading = false
       _this.loading = true
@@ -85,34 +154,80 @@
           if (res.code == 200) {
             _this.loading = false
             const data = res.result
-            if (data.type != 1 && data.type != 2) {
-              if (!data.roles || data.roles.length == 0) {
-                // 验证返回的roles是否是一个非空数组
-                _this.$store.commit('SET_ROLES', [])
-                parseError({
-                  error: '该用户没有权限登录,请联系所配置管理员分配角色',
-                  vm: _this
-                })
-                // reject('用户未分配角色,没有权限登录')
-                return
-              }
+            if(data.deadline && data.deadline != null){
+                _this.deadline = data.deadline;
+                const date = new Date(_this.deadline);
+                if(date.getTime() < Date.now()){
+                    _this.isOverTime = true
+                    _this.dialogTip = true
+                    return
+                }else{
+                    _this.isOverTime = false
+                    if (data.type != 1 && data.type != 2) {
+                        if (!data.roles || data.roles.length == 0) {
+                            // 验证返回的roles是否是一个非空数组
+                            _this.$store.commit('SET_ROLES', [])
+                            parseError({
+                                error: '该用户没有权限登录,请联系所配置管理员分配角色',
+                                vm: _this
+                            })
+                            // reject('用户未分配角色,没有权限登录')
+                            return
+                        }
+                    }
+                    this._initConnect(data.id)
+                    _this.$store.commit('SET_ROLES', data.roles)
+                    Cookies.set('roles', JSON.stringify(data.roles))
+                    setToken(data.token)
+                    Cookies.set('roleType',data.roleType)
+                    Cookies.set('isSupervision',data.companyid)
+                    Cookies.set('company',data.company)
+                    Cookies.set('userName', data.username)
+                    Cookies.set('name', data.username)
+                    Cookies.set('userId', data.id)
+                    Cookies.set('token_expired_at', data.tokenexpired)
+                    _this.$store.commit('SET_NAME', data.username)
+                    _this.$store.commit('SET_USER_TYPE', data.type)
+                    const nTime = date.getTime() - Date.now();
+                    console.log('还剩' + Math.floor(nTime / 86400000))
+                    if(Math.floor(nTime / 86400000)>30){
+                        // 加载菜单
+                        initRouter(_this)
+                        _this.$router.replace('/enterprise/basic')
+                    }else{
+                        this.dialogTip = true
+                    }
+                }
+            }else{
+                if (data.type != 1 && data.type != 2) {
+                    if (!data.roles || data.roles.length == 0) {
+                        // 验证返回的roles是否是一个非空数组
+                        _this.$store.commit('SET_ROLES', [])
+                        parseError({
+                            error: '该用户没有权限登录,请联系所配置管理员分配角色',
+                            vm: _this
+                        })
+                        // reject('用户未分配角色,没有权限登录')
+                        return
+                    }
+                }
+                this._initConnect(data.id)
+                _this.$store.commit('SET_ROLES', data.roles)
+                Cookies.set('roles', JSON.stringify(data.roles))
+                setToken(data.token)
+                Cookies.set('roleType',data.roleType)
+                Cookies.set('isSupervision',data.companyid)
+                Cookies.set('company',data.company)
+                Cookies.set('userName', data.username)
+                Cookies.set('name', data.username)
+                Cookies.set('userId', data.id)
+                Cookies.set('token_expired_at', data.tokenexpired)
+                _this.$store.commit('SET_NAME', data.username)
+                _this.$store.commit('SET_USER_TYPE', data.type)
+                // 加载菜单
+                initRouter(_this)
+                _this.$router.replace('/enterprise/basic')
             }
-            this._initConnect(data.id)
-            _this.$store.commit('SET_ROLES', data.roles)
-            Cookies.set('roles', JSON.stringify(data.roles))
-            setToken(data.token)
-            Cookies.set('roleType',data.roleType)
-            Cookies.set('isSupervision',data.companyid)
-            Cookies.set('company',data.company)
-            Cookies.set('userName', data.username)
-            Cookies.set('name', data.username)
-            Cookies.set('userId', data.id)
-            Cookies.set('token_expired_at', data.tokenexpired)
-            _this.$store.commit('SET_NAME', data.username)
-            _this.$store.commit('SET_USER_TYPE', data.type)
-            // 加载菜单
-            initRouter(_this)
-           _this.$router.replace('/enterprise/basic')
           } else {
             _this.$message({
               showClose: true,
@@ -324,6 +439,77 @@
       }
   }
 
+    .dateTip{
+        text-indent: 36px;
+        line-height: 1.5;
+        font-size:18px;
+
+        &>div{
+            margin-bottom: 10px;
+
+            &:last-of-type{
+                margin-bottom: 0;
+            }
+
+            span{
+                color: #ff0000;
+                margin: 0 6px;
+            }
+
+            .money{
+                font-size: 22px;
+                font-weight: bolder;
+                color: #034ea2;
+            }
+        }
+    }
+
+    .payTip{
+        &>div{
+            line-height: 1.5;
+            font-size: 18px;
+            h2{
+                margin-top: 0;
+                margin-bottom: 6px;
+            }
+            &>span{
+                font-size: 22px;
+                font-weight: bolder;
+                display: block;
+                color: #034ea2;
+                margin-bottom: 6px;
+            }
+            div{
+                display: flex;
+                align-items: center;
+
+                &>span{
+                    &:first-child{
+                        width: 25%;
+                        text-align: justify;
+                        margin-right: 20px;
+                    }
+                    &:last-of-type{
+                        width: calc(75% - 20px);
+                        text-align: left;
+                    }
+                }
+            }
+        }
+        .payInfo{
+            line-height: 1.8;
+            margin-top: 15px;
+            width: 100%;
+            padding: 2% 4%;
+            box-sizing: border-box;
+            background: #ffebb2;
+            border-radius: 8px;
+            h3{
+                margin-top: 0;
+                margin-bottom: 6px;
+            }
+        }
+    }
 }
 
 .login-container-1 {

--
Gitblit v1.9.2