apply-clients 5.0.35-74 → 5.0.35-77

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.
@@ -1,640 +1,640 @@
1
- <template>
2
- <div class="d1">
3
- <div class="left col-sm-12">
4
- <criteria-paged :model="model" v-ref:cp>
5
- <criteria partial='criteria' @condition-changed='search' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
- <form novalidate class="" partial>
7
- <div class="col-sm-12">
8
- <div class="col-sm-2">
9
- <label class="col-sm-4 control-label">联&nbsp;&nbsp;系&nbsp;人</label>
10
- <div class="col-sm-8">
11
- <input type="text" class="form-control" placeholder='联系人' v-model="model.f_user_name"
12
- v-on:keyup.enter="search"
13
- condition="f_user_name like '{}%'">
14
- </div>
15
- </div>
16
- <div class="col-sm-2">
17
- <label class="col-sm-4 control-label">项目名称</label>
18
- <div class="col-sm-8">
19
- <input type="text" class="form-control" placeholder='项目名称' v-model="model.f_entry_name"
20
- v-on:keyup.enter="search"
21
- condition="f_entry_name like '{}%'">
22
- </div>
23
- </div>
24
- <div class="col-sm-2">
25
- <label class="col-sm-4 control-label">报建编号</label>
26
- <div class="col-sm-8">
27
- <input type="text" class="form-control" :options="$parent.$parent.fapplytype" placeholder='报建编号' v-model="model.f_apply_num"
28
- v-on:keyup.enter="search"
29
- condition="f_apply_num like '{}%'">
30
- </div>
31
- </div>
32
- <div class="col-sm-2">
33
- <label class="col-sm-4 control-label">用户地址</label>
34
- <div class="col-sm-8">
35
- <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
36
- v-on:keyup.enter="search"
37
- condition="f_address like '{}%'">
38
- </div>
39
- </div>
40
- <div class="col-sm-3 " style="width:30%">
41
- <button class="btn btn-primary btn-sm width-80" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()" style="margin-left:5%">
42
- <span class="glyphicon glyphicon-search"></span>{{$parent.$parent.button_name}}
43
- </button>
44
- <button class="btn-primary btn btn-sm" @click.prevent="$parent.$parent.clear()">清空</button>
45
- <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
46
- @click="$parent.$parent.addactive('报装申请')">
47
- <span class="glyphicon glyphicon-plus" ></span>报装申请
48
- </button>
49
- <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowall"
50
- @click="$parent.$parent.addactive('集体报装申请')">
51
- <span class="glyphicon glyphicon-plus" ></span>集体报装申请
52
- </button>
53
- </div>
54
-
55
-
56
- </div>
57
- <div class="col-sm-12 " style="margin-top:5px">
58
- <div class="col-sm-2 form-input-group ">
59
- <label for="startDate" class="control-label" style="width:81px;">开始日期</label>
60
- <datepicker @change="$dispatch('setQueryCondition',model)" id="startDate" placeholder="开始日期"
61
- width='100%'
62
- v-model="model.startDate"
63
- :value.sync="model.startDate"
64
- :format="'yyyy-MM-dd HH:mm:ss'"
65
- :show-reset-button="true"
66
- condition="f_apply_date >= '{}'">
67
- </datepicker>
68
- </div>
69
-
70
- <div class="col-sm-2 ">
71
- <label for="startDate" class="col-sm-4 control-label">终止日期</label>
72
- <div class="col-sm-8">
73
- <datepicker @change="$dispatch('setQueryCondition',model)" id="endDate" placeholder="终止日期"
74
- style="display: block;"
75
- v-model="model.endDate"
76
- :value.sync="model.endDate"
77
- :format="'yyyy-MM-dd HH:mm:ss'"
78
- :show-reset-button="true"
79
- condition="f_apply_date <= '{}'">
80
- </datepicker>
81
- </div>
82
-
83
- </div>
84
- <div class="col-sm-2">
85
- <label class="col-sm-4 control-label">流程状态</label>
86
- <div class="col-sm-8">
87
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloptions"
88
- condition="defname = '{}'" placeholder='流程状态'
89
- v-model="model.defname" :value.sync="model.defname" close-on-select>
90
- </v-select>
91
- </div>
92
- </div>
93
- <div class="col-sm-2" >
94
- <label class="col-sm-4 control-label">报建类型</label>
95
- <div class="col-sm-8">
96
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'报装申请',value:'报装申请'},{label:'集体报建',value:'集体报建'}]"
97
- condition="f_apply_type = '{}'" placeholder='报建类型' :search="true"
98
- v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
99
- </v-select>
100
- </div>
101
- </div>
102
- <div class="col-sm-2" >
103
- <label class="col-sm-4 control-label">业务类型</label>
104
- <div class="col-sm-8">
105
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'新报装',value:'新报装'},{label:'改管',value:'改管'}]"
106
- condition="f_work_type = '{}'" placeholder='业务类型'
107
- v-model="model.f_work_type" :value.sync="model.f_work_type" close-on-select>
108
- </v-select>
109
- </div>
110
- </div>
111
-
112
- <div class="col-sm-2" style="float: left">
113
- <label class="col-sm-4 control-label">报装来源</label>
114
- <div class="col-sm-8">
115
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'燃气系统',value:'燃气系统'},{label:'微信',value:'微信'},{label:'住建局',value:'住建局'}]"
116
- condition="f_apply_source = '{}'" placeholder='报装来源'
117
- v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
118
- </v-select>
119
- </div>
120
- </div>
121
-
122
-
123
-
124
- </div>
125
- <div class="col-sm-12 " style="margin-top:5px">
126
- <div class="col-sm-2">
127
- <label class="col-sm-4 control-label ">用户类型</label>
128
- <div class="col-sm-8">
129
- <v-select :options="$parent.$parent.usertype" placeholder='用户类型' condition="f_user_type like '{}'"
130
- :width="100" style="width:100%"
131
- v-model="model.f_user_type" :value.sync="model.f_user_type" close-on-select>
132
- </v-select>
133
- </div>
134
- </div>
135
- </div>
136
-
137
-
138
- <!--<div class="col-sm-1">-->
139
- <!--<button class="btn btn-primary btn-sm" type="button" @click="$parent.$parent.modify()"><span-->
140
- <!--class="glyphicon glyphicon-plus"></span>改装登记-->
141
- <!--</button>-->
142
- <!--</div>-->
143
- <!--</div>-->
144
-
145
- </form>
146
- </criteria>
147
- <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
148
- <template partial='head'>
149
- <tr class="title">
150
- <th>
151
- <nobr>序号</nobr>
152
- </th>
153
- <th>
154
- <nobr>来源</nobr>
155
- </th>
156
- <th>
157
- <nobr>当前状态</nobr>
158
- </th>
159
- <th>
160
- <nobr>报建编号</nobr>
161
- </th>
162
- <th>
163
- <nobr>业务类型</nobr>
164
- </th>
165
- <th>
166
- <nobr>联系人</nobr>
167
- </th>
168
- <th>
169
- <nobr>项目名称</nobr>
170
- </th>
171
- <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
172
- <nobr>用户类型</nobr>
173
- </th>
174
- <th>
175
- <nobr>电话</nobr>
176
- </th>
177
- <th>
178
- <nobr>地址</nobr>
179
- </th>
180
- <th>
181
- <nobr>流程状态</nobr>
182
- </th>
183
- <th>
184
- <nobr>报建类型</nobr>
185
- </th>
186
- <th>
187
- <nobr>报建日期</nobr>
188
- </th>
189
- <th>
190
- <nobr>督办信息</nobr>
191
- </th>
192
- <th>
193
- <nobr >申请信息</nobr>
194
- </th>
195
- <th>
196
- <nobr>操作</nobr>
197
- </th>
198
- </tr>
199
- </template>
200
- <template partial='body'>
201
- <tr >
202
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
203
- <nobr><font>{{$index+1}}</font></nobr>
204
- </td>
205
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
206
- <nobr><font>{{row.f_apply_source}}</font></nobr>
207
- </td>
208
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
209
- <nobr><font>{{row.f_sub_state!='完工' ? '未完工' :'完工'}}</font></nobr>
210
- </td>
211
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
212
- <nobr><font>{{row.f_apply_num}}</font></nobr>
213
- </td>
214
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
215
- <nobr><font>{{row.f_work_type}}</font></nobr>
216
- </td>
217
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
218
- <nobr><font>{{row.f_user_name}}</font></nobr>
219
- </td>
220
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
221
- <nobr><font>{{row.f_entry_name}}</font></nobr>
222
- </td>
223
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
224
- <nobr><font>{{row.f_user_type}}</font></nobr>
225
- </td>
226
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
227
- <nobr><font>{{row.f_phone}}</font></nobr>
228
- </td>
229
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
230
- <nobr><font>{{row.f_address}}</font></nobr>
231
- </td>
232
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
233
- <nobr><font>{{row.defname}}</font></nobr>
234
- </td>
235
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
236
- <nobr><font>{{row.f_apply_type}}</font></nobr>
237
- </td>
238
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
239
- <nobr><font>{{row.f_apply_date}}</font></nobr>
240
- </td>
241
- <th >
242
- <nobr v-if="row.f_surpervise_type"><button class="btn btn-danger" @click="$parent.$parent.$parent.stopinfoshow($index)">查看督办信息</button></nobr>
243
- <nobr v-if="!row.f_surpervise_type" >无督办</nobr>
244
- </th>
245
- <th >
246
-
247
- <nobr v-if="row.f_check_state">用户已申请</nobr>
248
- <nobr v-if="!row.f_check_state" >无申请</nobr>
249
- </th>
250
- <td style="text-align: center;">
251
- <dropdown v-if="row.defname != '完工'">
252
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
253
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
254
- </button>
255
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
256
- <li>
257
- <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
258
- </li>
259
- </ul>
260
- </dropdown>
261
- </td>
262
- </tr>
263
- </template>
264
- </data-grid>
265
- </criteria-paged>
266
- </div>
267
- <modal :show.sync="showstopinfoflag" v-ref:modal backdrop="false">
268
- <header slot="modal-header" class="modal-header">
269
- <button type="button" class="close" @click="closestopinfo"><span>&times;</span></button>
270
- <h4 class="modal-title">督办信息</h4>
271
- </header>
272
- <article slot="modal-body" class="modal-body">
273
- <p >{{stopremarks}}</p>
274
- </article>
275
- <footer slot="modal-footer" class="modal-footer">
276
- </footer>
277
- </modal>
278
- </div>
279
- </template>
280
- <script>
281
- import * as Util from '../../Util'
282
- import Vue from 'vue'
283
- import {
284
- PagedList
285
- } from 'vue-client'
286
- import getNowDate from '../../getNowDate.js'
287
- import {HttpResetClass} from 'vue-client'
288
- export default {
289
- title: '勘探详情',
290
- data() {
291
- return {
292
- timer: null,
293
- timer1:null,
294
- remindTime:5,//超时提醒时间
295
- isOverNum:0,//报建是否提醒过
296
- model: new PagedList('rs/sql/checkuser', 20, {
297
- data: {
298
- id: this.$login.f.id,
299
- fengongsi: this.$login.f.f_fengongsi,
300
- f_product_id: 0
301
- }
302
- }),
303
- fapplytype: this.$appdata.getParam('用户类型'),
304
- applytype: this.$appdata.getParam('报建类型'),
305
- department: this.$appdata.getParam('受理部门'),
306
- derection: this.$appdata.getParam('方向'),
307
- containt: this.$appdata.getParam('工作内容'),
308
- condition: '',
309
- select: '',
310
- alloptions:[],
311
- button_name:"查询",
312
- showstopinfoflag:false,
313
- stopremarks:"",
314
- startFlowonce:true,
315
- startFlowall:true,
316
- usertype: this.$appdata.getParam('用户类型'),
317
- }
318
- },
319
- compiled(){
320
- console.log("开始判断")
321
- },
322
- async ready() {
323
- this.eachFind();
324
- this.$refs.cp.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
325
- this.$refs.cp.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
326
- await this.getConfig()
327
- let str='报建语音提醒时间'
328
- this.$refs.cp.$refs.cri.search()
329
- str='超时提前提醒时间'
330
- this.loadSingleValue(str)
331
- let self = this
332
- //判断用户是否有权限
333
- this.checkUserOperator();
334
- },
335
- methods: {
336
- //清空 查询条件项
337
- clear(){
338
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
339
- this.$refs.cp.$refs.cri.model[key] = []
340
- })
341
- },
342
- checkUserOperator(){
343
- if(this.$login.r.find(value => value == '报装申请')){
344
- this.startFlowonce=true;
345
- }
346
- if(this.$login.r.find(value => value == '集体报装申请')){
347
- this.startFlowall=true;
348
- }
349
- },
350
- stopinfoshow(index){
351
- this.showstopinfoflag = true;
352
- let remakrs = this.model.rows[index].f_surpervise_info;
353
- console.log(JSON.stringify(remakrs))
354
- console.log(remakrs)
355
-
356
- this.stopremarks= remakrs;
357
- },
358
- closestopinfo(){
359
- this.showstopinfoflag = close;
360
- },
361
- getapplyName(str){
362
- console.log("开始获取所有名")
363
- console.log(JSON.stringify(str.activitys))
364
- let param = [];
365
- // let workflow = JSON.parse(str);
366
- param.push({label:"全部",value:""})
367
- str.activitys.forEach(function(item){
368
- let title = item.title;
369
- console.log(title)
370
- param.push({label:title,value:title});
371
- })
372
- this.alloptions = param;
373
-
374
- },
375
- generateUUID() {
376
- var d = new Date().getTime()
377
- var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
378
- var r = (d + Math.random() * 16) % 16 | 0
379
- d = Math.floor(d / 16)
380
- return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
381
- })
382
- return uuid
383
- },
384
- searchNow(){
385
- if(this.button_name == "返回"){
386
- this.button_name ="查询";
387
- }
388
- this.$refs.cp.$refs.cri.search()
389
- this.eachFind()
390
- },
391
- async getConfig(){
392
- let http = new HttpResetClass()
393
- await http.load('POST','rs/logic/ApplyGetConfigs', {data:this.$login.f}, {resolveMsg: null, rejectMsg: null}
394
- ).then((res)=>{
395
- if(res.data.code && res.data.code == 200){
396
- Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
397
- console.log("$workflow_vue===>"+JSON.stringify(this.$workflow_vue))
398
- this.getapplyName(this.$workflow_vue);
399
- }else{
400
- this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
401
- return
402
- }
403
- })
404
-
405
- },
406
- async addactive(modify) {
407
- this.button_name ="返回"
408
- //await this.getConfig()
409
- this.$workflow_vue.start_activity = modify
410
- let http = new HttpResetClass()
411
- let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:this.$workflow_vue.workflow_xmlfilename,start_activity:this.$workflow_vue.start_activity}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
412
- this.$refs.cp.pager = false
413
- let val = {
414
- defname: this.$workflow_vue.start_activity,
415
- f_process_id: res.data.f_process_id,
416
- f_apply_date: Util.toStandardTimeString(),
417
- f_apply_num: this.generateUUID(),
418
- f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
419
- f_product_id: res.data.f_product_id
420
- }
421
- // // 如果是改装,将modify装入val
422
- // if(modify){
423
- // modify.f_customer_type = '个人'
424
- // modify.f_apply_type = '改装登记'
425
- // modify.f_phone = modify.f_user_phone
426
- // let temp = modify.f_residential_area
427
- // modify.f_residential_area = modify.f_area
428
- // modify.f_area = temp
429
- // Object.assign(val,modify)
430
- // }
431
-
432
- console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
433
- this.$dispatch('check', val)
434
- this.$dispatch('changeheight')
435
- this.$dispatch('addactive')
436
- },
437
- // 改装申请
438
- modify(){
439
- // 调出改装申请界面
440
- this.$parent.show = false
441
- }
442
- ,
443
- check(val) {
444
- this.button_name="返回"
445
- // if(val.defname.includes("派单")){
446
- // if(val.f_unaccounts_money && parseInt(val.f_unaccounts_money)!=0){
447
- // this.$showAlert('当前用户金额未结余!!!', 'warning', 3000)
448
- // this.button_name ="查询";
449
- // return;
450
- // }
451
- // }
452
- this.$dispatch('check', val)
453
- this.$dispatch('addactive')
454
- }
455
- ,
456
- close() {
457
- this.$dispatch('close')
458
- }
459
- ,
460
- compare(val) {
461
- val === '完工'
462
- console.log('完工', val)
463
- return false
464
- },
465
- // 获取数据
466
- loadSingleValue(str) {
467
- let http = new HttpResetClass()
468
- let data = {
469
- singlename: str,
470
- //预先提醒时间
471
-
472
- }
473
- http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
474
- console.log('-----------------进去之前-----------'+JSON.stringify(res))
475
- let flag1=false
476
- let flag2=false
477
- if (res.data.length==0){
478
- flag1=true
479
- console.log('没有单值'+flag1)
480
- flag2=false
481
- }else if (res.data[0].value==0) {
482
- flag2=true
483
- console.log('为0')
484
- flag1=false
485
- }else{
486
- if (str==='报建语音提醒时间'){
487
- this.remindTime = res.data[0].value
488
- }
489
- console.log('为'+res.data[0].value)
490
- flag1=false
491
- flag2=false
492
- }
493
-
494
- if (this.isOverNum==0){
495
- if (flag1){
496
- console.log('不启动定时器')
497
-
498
- }else if (flag2) {
499
- console.log('启动定时器out')
500
- this.setOut()
501
- }else{
502
- console.log('启动定时器timer和out')
503
- this.setTimer()
504
- this.setOut()
505
- }
506
- this.isOverNum++;
507
- } else{
508
- this.isOverNum=0;
509
- }
510
-
511
-
512
- },(res)=>{
513
- //响应错误回调
514
- console.log('响应错误')
515
- })
516
-
517
- },
518
- setTimer() {
519
- if(this.timer == null) {
520
- this.timer = setInterval( () => {
521
- console.log('开始定时...每过5秒执行一次')
522
- this.$refs.cp.$refs.cri.search()
523
- console.log('数据已刷新')
524
- this.eachFind()
525
- console.log('eachfind完毕');
526
- }, 60*1000*this.remindTime)
527
- }
528
- },
529
- setOut() {
530
- if(this.timer1 == null) {
531
- this.timer1 = setTimeout( () => {
532
- console.log('开始setTimeout')
533
- this.eachFind()
534
- console.log('setTimeout完毕');
535
- }, 1000)
536
- }
537
- },
538
- //语音提醒
539
- speckText(str) {
540
- var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
541
- new Audio(url).play();
542
-
543
- },
544
-
545
- eachFind() {
546
- let arr = this.$refs.cp.$refs.grid.model.rows
547
- let overNumString1=''
548
- let flagNum1=1
549
- let dbflag = 1
550
- let dbinfo = []
551
- let hourfals = 0
552
- let hourstr = ''
553
- for(let val of arr) {
554
- if(val.f_surpervise_type){
555
- dbflag = dbflag+1
556
- dbinfo.push(val.f_user_name)
557
- }
558
- if(val.ishourover =='1'){
559
- hourfals += 1
560
- hourstr+=hourfals+'条'
561
- }
562
- console.log(val.isbeforeover)
563
- if (val.isbeforeover==='预期提醒'){
564
- console.log('flagNUm:'+flagNum1);
565
- if (flagNum1==1){
566
- overNumString1=flagNum1+'条'
567
- flagNum1=flagNum1+1
568
- }else{
569
- overNumString1=overNumString1+'和第'+flagNum1+'条'
570
- flagNum1=flagNum1+1
571
- }
572
- }
573
- }
574
- if(hourfals!=0){
575
- this.speckText('请注意:第:'+overNumString1+'数据一小时后过期')
576
- this.$showMessage("请注意:第:" + overNumString1 + "数据一小时后过期")
577
- }
578
- if (flagNum1!=1){
579
- console.log(overNumString1);
580
- this.speckText('请注意:第:'+overNumString1+'数据即将过期')
581
- this.$showMessage("请注意:第:" + overNumString1 + "数据即将过期")
582
- }
583
- if(dbflag !=1){
584
- this.speckText('请注意: 您有'+dbflag-1+'条数据被督办')
585
- this.$showMessage("用户:"+dbinfo.join(",")+"需要紧急处理!!")
586
- }
587
- console.log('语音播放完毕');
588
- }
589
- },
590
- created: function() {
591
- clearInterval(this.timer)
592
- clearInterval(this.timer1)
593
- this.timer = null
594
- this.timer1 = null
595
- },
596
- beforeDestroy() {
597
- clearInterval(this.timer)
598
- clearInterval(this.timer1)
599
- this.timer = null
600
- this.timer1 = null
601
- },
602
- computed: {
603
- date() {
604
- return getNowDate()
605
- }
606
- ,
607
- selected() {
608
- return this.$refs.cp.$refs.grid.selected
609
- }
610
- }
611
- }
612
- </script>
613
- <style scoped>
614
- label {
615
- display: flex;
616
- justify-content:center;
617
- align-items:Center;
618
- padding-top: 8px;
619
- }
620
- tr.title {
621
- background-color: #6666ff;
622
- }
623
- td{
624
- text-align: center;
625
- }
626
- /* .active{
627
- color: Crimson;
628
- }
629
- .p{
630
- color: green;
631
- }*/
632
-
633
- .p1 {
634
- color: #dc0b12;
635
- font-weight:bold
636
- }
637
- .p {
638
- color: #ffaf4f;
639
- }
640
- </style>
1
+ <template>
2
+ <div class="d1">
3
+ <div class="left col-sm-12">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
+ <form novalidate class="" partial>
7
+ <div class="col-sm-12">
8
+ <div class="col-sm-2">
9
+ <label class="col-sm-4 control-label">联&nbsp;&nbsp;系&nbsp;人</label>
10
+ <div class="col-sm-8">
11
+ <input type="text" class="form-control" placeholder='联系人' v-model="model.f_user_name"
12
+ v-on:keyup.enter="search"
13
+ condition="f_user_name like '{}%'">
14
+ </div>
15
+ </div>
16
+ <div class="col-sm-2">
17
+ <label class="col-sm-4 control-label">项目名称</label>
18
+ <div class="col-sm-8">
19
+ <input type="text" class="form-control" placeholder='项目名称' v-model="model.f_entry_name"
20
+ v-on:keyup.enter="search"
21
+ condition="f_entry_name like '{}%'">
22
+ </div>
23
+ </div>
24
+ <div class="col-sm-2">
25
+ <label class="col-sm-4 control-label">报建编号</label>
26
+ <div class="col-sm-8">
27
+ <input type="text" class="form-control" :options="$parent.$parent.fapplytype" placeholder='报建编号' v-model="model.f_apply_num"
28
+ v-on:keyup.enter="search"
29
+ condition="f_apply_num like '{}%'">
30
+ </div>
31
+ </div>
32
+ <div class="col-sm-2">
33
+ <label class="col-sm-4 control-label">用户地址</label>
34
+ <div class="col-sm-8">
35
+ <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
36
+ v-on:keyup.enter="search"
37
+ condition="f_address like '{}%'">
38
+ </div>
39
+ </div>
40
+ <div class="col-sm-3 " style="width:30%">
41
+ <button class="btn btn-primary btn-sm width-80" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()" style="margin-left:5%">
42
+ <span class="glyphicon glyphicon-search"></span>{{$parent.$parent.button_name}}
43
+ </button>
44
+ <button class="btn-primary btn btn-sm" @click.prevent="$parent.$parent.clear()">清空</button>
45
+ <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
46
+ @click="$parent.$parent.addactive('报装申请')">
47
+ <span class="glyphicon glyphicon-plus" ></span>报装申请
48
+ </button>
49
+ <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowall"
50
+ @click="$parent.$parent.addactive('集体报装申请')">
51
+ <span class="glyphicon glyphicon-plus" ></span>集体报装申请
52
+ </button>
53
+ </div>
54
+
55
+
56
+ </div>
57
+ <div class="col-sm-12 " style="margin-top:5px">
58
+ <div class="col-sm-2 form-input-group ">
59
+ <label for="startDate" class="control-label" style="width:81px;">开始日期</label>
60
+ <datepicker @change="$dispatch('setQueryCondition',model)" id="startDate" placeholder="开始日期"
61
+ width='100%'
62
+ v-model="model.startDate"
63
+ :value.sync="model.startDate"
64
+ :format="'yyyy-MM-dd HH:mm:ss'"
65
+ :show-reset-button="true"
66
+ condition="f_apply_date >= '{}'">
67
+ </datepicker>
68
+ </div>
69
+
70
+ <div class="col-sm-2 ">
71
+ <label for="startDate" class="col-sm-4 control-label">终止日期</label>
72
+ <div class="col-sm-8">
73
+ <datepicker @change="$dispatch('setQueryCondition',model)" id="endDate" placeholder="终止日期"
74
+ style="display: block;"
75
+ v-model="model.endDate"
76
+ :value.sync="model.endDate"
77
+ :format="'yyyy-MM-dd HH:mm:ss'"
78
+ :show-reset-button="true"
79
+ condition="f_apply_date <= '{}'">
80
+ </datepicker>
81
+ </div>
82
+
83
+ </div>
84
+ <div class="col-sm-2">
85
+ <label class="col-sm-4 control-label">流程状态</label>
86
+ <div class="col-sm-8">
87
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloptions"
88
+ condition="defname = '{}'" placeholder='流程状态'
89
+ v-model="model.defname" :value.sync="model.defname" close-on-select>
90
+ </v-select>
91
+ </div>
92
+ </div>
93
+ <div class="col-sm-2" >
94
+ <label class="col-sm-4 control-label">报建类型</label>
95
+ <div class="col-sm-8">
96
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'报装申请',value:'报装申请'},{label:'集体报建',value:'集体报建'}]"
97
+ condition="f_apply_type = '{}'" placeholder='报建类型' :search="true"
98
+ v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
99
+ </v-select>
100
+ </div>
101
+ </div>
102
+ <div class="col-sm-2" >
103
+ <label class="col-sm-4 control-label">业务类型</label>
104
+ <div class="col-sm-8">
105
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'新报装',value:'新报装'},{label:'改管',value:'改管'}]"
106
+ condition="f_work_type = '{}'" placeholder='业务类型'
107
+ v-model="model.f_work_type" :value.sync="model.f_work_type" close-on-select>
108
+ </v-select>
109
+ </div>
110
+ </div>
111
+
112
+ <div class="col-sm-2" style="float: left">
113
+ <label class="col-sm-4 control-label">报装来源</label>
114
+ <div class="col-sm-8">
115
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'燃气系统',value:'燃气系统'},{label:'微信',value:'微信'},{label:'住建局',value:'住建局'}]"
116
+ condition="f_apply_source = '{}'" placeholder='报装来源'
117
+ v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
118
+ </v-select>
119
+ </div>
120
+ </div>
121
+
122
+
123
+
124
+ </div>
125
+ <div class="col-sm-12 " style="margin-top:5px">
126
+ <div class="col-sm-2">
127
+ <label class="col-sm-4 control-label ">用户类型</label>
128
+ <div class="col-sm-8">
129
+ <v-select :options="$parent.$parent.usertype" placeholder='用户类型' condition="f_user_type like '{}'"
130
+ :width="100" style="width:100%"
131
+ v-model="model.f_user_type" :value.sync="model.f_user_type" close-on-select>
132
+ </v-select>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+
138
+ <!--<div class="col-sm-1">-->
139
+ <!--<button class="btn btn-primary btn-sm" type="button" @click="$parent.$parent.modify()"><span-->
140
+ <!--class="glyphicon glyphicon-plus"></span>改装登记-->
141
+ <!--</button>-->
142
+ <!--</div>-->
143
+ <!--</div>-->
144
+
145
+ </form>
146
+ </criteria>
147
+ <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
148
+ <template partial='head'>
149
+ <tr class="title">
150
+ <th>
151
+ <nobr>序号</nobr>
152
+ </th>
153
+ <th>
154
+ <nobr>来源</nobr>
155
+ </th>
156
+ <th>
157
+ <nobr>当前状态</nobr>
158
+ </th>
159
+ <th>
160
+ <nobr>报建编号</nobr>
161
+ </th>
162
+ <th>
163
+ <nobr>业务类型</nobr>
164
+ </th>
165
+ <th>
166
+ <nobr>联系人</nobr>
167
+ </th>
168
+ <th>
169
+ <nobr>项目名称</nobr>
170
+ </th>
171
+ <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
172
+ <nobr>用户类型</nobr>
173
+ </th>
174
+ <th>
175
+ <nobr>电话</nobr>
176
+ </th>
177
+ <th>
178
+ <nobr>地址</nobr>
179
+ </th>
180
+ <th>
181
+ <nobr>流程状态</nobr>
182
+ </th>
183
+ <th>
184
+ <nobr>报建类型</nobr>
185
+ </th>
186
+ <th>
187
+ <nobr>报建日期</nobr>
188
+ </th>
189
+ <th>
190
+ <nobr>督办信息</nobr>
191
+ </th>
192
+ <th>
193
+ <nobr >申请信息</nobr>
194
+ </th>
195
+ <th>
196
+ <nobr>操作</nobr>
197
+ </th>
198
+ </tr>
199
+ </template>
200
+ <template partial='body'>
201
+ <tr >
202
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
203
+ <nobr><font>{{$index+1}}</font></nobr>
204
+ </td>
205
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
206
+ <nobr><font>{{row.f_apply_source}}</font></nobr>
207
+ </td>
208
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
209
+ <nobr><font>{{row.f_sub_state!='完工' ? '未完工' :'完工'}}</font></nobr>
210
+ </td>
211
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
212
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
213
+ </td>
214
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
215
+ <nobr><font>{{row.f_work_type}}</font></nobr>
216
+ </td>
217
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
218
+ <nobr><font>{{row.f_user_name}}</font></nobr>
219
+ </td>
220
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
221
+ <nobr><font>{{row.f_entry_name}}</font></nobr>
222
+ </td>
223
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
224
+ <nobr><font>{{row.f_user_type}}</font></nobr>
225
+ </td>
226
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
227
+ <nobr><font>{{row.f_phone}}</font></nobr>
228
+ </td>
229
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
230
+ <nobr><font>{{row.f_address}}</font></nobr>
231
+ </td>
232
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
233
+ <nobr><font>{{row.defname}}</font></nobr>
234
+ </td>
235
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
236
+ <nobr><font>{{row.f_apply_type}}</font></nobr>
237
+ </td>
238
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
239
+ <nobr><font>{{row.f_apply_date}}</font></nobr>
240
+ </td>
241
+ <th >
242
+ <nobr v-if="row.f_surpervise_type"><button class="btn btn-danger" @click="$parent.$parent.$parent.stopinfoshow($index)">查看督办信息</button></nobr>
243
+ <nobr v-if="!row.f_surpervise_type" >无督办</nobr>
244
+ </th>
245
+ <th >
246
+
247
+ <nobr v-if="row.f_check_state">用户已申请</nobr>
248
+ <nobr v-if="!row.f_check_state" >无申请</nobr>
249
+ </th>
250
+ <td style="text-align: center;">
251
+ <dropdown v-if="row.defname != '完工'">
252
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
253
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
254
+ </button>
255
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
256
+ <li>
257
+ <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
258
+ </li>
259
+ </ul>
260
+ </dropdown>
261
+ </td>
262
+ </tr>
263
+ </template>
264
+ </data-grid>
265
+ </criteria-paged>
266
+ </div>
267
+ <modal :show.sync="showstopinfoflag" v-ref:modal backdrop="false">
268
+ <header slot="modal-header" class="modal-header">
269
+ <button type="button" class="close" @click="closestopinfo"><span>&times;</span></button>
270
+ <h4 class="modal-title">督办信息</h4>
271
+ </header>
272
+ <article slot="modal-body" class="modal-body">
273
+ <p >{{stopremarks}}</p>
274
+ </article>
275
+ <footer slot="modal-footer" class="modal-footer">
276
+ </footer>
277
+ </modal>
278
+ </div>
279
+ </template>
280
+ <script>
281
+ import * as Util from '../../Util'
282
+ import Vue from 'vue'
283
+ import {
284
+ PagedList
285
+ } from 'vue-client'
286
+ import getNowDate from '../../getNowDate.js'
287
+ import {HttpResetClass} from 'vue-client'
288
+ export default {
289
+ title: '勘探详情',
290
+ data() {
291
+ return {
292
+ timer: null,
293
+ timer1:null,
294
+ remindTime:5,//超时提醒时间
295
+ isOverNum:0,//报建是否提醒过
296
+ model: new PagedList('rs/sql/checkuser', 20, {
297
+ data: {
298
+ id: this.$login.f.id,
299
+ fengongsi: this.$login.f.f_fengongsi,
300
+ f_product_id: 0
301
+ }
302
+ }),
303
+ fapplytype: this.$appdata.getParam('用户类型'),
304
+ applytype: this.$appdata.getParam('报建类型'),
305
+ department: this.$appdata.getParam('受理部门'),
306
+ derection: this.$appdata.getParam('方向'),
307
+ containt: this.$appdata.getParam('工作内容'),
308
+ condition: '',
309
+ select: '',
310
+ alloptions:[],
311
+ button_name:"查询",
312
+ showstopinfoflag:false,
313
+ stopremarks:"",
314
+ startFlowonce:true,
315
+ startFlowall:true,
316
+ usertype: this.$appdata.getParam('用户类型'),
317
+ }
318
+ },
319
+ compiled(){
320
+ console.log("开始判断")
321
+ },
322
+ async ready() {
323
+ this.eachFind();
324
+ this.$refs.cp.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
325
+ this.$refs.cp.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
326
+ await this.getConfig()
327
+ let str='报建语音提醒时间'
328
+ this.$refs.cp.$refs.cri.search()
329
+ str='超时提前提醒时间'
330
+ this.loadSingleValue(str)
331
+ let self = this
332
+ //判断用户是否有权限
333
+ this.checkUserOperator();
334
+ },
335
+ methods: {
336
+ //清空 查询条件项
337
+ clear(){
338
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
339
+ this.$refs.cp.$refs.cri.model[key] = []
340
+ })
341
+ },
342
+ checkUserOperator(){
343
+ if(this.$login.r.find(value => value == '报装申请')){
344
+ this.startFlowonce=true;
345
+ }
346
+ if(this.$login.r.find(value => value == '集体报装申请')){
347
+ this.startFlowall=true;
348
+ }
349
+ },
350
+ stopinfoshow(index){
351
+ this.showstopinfoflag = true;
352
+ let remakrs = this.model.rows[index].f_surpervise_info;
353
+ console.log(JSON.stringify(remakrs))
354
+ console.log(remakrs)
355
+
356
+ this.stopremarks= remakrs;
357
+ },
358
+ closestopinfo(){
359
+ this.showstopinfoflag = close;
360
+ },
361
+ getapplyName(str){
362
+ console.log("开始获取所有名")
363
+ console.log(JSON.stringify(str.activitys))
364
+ let param = [];
365
+ // let workflow = JSON.parse(str);
366
+ param.push({label:"全部",value:""})
367
+ str.activitys.forEach(function(item){
368
+ let title = item.title;
369
+ console.log(title)
370
+ param.push({label:title,value:title});
371
+ })
372
+ this.alloptions = param;
373
+
374
+ },
375
+ generateUUID() {
376
+ var d = new Date().getTime()
377
+ var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
378
+ var r = (d + Math.random() * 16) % 16 | 0
379
+ d = Math.floor(d / 16)
380
+ return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
381
+ })
382
+ return uuid
383
+ },
384
+ searchNow(){
385
+ if(this.button_name == "返回"){
386
+ this.button_name ="查询";
387
+ }
388
+ this.$refs.cp.$refs.cri.search()
389
+ this.eachFind()
390
+ },
391
+ async getConfig(){
392
+ let http = new HttpResetClass()
393
+ await http.load('POST','rs/logic/ApplyGetConfigs', {data:this.$login.f}, {resolveMsg: null, rejectMsg: null}
394
+ ).then((res)=>{
395
+ if(res.data.code && res.data.code == 200){
396
+ Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
397
+ console.log("$workflow_vue===>"+JSON.stringify(this.$workflow_vue))
398
+ this.getapplyName(this.$workflow_vue);
399
+ }else{
400
+ this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
401
+ return
402
+ }
403
+ })
404
+
405
+ },
406
+ async addactive(modify) {
407
+ this.button_name ="返回"
408
+ //await this.getConfig()
409
+ this.$workflow_vue.start_activity = modify
410
+ let http = new HttpResetClass()
411
+ let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:this.$workflow_vue.workflow_xmlfilename,start_activity:this.$workflow_vue.start_activity}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
412
+ this.$refs.cp.pager = false
413
+ let val = {
414
+ defname: this.$workflow_vue.start_activity,
415
+ f_process_id: res.data.f_process_id,
416
+ f_apply_date: Util.toStandardTimeString(),
417
+ f_apply_num: this.generateUUID(),
418
+ f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
419
+ f_product_id: res.data.f_product_id
420
+ }
421
+ // // 如果是改装,将modify装入val
422
+ // if(modify){
423
+ // modify.f_customer_type = '个人'
424
+ // modify.f_apply_type = '改装登记'
425
+ // modify.f_phone = modify.f_user_phone
426
+ // let temp = modify.f_residential_area
427
+ // modify.f_residential_area = modify.f_area
428
+ // modify.f_area = temp
429
+ // Object.assign(val,modify)
430
+ // }
431
+
432
+ console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
433
+ this.$dispatch('check', val)
434
+ this.$dispatch('changeheight')
435
+ this.$dispatch('addactive')
436
+ },
437
+ // 改装申请
438
+ modify(){
439
+ // 调出改装申请界面
440
+ this.$parent.show = false
441
+ }
442
+ ,
443
+ check(val) {
444
+ this.button_name="返回"
445
+ // if(val.defname.includes("派单")){
446
+ // if(val.f_unaccounts_money && parseInt(val.f_unaccounts_money)!=0){
447
+ // this.$showAlert('当前用户金额未结余!!!', 'warning', 3000)
448
+ // this.button_name ="查询";
449
+ // return;
450
+ // }
451
+ // }
452
+ this.$dispatch('check', val)
453
+ this.$dispatch('addactive')
454
+ }
455
+ ,
456
+ close() {
457
+ this.$dispatch('close')
458
+ }
459
+ ,
460
+ compare(val) {
461
+ val === '完工'
462
+ console.log('完工', val)
463
+ return false
464
+ },
465
+ // 获取数据
466
+ loadSingleValue(str) {
467
+ let http = new HttpResetClass()
468
+ let data = {
469
+ singlename: str,
470
+ //预先提醒时间
471
+
472
+ }
473
+ http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
474
+ console.log('-----------------进去之前-----------'+JSON.stringify(res))
475
+ let flag1=false
476
+ let flag2=false
477
+ if (res.data.length==0){
478
+ flag1=true
479
+ console.log('没有单值'+flag1)
480
+ flag2=false
481
+ }else if (res.data[0].value==0) {
482
+ flag2=true
483
+ console.log('为0')
484
+ flag1=false
485
+ }else{
486
+ if (str==='报建语音提醒时间'){
487
+ this.remindTime = res.data[0].value
488
+ }
489
+ console.log('为'+res.data[0].value)
490
+ flag1=false
491
+ flag2=false
492
+ }
493
+
494
+ if (this.isOverNum==0){
495
+ if (flag1){
496
+ console.log('不启动定时器')
497
+
498
+ }else if (flag2) {
499
+ console.log('启动定时器out')
500
+ this.setOut()
501
+ }else{
502
+ console.log('启动定时器timer和out')
503
+ this.setTimer()
504
+ this.setOut()
505
+ }
506
+ this.isOverNum++;
507
+ } else{
508
+ this.isOverNum=0;
509
+ }
510
+
511
+
512
+ },(res)=>{
513
+ //响应错误回调
514
+ console.log('响应错误')
515
+ })
516
+
517
+ },
518
+ setTimer() {
519
+ if(this.timer == null) {
520
+ this.timer = setInterval( () => {
521
+ console.log('开始定时...每过5秒执行一次')
522
+ this.$refs.cp.$refs.cri.search()
523
+ console.log('数据已刷新')
524
+ this.eachFind()
525
+ console.log('eachfind完毕');
526
+ }, 60*1000*this.remindTime)
527
+ }
528
+ },
529
+ setOut() {
530
+ if(this.timer1 == null) {
531
+ this.timer1 = setTimeout( () => {
532
+ console.log('开始setTimeout')
533
+ this.eachFind()
534
+ console.log('setTimeout完毕');
535
+ }, 1000)
536
+ }
537
+ },
538
+ //语音提醒
539
+ speckText(str) {
540
+ var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
541
+ new Audio(url).play();
542
+
543
+ },
544
+
545
+ eachFind() {
546
+ let arr = this.$refs.cp.$refs.grid.model.rows
547
+ let overNumString1=''
548
+ let flagNum1=1
549
+ let dbflag = 1
550
+ let dbinfo = []
551
+ let hourfals = 0
552
+ let hourstr = ''
553
+ for(let val of arr) {
554
+ if(val.f_surpervise_type){
555
+ dbflag = dbflag+1
556
+ dbinfo.push(val.f_user_name)
557
+ }
558
+ if(val.ishourover =='1'){
559
+ hourfals += 1
560
+ hourstr+=hourfals+'条'
561
+ }
562
+ console.log(val.isbeforeover)
563
+ if (val.isbeforeover==='预期提醒'){
564
+ console.log('flagNUm:'+flagNum1);
565
+ if (flagNum1==1){
566
+ overNumString1=flagNum1+'条'
567
+ flagNum1=flagNum1+1
568
+ }else{
569
+ overNumString1=overNumString1+'和第'+flagNum1+'条'
570
+ flagNum1=flagNum1+1
571
+ }
572
+ }
573
+ }
574
+ if(hourfals!=0){
575
+ this.speckText('请注意:第:'+overNumString1+'数据一小时后过期')
576
+ this.$showMessage("请注意:第:" + overNumString1 + "数据一小时后过期")
577
+ }
578
+ if (flagNum1!=1){
579
+ console.log(overNumString1);
580
+ this.speckText('请注意:第:'+overNumString1+'数据即将过期')
581
+ this.$showMessage("请注意:第:" + overNumString1 + "数据即将过期")
582
+ }
583
+ if(dbflag !=1){
584
+ this.speckText('请注意: 您有'+dbflag-1+'条数据被督办')
585
+ this.$showMessage("用户:"+dbinfo.join(",")+"需要紧急处理!!")
586
+ }
587
+ console.log('语音播放完毕');
588
+ }
589
+ },
590
+ created: function() {
591
+ clearInterval(this.timer)
592
+ clearInterval(this.timer1)
593
+ this.timer = null
594
+ this.timer1 = null
595
+ },
596
+ beforeDestroy() {
597
+ clearInterval(this.timer)
598
+ clearInterval(this.timer1)
599
+ this.timer = null
600
+ this.timer1 = null
601
+ },
602
+ computed: {
603
+ date() {
604
+ return getNowDate()
605
+ }
606
+ ,
607
+ selected() {
608
+ return this.$refs.cp.$refs.grid.selected
609
+ }
610
+ }
611
+ }
612
+ </script>
613
+ <style scoped>
614
+ label {
615
+ display: flex;
616
+ justify-content:center;
617
+ align-items:Center;
618
+ padding-top: 8px;
619
+ }
620
+ tr.title {
621
+ background-color: #6666ff;
622
+ }
623
+ td{
624
+ text-align: center;
625
+ }
626
+ /* .active{
627
+ color: Crimson;
628
+ }
629
+ .p{
630
+ color: green;
631
+ }*/
632
+
633
+ .p1 {
634
+ color: #dc0b12;
635
+ font-weight:bold
636
+ }
637
+ .p {
638
+ color: #ffaf4f;
639
+ }
640
+ </style>