safecheck-client 3.0.35-3 → 3.0.35-5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,960 +1,962 @@
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>
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_class:'',
492
+ f_end_time:'',
493
+ f_start_time:'',
494
+ f_plan_name:'',
495
+ f_plan_year:'',
496
+ f_plan_month:'',
497
+ isShare:'否',
498
+ f_issued:'否',
499
+ f_checker_id:null,
500
+ checker:{},
501
+ f_checker:null,
502
+ f_safecheck_type:'',
503
+ },
504
+ planCondition:{},
505
+ showCondtion:false,
506
+ showCreatePlan:false,
507
+ showUpPlan:false,
508
+ isAndNot:[{label:'是',value:''},{label:'否',value:''}],
509
+ conIsAndNot:[{label:'是',value:'is null'},{label:'否',value:'is not null'}],
510
+ 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}],
511
+ 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}],
512
+ safechecktype:[{label:'年度普检',value:'年度普检'}],
513
+ checker:[],
514
+ checkertCon:[],
515
+ userlogin:{
516
+ id:this.$login.f.id,
517
+ name:this.$login.f.name,
518
+ orgid:this.$login.f.orgid,
519
+ orgstr:this.$login.f.orgs,
520
+ }
521
+ //需要测试直接把下面放开即可
522
+ /*userlogin:{
523
+ id:'141701',
524
+ name:'hwq',
525
+ orgid:'35526',
526
+ orgstr:'西华县天然气有限公司'
527
+ }*/
528
+ }
529
+ },
530
+ async ready(){
531
+ await this.loadpage()
532
+ },
533
+ computed: {
534
+ ntoway() {
535
+ /*/!* return AppData.getParam('安检类型')*!/*/
536
+ return this.$appdata.getParam('安检类型')
537
+ }
538
+ },
539
+ methods:{
540
+ // 选中部门
541
+ reres(val){
542
+ if(val.res == undefined || val.res[0] == undefined || val.res[0] == '' || val.res.length > 1){
543
+ return
544
+ }
545
+ this.createPlan.f_outlets = val.res[0]
546
+ if (this.createPlan.isShare=='否'){
547
+ this.checker = []
548
+ let vali = {
549
+ source: `this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$)!=-1)`,
550
+ userid: `${val.resids[0]}`
551
+ }
552
+ let http = new HttpResetClass()
553
+ http.load('POST', '/rs/search', {data: vali}, {resolveMsg: null, rejectMsg: null}).then((res) => {
554
+ res.data.forEach((item) => {
555
+ if (item.state == '在职'){
556
+ this.checker.push({label:item.name,value:item})
557
+ }
558
+ })
559
+ })
560
+ }else {
561
+ this.classes = this.$appdata.getParam(`工单-` + val.res[0]) ? [{
562
+ label: '请选择',
563
+ value: ''
564
+ }, ...this.$appdata.getParam(`工单-` + val.res[0])] : [{label: '请选择', value: ''}]
565
+ }
566
+ },
567
+ /* ntoway() {
568
+ /!* return AppData.getParam('安检类型')*!/
569
+ return Vue.$appdata.getParam('安检类型')
570
+ },*/
571
+ async loadpage(){
572
+ //await this.checkplan.searchList("/rs/sql/预约计划下发", {},{groupitem:"",f_filialeids:"('"+this.userlogin.orgid+"')",orderitem:"f_create_time desc"})
573
+ await this.loadCheckPlan()
574
+ // await this.searchChecker(this.userlogin.id)
575
+ },
576
+ getRes(obj) {
577
+ console.log("----obj"+JSON.stringify(obj.resids))
578
+ console.log(obj)
579
+ if(obj.resids.length>0 && obj.resids[0]!=this.userlogin.orgid && obj.resids[0]){
580
+ this.userlogin.orgid=obj.resids[0]
581
+ this.userlogin.orgstr=obj.res[0]
582
+ if(this.$refs.item && this.$refs.user){
583
+ this.loadpage()
584
+ this.selectPlan={id:""}
585
+ this.$refs.item.model.rows=[]
586
+ this.$refs.user.model.rows=[]
587
+ this.$refs.user.loadpage()
588
+ }
589
+ }
590
+ },
591
+ getConList(field){
592
+ return [{label:'全部',value:''}, ...this[field]]
593
+ },
594
+ selectPlanChange(plan){
595
+ this.selectPlan=plan
596
+ //this.upCheckPlan=plan
597
+ },
598
+ showUserCondition(){
599
+ this.showCondtion=true
600
+ },
601
+ showcCreatePlan(){
602
+ this.showCreatePlan=true
603
+ },
604
+ cancel(){
605
+ this.showCondtion=false
606
+ this.showCreatePlan=false
607
+ this.showUpPlan=false
608
+ },
609
+ //新建计划
610
+ async addNewPlan() {
611
+ if(!this.validationCreatePlan()){
612
+ return
613
+ }
614
+ this.isSend=true
615
+ 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'}})
616
+ console.log("结果-"+res.data.length)
617
+ if(res.data.length>0){
618
+ Vue.showMessage("计划名称不能重复!")
619
+ this.isSend=false
620
+ return
621
+ }
622
+ if(this.createPlan.isShare=="是"){
623
+ this.createPlan.f_checker_id=null
624
+ this.createPlan.f_checker=null
625
+ }else{
626
+ this.createPlan.f_checker_id=this.createPlan.checker.id
627
+ this.createPlan.f_checker=this.createPlan.checker.name
628
+ this.createPlan.f_outlets=this.createPlan.f_outlets
629
+ }
630
+ console.log("this.createPlan.f_checker:"+this.createPlan.f_checker)
631
+ this.createPlan.f_plan_type='预约计划'
632
+ this.createPlan.f_subcompany=this.userlogin.orgstr
633
+ this.createPlan.f_filialeid=this.userlogin.orgid
634
+ this.createPlan.f_create_operator=this.userlogin.name
635
+ this.createPlan.f_create_time=Util.toStandardTimeString()
636
+ await new HttpResetClass().load('POST',"/rs/logic/createCheckPlan", {"data": this.createPlan},{resolveMsg : '新建计划成功!', rejectMsg : '新建计划失败!'})
637
+ //await this.loadCheckPlan('',()=>{})
638
+ this.createPlan={
639
+ f_plan_name:'',
640
+ f_plan_year:'',
641
+ f_plan_month:'',
642
+ f_class:'',
643
+ f_outlets:'',
644
+ isShare:'否',
645
+ f_issued:'否',
646
+ f_checker_id:null,
647
+ checker:{},
648
+ f_checker:null,
649
+ f_safecheck_type:'',
650
+ f_create_operator:''
651
+ }
652
+ await this.loadCheckPlan()
653
+ this.isSend=false
654
+
655
+ },
656
+ validationCreatePlan(){
657
+ if(!this.createPlan.f_plan_name){
658
+ Vue.showMessage("请输入安检计划名称!")
659
+ return false
660
+ }
661
+ if(!this.createPlan.f_plan_year){
662
+ Vue.showMessage("请选择安检年份!")
663
+ return false
664
+ }
665
+ if(!this.createPlan.f_start_time){
666
+ Vue.showMessage("请选择计划开始时间!")
667
+ return false
668
+ }
669
+ if(!this.createPlan.f_end_time){
670
+ Vue.showMessage("请选择计划结束时间!")
671
+ return false
672
+ }
673
+ if( this.createPlan.f_start_time > this.createPlan.f_end_time){
674
+ Vue.showMessage("计划结束时间不能早于计划开始时间!")
675
+ return false
676
+ }
677
+ if(!this.createPlan.f_plan_month){
678
+ Vue.showMessage("请选择安检月份!")
679
+ return false
680
+ }
681
+ if(this.createPlan.isShare==""){
682
+ if(JSON.stringify(this.createPlan.checker)=='{}'){
683
+ Vue.showMessage("请选择安检人员!")
684
+ return false
685
+ }
686
+ }else{
687
+ this.createPlan.f_checker=''
688
+ }
689
+ if(!this.createPlan.f_safecheck_type){
690
+ Vue.showMessage("请选择安检类型!")
691
+ return false
692
+ }
693
+ return true
694
+ },
695
+ //查询安检员selectChanged
696
+ async searchChecker(id){
697
+ let res=await new HttpResetClass().load('POST', '/rs/search', {
698
+ source: `root.getResourceById($${this.userlogin.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)`,
699
+ userid: id
700
+ }, {resolveMsg: null, rejectMsg: null})
701
+ this.checker=[]
702
+ res.data.forEach((resRow) => {
703
+ this.checker.push({label:resRow.name,value:resRow})
704
+ })
705
+ },
706
+ //设置属性值
707
+ setProperty(modulename, property, value) {
708
+ console.log(modulename+"新添--"+property+"--"+value)
709
+ if(value=='全部'){
710
+ this[modulename].search.setField(property, '')
711
+ }else{
712
+ this[modulename].search.setField(property, value)
713
+ }
714
+ },
715
+ //按条件查询所有安检计划
716
+ async loadCheckPlan() {
717
+ this.isSend=true
718
+ this.checkplan.check.checkes=[]
719
+ let fieldValue=''
720
+ switch(this.currentorder){
721
+ case "按时间降序":
722
+ fieldValue='f_create_time desc'
723
+ break
724
+ case "按时间升序":
725
+ fieldValue='f_create_time'
726
+ break
727
+ }
728
+ console.log("--------fieldValue"+fieldValue)
729
+ this.cancel()
730
+ await this.checkplan.searchList("/rs/sql/预约计划下发",
731
+ {"f_plan_name": "f_plan_name like '%{}%'",
732
+ "f_plan_year":"f_plan_year={}",
733
+ "f_plan_month":"f_plan_month={}",
734
+ "checkerid":"f_checker_id='{}'",
735
+ "isAndNot":"f_checker {}",
736
+ "safechecktype":"f_safecheck_type='{}'",
737
+ "issude":"f_issued = '{}'",
738
+ "f_create_operator": "f_create_operator like '%{}%'"
739
+ },
740
+ {orderitem:fieldValue,
741
+ f_filialeids:"('"+this.userlogin.orgid+"')",
742
+ groupitem:""
743
+ }
744
+ )
745
+
746
+ this.isSend=false
747
+ },
748
+ //加载更多数据
749
+ async loadMore(modelname) {
750
+ this.isSend=true
751
+ await this[modelname].list.loadMore()
752
+ this.isSend=false
753
+ },
754
+ showUpPlans(row){
755
+ this.upCheckPlan.id=row.id
756
+ this.upCheckPlan.f_safecheck_type=row.f_safecheck_type
757
+ this.upCheckPlan.f_plan_name=row.f_plan_name
758
+ this.upCheckPlan.f_plan_year=row.f_plan_year
759
+ this.upCheckPlan.f_plan_month=row.f_plan_month
760
+ this.upCheckPlan.f_end_time=row.f_end_time
761
+ this.upCheckPlan.f_start_time=row.f_start_time
762
+ this.upCheckPlan.f_checker_id=row.f_checker_id?row.f_checker_id:null
763
+ this.upCheckPlan.f_checker=row.f_checker?row.f_checker:null
764
+ this.upCheckPlan.isShare=row.f_checker_id?'否':'是'
765
+ this.upCheckPlan.f_issued=row.f_issued
766
+ this.upCheckPlan.checker={id:row.f_checker_id,name:row.f_checker}
767
+ this.showUpPlan=true
768
+ },
769
+ async upPlan(){
770
+ if(this.upCheckPlan.f_issued=='已下发'){
771
+ this.$showMessage("该计划已下发,无法进行修改!")
772
+ return
773
+ }
774
+ if(!this.upCheckPlan.f_plan_name){
775
+ Vue.showMessage("请输入安检计划名称!")
776
+ return false
777
+ }
778
+ if(!this.upCheckPlan.f_plan_year){
779
+ Vue.showMessage("请选择安检年份!")
780
+ return false
781
+ }
782
+ if(!this.upCheckPlan.f_plan_month){
783
+ Vue.showMessage("请选择安检月份!")
784
+ return false
785
+ }
786
+ if(!this.upCheckPlan.f_end_time){
787
+ Vue.showMessage("请选择安检结束时间!")
788
+ return false
789
+ }
790
+ if(!this.upCheckPlan.f_start_time){
791
+ Vue.showMessage("请选择安检起始时间!")
792
+ return false
793
+ }
794
+ console.log(this.upCheckPlan)
795
+
796
+ if(this.upCheckPlan.isShare=="是"){
797
+ this.upCheckPlan.f_checker_id=null
798
+ this.upCheckPlan.f_checker=null
799
+ }else{
800
+ this.upCheckPlan.f_checker_id=this.upCheckPlan.checker.id
801
+ this.upCheckPlan.f_checker=this.upCheckPlan.checker.name
802
+ }
803
+ this.isSend=true
804
+ let res=await new HttpResetClass().load("POST", "/rs/logic/updateCheckPlan", {
805
+ data:{
806
+ f_end_time:this.upCheckPlan.f_end_time,
807
+ f_start_time:this.upCheckPlan.f_start_time,
808
+ f_checker:this.upCheckPlan.f_checker,
809
+ f_safecheck_type:this.upCheckPlan.f_safecheck_type,
810
+ f_checker_id:this.upCheckPlan.f_checker_id,
811
+ f_plan_name:this.upCheckPlan.f_plan_name,
812
+ f_plan_year:this.upCheckPlan.f_plan_year,
813
+ f_plan_month:this.upCheckPlan.f_plan_month,
814
+ f_plan_id:this.upCheckPlan.id
815
+ }
816
+ }, {resolveMsg: null, rejectMsg: null})
817
+ if(res.data.code==200){
818
+ this.$showMessage("修改成功!")
819
+ this.cancel()
820
+ await this.loadCheckPlan()
821
+ }else{
822
+ this.$showMessage("修改失败!")
823
+ }
824
+ this.isSend=false
825
+ },
826
+ //下发安检计划
827
+ async sendCheckPlan(f){
828
+ if(this.checkplan.check.checkes.length<1){
829
+ this.$showMessage("请选择要下发的安检计划")
830
+ return
831
+ }
832
+ this.isSend=true
833
+ let res=await new HttpResetClass().load("POST", "/rs/logic/NewBespeakCheckPlan", {
834
+ data:{
835
+ f_issued:'是',
836
+ f_issue_time:Util.toStandardTimeString(),
837
+ f_send_operator:this.userlogin.name,
838
+ param:this.checkplan.check.checkes,
839
+ }
840
+ }, {resolveMsg: null, rejectMsg: null})
841
+ if(res.data.code==200){
842
+ //Vue.showMessage("下发成功!其中有"+res.data.repet+"个计划己经是下发状态")
843
+ this.$showMessage("下发成功!")
844
+ }else{
845
+ this.$showMessage("下发失败!")
846
+ }
847
+ await this.loadCheckPlan()
848
+ this.isSend=false
849
+ },
850
+ //删除安检计划
851
+ async delCheckPlan(f){
852
+ if(this.checkplan.check.checkes.length<1){
853
+ this.$showMessage("请选择要删除的安检计划")
854
+ return
855
+ }
856
+ this.isSend=true
857
+ let res=await new HttpResetClass().load("POST", "/rs/logic/deleteCheckPlan", {
858
+ data:{
859
+ f_operator:this.userlogin.orgstr,//global.login.name,
860
+ condition:"",
861
+ switchCheckAll:true,
862
+ checkAll:false,
863
+ param:this.checkplan.check.checkes,
864
+ columnName: "f_plan_id"
865
+ }
866
+ }, {resolveMsg: null, rejectMsg: null})
867
+ console.log(JSON.stringify(res))
868
+ if(res.data.code==200){
869
+ this.$showMessage("删除成功!")
870
+ }else{
871
+ this.$showMessage("删除失败!")
872
+ }
873
+ if(this.checkplan.check.checkes.indexOf(this.selectPlan.id)!= -1){
874
+ this.selectPlan={id:''}
875
+ console.log("包含了清空selectplan")
876
+ }
877
+ await this.loadCheckPlan()
878
+ this.isSend=false
879
+ },
880
+ async refresh(){
881
+ this.$refs.item.$refs.paged.$refs.criteria.search()
882
+ this.$refs.user.$refs.paged.$refs.criteria.search()
883
+ await this.loadCheckPlan()
884
+ },
885
+ async refreshPlan(){
886
+ this.$refs.item.$refs.paged.$refs.criteria.search()
887
+ await this.loadCheckPlan()
888
+ }
889
+ }
890
+ }
891
+ </script>
892
+
893
+ <style scoped>
894
+ .safe-planfont{
895
+ font-family: MicrosoftYaHei;
896
+ font-size: 15px;
897
+ font-weight: normal;
898
+ font-stretch: normal;
899
+ letter-spacing: 2px;
900
+ color: #333333;
901
+ line-height: 25px;
902
+ }
903
+ .safe-bodyfont{
904
+ font-family: MicrosoftYaHei;
905
+ font-size: 14px;
906
+ font-weight: normal;
907
+ font-stretch: normal;
908
+ letter-spacing: 0px;
909
+ color: #999999;
910
+ line-height: 30px;
911
+ }
912
+ .safe-leftplan{
913
+ height:auto;
914
+ border-bottom:1px solid #ececec;
915
+ padding: 10px 5px
916
+ }
917
+ .leftplan-center{
918
+ border-top:1px solid #ececec;
919
+ border-bottom:1px solid #ececec;
920
+ }
921
+ .safe_p{
922
+ white-space: nowrap;
923
+ overflow: hidden;
924
+ text-overflow: ellipsis;
925
+ }
926
+ .safe-div-p{
927
+ color: #4792de;
928
+ text-align: end;
929
+ padding: 8px 15px;
930
+ }
931
+ .safe_list_li:hover{
932
+ background-color: rgb(245,246,247);
933
+ }
934
+ .safe-selectplan{
935
+ pointer-events: none;
936
+ background-color: rgb(216,234,251);
937
+ }
938
+ .safe_plan_list{
939
+ height: 80%;
940
+ overflow: scroll;
941
+ }
942
+
943
+ </style>
944
+ <style>
945
+ .safe_plan_list::-webkit-scrollbar{
946
+ background-color: #F5F5F5;
947
+ }
948
+
949
+ /*定义滚动条轨道 内阴影+圆角*/
950
+ .safe_plan_list::-webkit-scrollbar-track{
951
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
952
+ border-radius: 10px;
953
+ background-color: #F5F5F5;
954
+ }
955
+
956
+ /*定义滑块 内阴影+圆角*/
957
+ .safe_plan_list::-webkit-scrollbar-thumb{
958
+ border-radius: 10px;
959
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
960
+ background-color: #F5F5F5;
961
+ }
962
+ </style>