safecheck-client 3.0.34-22 → 3.0.34-24

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