safecheck-client 3.0.35-47 → 3.0.35-48

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