safecheck-client 3.0.34-30 → 3.0.34-31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.vue +31 -31
- package/src/components/android/ImgSelfAndroid.vue +181 -181
- package/src/components/android/SafecheckDevices.vue +1298 -1298
- package/src/components/pc/DeviceChange.vue +1088 -1068
- package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
- package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
- package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
- package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
- package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
- package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
- package/src/filiale/baiyin/pc/PaperList.vue +790 -790
- package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
- package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
- package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
- package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
- package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -447
- package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1231 -1231
- package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
- package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2811 -2811
- package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -784
- package/src/filiale/jiaxian/android.js +14 -14
- package/src/filiale/jiaxian/pc.js +12 -12
- package/src/filiale/kelai/pc/CheckPlanAreaList.vue +476 -476
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
- package/src/filiale/weinan/android/SafecheckDevices.vue +1295 -1307
- package/src/filiale/weinan/android/SafecheckOrderV.vue +3335 -3345
- package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
- package/src/main.js +1 -1
@@ -1,485 +1,485 @@
|
|
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="安 检 员"
|
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">安 检 员</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="btnaaaa" style="float: right" class="button_search"
|
66
|
-
@click="$parent.$parent.exportexcel()"
|
67
|
-
v-el:cx>导出</button>
|
68
|
-
<button id="btnaaa" style="float: right" class="button_search"
|
69
|
-
@click="$parent.$parent.getGroupName1(),search(),$parent.$parent.getexportExcelField(),$parent.$parent.$parent.isdetail=false,$parent.$parent.listflag=false"
|
70
|
-
v-el:cx>查询</button>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
<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">
|
74
|
-
<label class="font_normal_body">起始时间</label>
|
75
|
-
<datepicker
|
76
|
-
:value.sync="$parent.$parent.f_check_start"
|
77
|
-
placeholder='起始时间' style="width:60%"
|
78
|
-
:disabled-days-of-week="[]"
|
79
|
-
:format="'yyyy-MM'"
|
80
|
-
:select-month="true"
|
81
|
-
:show-rest-button="reset">
|
82
|
-
</datepicker>
|
83
|
-
</div>
|
84
|
-
<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">
|
85
|
-
<label class="font_normal_body">结束时间</label>
|
86
|
-
<datepicker
|
87
|
-
:value.sync="$parent.$parent.f_check_end"
|
88
|
-
placeholder='结束时间' style="width:60%"
|
89
|
-
:disabled-days-of-week="[]"
|
90
|
-
:format="'yyyy-MM'"
|
91
|
-
:select-month="true"
|
92
|
-
:show-rest-button="reset">
|
93
|
-
</datepicker>
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
<div class="row">
|
97
|
-
<div class="col-sm-12">
|
98
|
-
<label class="control-label" style="color: #c7254e">汇 总 项</label>
|
99
|
-
<input type="checkbox" id="f_plan_month" value="f_plan_month" v-model="$parent.$parent.nameForSql"/>
|
100
|
-
<label for="f_plan_month">计划月份</label>
|
101
|
-
<input type="checkbox" id="f_no_checkplan" value="f_no_checkplan" v-model="$parent.$parent.nameForSql"/>
|
102
|
-
<label for="f_no_checkplan">计划类型</label>
|
103
|
-
<input type="checkbox" id="f_residential_area" value="f_residential_area" v-model="$parent.$parent.nameForSql"/>
|
104
|
-
<label for="f_residential_area">小区名称</label>
|
105
|
-
<input type="checkbox" id="f_plan_name" value="f_plan_name" v-model="$parent.$parent.nameForSql"/>
|
106
|
-
<label for="f_plan_name">计划名称</label>
|
107
|
-
<input type="checkbox" id="f_checker_name" value="f_checker_name" v-model="$parent.$parent.nameForSql"/>
|
108
|
-
<label for="f_checker_name">安检员</label>
|
109
|
-
<input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
|
110
|
-
<label for="f_checker_name">档案数量</label>
|
111
|
-
</div>
|
112
|
-
</div>
|
113
|
-
</div>
|
114
|
-
|
115
|
-
</criteria>
|
116
|
-
<data-grid id="excelid" :model="model" partial='list' class="list_area table_sy excelid" v-ref:grid>
|
117
|
-
<template partial='head'>
|
118
|
-
<tr>
|
119
|
-
<th>
|
120
|
-
<nobr>序号</nobr>
|
121
|
-
</th>
|
122
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')"><nobr>计划月份</nobr></th>
|
123
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')"><nobr>计划类型</nobr></th>
|
124
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')"><nobr>小区名称</nobr></th>
|
125
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
|
126
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')"><nobr>安检员</nobr></th>
|
127
|
-
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></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
|
-
<!--<th>-->
|
150
|
-
<!--<nobr>查看</nobr>-->
|
151
|
-
<!--</th>-->
|
152
|
-
</tr>
|
153
|
-
</template>
|
154
|
-
<template partial='body'>
|
155
|
-
<tr>
|
156
|
-
<td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
|
157
|
-
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>-->
|
158
|
-
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>-->
|
159
|
-
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>-->
|
160
|
-
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>-->
|
161
|
-
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.f_checker_name && row.f_checker_name.indexOf('*&')!=-1?'':row.f_checker_name}}</td>-->
|
162
|
-
<td style="text-align:center" :class="{'td-0':row.f_plan_month==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-4':model.rows && 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 && !row.f_checker_name,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_checker_name && row.f_checker_name.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.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_user_number')">{{row.f_user_number}}</td>
|
168
|
-
<td style="text-align:center">{{row.f_plan_total}}</td>
|
169
|
-
<td style="text-align:center">{{row.f_weijian}}</td>
|
170
|
-
<td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
|
171
|
-
<td style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
|
172
|
-
<td style="text-align:center">{{row.f_buyu}}</td>
|
173
|
-
<td style="text-align:center"><nobr>{{row.f_jujian}}</nobr></td>
|
174
|
-
<td style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
|
175
|
-
<!--<td style="text-align: center;">-->
|
176
|
-
<!--<button class="btn btn-link" @click.stop="$parent.$parent.$parent.showhistory(row)">查看</button>-->
|
177
|
-
<!--</td>-->
|
178
|
-
</tr>
|
179
|
-
</template>
|
180
|
-
<template partial='foot'></template>
|
181
|
-
</data-grid>
|
182
|
-
</criteria-paged>
|
183
|
-
</div>
|
184
|
-
</template>
|
185
|
-
|
186
|
-
<script>
|
187
|
-
/**
|
188
|
-
*阶梯气价查询列表
|
189
|
-
*/
|
190
|
-
import {PagedList} from 'vue-client'
|
191
|
-
import { HttpResetClass } from 'vue-client'
|
192
|
-
import * as Util from "../../Util";
|
193
|
-
import XLSX from 'xlsx'
|
194
|
-
export default {
|
195
|
-
data () {
|
196
|
-
return {
|
197
|
-
model: new PagedList('rs/sql/getCheckPlanAreaList', 99999),
|
198
|
-
// 公司下拉
|
199
|
-
curorgid: [this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)],
|
200
|
-
row: {},
|
201
|
-
f_orgid: '',
|
202
|
-
nameForSql: [],
|
203
|
-
groupNameForSql: '',
|
204
|
-
listflag:false,
|
205
|
-
nameflag:false,
|
206
|
-
criteriaShow: false,
|
207
|
-
f_check_start:new Date().getFullYear() + '-01',
|
208
|
-
f_check_end:new Date().getFullYear() + '-12',
|
209
|
-
planName:[{label: '全部', value: ''}],
|
210
|
-
exportExcelField: {
|
211
|
-
'f_weijian':'未检',
|
212
|
-
'f_yijian':'已检',
|
213
|
-
'f_ruhu':'入户',
|
214
|
-
'f_buyu':'到访不遇',
|
215
|
-
'f_jujian':'拒检',
|
216
|
-
'f_check_bv':'安检率'
|
217
|
-
}
|
218
|
-
}
|
219
|
-
},
|
220
|
-
props: {
|
221
|
-
row: {},
|
222
|
-
config: {},
|
223
|
-
ispartial: false,
|
224
|
-
f_filialeid: {
|
225
|
-
type: String
|
226
|
-
}
|
227
|
-
},
|
228
|
-
ready () {
|
229
|
-
this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name']
|
230
|
-
this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
|
231
|
-
this.pl()
|
232
|
-
// this.search()
|
233
|
-
|
234
|
-
},
|
235
|
-
methods: {
|
236
|
-
exportexcel(){
|
237
|
-
//tag
|
238
|
-
// 以上四行也可以直接一行搞定,如果不需要对表格数据进行修改的话
|
239
|
-
const aa = document.getElementsByClassName("list_area table_sy excelid")[0]
|
240
|
-
console.log(aa)
|
241
|
-
let workbook = XLSX.utils.table_to_book(document.getElementsByClassName("list_area table_sy excelid")[0])
|
242
|
-
try {
|
243
|
-
XLSX.writeFile(workbook, '安检情况汇总导出.xlsx');
|
244
|
-
} catch(e) {
|
245
|
-
//tag;
|
246
|
-
}
|
247
|
-
},
|
248
|
-
// 获取导出列
|
249
|
-
getexportExcelField(){
|
250
|
-
this.exportExcelField = {
|
251
|
-
'f_weijian':'未检',
|
252
|
-
'f_yijian':'已检',
|
253
|
-
'f_ruhu':'入户',
|
254
|
-
'f_buyu':'到访不遇',
|
255
|
-
'f_jujian':'拒检',
|
256
|
-
'f_check_bv':'安检率',
|
257
|
-
'f_plan_total':'计划总数'
|
258
|
-
}
|
259
|
-
let forName = this.groupNameForSql.split(",")
|
260
|
-
for (let i = 0; i < forName.length; i++) {
|
261
|
-
let ff = forName[i]
|
262
|
-
if (ff==='f_plan_month') {
|
263
|
-
this.exportExcelField.f_plan_month='计划月份'
|
264
|
-
}
|
265
|
-
if (ff==='f_no_checkplan') {
|
266
|
-
this.exportExcelField.f_no_checkplan='计划类型'
|
267
|
-
}
|
268
|
-
if (ff==='f_plan_name') {
|
269
|
-
this.exportExcelField.f_plan_name='计划名称'
|
270
|
-
}
|
271
|
-
if (ff==='f_checker_name') {
|
272
|
-
this.exportExcelField.f_checker_name='安检员'
|
273
|
-
}if (ff==='f_residential_area') {
|
274
|
-
this.exportExcelField.f_residential_area='小区名称'
|
275
|
-
}if (ff==='f_user_number') {
|
276
|
-
this.exportExcelField.f_user_number='档案数量'
|
277
|
-
}
|
278
|
-
}
|
279
|
-
},
|
280
|
-
pl() {
|
281
|
-
let getGasman = new HttpResetClass()
|
282
|
-
getGasman.load('POST', `rs/sql/safe_singleTable_OrderBy`, {
|
283
|
-
data: {
|
284
|
-
items: "id,f_plan_name",
|
285
|
-
tablename: "t_check_plan",
|
286
|
-
condition: `f_filialeid = '${this.curorgid}'`,
|
287
|
-
orderitem: "id"
|
288
|
-
}
|
289
|
-
}, {resolveMsg: null, rejectMsg: null}).then((plne) => {
|
290
|
-
//tag
|
291
|
-
//tag
|
292
|
-
//tag
|
293
|
-
for (let i = 0; i < plne.data.length; i++) {
|
294
|
-
this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
|
295
|
-
}
|
296
|
-
//tag
|
297
|
-
})
|
298
|
-
},
|
299
|
-
hiddenr() {
|
300
|
-
this.$parent.isdetail = !this.$parent.isdetail
|
301
|
-
},
|
302
|
-
hidden() {
|
303
|
-
this.criteriaShow = !this.criteriaShow
|
304
|
-
},
|
305
|
-
search () {
|
306
|
-
this.$refs.paged.$refs.cri.search()
|
307
|
-
this.$dispatch('search')
|
308
|
-
},
|
309
|
-
getorg (val) {
|
310
|
-
this.f_orgid = this.$login.convertToIn(val.resids)
|
311
|
-
this.f_filialeid = val[0]
|
312
|
-
|
313
|
-
},
|
314
|
-
selfSearch (args) {
|
315
|
-
if (!this.f_orgid) {
|
316
|
-
this.getorg([this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)])
|
317
|
-
args.condition = `f_filialeid in ('${this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)}') and ${args.condition}`
|
318
|
-
}
|
319
|
-
if (this.f_orgid) {
|
320
|
-
args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
|
321
|
-
}
|
322
|
-
if(this.f_check_start && this.f_check_end){
|
323
|
-
if(new Date(this.f_check_start).getFullYear() == new Date(this.f_check_end).getFullYear() ){
|
324
|
-
args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
|
325
|
-
}else {
|
326
|
-
args.condition += ` and (
|
327
|
-
(f_year = ${new Date(this.f_check_start).getFullYear()} and f_month >= ${new Date(this.f_check_start).getMonth()+1})
|
328
|
-
or
|
329
|
-
( f_year > ${new Date(this.f_check_start).getFullYear()} and f_year < ${new Date(this.f_check_end).getFullYear()})
|
330
|
-
or
|
331
|
-
(f_year = ${new Date(this.f_check_end).getFullYear()} and f_month <= ${new Date(this.f_check_end).getMonth()+1}))`
|
332
|
-
}
|
333
|
-
} else {
|
334
|
-
if(this.f_check_start){
|
335
|
-
args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1}`
|
336
|
-
}
|
337
|
-
if(this.f_check_end){
|
338
|
-
args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
|
339
|
-
}
|
340
|
-
}
|
341
|
-
this.$refs.paged.$refs.grid.$el.scrollTop = 0
|
342
|
-
if (this.groupNameForSql=='undefined'){
|
343
|
-
//tag
|
344
|
-
this.$showMessage("请至少选择一项进行汇总")
|
345
|
-
return
|
346
|
-
}
|
347
|
-
this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
|
348
|
-
this.model.search(args.condition, args.model)
|
349
|
-
},
|
350
|
-
|
351
|
-
// 拼接groupName1
|
352
|
-
getGroupName1 () {
|
353
|
-
var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
|
354
|
-
var newtemp=[]
|
355
|
-
|
356
|
-
for (var i=0;i<temp.length;i++){
|
357
|
-
for (var j=0;j<this.nameForSql.length;j++){
|
358
|
-
//tag
|
359
|
-
if(temp[i]==this.nameForSql[j]){
|
360
|
-
newtemp.push(this.nameForSql[j])
|
361
|
-
}
|
362
|
-
}
|
363
|
-
}
|
364
|
-
let str = ''
|
365
|
-
|
366
|
-
for (var i=0;i < newtemp.length - 1; i++) {
|
367
|
-
str += newtemp[i] + ','
|
368
|
-
}
|
369
|
-
str += newtemp[i]
|
370
|
-
this.groupNameForSql = str.trim()
|
371
|
-
}
|
372
|
-
},
|
373
|
-
watch: {
|
374
|
-
// 'nameForSql' () {
|
375
|
-
//
|
376
|
-
// this.getGroupName1()
|
377
|
-
// },
|
378
|
-
'nameForSql' () {
|
379
|
-
var e = document.createEvent("MouseEvents");
|
380
|
-
e.initEvent("click", true, true);
|
381
|
-
document.getElementById("btnaaa").dispatchEvent(e);
|
382
|
-
},
|
383
|
-
'model.rows'(){
|
384
|
-
//tag
|
385
|
-
if(this.listflag){
|
386
|
-
return;
|
387
|
-
}
|
388
|
-
this.listflag=true
|
389
|
-
//tag
|
390
|
-
var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
|
391
|
-
var newtemp=[]
|
392
|
-
for (var i=0;i<temp.length;i++){
|
393
|
-
for (var j=0;j<this.nameForSql.length;j++){
|
394
|
-
//tag
|
395
|
-
if(temp[i]==this.nameForSql[j]){
|
396
|
-
newtemp.push(this.nameForSql[j])
|
397
|
-
}
|
398
|
-
}
|
399
|
-
}
|
400
|
-
if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
|
401
|
-
return
|
402
|
-
}
|
403
|
-
var temp=JSON.parse(JSON.stringify(this.model.rows))
|
404
|
-
|
405
|
-
//遍历查询结果 为指定列增加样式
|
406
|
-
for (var i=0;i<newtemp.length-1;i++){
|
407
|
-
if(newtemp[i]=='f_user_number'){
|
408
|
-
return;
|
409
|
-
}
|
410
|
-
//tag
|
411
|
-
var ss=''
|
412
|
-
for (var j=0;j<temp.length;j++){
|
413
|
-
if(j>0&&i>0){
|
414
|
-
var flag=false
|
415
|
-
for(var t=i-1;t>-1;t--){
|
416
|
-
//tag
|
417
|
-
//tag
|
418
|
-
//tag
|
419
|
-
//tag
|
420
|
-
if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&(temp[j][newtemp[t]] !=null && temp[j][newtemp[t]].indexOf('*&') )==-1){
|
421
|
-
flag=true
|
422
|
-
break
|
423
|
-
}
|
424
|
-
}
|
425
|
-
//tag
|
426
|
-
if(flag){
|
427
|
-
ss=temp[j][newtemp[i]]
|
428
|
-
continue
|
429
|
-
}
|
430
|
-
}
|
431
|
-
if(temp[j][newtemp[i]]==ss){
|
432
|
-
temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
|
433
|
-
}else {
|
434
|
-
ss=temp[j][newtemp[i]]
|
435
|
-
}
|
436
|
-
}
|
437
|
-
}
|
438
|
-
//tag
|
439
|
-
this.model.rows=JSON.parse(JSON.stringify(temp))
|
440
|
-
}
|
441
|
-
},
|
442
|
-
computed:{
|
443
|
-
exportParameter(){
|
444
|
-
// excel 导出条件拼接
|
445
|
-
return {
|
446
|
-
condition: this.$refs.paged.model.condition,
|
447
|
-
groupName: this.groupNameForSql
|
448
|
-
}
|
449
|
-
}
|
450
|
-
}
|
451
|
-
}
|
452
|
-
</script>
|
453
|
-
|
454
|
-
<style scoped>
|
455
|
-
|
456
|
-
.td-0{
|
457
|
-
border: 1px solid #000000;
|
458
|
-
}
|
459
|
-
|
460
|
-
.td-1{
|
461
|
-
border: none;
|
462
|
-
border-top: 1px solid #000000;
|
463
|
-
border-left: 1px solid #000000;
|
464
|
-
border-right: 1px solid #000000;
|
465
|
-
}
|
466
|
-
|
467
|
-
.td-2{
|
468
|
-
border: none;
|
469
|
-
border-left: 1px solid #000000;
|
470
|
-
border-right: 1px solid #000000;
|
471
|
-
}
|
472
|
-
.td-4{
|
473
|
-
border: none;
|
474
|
-
border-top: 1px solid #000000;
|
475
|
-
border-left: 1px solid #000000;
|
476
|
-
border-right: 1px solid #000000;
|
477
|
-
border-bottom: 1px solid #000000;
|
478
|
-
}
|
479
|
-
.td-3{
|
480
|
-
border: none;
|
481
|
-
border-left: 1px solid #000000;
|
482
|
-
border-right: 1px solid #000000;
|
483
|
-
border-bottom: 1px solid #000000;
|
484
|
-
}
|
485
|
-
</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="安 检 员"
|
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">安 检 员</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="btnaaaa" style="float: right" class="button_search"
|
66
|
+
@click="$parent.$parent.exportexcel()"
|
67
|
+
v-el:cx>导出</button>
|
68
|
+
<button id="btnaaa" style="float: right" class="button_search"
|
69
|
+
@click="$parent.$parent.getGroupName1(),search(),$parent.$parent.getexportExcelField(),$parent.$parent.$parent.isdetail=false,$parent.$parent.listflag=false"
|
70
|
+
v-el:cx>查询</button>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
<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">
|
74
|
+
<label class="font_normal_body">起始时间</label>
|
75
|
+
<datepicker
|
76
|
+
:value.sync="$parent.$parent.f_check_start"
|
77
|
+
placeholder='起始时间' style="width:60%"
|
78
|
+
:disabled-days-of-week="[]"
|
79
|
+
:format="'yyyy-MM'"
|
80
|
+
:select-month="true"
|
81
|
+
:show-rest-button="reset">
|
82
|
+
</datepicker>
|
83
|
+
</div>
|
84
|
+
<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">
|
85
|
+
<label class="font_normal_body">结束时间</label>
|
86
|
+
<datepicker
|
87
|
+
:value.sync="$parent.$parent.f_check_end"
|
88
|
+
placeholder='结束时间' style="width:60%"
|
89
|
+
:disabled-days-of-week="[]"
|
90
|
+
:format="'yyyy-MM'"
|
91
|
+
:select-month="true"
|
92
|
+
:show-rest-button="reset">
|
93
|
+
</datepicker>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="row">
|
97
|
+
<div class="col-sm-12">
|
98
|
+
<label class="control-label" style="color: #c7254e">汇 总 项</label>
|
99
|
+
<input type="checkbox" id="f_plan_month" value="f_plan_month" v-model="$parent.$parent.nameForSql"/>
|
100
|
+
<label for="f_plan_month">计划月份</label>
|
101
|
+
<input type="checkbox" id="f_no_checkplan" value="f_no_checkplan" v-model="$parent.$parent.nameForSql"/>
|
102
|
+
<label for="f_no_checkplan">计划类型</label>
|
103
|
+
<input type="checkbox" id="f_residential_area" value="f_residential_area" v-model="$parent.$parent.nameForSql"/>
|
104
|
+
<label for="f_residential_area">小区名称</label>
|
105
|
+
<input type="checkbox" id="f_plan_name" value="f_plan_name" v-model="$parent.$parent.nameForSql"/>
|
106
|
+
<label for="f_plan_name">计划名称</label>
|
107
|
+
<input type="checkbox" id="f_checker_name" value="f_checker_name" v-model="$parent.$parent.nameForSql"/>
|
108
|
+
<label for="f_checker_name">安检员</label>
|
109
|
+
<input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
|
110
|
+
<label for="f_checker_name">档案数量</label>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</criteria>
|
116
|
+
<data-grid id="excelid" :model="model" partial='list' class="list_area table_sy excelid" v-ref:grid>
|
117
|
+
<template partial='head'>
|
118
|
+
<tr>
|
119
|
+
<th>
|
120
|
+
<nobr>序号</nobr>
|
121
|
+
</th>
|
122
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')"><nobr>计划月份</nobr></th>
|
123
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')"><nobr>计划类型</nobr></th>
|
124
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')"><nobr>小区名称</nobr></th>
|
125
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
|
126
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')"><nobr>安检员</nobr></th>
|
127
|
+
<th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></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
|
+
<!--<th>-->
|
150
|
+
<!--<nobr>查看</nobr>-->
|
151
|
+
<!--</th>-->
|
152
|
+
</tr>
|
153
|
+
</template>
|
154
|
+
<template partial='body'>
|
155
|
+
<tr>
|
156
|
+
<td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
|
157
|
+
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_month')">{{row.f_plan_month.indexOf('*&')!=-1?'':row.f_plan_month}}</td>-->
|
158
|
+
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_no_checkplan')">{{row.f_no_checkplan.indexOf('*&')!=-1?'':row.f_no_checkplan}}</td>-->
|
159
|
+
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_residential_area')">{{row.f_residential_area.indexOf('*&')!=-1?'':row.f_residential_area}}</td>-->
|
160
|
+
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')">{{row.f_plan_name.indexOf('*&')!=-1?'':row.f_plan_name}}</td>-->
|
161
|
+
<!-- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.f_checker_name && row.f_checker_name.indexOf('*&')!=-1?'':row.f_checker_name}}</td>-->
|
162
|
+
<td style="text-align:center" :class="{'td-0':row.f_plan_month==undefined,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_month.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_no_checkplan.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_residential_area.indexOf('*&')!=-1,'td-4':model.rows && 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 && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_plan_name.indexOf('*&')!=-1,'td-4':model.rows && 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 && !row.f_checker_name,'td-1':model.rows && model.rows.length!=($index+1)&&row.f_checker_name && row.f_checker_name.indexOf('*&')==-1,'td-2':model.rows && model.rows.length!=($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')!=-1,'td-3':model.rows && model.rows.length==($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')!=-1,'td-4':model.rows && model.rows.length==($index+1)&&row.f_checker_name &&row.f_checker_name.indexOf('*&')==-1}" v-if="$parent.$parent.$parent.nameForSql && $parent.$parent.$parent.nameForSql.includes('f_checker_name')">{{row.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_user_number')">{{row.f_user_number}}</td>
|
168
|
+
<td style="text-align:center">{{row.f_plan_total}}</td>
|
169
|
+
<td style="text-align:center">{{row.f_weijian}}</td>
|
170
|
+
<td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
|
171
|
+
<td style="text-align:center"><nobr>{{row.f_ruhu}}</nobr></td>
|
172
|
+
<td style="text-align:center">{{row.f_buyu}}</td>
|
173
|
+
<td style="text-align:center"><nobr>{{row.f_jujian}}</nobr></td>
|
174
|
+
<td style="text-align:center"><nobr>{{row.f_check_bv}}</nobr></td>
|
175
|
+
<!--<td style="text-align: center;">-->
|
176
|
+
<!--<button class="btn btn-link" @click.stop="$parent.$parent.$parent.showhistory(row)">查看</button>-->
|
177
|
+
<!--</td>-->
|
178
|
+
</tr>
|
179
|
+
</template>
|
180
|
+
<template partial='foot'></template>
|
181
|
+
</data-grid>
|
182
|
+
</criteria-paged>
|
183
|
+
</div>
|
184
|
+
</template>
|
185
|
+
|
186
|
+
<script>
|
187
|
+
/**
|
188
|
+
*阶梯气价查询列表
|
189
|
+
*/
|
190
|
+
import {PagedList} from 'vue-client'
|
191
|
+
import { HttpResetClass } from 'vue-client'
|
192
|
+
import * as Util from "../../Util";
|
193
|
+
import XLSX from 'xlsx'
|
194
|
+
export default {
|
195
|
+
data () {
|
196
|
+
return {
|
197
|
+
model: new PagedList('rs/sql/getCheckPlanAreaList', 99999),
|
198
|
+
// 公司下拉
|
199
|
+
curorgid: [this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)],
|
200
|
+
row: {},
|
201
|
+
f_orgid: '',
|
202
|
+
nameForSql: [],
|
203
|
+
groupNameForSql: '',
|
204
|
+
listflag:false,
|
205
|
+
nameflag:false,
|
206
|
+
criteriaShow: false,
|
207
|
+
f_check_start:new Date().getFullYear() + '-01',
|
208
|
+
f_check_end:new Date().getFullYear() + '-12',
|
209
|
+
planName:[{label: '全部', value: ''}],
|
210
|
+
exportExcelField: {
|
211
|
+
'f_weijian':'未检',
|
212
|
+
'f_yijian':'已检',
|
213
|
+
'f_ruhu':'入户',
|
214
|
+
'f_buyu':'到访不遇',
|
215
|
+
'f_jujian':'拒检',
|
216
|
+
'f_check_bv':'安检率'
|
217
|
+
}
|
218
|
+
}
|
219
|
+
},
|
220
|
+
props: {
|
221
|
+
row: {},
|
222
|
+
config: {},
|
223
|
+
ispartial: false,
|
224
|
+
f_filialeid: {
|
225
|
+
type: String
|
226
|
+
}
|
227
|
+
},
|
228
|
+
ready () {
|
229
|
+
this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name']
|
230
|
+
this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
|
231
|
+
this.pl()
|
232
|
+
// this.search()
|
233
|
+
|
234
|
+
},
|
235
|
+
methods: {
|
236
|
+
exportexcel(){
|
237
|
+
//tag
|
238
|
+
// 以上四行也可以直接一行搞定,如果不需要对表格数据进行修改的话
|
239
|
+
const aa = document.getElementsByClassName("list_area table_sy excelid")[0]
|
240
|
+
console.log(aa)
|
241
|
+
let workbook = XLSX.utils.table_to_book(document.getElementsByClassName("list_area table_sy excelid")[0])
|
242
|
+
try {
|
243
|
+
XLSX.writeFile(workbook, '安检情况汇总导出.xlsx');
|
244
|
+
} catch(e) {
|
245
|
+
//tag;
|
246
|
+
}
|
247
|
+
},
|
248
|
+
// 获取导出列
|
249
|
+
getexportExcelField(){
|
250
|
+
this.exportExcelField = {
|
251
|
+
'f_weijian':'未检',
|
252
|
+
'f_yijian':'已检',
|
253
|
+
'f_ruhu':'入户',
|
254
|
+
'f_buyu':'到访不遇',
|
255
|
+
'f_jujian':'拒检',
|
256
|
+
'f_check_bv':'安检率',
|
257
|
+
'f_plan_total':'计划总数'
|
258
|
+
}
|
259
|
+
let forName = this.groupNameForSql.split(",")
|
260
|
+
for (let i = 0; i < forName.length; i++) {
|
261
|
+
let ff = forName[i]
|
262
|
+
if (ff==='f_plan_month') {
|
263
|
+
this.exportExcelField.f_plan_month='计划月份'
|
264
|
+
}
|
265
|
+
if (ff==='f_no_checkplan') {
|
266
|
+
this.exportExcelField.f_no_checkplan='计划类型'
|
267
|
+
}
|
268
|
+
if (ff==='f_plan_name') {
|
269
|
+
this.exportExcelField.f_plan_name='计划名称'
|
270
|
+
}
|
271
|
+
if (ff==='f_checker_name') {
|
272
|
+
this.exportExcelField.f_checker_name='安检员'
|
273
|
+
}if (ff==='f_residential_area') {
|
274
|
+
this.exportExcelField.f_residential_area='小区名称'
|
275
|
+
}if (ff==='f_user_number') {
|
276
|
+
this.exportExcelField.f_user_number='档案数量'
|
277
|
+
}
|
278
|
+
}
|
279
|
+
},
|
280
|
+
pl() {
|
281
|
+
let getGasman = new HttpResetClass()
|
282
|
+
getGasman.load('POST', `rs/sql/safe_singleTable_OrderBy`, {
|
283
|
+
data: {
|
284
|
+
items: "id,f_plan_name",
|
285
|
+
tablename: "t_check_plan",
|
286
|
+
condition: `f_filialeid = '${this.curorgid}'`,
|
287
|
+
orderitem: "id"
|
288
|
+
}
|
289
|
+
}, {resolveMsg: null, rejectMsg: null}).then((plne) => {
|
290
|
+
//tag
|
291
|
+
//tag
|
292
|
+
//tag
|
293
|
+
for (let i = 0; i < plne.data.length; i++) {
|
294
|
+
this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
|
295
|
+
}
|
296
|
+
//tag
|
297
|
+
})
|
298
|
+
},
|
299
|
+
hiddenr() {
|
300
|
+
this.$parent.isdetail = !this.$parent.isdetail
|
301
|
+
},
|
302
|
+
hidden() {
|
303
|
+
this.criteriaShow = !this.criteriaShow
|
304
|
+
},
|
305
|
+
search () {
|
306
|
+
this.$refs.paged.$refs.cri.search()
|
307
|
+
this.$dispatch('search')
|
308
|
+
},
|
309
|
+
getorg (val) {
|
310
|
+
this.f_orgid = this.$login.convertToIn(val.resids)
|
311
|
+
this.f_filialeid = val[0]
|
312
|
+
|
313
|
+
},
|
314
|
+
selfSearch (args) {
|
315
|
+
if (!this.f_orgid) {
|
316
|
+
this.getorg([this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)])
|
317
|
+
args.condition = `f_filialeid in ('${this.$login.f.f_orgids.substring(0,this.$login.f.f_orgids.length-1)}') and ${args.condition}`
|
318
|
+
}
|
319
|
+
if (this.f_orgid) {
|
320
|
+
args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
|
321
|
+
}
|
322
|
+
if(this.f_check_start && this.f_check_end){
|
323
|
+
if(new Date(this.f_check_start).getFullYear() == new Date(this.f_check_end).getFullYear() ){
|
324
|
+
args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
|
325
|
+
}else {
|
326
|
+
args.condition += ` and (
|
327
|
+
(f_year = ${new Date(this.f_check_start).getFullYear()} and f_month >= ${new Date(this.f_check_start).getMonth()+1})
|
328
|
+
or
|
329
|
+
( f_year > ${new Date(this.f_check_start).getFullYear()} and f_year < ${new Date(this.f_check_end).getFullYear()})
|
330
|
+
or
|
331
|
+
(f_year = ${new Date(this.f_check_end).getFullYear()} and f_month <= ${new Date(this.f_check_end).getMonth()+1}))`
|
332
|
+
}
|
333
|
+
} else {
|
334
|
+
if(this.f_check_start){
|
335
|
+
args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1}`
|
336
|
+
}
|
337
|
+
if(this.f_check_end){
|
338
|
+
args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
|
339
|
+
}
|
340
|
+
}
|
341
|
+
this.$refs.paged.$refs.grid.$el.scrollTop = 0
|
342
|
+
if (this.groupNameForSql=='undefined'){
|
343
|
+
//tag
|
344
|
+
this.$showMessage("请至少选择一项进行汇总")
|
345
|
+
return
|
346
|
+
}
|
347
|
+
this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
|
348
|
+
this.model.search(args.condition, args.model)
|
349
|
+
},
|
350
|
+
|
351
|
+
// 拼接groupName1
|
352
|
+
getGroupName1 () {
|
353
|
+
var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
|
354
|
+
var newtemp=[]
|
355
|
+
|
356
|
+
for (var i=0;i<temp.length;i++){
|
357
|
+
for (var j=0;j<this.nameForSql.length;j++){
|
358
|
+
//tag
|
359
|
+
if(temp[i]==this.nameForSql[j]){
|
360
|
+
newtemp.push(this.nameForSql[j])
|
361
|
+
}
|
362
|
+
}
|
363
|
+
}
|
364
|
+
let str = ''
|
365
|
+
|
366
|
+
for (var i=0;i < newtemp.length - 1; i++) {
|
367
|
+
str += newtemp[i] + ','
|
368
|
+
}
|
369
|
+
str += newtemp[i]
|
370
|
+
this.groupNameForSql = str.trim()
|
371
|
+
}
|
372
|
+
},
|
373
|
+
watch: {
|
374
|
+
// 'nameForSql' () {
|
375
|
+
//
|
376
|
+
// this.getGroupName1()
|
377
|
+
// },
|
378
|
+
'nameForSql' () {
|
379
|
+
var e = document.createEvent("MouseEvents");
|
380
|
+
e.initEvent("click", true, true);
|
381
|
+
document.getElementById("btnaaa").dispatchEvent(e);
|
382
|
+
},
|
383
|
+
'model.rows'(){
|
384
|
+
//tag
|
385
|
+
if(this.listflag){
|
386
|
+
return;
|
387
|
+
}
|
388
|
+
this.listflag=true
|
389
|
+
//tag
|
390
|
+
var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
|
391
|
+
var newtemp=[]
|
392
|
+
for (var i=0;i<temp.length;i++){
|
393
|
+
for (var j=0;j<this.nameForSql.length;j++){
|
394
|
+
//tag
|
395
|
+
if(temp[i]==this.nameForSql[j]){
|
396
|
+
newtemp.push(this.nameForSql[j])
|
397
|
+
}
|
398
|
+
}
|
399
|
+
}
|
400
|
+
if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
|
401
|
+
return
|
402
|
+
}
|
403
|
+
var temp=JSON.parse(JSON.stringify(this.model.rows))
|
404
|
+
|
405
|
+
//遍历查询结果 为指定列增加样式
|
406
|
+
for (var i=0;i<newtemp.length-1;i++){
|
407
|
+
if(newtemp[i]=='f_user_number'){
|
408
|
+
return;
|
409
|
+
}
|
410
|
+
//tag
|
411
|
+
var ss=''
|
412
|
+
for (var j=0;j<temp.length;j++){
|
413
|
+
if(j>0&&i>0){
|
414
|
+
var flag=false
|
415
|
+
for(var t=i-1;t>-1;t--){
|
416
|
+
//tag
|
417
|
+
//tag
|
418
|
+
//tag
|
419
|
+
//tag
|
420
|
+
if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&(temp[j][newtemp[t]] !=null && temp[j][newtemp[t]].indexOf('*&') )==-1){
|
421
|
+
flag=true
|
422
|
+
break
|
423
|
+
}
|
424
|
+
}
|
425
|
+
//tag
|
426
|
+
if(flag){
|
427
|
+
ss=temp[j][newtemp[i]]
|
428
|
+
continue
|
429
|
+
}
|
430
|
+
}
|
431
|
+
if(temp[j][newtemp[i]]==ss){
|
432
|
+
temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
|
433
|
+
}else {
|
434
|
+
ss=temp[j][newtemp[i]]
|
435
|
+
}
|
436
|
+
}
|
437
|
+
}
|
438
|
+
//tag
|
439
|
+
this.model.rows=JSON.parse(JSON.stringify(temp))
|
440
|
+
}
|
441
|
+
},
|
442
|
+
computed:{
|
443
|
+
exportParameter(){
|
444
|
+
// excel 导出条件拼接
|
445
|
+
return {
|
446
|
+
condition: this.$refs.paged.model.condition,
|
447
|
+
groupName: this.groupNameForSql
|
448
|
+
}
|
449
|
+
}
|
450
|
+
}
|
451
|
+
}
|
452
|
+
</script>
|
453
|
+
|
454
|
+
<style scoped>
|
455
|
+
|
456
|
+
.td-0{
|
457
|
+
border: 1px solid #000000;
|
458
|
+
}
|
459
|
+
|
460
|
+
.td-1{
|
461
|
+
border: none;
|
462
|
+
border-top: 1px solid #000000;
|
463
|
+
border-left: 1px solid #000000;
|
464
|
+
border-right: 1px solid #000000;
|
465
|
+
}
|
466
|
+
|
467
|
+
.td-2{
|
468
|
+
border: none;
|
469
|
+
border-left: 1px solid #000000;
|
470
|
+
border-right: 1px solid #000000;
|
471
|
+
}
|
472
|
+
.td-4{
|
473
|
+
border: none;
|
474
|
+
border-top: 1px solid #000000;
|
475
|
+
border-left: 1px solid #000000;
|
476
|
+
border-right: 1px solid #000000;
|
477
|
+
border-bottom: 1px solid #000000;
|
478
|
+
}
|
479
|
+
.td-3{
|
480
|
+
border: none;
|
481
|
+
border-left: 1px solid #000000;
|
482
|
+
border-right: 1px solid #000000;
|
483
|
+
border-bottom: 1px solid #000000;
|
484
|
+
}
|
485
|
+
</style>
|