safecheck-client 3.0.33-113 → 3.0.33-114

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,838 +0,0 @@
1
- <template>
2
- <work-busy :is-busy="isSend"></work-busy>
3
- <div class="binary" style="background-color: #e8f4ff">
4
- <!--左侧安检计划列表******************************************************-->
5
- <div class="binary-left flex flex-column" style="width: 16%">
6
- <div style="height: 9%">
7
- <div class="row auto">
8
- <img style="width: 20px;margin: 0 5px" src="../../../../static/images/searchhover.png" @click="showUserCondition()"/>
9
- <v-select :width="'80%'"
10
- class="select select_list"
11
- :search="false"
12
- :value.sync="currentorder"
13
- v-model="currentorder"
14
- @change="loadCheckPlan"
15
- :options='opt'
16
- close-on-select value-single >
17
- </v-select>
18
- </div>
19
- <div class="row auto safe-div-p"><!--<span style="margin-right: 5px" @click="refresh()" style="cursor:default">测试</span>--><span style="margin-right: 5px" @click="delCheckPlan()" style="cursor:default">删除</span> <span @click="sendCheckPlan()" style="cursor:default">下发</span></div>
20
- </div>
21
- <div class="leftplan-center safe_plan_list">
22
- <div class="row safe-leftplan safe_list_li" :class="{'safe-selectplan':selectPlan.id==row.id}" v-for="row in checkplan.list.data" @click="selectPlanChange(row)">
23
- <table style="width:100%;table-layout:fixed" >
24
- <tr class="safe-planfont">
25
- <td rowspan="6"><input type="checkbox" style="pointer-events:auto" v-show="row.plan_count==0 || row.f_issued=='未下发'" onClick="event.cancelBubble = true" :checked="checkplan.check.isChecked(row.f_check_item_id)" @change="checkplan.check.setCheckes(row.id)"/></td>
26
- <td colspan="6" class="safe_p">{{row.f_plan_name}}</td>
27
- <td colspan="2" style="text-align: center"><img width="20px" style="pointer-events:auto" onClick="event.cancelBubble = true" @click="showUpPlans(row)" src="../../../../static/images/edit.png"/></td>
28
- </tr>
29
- <tr class="safe-bodyfont" style="color:#4792de">
30
- <td colspan="6">{{row.f_issued}}</td>
31
- <td colspan="2" class="safe_p">{{row.f_checker?row.f_checker:'共享'}}</td>
32
- </tr>
33
- <tr class="safe-bodyfont">
34
- <td colspan="4">{{row.f_plan_year}}-{{row.f_plan_month}}</td>
35
- <td colspan="2">总 :</td>
36
- <td colspan="2">{{row.plan_count}}</td>
37
- </tr>
38
- <tr class="safe-bodyfont">
39
- <td colspan="2">未检 :</td>
40
- <td colspan="2">{{row.unchecked}}</td>
41
- <td colspan="2">已检 :</td>
42
- <td colspan="2">{{row.checked}}</td>
43
- </tr>
44
- <tr class="safe-bodyfont">
45
- <td colspan="2">安检率 :</td>
46
- <td colspan="2">{{(row.checked*100/row.plan_count).toFixed(2)}}%</td>
47
- <td colspan="2">入户率 :</td>
48
- <td colspan="2">{{(row.ruhu_count*100/row.plan_count).toFixed(2)}}%</td>
49
- </tr>
50
- <tr class="safe-bodyfont" v-if="row.f_create_time">
51
- <td colspan="3">创建时间 :</td>
52
- <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_create_time">{{row.f_create_time}}</td>
53
- </tr>
54
- <tr class="safe-bodyfont" v-if="row.f_safecheck_type">
55
- <td colspan="3">安检类型 :</td>
56
- <td colspan="5" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" :title="row.f_safecheck_type">{{row.f_safecheck_type}}</td>
57
- </tr>
58
- </table>
59
- </div>
60
- </div>
61
- <div style="height: 11%">
62
- <div class="row auto leftplan-center" style="padding: 8px">
63
- <div class="col-sm-6" style="">
64
- <span>共{{checkplan.list.count}}条</span>
65
- </div>
66
- <div class="col-sm-6" style="text-align: end">
67
- <span @click="loadMore('checkplan')"><img src="../../../../static/images/doubledown.png"/>&ensp;更多</span>
68
- </div>
69
- </div>
70
- <div class="row auto" style="padding: 10px;text-align: center">
71
- <img src="../../../../static/images/addnew.png" @click="showcCreatePlan()"/>
72
- </div>
73
- </div>
74
- </div>
75
- <!--右侧列表**************************************************************************-->
76
- <div class="binary-right" style="width: 84%;overflow: auto">
77
- <div style="height: 5%">
78
- <div class="col-sm-4">
79
- <label class="font_normal_body">公&emsp;&emsp;司</label>
80
- <right-tree-safe :islist="false" :width="'60%'" @re-res="getRes"></right-tree-safe>
81
- </div>
82
- </div>
83
- <div style="height: 95%">
84
- <div style="height: 50%" class="leftplan-center">
85
- <check-plan-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:item></check-plan-list>
86
- </div>
87
- <div style="height: 50%">
88
- <check-user-list :selectplan="selectPlan" :userlogin="userlogin" v-ref:user></check-user-list>
89
- </div>
90
- </div>
91
- </div>
92
- <modal :show.sync="showCondtion" v-ref:modal :width="'50%'" :backdrop="false">
93
- <div slot="modal-header" class="modal-header">
94
- <h4 class="modal-title">
95
- 计划查询条件
96
- </h4>
97
- </div>
98
- <div slot="modal-body" class="modal-body">
99
- <div class="row">
100
- <div class="form-group col-sm-4" >
101
- <label class="font_normal_body">计划名称:</label>
102
- <input type="text" class="input_search" v-model="planCondition.f_plan_name" @change="setProperty('checkplan','f_plan_name',planCondition.f_plan_name)"
103
- style="width: 60%" placeholder="请选择" />
104
- </div>
105
- <div class="form-group col-sm-4" >
106
- <label class="font_normal_body">计划年份:</label>
107
- <v-select
108
- class="select select_list"
109
- :value.sync="planCondition.f_plan_year"
110
- v-model="planCondition.f_plan_year"
111
- @change="setProperty('checkplan','f_plan_year',planCondition.f_plan_year)"
112
- :search="false"
113
- :options='getConList("yearList")'
114
- placeholder='请选择'
115
- close-on-select
116
- value-single
117
- >
118
- </v-select>
119
- </div>
120
- <div class="form-group col-sm-4" >
121
- <label class="font_normal_body">计划月份:</label>
122
- <v-select
123
- class="select select_list"
124
- :value.sync="planCondition.f_plan_month"
125
- v-model="planCondition.f_plan_month"
126
- @change="setProperty('checkplan','f_plan_month',planCondition.f_plan_month)"
127
- :search="false"
128
- :options='getConList("monthList")'
129
- placeholder='请选择'
130
- close-on-select
131
- value-single>
132
- </v-select>
133
- </div>
134
- <div class="form-group col-sm-4" >
135
- <label class="font_normal_body">是否共享:</label>
136
- <v-select
137
- class="select select_list"
138
- :value.sync="planCondition.isShare"
139
- v-model="planCondition.isShare"
140
- @change="setProperty('checkplan','isAndNot',planCondition.isShare)"
141
- :options='getConList("conIsAndNot")'
142
- :search="false"
143
- placeholder='请选择'
144
- close-on-select
145
- value-single
146
- >
147
- </v-select>
148
- </div>
149
- <div class="form-group col-sm-4" >
150
- <label class="font_normal_body">是否下发:</label>
151
- <v-select
152
- class="select select_list"
153
- :value.sync="planCondition.issued"
154
- v-model="planCondition.issued"
155
- :options='getConList("isAndNot")'
156
- @change="setProperty('checkplan','issude',planCondition.issued)"
157
- placeholder='请选择'
158
- :search="false"
159
- close-on-select
160
- value-single
161
- >
162
- </v-select>
163
- </div>
164
- <div class="form-group col-sm-4" >
165
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
166
- <v-select
167
- class="select select_list"
168
- :value.sync="planCondition.f_checker"
169
- v-model="planCondition.f_checker"
170
- @change="setProperty('checkplan','checkerid',planCondition.f_checker.id)"
171
- :options='getConList("checker")'
172
- placeholder='请选择'
173
- close-on-select
174
- value-single
175
- >
176
- </v-select>
177
- </div>
178
-
179
- <div class="form-group col-sm-4" >
180
- <label class="font_normal_body">安检类型:</label>
181
- <v-select
182
- class="select select_list"
183
- :value.sync="planCondition.f_safecheck_type"
184
- v-model="planCondition.f_safecheck_type"
185
- @change="setProperty('checkplan','safechecktype',planCondition.f_safecheck_type)"
186
- :options='getConList("safechecktype")'
187
- placeholder='请选择'
188
- :search="false"
189
- close-on-select
190
- value-single
191
- >
192
- </v-select>
193
- </div>
194
- <div class="form-group col-sm-4" >
195
- <label class="font_normal_body">创&ensp;建&ensp;人:</label>
196
- <input type="text" class="input_search" v-model="planCondition.f_create_operator" @change="setProperty('checkplan','f_create_operator',planCondition.f_create_operator)"
197
- style="width: 60%" placeholder="创建人" />
198
- </div>
199
- </div>
200
- </div>
201
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
202
- <button class="button_search" @click="loadCheckPlan" style="margin-right: 15px">查询</button>
203
- <button class="button_search" @click="cancel">取消</button>
204
- </div>
205
- </modal>
206
- <modal :show.sync="showCreatePlan" v-ref:modal1 :width="'50%'" :backdrop="false">
207
- <div slot="modal-header" class="modal-header">
208
- <h4 class="modal-title">
209
- 新建计划
210
- </h4>
211
- </div>
212
- <div slot="modal-body" class="modal-body">
213
- <div class="row">
214
- <div class="form-group col-sm-4" >
215
- <label class="font_normal_body">计划名称:</label>
216
- <input type="text" class="input_search" v-model="createPlan.f_plan_name"
217
- style="width: 60%" placeholder="请选择" />
218
- </div>
219
- <div class="form-group col-sm-4" >
220
- <label class="font_normal_body">计划年份:</label>
221
- <v-select
222
- class="select select_list"
223
- :value.sync="createPlan.f_plan_year"
224
- v-model="createPlan.f_plan_year"
225
- :search="false"
226
- :options='yearList'
227
- placeholder='请选择'
228
- close-on-select
229
- value-single
230
- >
231
- </v-select>
232
- </div>
233
- <div class="form-group col-sm-4" >
234
- <label class="font_normal_body">计划月份:</label>
235
- <v-select
236
- class="select select_list"
237
- :value.sync="createPlan.f_plan_month"
238
- v-model="createPlan.f_plan_month"
239
- :search="false"
240
- :options='monthList'
241
- placeholder='请选择'
242
- close-on-select
243
- value-single>
244
- </v-select>
245
- </div>
246
- <div class="form-group col-sm-4" >
247
- <label class="font_normal_body">是否共享:</label>
248
- <v-select
249
- class="select select_list"
250
- :search="false"
251
- :value.sync="createPlan.isShare"
252
- v-model="createPlan.isShare"
253
- :options='isAndNot'
254
- placeholder='请选择'
255
- close-on-select
256
- value-single
257
- >
258
- </v-select>
259
- </div>
260
- <div class="form-group col-sm-4" v-show="createPlan.isShare=='否'">
261
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
262
- <v-select
263
- class="select select_list"
264
- :value.sync="createPlan.checker"
265
- v-model="createPlan.checker"
266
- :options='checker'
267
- placeholder='请选择'
268
- close-on-select
269
- value-single
270
- >
271
- </v-select>
272
- </div>
273
-
274
- <div class="form-group col-sm-4" >
275
- <label class="font_normal_body">安检类型:</label>
276
- <v-select
277
- class="select select_list"
278
- :value.sync="createPlan.f_safecheck_type"
279
- v-model="createPlan.f_safecheck_type"
280
- :search="false"
281
- :options='ntoway'
282
- placeholder='请选择'
283
- close-on-select
284
- value-single
285
- >
286
- </v-select>
287
- </div>
288
- </div>
289
- </div>
290
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
291
- <button class="button_search" style="margin-right: 15px" @click="addNewPlan()">创建计划</button>
292
- <button class="button_search" @click="cancel">取消</button>
293
- </div>
294
- </modal>
295
- <modal :show.sync="showUpPlan" v-ref:modal2 :backdrop="false">
296
- <div slot="modal-header" class="modal-header">
297
- <h4 class="modal-title">
298
- 修改计划
299
- </h4>
300
- </div>
301
- <div slot="modal-body" class="modal-body">
302
- <div class="row">
303
- <div class="form-group col-sm-4" >
304
- <label class="font_normal_body">计划名称:</label>
305
- <input type="text" class="input_search" v-model="upCheckPlan.f_plan_name"
306
- style="width: 60%" />
307
- </div>
308
- <div class="form-group col-sm-4" >
309
- <label class="font_normal_body">计划年份:</label>
310
- <v-select
311
- class="select select_list"
312
- :value.sync="upCheckPlan.f_plan_year"
313
- v-model="upCheckPlan.f_plan_year"
314
- :search="false"
315
- :value="upCheckPlan.f_plan_year"
316
- :options='yearList'
317
-
318
- close-on-select
319
- value-single>
320
-
321
-
322
- </v-select>
323
- <!-- <datepicker
324
- placeholder='请选择'
325
- style="width:60%"
326
- :disabled-days-of-week="[]"
327
- :format="'yyyy'"
328
- :show-rest-button="reset"
329
- :value.sync="upCheckPlan.f_plan_year"
330
- v-model="upCheckPlan.f_plan_year">
331
- </datepicker>-->
332
- </div>
333
- <div class="form-group col-sm-4" >
334
- <label class="font_normal_body">计划月份:</label>
335
- <v-select
336
- class="select select_list"
337
- :value.sync="upCheckPlan.f_plan_month"
338
- v-model="upCheckPlan.f_plan_month"
339
-
340
- :options='monthList'
341
- close-on-select
342
- value-single>
343
- </v-select>
344
- </div>
345
- <div class="form-group col-sm-4" >
346
- <label class="font_normal_body">是否共享:</label>
347
- <v-select
348
- class="select select_list"
349
- :search="false"
350
- :value.sync="upCheckPlan.isShare"
351
- v-model="upCheckPlan.isShare"
352
- :options='isAndNot'
353
- placeholder='请选择'
354
- close-on-select
355
- value-single
356
- >
357
- </v-select>
358
- </div>
359
- <div class="form-group col-sm-4" v-show="upCheckPlan.isShare=='否'">
360
- <label class="font_normal_body">安&ensp;检&ensp;员:</label>
361
- <v-select
362
- class="select select_list"
363
- :value.sync="upCheckPlan.checker"
364
- v-model="upCheckPlan.checker"
365
- :options='checker'
366
- close-on-select
367
- value-single
368
- >
369
- </v-select>
370
- </div>
371
-
372
- <div class="form-group col-sm-4">
373
- <label class="font_normal_body">安检类型:</label>
374
- <v-select
375
- class="select select_list"
376
- :value.sync="upCheckPlan.f_safecheck_type"
377
- v-model="upCheckPlan.f_safecheck_type"
378
- :options='ntoway'
379
- close-on-select
380
- value-single
381
- >
382
- </v-select>
383
- </div>
384
- </div>
385
- </div>
386
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
387
- <button class="button_search" style="margin-right: 15px" @click="upPlan()">保存修改</button>
388
- <button class="button_search" @click="cancel">取消</button>
389
- </div>
390
- </modal>
391
- </div>
392
- </template>
393
-
394
- <script>
395
- import {SearchList,HttpResetClass, PagedList} from "vue-client";
396
- import Vue from "vue";
397
- import AppData from "../../../stores/AppData";
398
-
399
- export default {
400
- name: "PlanManage",
401
- title: '计划管理',
402
- data() {
403
- return {
404
- a:'1',
405
- opt:[{label:"按时间降序",value:"按时间降序"},{label:"按时间升序",value:"按时间升序"}],
406
- currentorder:'按时间降序',
407
- checkplan : new SearchList(true),
408
- selectPlan:{id:''},
409
- upCheckPlan:{
410
- f_plan_name:'',
411
- f_safecheck_type:'',
412
- f_plan_year:'',
413
- f_plan_month:'',
414
- f_checker_id:'',
415
- isShare:'',
416
- f_checker:'',
417
- checker:{}
418
- },
419
- isSend:false,
420
- createPlan:{
421
- f_plan_name:'',
422
- f_plan_year:'',
423
- f_plan_month:'',
424
- isShare:'否',
425
- f_issued:'否',
426
- f_checker_id:null,
427
- checker:{},
428
- f_checker:null,
429
- f_safecheck_type:'',
430
- },
431
- planCondition:{},
432
- showCondtion:false,
433
- showCreatePlan:false,
434
- showUpPlan:false,
435
- isAndNot:[{label:'是',value:'是'},{label:'否',value:'否'}],
436
- conIsAndNot:[{label:'是',value:'is null'},{label:'否',value:'is not null'}],
437
- yearList:[{label:2020,value:2020},{label:2021,value:2021},{label:2022,value:2022},{label:2023,value:2023},{label:2024,value:2024},{label:2025,value:2025},{label:2026,value:2026},{label:2027,value:2027},{label:2028,value:2028},{label:2029,value:2029},{label:2030,value:2030}],
438
- monthList:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9},{label:"10",value:10},{label:"11",value:11},{label:"12",value:12}],
439
- safechecktype:[{label:'年度普检',value:'年度普检'}],
440
- checker:[],
441
- checkertCon:[],
442
- userlogin:{
443
- id:this.$login.f.id,
444
- name:this.$login.f.name,
445
- orgid:this.$login.f.orgid,
446
- orgstr:this.$login.f.orgs,
447
- }
448
- //需要测试直接把下面放开即可
449
- /*userlogin:{
450
- id:'141701',
451
- name:'hwq',
452
- orgid:'35526',
453
- orgstr:'西华县天然气有限公司'
454
- }*/
455
- }
456
- },
457
- async ready(){
458
- await this.loadpage()
459
- },
460
- computed: {
461
- ntoway() {
462
- /*/!* return AppData.getParam('安检类型')*!/*/
463
- return this.$appdata.getParam('安检类型')
464
- }
465
- },
466
- methods:{
467
- /* ntoway() {
468
- /!* return AppData.getParam('安检类型')*!/
469
- return Vue.$appdata.getParam('安检类型')
470
- },*/
471
- async loadpage(){
472
- //await this.checkplan.searchList("/rs/sql/预约计划下发", {},{groupitem:"",f_filialeids:"('"+this.userlogin.orgid+"')",orderitem:"f_create_time desc"})
473
- await this.loadCheckPlan()
474
- await this.searchChecker(this.userlogin.id)
475
- },
476
- getRes(obj) {
477
- console.log("----obj"+JSON.stringify(obj.resids))
478
- console.log(obj)
479
- if(obj.resids.length>0 && obj.resids[0]!=this.userlogin.orgid && obj.resids[0]){
480
- this.userlogin.orgid=obj.resids[0]
481
- this.userlogin.orgstr=obj.res[0]
482
- if(this.$refs.item && this.$refs.user){
483
- this.loadpage()
484
- this.selectPlan={id:""}
485
- this.$refs.item.model.rows=[]
486
- this.$refs.user.model.rows=[]
487
- this.$refs.user.loadpage()
488
- }
489
- }
490
- },
491
- getConList(field){
492
- return [{label:'全部',value:''}, ...this[field]]
493
- },
494
- selectPlanChange(plan){
495
- this.selectPlan=plan
496
- //this.upCheckPlan=plan
497
- },
498
- showUserCondition(){
499
- this.showCondtion=true
500
- },
501
- showcCreatePlan(){
502
- this.showCreatePlan=true
503
- },
504
- cancel(){
505
- this.showCondtion=false
506
- this.showCreatePlan=false
507
- this.showUpPlan=false
508
- },
509
- //新建计划
510
- async addNewPlan() {
511
- if(!this.validationCreatePlan()){
512
- return
513
- }
514
- this.isSend=true
515
- let res=await new HttpResetClass().load("POST","/rs/sql/getCheckplan", {data: {condition:"f_plan_name='"+this.createPlan.f_plan_name+"'",sortfield:'f_create_time desc'}})
516
- console.log("结果-"+res.data.length)
517
- if(res.data.length>0){
518
- Vue.showMessage("计划名称不能重复!")
519
- this.isSend=false
520
- return
521
- }
522
- if(this.createPlan.isShare=="是"){
523
- this.createPlan.f_checker_id=null
524
- this.createPlan.f_checker=null
525
- }else{
526
- this.createPlan.f_checker_id=this.createPlan.checker.id
527
- this.createPlan.f_checker=this.createPlan.checker.name
528
- }
529
- console.log("this.createPlan.f_checker:"+this.createPlan.f_checker)
530
- this.createPlan.f_plan_type='预约计划'
531
- this.createPlan.f_subcompany=this.userlogin.orgstr
532
- this.createPlan.f_filialeid=this.userlogin.orgid
533
- this.createPlan.f_create_operator=this.userlogin.name
534
- this.createPlan.f_create_time=Util.toStandardTimeString()
535
- await new HttpResetClass().load('POST',"/rs/logic/createCheckPlan", {"data": this.createPlan},{resolveMsg : '新建计划成功!', rejectMsg : '新建计划失败!'})
536
- //await this.loadCheckPlan('',()=>{})
537
- this.createPlan={
538
- f_plan_name:'',
539
- f_plan_year:'',
540
- f_plan_month:'',
541
- isShare:'否',
542
- f_issued:'否',
543
- f_checker_id:null,
544
- checker:{},
545
- f_checker:null,
546
- f_safecheck_type:'',
547
- f_create_operator:''
548
- }
549
- await this.loadCheckPlan()
550
- this.isSend=false
551
-
552
- },
553
- validationCreatePlan(){
554
- if(!this.createPlan.f_plan_name){
555
- Vue.showMessage("请输入安检计划名称!")
556
- return false
557
- }
558
- if(!this.createPlan.f_plan_year){
559
- Vue.showMessage("请选择安检年份!")
560
- return false
561
- }
562
- if(!this.createPlan.f_plan_month){
563
- Vue.showMessage("请选择安检月份!")
564
- return false
565
- }
566
- if(this.createPlan.isShare=="否"){
567
- if(JSON.stringify(this.createPlan.checker)=='{}'){
568
- Vue.showMessage("请选择安检人员!")
569
- return false
570
- }
571
- }else{
572
- this.createPlan.f_checker=''
573
- }
574
- if(!this.createPlan.f_safecheck_type){
575
- Vue.showMessage("请选择安检类型!")
576
- return false
577
- }
578
- return true
579
- },
580
- //查询安检员selectChanged
581
- async searchChecker(id){
582
- let res=await new HttpResetClass().load('POST', '/rs/search', {
583
- source: `root.getResourceById($${this.userlogin.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)`,
584
- userid: this.$login.f.id
585
- }, {resolveMsg: null, rejectMsg: null})
586
- let arr = []
587
- res.data.forEach((resRow) => {
588
- if (!arr.includes(resRow.name) && resRow.state == '在职'){
589
- arr.push(resRow.name)
590
- this.checker.push({label:resRow.name,value:resRow})
591
- }
592
- })
593
- },
594
- //设置属性值
595
- setProperty(modulename, property, value) {
596
- console.log(modulename+"新添--"+property+"--"+value)
597
- if(value=='全部'){
598
- this[modulename].search.setField(property, '')
599
- }else{
600
- this[modulename].search.setField(property, value)
601
- }
602
- },
603
- //按条件查询所有安检计划
604
- async loadCheckPlan() {
605
- this.isSend=true
606
- this.checkplan.check.checkes=[]
607
- let fieldValue=''
608
- switch(this.currentorder){
609
- case "按时间降序":
610
- fieldValue='f_create_time desc'
611
- break
612
- case "按时间升序":
613
- fieldValue='f_create_time'
614
- break
615
- }
616
- console.log("--------fieldValue"+fieldValue)
617
- this.cancel()
618
- await this.checkplan.searchList("/rs/sql/预约计划下发",
619
- {"f_plan_name": "f_plan_name like '%{}%'",
620
- "f_plan_year":"f_plan_year={}",
621
- "f_plan_month":"f_plan_month={}",
622
- "checkerid":"f_checker_id='{}'",
623
- "isAndNot":"f_checker {}",
624
- "safechecktype":"f_safecheck_type='{}'",
625
- "issude":"f_issued = '{}'",
626
- "f_create_operator": "f_create_operator like '%{}%'"
627
- },
628
- {orderitem:fieldValue,
629
- f_filialeids:"('"+this.userlogin.orgid+"')",
630
- groupitem:""
631
- }
632
- )
633
-
634
- this.isSend=false
635
- },
636
- //加载更多数据
637
- async loadMore(modelname) {
638
- this.isSend=true
639
- await this[modelname].list.loadMore()
640
- this.isSend=false
641
- },
642
- showUpPlans(row){
643
- this.upCheckPlan.id=row.id
644
- this.upCheckPlan.f_safecheck_type=row.f_safecheck_type
645
- this.upCheckPlan.f_plan_name=row.f_plan_name
646
- this.upCheckPlan.f_plan_year=row.f_plan_year
647
- this.upCheckPlan.f_plan_month=row.f_plan_month
648
- this.upCheckPlan.f_checker_id=row.f_checker_id?row.f_checker_id:null
649
- this.upCheckPlan.f_checker=row.f_checker?row.f_checker:null
650
- this.upCheckPlan.isShare=row.f_checker_id?'否':'是'
651
- this.upCheckPlan.f_issued=row.f_issued
652
- this.upCheckPlan.checker={id:row.f_checker_id,name:row.f_checker}
653
- this.showUpPlan=true
654
- },
655
- async upPlan(){
656
- if(this.upCheckPlan.f_issued=='已下发'){
657
- this.$showMessage("该计划已下发,无法进行修改!")
658
- return
659
- }
660
- if(!this.upCheckPlan.f_plan_name){
661
- Vue.showMessage("请输入安检计划名称!")
662
- return false
663
- }
664
- if(!this.upCheckPlan.f_plan_year){
665
- Vue.showMessage("请选择安检年份!")
666
- return false
667
- }
668
- if(!this.upCheckPlan.f_plan_month){
669
- Vue.showMessage("请选择安检月份!")
670
- return false
671
- }
672
- console.log(this.upCheckPlan)
673
-
674
- if(this.upCheckPlan.isShare=="是"){
675
- this.upCheckPlan.f_checker_id=null
676
- this.upCheckPlan.f_checker=null
677
- }else{
678
- this.upCheckPlan.f_checker_id=this.upCheckPlan.checker.id
679
- this.upCheckPlan.f_checker=this.upCheckPlan.checker.name
680
- }
681
- this.isSend=true
682
- let res=await new HttpResetClass().load("POST", "/rs/logic/updateCheckPlan", {
683
- data:{
684
- f_checker:this.upCheckPlan.f_checker,
685
- f_safecheck_type:this.upCheckPlan.f_safecheck_type,
686
- f_checker_id:this.upCheckPlan.f_checker_id,
687
- f_plan_name:this.upCheckPlan.f_plan_name,
688
- f_plan_year:this.upCheckPlan.f_plan_year,
689
- f_plan_month:this.upCheckPlan.f_plan_month,
690
- f_plan_id:this.upCheckPlan.id
691
- }
692
- }, {resolveMsg: null, rejectMsg: null})
693
- if(res.data.code==200){
694
- this.$showMessage("修改成功!")
695
- this.cancel()
696
- await this.loadCheckPlan()
697
- }else{
698
- this.$showMessage("修改失败!")
699
- }
700
- this.isSend=false
701
- },
702
- //下发安检计划
703
- async sendCheckPlan(f){
704
- if(this.checkplan.check.checkes.length<1){
705
- this.$showMessage("请选择要下发的安检计划")
706
- return
707
- }
708
- this.isSend=true
709
- let res=await new HttpResetClass().load("POST", "/rs/logic/NewBespeakCheckPlan", {
710
- data:{
711
- f_issued:'是',
712
- f_issue_time:Util.toStandardTimeString(),
713
- f_send_operator:this.userlogin.name,
714
- param:this.checkplan.check.checkes,
715
- }
716
- }, {resolveMsg: null, rejectMsg: null})
717
- if(res.data.code==200){
718
- //Vue.showMessage("下发成功!其中有"+res.data.repet+"个计划己经是下发状态")
719
- this.$showMessage("下发成功!")
720
- }else{
721
- this.$showMessage("下发失败!")
722
- }
723
- await this.loadCheckPlan()
724
- this.isSend=false
725
- },
726
- //删除安检计划
727
- async delCheckPlan(f){
728
- if(this.checkplan.check.checkes.length<1){
729
- this.$showMessage("请选择要删除的安检计划")
730
- return
731
- }
732
- this.isSend=true
733
- let res=await new HttpResetClass().load("POST", "/rs/logic/deleteCheckPlan", {
734
- data:{
735
- f_operator:this.userlogin.orgstr,//global.login.name,
736
- condition:"",
737
- switchCheckAll:true,
738
- checkAll:false,
739
- param:this.checkplan.check.checkes,
740
- columnName: "f_plan_id"
741
- }
742
- }, {resolveMsg: null, rejectMsg: null})
743
- console.log(JSON.stringify(res))
744
- if(res.data.code==200){
745
- this.$showMessage("删除成功!")
746
- }else{
747
- this.$showMessage("删除失败!")
748
- }
749
- if(this.checkplan.check.checkes.indexOf(this.selectPlan.id)!= -1){
750
- this.selectPlan={id:''}
751
- console.log("包含了清空selectplan")
752
- }
753
- await this.loadCheckPlan()
754
- this.isSend=false
755
- },
756
- async refresh(){
757
- this.$refs.item.$refs.paged.$refs.criteria.search()
758
- this.$refs.user.$refs.paged.$refs.criteria.search()
759
- await this.loadCheckPlan()
760
- },
761
- async refreshPlan(){
762
- this.$refs.item.$refs.paged.$refs.criteria.search()
763
- await this.loadCheckPlan()
764
- }
765
- }
766
- }
767
- </script>
768
-
769
- <style scoped>
770
- .safe-planfont{
771
- font-family: MicrosoftYaHei;
772
- font-size: 15px;
773
- font-weight: normal;
774
- font-stretch: normal;
775
- letter-spacing: 2px;
776
- color: #333333;
777
- line-height: 25px;
778
- }
779
- .safe-bodyfont{
780
- font-family: MicrosoftYaHei;
781
- font-size: 14px;
782
- font-weight: normal;
783
- font-stretch: normal;
784
- letter-spacing: 0px;
785
- color: #999999;
786
- line-height: 30px;
787
- }
788
- .safe-leftplan{
789
- height:auto;
790
- border-bottom:1px solid #ececec;
791
- padding: 10px 5px
792
- }
793
- .leftplan-center{
794
- border-top:1px solid #ececec;
795
- border-bottom:1px solid #ececec;
796
- }
797
- .safe_p{
798
- white-space: nowrap;
799
- overflow: hidden;
800
- text-overflow: ellipsis;
801
- }
802
- .safe-div-p{
803
- color: #4792de;
804
- text-align: end;
805
- padding: 8px 15px;
806
- }
807
- .safe_list_li:hover{
808
- background-color: rgb(245,246,247);
809
- }
810
- .safe-selectplan{
811
- pointer-events: none;
812
- background-color: rgb(216,234,251);
813
- }
814
- .safe_plan_list{
815
- height: 80%;
816
- overflow: scroll;
817
- }
818
-
819
- </style>
820
- <style>
821
- .safe_plan_list::-webkit-scrollbar{
822
- background-color: #F5F5F5;
823
- }
824
-
825
- /*定义滚动条轨道 内阴影+圆角*/
826
- .safe_plan_list::-webkit-scrollbar-track{
827
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
828
- border-radius: 10px;
829
- background-color: #F5F5F5;
830
- }
831
-
832
- /*定义滑块 内阴影+圆角*/
833
- .safe_plan_list::-webkit-scrollbar-thumb{
834
- border-radius: 10px;
835
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
836
- background-color: #F5F5F5;
837
- }
838
- </style>