safecheck-client 3.0.34-33 → 3.0.34-34

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