safecheck-client 3.0.33-gongyi → 3.0.35-gongyi-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,539 +1,590 @@
1
- <template>
2
- <div class="flex">
3
- <work-busy :is-busy="isSend"></work-busy>
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
- <div :class="$parent.$parent.style2" style="margin: 0px">
9
- <role-selector-safe
10
- role-name="安检员"
11
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
12
- @re-res="$parent.$parent.getRes"
13
- :value.sync="model.f_checker_id"
14
- v-model="model.f_checker_id"
15
- condition=" f_checker_name = '{}'">
16
- </role-selector-safe>
17
- </div>
18
- <div :class="$parent.$parent.style">
19
- <label class="font_normal_body">安检科室</label>
20
- <right-tree islist :userid="$parent.$parent.userid" :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="'选择科室'" :selectData="''" v-ref:f_reciever>
21
- </right-tree>
22
- </div>
23
-
24
- <div :class="$parent.$parent.style" >
25
- <label class="font_normal_body">开始时间</label>
26
- <datepicker
27
- class="select_list select"
28
- :value.sync="model.f_check_start"
29
- placeholder='开始时间' style="width: 60%"
30
- :disabled-days-of-week="[]"
31
- :format="'yyyy-MM-dd'"
32
- :show-rest-button="reset"
33
- v-model="model.f_check_start"
34
- condition="f_run_date > ='{} 00:00:00'">
35
- </datepicker>
36
- </div>
37
- <div :class="$parent.$parent.style" >
38
- <label class="font_normal_body">结束时间</label>
39
- <datepicker
40
- :value.sync="model.f_check_end"
41
- placeholder='结束时间' style="width: 60%"
42
- :disabled-days-of-week="[]"
43
- :format="'yyyy-MM-dd'"
44
- :show-rest-button="reset"
45
- v-model="model.f_check_end"
46
- condition="f_run_date <= '{} 23:59:59'">
47
- </datepicker>
48
- </div>
49
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
50
- <!-- <export-excel-safe :data="$parent.$parent.searchData"-->
51
- <!-- :field="$parent.$parent.excelHeaders"-->
52
- <!-- :choose-col="true"-->
53
- <!-- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"-->
54
- <!-- template-name='用户安检情况'></export-excel-safe>-->
55
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
56
- <div style="float: right" class="button_spacing"
57
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
58
- @click="$parent.$parent.$parent.showItem =! $parent.$parent.$parent.showItem"></div>
59
- <!-- <div style="float: right" class="button_spacing"-->
60
- <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
61
- <!-- @click="$parent.$parent.hidden()">-->
62
- <!-- </div>-->
63
- </div>
64
-
65
-
66
- </div>
67
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
68
- <div :class="$parent.$parent.style">
69
- <label class="font_normal_body">安检册名</label>
70
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name"
71
- placeholder="安检册名" condition="f_check_book_name like '%{}%'">
72
- </div>
73
- </div>
74
-
75
- <div class="row" v-show="$parent.$parent.$parent.showItem">
76
- <div :class="$parent.$parent.style2" style="margin: 0px">
77
- <role-selector-safe
78
- role-name="安检员"
79
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
80
- @re-res="$parent.$parent.getRes"
81
- :value.sync="model.f_checker_id"
82
- v-model="model.f_checker_id"
83
- condition=" f_checker_name = '{}'">
84
- </role-selector-safe>
85
- </div>
86
- <div :class="$parent.$parent.style">
87
- <label class="font_normal_body">安检册名</label>
88
- <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name" id="f_check_book_name"
89
- placeholder="安检册名" condition="f_check_book_name like '%{}%'">
90
- </div>
91
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
92
- <!-- <export-excel-safe :data="$parent.$parent.searchData"-->
93
- <!-- :field="$parent.$parent.excelHeaders"-->
94
- <!-- sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"-->
95
- <!-- template-name='用户安检情况'></export-excel-safe>-->
96
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
97
- <div style="float: right" class="button_spacing"
98
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
99
- @click="$parent.$parent.$parent.showItem =! $parent.$parent.$parent.showItem"></div>
100
- <!-- <div style="float: right" class="button_spacing"-->
101
- <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
102
- <!-- @click="$parent.$parent.hidden()">-->
103
- <!-- </div>-->
104
- </div>
105
-
106
- </div>
107
- <div class="row" v-show="$parent.$parent.$parent.showItem">
108
- <div :class="$parent.$parent.style">
109
- <label class="font_normal_body">安检科室</label>
110
- <right-tree islist :userid="$parent.$parent.userid" :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="选择科室" :selectData="''" v-ref:f_reciever>
111
- </right-tree>
112
- </div>
113
-
114
- <div :class="$parent.$parent.style" >
115
- <label class="font_normal_body">开始时间</label>
116
- <datepicker
117
- class="select_list select"
118
- :value.sync="model.f_check_start"
119
- placeholder='开始时间' style="width: 60%"
120
- :disabled-days-of-week="[]"
121
- :format="'yyyy-MM-dd'"
122
- :show-rest-button="reset"
123
- v-model="model.f_check_start"
124
- condition="f_run_date > ='{} 00:00:00'">
125
- </datepicker>
126
- </div>
127
- <div :class="$parent.$parent.style" >
128
- <label class="font_normal_body">结束时间</label>
129
- <datepicker
130
- :value.sync="model.f_check_end"
131
- placeholder='结束时间' style="width: 60%"
132
- :disabled-days-of-week="[]"
133
- :format="'yyyy-MM-dd'"
134
- :show-rest-button="reset"
135
- v-model="model.f_check_end"
136
- condition="f_run_date <= '{} 23:59:59'">
137
- </datepicker>
138
- </div>
139
- </div>
140
- </div>
141
- </criteria>
142
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
143
- <template partial='head'>
144
- <tr>
145
- <th>
146
- <nobr>安检册名称</nobr>
147
- </th>
148
- <th>
149
- <nobr>创建日期</nobr>
150
- </th>
151
- <th>
152
- <nobr>创建人</nobr>
153
- </th>
154
- <th>
155
- <nobr>所属安检员</nobr>
156
- </th>
157
- <th>
158
- <nobr>执行日期</nobr>
159
- </th>
160
- <th>
161
- <nobr>执行周期</nobr>
162
- </th>
163
- <th>
164
- <nobr>用户数量</nobr>
165
- </th>
166
- <th>
167
- <nobr>操作</nobr>
168
- </th>
169
- </tr>
170
- </template>
171
- <template partial='body'>
172
- <td style="text-align: center;">{{ row.f_check_book_name }}</td>
173
- <td style="text-align: center;">{{ row.f_create_date }}</td>
174
- <td style="text-align: center;">{{ row.f_create_person }}</td>
175
- <td style="text-align: center;">{{ row.f_checker_name }}</td>
176
- <td style="text-align: center;">{{ row.f_run_date }}</td>
177
- <td style="text-align: center;">{{ row.f_around_time }}{{ row.f_around_unit }}</td>
178
- <td style="text-align: center;">{{ row.num }}</td>
179
- <td style="text-align: center;">
180
- <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.deleteCheckBook(row)' v-if="$parent.$parent.$parent.permission === 'c1'">删除</button>
181
- <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.updateCheckBook(row)'>修改</button>
182
- <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.topPlanItem(row)' v-if="$parent.$parent.$parent.permission === 'c2'">下发</button>
183
- </td>
184
-
185
- </template>
186
- </data-grid>
187
- </criteria-paged>
188
- <modal :show.sync="showModal" :backdrop="false">
189
- <div slot="modal-header" class="modal-header">
190
- <h4 class="modal-title">
191
- 修改安检册
192
- </h4>
193
- </div>
194
- <div slot="modal-body" class="modal-body">
195
- <div v-if="true">
196
- <div class="row" style="margin-top: 10px">
197
- <!-- <label class="control-label font text-left" style="float:left;margin-left:10%;margin-top:5px">安检册名称</label>-->
198
- <!-- <div class="col-xs-8 col-md-8">-->
199
- <!-- <input type="text" class="input_search" style="width: 70%;" v-model="checkBook.f_check_book_name"/>-->
200
- <!-- </div>-->
201
- <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c1' && showModal ">
202
- <label class="font_normal_body">安检科室</label>
203
- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择科室" :selectData="" v-ref:f_reciever>
204
- </right-tree>
205
- </div>
206
- <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c2' ">
207
- <label class="font_normal_body">安&ensp;检&ensp;员</label>
208
- <v-select :value.sync="checkBook.f_checker_name" v-model='checkBook.f_checker_name'
209
- :value-single="true" style="width: 60%"
210
- class="select_list select"
211
- :options='checkers' placeholder='安检员'
212
- close-on-select></v-select>
213
- </div>
214
- <div class="form-group col-sm-6" style="margin-top: 20px">
215
- <label class="font_normal_body">安检册名</label>
216
- <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
217
- style="width: 60%" >
218
- </div>
219
- <div class="form-group col-sm-6" style="margin-top: 20px">
220
- <label class="font_normal_body">执行日期</label>
221
- <datepicker
222
- :value.sync="checkBook.f_run_date"
223
- style="width: 60%"
224
- :format="'yyyy-MM-dd'"
225
- v-model="checkBook.f_run_date"
226
- >
227
- </datepicker>
228
- </div>
229
- <div class="form-group col-sm-6" style="margin-top: 20px">
230
- <label class="font_normal_body">执行周期</label>
231
- <input type="number" class="input_search" v-model="checkBook.f_around_time"
232
- style="width: 60%" >
233
- </div>
234
- <div class="form-group col-sm-6" style="margin-top: 20px">
235
- <label class="font_normal_body">周期单位</label>
236
- <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
237
- :value-single="true" style="width: 60%"
238
- class="select_list select"
239
- :options='aroundUnit' placeholder=''
240
- close-on-select></v-select>
241
- </div>
242
- </div>
243
- </div>
244
- </div>
245
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
246
- <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
247
- <button class="button_search" @click="cancel">取消</button>
248
- </div>
249
- </modal>
250
- </div>
251
- </template>
252
-
253
- <script>
254
- import {PagedList} from 'vue-client'
255
- import {HttpResetClass} from 'vue-client'
256
- import co from 'co'
257
- import * as Util from './../Util'
258
- import Vue from 'vue'
259
- import {toEndDateString, toStartDateString} from "./../Util";
260
- export default {
261
- title: '用户安检情况',
262
- data () {
263
- return {
264
- searchData: {
265
- condition: '1=1'
266
- },
267
- isSend:false,
268
- aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
269
- showModal:false,
270
- excelHeaders: {
271
-
272
- 'f_userinfo_code': '用户编号',
273
- 'f_user_name': '用户名称',
274
- 'f_user_phone': '用户电话',
275
- 'f_meternumber': '用户表号',
276
- 'f_user_type': '用户类型',
277
- 'f_last_checker': '安检员',
278
- 'f_residential_area': '小区名称',
279
- 'f_address': '地址',
280
- 'f_last_check_date': '安检日期',
281
- 'f_last_check_state': '安检状态',
282
- 'f_last_check_result': '安检结果'
283
- },
284
- checkers:[],
285
- f_depid:'',
286
- source:
287
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
288
- 'tool.getFullTree(dep.where(row.hasSpecialRole($安检册二次分配$)))',
289
- userid: this.$login.f.id,
290
- model: new PagedList('rs/sql/QueryCheckBook', 20),
291
- checkBook :{
292
- f_check_book_name: '',
293
- f_run_date: '',
294
- f_around_time: '',
295
- f_around_unit: '',
296
- f_create_date: '',
297
- f_create_person: '',
298
- f_orgid: '',
299
- f_depid:'',
300
- f_dep:'',
301
- f_checker_name: '',
302
- f_checker_id:''
303
- }
304
- }
305
- },
306
- props: {
307
- style: {
308
- type: String,
309
- default: 'col-sm-2 form-group'
310
- },
311
- style2: {
312
- type: String,
313
- default: 'col-sm-4 form-group'
314
- },
315
- permission:{
316
- type: String
317
- }
318
- },
319
- ready () {
320
- // 获取分公司信息
321
- this.$refs.paged.$refs.criteria.model.f_check_start = toStartDateString()
322
- this.$refs.paged.$refs.criteria.model.f_check_end = toEndDateString()
323
- console.log('permission3',this.permission)
324
- this.getChecker()
325
- },
326
- methods: {
327
- reres(val) {
328
- if (!val.resids || val.resids.length === 0 || val.resids[0] ==='undefined'){
329
- return
330
- }
331
- console.log('val2',val)
332
- const resids = val.orgobj.filter(res=>res.resourcetype==='department')
333
- console.log('val2',resids)
334
- if (resids.length>0){
335
- this.checkBook.f_depid = resids[0].id
336
- this.checkBook.f_dep = resids[0].name
337
- }
338
- },
339
- reres2(val){
340
- if (!val.resids || val.resids.length === 0 || val.resids[0] ==='undefined'){
341
- return
342
- }
343
- console.log('val2',val)
344
- const resids = val.orgobj.filter(res=>res.resourcetype==='department')
345
- if (resids.length>0){
346
- this.f_depid = resids[0].id
347
- }
348
- },
349
- topPlanItem(val){
350
- this.isSend = true
351
- console.log('val', val)
352
-
353
- let checkBook = Object.assign({},val)
354
- let nextDate = new Date(checkBook.f_run_date)
355
-
356
- let plan = {
357
- id:this.uuid(),
358
- f_plan_year:nextDate.getFullYear(),
359
- f_plan_month:nextDate.getMonth()+1,
360
- f_plan_name : `${nextDate.getFullYear()}年${nextDate.getMonth()+1}月${checkBook.f_check_book_name}`,
361
- f_plan_type : '预约计划',
362
- f_issued : '是',
363
- f_filialeid : this.$login.f.orgid,
364
- f_create_person : this.$login.f.name,
365
- f_create_time : Util.toStandardDateString(),
366
- f_safecheck_type : '年度普检',
367
- f_checker : checkBook.f_checker_name,
368
- f_checker_id:checkBook.f_checker_id
369
- }
370
-
371
- if (checkBook.f_around_unit === '年'){
372
- nextDate.setFullYear(nextDate.getFullYear()+parseInt(checkBook.f_around_time))
373
- }else if (checkBook.f_around_unit === '月'){
374
- nextDate.setMonth(nextDate.getMonth()+parseInt(checkBook.f_around_time))
375
- }else if (checkBook.f_around_time === ''){
376
- nextDate.setDate(nextDate.getDate()+parseInt(checkBook.f_around_time))
377
- }
378
- let month = nextDate.getMonth()+1
379
- let date = nextDate.getDate()
380
- checkBook.f_run_date = nextDate.getFullYear() + '-' + (month<10? '0'+ month : month) + '-' + (date<10? '0'+ date : date)
381
-
382
-
383
- let data ={
384
- checkBook,
385
- plan
386
- }
387
- let http = new HttpResetClass()
388
- http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_plan',entityData:plan}},
389
- {resolveMsg: null, rejectMsg: '创建计划失败'}).then(res=>{
390
- if (res.data.code===200){
391
- if (typeof res.data.id ==='string'){
392
- const id = JSON.parse(res.data.id).id
393
- const item = {
394
- f_plan_id:id,
395
- f_filialeid:this.$login.f.orgid,
396
- f_check_book_id:checkBook.id
397
- }
398
- return http.load('POST', 'rs/logic/AddCheckPlanItemajc', {data:item}).then(res1=>{
399
- console.log('6666666661',res1)
400
- if (res1.data.code===200){
401
- return http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:checkBook}}).then(res2=>{
402
- console.log('6666666662',res2)
403
- if (res2.data.code===200){
404
- this.$showMessage('下发成功')
405
- this.$refs.paged.$refs.criteria.search()
406
- this.isSend = false
407
- }
408
- })
409
- }
410
- this.$showMessage('添加计划失败')
411
- this.isSend = false
412
- })
413
- }
414
- }
415
- this.isSend = false
416
- this.$showMessage('创建计划失败')
417
- })
418
- console.log(data)
419
- },
420
- getChecker(){
421
- let http = new HttpResetClass()
422
- http.load('POST', '/rs/search', {data: {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))', userid: this.$login.f.id}}, {resolveMsg: null, rejectMsg: null})
423
- .then(res => {
424
- console.log('res666-->' + JSON.stringify(res))
425
- this.checkers = res.data.map(res=>{
426
- return {label:res.name,value:res.name,id:res.id}
427
- })
428
- })
429
- },
430
- uuid() {
431
- try {
432
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
433
- var r = Math.random() * 16 | 0,
434
- v = c == 'x' ? r : (r & 0x3 | 0x8);
435
- return v.toString(16);
436
- })
437
- } catch (e) {
438
- //TODO handle the exception
439
- console.log(e)
440
- }
441
- },
442
- ok (){
443
- console.log('this.checkBook', this.checkBook)
444
- if (this.checkBook.f_checker_name){
445
- const checkers = this.checkers.filter(res=>res.value===this.checkBook.f_checker_name)
446
- if (checkers.length>0){
447
- console.log('8888888888888',checkers)
448
- this.checkBook.f_checker_id=checkers[0].id
449
- }
450
- }
451
- let http = new HttpResetClass()
452
- http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:this.checkBook}},
453
- {resolveMsg: '更新安检册信息成功', rejectMsg: '保存安检册信息成功'}).then(res=>{
454
- if (res.data.code===200){
455
- this.$showMessage('修改成功')
456
- this.showModal = false
457
- this.clearBook()
458
- }
459
- })
460
- },
461
- clearBook(){
462
- this.checkBook= {
463
- f_check_book_name: '',
464
- f_run_date: '',
465
- f_around_time: '',
466
- f_around_unit: '',
467
- f_create_date: '',
468
- f_create_person: '',
469
- f_orgid: '',
470
- f_depid:'',
471
- f_checker_name: '',
472
- f_checker_id:''
473
- }
474
- },
475
- cancel () {
476
- this.showModal = false
477
- this.clearBook()
478
-
479
- },
480
- updateCheckBook(val){
481
- this.checkBook=val
482
- this.showModal = true
483
- },
484
- search (args) {
485
- // console.log('8888888888888', this.model.f_filialeids)
486
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
487
- if (this.permission === 'c2'){
488
- args.condition +=` and tcb.f_depid = '${this.$login.f.depids}'`
489
- }
490
- if (this.f_depid && this.permission === 'c1'){
491
- args.condition +=` and tcb.f_depid = '${this.f_depid}'`
492
-
493
- }
494
- return this.model.search(args.condition, args.model)
495
- },
496
- getRes (obj) {
497
- this.model.f_filialeids = this.$login.convertToIn(obj.resids)
498
- },
499
- async deleteCheckBook (val) {
500
- this.$showMessage('是否确认删除安检册,此操作无法撤销!', ['confirm', 'cancel']).then(async (res) => {
501
- if(res == 'confirm'){
502
- try {
503
- console.log('val', val.id)
504
- let http = new HttpResetClass()
505
- let upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${val.id}'`
506
- let delCheckBook= `delete from t_check_book where id ='${val.id}'`
507
- await http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
508
- {resolveMsg: null, rejectMsg: '删除安检册失败'})
509
- await http.load('POST', 'rs/logic/runSQL', {data: {sql: delCheckBook}},
510
- {resolveMsg: null, rejectMsg: '删除安检册失败'})
511
- this.$showMessage('删除成功')
512
- this.$refs.paged.$refs.criteria.search()
513
- }catch (e) {
514
- this.$showMessage('删除失败',e)
515
- }
516
- }
517
- })
518
- }
519
- },
520
-
521
- watch: {
522
- },
523
- computed: {
524
- selected () {
525
- return this.$refs.paged.$refs.grid.selected
526
- }
527
- }
528
- }
529
- </script>
530
- <style scoped>
531
- .newcolor {
532
- color: red;
533
- }
534
-
535
- .table th {
536
- background-color: #f2f6fa;
537
- color: black;
538
- }
539
- </style>
1
+ <template>
2
+ <div class="flex">
3
+ <work-busy :is-busy="isSend"></work-busy>
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
+ <div :class="$parent.$parent.style2" style="margin: 0px">
9
+ <role-selector-safe
10
+ role-name="安检员"
11
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
12
+ @re-res="$parent.$parent.getRes"
13
+ :value.sync="model.f_checker_id"
14
+ v-model="model.f_checker_id"
15
+ condition=" f_checker_name = '{}'">
16
+ </role-selector-safe>
17
+ </div>
18
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.permission === 'c1'">
19
+ <label class="font_normal_body">安检科室</label>
20
+ <right-tree-safe islist :userid="$parent.$parent.userid" :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="'选择科室'" :selectData="''" v-ref:f_reciever>
21
+ </right-tree-safe>
22
+ </div>
23
+
24
+ <div :class="$parent.$parent.style" >
25
+ <label class="font_normal_body">开始时间</label>
26
+ <datepicker
27
+ class="select_list select"
28
+ :value.sync="model.f_check_start"
29
+ placeholder='开始时间' style="width: 60%"
30
+ :disabled-days-of-week="[]"
31
+ :format="'yyyy-MM-dd'"
32
+ :show-rest-button="reset"
33
+ v-model="model.f_check_start"
34
+ condition="f_run_date > ='{} 00:00:00'">
35
+ </datepicker>
36
+ </div>
37
+ <div :class="$parent.$parent.style" >
38
+ <label class="font_normal_body">结束时间</label>
39
+ <datepicker
40
+ :value.sync="model.f_check_end"
41
+ placeholder='结束时间' style="width: 60%"
42
+ :disabled-days-of-week="[]"
43
+ :format="'yyyy-MM-dd'"
44
+ :show-rest-button="reset"
45
+ v-model="model.f_check_end"
46
+ condition="f_run_date <= '{} 23:59:59'">
47
+ </datepicker>
48
+ </div>
49
+
50
+ <div :class="$parent.$parent.style" >
51
+ <label class="font_normal_body">执行时间</label>
52
+ <datepicker
53
+ :value.sync="model.f_check_process"
54
+ placeholder='执行时间' style="width: 60%"
55
+ :disabled-days-of-week="[]"
56
+ :format="'yyyy-MM-dd'"
57
+ :show-rest-button="reset"
58
+ v-model="model.f_check_process"
59
+ condition="f_run_date <= '{}'">
60
+ </datepicker>
61
+ </div>
62
+
63
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
64
+ <export-excel-safe :data="$parent.$parent.exportParameter"
65
+ :field="$parent.$parent.excelHeaders"
66
+ sqlurl="rs/logic/SafeExportExcel" sql-name="QueryCheckBook"
67
+ template-name='安检册详情列表'>
68
+ </export-excel-safe>
69
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
70
+ <div style="float: right" class="button_spacing"
71
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
72
+ @click="$parent.$parent.$parent.showItem =! $parent.$parent.$parent.showItem"></div>
73
+ <!-- <div style="float: right" class="button_spacing"-->
74
+ <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
75
+ <!-- @click="$parent.$parent.hidden()">-->
76
+ <!-- </div>-->
77
+ </div>
78
+
79
+
80
+ </div>
81
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
82
+ <div :class="$parent.$parent.style">
83
+ <label class="font_normal_body">安检册名</label>
84
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name"
85
+ placeholder="安检册名" condition="f_check_book_name like '%{}%'">
86
+ </div>
87
+ </div>
88
+
89
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
90
+ <div :class="$parent.$parent.style2" style="margin: 0px">
91
+ <role-selector-safe
92
+ role-name="安检员"
93
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
94
+ @re-res="$parent.$parent.getRes"
95
+ :value.sync="model.f_checker_id"
96
+ v-model="model.f_checker_id"
97
+ condition=" f_checker_name = '{}'">
98
+ </role-selector-safe>
99
+ </div>
100
+ <div :class="$parent.$parent.style">
101
+ <label class="font_normal_body">安检册名</label>
102
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_check_book_name" id="f_check_book_name"
103
+ placeholder="安检册名" condition="f_check_book_name like '%{}%'">
104
+ </div>
105
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
106
+ <export-excel-safe :data="$parent.$parent.exportParameter"
107
+ :field="$parent.$parent.excelHeaders"
108
+ sqlurl="rs/logic/SafeExportExcel" sql-name="QueryCheckBook"
109
+ template-name='安检册详情列表'>
110
+ </export-excel-safe>
111
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
112
+ <div style="float: right" class="button_spacing"
113
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
114
+ @click="$parent.$parent.$parent.showItem =! $parent.$parent.$parent.showItem"></div>
115
+ <!-- <div style="float: right" class="button_spacing"-->
116
+ <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
117
+ <!-- @click="$parent.$parent.hidden()">-->
118
+ <!-- </div>-->
119
+ </div>
120
+
121
+ </div>
122
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
123
+ <div :class="$parent.$parent.style" v-if="$parent.$parent.permission === 'c1'">
124
+ <label class="font_normal_body">安检科室</label>
125
+ <right-tree-safe islist :userid="$parent.$parent.userid" :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="选择科室" :selectData="''" v-ref:f_reciever>
126
+ </right-tree-safe>
127
+ </div>
128
+
129
+ <div :class="$parent.$parent.style" >
130
+ <label class="font_normal_body">开始时间</label>
131
+ <datepicker
132
+ class="select_list select"
133
+ :value.sync="model.f_check_start"
134
+ placeholder='开始时间' style="width: 60%"
135
+ :disabled-days-of-week="[]"
136
+ :format="'yyyy-MM-dd'"
137
+ :show-rest-button="reset"
138
+ v-model="model.f_check_start"
139
+ condition="f_run_date > ='{} 00:00:00'">
140
+ </datepicker>
141
+ </div>
142
+ <div :class="$parent.$parent.style" >
143
+ <label class="font_normal_body">结束时间</label>
144
+ <datepicker
145
+ :value.sync="model.f_check_end"
146
+ placeholder='结束时间' style="width: 60%"
147
+ :disabled-days-of-week="[]"
148
+ :format="'yyyy-MM-dd'"
149
+ :show-rest-button="reset"
150
+ v-model="model.f_check_end"
151
+ condition="f_run_date <= '{} 23:59:59'">
152
+ </datepicker>
153
+ </div>
154
+
155
+ <!-- <div :class="$parent.$parent.style" >-->
156
+ <!-- <label class="font_normal_body">执行时间</label>-->
157
+ <!-- <datepicker-->
158
+ <!-- :value.sync="model.f_check_end"-->
159
+ <!-- placeholder='执行时间' style="width: 60%"-->
160
+ <!-- :disabled-days-of-week="[]"-->
161
+ <!-- :format="'yyyy-MM-dd'"-->
162
+ <!-- :show-rest-button="reset"-->
163
+ <!-- v-model="model.f_check_end"-->
164
+ <!-- condition="f_run_date <= '{} 23:59:59'">-->
165
+ <!-- </datepicker>-->
166
+ <!-- </div>-->
167
+ </div>
168
+ </div>
169
+ </criteria>
170
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
171
+ <template partial='head'>
172
+ <tr>
173
+ <th>
174
+ <nobr>安检册名称</nobr>
175
+ </th>
176
+ <th>
177
+ <nobr>创建日期</nobr>
178
+ </th>
179
+ <th>
180
+ <nobr>创建人</nobr>
181
+ </th>
182
+ <th>
183
+ <nobr>所属科室</nobr>
184
+ </th>
185
+ <th>
186
+ <nobr>所属安检员</nobr>
187
+ </th>
188
+ <th>
189
+ <nobr>执行日期</nobr>
190
+ </th>
191
+ <th>
192
+ <nobr>执行周期</nobr>
193
+ </th>
194
+ <th>
195
+ <nobr>用户数量</nobr>
196
+ </th>
197
+ <th>
198
+ <nobr>下发时间</nobr>
199
+ </th>
200
+ <th>
201
+ <nobr>操作</nobr>
202
+ </th>
203
+ </tr>
204
+ </template>
205
+ <template partial='body'>
206
+ <td style="text-align: center;">{{ row.f_check_book_name }}</td>
207
+ <td style="text-align: center;">{{ row.f_create_date }}</td>
208
+ <td style="text-align: center;">{{ row.f_create_person }}</td>
209
+ <td style="text-align: center;">{{ row.f_dep }}</td>
210
+ <td style="text-align: center;">{{ row.f_checker_name }}</td>
211
+ <td style="text-align: center;">{{ row.f_run_date }}</td>
212
+ <td style="text-align: center;">{{ row.f_around_time }}{{ row.f_around_unit }}</td>
213
+ <td style="text-align: center;">{{ row.num }}</td>
214
+ <td style="text-align: center;">{{ row.f_issue_time }}</td>
215
+ <td style="text-align: center;">
216
+ <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.deleteCheckBook(row)' v-if="$parent.$parent.$parent.permission === 'c1'">删除</button>
217
+ <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.updateCheckBook(row)'>修改</button>
218
+ <button class="button_spacing button_search-1" @click.stop='$parent.$parent.$parent.topPlanItem(row)' v-if="$parent.$parent.$parent.permission === 'c2'">下发</button>
219
+ </td>
220
+
221
+ </template>
222
+ </data-grid>
223
+ </criteria-paged>
224
+ <modal :show.sync="showModal" :backdrop="false">
225
+ <div slot="modal-header" class="modal-header">
226
+ <h4 class="modal-title">
227
+ 修改安检册
228
+ </h4>
229
+ </div>
230
+ <div slot="modal-body" class="modal-body">
231
+ <div v-if="true">
232
+ <div class="row" style="margin-top: 10px">
233
+ <!-- <label class="control-label font text-left" style="float:left;margin-left:10%;margin-top:5px">安检册名称</label>-->
234
+ <!-- <div class="col-xs-8 col-md-8">-->
235
+ <!-- <input type="text" class="input_search" style="width: 70%;" v-model="checkBook.f_check_book_name"/>-->
236
+ <!-- </div>-->
237
+ <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c1' && showModal ">
238
+ <label class="font_normal_body">安检科室</label>
239
+ <right-tree-safe islist :userid="userid" :source="source" v-on:re-res="reres" :textContent="'选择科室'" :select-data="{id:checkBook.f_depid}" v-ref:f_reciever>
240
+ </right-tree-safe>
241
+ </div>
242
+ <div class="col-sm-6 form-group" style="margin-top: 20px" v-if="permission === 'c2' ">
243
+ <label class="font_normal_body">安&ensp;检&ensp;员</label>
244
+ <v-select :value.sync="checkBook.f_checker_name" v-model='checkBook.f_checker_name'
245
+ :value-single="true" style="width: 60%"
246
+ class="select_list select"
247
+ :options='checkers' placeholder='安检员'
248
+ close-on-select></v-select>
249
+ </div>
250
+ <div class="form-group col-sm-6" style="margin-top: 20px">
251
+ <label class="font_normal_body">安检册名</label>
252
+ <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
253
+ style="width: 60%" >
254
+ </div>
255
+ <div class="form-group col-sm-6" style="margin-top: 20px">
256
+ <label class="font_normal_body">执行日期</label>
257
+ <datepicker
258
+ :value.sync="checkBook.f_run_date"
259
+ style="width: 60%"
260
+ :format="'yyyy-MM-dd'"
261
+ v-model="checkBook.f_run_date"
262
+ >
263
+ </datepicker>
264
+ </div>
265
+ <div class="form-group col-sm-6" style="margin-top: 20px">
266
+ <label class="font_normal_body">执行周期</label>
267
+ <input type="number" class="input_search" v-model="checkBook.f_around_time"
268
+ style="width: 60%" >
269
+ </div>
270
+ <div class="form-group col-sm-6" style="margin-top: 20px">
271
+ <label class="font_normal_body">周期单位</label>
272
+ <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
273
+ :value-single="true" style="width: 60%"
274
+ class="select_list select"
275
+ :options='aroundUnit' placeholder=''
276
+ close-on-select></v-select>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ </div>
281
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
282
+ <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
283
+ <button class="button_search" @click="cancel">取消</button>
284
+ </div>
285
+ </modal>
286
+ </div>
287
+ </template>
288
+
289
+ <script>
290
+ import {PagedList} from 'vue-client'
291
+ import {HttpResetClass} from 'vue-client'
292
+ import co from 'co'
293
+ import * as Util from './../Util'
294
+ import Vue from 'vue'
295
+ import {toEndDateString, toStartDateString} from "./../Util";
296
+ export default {
297
+ title: '用户安检情况',
298
+ data () {
299
+ return {
300
+ searchData: {
301
+ condition: '1=1'
302
+ },
303
+ isSend:false,
304
+ aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
305
+ showModal:false,
306
+ excelHeaders: {
307
+ 'f_check_book_name': '安检册名称',
308
+ 'f_create_date': '创建日期',
309
+ 'f_create_person': '创建人',
310
+ 'f_dep': '所属科室',
311
+ 'f_checker_name': '所属安检员',
312
+ 'f_run_date': '执行日期',
313
+ 'f_around_time': '执行周期',
314
+ 'f_around_unit': '周期单位',
315
+ 'num': '用户数量',
316
+ 'f_issue_time': '下发时间'
317
+ },
318
+ checkers:[],
319
+ f_depid:'',
320
+ source:
321
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
322
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($安检册二次分配$)))',
323
+ userid: this.$login.f.id,
324
+ model: new PagedList('rs/sql/QueryCheckBook', 20),
325
+ checkBook :{
326
+ f_check_book_name: '',
327
+ f_run_date: '',
328
+ f_around_time: '',
329
+ f_around_unit: '',
330
+ f_create_date: '',
331
+ f_create_person: '',
332
+ f_orgid: '',
333
+ f_depid:'',
334
+ f_dep:'',
335
+ f_checker_name: '',
336
+ f_checker_id:''
337
+ }
338
+ }
339
+ },
340
+ props: {
341
+ style: {
342
+ type: String,
343
+ default: 'col-sm-2 form-group'
344
+ },
345
+ style2: {
346
+ type: String,
347
+ default: 'col-sm-4 form-group'
348
+ },
349
+ permission:{
350
+ type: String
351
+ }
352
+ },
353
+ ready () {
354
+ // 获取分公司信息
355
+ console.log('执行这里',this.$refs.paged.$refs.criteria.model)
356
+ this.$refs.paged.$refs.criteria.model.f_check_start = toStartDateString()
357
+ this.$refs.paged.$refs.criteria.model.f_check_end = toEndDateString()
358
+ console.log('permission3',this.permission)
359
+ this.getChecker()
360
+ },
361
+ methods: {
362
+ reres(val) {
363
+ if (!val.resids || val.resids.length === 0 || val.resids[0] ==='undefined' || val.resids.length>1){
364
+ return
365
+ }
366
+ console.log('val2',val)
367
+ const resids = val.orgobj.filter(res=>res.resourcetype==='department')
368
+ console.log('val2',resids)
369
+ if (resids.length>0){
370
+ this.checkBook.f_depid = resids[0].id
371
+ this.checkBook.f_dep = resids[0].name
372
+ }
373
+ },
374
+ reres2(val){
375
+ if (!val.resids || val.resids.length === 0 || val.resids[0] ==='undefined' || !val.resids[0] || val.resids.length>1){
376
+ console.log('未选择',val)
377
+ this.f_depid = ''
378
+ return
379
+ }
380
+ console.log('val2',val)
381
+ const resids = val.orgobj.filter(res=>res.resourcetype==='department')
382
+ if (resids.length>0){
383
+ this.f_depid = resids[0].id
384
+ }
385
+ },
386
+ topPlanItem(val){
387
+ if(!val.f_depid){
388
+ this.$showMessage('请补全科室后在进行下发')
389
+ return
390
+ }
391
+ this.isSend = true
392
+ console.log('val', val)
393
+
394
+ let checkBook = Object.assign({},val)
395
+ let nextDate = new Date(checkBook.f_run_date)
396
+
397
+ let plan = {
398
+ id:this.uuid(),
399
+ f_plan_year:nextDate.getFullYear(),
400
+ f_plan_month:nextDate.getMonth()+1,
401
+ f_plan_name : `${nextDate.getFullYear()}年${nextDate.getMonth()+1}月${checkBook.f_check_book_name}`,
402
+ f_plan_type : '预约计划',
403
+ f_issued : '是',
404
+ f_filialeid : this.$login.f.orgid,
405
+ f_create_person : this.$login.f.name,
406
+ f_create_time : Util.toStandardDateString(),
407
+ f_safecheck_type : '年度普检',
408
+ f_checker : checkBook.f_checker_name,
409
+ f_checker_id:checkBook.f_checker_id,
410
+ f_depid:checkBook.f_depid,
411
+ f_dep:checkBook.f_dep
412
+ }
413
+
414
+ if (checkBook.f_around_unit === '年'){
415
+ nextDate.setFullYear(nextDate.getFullYear()+parseInt(checkBook.f_around_time))
416
+ }else if (checkBook.f_around_unit === ''){
417
+ nextDate.setMonth(nextDate.getMonth()+parseInt(checkBook.f_around_time))
418
+ }else if (checkBook.f_around_time === '日'){
419
+ nextDate.setDate(nextDate.getDate()+parseInt(checkBook.f_around_time))
420
+ }
421
+ let month = nextDate.getMonth()+1
422
+ let date = nextDate.getDate()
423
+ checkBook.f_run_date = nextDate.getFullYear() + '-' + (month<10? '0'+ month : month) + '-' + (date<10? '0'+ date : date)
424
+ checkBook.f_issue_time = nextDate.getFullYear() + '-' + (month<10? '0'+ month : month) + '-' + (date<10? '0'+ date : date)
425
+
426
+ let data ={
427
+ checkBook,
428
+ plan
429
+ }
430
+ let http = new HttpResetClass()
431
+ http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_plan',entityData:plan}},
432
+ {resolveMsg: null, rejectMsg: '创建计划失败'}).then(res=>{
433
+ if (res.data.code===200){
434
+ if (typeof res.data.id ==='string'){
435
+ const id = JSON.parse(res.data.id).id
436
+ const item = {
437
+ f_plan_id:id,
438
+ f_filialeid:this.$login.f.orgid,
439
+ f_check_book_id:checkBook.id
440
+ }
441
+ return http.load('POST', 'rs/logic/AddCheckPlanItemajc', {data:item}).then(res1=>{
442
+ console.log('6666666661',res1)
443
+ if (res1.data.code===200){
444
+ return http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:checkBook}}).then(res2=>{
445
+ console.log('6666666662',res2)
446
+ if (res2.data.code===200){
447
+ this.$showMessage('下发成功')
448
+ this.$refs.paged.$refs.criteria.search()
449
+ this.isSend = false
450
+ }
451
+ })
452
+ }
453
+ this.$showMessage('添加计划失败')
454
+ this.isSend = false
455
+ })
456
+ }
457
+ }
458
+ this.isSend = false
459
+ this.$showMessage('创建计划失败')
460
+ })
461
+ console.log(data)
462
+ },
463
+ getChecker(){
464
+ let http = new HttpResetClass()
465
+ http.load('POST', '/rs/search', {data: {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))', userid: this.$login.f.id}}, {resolveMsg: null, rejectMsg: null})
466
+ .then(res => {
467
+ console.log('res666-->' + JSON.stringify(res))
468
+ this.checkers = res.data.map(res=>{
469
+ return {label:res.name,value:res.name,id:res.id}
470
+ })
471
+ })
472
+ },
473
+ uuid() {
474
+ try {
475
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
476
+ var r = Math.random() * 16 | 0,
477
+ v = c == 'x' ? r : (r & 0x3 | 0x8);
478
+ return v.toString(16);
479
+ })
480
+ } catch (e) {
481
+ //TODO handle the exception
482
+ console.log(e)
483
+ }
484
+ },
485
+ ok (){
486
+ console.log('this.checkBook', this.checkBook)
487
+ if (this.checkBook.f_checker_name){
488
+ const checkers = this.checkers.filter(res=>res.value===this.checkBook.f_checker_name)
489
+ if (checkers.length>0){
490
+ console.log('8888888888888',checkers)
491
+ this.checkBook.f_checker_id=checkers[0].id
492
+ }
493
+ }
494
+ let http = new HttpResetClass()
495
+ http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:this.checkBook}},
496
+ {resolveMsg: '更新安检册信息成功', rejectMsg: '保存安检册信息成功'}).then(res=>{
497
+ if (res.data.code===200){
498
+ this.$showMessage('修改成功')
499
+ this.showModal = false
500
+ this.clearBook()
501
+ }
502
+ })
503
+ },
504
+ clearBook(){
505
+ this.checkBook= {
506
+ f_check_book_name: '',
507
+ f_run_date: '',
508
+ f_around_time: '',
509
+ f_around_unit: '',
510
+ f_create_date: '',
511
+ f_create_person: '',
512
+ f_orgid: '',
513
+ f_depid:'',
514
+ f_dep:'',
515
+ f_checker_name: '',
516
+ f_checker_id:''
517
+ }
518
+ },
519
+ cancel () {
520
+ this.showModal = false
521
+ this.clearBook()
522
+
523
+ },
524
+ updateCheckBook(val){
525
+ console.log(val)
526
+ this.checkBook=val
527
+ console.log(this.checkBook)
528
+ this.showModal = true
529
+ },
530
+ search (args) {
531
+ // console.log('8888888888888', this.model.f_filialeids)
532
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
533
+ if (this.permission === 'c2'){
534
+ args.condition +=` and tcb.f_depid = '${this.$login.f.depids}'`
535
+ }
536
+ if (this.f_depid && this.permission === 'c1'){
537
+ args.condition +=` and tcb.f_depid = '${this.f_depid}'`
538
+ }
539
+ return this.model.search(args.condition, args.model)
540
+ },
541
+ getRes (obj) {
542
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids)
543
+ },
544
+ async deleteCheckBook (val) {
545
+ this.$showMessage('是否确认删除安检册,此操作无法撤销!', ['confirm', 'cancel']).then(async (res) => {
546
+ if(res == 'confirm'){
547
+ try {
548
+ console.log('val', val.id)
549
+ let http = new HttpResetClass()
550
+ let upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${val.id}'`
551
+ let delCheckBook= `delete from t_check_book where id ='${val.id}'`
552
+ await http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
553
+ {resolveMsg: null, rejectMsg: '删除安检册失败'})
554
+ await http.load('POST', 'rs/logic/runSQL', {data: {sql: delCheckBook}},
555
+ {resolveMsg: null, rejectMsg: '删除安检册失败'})
556
+ this.$showMessage('删除成功')
557
+ this.$refs.paged.$refs.criteria.search()
558
+ }catch (e) {
559
+ this.$showMessage('删除失败',e)
560
+ }
561
+ }
562
+ })
563
+ }
564
+ },
565
+
566
+ watch: {
567
+ },
568
+ computed: {
569
+ // 导出到Excel的条件构造
570
+ exportParameter() {
571
+ return {
572
+ condition: this.$refs.paged.model.condition
573
+ }
574
+ },
575
+ selected () {
576
+ return this.$refs.paged.$refs.grid.selected
577
+ }
578
+ }
579
+ }
580
+ </script>
581
+ <style scoped>
582
+ .newcolor {
583
+ color: red;
584
+ }
585
+
586
+ .table th {
587
+ background-color: #f2f6fa;
588
+ color: black;
589
+ }
590
+ </style>