safecheck-client 3.0.33-gongyi → 3.0.34-gongyi

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,449 +1,479 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged :pager="false">
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
8
- <label class="font_normal_body">组织机构</label>
9
- <res-select restype='organization'
10
- class="select select_list"
11
- style="width: 60%"
12
- @res-select="$parent.$parent.getorg"
13
- :initresid='$parent.$parent.curorgid'>
14
- </res-select>
15
- </div>-->
16
- <div :class="{'col-sm-6':$parent.$parent.$parent.isdetail,'col-sm-4':!$parent.$parent.$parent.isdetail}">
17
- <role-selector-safe
18
- role-name="安检员"
19
- role-lable="安&ensp;检&ensp;员"
20
- @re-res="$parent.$parent.getorg"
21
- :value.sync="model.f_checker_id"
22
- v-model="model.f_checker_id"
23
- condition="f_checker_name like '%{}%'">
24
- </role-selector-safe>
25
- </div>
26
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
27
- <label class="font_normal_body">小区名称</label>
28
- <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area" placeholder='小区名称'
29
- condition="f_residential_area like '%{}%'" v-next-el="cx" v-el:qjmc>
30
- </div>
31
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
32
- <label class="font_normal_body">计划名称</label>
33
- <v-select class="select_list select"
34
- placeholder='计划名称' style="width: 60%"
35
- :search="true"
36
- v-model="model.f_plan_name"
37
- :value.sync="model.f_plan_name"
38
- :options='$parent.$parent.planName'
39
- condition="f_plan_id = '{}'"
40
- :value-single="true"
41
- close-on-select clear-button></v-select>
42
-
43
- </div>
44
- <!--<div :class="{
45
- 'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
46
- <label class="font_normal_body">安&ensp;检&ensp;员</label>
47
- <input type="text" class="input_search" style="width:60%" v-model="model.f_checker_name" placeholder='安检员'
48
- condition="f_checker_name like '%{}%'" v-next-el="cx" v-el:qjmc>
49
- </div>-->
50
- <div class="form-group col-sm-2" v-if="!$parent.$parent.$parent.isdetail"></div>
51
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" style="float:right; padding-right: 25px">
52
- <div class="span" style="float:right;">
53
- <div style="float: right;margin-left:10px" class="button_spacing"
54
- :class="{'button_shrink_left':!$parent.$parent.$parent.isdetail,'button_shrink_right':$parent.$parent.$parent.isdetail}"
55
- @click="$parent.$parent.hiddenr()"></div>
56
- <div class="button_spacing" style="float: right;margin-left:10px"
57
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
58
- @click="$parent.$parent.hidden()">
59
- </div>
60
- <!-- <export-excel-safe :data="$parent.$parent.exportParameter"
61
- :field="$parent.$parent.exportExcelField"
62
- sqlurl="rs/logic/SafeExportExcel" sql-name="getCheckPlanAreaList"
63
- template-name='安检汇总' :choose-col="true">
64
- </export-excel-safe>-->
65
- <button id="btnaaa" style="float: right" class="button_search"
66
- @click="$parent.$parent.getGroupName1(),search(),$parent.$parent.getexportExcelField(),$parent.$parent.$parent.isdetail=false,$parent.$parent.listflag=false"
67
- v-el:cx>查询</button>
68
- </div>
69
- </div>
70
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
71
- <label class="font_normal_body">起始时间</label>
72
- <datepicker
73
- :value.sync="$parent.$parent.f_check_start"
74
- placeholder='起始时间' style="width:60%"
75
- :disabled-days-of-week="[]"
76
- :format="'yyyy-MM'"
77
- :select-month="true"
78
- :show-rest-button="reset">
79
- </datepicker>
80
- </div>
81
- <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
82
- <label class="font_normal_body">结束时间</label>
83
- <datepicker
84
- :value.sync="$parent.$parent.f_check_end"
85
- placeholder='结束时间' style="width:60%"
86
- :disabled-days-of-week="[]"
87
- :format="'yyyy-MM'"
88
- :select-month="true"
89
- :show-rest-button="reset">
90
- </datepicker>
91
- </div>
92
- </div>
93
- <div class="row">
94
- <div class="col-sm-12">
95
- <label class="control-label" style="color: #c7254e">汇 总 项</label>
96
- <input type="checkbox" id="f_plan_month" value="f_plan_month" v-model="$parent.$parent.nameForSql"/>
97
- <label for="f_plan_month">计划月份</label>
98
- <input type="checkbox" id="f_no_checkplan" value="f_no_checkplan" v-model="$parent.$parent.nameForSql"/>
99
- <label for="f_no_checkplan">计划类型</label>
100
- <input type="checkbox" id="f_residential_area" value="f_residential_area" v-model="$parent.$parent.nameForSql"/>
101
- <label for="f_residential_area">小区名称</label>
102
- <input type="checkbox" id="f_plan_name" value="f_plan_name" v-model="$parent.$parent.nameForSql"/>
103
- <label for="f_plan_name">计划名称</label>
104
- <input type="checkbox" id="f_checker_name" value="f_checker_name" v-model="$parent.$parent.nameForSql"/>
105
- <label for="f_checker_name">安检员</label>
106
- <input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
107
- <label for="f_checker_name">档案数量</label>
108
- </div>
109
- </div>
110
- </div>
111
-
112
- </criteria>
113
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
114
- <template partial='head'>
115
- <tr>
116
- <th>
117
- <nobr>序号</nobr>
118
- </th>
119
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')"><nobr>计划月份</nobr></th>
120
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')"><nobr>计划类型</nobr></th>
121
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')"><nobr>小区名称</nobr></th>
122
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
123
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')"><nobr>安检员</nobr></th>
124
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></th>
125
- <th>
126
- <nobr>计划总数</nobr>
127
- </th>
128
- <th>
129
- <nobr>未检</nobr>
130
- </th>
131
- <th>
132
- <nobr>已检</nobr>
133
- </th>
134
- <th>
135
- <nobr>入户</nobr>
136
- </th>
137
- <th>
138
- <nobr>到访不遇</nobr>
139
- </th>
140
- <th>
141
- <nobr>拒检</nobr>
142
- </th>
143
- <th>
144
- <nobr>安检率</nobr>
145
- </th>
146
- <!--<th>-->
147
- <!--<nobr>查看</nobr>-->
148
- <!--</th>-->
149
- </tr>
150
- </template>
151
- <template partial='body'>
152
- <tr>
153
- <td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
154
- <td style="text-align:center" :class="{'td-0':row.f_plan_month==undefined,'td-1':model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>
155
- <td style="text-align:center" :class="{'td-0':row.f_no_checkplan==undefined,'td-1':model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>
156
- <td style="text-align:center" :class="{'td-0':row.f_residential_area==undefined,'td-1':model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>
157
- <td style="text-align:center" :class="{'td-0':row.f_plan_name==undefined,'td-1':model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>
158
- <td style="text-align:center" :class="{'td-0':row.f_checker_name==undefined,'td-1':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.f_checker_name.indexOf('*&')!=-1?'':row.f_checker_name}}</td>
159
- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')">{{row.f_user_number}}</td>
160
- <td style="text-align:center">{{row.f_plan_total}}</td>
161
- <td style="text-align:center">{{row.f_weijian}}</td>
162
- <td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
163
- <td style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
164
- <td style="text-align:center">{{row.f_buyu}}</td>
165
- <td style="text-align:center"><nobr>{{row.f_jujian}}</nobr></td>
166
- <td style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
167
- <!--<td style="text-align: center;">-->
168
- <!--<button class="btn btn-link" @click.stop="$parent.$parent.$parent.showhistory(row)">查看</button>-->
169
- <!--</td>-->
170
- </tr>
171
- </template>
172
- <template partial='foot'></template>
173
- </data-grid>
174
- </criteria-paged>
175
- </div>
176
- </template>
177
-
178
- <script>
179
- /**
180
- *阶梯气价查询列表
181
- */
182
- import {PagedList} from 'vue-client'
183
- import { HttpResetClass } from 'vue-client'
184
- export default {
185
- data () {
186
- return {
187
- model: new PagedList('rs/sql/getCheckPlanAreaList', 99999),
188
- // 公司下拉
189
- curorgid: [this.$login.f.orgid],
190
- row: {},
191
- f_orgid: '',
192
- nameForSql: [],
193
- groupNameForSql: '',
194
- listflag:false,
195
- nameflag:false,
196
- criteriaShow: false,
197
- f_check_start:'',
198
- f_check_end:'',
199
- planName:[{label: '全部', value: ''}],
200
- exportExcelField: {
201
- 'f_weijian':'未检',
202
- 'f_yijian':'已检',
203
- 'f_ruhu':'入户',
204
- 'f_buyu':'到访不遇',
205
- 'f_jujian':'拒检',
206
- 'f_check_bv':'安检率'
207
- }
208
- }
209
- },
210
- props: {
211
- row: {},
212
- config: {},
213
- ispartial: false,
214
- f_filialeid: {
215
- type: String
216
- }
217
- },
218
- ready () {
219
- this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name']
220
- this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
221
- this.pl()
222
- this.search()
223
-
224
- },
225
- methods: {
226
- // 获取导出列
227
- getexportExcelField(){
228
- this.exportExcelField = {
229
- 'f_weijian':'未检',
230
- 'f_yijian':'已检',
231
- 'f_ruhu':'入户',
232
- 'f_buyu':'到访不遇',
233
- 'f_jujian':'拒检',
234
- 'f_check_bv':'安检率',
235
- 'f_plan_total':'计划总数'
236
- }
237
- let forName = this.groupNameForSql.split(",")
238
- for (let i = 0; i < forName.length; i++) {
239
- let ff = forName[i]
240
- if (ff==='f_plan_month') {
241
- this.exportExcelField.f_plan_month='计划月份'
242
- }
243
- if (ff==='f_no_checkplan') {
244
- this.exportExcelField.f_checker_name='计划类型'
245
- }
246
- if (ff==='f_plan_name') {
247
- this.exportExcelField.f_plan_name='计划名称'
248
- }
249
- if (ff==='f_checker_name') {
250
- this.exportExcelField.f_checker_name='安检员'
251
- }if (ff==='f_residential_area') {
252
- this.exportExcelField.f_checker_name='小区名称'
253
- }if (ff==='f_user_number') {
254
- this.exportExcelField.f_checker_name='档案数量'
255
- }
256
- }
257
- },
258
- pl() {
259
- let getGasman = new HttpResetClass()
260
- getGasman.load('POST', `rs/sql/safe_singleTable_OrderBy`, {
261
- data: {
262
- items: "id,f_plan_name",
263
- tablename: "t_check_plan",
264
- condition: `f_filialeid = '${this.curorgid}'`,
265
- orderitem: "id"
266
- }
267
- }, {resolveMsg: null, rejectMsg: null}).then((plne) => {
268
- console.log('计划查询结果333', plne.data)
269
- console.log('计划查询结果22222', plne.data.length)
270
- console.log('计划1111', this.planName)
271
- for (let i = 0; i < plne.data.length; i++) {
272
- this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
273
- }
274
- console.log('计划2222', this.planName)
275
- })
276
- },
277
- hiddenr() {
278
- this.$parent.isdetail = !this.$parent.isdetail
279
- },
280
- hidden() {
281
- this.criteriaShow = !this.criteriaShow
282
- },
283
- search () {
284
- this.$refs.paged.$refs.cri.search()
285
- this.$dispatch('search')
286
- },
287
- getorg (val) {
288
- this.f_orgid = this.$login.convertToIn(val.resids)
289
- this.f_filialeid = val[0]
290
-
291
- },
292
- selfSearch (args) {
293
- if (!this.f_orgid) {
294
- this.getorg([this.$login.f.orgid])
295
- }
296
- if (this.f_orgid) {
297
- args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
298
- }
299
- if(this.f_check_start){
300
- args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1} `
301
- }
302
- if(this.f_check_end){
303
- args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1} `
304
- }
305
- this.$refs.paged.$refs.grid.$el.scrollTop = 0
306
- if (this.groupNameForSql=='undefined'){
307
- console.log("777777777")
308
- this.$showMessage("请至少选择一项进行汇总")
309
- return
310
- }
311
- this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
312
- this.model.search(args.condition, args.model)
313
- },
314
-
315
- // 拼接groupName1
316
- getGroupName1 () {
317
- var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
318
- var newtemp=[]
319
-
320
- for (var i=0;i<temp.length;i++){
321
- for (var j=0;j<this.nameForSql.length;j++){
322
- console.log(temp[i],this.nameForSql[j],'asd')
323
- if(temp[i]==this.nameForSql[j]){
324
- newtemp.push(this.nameForSql[j])
325
- }
326
- }
327
- }
328
- let str = ''
329
-
330
- for (var i=0;i < newtemp.length - 1; i++) {
331
- str += newtemp[i] + ','
332
- }
333
- str += newtemp[i]
334
- this.groupNameForSql = str.trim()
335
- }
336
- },
337
- watch: {
338
- // 'nameForSql' () {
339
- //
340
- // this.getGroupName1()
341
- // },
342
- 'nameForSql' () {
343
- var e = document.createEvent("MouseEvents");
344
- e.initEvent("click", true, true);
345
- document.getElementById("btnaaa").dispatchEvent(e);
346
- },
347
- 'model.rows'(){
348
- console.log("this.model.rows发生变化")
349
- if(this.listflag){
350
- return;
351
- }
352
- this.listflag=true
353
- console.log(this.model.rows)
354
- var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
355
- var newtemp=[]
356
- for (var i=0;i<temp.length;i++){
357
- for (var j=0;j<this.nameForSql.length;j++){
358
- console.log(temp[i],this.nameForSql[j],'asd')
359
- if(temp[i]==this.nameForSql[j]){
360
- newtemp.push(this.nameForSql[j])
361
- }
362
- }
363
- }
364
- if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
365
- return
366
- }
367
- var temp=JSON.parse(JSON.stringify(this.model.rows))
368
-
369
- //遍历查询结果 为指定列增加样式
370
- for (var i=0;i<newtemp.length-1;i++){
371
- if(newtemp[i]=='f_user_number'){
372
- return;
373
- }
374
- console.log(newtemp[i])
375
- var ss=''
376
- for (var j=0;j<temp.length;j++){
377
- if(j>0&&i>0){
378
- var flag=false
379
- for(var t=i-1;t>-1;t--){
380
- console.log("jjjjjjjjjjj--:"+j)
381
- console.log("iiiiiiiiiii---:"+i)
382
- console.log("temp[j-1][newtemp[t]]:"+temp[j-1][newtemp[t]])
383
- console.log("temp[j][newtemp[t]]:"+temp[j][newtemp[t]])
384
- if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&temp[j][newtemp[t]].indexOf('*&')==-1){
385
- flag=true
386
- break
387
- }
388
- }
389
- console.log(j,i,flag)
390
- if(flag){
391
- ss=temp[j][newtemp[i]]
392
- continue
393
- }
394
- }
395
- if(temp[j][newtemp[i]]==ss){
396
- temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
397
- }else {
398
- ss=temp[j][newtemp[i]]
399
- }
400
- }
401
- }
402
- console.log(temp,'chulijieshu')
403
- this.model.rows=JSON.parse(JSON.stringify(temp))
404
- }
405
- },
406
- computed:{
407
- exportParameter(){
408
- // excel 导出条件拼接
409
- return {
410
- condition: this.$refs.paged.model.condition,
411
- groupName: this.groupNameForSql
412
- }
413
- }
414
- }
415
- }
416
- </script>
417
-
418
- <style scoped>
419
-
420
- .td-0{
421
- border: 1px solid #000000;
422
- }
423
-
424
- .td-1{
425
- border: none;
426
- border-top: 1px solid #000000;
427
- border-left: 1px solid #000000;
428
- border-right: 1px solid #000000;
429
- }
430
-
431
- .td-2{
432
- border: none;
433
- border-left: 1px solid #000000;
434
- border-right: 1px solid #000000;
435
- }
436
- .td-4{
437
- border: none;
438
- border-top: 1px solid #000000;
439
- border-left: 1px solid #000000;
440
- border-right: 1px solid #000000;
441
- border-bottom: 1px solid #000000;
442
- }
443
- .td-3{
444
- border: none;
445
- border-left: 1px solid #000000;
446
- border-right: 1px solid #000000;
447
- border-bottom: 1px solid #000000;
448
- }
449
- </style>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged :pager="false">
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <!--<div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ class="select select_list"
11
+ style="width: 60%"
12
+ @res-select="$parent.$parent.getorg"
13
+ :initresid='$parent.$parent.curorgid'>
14
+ </res-select>
15
+ </div>-->
16
+ <div :class="{'col-sm-6':$parent.$parent.$parent.isdetail,'col-sm-4':!$parent.$parent.$parent.isdetail}">
17
+ <role-selector-safe
18
+ role-name="安检员"
19
+ role-lable="安&ensp;检&ensp;员"
20
+ @re-res="$parent.$parent.getorg"
21
+ :value.sync="model.f_checker_id"
22
+ v-model="model.f_checker_id"
23
+ condition="f_checker_name like '%{}%'">
24
+ </role-selector-safe>
25
+ </div>
26
+ <div :class="{'col-sm-3 form-group':$parent.$parent.$parent.isdetail,'col-sm-2 form-group':!$parent.$parent.$parent.isdetail}">
27
+ <label class="font_normal_body">安检科室</label>
28
+ <right-tree-safe islist :source="$parent.$parent.source" v-on:re-res="$parent.$parent.reres2" :textContent="'选择科室'" >
29
+ </right-tree-safe>
30
+ </div>
31
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
32
+ <label class="font_normal_body">小区名称</label>
33
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_residential_area" placeholder='小区名称'
34
+ condition="f_residential_area like '%{}%'" v-next-el="cx" v-el:qjmc>
35
+ </div>
36
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
37
+ <label class="font_normal_body">计划名称</label>
38
+ <v-select class="select_list select"
39
+ placeholder='计划名称' style="width: 60%"
40
+ :search="true"
41
+ v-model="model.f_plan_name"
42
+ :value.sync="model.f_plan_name"
43
+ :options='$parent.$parent.planName'
44
+ condition="f_plan_id = '{}'"
45
+ :value-single="true"
46
+ close-on-select clear-button></v-select>
47
+
48
+ </div>
49
+ <!--<div :class="{
50
+ 'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}">
51
+ <label class="font_normal_body">安&ensp;检&ensp;员</label>
52
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_checker_name" placeholder='安检员'
53
+ condition="f_checker_name like '%{}%'" v-next-el="cx" v-el:qjmc>
54
+ </div>-->
55
+ <div class="form-group col-sm-2" v-if="!$parent.$parent.$parent.isdetail"></div>
56
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" style="float:right; padding-right: 25px">
57
+ <div class="span" style="float:right;">
58
+ <div style="float: right;margin-left:10px" class="button_spacing"
59
+ :class="{'button_shrink_left':!$parent.$parent.$parent.isdetail,'button_shrink_right':$parent.$parent.$parent.isdetail}"
60
+ @click="$parent.$parent.hiddenr()"></div>
61
+ <div class="button_spacing" style="float: right;margin-left:10px"
62
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
63
+ @click="$parent.$parent.hidden()">
64
+ </div>
65
+ <!-- <export-excel-safe :data="$parent.$parent.exportParameter"
66
+ :field="$parent.$parent.exportExcelField"
67
+ sqlurl="rs/logic/SafeExportExcel" sql-name="getCheckPlanAreaList"
68
+ template-name='安检汇总' :choose-col="true">
69
+ </export-excel-safe>-->
70
+ <button id="btnaaa" style="float: right" class="button_search"
71
+ @click="$parent.$parent.getGroupName1(),search(),$parent.$parent.getexportExcelField(),$parent.$parent.$parent.isdetail=false,$parent.$parent.listflag=false"
72
+ v-el:cx>查询</button>
73
+ </div>
74
+ </div>
75
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
76
+ <label class="font_normal_body">起始时间</label>
77
+ <datepicker
78
+ :value.sync="$parent.$parent.f_check_start"
79
+ placeholder='起始时间' style="width:60%"
80
+ :disabled-days-of-week="[]"
81
+ :format="'yyyy-MM'"
82
+ :select-month="true"
83
+ :show-rest-button="reset">
84
+ </datepicker>
85
+ </div>
86
+ <div :class="{'form-group col-sm-3':$parent.$parent.$parent.isdetail,'form-group col-sm-2':!$parent.$parent.$parent.isdetail}" v-if="$parent.$parent.criteriaShow">
87
+ <label class="font_normal_body">结束时间</label>
88
+ <datepicker
89
+ :value.sync="$parent.$parent.f_check_end"
90
+ placeholder='结束时间' style="width:60%"
91
+ :disabled-days-of-week="[]"
92
+ :format="'yyyy-MM'"
93
+ :select-month="true"
94
+ :show-rest-button="reset">
95
+ </datepicker>
96
+ </div>
97
+ </div>
98
+ <div class="row">
99
+ <div class="col-sm-12">
100
+ <label class="control-label" style="color: #c7254e">汇 总 项</label>
101
+ <input type="checkbox" id="f_plan_month" value="f_plan_month" v-model="$parent.$parent.nameForSql"/>
102
+ <label for="f_plan_month">计划月份</label>
103
+ <input type="checkbox" id="f_no_checkplan" value="f_no_checkplan" v-model="$parent.$parent.nameForSql"/>
104
+ <label for="f_no_checkplan">计划类型</label>
105
+ <input type="checkbox" id="f_residential_area" value="f_residential_area" v-model="$parent.$parent.nameForSql"/>
106
+ <label for="f_residential_area">小区名称</label>
107
+ <input type="checkbox" id="f_plan_name" value="f_plan_name" v-model="$parent.$parent.nameForSql"/>
108
+ <label for="f_plan_name">计划名称</label>
109
+ <input type="checkbox" id="f_checker_name" value="f_checker_name" v-model="$parent.$parent.nameForSql"/>
110
+ <label for="f_checker_name">安检员</label>
111
+ <input type="checkbox" id="f_dep" value="f_dep" v-model="$parent.$parent.nameForSql"/>
112
+ <label for="f_plan_name">安检科室</label>
113
+ <input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
114
+ <label for="f_checker_name">档案数量</label>
115
+ </div>
116
+ </div>
117
+ </div>
118
+
119
+ </criteria>
120
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
121
+ <template partial='head'>
122
+ <tr>
123
+ <th>
124
+ <nobr>序号</nobr>
125
+ </th>
126
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')"><nobr>计划月份</nobr></th>
127
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')"><nobr>计划类型</nobr></th>
128
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')"><nobr>小区名称</nobr></th>
129
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
130
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')"><nobr>安检员</nobr></th>
131
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_dep')"><nobr>安检科室</nobr></th>
132
+ <th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></th>
133
+ <th>
134
+ <nobr>计划总数</nobr>
135
+ </th>
136
+ <th>
137
+ <nobr>未检</nobr>
138
+ </th>
139
+ <th>
140
+ <nobr>已检</nobr>
141
+ </th>
142
+ <th>
143
+ <nobr>入户</nobr>
144
+ </th>
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
+ </tr>
158
+ </template>
159
+ <template partial='body'>
160
+ <tr>
161
+ <td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
162
+ <td style="text-align:center" :class="{'td-0':row.f_plan_month==undefined,'td-1':model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>
163
+ <td style="text-align:center" :class="{'td-0':row.f_no_checkplan==undefined,'td-1':model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>
164
+ <td style="text-align:center" :class="{'td-0':row.f_residential_area==undefined,'td-1':model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>
165
+ <td style="text-align:center" :class="{'td-0':row.f_plan_name==undefined,'td-1':model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>
166
+ <td style="text-align:center" :class="{'td-0':row.f_checker_name==undefined,'td-1':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')==-1,'td-2':model.rows.length!=($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-3':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')!=-1,'td-4':model.rows.length==($index+1)&&row.f_checker_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.f_checker_name.indexOf('*&')!=-1?'':row.f_checker_name}}</td>
167
+ <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_dep')">{{row.f_dep}}</td>
168
+ <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')">{{row.f_user_number}}</td>
169
+ <td style="text-align:center">{{row.f_plan_total}}</td>
170
+ <td style="text-align:center">{{row.f_weijian}}</td>
171
+ <td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
172
+ <td style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
173
+ <td style="text-align:center">{{row.f_buyu}}</td>
174
+ <td style="text-align:center"><nobr>{{row.f_jujian}}</nobr></td>
175
+ <td style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
176
+ <!--<td style="text-align: center;">-->
177
+ <!--<button class="btn btn-link" @click.stop="$parent.$parent.$parent.showhistory(row)">查看</button>-->
178
+ <!--</td>-->
179
+ </tr>
180
+ </template>
181
+ <template partial='foot'></template>
182
+ </data-grid>
183
+ </criteria-paged>
184
+ </div>
185
+ </template>
186
+
187
+ <script>
188
+ /**
189
+ *阶梯气价查询列表
190
+ */
191
+ import {PagedList} from 'vue-client'
192
+ import { HttpResetClass } from 'vue-client'
193
+ export default {
194
+ data () {
195
+ return {
196
+ model: new PagedList('rs/sql/getCheckPlanAreaList', 99999),
197
+ // 公司下拉
198
+ curorgid: [this.$login.f.orgid],
199
+ row: {},
200
+ f_orgid: '',
201
+ nameForSql: [],
202
+ groupNameForSql: '',
203
+ source:
204
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
205
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($安检册二次分配$)))',
206
+ listflag:false,
207
+ nameflag:false,
208
+ criteriaShow: false,
209
+ f_check_start:'',
210
+ f_check_end:'',
211
+ planName:[{label: '全部', value: ''}],
212
+ exportExcelField: {
213
+ 'f_weijian':'未检',
214
+ 'f_yijian':'已检',
215
+ 'f_ruhu':'入户',
216
+ 'f_buyu':'到访不遇',
217
+ 'f_jujian':'拒检',
218
+ 'f_check_bv':'安检率'
219
+ }
220
+ }
221
+ },
222
+ props: {
223
+ row: {},
224
+ config: {},
225
+ ispartial: false,
226
+ f_filialeid: {
227
+ type: String
228
+ }
229
+ },
230
+ ready () {
231
+ this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name']
232
+ this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
233
+ this.pl()
234
+ this.search()
235
+
236
+ },
237
+ methods: {
238
+ reres2(val){
239
+ if (!val.resids || val.resids.length === 0 || val.resids[0] ==='undefined' || !val.resids[0] || val.resids.length>1){
240
+ console.log('未选择',val)
241
+ this.f_dep = ''
242
+ return
243
+ }
244
+ console.log('val2',val)
245
+ const resids = val.orgobj.filter(res=>res.resourcetype==='department')
246
+ if (resids.length>0){
247
+ this.f_dep = resids[0].name
248
+ }
249
+ },
250
+ // 获取导出列
251
+ getexportExcelField(){
252
+ this.exportExcelField = {
253
+ 'f_weijian':'未检',
254
+ 'f_yijian':'已检',
255
+ 'f_ruhu':'入户',
256
+ 'f_buyu':'到访不遇',
257
+ 'f_jujian':'拒检',
258
+ 'f_check_bv':'安检率',
259
+ 'f_plan_total':'计划总数'
260
+ }
261
+ let forName = this.groupNameForSql.split(",")
262
+ for (let i = 0; i < forName.length; i++) {
263
+ let ff = forName[i]
264
+ if (ff==='f_plan_month') {
265
+ this.exportExcelField.f_plan_month='计划月份'
266
+ }
267
+ if (ff==='f_no_checkplan') {
268
+ this.exportExcelField.f_checker_name='计划类型'
269
+ }
270
+ if (ff==='f_plan_name') {
271
+ this.exportExcelField.f_plan_name='计划名称'
272
+ }
273
+ if (ff==='f_checker_name') {
274
+ this.exportExcelField.f_checker_name='安检员'
275
+ }
276
+ if (ff==='f_dep') {
277
+ this.exportExcelField.f_dep='安检科室'
278
+ }if (ff==='f_residential_area') {
279
+ this.exportExcelField.f_checker_name='小区名称'
280
+ }if (ff==='f_user_number') {
281
+ this.exportExcelField.f_checker_name='档案数量'
282
+ }
283
+ }
284
+ },
285
+ pl() {
286
+ let getGasman = new HttpResetClass()
287
+ getGasman.load('POST', `rs/sql/safe_singleTable_OrderBy`, {
288
+ data: {
289
+ items: "id,f_plan_name",
290
+ tablename: "t_check_plan",
291
+ condition: `f_filialeid = '${this.curorgid}'`,
292
+ orderitem: "id"
293
+ }
294
+ }, {resolveMsg: null, rejectMsg: null}).then((plne) => {
295
+ console.log('计划查询结果333', plne.data)
296
+ console.log('计划查询结果22222', plne.data.length)
297
+ console.log('计划1111', this.planName)
298
+ for (let i = 0; i < plne.data.length; i++) {
299
+ this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
300
+ }
301
+ console.log('计划2222', this.planName)
302
+ })
303
+ },
304
+ hiddenr() {
305
+ this.$parent.isdetail = !this.$parent.isdetail
306
+ },
307
+ hidden() {
308
+ this.criteriaShow = !this.criteriaShow
309
+ },
310
+ search () {
311
+ this.$refs.paged.$refs.cri.search()
312
+ this.$dispatch('search')
313
+ },
314
+ getorg (val) {
315
+ this.f_orgid = this.$login.convertToIn(val.resids)
316
+ this.f_filialeid = val[0]
317
+
318
+ },
319
+ selfSearch (args) {
320
+ if (!this.f_orgid) {
321
+ this.getorg([this.$login.f.orgid])
322
+ }
323
+ if (this.f_orgid) {
324
+ args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
325
+ }
326
+ if(this.f_check_start){
327
+ args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1} `
328
+ }
329
+ if(this.f_check_end){
330
+ args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1} `
331
+ }
332
+ if(this.f_dep){
333
+ args.condition += ` and f_dep = '${this.f_dep}'`
334
+ }
335
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
336
+ if (this.groupNameForSql=='undefined'){
337
+ console.log("777777777")
338
+ this.$showMessage("请至少选择一项进行汇总")
339
+ return
340
+ }
341
+ this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
342
+ this.model.search(args.condition, args.model)
343
+ },
344
+
345
+ // 拼接groupName1
346
+ getGroupName1 () {
347
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_dep','f_user_number']
348
+ var newtemp=[]
349
+
350
+ for (var i=0;i<temp.length;i++){
351
+ for (var j=0;j<this.nameForSql.length;j++){
352
+ console.log(temp[i],this.nameForSql[j],'asd')
353
+ if(temp[i]==this.nameForSql[j]){
354
+ newtemp.push(this.nameForSql[j])
355
+ }
356
+ }
357
+ }
358
+ let str = ''
359
+
360
+ for (var i=0;i < newtemp.length - 1; i++) {
361
+ str += newtemp[i] + ','
362
+ }
363
+ str += newtemp[i]
364
+ this.groupNameForSql = str.trim()
365
+ }
366
+ },
367
+ watch: {
368
+ // 'nameForSql' () {
369
+ //
370
+ // this.getGroupName1()
371
+ // },
372
+ 'nameForSql' () {
373
+ var e = document.createEvent("MouseEvents");
374
+ e.initEvent("click", true, true);
375
+ document.getElementById("btnaaa").dispatchEvent(e);
376
+ },
377
+ 'model.rows'(){
378
+ console.log("this.model.rows发生变化")
379
+ if(this.listflag){
380
+ return;
381
+ }
382
+ this.listflag=true
383
+ console.log(this.model.rows)
384
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
385
+ var newtemp=[]
386
+ for (var i=0;i<temp.length;i++){
387
+ for (var j=0;j<this.nameForSql.length;j++){
388
+ console.log(temp[i],this.nameForSql[j],'asd')
389
+ if(temp[i]==this.nameForSql[j]){
390
+ newtemp.push(this.nameForSql[j])
391
+ }
392
+ }
393
+ }
394
+ if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
395
+ return
396
+ }
397
+ var temp=JSON.parse(JSON.stringify(this.model.rows))
398
+
399
+ //遍历查询结果 为指定列增加样式
400
+ for (var i=0;i<newtemp.length-1;i++){
401
+ if(newtemp[i]=='f_user_number'){
402
+ return;
403
+ }
404
+ console.log(newtemp[i])
405
+ var ss=''
406
+ for (var j=0;j<temp.length;j++){
407
+ if(j>0&&i>0){
408
+ var flag=false
409
+ for(var t=i-1;t>-1;t--){
410
+ console.log("jjjjjjjjjjj--:"+j)
411
+ console.log("iiiiiiiiiii---:"+i)
412
+ console.log("temp[j-1][newtemp[t]]:"+temp[j-1][newtemp[t]])
413
+ console.log("temp[j][newtemp[t]]:"+temp[j][newtemp[t]])
414
+ if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&temp[j][newtemp[t]].indexOf('*&')==-1){
415
+ flag=true
416
+ break
417
+ }
418
+ }
419
+ console.log(j,i,flag)
420
+ if(flag){
421
+ ss=temp[j][newtemp[i]]
422
+ continue
423
+ }
424
+ }
425
+ if(temp[j][newtemp[i]]==ss){
426
+ temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
427
+ }else {
428
+ ss=temp[j][newtemp[i]]
429
+ }
430
+ }
431
+ }
432
+ console.log(temp,'chulijieshu')
433
+ this.model.rows=JSON.parse(JSON.stringify(temp))
434
+ }
435
+ },
436
+ computed:{
437
+ exportParameter(){
438
+ // excel 导出条件拼接
439
+ return {
440
+ condition: this.$refs.paged.model.condition,
441
+ groupName: this.groupNameForSql
442
+ }
443
+ }
444
+ }
445
+ }
446
+ </script>
447
+
448
+ <style scoped>
449
+
450
+ .td-0{
451
+ border: 1px solid #000000;
452
+ }
453
+
454
+ .td-1{
455
+ border: none;
456
+ border-top: 1px solid #000000;
457
+ border-left: 1px solid #000000;
458
+ border-right: 1px solid #000000;
459
+ }
460
+
461
+ .td-2{
462
+ border: none;
463
+ border-left: 1px solid #000000;
464
+ border-right: 1px solid #000000;
465
+ }
466
+ .td-4{
467
+ border: none;
468
+ border-top: 1px solid #000000;
469
+ border-left: 1px solid #000000;
470
+ border-right: 1px solid #000000;
471
+ border-bottom: 1px solid #000000;
472
+ }
473
+ .td-3{
474
+ border: none;
475
+ border-left: 1px solid #000000;
476
+ border-right: 1px solid #000000;
477
+ border-bottom: 1px solid #000000;
478
+ }
479
+ </style>