system-clients 3.2.97-temp → 3.2.97-tongchuan

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.97-temp",
3
+ "version": "3.2.97-tongchuan",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -160,24 +160,6 @@
160
160
  </footer>
161
161
  </modal>
162
162
 
163
- <modal v-show="notReportShow" :show.sync="notReportShow" :backdrop="false">
164
- <header slot="modal-header" class="text-center">
165
- <h3>未上报用户提醒</h3>
166
- </header>
167
- <article slot="modal-body" class="modal-body">
168
- <form class="form-horizontal">
169
- <div class="row">
170
- <div class="col-sm-12">
171
- <span style="font-weight:normal">{{ notReportTitle }}</span>
172
- </div>
173
- </div>
174
- </form>
175
- </article>
176
- <footer slot="modal-footer" style="height: 8vh" class="modal-footer">
177
- <button class="button_search" @click="notReportShow = false">确认</button>
178
- </footer>
179
- </modal>
180
-
181
163
  <!-- 变更录入 模态框 -->
182
164
  <add-changemsg :show="AddChangeMsgShow" v-on:toggle="AddChangeMsgShow = false"></add-changemsg>
183
165
  <!-- 修改密码组件 -->
@@ -273,8 +255,6 @@ let createWaterMark = function (userName) {
273
255
  // img2: '/images/lefticon/退出系统.png',
274
256
  },
275
257
  treeOrIcon: false,
276
- notReportTitle: '',
277
- notReportShow: false,
278
258
  qrCode:false,
279
259
  isManger: false,
280
260
  show: false,
