safecheck-client 3.0.33-28 → 3.0.33-29

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