system-clients 3.2.68-wuhai → 3.2.69-jinbin

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-clients",
3
- "version": "3.2.68-wuhai",
3
+ "version": "3.2.69-jinbin",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -202,197 +202,217 @@ let createWaterMark = function (userName) {
202
202
  (document.head.append || document.head.appendChild).apply(document.head, [style]);
203
203
  }
204
204
 
205
- window.onunload = () => {
206
- vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
207
- }
208
- window.onbeforeunload = () => {
209
- vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
210
- }
211
- export default {
212
- title: '主界面',
213
- props: ['functions', 'userid', 'config'],
214
- data() {
215
- return {
216
- // 页面提示信息定时器
217
- interval: null,
218
- newTipShow: false,
219
- newTipContextShow: false,
220
- AppDaiBan: '',
221
- OrderDaiBan: '',
222
- // 左侧树下部三个小图标
223
- imgs: {
224
- open: '/images/lefticon/菜单伸缩.png',
225
- set: '/images/lefticon/系统设置.png',
226
- out: '/images/lefticon/退出系统.png',
227
- img1: '/images/newStyle/login-user.png',
228
- logoimg: '/static/newStyle/fife.png'
229
- // img2: '/images/lefticon/退出系统.png',
230
- },
231
- treeOrIcon: false,
232
- qrCode:false,
233
- isManger: false,
234
- show: false,
235
- orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
236
- systemname: '客服系统',
237
- date: this.$login.toStandardDateString(),
238
- tabs: [], //已初始化页签数组
239
- selecttab: '',
240
- setting: true,
241
- srcsetting: '../../static/newStyle/setting.png',
242
- showwatermakeflag: false,
243
- // headerHint: true, // 右侧顶部提示信息
244
- // value: 25645.26,
245
- // AddChangeMsgShow: false,
246
- // showsum: false
247
- }
248
- },
249
- ready() {
250
- getwartermakr(this);
251
- let component = this.$login.getUrlCompileParames('component')
252
- if (component) {
253
- this.isManger = true
254
- this.$refs.route.init(component, {data: this.functions.functions})
255
- }
256
- if (this.$login.f.password == '1') {
257
- this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
258
- if (res == 'confirm')
259
- this.show = true
260
- })
261
- }
262
- console.log("系统名称", this.$appdata.getSingleValue("系统名称"))
263
- this.systemname = this.$appdata.getSingleValue("系统名称") ? this.$appdata.getSingleValue("系统名称") : '客服系统'
264
- // let oBox = this.getElement("box")
265
- // let oTop = this.getElement("top")
266
- // let oBottom = this.getElement("bottom")
267
- // let oLine = this.getElement("line")
268
- // let that = this
269
- // oLine.onmousedown = function(e) {
270
- // let disX = (e || event).clientX
271
- // oLine.left = oLine.offsetLeft
272
- // document.onmousemove = function(e) {
273
- // let iT = oLine.left + ((e || event).clientX - disX)
274
- // var e = e || window.event
275
- // let tarnameb = e.target || e.srcElement
276
- // let maxT = oBox.clientWight - oLine.offsetWidth
277
- // oLine.style.margin = 0
278
- // iT < 0 && (iT = 0)
279
- // iT > maxT && (iT = maxT)
280
- // oLine.style.left = oTop.style.width = iT + "px"
281
- // oBottom.style.width = oBox.clientWidth - iT + "px"
282
- // that.$set('treeWidth', iT)
283
- // return false
284
- // }
285
- // document.onmouseup = function() {
286
- // document.onmousemove = null
287
- // document.onmouseup = null
288
- // oLine.releaseCapture && oLine.releaseCapture()
289
- // }
290
- // oLine.setCapture && oLine.setCapture()
291
- // return false
292
- // }
293
- this.changeShow()
294
- this.gotoWorkOrderSite()
295
- // 获取预约列表
296
- this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
297
- },
298
- methods: {
299
- getOrderList(){
300
- let times = this.config.times * 60 * 1000
301
- console.log("=定时提示间隔=", times)
302
- try {
303
- this.interval = setInterval(() => {
304
- this.getDaiBan()
305
- }, times)
306
- } catch (error) {
307
- console.log('捕获到异常', error)
205
+ window.onunload = () => {
206
+ vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
207
+ }
208
+ window.onbeforeunload = () => {
209
+ vue.http({url: `rs/user/update/${this.$login.f.ename}`, method: 'GET'})
210
+ }
211
+ export default {
212
+ title: '主界面',
213
+ props: ['functions', 'userid', 'config'],
214
+ data() {
215
+ return {
216
+ // 页面提示信息定时器
217
+ interval: null,
218
+ intervaltx: null,
219
+ newTipShow: false,
220
+ newTipContextShow: false,
221
+ AppDaiBan: '',
222
+ OrderDaiBan: '',
223
+ // 左侧树下部三个小图标
224
+ imgs: {
225
+ open: '/images/lefticon/菜单伸缩.png',
226
+ set: '/images/lefticon/系统设置.png',
227
+ out: '/images/lefticon/退出系统.png',
228
+ img1: '/images/newStyle/login-user.png',
229
+ logoimg: '/static/newStyle/fife.png'
230
+ // img2: '/images/lefticon/退出系统.png',
231
+ },
232
+ treeOrIcon: false,
233
+ qrCode:false,
234
+ isManger: false,
235
+ show: false,
236
+ orgpathnames: `${this.$login.f.orgs}-${this.$login.f.deps}-${this.$login.f.name}`,
237
+ systemname: '客服系统',
238
+ date: this.$login.toStandardDateString(),
239
+ tabs: [], //已初始化页签数组
240
+ selecttab: '',
241
+ setting: true,
242
+ srcsetting: '../../static/newStyle/setting.png',
243
+ showwatermakeflag: false,
244
+ // headerHint: true, // 右侧顶部提示信息
245
+ // value: 25645.26,
246
+ // AddChangeMsgShow: false,
247
+ // showsum: false
308
248
  }
309
249
  },
310
- async getDaiBan(){
311
- this.OrderDaiBan = ''
312
- this.AppDaiBan = ''
313
- let http = new HttpResetClass()
314
- await http.load('POST', '/rs/sql/singleTable', {data: {
315
- tablename:'t_order_center',
316
- condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
317
- }}, {
318
- resolveMsg: null,
319
- rejectMsg: null
320
- }).then((res) => {
321
- let OrderDaiBan = {}
322
- res.data.forEach(item=>{
323
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
324
- OrderDaiBan[item.f_ordertype].push(item)
325
- })
326
- if (res.data.length> 0){
327
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
328
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
329
- }
330
- })
331
- let data = {
332
- condition: '1 = 1',
333
- data: {
334
- orgid: this.$login.f.orgid,
335
- id: this.$login.f.id
336
- }
250
+ ready() {
251
+ getwartermakr(this);
252
+ let component = this.$login.getUrlCompileParames('component')
253
+ if (component) {
254
+ this.isManger = true
255
+ this.$refs.route.init(component, {data: this.functions.functions})
337
256
  }
338
- await http.load('POST', '/rs/sql/checkuser', {data: data}, {
339
- resolveMsg: null,
340
- rejectMsg: null
341
- }).then((res) => {
342
- let AppDaiBan = {}
343
- res.data.forEach(item=>{
344
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
345
- AppDaiBan[item.defname].push(item)
257
+ if (this.$login.f.password == '1') {
258
+ this.$showMessage('本地登录系统为此账户的初始密码,请确认修改密码!!!', ['confirm', 'cancel']).then((res) => {
259
+ if (res == 'confirm')
260
+ this.show = true
346
261
  })
347
- if (res.data.length> 0){
348
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
349
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
350
- }
351
- }).catch((e)=>{
352
- console.error(e)
353
- })
354
- if(this.AppDaiBan || this.OrderDaiBan){
355
- this.newTipShow = true
356
262
  }
357
- },
358
- // 提醒框被点击
359
- tipClick(){
360
- this.newTipShow = false
361
- this.newTipContextShow = true
362
- },
363
- gotoWorkOrderSite(){
364
- const isRemind =this.$appdata.getSingleValue("站点工单提醒")
365
- console.log('站点工单是否提醒',isRemind)
366
- if(isRemind && isRemind !== '是'){
367
- return
263
+ console.log("系统名称", this.$appdata.getSingleValue("系统名称"))
264
+ this.systemname = this.$appdata.getSingleValue("系统名称") ? this.$appdata.getSingleValue("系统名称") : '客服系统'
265
+ // let oBox = this.getElement("box")
266
+ // let oTop = this.getElement("top")
267
+ // let oBottom = this.getElement("bottom")
268
+ // let oLine = this.getElement("line")
269
+ // let that = this
270
+ // oLine.onmousedown = function(e) {
271
+ // let disX = (e || event).clientX
272
+ // oLine.left = oLine.offsetLeft
273
+ // document.onmousemove = function(e) {
274
+ // let iT = oLine.left + ((e || event).clientX - disX)
275
+ // var e = e || window.event
276
+ // let tarnameb = e.target || e.srcElement
277
+ // let maxT = oBox.clientWight - oLine.offsetWidth
278
+ // oLine.style.margin = 0
279
+ // iT < 0 && (iT = 0)
280
+ // iT > maxT && (iT = maxT)
281
+ // oLine.style.left = oTop.style.width = iT + "px"
282
+ // oBottom.style.width = oBox.clientWidth - iT + "px"
283
+ // that.$set('treeWidth', iT)
284
+ // return false
285
+ // }
286
+ // document.onmouseup = function() {
287
+ // document.onmousemove = null
288
+ // document.onmouseup = null
289
+ // oLine.releaseCapture && oLine.releaseCapture()
290
+ // }
291
+ // oLine.setCapture && oLine.setCapture()
292
+ // return false
293
+ // }
294
+ this.changeShow()
295
+ const istelRemindTimes =this.$appdata.getSingleValue("是否开启工单提醒定时器")
296
+ if(istelRemindTimes=='是'){
297
+ this.getTimesgotoWorkOrderSite()
368
298
  }
369
- if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('派单员') !== -1){
370
- const data = {
371
- "condition":
372
- {
373
- "condition":" 1=1 and processins.activities[ state='开始活动' and (defname in('站点接单'))].count(*) > 0 ",
374
- "sign":"1=1"
375
- },
376
- "userid":this.functions.name
299
+ const isapplyRemind =this.$appdata.getSingleValue("是否开启提醒")
300
+ const times =this.$appdata.getSingleValue("提示间隔分钟")
301
+ if(isapplyRemind=='是'){
302
+ this.config.isTip = true
303
+ this.config.times = times
304
+ }
305
+ // 获取预约列表
306
+ this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
307
+ },
308
+ methods: {
309
+ getOrderList(){
310
+ let times = this.config.times * 60 * 1000
311
+ console.log("=定时提示间隔=", times)
312
+ try {
313
+ this.interval = setInterval(() => {
314
+ this.getDaiBan()
315
+ }, times)
316
+ } catch (error) {
317
+ console.log('捕获到异常', error)
377
318
  }
378
- new HttpResetClass().load('POST','rs/path/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
379
- if(res.data && res.data.n !== 0){
380
- this.$showMessage('你有'+res.data.n+'个工单待处理,请尽快前往站点工单页面进行处理')
319
+ },
320
+ getTimesgotoWorkOrderSite(){
321
+ let teltimes = 2*60*1000 // 两分钟
322
+ try {
323
+ this.intervaltx =setInterval(()=>{
324
+ this.gotoWorkOrderSite()
325
+ },teltimes)
326
+ }catch (e) {
327
+ console.log('捕获到异常', e)
328
+ }
329
+ },
330
+ async getDaiBan(){
331
+ this.OrderDaiBan = ''
332
+ this.AppDaiBan = ''
333
+ let http = new HttpResetClass()
334
+ await http.load('POST', '/rs/sql/singleTable', {data: {
335
+ tablename:'t_order_center',
336
+ condition:` (f_orderstate != '预约成功' and f_orgstr ='${this.$login.f.orgid}' and f_orderstate != '预约失败' ) or f_orderstate is null`
337
+ }}, {
338
+ resolveMsg: null,
339
+ rejectMsg: null
340
+ }).then((res) => {
341
+ let OrderDaiBan = {}
342
+ res.data.forEach(item=>{
343
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
344
+ OrderDaiBan[item.f_ordertype].push(item)
345
+ })
346
+ if (res.data.length> 0){
347
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
348
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
381
349
  }
382
350
  })
383
- }
384
- },
385
- openUrl() {
386
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
387
- window.open(url, '_blank')
388
- },
389
- hindsetting() {
390
- this.setting = !this.setting
391
- if (this.setting) {
392
- this.srcsetting = '../../static/newStyle/setting.png'
393
- } else {
394
- this.srcsetting = '../../static/newStyle/setting1.png'
395
- }
351
+ let data = {
352
+ condition: '1 = 1',
353
+ data: {
354
+ orgid: this.$login.f.orgid,
355
+ id: this.$login.f.id
356
+ }
357
+ }
358
+ await http.load('POST', '/rs/sql/checkuser', {data: data}, {
359
+ resolveMsg: null,
360
+ rejectMsg: null
361
+ }).then((res) => {
362
+ let AppDaiBan = {}
363
+ res.data.forEach(item=>{
364
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
365
+ AppDaiBan[item.defname].push(item)
366
+ })
367
+ if (res.data.length> 0){
368
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
369
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
370
+ }
371
+ }).catch((e)=>{
372
+ console.error(e)
373
+ })
374
+ if(this.AppDaiBan || this.OrderDaiBan){
375
+ this.newTipShow = true
376
+ }
377
+ },
378
+ // 提醒框被点击
379
+ tipClick(){
380
+ this.newTipShow = false
381
+ this.newTipContextShow = true
382
+ },
383
+ gotoWorkOrderSite(){
384
+ const isRemind =this.$appdata.getSingleValue("站点工单提醒")
385
+ console.log('站点工单是否提醒',isRemind)
386
+ if(isRemind && isRemind !== '是'){
387
+ return
388
+ }
389
+ if(this.functions && this.functions.f_role_name && this.functions.f_role_name.indexOf('派单员') !== -1){
390
+ const data = {
391
+ "condition":
392
+ {
393
+ "condition":" 1=1 and processins.activities[ state='开始活动' and (defname in('站点接单'))].count(*) > 0 ",
394
+ "sign":"1=1"
395
+ },
396
+ "userid":this.functions.name
397
+ }
398
+ new HttpResetClass().load('POST','rs/path/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
399
+ if(res.data && res.data.n !== 0){
400
+ this.$showMessage('你有'+res.data.n+'个工单待处理,请尽快前往站点工单页面进行处理')
401
+ }
402
+ })
403
+ }
404
+ },
405
+ openUrl() {
406
+ var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
407
+ window.open(url, '_blank')
408
+ },
409
+ hindsetting() {
410
+ this.setting = !this.setting
411
+ if (this.setting) {
412
+ this.srcsetting = '../../static/newStyle/setting.png'
413
+ } else {
414
+ this.srcsetting = '../../static/newStyle/setting1.png'
415
+ }
396
416
 
397
417
  },
398
418
  hindsetting1() {
@@ -85,7 +85,7 @@
85
85
  技术支持:西安奥枫软件有限公司
86
86
  </div>
87
87
  <div class="login-foot" v-show="$login.BAinformation">
88
- {{ $login.BAinformation }}
88
+ {{{ $login.BAinformation }}}
89
89
  </div>
90
90
 
91
91
  <modal v-if="depPromptShow" :show.sync="depPromptShow" :backdrop="false" v-ref:modal >
@@ -149,111 +149,142 @@ import {HttpResetClass} from 'vue-client'
149
149
  let daibanJson = require('../../util/Daiban.json')
150
150
 
151
151
 
152
- let saveGen = function *(self) {
152
+ let saveGen = function* (self) {
153
153
  try {
154
- if(self.$login){
154
+ if (self.$login) {
155
155
  // 账号ename,密码password,是否显示异地登陆
156
- yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi)
156
+ yield self.$login.login(self.model.ename, self.model.password, self.$login.showYiDi);
157
157
  }
158
- if(self.$appdata){
159
- yield self.$appdata.load()
158
+ if (self.$appdata) {
159
+ yield self.$appdata.load();
160
160
  }
161
161
  if (Vue.$heatCompatibility) {
162
162
  try {
163
- if(self.$loginHeat){
164
- yield self.$loginHeat.login(self.model.ename, self.model.password)
163
+ if (self.$loginHeat) {
164
+ yield self.$loginHeat.login(self.model.ename, self.model.password);
165
165
  }
166
- if(self.$appdataHeat){
167
- yield self.$appdataHeat.load()
166
+ if (self.$appdataHeat) {
167
+ yield self.$appdataHeat.load();
168
168
  }
169
169
  } catch (e) {
170
- console.log('热力系统登陆失败!')
170
+ console.log("热力系统登陆失败!");
171
171
  }
172
172
  }
173
- yield self.$getConfig(self, 'Login')
174
- console.log('登录配置', self.config)
173
+ yield self.$getConfig(self, "Login");
174
+ console.log("登录配置", self.config);
175
+
175
176
  if (self.config.isMac) {
176
177
  // 获取该登录人分公司下的mac配置
177
- let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
178
- resolveMsg: null,
179
- rejectMsg: null
180
- }).catch(() => {
181
- throw new Error('获取mac配置失败')
182
- })
183
- console.log('MAC地址信息', getMacs)
178
+ let getMacs = yield self.$resetpost(
179
+ "rs/sql/equipmentQuery",
180
+ { data: { condition: `f_filialeids like '%${self.$login.f.f_orgids}%'` } },
181
+ {
182
+ resolveMsg: null,
183
+ rejectMsg: null,
184
+ }
185
+ ).catch(() => {
186
+ throw new Error("获取mac配置失败");
187
+ });
188
+ console.log("MAC地址信息", getMacs);
189
+
184
190
  // 获取本地mac地址
185
- let getLocalMac = yield self.$resetget('http://127.0.0.1:8003/loadmac', {
191
+ let getLocalMac = yield self.$resetget("http://127.0.0.1:8003/loadmac", {
186
192
  resolveMsg: null,
187
- rejectMsg: null
193
+ rejectMsg: null,
188
194
  }).catch(() => {
189
- throw new Error('获取本地mac配置失败')
190
- })
191
- console.log('本地MAC地址信息', getLocalMac)
195
+ throw new Error("获取本地mac配置失败");
196
+ });
197
+ console.log("本地MAC地址信息", getLocalMac);
198
+
192
199
  // 对Mac地址进行匹配
193
- let macValidate = false
200
+ let macValidate = false;
194
201
  for (let i = 0; i < getLocalMac.data.mac.length; i++) {
195
202
  for (let j = 0; j < getMacs.data.length; j++) {
196
203
  if (getMacs.data[j].f_mac_number.toLocaleUpperCase() === getLocalMac.data.mac[i]) {
197
- macValidate = true
204
+ macValidate = true;
198
205
  }
199
206
  }
200
207
  }
201
208
  if (!macValidate) {
202
- throw new Error('Mac地址验证失败, 请联系管理员!!')
209
+ throw new Error("Mac地址验证失败, 请联系管理员!!");
203
210
  }
204
211
  }
205
- console.log(self.$login.depPrompt)
206
- // 弱口令验证
207
- //跳转过来的不进行验证
208
- if ((!self.otherLogin) && self.config.weakPassword && !(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(self.model.password))) {
209
- self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
210
- self.modifyPwShow = true
211
- })
212
- } else if ((!self.otherLogin) && self.$login.depPrompt) {
213
- self.depPromptShow = true
214
- if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
215
- // 获取待办
216
- self.getDaiBan()
217
- }
218
- if (self.$login.showDaiBan && self.$login.r.includes('登录预约信息')){
219
- // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
220
- self.getDaiBanA()
221
- }
212
+ console.log(self.$login.depPrompt);
213
+
214
+ // 强口令验证
215
+ // 跳转过来的不进行验证
216
+ console.log("self===============");
217
+ console.log(self.$login);
218
+
219
+ if (
220
+ !self.otherLogin &&
221
+ self.config.weakPassword &&
222
+ !/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?])[a-zA-Z\d!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]{8,16}$/.test(
223
+ self.model.password
224
+ )
225
+ ) {
226
+ self.$showMessage("登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!", ["confirm"]).then((res) => {
227
+ self.modifyPwShow = true;
228
+ });
222
229
  } else {
223
- self.$goto('home-page', {functions: self.$login.f,config: self.config})
224
- if (self.$login) {
225
- console.log('登录信息', self.$login.f)
226
- global.login=self.$login.f
227
- console.log('登录信息', global.login)
230
+ // **新增:密码修改时间检查逻辑**
231
+ const lastModTime = self.$login.f.f_last_modification_time;
232
+ if (lastModTime) {
233
+ const lastModDate = new Date(lastModTime);
234
+ if (isNaN(lastModDate)) {
235
+ throw new Error("密码修改时间格式无效,请联系管理员!");
236
+ }
237
+ const currentDate = new Date();
238
+ const daysSinceLastMod = Math.floor((currentDate - lastModDate) / (1000 * 60 * 60 * 24));
239
+ if (daysSinceLastMod >= 90) {
240
+ self.modifyPwShow = true; // 弹出修改密码的提示框
241
+ throw new Error("您的密码已超过90天未更改,请修改后重新登录!");
242
+ }
243
+ } else {
244
+ console.warn("未找到密码修改时间字段,跳过密码过期检查。");
245
+ }
246
+
247
+ if (!self.otherLogin && self.$login.depPrompt) {
248
+ self.depPromptShow = true;
249
+ if (self.$login.showDaiBan && self.$login.r.includes("展示预约信息")) {
250
+ // 获取待办
251
+ self.getDaiBan();
252
+ }
253
+ if (self.$login.showDaiBan && self.$login.r.includes("登录预约信息")) {
254
+ // 获取待办 在util下有个Daiban.jsond 文件 ,在里面进行配置,在功能权限界面增加登录预约信息
255
+ self.getDaiBanA();
256
+ }
257
+ } else {
258
+ self.$goto("home-page", { functions: self.$login.f, config: self.config });
259
+ if (self.$login) {
260
+ console.log("登录信息", self.$login.f);
261
+ global.login = self.$login.f;
262
+ console.log("登录信息", global.login);
263
+ }
228
264
  }
229
265
  }
230
266
  } catch (ret) {
231
- console.error('登录失败', ret)
232
- let msg
267
+ console.error("登录失败", ret);
268
+ let msg;
233
269
  if (ret instanceof Error) {
234
- msg = ret
270
+ msg = ret;
235
271
  }
236
272
  if (ret.status === 0) {
237
- msg = '服务连接错误,请确认服务状态'
273
+ msg = "服务连接错误,请确认服务状态";
238
274
  } else if (ret.status === 401) {
239
- msg = ret.data
275
+ msg = ret.data;
240
276
  } else if (ret.status === 710) {
241
- msg = ret.data
277
+ msg = ret.data;
242
278
  } else if (ret.status === 555) {
243
- msg = ret.data
244
- }else if(ret.status === 789){
245
- yield self.$showMessage(msg=ret.data, ['confirm']).then(() => {
246
- self.modifyPwShow = true
247
- })
248
- return
279
+ msg = ret.data;
249
280
  }
250
- self.createCode()
251
- self.picLyanzhengma = ''
252
- yield self.$showMessage(msg)
253
- self.model.ename = ''
254
- self.model.password = ''
255
- self.login = false
256
- $('form').fadeIn(500)
281
+ self.createCode();
282
+ self.picLyanzhengma = "";
283
+ yield self.$showMessage(msg);
284
+ self.model.ename = "";
285
+ self.model.password = "";
286
+ self.login = false;
287
+ $("form").fadeIn(500);
257
288
  }
258
289
  }
259
290
  export default {
@@ -22,10 +22,10 @@
22
22
  'has-success': !$v.newpassword.required && !$v.newpassword.numbersAndLetter8to16&&!$v.newpassword.minlength && !$v.newpassword.chinesePassword}">
23
23
  <label for="newpassword" class="col-sm-4 col-sm-offset-1 control-label">新的密码:&nbsp;&nbsp;</label>
24
24
  <div class="col-sm-4">
25
- <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, numbersAndLetter8to16: true, minlength: 6,chinesePassword: true}'>
25
+ <input type="password" v-model="deliver.newpassword" class="form-control" id="newpassword" v-validate:newpassword='{required:true, numbersAndLetter8to16: true, minlength: 8,chinesePassword: true}'>
26
26
  <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.newpassword.required && !$v.newpassword.minlength && !($v.newpassword.numbersAndLetter8to16 && !($v.newpassword.required)) && !($v.newpassword.chinesePassword) "></span>
27
27
  <span v-if="$v.newpassword.required">不能为空</span>
28
- <span v-if="($v.newpassword.numbersAndLetter8to16||$v.newpassword.minlength) && !($v.newpassword.required&&$v.newpassword.minlength)">密码必须是8~16位数字与字母组合</span>
28
+ <span v-if="($v.newpassword.numbersAndLetter8to16||$v.newpassword.minlength) && !($v.newpassword.required&&$v.newpassword.minlength)">密码必须是8~16位数字与字母与字符组合</span>
29
29
  <span v-if="$v.newpassword.chinesePassword">密码不能包含中文</span>
30
30
  </div>
31
31
  </div>
@@ -313,7 +313,7 @@ export default {
313
313
  }
314
314
  },
315
315
  openUrl() {
316
- var url = `http://aote-office.8866.org:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
316
+ var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
317
317
  window.open(url, '_blank')
318
318
  },
319
319
  hindsetting() {
@@ -425,7 +425,7 @@ export default {
425
425
  }
426
426
  },
427
427
  openUrl() {
428
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
428
+ var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
429
429
  window.open(url, '_blank')
430
430
  },
431
431
  hindsetting() {
@@ -363,7 +363,7 @@ export default {
363
363
  }
364
364
  },
365
365
  openUrl() {
366
- var url = `http://aote-office.8866.org:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
366
+ var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
367
367
  window.open(url, '_blank')
368
368
  },
369
369
  hindsetting() {
@@ -372,7 +372,7 @@ export default {
372
372
  }
373
373
  },
374
374
  openUrl() {
375
- var url = `http://aote-office.8866.org:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
375
+ var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
376
376
  window.open(url, '_blank')
377
377
  },
378
378
  hindsetting() {
@@ -216,7 +216,7 @@ export default {
216
216
  }
217
217
  },
218
218
  openUrl() {
219
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
219
+ var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
220
220
  window.open(url, '_blank')
221
221
  },
222
222
  hindsetting() {
@@ -383,7 +383,7 @@ export default {
383
383
  }
384
384
  },
385
385
  openUrl() {
386
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
386
+ var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
387
387
  window.open(url, '_blank')
388
388
  },
389
389
  hindsetting() {
@@ -5,10 +5,9 @@
5
5
  <div class="col-sm-2" >
6
6
  <img v-if="isFolder(row)" :src="row.data.icon" alt="">
7
7
  </div>
8
- <div class="col-sm-10" style="padding-left:6%;text-align: left" title="{{row.data.name}}">{{row.data.name}}
9
- <span class="unreadResumeWarning11" v-show="row.data.name === '微信管理' && $parent.$parent.todo"></span>
8
+ <div class="col-sm-8" style="padding-left:6%;text-align: left" title="{{row.data.name}}">{{row.data.name}}
9
+ <span class="unreadResumeWarning11" v-show="row.data.name === '微信管理' && $parent.$parent.wechatnub"></span>
10
10
  <span class="unreadResumeWarning" v-show="row.data.name === '投诉咨询' && $parent.$parent.wechatnub">{{$parent.$parent.wechatnub}}</span>
11
- <span class="unreadResumeWarning" v-show="row.data.name === '预约中心' && $parent.$parent.ordernum">{{$parent.$parent.ordernum}}</span>
12
11
  </div>
13
12
  </span>
14
13
  </tree>
@@ -22,23 +21,16 @@ export default {
22
21
  title: '左侧树菜单',
23
22
  data () {
24
23
  return {
25
- todo: false,
26
24
  index: -1,
27
25
  wechatnub: 0,
28
- ordernum: 0,
29
26
  name: null,
30
27
  tbcg:[]
31
28
  }
32
29
  },
33
30
  methods: {
34
- setNum(type,val){
35
- this.todo = true
31
+ setNum(val){
36
32
  console.log("=====",val)
37
- if (type === '投诉咨询') {
38
- this.wechatnub = val
39
- } else if (type === '预约中心') {
40
- this.ordernum = val
41
- }
33
+ this.wechatnub = val
42
34
  },
43
35
  open (row) {
44
36
  if (row.data.name === '资源管理') {
@@ -136,17 +128,14 @@ export default {
136
128
  position: absolute;
137
129
  left: 70px;
138
130
  top: 0px;
139
- margin-left: 10px;
140
131
  }
141
132
  .unreadResumeWarning {
142
- text-align: center;
143
- min-width: 20px;
133
+ width: 20px;
144
134
  height: 20px;
145
- border-radius: 10px;
135
+ border-radius: 7px;
146
136
  background-color: #FF3B30;
147
137
  position: absolute;
148
138
  left: 60px;
149
139
  top: 0px;
150
- margin-left: 10px;
151
140
  }
152
141
  </style>
@@ -72,7 +72,7 @@
72
72
  <div class="span system-left-tree " style="height:85%">
73
73
  <h3>{{ systemname }}</h3>
74
74
  <!-- <div class="span" style="margin-bottom:10px;padding-bottom:5px;padding-top:5px;flex: 1;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">-->
75
- <left-tree :functions='functions.functions' :wechatnub='WeChatNub' :ordernum='OrderNum' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
75
+ <left-tree :functions='functions.functions' :wechatnub='WeChatNub' :userid='userid' @isnodo="isnodo" v-show="treeOrIcon"
76
76
  :tabs="tabs" v-ref:tree></left-tree>
77
77
  <!--&lt;!&ndash; <icon-tree :functions='functions.functions' :userid='userid' v-show="!treeOrIcon"></icon-tree>&ndash;&gt;-->
78
78
  </div>
@@ -242,8 +242,6 @@ export default {
242
242
  showwatermakeflag: false,
243
243
  //获取微信投诉和咨询条数
244
244
  WeChatNub: undefined,
245
- // 咨询条数
246
- OrderNum: undefined,
247
245
  // headerHint: true, // 右侧顶部提示信息
248
246
  // value: 25645.26,
249
247
  // AddChangeMsgShow: false,
@@ -301,7 +299,6 @@ export default {
301
299
  },
302
300
  created () {
303
301
  this.WechatOfComplaintAndConsult()
304
- this.orderCount()
305
302
  },
306
303
  methods: {
307
304
  getOrderList(){
@@ -391,7 +388,7 @@ export default {
391
388
  }
392
389
  },
393
390
  openUrl() {
394
- var url = `http://aote-office.8866.org:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
391
+ var url = `http://123.60.214.109:8406/submitTicket?contact=${this.$login.f.name}&orgName=${this.$login.f.orgs}&phone=${this.$login.f.f_user_telephone}`
395
392
  window.open(url, '_blank')
396
393
  },
397
394
  hindsetting() {
@@ -482,29 +479,15 @@ export default {
482
479
  data:{
483
480
  items: 'f_isreply',
484
481
  tablename: 't_comment',
485
- condition: " 1=1 and f_isreply = '0' and f_orgid = '37710' and f_pid = '0'",
482
+ condition: 'f_isreply = 0',
486
483
  orderitem: 'f_isreply'
487
484
  }
488
485
  },{resolveMsg: null, rejectMsg: null});
489
486
  if (WeChatData.data.length > 0){
490
487
  this.WeChatNub = WeChatData.data.length
491
- console.log('获取数值为:'+ this.WeChatNub)
492
- this.$refs.tree.setNum('投诉咨询', this.WeChatNub)
493
- }
494
- },
495
- async orderCount() {
496
- let orderData = await new HttpResetClass().load('POST','rs/sql/singleTable_OrderBy', {
497
- data: {
498
- items: 'id',
499
- tablename: 't_order_center',
500
- condition: ` f_orgstr ='${this.$login.f.orgid}' and f_orderstate is null `,
501
- orderitem: 'f_orderdate'
502
- }
503
- }, {resolveMsg: null, rejectMsg: null});
504
- if (orderData.data.length > 0) {
505
- this.OrderNum = orderData.data.length
506
- this.$refs.tree.setNum('预约中心', this.OrderNum)
507
488
  }
489
+ console.log('获取数值为:'+ this.WeChatNub)
490
+ this.$refs.tree.setNum(this.WeChatNub)
508
491
  }
509
492
  },
510
493
  computed: {
@@ -235,6 +235,9 @@ export default {
235
235
  }
236
236
  },
237
237
  ready() {
238
+ //使用socket发送代办消息提醒
239
+ vue.prototype.$connectNumber = this.connectNumber
240
+ this.initWebSocket()
238
241
  getwartermakr(this);
239
242
  let component = this.$login.getUrlCompileParames('component')
240
243
  if (component) {
@@ -284,6 +287,94 @@ export default {
284
287
  this.functions.f_role_name && this.functions.f_role_name.includes(this.config.msgRole) && this.config.isTip && this.getOrderList()
285
288
  },
286
289
  methods: {
290
+ // 清除
291
+ reset () {
292
+ clearTimeout(this.timeoutObj)
293
+ clearTimeout(this.serverTimeoutObj)
294
+ },
295
+ //每隔几分钟发送一个固定信息给服务端,服务端收到后回复一个固定信息
296
+ //如果服务端在一定时间内没有收到信息,就认为客户端断开了,服务端就会断开连接
297
+ // 发送心跳--确保连接有效
298
+ start () {
299
+ // 重置
300
+ vue.prototype.$connectNumber = this.connectNumber // 重置重连次数
301
+ this.timeoutObj = setTimeout(() => {
302
+ this.$socket.send('ping')
303
+ console.log('ping!')
304
+ this.serverTimeoutObj = setTimeout(() => {
305
+ this.$socket.close()
306
+ }, this.timeout)
307
+ }, this.timeout)
308
+ },
309
+ // 重连
310
+ reconnect () {
311
+ if (this.lockReconnect) return
312
+ // if (this.$connectNumber <= 0) {
313
+ // vue.showMessage('连接已断开,将无法接收消息,请重新登录', ['confirm']).then((res) => {
314
+ // if (res === 'confirm') {
315
+ // location.reload()
316
+ // }
317
+ // })
318
+ // return
319
+ // }
320
+ // this.$connectNumber--
321
+ setTimeout(() => {
322
+ console.log('连接异常,尝试重新连接。。。。')
323
+ this.initWebSocket()
324
+ this.lockReconnect = false
325
+ }, 1000 * 60)
326
+ },
327
+ // 初始化
328
+ initWebSocket () {
329
+ let path = `ws://${location.host}/ws?token=${this.$login.f.id}`
330
+ try {
331
+ if ('WebSocket' in window) {
332
+ // 创建对象
333
+ vue.prototype.$socket = new WebSocket(path)
334
+ } else {
335
+ this.$showMessage('您的浏览器不支持websocket的协议,建议使用新版谷歌浏览器,请勿使用IE浏览器,360浏览器请使用极速模式,不要使用兼容模式!"')
336
+ }
337
+ } catch (e) {
338
+ this.reconnect()
339
+ }
340
+
341
+ this.$socket.onopen = this.onOpen // 连接成功
342
+ this.$socket.onmessage = this.onMessage // 收到消息时回调
343
+ this.$socket.onclose = this.onClose // 连接关闭时回调
344
+ this.$socket.onerror = this.onError // 通讯异常
345
+ },
346
+ // 通讯异常
347
+ onError () {
348
+ console.log('通讯异常')
349
+ this.reconnect()
350
+ },
351
+ // 连接成功
352
+ onOpen () {
353
+ console.log('webSocket连接成功')
354
+ this.start()//每十秒发送心跳包,确保连接状态有效
355
+ },
356
+ // 收到消息时回调函数
357
+ onMessage (event) {
358
+ if (event.data === 'pong') { //建立心跳机制发送ping,返回pong
359
+ this.reset() // 重置心跳
360
+ this.start() // 重新开始心跳
361
+ return
362
+ }
363
+ //不是pong消息,就是服务器返回的消息(提示消息)
364
+
365
+ let data = JSON.parse(event.data)
366
+ console.log('收到消息', data)
367
+ //向所有子组件广播一个名为'onMessage'的事件,并传递一个数据参数'data'。
368
+ this.$broadcast('onMessage', data)
369
+ //作用是显示一个消息。
370
+ this.$showMessage(data.message)
371
+ },
372
+ // 关闭连接时回调函数
373
+ onClose () {
374
+ console.log('webSocket连接断开')
375
+ this.reset()
376
+ this.reconnect() // 重连
377
+ },
287
378
  getOrderList(){
288
379
  let times = this.config.times * 60 * 1000
289
380
  console.log("=定时提示间隔=", times)
@@ -371,7 +462,7 @@ export default {
371
462
  }
372
463
  },
373
464
  openUrl() {
374
- var url = `http://aote-office.8866.org:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
465
+ var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
375
466
  window.open(url, '_blank')
376
467
  },
377
468
  hindsetting() {
@@ -363,7 +363,7 @@ export default {
363
363
  }
364
364
  },
365
365
  openUrl() {
366
- var url = `http://aote-office.8866.org:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
366
+ var url = `http://123.60.214.109:8406/submitTicket?personName=${this.$login.f.name}&orgName=${this.$login.f.orgs}`
367
367
  window.open(url, '_blank')
368
368
  },
369
369
  hindsetting() {
@@ -205,17 +205,14 @@ let loginGen = async function (name, password, cue) {
205
205
  }
206
206
 
207
207
  } else {
208
- if(getLogin.data.states.includes('您的密码已经使用超过')){
209
- throw {status: 789, data: getLogin.data.states}
210
- }else{
211
- let error = {status: 401, data: getLogin.data.states}
212
- // 抛出错误
213
- throw error
214
- }
208
+ let error = {status: 401, data: getLogin.data.states}
209
+ // 抛出错误
210
+ throw error
215
211
  }
216
212
  }
217
213
 
218
214
  let GetLoginInfoService = {
215
+ SinglePageToken: {},
219
216
  // 登录后要处理的异步对象
220
217
  afterLogin: [],
221
218
  //验证码开关
@@ -238,6 +235,7 @@ let GetLoginInfoService = {
238
235
  * @param cue true/false 是/否显示异地登录
239
236
  */
240
237
  login(name, password, cue) {
238
+ Vue.$login.SinglePageToken = cryptJS.AESEncrypt(JSON.stringify({name,password, now: Date.now()}), "3KMKqvgwR8ULbR8Z")
241
239
  if (cue === undefined || cue === null || cue === '') {
242
240
  cue = true
243
241
  }
@@ -11,5 +11,5 @@ Vue.validator('chinesePassword', function (val) {
11
11
  });
12
12
  // 潜能要求8~16位数字字母组合;
13
13
  Vue.validator('numbersAndLetter8to16', function (val) {
14
- return /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/.test(val)
14
+ return /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?])[a-zA-Z\d!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]{8,16}$/.test(val)
15
15
  });