@@ -341,7 +321,9 @@ let createWaterMark = function (userName) {
341
321
  // }
342
322
  this.changeShow()
343
323
  const istelRemindTimes =this.$appdata.getSingleValue("是否开启工单提醒定时器")
324
+ this.getDaiBan()
344
325
  if(istelRemindTimes=='是'){
326
+ this.getOrderList()
345
327
  this.getTimesgotoWorkOrderSite()
346
328
  }
347
329
  const isapplyRemind =this.$appdata.getSingleValue("是否开启提醒")
@@ -355,28 +337,10 @@ let createWaterMark = function (userName) {
355
337
  if (this.config.approve) {
356
338
  this.getFlowList()
357
339
  }
358
- if (this.config.isGetNotReport) {
359
- this.getNotReport()
360
- }
361
340
  // 获取卡表动态库到期时间
362
341
  this.getExpireDate()
363
342
  },
364
343
  methods: {
365
- async getNotReport(){
366
- this.notReportTitle = ''
367
- let http = new HttpResetClass()
368
- await http.load('POST', 'rs/sql/getNotReportUserCount', {}, {
369
- resolveMsg: null,
370
- rejectMsg: null
371
- }).then((res) => {
372
- if (res.data.length > 0){
373
- this.notReportTitle = `当前系统物联网表用户有${res.data[0].f_total_web_count}户,超过7天未上报有${res.data[0].f_greater_than_seven_days}户,7天及以内未上报有${res.data[0].f_less_than_orequalto_seven_days}户。如需查询详情,请到物联查询中“失联查询”获取详细信息!`
374
- }
375
- }).catch((e)=>{})
376
- if(this.notReportTitle){
377
- this.notReportShow = true
378
- }
379
- },
380
344
  getOrderList(){
381
345
  let times = this.config.times * 60 * 1000
382
346
  console.log("=定时提示间隔=", times)
@@ -559,7 +523,7 @@ let createWaterMark = function (userName) {
559
523
  }
560
524
  },
561
525
  openUrl() {
562
- 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}`
526
+ 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}`
563
527
  window.open(url, '_blank')
564
528
  },
565
529
  hindsetting() {
@@ -76,6 +76,20 @@ export function parse3339String (strDate) {
76
76
  strDate.substr(11, 2), strDate.substr(14, 2), strDate.substr(17, 2)
77
77
  )
78
78
  }
79
+ // 判断密码最后修改时间是否超过两个半月(2个月零15天)
80
+ export function isPasswordModificationExpired (lastModificationTime) {
81
+ if (!lastModificationTime) {
82
+ return true
83
+ }
84
+ const lastMod = parse3339String(lastModificationTime)
85
+ if (isNaN(lastMod.getTime())) {
86
+ return true
87
+ }
88
+ const expireDate = new Date(lastMod)
89
+ expireDate.setMonth(expireDate.getMonth() + 2)
90
+ expireDate.setDate(expireDate.getDate() + 15)
91
+ return new Date() > expireDate
92
+ }
79
93
 
80
94
  export function format3339TimeString (dt) {
81
95
  let month = dt.getMonth() + 1
@@ -10,8 +10,8 @@
10
10
  </button>
11
11
  <span v-if="$login.versionTime">构建时间:{{ vTime }}</span>
12
12
  <div v-if="titleShow">
13
- <img src="../../../static/newStyle/login-info.png"/>
14
- <span @click="showus=true">关于我们</span>
13
+ <img src="../../../static/newStyle/login-info.png"/>
14
+ <span @click="showus=true">关于我们</span>
15
15
  </div>
16
16
  <!-- <img src="../../../static/newStyle/login-con.png"/>-->
17
17
  <!-- <span>联系我们</span>-->
@@ -99,12 +99,12 @@
99
99
  <label class="col-sm-5 ">当前登录人:</label>
100
100
  <label style="font-weight:normal">{{$login.f.name}}</label>
101
101
  </div>
102
- <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
103
- <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
104
- <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
105
- <!-- <div class="col-sm-7">
106
- <span >{{$login.f.number}}</span>
107
- </div> -->
102
+ <!--<div class="col-sm-12 form-group" v-if="$login.f.number">-->
103
+ <!--<label class="col-sm-5 ">组&nbsp;织&nbsp;编&nbsp;码:</label>-->
104
+ <!--<label style="font-weight:normal">{{$login.f.number}}</label>-->
105
+ <!-- <div class="col-sm-7">
106
+ <span >{{$login.f.number}}</span>
107
+ </div> -->
108
108
  <!--</div>-->
109
109
  <div class="col-sm-12 form-group">
110
110
  <label class="col-sm-5">所在销售点:</label>
@@ -114,7 +114,7 @@
114
114
  </div> -->
115
115
  </div>
116
116
  <div class="col-sm-12 " v-if="AppDaiBan !==''">
117
- <label class="col-sm-2">报装待办:</label>
117
+ <label class="col-sm-2">报装待办:</label>
118
118
  <span style="font-weight:normal">{{AppDaiBan}}</span>
119
119
  </div>
120
120
  <div class="col-sm-12 " v-if="OrderDaiBan !==''">
@@ -143,8 +143,8 @@
143
143
  <script>
144
144
  import co from 'co'
145
145
  import $ from 'jquery'
146
- import Vue from 'vue'
147
146
  import {HttpResetClass} from 'vue-client'
147
+ import {isPasswordModificationExpired} from '../Util'
148
148
 
149
149
  let daibanJson = require('../../util/Daiban.json')
150
150
 
@@ -158,18 +158,6 @@ let saveGen = function *(self) {
158
158
  if(self.$appdata){
159
159
  yield self.$appdata.load()
160
160
  }
161
- if (Vue.$heatCompatibility) {
162
- try {
163
- if(self.$loginHeat){
164
- yield self.$loginHeat.login(self.model.ename, self.model.password)
165
- }
166
- if(self.$appdataHeat){
167
- yield self.$appdataHeat.load()
168
- }
169
- } catch (e) {
170
- console.log('热力系统登陆失败!')
171
- }
172
- }
173
161
  yield self.$getConfig(self, 'Login')
174
162
  console.log('登录配置', self.config)
175
163
  if (self.config.isMac) {
@@ -203,12 +191,15 @@ let saveGen = function *(self) {
203
191
  }
204
192
  }
205
193
  console.log(self.$login.depPrompt)
206
- // 弱口令验证
207
- //跳转过来的不进行验证
208
- 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))) {
194
+ // 弱口令验证(默认开启,跳转过来的不进行验证)
195
+ if ((!self.otherLogin) && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*(123|321|abc|cba))[a-zA-Z\d!@#$%^&*()_+-=<>?]{8,16}$/.test(self.model.password))) {
209
196
  self.$showMessage('登录系统: 此账户的密码过于简单,请修改密码后重新登陆!!!', ['confirm']).then((res) => {
210
197
  self.modifyPwShow = true
211
198
  })
199
+ } else if ((!self.otherLogin) && isPasswordModificationExpired(self.$login.f.f_last_modification_time)) {
200
+ self.$showMessage('登录系统: 您的密码已超过两个半月未修改,请修改密码后重新登录!!!', ['confirm']).then((res) => {
201
+ self.modifyPwShow = true
202
+ })
212
203
  } else if ((!self.otherLogin) && self.$login.depPrompt) {
213
204
  self.depPromptShow = true
214
205
  if (self.$login.showDaiBan && self.$login.r.includes('展示预约信息')){
@@ -229,6 +220,8 @@ let saveGen = function *(self) {
229
220
  }
230
221
  } catch (ret) {
231
222
  console.error('登录失败', ret)
223
+ self.$login.s = null
224
+ self.$login['v3-session-key'] = null
232
225
  let msg
233
226
  if (ret instanceof Error) {
234
227
  msg = ret
@@ -241,11 +234,6 @@ let saveGen = function *(self) {
241
234
  msg = ret.data
242
235
  } else if (ret.status === 555) {
243
236
  msg = ret.data
244
- } else if(ret.status === 789) {
245
- yield self.$showMessage(msg='您的密码已过期,请及时修改!!!', ['confirm']).then(() => {
246
- self.modifyPwShow = true
247
- })
248
- return
249
237
  }
250
238
  self.createCode()
251
239
  self.picLyanzhengma = ''
@@ -262,19 +250,19 @@ export default {
262
250
  this.titleShow = this.$appdata.getSingleValue('关于我们')
263
251
  window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
264
252
  this.vTime = this.format(new Date(window.versionTime));
265
- try{
266
- let http = new HttpResetClass()
267
- let res = await http.load('POST', 'rs/sql/singleTable',
268
- {data:{
269
- tablename: 't_changedeclare',
270
- condition: ` f_type ='变更通知' `
271
- }
272
- }, {resolveMsg: null, rejectMsg: null})
273
- if(res.data.length>0){
274
- console.log("---------------获取通知",res.data[0].f_change_message)
275
- this.notice=res.data[0].f_change_message
276
- }
277
- }catch(e){}
253
+ // try{
254
+ // let http = new HttpResetClass()
255
+ // let res = await http.load('POST', 'rs/sql/singleTable',
256
+ // {data:{
257
+ // tablename: 't_changedeclare',
258
+ // condition: ` f_type ='变更通知' `
259
+ // }
260
+ // }, {resolveMsg: null, rejectMsg: null})
261
+ // if(res.data.length>0){
262
+ // console.log("---------------获取通知",res.data[0].f_change_message)
263
+ // this.notice=res.data[0].f_change_message
264
+ // }
265
+ // }catch(e){}
278
266
 
279
267
  this.loginother();
280
268
  $('#login-button').click(function (event) {
@@ -283,10 +271,8 @@ export default {
283
271
  })
284
272
  if (window.location.search && window.location.search.indexOf('af_key') !== -1&& window.location.search.indexOf('af_n') !== -1) {
285
273
  const subUrl = window.location.search.replace('?af_key=','').split('&af_n=')
286
- console.log(subUrl)
287
274
  this.model.ename = window.atob(subUrl[0])
288
275
  this.model.password = window.atob(subUrl[1])
289
- console.log('this.model.ename',this.model.ename)
290
276
  this.otherLogin = true
291
277
  this.confirm()
292
278
  }else{
@@ -375,14 +361,14 @@ export default {
375
361
  }).then((res) => {
376
362
  let OrderDaiBan = {}
377
363
  res.data.forEach(item=>{
378
- OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
379
- OrderDaiBan[item.f_ordertype].push(item)
364
+ OrderDaiBan[item.f_ordertype] = OrderDaiBan[item.f_ordertype] || []
365
+ OrderDaiBan[item.f_ordertype].push(item)
366
+ })
367
+ this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
368
+ if (res.data.length> 0){
369
+ this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
370
+ }
380
371
  })
381
- this.OrderDaiBan = `您有${res.data.length}条需要处理的微信预约业务!`
382
- if (res.data.length> 0){
383
- this.OrderDaiBan += `其中 ${Object.keys(OrderDaiBan).map(key=>`${key}:${OrderDaiBan[key].length}条`).join(', ')}`
384
- }
385
- })
386
372
  let data = {
387
373
  condition: '1 = 1',
388
374
  data: {
@@ -396,14 +382,14 @@ export default {
396
382
  }).then((res) => {
397
383
  let AppDaiBan = {}
398
384
  res.data.forEach(item=>{
399
- AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
400
- AppDaiBan[item.defname].push(item)
385
+ AppDaiBan[item.defname] = AppDaiBan[item.defname] || []
386
+ AppDaiBan[item.defname].push(item)
387
+ })
388
+ this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
389
+ if (res.data.length> 0){
390
+ this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
391
+ }
401
392
  })
402
- this.AppDaiBan = `您有${res.data.length}条需要处理的报建待办业务!`
403
- if (res.data.length> 0){
404
- this.AppDaiBan += `其中 ${Object.keys(AppDaiBan).map(key=>`${key}:${AppDaiBan[key].length}条`).join(', ')}`
405
- }
406
- })
407
393
 
408
394
  },
409
395
  async getDaiBanA(){
@@ -415,8 +401,8 @@ export default {
415
401
  for (let daibanItem of daibanJson.daiban) {
416
402
  console.log("开始处理待办任务:" + daibanItem.title + "当前任务状态:" + daibanItem.enable?"开启":"关闭" )
417
403
  if (daibanItem.enable) { // 控制每一项通知是否开启
418
- let postResult = ''; //提示信息为
419
- await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
404
+ let postResult = ''; //提示信息为
405
+ await http.load("POST",daibanItem.url,{data:daibanItem.data},{ resolveMsg: null, rejectMsg: null})
420
406
  .then((res)=>{
421
407
  let responseData = res.data
422
408
  for (let item of responseData) {
@@ -161,15 +161,6 @@
161
161
  'parentresid'(){
162
162
  this.dealdata()
163
163
  },
164
- initresid: {
165
- handler(newVal, oldVal) {
166
- // 避免重复触发
167
- if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
168
- return;
169
- }
170
- this.dealdata();
171
- },
172
- }
173
164
  },
174
165
  }
175
166
  </script>
@@ -359,12 +359,12 @@ export default {
359
359
  const data = {
360
360
  "condition":
361
361
  {
362
- "condition":` 1=1 and tswo.f_filiale_id = '${this.$login.f.orgid}' `,
362
+ "condition":" 1=1 ",
363
363
  "sign":"1=1"
364
364
  },
365
365
  "userid":this.functions.name
366
366
  }
367
- new HttpResetClass().load('POST','rs/sql/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
367
+ new HttpResetClass().load('POST','rs/path/operatorService/n', {data}, {resolveMsg: null, rejectMsg: null}).then(res=>{
368
368
  if(res.data && res.data.n !== 0){
369
369
  this.$showMessage('你有'+res.data.n+'个工单待处理,请尽快前往站点工单页面进行处理')
370
370
  }