safecheck-client 3.0.33-104 → 3.0.33-107

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