system-clients 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +16 -16
- package/SystemClient.iml +8 -8
- package/build/webpack.base.conf.js +85 -85
- package/build.gradle +6 -6
- package/examples/LoginPage/App.vue +21 -21
- package/examples/LoginPage/index.html +11 -11
- package/examples/LoginPage/main.js +15 -15
- package/index.html +21 -21
- package/package.json +1 -1
- package/src/App.vue +24 -24
- package/src/LodopFuncs.js +155 -155
- package/src/components/Main.vue +935 -935
- package/src/components/TabButton.vue +201 -201
- package/src/components/Tabs.vue +67 -67
- package/src/components/Util.js +343 -343
- package/src/components/addressManage/AddressCascadingMenu.vue +145 -145
- package/src/components/common/ProgressBase.vue +83 -83
- package/src/components/equipment/EquipmentManage.vue +83 -83
- package/src/components/equipment/PcAdd.vue +115 -115
- package/src/components/equipment/PcList.vue +119 -119
- package/src/components/equipment/PcManage.vue +61 -61
- package/src/components/equipment/PhoneAdd.vue +118 -118
- package/src/components/equipment/PhoneList.vue +113 -113
- package/src/components/equipment/PhoneManage.vue +61 -61
- package/src/components/equipment/PosAdd.vue +319 -319
- package/src/components/equipment/PosList.vue +292 -292
- package/src/components/equipment/PosManage.vue +138 -138
- package/src/components/equipment/PosManageBoth.vue +125 -125
- package/src/components/equipment/PosParamAdd.vue +236 -236
- package/src/components/equipment/PosParamList.vue +121 -121
- package/src/components/equipment/PosParamManage.vue +51 -51
- package/src/components/materialManage/materialData.vue +44 -44
- package/src/components/materialManage/materialList.vue +255 -255
- package/src/components/parammanage/ParamManage.vue +42 -42
- package/src/components/parammanage/ParamPage.vue +337 -337
- package/src/components/parammanage/ParamPages.vue +222 -222
- package/src/components/parammanage/SinglePage.vue +235 -235
- package/src/components/parammanage/SinglePages.vue +167 -167
- package/src/components/server/AddChangeMsg.vue +66 -66
- package/src/components/server/ChangeDeclare.vue +45 -45
- package/src/components/server/ImageVieweTest.vue +56 -56
- package/src/components/server/ImageViewer.vue +350 -350
- package/src/components/server/LeftTree.vue +111 -111
- package/src/components/server/LoadData.vue +55 -55
- package/src/components/server/Login.vue +615 -615
- package/src/components/server/LoginPage.vue +235 -235
- package/src/components/server/LoginView.vue +128 -128
- package/src/components/server/Menu.vue +188 -188
- package/src/components/server/ModifyPw.vue +126 -126
- package/src/components/server/PcdBuildingSelect.vue +243 -243
- package/src/components/server/ResSelect.vue +19 -7
- package/src/components/server/ResSelectGroup.vue +211 -211
- package/src/components/server/RightTree.vue +348 -348
- package/src/components/server/RoleSelector.vue +90 -90
- package/src/components/server/TestResSelect.vue +58 -58
- package/src/components/server/TestResSelectGroup.vue +388 -388
- package/src/filiale/baole/Login.vue +570 -570
- package/src/filiale/baole/system.js +5 -5
- package/src/filiale/bayan/PosAdd.vue +368 -368
- package/src/filiale/bayan/PosList.vue +341 -341
- package/src/filiale/bayan/PosManage.vue +138 -138
- package/src/filiale/bayan/system.js +6 -6
- package/src/filiale/chengtou/Login.vue +539 -539
- package/src/filiale/chengtou/system.js +5 -5
- package/src/filiale/dongguan/Login.vue +902 -902
- package/src/filiale/dongguan/Main.vue +717 -717
- package/src/filiale/dongguan/system.js +6 -6
- package/src/filiale/furuike/Login.vue +587 -587
- package/src/filiale/furuike/Main.vue +840 -840
- package/src/filiale/furuike/system.js +7 -7
- package/src/filiale/gehua/Main.vue +809 -809
- package/src/filiale/gehua/system.js +6 -6
- package/src/filiale/konggang/Login.vue +472 -472
- package/src/filiale/konggang/system.js +7 -7
- package/src/filiale/qianneng/Login.vue +584 -584
- package/src/filiale/qianneng/Main.vue +818 -818
- package/src/filiale/qianneng/ModifyPw.vue +108 -108
- package/src/filiale/qianneng/system.js +11 -11
- package/src/filiale/rizhao/LeftTree.vue +111 -111
- package/src/filiale/rizhao/Login.vue +793 -793
- package/src/filiale/rizhao/Main.vue +611 -611
- package/src/filiale/rizhao/system.js +14 -14
- package/src/filiale/ruihua/Login.vue +576 -576
- package/src/filiale/ruihua/Main.vue +977 -977
- package/src/filiale/ruihua/system.js +6 -6
- package/src/filiale/shiquan/Login.vue +566 -566
- package/src/filiale/shiquan/system.js +8 -8
- package/src/filiale/tianyi/Login.vue +573 -573
- package/src/filiale/tianyi/system.js +5 -5
- package/src/filiale/tongchuan/Login.vue +563 -563
- package/src/filiale/tongchuan/Main.vue +1021 -1021
- package/src/filiale/tongchuan/system.js +7 -7
- package/src/filiale/weinan/Main.vue +924 -924
- package/src/filiale/weinan/system.js +7 -7
- package/src/filiale/wenxi/Login.vue +537 -537
- package/src/filiale/wenxi/Main.vue +787 -787
- package/src/filiale/wenxi/system.js +10 -10
- package/src/filiale/wuhai/LeftTree.vue +141 -141
- package/src/filiale/wuhai/Main.vue +810 -810
- package/src/filiale/wuhai/system.js +10 -10
- package/src/filiale/yuchuan/Login.vue +891 -891
- package/src/filiale/yuchuan/Main.vue +866 -866
- package/src/filiale/yuchuan/system.js +10 -10
- package/src/filiale/zhoukou/Main.vue +809 -809
- package/src/filiale/zhoukou/system.js +6 -6
- package/src/plugins/EncryptUtil.js +53 -53
- package/src/plugins/GetLoginInfoService.js +480 -480
- package/src/plugins/HeatGetLoginInfoService.js +491 -491
- package/src/plugins/validation.js +15 -15
- package/src/project/State.js +17 -17
- package/src/stores/AppData.js +38 -38
- package/src/stores/HeatAppData.js +38 -38
- package/src/styles/fonts/glyphicons-halflings-regular.svg +288 -288
- package/src/styles/less/.csscomb.json +304 -304
- package/src/styles/less/.csslintrc +19 -19
- package/src/styles/less/alerts.less +73 -73
- package/src/styles/less/aofeng/animate.min.css +10 -10
- package/src/styles/less/aofeng/expandcss.less +569 -569
- package/src/styles/less/aofeng/login.less +367 -367
- package/src/styles/less/aofeng/standard.less +2507 -2507
- package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +690 -690
- package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -1586
- package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -2650
- package/src/styles/less/aofeng/themeOne.less +17 -17
- package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -415
- package/src/styles/less/aofeng/themeTwo.less +3 -3
- package/src/styles/less/badges.less +66 -66
- package/src/styles/less/bootstrap.less +66 -66
- package/src/styles/less/breadcrumbs.less +26 -26
- package/src/styles/less/button-groups.less +247 -247
- package/src/styles/less/buttons.less +172 -172
- package/src/styles/less/carousel.less +269 -269
- package/src/styles/less/close.less +34 -34
- package/src/styles/less/code.less +69 -69
- package/src/styles/less/component-animations.less +33 -33
- package/src/styles/less/dropdowns.less +216 -216
- package/src/styles/less/fonts-list.less +25 -25
- package/src/styles/less/forms.less +626 -626
- package/src/styles/less/glyphicons.less +305 -305
- package/src/styles/less/grid.less +84 -84
- package/src/styles/less/input-groups.less +167 -167
- package/src/styles/less/jumbotron.less +52 -52
- package/src/styles/less/labels.less +64 -64
- package/src/styles/less/list-group.less +141 -141
- package/src/styles/less/manageStyle/manageChile.less +180 -180
- package/src/styles/less/manageStyle/manageStyle/manageChile.less +180 -180
- package/src/styles/less/manageStyle/manageStyle/manageStyle.less +1102 -1102
- package/src/styles/less/manageStyle/manageStyle/safeStyle.less +498 -498
- package/src/styles/less/manageStyle/manageStyle.less +1102 -1102
- package/src/styles/less/manageStyle/safeStyle.less +498 -498
- package/src/styles/less/media.less +66 -66
- package/src/styles/less/mixins/alerts.less +14 -14
- package/src/styles/less/mixins/background-variant.less +9 -9
- package/src/styles/less/mixins/border-radius.less +18 -18
- package/src/styles/less/mixins/buttons.less +69 -69
- package/src/styles/less/mixins/center-block.less +7 -7
- package/src/styles/less/mixins/clearfix.less +22 -22
- package/src/styles/less/mixins/forms.less +90 -90
- package/src/styles/less/mixins/gradients.less +59 -59
- package/src/styles/less/mixins/grid-framework.less +92 -92
- package/src/styles/less/mixins/grid.less +122 -122
- package/src/styles/less/mixins/hide-text.less +21 -21
- package/src/styles/less/mixins/image.less +33 -33
- package/src/styles/less/mixins/labels.less +12 -12
- package/src/styles/less/mixins/list-group.less +30 -30
- package/src/styles/less/mixins/nav-divider.less +10 -10
- package/src/styles/less/mixins/nav-vertical-align.less +9 -9
- package/src/styles/less/mixins/opacity.less +8 -8
- package/src/styles/less/mixins/pagination.less +24 -24
- package/src/styles/less/mixins/panels.less +24 -24
- package/src/styles/less/mixins/progress-bar.less +10 -10
- package/src/styles/less/mixins/reset-filter.less +8 -8
- package/src/styles/less/mixins/reset-text.less +18 -18
- package/src/styles/less/mixins/resize.less +6 -6
- package/src/styles/less/mixins/responsive-visibility.less +15 -15
- package/src/styles/less/mixins/size.less +10 -10
- package/src/styles/less/mixins/tab-focus.less +9 -9
- package/src/styles/less/mixins/table-row.less +44 -44
- package/src/styles/less/mixins/text-emphasis.less +9 -9
- package/src/styles/less/mixins/text-overflow.less +8 -8
- package/src/styles/less/mixins/vendor-prefixes.less +227 -227
- package/src/styles/less/mixins.less +40 -40
- package/src/styles/less/modals.less +151 -151
- package/src/styles/less/navbar.less +660 -660
- package/src/styles/less/navs.less +285 -285
- package/src/styles/less/normalize.less +424 -424
- package/src/styles/less/pager.less +76 -76
- package/src/styles/less/pagination.less +89 -89
- package/src/styles/less/panels.less +275 -275
- package/src/styles/less/popovers.less +131 -131
- package/src/styles/less/print.less +101 -101
- package/src/styles/less/progress-bars.less +87 -87
- package/src/styles/less/responsive-embed.less +35 -35
- package/src/styles/less/responsive-utilities.less +194 -194
- package/src/styles/less/scaffolding.less +161 -161
- package/src/styles/less/stand.less +207 -207
- package/src/styles/less/tables.less +312 -312
- package/src/styles/less/theme.less +291 -291
- package/src/styles/less/thumbnails.less +36 -36
- package/src/styles/less/tooltip.less +102 -102
- package/src/styles/less/type.less +316 -316
- package/src/styles/less/utilities.less +55 -55
- package/src/styles/less/variables.less +899 -899
- package/src/styles/less/wells.less +29 -29
- package/src/system.js +122 -122
- package/src/util/Daiban.json +12 -12
- package/yarn-error.log +6896 -0
- package/package-lock.json +0 -11773
@@ -1,615 +1,615 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="syslogin">
|
3
|
-
<div class="login-title" >
|
4
|
-
<div class="row auto">
|
5
|
-
<marquee style="width:80%;margin-top:25px"><span style="font-size: 1.8rem;color: white;">{{notice}}</span></marquee>
|
6
|
-
<div class="login-title-chi" style="white-space: nowrap;margin-right:0">
|
7
|
-
<button class="my_button_search button_spacing" style="margin-right: 5px" title="点击清除浏览器缓存" @click.stop="delCookie">
|
8
|
-
<img
|
9
|
-
src="../../assets/clear-cookie.png" style="height: 25px; width: 95px;margin-bottom: 3px;">
|
10
|
-
</button>
|
11
|
-
<span v-if="$login.versionTime">构建时间:{{ vTime }}</span>
|
12
|
-
<div v-if="titleShow">
|
13
|
-
<img src="../../../static/newStyle/login-info.png"/>
|
14
|
-
<span @click="showus=true">关于我们</span>
|
15
|
-
</div>
|
16
|
-
<!-- <img src="../../../static/newStyle/login-con.png"/>-->
|
17
|
-
<!-- <span>联系我们</span>-->
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<modal :show.sync="showus" backdrop="true" width="50%" style="width:auto;">
|
23
|
-
<article slot="modal-body" class="modal-body" >
|
24
|
-
<img style="height:100%;width:100%" src="../../../static/newStyle/about-us.png"/>
|
25
|
-
</article>
|
26
|
-
<footer slot="modal-footer" class="modal-footer">
|
27
|
-
</footer>
|
28
|
-
</modal>
|
29
|
-
|
30
|
-
|
31
|
-
<div class="logoew" v-if="logoandroid" >
|
32
|
-
<div v-if="logoandroid" class="imglogo"></div>
|
33
|
-
<p class="logocontent">燃气客服系统Android版</p>
|
34
|
-
<p class="logofooter">(仅浏览器扫描)</p>
|
35
|
-
</div>
|
36
|
-
<!--输入框-->
|
37
|
-
<div class="loginmain" v-show="showlogin">
|
38
|
-
<!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
|
39
|
-
<div class="loginmain-left">
|
40
|
-
<img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
|
41
|
-
</div>
|
42
|
-
<div class="loginmain-right">
|
43
|
-
|
44
|
-
<p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
|
45
|
-
|
46
|
-
<form v-show="!login">
|
47
|
-
<!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
|
48
|
-
<div class="login-input">
|
49
|
-
<img src="../../../static/newStyle/login-user.png"/>
|
50
|
-
<input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
|
51
|
-
</div>
|
52
|
-
<div class="login-input">
|
53
|
-
<img src="../../../static/newStyle/login-pwd.png"/>
|
54
|
-
<input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
|
55
|
-
@keyup.enter="confirm('key')"/>
|
56
|
-
</div>
|
57
|
-
<div class="login-input-1" v-if="$login.Verification">
|
58
|
-
<img src="../../../static/newStyle/login-check.png"/>
|
59
|
-
<input v-if="$login.VerificationType === 'math'" class="login-check" type="text" placeholder="请输入右侧运算结果"
|
60
|
-
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
61
|
-
<input v-if="$login.VerificationType === 'mix'" class="login-check" type="text" placeholder="请输入验证码"
|
62
|
-
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
63
|
-
</div>
|
64
|
-
<div class="login-input-2" >
|
65
|
-
<input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
|
66
|
-
type="button" @click="createCode" v-model="checkCode"/>
|
67
|
-
</div>
|
68
|
-
<div class="login-bt">
|
69
|
-
<button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
|
70
|
-
</div>
|
71
|
-
<!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
|
72
|
-
<!-- @keyup.enter="confirm('key')">-->
|
73
|
-
<!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
|
74
|
-
<!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
|
75
|
-
<!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
|
76
|
-
<!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
|
77
|
-
|
78
|
-
<!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
|
79
|
-
<!-- <span @click="register()">还没有注册,现在注册>>></span> -->
|
80
|
-
</form>
|
81
|
-
<div v-show="login" class="login_load">
|
82
|
-
<img src="../../../static/newStyle/login-do.gif">
|
83
|
-
</div>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
<div v-show="!showlogin && isSso" class="loginmain-img">
|
87
|
-
<div class="ssoLoadingImg">
|
88
|
-
<img src="../../../static/newStyle/login-do.gif">
|
89
|
-
</div>
|
90
|
-
</div>
|
91
|
-
<div class="login-foot" v-show="false">
|
92
|
-
技术支持:西安奥枫软件有限公司
|
93
|
-
</div>
|
94
|
-
<div class="login-foot" v-show="$login.BAinformation">
|
95
|
-
{{{ $login.BAinformation }}}
|
96
|
-
</div>
|
97
|
-
|
98
|
-
<modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
|
99
|
-
<header slot="modal-header" style="height: 8vh" class="modal-header">
|
100
|
-
<!--<h4 class="modal-title">登录信息</h4>-->
|
101
|
-
</header>
|
102
|
-
<article slot="modal-body" class="modal-body">
|
103
|
-
<form class="form-horizontal">
|
104
|
-
<div class="row">
|
105
|
-
<div class="col-sm-12 form-group">
|
106
|
-
<label class="col-sm-5 ">当前登录人:</label>
|
107
|
-
<label style="font-weight:normal">{{$login.f.name}}</label>
|
108
|
-
</div>
|
109
|
-
<!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
|
110
|
-
<!--<label class="col-sm-5 ">组 织 编 码:</label>-->
|
111
|
-
<!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
|
112
|
-
<!-- <div class="col-sm-7">
|
113
|
-
<span >{{$login.f.number}}</span>
|
114
|
-
</div> -->
|
115
|
-
<!--</div>-->
|
116
|
-
<div class="col-sm-12 form-group">
|
117
|
-
<label class="col-sm-5">所在销售点:</label>
|
118
|
-
<label style="font-weight:normal">{{$login.f.deps}}</label>
|
119
|
-
<!-- <div class="col-sm-7">
|
120
|
-
<span >{{$login.f.deps}}</span>
|
121
|
-
</div> -->
|
122
|
-
</div>
|
123
|
-
<div class="col-sm-12 " v-if="AppDaiBan !==''">
|
124
|
-
<label class="col-sm-2">报装待办:</label>
|
125
|
-
<span style="font-weight:normal">{{AppDaiBan}}</span>
|
126
|
-
</div>
|
127
|
-
<div class="col-sm-12 " v-if="OrderDaiBan !==''">
|
128
|
-
<label class="col-sm-2">预约待办:</label>
|
129
|
-
<span style="font-weight:normal">{{OrderDaiBan}}</span>
|
130
|
-
</div>
|
131
|
-
<div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
|
132
|
-
<label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
|
133
|
-
<span style="font-weight:normal">{{daibanitem.text}}</span>
|
134
|
-
</div>
|
135
|
-
</div>
|
136
|
-
</form>
|
137
|
-
</article>
|
138
|
-
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
139
|
-
<button class="button_search" @click="depPromptConfirm">确认</button>
|
140
|
-
<button class="button_clear" @click="depPromptCancel">取消</button>
|
141
|
-
</footer>
|
142
|
-
</modal>
|
143
|
-
|
144
|
-
<!-- 修改密码组件 -->
|
145
|
-
<modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
|
146
|
-
</div>
|
147
|
-
|
148
|
-
</template>
|
149
|
-
|
150
|
-
<script>
|
151
|
-
import co from 'co'
|
152
|
-
import $ from 'jquery'
|
153
|
-
import Vue from 'vue'
|
154
|
-
import {HttpResetClass} from 'vue-client'
|
155
|
-
|
156
|
-
let daibanJson = require('../../util/Daiban.json')
|
157
|
-
|
158
|
-
|
159
|
-
let saveGen = function *(self) {
|
160
|
-
try {
|
161
|
-
if(self.$login){
|
162
|
-
// 账号ename,密码password,是否显示异地登陆
|
163
|
-
yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi)
|
164
|
-
}
|
165
|
-
if(self.$appdata){
|
166
|
-
yield self.$appdata.load()
|
167
|
-
}
|
168
|
-
if (Vue.$heatCompatibility) {
|
169
|
-
try {
|
170
|
-
if(self.$loginHeat){
|
171
|
-
yield self.$loginHeat.login(self.model.ename, self.model.password)
|
172
|
-
}
|
173
|
-
if(self.$appdataHeat){
|
174
|
-
yield self.$appdataHeat.load()
|
175
|
-
}
|
176
|
-
} catch (e) {
|
177
|
-
console.log('热力系统登陆失败!')
|
178
|
-
}
|
179
|
-
}
|
180
|
-
yield self.$getConfig(self, 'Login')
|
181
|
-
console.log('登录配置', self.config)
|
182
|
-
if (self.config.isMac) {
|
183
|
-
// 获取该登录人分公司下的mac配置
|
184
|
-
let getMacs = yield self.$resetpost('api/af-system/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
185
|
-
resolveMsg: null,
|
186
|
-
rejectMsg: null
|
187
|
-
}).catch(() => {
|
188
|
-
throw new Error('获取mac配置失败')
|
189
|
-
})
|
190
|
-
console.log('MAC地址信息', getMacs)
|
191
|
-
// 获取本地mac地址
|
192
|
-
let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
|
193
|
-
resolveMsg: null,
|
194
|
-
rejectMsg: null
|
195
|
-
}).catch(() => {
|
196
|
-
throw new Error('获取本地mac配置失败')
|
197
|
-
})
|
198
|
-
console.log('本地MAC地址信息', getLocalMac)
|
199
|
-
// 对Mac地址进行匹配
|
200
|
-
let macValidate = false
|
201
|
-
for (let i = 0; i < getLocalMac.data.mac.length; i++) {
|
202
|
-
for (let j = 0; j < getMacs.data.length; j++) {
|
203
|
-
if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
|
204
|
-
macValidate = true
|
205
|
-
}
|
206
|
-
}
|
207
|
-
}
|
208
|
-
if (!macValidate) {
|
209
|
-
throw new Error('Mac地址验证失败, 请联系管理员!!')
|
210
|
-
}
|
211
|
-
}
|
212
|
-
console.log(self.$login.depPrompt)
|
213
|
-
// 弱口令验证
|
214
|
-
//跳转过来的不进行验证
|
215
|
-
if ((!self.otherLogin) && self.config.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
|
216
|
-
self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
|
217
|
-
self.modifyPwShow = true
|
218
|
-
})
|
219
|
-
} else if ((!self.otherLogin) && self.$login.depPrompt) {
|
220
|
-
self.depPromptShow = true
|
221
|
-
if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
|
222
|
-
// 获取待办
|
223
|
-
self.getDaiBan()
|
224
|
-
}
|
225
|
-
if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
|
226
|
-
// 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
|
227
|
-
self.getDaiBanA()
|
228
|
-
}
|
229
|
-
} else {
|
230
|
-
self.$goto('home-page', {functions: self.$login.f,config: self.config})
|
231
|
-
if (self.$login) {
|
232
|
-
console.log('登录信息', self.$login.f)
|
233
|
-
global.login=self.$login.f
|
234
|
-
console.log('登录信息', global.login)
|
235
|
-
}
|
236
|
-
}
|
237
|
-
} catch (ret) {
|
238
|
-
console.error('登录失败', ret)
|
239
|
-
let msg
|
240
|
-
if (ret instanceof Error) {
|
241
|
-
msg = ret
|
242
|
-
}
|
243
|
-
if (ret.status === 0) {
|
244
|
-
msg = '服务连接错误,请确认服务状态'
|
245
|
-
} else if (ret.status === 401) {
|
246
|
-
msg = ret.data
|
247
|
-
} else if (ret.status === 710) {
|
248
|
-
msg = ret.data
|
249
|
-
} else {
|
250
|
-
msg = ret.data
|
251
|
-
}
|
252
|
-
self.createCode()
|
253
|
-
self.picLyanzhengma = ''
|
254
|
-
yield self.$showMessage(msg)
|
255
|
-
self.model.ename = ''
|
256
|
-
self.model.password = ''
|
257
|
-
self.login = false
|
258
|
-
if (self.isSso) {
|
259
|
-
if (window.parent && window.parent !== window) {
|
260
|
-
window.parent.postMessage('reload', '*')
|
261
|
-
}
|
262
|
-
}
|
263
|
-
$('form').fadeIn(500)
|
264
|
-
}
|
265
|
-
}
|
266
|
-
export default {
|
267
|
-
title: '登录',
|
268
|
-
async ready () {
|
269
|
-
this.titleShow = this.$appdata.getSingleValue('关于我们')
|
270
|
-
window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
|
271
|
-
this.vTime = this.format(new Date(window.versionTime));
|
272
|
-
$('#login-button').click(function (event) {
|
273
|
-
event.preventDefault()
|
274
|
-
$('form').fadeOut(500)
|
275
|
-
})
|
276
|
-
if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
|
277
|
-
let url = window.location.search.split('?')[1]
|
278
|
-
let obj = {}
|
279
|
-
for (let params of url.split("&")) {
|
280
|
-
let kv = params.split("=")
|
281
|
-
obj[kv[0]] = kv[1]
|
282
|
-
}
|
283
|
-
console.log('参数', obj)
|
284
|
-
if (window.location.search.indexOf('ticket')) {
|
285
|
-
this.isSso = true
|
286
|
-
this.showlogin = false
|
287
|
-
}
|
288
|
-
this.model.ename = window.atob(obj.af_key)
|
289
|
-
this.model.password = window.atob(obj.af_n)
|
290
|
-
this.otherLogin = true
|
291
|
-
this.confirm()
|
292
|
-
}else{
|
293
|
-
//跳转不需要验证码
|
294
|
-
this.createCode()
|
295
|
-
}
|
296
|
-
console.log(this.$login)
|
297
|
-
},
|
298
|
-
data () {
|
299
|
-
return {
|
300
|
-
vTime: '',
|
301
|
-
image:{
|
302
|
-
img1: '/images/newStyle/login-info.png',
|
303
|
-
img2: '/images/newStyle/login-con.png',
|
304
|
-
img3: '/images/newStyle/login-left.png',
|
305
|
-
img4: '/images/newStyle/login-user.png',
|
306
|
-
img5: '/images/newStyle/login-pwd.png',
|
307
|
-
img6: '/images/newStyle/login-check.png',
|
308
|
-
img7: '/images/newStyle/login-do.png',
|
309
|
-
},
|
310
|
-
config: {
|
311
|
-
isMac: false,
|
312
|
-
depPrompt: false,
|
313
|
-
weakPassword: false,
|
314
|
-
title: '燃气客服系统',
|
315
|
-
distanceLogin: false,
|
316
|
-
// 那些角色可以定时获取预约提示
|
317
|
-
isTip : false,
|
318
|
-
// 那些角色可以定时获取预约提示
|
319
|
-
msgRole : '预约处理人员',
|
320
|
-
// 定时获取提示间隔 单位:分钟
|
321
|
-
times: 25,
|
322
|
-
approve: false, // 是否获取审核提醒
|
323
|
-
approveTimes: 1 // 审核时间见间隔
|
324
|
-
},
|
325
|
-
titleShow: true, //标题显示
|
326
|
-
otherLogin:false,
|
327
|
-
login: false,
|
328
|
-
depPromptShow: false,
|
329
|
-
model: {},
|
330
|
-
show: false,
|
331
|
-
checkCode: '',
|
332
|
-
login_do:true,
|
333
|
-
picLyanzhengma: '',
|
334
|
-
operationResult: 0,
|
335
|
-
// 修改密码弹框展示
|
336
|
-
modifyPwShow: false,
|
337
|
-
logoandroid:false,
|
338
|
-
showus:false,
|
339
|
-
notice:'',
|
340
|
-
loginotherflag :true,
|
341
|
-
// 报建待办
|
342
|
-
AppDaiBan: '',
|
343
|
-
//安检待办
|
344
|
-
safecheckDaiBan:[],
|
345
|
-
// 预约待处理
|
346
|
-
OrderDaiBan: '',
|
347
|
-
showlogin: true,
|
348
|
-
isSso: false
|
349
|
-
}
|
350
|
-
},
|
351
|
-
methods: {
|
352
|
-
//格式化时间
|
353
|
-
format(dat){
|
354
|
-
//获取年月日,时间
|
355
|
-
const year = dat.getFullYear();
|
356
|
-
const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
|
357
|
-
const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
|
358
|
-
const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
|
359
|
-
const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
|
360
|
-
const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
|
361
|
-
|
362
|
-
return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
|
363
|
-
},
|
364
|
-
async getDaiBan(){
|
365
|
-
let http = new HttpResetClass()
|
366
|
-
let condition = ''
|
367
|
-
if(this.$login.f.deps!=='柠条塔'){
|
368
|
-
condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
|
369
|
-
} else {
|
370
|
-
condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
|
371
|
-
}
|
372
|
-
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
373
|
-
tablename:'t_order_center',
|
374
|
-
condition:condition
|
375
|
-
}}, {
|
376
|
-
resolveMsg: null,
|
377
|
-
rejectMsg: null
|
378
|
-
}).then((res) => {
|
379
|
-
let OrderDaiBan = {}
|
380
|
-
res.data.forEach(item=>{
|
381
|
-
OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
|
382
|
-
OrderDaiBan[item.f_ordertype].push(item)
|
383
|
-
})
|
384
|
-
this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
|
385
|
-
if (res.data.length> 0){
|
386
|
-
this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
|
387
|
-
}
|
388
|
-
})
|
389
|
-
let data = {
|
390
|
-
condition: '1 = 1',
|
391
|
-
data: {
|
392
|
-
orgid: this.$login.f.orgid,
|
393
|
-
id: this.$login.f.id
|
394
|
-
}
|
395
|
-
}
|
396
|
-
await http.load('POST', '/rs/sql/checkuser', {data: data}, {
|
397
|
-
resolveMsg: null,
|
398
|
-
rejectMsg: null
|
399
|
-
}).then((res) => {
|
400
|
-
let AppDaiBan = {}
|
401
|
-
res.data.forEach(item=>{
|
402
|
-
AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
|
403
|
-
AppDaiBan[item.defname].push(item)
|
404
|
-
})
|
405
|
-
this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
|
406
|
-
if (res.data.length> 0){
|
407
|
-
this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
|
408
|
-
}
|
409
|
-
})
|
410
|
-
|
411
|
-
},
|
412
|
-
async getDaiBanA(){
|
413
|
-
// 是否全局开启待办通知
|
414
|
-
if (daibanJson.enable) {
|
415
|
-
console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
|
416
|
-
let http = new HttpResetClass()
|
417
|
-
let daibanArray = []
|
418
|
-
for (let daibanItem of daibanJson.daiban) {
|
419
|
-
console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
|
420
|
-
if (daibanItem.enable) { // 控制每一项通知是否开启
|
421
|
-
let postResult = ''; //提示信息为
|
422
|
-
await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
|
423
|
-
.then((res)=>{
|
424
|
-
let responseData = res.data
|
425
|
-
for (let item of responseData) {
|
426
|
-
postResult += eval(daibanItem.text) + "\n"
|
427
|
-
}
|
428
|
-
postResult += '\t'
|
429
|
-
daibanArray.push({text:postResult,oldData:daibanItem})
|
430
|
-
})
|
431
|
-
}
|
432
|
-
}
|
433
|
-
console.log("安检数据为:"+JSON.stringify(daibanArray))
|
434
|
-
this.safecheckDaiBan = daibanArray
|
435
|
-
}else {
|
436
|
-
console.log("待办提醒全局关闭。")
|
437
|
-
}
|
438
|
-
},
|
439
|
-
|
440
|
-
async loginother(){
|
441
|
-
// if (this.config.distanceLogin) {
|
442
|
-
// if (this.$login && this.$login.getUrlParames('name') ) {
|
443
|
-
// let ename = this.$login.getUrlParames('name');
|
444
|
-
// // todo v4
|
445
|
-
// let logininfo = await this.$resetpost('api/af-revenue/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
|
446
|
-
// if(logininfo.data){
|
447
|
-
// if(logininfo.data.ename && logininfo.data.password){
|
448
|
-
// this.model.ename = logininfo.data.ename
|
449
|
-
// this.model.password =logininfo.data.password
|
450
|
-
// let gen = saveGen(this)
|
451
|
-
// return co(gen)
|
452
|
-
// }
|
453
|
-
// }
|
454
|
-
// }
|
455
|
-
// }
|
456
|
-
},
|
457
|
-
theme(){
|
458
|
-
// var elementList = document.querySelectorAll('body');
|
459
|
-
// console.log(elementList)
|
460
|
-
// document.querySelectorAll('body')[0].className='themeTwo'
|
461
|
-
// var elementList = document.querySelectorAll('body');
|
462
|
-
// console.log(elementList)
|
463
|
-
},
|
464
|
-
onReady () {
|
465
|
-
this.$emit('ready')
|
466
|
-
},
|
467
|
-
confirm (key) {
|
468
|
-
this.login_do=!this.login_do
|
469
|
-
// return
|
470
|
-
if (key == 'key') {
|
471
|
-
$('form').fadeOut(500)
|
472
|
-
}
|
473
|
-
this.login = true
|
474
|
-
// let gen = saveGen(this)
|
475
|
-
// return co(gen)
|
476
|
-
if((!this.otherLogin) && this.$login && this.$login.Verification){
|
477
|
-
console.log('跳转过来的不走验证')
|
478
|
-
if(this.picLyanzhengma === '') {
|
479
|
-
this.$showMessage("请输入验证码!").then(()=>{
|
480
|
-
this.login = false
|
481
|
-
$('form').fadeIn(500)
|
482
|
-
this.createCode()
|
483
|
-
})
|
484
|
-
}else if(this.verify()) {
|
485
|
-
//若输入的验证码与产生的验证码不一致时
|
486
|
-
this.$showMessage(`${this.$login.VerificationType === 'math' ? '运算结果不正确,验证失败' : '验证码不正确'}`).then(()=>{
|
487
|
-
this.login = false
|
488
|
-
$('form').fadeIn(500)
|
489
|
-
this.createCode();//刷新验证码
|
490
|
-
this.picLyanzhengma = ''
|
491
|
-
})
|
492
|
-
}else {
|
493
|
-
this.login = true
|
494
|
-
let gen = saveGen(this)
|
495
|
-
return co(gen)
|
496
|
-
}
|
497
|
-
}else {
|
498
|
-
this.login = true
|
499
|
-
let gen = saveGen(this)
|
500
|
-
return co(gen)
|
501
|
-
}
|
502
|
-
},
|
503
|
-
createCode(){
|
504
|
-
if (this.$login.VerificationType === 'math') {
|
505
|
-
let num1 = Math.floor(Math.random() * 10) + 1
|
506
|
-
let num2 = Math.floor(Math.random() * 10) + 1
|
507
|
-
let operators = ['+', '-', '*', '/']
|
508
|
-
let operator = operators[Math.floor(Math.random() * operators.length)]
|
509
|
-
|
510
|
-
// 处理除法,确保分母不为0且结果为整数
|
511
|
-
if (operator === '/') {
|
512
|
-
while (num2 % num1 !== 0 || num1 === 0) {
|
513
|
-
num1 = Math.floor(Math.random() * 10) + 1
|
514
|
-
num2 = num1 * (Math.floor(Math.random() * 10) + 1)
|
515
|
-
}
|
516
|
-
[num1, num2] = [num2, num1] // 交换以确保num1是分母
|
517
|
-
}
|
518
|
-
this.checkCode = `${num1} ${operator} ${num2} = ?`
|
519
|
-
this.operationResult = this.calculate(num1, num2, operator)
|
520
|
-
} else {
|
521
|
-
let code = "";
|
522
|
-
let codeLength = 4;//验证码的长度
|
523
|
-
let random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
524
|
-
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
|
525
|
-
for (let i = 0; i < codeLength; i++) {
|
526
|
-
//循环操作
|
527
|
-
let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
|
528
|
-
code += random[index];//根据索引取得随机数加到code上
|
529
|
-
}
|
530
|
-
this.checkCode = code;//把code值赋给验证码
|
531
|
-
}
|
532
|
-
},
|
533
|
-
calculate (a, b, operator) {
|
534
|
-
switch (operator) {
|
535
|
-
case '+':
|
536
|
-
return a + b;
|
537
|
-
case '-':
|
538
|
-
return a - b;
|
539
|
-
case '*':
|
540
|
-
return a * b;
|
541
|
-
case '/':
|
542
|
-
return Math.trunc(a / b); // 使用 Math.trunc 来确保结果为整数
|
543
|
-
default:
|
544
|
-
return 0; // 或抛出错误
|
545
|
-
}
|
546
|
-
},
|
547
|
-
async depPromptConfirm () {
|
548
|
-
this.depPromptShow = false
|
549
|
-
return this.$goto('home-page', {functions: this.$login.f,config: this.config})
|
550
|
-
},
|
551
|
-
verify () {
|
552
|
-
if (this.$login.VerificationType === 'math') {
|
553
|
-
return parseInt(this.picLyanzhengma, 10) !== this.operationResult
|
554
|
-
} else if (this.$login.VerificationType === 'mix') {
|
555
|
-
return this.picLyanzhengma.toUpperCase() !== this.checkCode
|
556
|
-
}
|
557
|
-
},
|
558
|
-
depPromptCancel () {
|
559
|
-
this.depPromptShow = false
|
560
|
-
this.createCode()
|
561
|
-
this.picLyanzhengma = ''
|
562
|
-
this.model.ename = ''
|
563
|
-
this.model.password = ''
|
564
|
-
this.login = false
|
565
|
-
$('form').fadeIn(500)
|
566
|
-
},
|
567
|
-
delCookie() {
|
568
|
-
let cookies = document.cookie.split(";");
|
569
|
-
console.log("点击触发了")
|
570
|
-
for (let i = 0; i < cookies.length; i++) {
|
571
|
-
let cookie = cookies[i];
|
572
|
-
let eqPos = cookie.indexOf("=");
|
573
|
-
let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
574
|
-
document.cookie =
|
575
|
-
name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
|
576
|
-
}
|
577
|
-
if (cookies.length > 0) {
|
578
|
-
for (let i = 0; i < cookies.length; i++) {
|
579
|
-
let cookie = cookies[i];
|
580
|
-
let eqPos = cookie.indexOf("=");
|
581
|
-
let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
582
|
-
let domain = location.host.substr(location.host.indexOf("."));
|
583
|
-
document.cookie =
|
584
|
-
name +
|
585
|
-
"=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" +
|
586
|
-
domain;
|
587
|
-
}
|
588
|
-
}
|
589
|
-
localStorage.clear()
|
590
|
-
sessionStorage.clear()
|
591
|
-
window.location.reload()
|
592
|
-
}
|
593
|
-
|
594
|
-
},
|
595
|
-
watch: {
|
596
|
-
'modifyPwShow' (val){
|
597
|
-
if (!val) {
|
598
|
-
window.location.reload()
|
599
|
-
}
|
600
|
-
}
|
601
|
-
}
|
602
|
-
}
|
603
|
-
</script>
|
604
|
-
|
605
|
-
<style>
|
606
|
-
.my_button_search{width: 100px; height: 25px;position: relative; padding-left:2px;top: 0px;line-height: 25px; background:rgba(0,0,0,0); border-radius: 4px; border:none; font-family: PingFang; font-size: 15px}
|
607
|
-
.my_button_search:hover img{ filter: opacity(0.8);}
|
608
|
-
.loginmain-img{
|
609
|
-
margin: 8% 23% 6% 23%;
|
610
|
-
width: 54%;
|
611
|
-
height: 58%;
|
612
|
-
border-radius: 30px;
|
613
|
-
text-align: center;
|
614
|
-
}
|
615
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="syslogin">
|
3
|
+
<div class="login-title" >
|
4
|
+
<div class="row auto">
|
5
|
+
<marquee style="width:80%;margin-top:25px"><span style="font-size: 1.8rem;color: white;">{{notice}}</span></marquee>
|
6
|
+
<div class="login-title-chi" style="white-space: nowrap;margin-right:0">
|
7
|
+
<button class="my_button_search button_spacing" style="margin-right: 5px" title="点击清除浏览器缓存" @click.stop="delCookie">
|
8
|
+
<img
|
9
|
+
src="../../assets/clear-cookie.png" style="height: 25px; width: 95px;margin-bottom: 3px;">
|
10
|
+
</button>
|
11
|
+
<span v-if="$login.versionTime">构建时间:{{ vTime }}</span>
|
12
|
+
<div v-if="titleShow">
|
13
|
+
<img src="../../../static/newStyle/login-info.png"/>
|
14
|
+
<span @click="showus=true">关于我们</span>
|
15
|
+
</div>
|
16
|
+
<!-- <img src="../../../static/newStyle/login-con.png"/>-->
|
17
|
+
<!-- <span>联系我们</span>-->
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<modal :show.sync="showus" backdrop="true" width="50%" style="width:auto;">
|
23
|
+
<article slot="modal-body" class="modal-body" >
|
24
|
+
<img style="height:100%;width:100%" src="../../../static/newStyle/about-us.png"/>
|
25
|
+
</article>
|
26
|
+
<footer slot="modal-footer" class="modal-footer">
|
27
|
+
</footer>
|
28
|
+
</modal>
|
29
|
+
|
30
|
+
|
31
|
+
<div class="logoew" v-if="logoandroid" >
|
32
|
+
<div v-if="logoandroid" class="imglogo"></div>
|
33
|
+
<p class="logocontent">燃气客服系统Android版</p>
|
34
|
+
<p class="logofooter">(仅浏览器扫描)</p>
|
35
|
+
</div>
|
36
|
+
<!--输入框-->
|
37
|
+
<div class="loginmain" v-show="showlogin">
|
38
|
+
<!-- <img src="../../../static/login_title1.png" alt="图片加载未完成" class="img-responsive" style="margin: 0 auto; padding-top: 150px;" /> -->
|
39
|
+
<div class="loginmain-left">
|
40
|
+
<img class="loginmain-left-img" src="../../../static/newStyle/login-left.png">
|
41
|
+
</div>
|
42
|
+
<div class="loginmain-right">
|
43
|
+
|
44
|
+
<p @click="theme()" style="white-space: nowrap">{{config.title}}</p>
|
45
|
+
|
46
|
+
<form v-show="!login">
|
47
|
+
<!-- <input type="text" placeholder="用户名" v-model="model.ename" class="usericon">-->
|
48
|
+
<div class="login-input">
|
49
|
+
<img src="../../../static/newStyle/login-user.png"/>
|
50
|
+
<input type="text" style="display: inline;background-color: white!important;" placeholder="用户名" v-model="model.ename"/>
|
51
|
+
</div>
|
52
|
+
<div class="login-input">
|
53
|
+
<img src="../../../static/newStyle/login-pwd.png"/>
|
54
|
+
<input type="password" placeholder="密码" style="display: inline;background-color: darkgray;" v-model="model.password"
|
55
|
+
@keyup.enter="confirm('key')"/>
|
56
|
+
</div>
|
57
|
+
<div class="login-input-1" v-if="$login.Verification">
|
58
|
+
<img src="../../../static/newStyle/login-check.png"/>
|
59
|
+
<input v-if="$login.VerificationType === 'math'" class="login-check" type="text" placeholder="请输入右侧运算结果"
|
60
|
+
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
61
|
+
<input v-if="$login.VerificationType === 'mix'" class="login-check" type="text" placeholder="请输入验证码"
|
62
|
+
v-model="picLyanzhengma" @keyup.enter="confirm('key')"/>
|
63
|
+
</div>
|
64
|
+
<div class="login-input-2" >
|
65
|
+
<input v-if="$login.Verification" class="login-check-1" style="display: inline;background-color:#eeeeee !important;"
|
66
|
+
type="button" @click="createCode" v-model="checkCode"/>
|
67
|
+
</div>
|
68
|
+
<div class="login-bt">
|
69
|
+
<button type="button" id="login-button" class="login-button" @click.prevent="confirm('click')">登录</button>
|
70
|
+
</div>
|
71
|
+
<!-- <input type="password" placeholder="密码" v-model="model.password" class="psicon"-->
|
72
|
+
<!-- @keyup.enter="confirm('key')">-->
|
73
|
+
<!-- <input v-if="$login.Verification" styljiaoyane="width: 40%; display: inline" type="text" placeholder="请输入验证码"-->
|
74
|
+
<!-- v-model="picLyanzhengma" @keyup.enter="confirm('key')">-->
|
75
|
+
<!-- <input v-if="$login.Verification" style="width: 30%; display: inline;background-color: darkgray;"-->
|
76
|
+
<!-- type="button" @click="createCode" v-model="checkCode"/><br>-->
|
77
|
+
|
78
|
+
<!-- <button type="button" id="login-button" @click.prevent="confirm()"><strong>注册</strong></button> -->
|
79
|
+
<!-- <span @click="register()">还没有注册,现在注册>>></span> -->
|
80
|
+
</form>
|
81
|
+
<div v-show="login" class="login_load">
|
82
|
+
<img src="../../../static/newStyle/login-do.gif">
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
<div v-show="!showlogin && isSso" class="loginmain-img">
|
87
|
+
<div class="ssoLoadingImg">
|
88
|
+
<img src="../../../static/newStyle/login-do.gif">
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
<div class="login-foot" v-show="false">
|
92
|
+
技术支持:西安奥枫软件有限公司
|
93
|
+
</div>
|
94
|
+
<div class="login-foot" v-show="$login.BAinformation">
|
95
|
+
{{{ $login.BAinformation }}}
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
|
99
|
+
<header slot="modal-header" style="height: 8vh" class="modal-header">
|
100
|
+
<!--<h4 class="modal-title">登录信息</h4>-->
|
101
|
+
</header>
|
102
|
+
<article slot="modal-body" class="modal-body">
|
103
|
+
<form class="form-horizontal">
|
104
|
+
<div class="row">
|
105
|
+
<div class="col-sm-12 form-group">
|
106
|
+
<label class="col-sm-5 ">当前登录人:</label>
|
107
|
+
<label style="font-weight:normal">{{$login.f.name}}</label>
|
108
|
+
</div>
|
109
|
+
<!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
|
110
|
+
<!--<label class="col-sm-5 ">组 织 编 码:</label>-->
|
111
|
+
<!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
|
112
|
+
<!-- <div class="col-sm-7">
|
113
|
+
<span >{{$login.f.number}}</span>
|
114
|
+
</div> -->
|
115
|
+
<!--</div>-->
|
116
|
+
<div class="col-sm-12 form-group">
|
117
|
+
<label class="col-sm-5">所在销售点:</label>
|
118
|
+
<label style="font-weight:normal">{{$login.f.deps}}</label>
|
119
|
+
<!-- <div class="col-sm-7">
|
120
|
+
<span >{{$login.f.deps}}</span>
|
121
|
+
</div> -->
|
122
|
+
</div>
|
123
|
+
<div class="col-sm-12 " v-if="AppDaiBan !==''">
|
124
|
+
<label class="col-sm-2">报装待办:</label>
|
125
|
+
<span style="font-weight:normal">{{AppDaiBan}}</span>
|
126
|
+
</div>
|
127
|
+
<div class="col-sm-12 " v-if="OrderDaiBan !==''">
|
128
|
+
<label class="col-sm-2">预约待办:</label>
|
129
|
+
<span style="font-weight:normal">{{OrderDaiBan}}</span>
|
130
|
+
</div>
|
131
|
+
<div class="col-sm-12 " v-for="daibanitem in safecheckDaiBan">
|
132
|
+
<label class="col-sm-2">{{daibanitem.oldData.title}}:</label>
|
133
|
+
<span style="font-weight:normal">{{daibanitem.text}}</span>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
</form>
|
137
|
+
</article>
|
138
|
+
<footer slot="modal-footer" style="height: 8vh" class="modal-footer">
|
139
|
+
<button class="button_search" @click="depPromptConfirm">确认</button>
|
140
|
+
<button class="button_clear" @click="depPromptCancel">取消</button>
|
141
|
+
</footer>
|
142
|
+
</modal>
|
143
|
+
|
144
|
+
<!-- 修改密码组件 -->
|
145
|
+
<modify-pw :show.sync="modifyPwShow" v-if="modifyPwShow"></modify-pw>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
</template>
|
149
|
+
|
150
|
+
<script>
|
151
|
+
import co from 'co'
|
152
|
+
import $ from 'jquery'
|
153
|
+
import Vue from 'vue'
|
154
|
+
import {HttpResetClass} from 'vue-client'
|
155
|
+
|
156
|
+
let daibanJson = require('../../util/Daiban.json')
|
157
|
+
|
158
|
+
|
159
|
+
let saveGen = function *(self) {
|
160
|
+
try {
|
161
|
+
if(self.$login){
|
162
|
+
// 账号ename,密码password,是否显示异地登陆
|
163
|
+
yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi)
|
164
|
+
}
|
165
|
+
if(self.$appdata){
|
166
|
+
yield self.$appdata.load()
|
167
|
+
}
|
168
|
+
if (Vue.$heatCompatibility) {
|
169
|
+
try {
|
170
|
+
if(self.$loginHeat){
|
171
|
+
yield self.$loginHeat.login(self.model.ename, self.model.password)
|
172
|
+
}
|
173
|
+
if(self.$appdataHeat){
|
174
|
+
yield self.$appdataHeat.load()
|
175
|
+
}
|
176
|
+
} catch (e) {
|
177
|
+
console.log('热力系统登陆失败!')
|
178
|
+
}
|
179
|
+
}
|
180
|
+
yield self.$getConfig(self, 'Login')
|
181
|
+
console.log('登录配置', self.config)
|
182
|
+
if (self.config.isMac) {
|
183
|
+
// 获取该登录人分公司下的mac配置
|
184
|
+
let getMacs = yield self.$resetpost('api/af-system/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
185
|
+
resolveMsg: null,
|
186
|
+
rejectMsg: null
|
187
|
+
}).catch(() => {
|
188
|
+
throw new Error('获取mac配置失败')
|
189
|
+
})
|
190
|
+
console.log('MAC地址信息', getMacs)
|
191
|
+
// 获取本地mac地址
|
192
|
+
let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
|
193
|
+
resolveMsg: null,
|
194
|
+
rejectMsg: null
|
195
|
+
}).catch(() => {
|
196
|
+
throw new Error('获取本地mac配置失败')
|
197
|
+
})
|
198
|
+
console.log('本地MAC地址信息', getLocalMac)
|
199
|
+
// 对Mac地址进行匹配
|
200
|
+
let macValidate = false
|
201
|
+
for (let i = 0; i < getLocalMac.data.mac.length; i++) {
|
202
|
+
for (let j = 0; j < getMacs.data.length; j++) {
|
203
|
+
if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
|
204
|
+
macValidate = true
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
if (!macValidate) {
|
209
|
+
throw new Error('Mac地址验证失败, 请联系管理员!!')
|
210
|
+
}
|
211
|
+
}
|
212
|
+
console.log(self.$login.depPrompt)
|
213
|
+
// 弱口令验证
|
214
|
+
//跳转过来的不进行验证
|
215
|
+
if ((!self.otherLogin) && self.config.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
|
216
|
+
self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
|
217
|
+
self.modifyPwShow = true
|
218
|
+
})
|
219
|
+
} else if ((!self.otherLogin) && self.$login.depPrompt) {
|
220
|
+
self.depPromptShow = true
|
221
|
+
if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
|
222
|
+
// 获取待办
|
223
|
+
self.getDaiBan()
|
224
|
+
}
|
225
|
+
if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
|
226
|
+
// 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
|
227
|
+
self.getDaiBanA()
|
228
|
+
}
|
229
|
+
} else {
|
230
|
+
self.$goto('home-page', {functions: self.$login.f,config: self.config})
|
231
|
+
if (self.$login) {
|
232
|
+
console.log('登录信息', self.$login.f)
|
233
|
+
global.login=self.$login.f
|
234
|
+
console.log('登录信息', global.login)
|
235
|
+
}
|
236
|
+
}
|
237
|
+
} catch (ret) {
|
238
|
+
console.error('登录失败', ret)
|
239
|
+
let msg
|
240
|
+
if (ret instanceof Error) {
|
241
|
+
msg = ret
|
242
|
+
}
|
243
|
+
if (ret.status === 0) {
|
244
|
+
msg = '服务连接错误,请确认服务状态'
|
245
|
+
} else if (ret.status === 401) {
|
246
|
+
msg = ret.data
|
247
|
+
} else if (ret.status === 710) {
|
248
|
+
msg = ret.data
|
249
|
+
} else {
|
250
|
+
msg = ret.data
|
251
|
+
}
|
252
|
+
self.createCode()
|
253
|
+
self.picLyanzhengma = ''
|
254
|
+
yield self.$showMessage(msg)
|
255
|
+
self.model.ename = ''
|
256
|
+
self.model.password = ''
|
257
|
+
self.login = false
|
258
|
+
if (self.isSso) {
|
259
|
+
if (window.parent && window.parent !== window) {
|
260
|
+
window.parent.postMessage('reload', '*')
|
261
|
+
}
|
262
|
+
}
|
263
|
+
$('form').fadeIn(500)
|
264
|
+
}
|
265
|
+
}
|
266
|
+
export default {
|
267
|
+
title: '登录',
|
268
|
+
async ready () {
|
269
|
+
this.titleShow = this.$appdata.getSingleValue('关于我们')
|
270
|
+
window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
|
271
|
+
this.vTime = this.format(new Date(window.versionTime));
|
272
|
+
$('#login-button').click(function (event) {
|
273
|
+
event.preventDefault()
|
274
|
+
$('form').fadeOut(500)
|
275
|
+
})
|
276
|
+
if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
|
277
|
+
let url = window.location.search.split('?')[1]
|
278
|
+
let obj = {}
|
279
|
+
for (let params of url.split("&")) {
|
280
|
+
let kv = params.split("=")
|
281
|
+
obj[kv[0]] = kv[1]
|
282
|
+
}
|
283
|
+
console.log('参数', obj)
|
284
|
+
if (window.location.search.indexOf('ticket')) {
|
285
|
+
this.isSso = true
|
286
|
+
this.showlogin = false
|
287
|
+
}
|
288
|
+
this.model.ename = window.atob(obj.af_key)
|
289
|
+
this.model.password = window.atob(obj.af_n)
|
290
|
+
this.otherLogin = true
|
291
|
+
this.confirm()
|
292
|
+
}else{
|
293
|
+
//跳转不需要验证码
|
294
|
+
this.createCode()
|
295
|
+
}
|
296
|
+
console.log(this.$login)
|
297
|
+
},
|
298
|
+
data () {
|
299
|
+
return {
|
300
|
+
vTime: '',
|
301
|
+
image:{
|
302
|
+
img1: '/images/newStyle/login-info.png',
|
303
|
+
img2: '/images/newStyle/login-con.png',
|
304
|
+
img3: '/images/newStyle/login-left.png',
|
305
|
+
img4: '/images/newStyle/login-user.png',
|
306
|
+
img5: '/images/newStyle/login-pwd.png',
|
307
|
+
img6: '/images/newStyle/login-check.png',
|
308
|
+
img7: '/images/newStyle/login-do.png',
|
309
|
+
},
|
310
|
+
config: {
|
311
|
+
isMac: false,
|
312
|
+
depPrompt: false,
|
313
|
+
weakPassword: false,
|
314
|
+
title: '燃气客服系统',
|
315
|
+
distanceLogin: false,
|
316
|
+
// 那些角色可以定时获取预约提示
|
317
|
+
isTip : false,
|
318
|
+
// 那些角色可以定时获取预约提示
|
319
|
+
msgRole : '预约处理人员',
|
320
|
+
// 定时获取提示间隔 单位:分钟
|
321
|
+
times: 25,
|
322
|
+
approve: false, // 是否获取审核提醒
|
323
|
+
approveTimes: 1 // 审核时间见间隔
|
324
|
+
},
|
325
|
+
titleShow: true, //标题显示
|
326
|
+
otherLogin:false,
|
327
|
+
login: false,
|
328
|
+
depPromptShow: false,
|
329
|
+
model: {},
|
330
|
+
show: false,
|
331
|
+
checkCode: '',
|
332
|
+
login_do:true,
|
333
|
+
picLyanzhengma: '',
|
334
|
+
operationResult: 0,
|
335
|
+
// 修改密码弹框展示
|
336
|
+
modifyPwShow: false,
|
337
|
+
logoandroid:false,
|
338
|
+
showus:false,
|
339
|
+
notice:'',
|
340
|
+
loginotherflag :true,
|
341
|
+
// 报建待办
|
342
|
+
AppDaiBan: '',
|
343
|
+
//安检待办
|
344
|
+
safecheckDaiBan:[],
|
345
|
+
// 预约待处理
|
346
|
+
OrderDaiBan: '',
|
347
|
+
showlogin: true,
|
348
|
+
isSso: false
|
349
|
+
}
|
350
|
+
},
|
351
|
+
methods: {
|
352
|
+
//格式化时间
|
353
|
+
format(dat){
|
354
|
+
//获取年月日,时间
|
355
|
+
const year = dat.getFullYear();
|
356
|
+
const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
|
357
|
+
const data = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
|
358
|
+
const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
|
359
|
+
const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
|
360
|
+
const seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
|
361
|
+
|
362
|
+
return year + "-" + mon + "-" + data + " " + hour + ":" + min + ":" + seon;
|
363
|
+
},
|
364
|
+
async getDaiBan(){
|
365
|
+
let http = new HttpResetClass()
|
366
|
+
let condition = ''
|
367
|
+
if(this.$login.f.deps!=='柠条塔'){
|
368
|
+
condition = ` (f_orderstate != '预约成功' and f_orderstate != '预约失败' ) or f_orderstate is null `
|
369
|
+
} else {
|
370
|
+
condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
|
371
|
+
}
|
372
|
+
await http.load('POST', '/api/af-system/sql/singleTable', {data: {
|
373
|
+
tablename:'t_order_center',
|
374
|
+
condition:condition
|
375
|
+
}}, {
|
376
|
+
resolveMsg: null,
|
377
|
+
rejectMsg: null
|
378
|
+
}).then((res) => {
|
379
|
+
let OrderDaiBan = {}
|
380
|
+
res.data.forEach(item=>{
|
381
|
+
OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
|
382
|
+
OrderDaiBan[item.f_ordertype].push(item)
|
383
|
+
})
|
384
|
+
this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
|
385
|
+
if (res.data.length> 0){
|
386
|
+
this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
|
387
|
+
}
|
388
|
+
})
|
389
|
+
let data = {
|
390
|
+
condition: '1 = 1',
|
391
|
+
data: {
|
392
|
+
orgid: this.$login.f.orgid,
|
393
|
+
id: this.$login.f.id
|
394
|
+
}
|
395
|
+
}
|
396
|
+
await http.load('POST', '/rs/sql/checkuser', {data: data}, {
|
397
|
+
resolveMsg: null,
|
398
|
+
rejectMsg: null
|
399
|
+
}).then((res) => {
|
400
|
+
let AppDaiBan = {}
|
401
|
+
res.data.forEach(item=>{
|
402
|
+
AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
|
403
|
+
AppDaiBan[item.defname].push(item)
|
404
|
+
})
|
405
|
+
this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
|
406
|
+
if (res.data.length> 0){
|
407
|
+
this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
|
408
|
+
}
|
409
|
+
})
|
410
|
+
|
411
|
+
},
|
412
|
+
async getDaiBanA(){
|
413
|
+
// 是否全局开启待办通知
|
414
|
+
if (daibanJson.enable) {
|
415
|
+
console.log("当前获取到待办配置为" + JSON.stringify(daibanJson))
|
416
|
+
let http = new HttpResetClass()
|
417
|
+
let daibanArray = []
|
418
|
+
for (let daibanItem of daibanJson.daiban) {
|
419
|
+
console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
|
420
|
+
if (daibanItem.enable) { // 控制每一项通知是否开启
|
421
|
+
let postResult = ''; //提示信息为
|
422
|
+
await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
|
423
|
+
.then((res)=>{
|
424
|
+
let responseData = res.data
|
425
|
+
for (let item of responseData) {
|
426
|
+
postResult += eval(daibanItem.text) + "\n"
|
427
|
+
}
|
428
|
+
postResult += '\t'
|
429
|
+
daibanArray.push({text:postResult,oldData:daibanItem})
|
430
|
+
})
|
431
|
+
}
|
432
|
+
}
|
433
|
+
console.log("安检数据为:"+JSON.stringify(daibanArray))
|
434
|
+
this.safecheckDaiBan = daibanArray
|
435
|
+
}else {
|
436
|
+
console.log("待办提醒全局关闭。")
|
437
|
+
}
|
438
|
+
},
|
439
|
+
|
440
|
+
async loginother(){
|
441
|
+
// if (this.config.distanceLogin) {
|
442
|
+
// if (this.$login && this.$login.getUrlParames('name') ) {
|
443
|
+
// let ename = this.$login.getUrlParames('name');
|
444
|
+
// // todo v4
|
445
|
+
// let logininfo = await this.$resetpost('api/af-revenue/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
|
446
|
+
// if(logininfo.data){
|
447
|
+
// if(logininfo.data.ename && logininfo.data.password){
|
448
|
+
// this.model.ename = logininfo.data.ename
|
449
|
+
// this.model.password =logininfo.data.password
|
450
|
+
// let gen = saveGen(this)
|
451
|
+
// return co(gen)
|
452
|
+
// }
|
453
|
+
// }
|
454
|
+
// }
|
455
|
+
// }
|
456
|
+
},
|
457
|
+
theme(){
|
458
|
+
// var elementList = document.querySelectorAll('body');
|
459
|
+
// console.log(elementList)
|
460
|
+
// document.querySelectorAll('body')[0].className='themeTwo'
|
461
|
+
// var elementList = document.querySelectorAll('body');
|
462
|
+
// console.log(elementList)
|
463
|
+
},
|
464
|
+
onReady () {
|
465
|
+
this.$emit('ready')
|
466
|
+
},
|
467
|
+
confirm (key) {
|
468
|
+
this.login_do=!this.login_do
|
469
|
+
// return
|
470
|
+
if (key == 'key') {
|
471
|
+
$('form').fadeOut(500)
|
472
|
+
}
|
473
|
+
this.login = true
|
474
|
+
// let gen = saveGen(this)
|
475
|
+
// return co(gen)
|
476
|
+
if((!this.otherLogin) && this.$login && this.$login.Verification){
|
477
|
+
console.log('跳转过来的不走验证')
|
478
|
+
if(this.picLyanzhengma === '') {
|
479
|
+
this.$showMessage("请输入验证码!").then(()=>{
|
480
|
+
this.login = false
|
481
|
+
$('form').fadeIn(500)
|
482
|
+
this.createCode()
|
483
|
+
})
|
484
|
+
}else if(this.verify()) {
|
485
|
+
//若输入的验证码与产生的验证码不一致时
|
486
|
+
this.$showMessage(`${this.$login.VerificationType === 'math' ? '运算结果不正确,验证失败' : '验证码不正确'}`).then(()=>{
|
487
|
+
this.login = false
|
488
|
+
$('form').fadeIn(500)
|
489
|
+
this.createCode();//刷新验证码
|
490
|
+
this.picLyanzhengma = ''
|
491
|
+
})
|
492
|
+
}else {
|
493
|
+
this.login = true
|
494
|
+
let gen = saveGen(this)
|
495
|
+
return co(gen)
|
496
|
+
}
|
497
|
+
}else {
|
498
|
+
this.login = true
|
499
|
+
let gen = saveGen(this)
|
500
|
+
return co(gen)
|
501
|
+
}
|
502
|
+
},
|
503
|
+
createCode(){
|
504
|
+
if (this.$login.VerificationType === 'math') {
|
505
|
+
let num1 = Math.floor(Math.random() * 10) + 1
|
506
|
+
let num2 = Math.floor(Math.random() * 10) + 1
|
507
|
+
let operators = ['+', '-', '*', '/']
|
508
|
+
let operator = operators[Math.floor(Math.random() * operators.length)]
|
509
|
+
|
510
|
+
// 处理除法,确保分母不为0且结果为整数
|
511
|
+
if (operator === '/') {
|
512
|
+
while (num2 % num1 !== 0 || num1 === 0) {
|
513
|
+
num1 = Math.floor(Math.random() * 10) + 1
|
514
|
+
num2 = num1 * (Math.floor(Math.random() * 10) + 1)
|
515
|
+
}
|
516
|
+
[num1, num2] = [num2, num1] // 交换以确保num1是分母
|
517
|
+
}
|
518
|
+
this.checkCode = `${num1} ${operator} ${num2} = ?`
|
519
|
+
this.operationResult = this.calculate(num1, num2, operator)
|
520
|
+
} else {
|
521
|
+
let code = "";
|
522
|
+
let codeLength = 4;//验证码的长度
|
523
|
+
let random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
524
|
+
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');//随机数
|
525
|
+
for (let i = 0; i < codeLength; i++) {
|
526
|
+
//循环操作
|
527
|
+
let index = Math.floor(Math.random() * 36);//取得随机数的索引(0~35)
|
528
|
+
code += random[index];//根据索引取得随机数加到code上
|
529
|
+
}
|
530
|
+
this.checkCode = code;//把code值赋给验证码
|
531
|
+
}
|
532
|
+
},
|
533
|
+
calculate (a, b, operator) {
|
534
|
+
switch (operator) {
|
535
|
+
case '+':
|
536
|
+
return a + b;
|
537
|
+
case '-':
|
538
|
+
return a - b;
|
539
|
+
case '*':
|
540
|
+
return a * b;
|
541
|
+
case '/':
|
542
|
+
return Math.trunc(a / b); // 使用 Math.trunc 来确保结果为整数
|
543
|
+
default:
|
544
|
+
return 0; // 或抛出错误
|
545
|
+
}
|
546
|
+
},
|
547
|
+
async depPromptConfirm () {
|
548
|
+
this.depPromptShow = false
|
549
|
+
return this.$goto('home-page', {functions: this.$login.f,config: this.config})
|
550
|
+
},
|
551
|
+
verify () {
|
552
|
+
if (this.$login.VerificationType === 'math') {
|
553
|
+
return parseInt(this.picLyanzhengma, 10) !== this.operationResult
|
554
|
+
} else if (this.$login.VerificationType === 'mix') {
|
555
|
+
return this.picLyanzhengma.toUpperCase() !== this.checkCode
|
556
|
+
}
|
557
|
+
},
|
558
|
+
depPromptCancel () {
|
559
|
+
this.depPromptShow = false
|
560
|
+
this.createCode()
|
561
|
+
this.picLyanzhengma = ''
|
562
|
+
this.model.ename = ''
|
563
|
+
this.model.password = ''
|
564
|
+
this.login = false
|
565
|
+
$('form').fadeIn(500)
|
566
|
+
},
|
567
|
+
delCookie() {
|
568
|
+
let cookies = document.cookie.split(";");
|
569
|
+
console.log("点击触发了")
|
570
|
+
for (let i = 0; i < cookies.length; i++) {
|
571
|
+
let cookie = cookies[i];
|
572
|
+
let eqPos = cookie.indexOf("=");
|
573
|
+
let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
574
|
+
document.cookie =
|
575
|
+
name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
|
576
|
+
}
|
577
|
+
if (cookies.length > 0) {
|
578
|
+
for (let i = 0; i < cookies.length; i++) {
|
579
|
+
let cookie = cookies[i];
|
580
|
+
let eqPos = cookie.indexOf("=");
|
581
|
+
let name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
582
|
+
let domain = location.host.substr(location.host.indexOf("."));
|
583
|
+
document.cookie =
|
584
|
+
name +
|
585
|
+
"=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" +
|
586
|
+
domain;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
localStorage.clear()
|
590
|
+
sessionStorage.clear()
|
591
|
+
window.location.reload()
|
592
|
+
}
|
593
|
+
|
594
|
+
},
|
595
|
+
watch: {
|
596
|
+
'modifyPwShow' (val){
|
597
|
+
if (!val) {
|
598
|
+
window.location.reload()
|
599
|
+
}
|
600
|
+
}
|
601
|
+
}
|
602
|
+
}
|
603
|
+
</script>
|
604
|
+
|
605
|
+
<style>
|
606
|
+
.my_button_search{width: 100px; height: 25px;position: relative; padding-left:2px;top: 0px;line-height: 25px; background:rgba(0,0,0,0); border-radius: 4px; border:none; font-family: PingFang; font-size: 15px}
|
607
|
+
.my_button_search:hover img{ filter: opacity(0.8);}
|
608
|
+
.loginmain-img{
|
609
|
+
margin: 8% 23% 6% 23%;
|
610
|
+
width: 54%;
|
611
|
+
height: 58%;
|
612
|
+
border-radius: 30px;
|
613
|
+
text-align: center;
|
614
|
+
}
|
615
|
+
</style>
|