safecheck-client 4.0.0-66 → 4.0.0-68

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.
@@ -57,11 +57,11 @@
57
57
  :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
58
58
  @click="$parent.$parent.hidden()">
59
59
  </div>
60
- <!-- <export-excel :data="$parent.$parent.exportParameter"
61
- :field="$parent.$parent.exportExcelField"
62
- sqlurl="api/af-safecheck/logic/exportfile" sql-name="getCheckPlanAreaList"
63
- template-name='安检汇总' :choose-col="true">
64
- </export-excel>-->
60
+ <!-- <export-excel :data="$parent.$parent.exportParameter"
61
+ :field="$parent.$parent.exportExcelField"
62
+ sqlurl="api/af-safecheck/logic/exportfile" sql-name="getCheckPlanAreaList"
63
+ template-name='安检汇总' :choose-col="true">
64
+ </export-excel>-->
65
65
  <button id="btnaaaa" style="float: right" class="button_search"
66
66
  @click="$parent.$parent.exportexcel()"
67
67
  v-el:cx>导出</button>
@@ -107,9 +107,7 @@
107
107
  <input type="checkbox" id="f_checker_name" value="f_checker_name" v-model="$parent.$parent.nameForSql"/>
108
108
  <label for="f_checker_name">安检员</label>
109
109
  <input type="checkbox" id="f_user_number" value="f_user_number" v-model="$parent.$parent.nameForSql"/>
110
- <label for="f_user_number">档案数量</label>
111
- <input type="checkbox" id="f_issue_time" value="f_issue_time" v-model="$parent.$parent.nameForSql"/>
112
- <label for="f_issue_time">下发时间</label>
110
+ <label for="f_checker_name">档案数量</label>
113
111
  </div>
114
112
  </div>
115
113
  </div>
@@ -127,7 +125,6 @@
127
125
  <th v-if="$parent.$parent.$parent.nameForSql.includes('f_plan_name')"><nobr>计划名称</nobr></th>
128
126
  <th v-if="$parent.$parent.$parent.nameForSql.includes('f_checker_name')"><nobr>安检员</nobr></th>
129
127
  <th v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')"><nobr>档案数量</nobr></th>
130
- <th v-if="$parent.$parent.$parent.nameForSql.includes('f_issue_time')"><nobr>下发时间</nobr></th>
131
128
  <th>
132
129
  <nobr>计划总数</nobr>
133
130
  </th>
@@ -157,18 +154,17 @@
157
154
  <template partial='body'>
158
155
  <tr>
159
156
  <td style="text-align:center;border-right: 1px solid ">{{$index + 1}}</td>
160
- <!-- <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>-->
161
- <!-- <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>-->
162
- <!-- <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>-->
163
- <!-- <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>-->
164
- <!-- <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>-->
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>-->
165
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>
166
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>
167
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>
168
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>
169
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>
170
167
  <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_user_number')">{{row.f_user_number}}</td>
171
- <td style="text-align:center" v-if="$parent.$parent.$parent.nameForSql.includes('f_issue_time')">{{row.f_issue_time}}</td>
172
168
  <td style="text-align:center">{{row.f_plan_total}}</td>
173
169
  <td style="text-align:center">{{row.f_weijian}}</td>
174
170
  <td style="text-align:center"><nobr>{{row.f_yijian}}</nobr></td>
@@ -197,262 +193,260 @@
197
193
  </template>
198
194
 
199
195
  <script>
200
- /**
201
- *阶梯气价查询列表
202
- */
203
- import {PagedList} from 'vue-client'
204
- import { HttpResetClass } from 'vue-client'
205
- import * as Util from "../Util";
206
- import XLSX from 'xlsx'
207
- export default {
208
- data () {
209
- return {
210
- model: new PagedList('api/af-safecheck/sql/getCheckPlanAreaList', 99999,{},{f_plan_total:'',f_weijian:'',f_yijian:'',f_ruhu:'',f_buyu:'',f_jujian:''}),
211
- // 公司下拉
212
- curorgid: [this.$login.f.orgid],
213
- row: {},
214
- f_orgid: '',
215
- nameForSql: [],
216
- groupNameForSql: '',
217
- listflag:false,
218
- nameflag:false,
219
- criteriaShow: false,
220
- f_check_start:new Date().getFullYear() + '-01',
221
- f_check_end:new Date().getFullYear() + '-12',
222
- planName:[{label: '全部', value: ''}],
223
- exportExcelField: {
224
- 'f_weijian':'未检',
225
- 'f_yijian':'已检',
226
- 'f_ruhu':'入户',
227
- 'f_buyu':'到访不遇',
228
- 'f_jujian':'拒检',
229
- 'f_check_bv':'安检率'
230
- }
231
- }
232
- },
233
- props: {
196
+ /**
197
+ *阶梯气价查询列表
198
+ */
199
+ import {PagedList} from 'vue-client'
200
+ import { HttpResetClass } from 'vue-client'
201
+ import * as Util from "../Util";
202
+ import XLSX from 'xlsx'
203
+ export default {
204
+ data () {
205
+ return {
206
+ model: new PagedList('api/af-safecheck/sql/getCheckPlanAreaList', 99999,{},{f_plan_total:'',f_weijian:'',f_yijian:'',f_ruhu:'',f_buyu:'',f_jujian:''}),
207
+ // 公司下拉
208
+ curorgid: [this.$login.f.orgid],
234
209
  row: {},
235
- config: {},
236
- ispartial: false,
237
- f_filialeid: {
238
- type: String
210
+ f_orgid: '',
211
+ nameForSql: [],
212
+ groupNameForSql: '',
213
+ listflag:false,
214
+ nameflag:false,
215
+ criteriaShow: false,
216
+ f_check_start:new Date().getFullYear() + '-01',
217
+ f_check_end:new Date().getFullYear() + '-12',
218
+ planName:[{label: '全部', value: ''}],
219
+ exportExcelField: {
220
+ 'f_weijian':'未检',
221
+ 'f_yijian':'已检',
222
+ 'f_ruhu':'入户',
223
+ 'f_buyu':'到访不遇',
224
+ 'f_jujian':'拒检',
225
+ 'f_check_bv':'安检率'
239
226
  }
240
- },
241
- ready () {
242
- this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name', 'f_issue_time']
243
- this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
244
- this.pl()
245
- // this.search()
227
+ }
228
+ },
229
+ props: {
230
+ row: {},
231
+ config: {},
232
+ ispartial: false,
233
+ f_filialeid: {
234
+ type: String
235
+ }
236
+ },
237
+ ready () {
238
+ this.nameForSql = ['f_plan_month', 'f_plan_name','f_checker_name']
239
+ this.groupNameForSql = 'f_plan_month', 'f_plan_name','f_checker_name'
240
+ this.pl()
241
+ // this.search()
246
242
 
247
- },
248
- methods: {
249
- exportexcel(){
250
- //tag
243
+ },
244
+ methods: {
245
+ exportexcel(){
246
+ //tag
251
247
  // 以上四行也可以直接一行搞定,如果不需要对表格数据进行修改的话
252
- const aa = document.getElementsByClassName("list_area table_sy excelid")[0]
253
- console.log(aa)
254
- let workbook = XLSX.utils.table_to_book(document.getElementsByClassName("list_area table_sy excelid")[0])
255
- try {
256
- XLSX.writeFile(workbook, '安检情况汇总导出.xlsx');
257
- } catch(e) {
258
- //tag;
248
+ const aa = document.getElementsByClassName("list_area table_sy excelid")[0]
249
+ console.log(aa)
250
+ let workbook = XLSX.utils.table_to_book(document.getElementsByClassName("list_area table_sy excelid")[0])
251
+ try {
252
+ XLSX.writeFile(workbook, '安检情况汇总导出.xlsx');
253
+ } catch(e) {
254
+ //tag;
255
+ }
256
+ },
257
+ // 获取导出列
258
+ getexportExcelField(){
259
+ this.exportExcelField = {
260
+ 'f_weijian':'未检',
261
+ 'f_yijian':'已检',
262
+ 'f_ruhu':'入户',
263
+ 'f_buyu':'到访不遇',
264
+ 'f_jujian':'拒检',
265
+ 'f_check_bv':'安检率',
266
+ 'f_plan_total':'计划总数'
267
+ }
268
+ let forName = this.groupNameForSql.split(",")
269
+ for (let i = 0; i < forName.length; i++) {
270
+ let ff = forName[i]
271
+ if (ff==='f_plan_month') {
272
+ this.exportExcelField.f_plan_month='计划月份'
259
273
  }
260
- },
261
- // 获取导出列
262
- getexportExcelField(){
263
- this.exportExcelField = {
264
- 'f_weijian':'未检',
265
- 'f_yijian':'已检',
266
- 'f_ruhu':'入户',
267
- 'f_buyu':'到访不遇',
268
- 'f_jujian':'拒检',
269
- 'f_check_bv':'安检率',
270
- 'f_plan_total':'计划总数'
274
+ if (ff==='f_no_checkplan') {
275
+ this.exportExcelField.f_no_checkplan='计划类型'
271
276
  }
272
- let forName = this.groupNameForSql.split(",")
273
- for (let i = 0; i < forName.length; i++) {
274
- let ff = forName[i]
275
- if (ff==='f_plan_month') {
276
- this.exportExcelField.f_plan_month='计划月份'
277
- }
278
- if (ff==='f_no_checkplan') {
279
- this.exportExcelField.f_no_checkplan='计划类型'
280
- }
281
- if (ff==='f_plan_name') {
282
- this.exportExcelField.f_plan_name='计划名称'
283
- }
284
- if (ff==='f_checker_name') {
285
- this.exportExcelField.f_checker_name='安检员'
286
- }if (ff==='f_residential_area') {
287
- this.exportExcelField.f_residential_area='小区名称'
288
- }if (ff==='f_user_number') {
289
- this.exportExcelField.f_user_number='档案数量'
290
- }if (ff==='f_issue_time') {
291
- this.exportExcelField.f_issue_time='下发时间'
292
- }
277
+ if (ff==='f_plan_name') {
278
+ this.exportExcelField.f_plan_name='计划名称'
293
279
  }
294
- },
295
- pl() {
296
- let getGasman = new HttpResetClass()
297
- getGasman.load('POST', `api/af-safecheck/sql/safe_singleTable_OrderBy`, {
298
- data: {
299
- items: "id,f_plan_name",
300
- tablename: "t_check_plan",
301
- condition: `f_filialeid = '${this.curorgid}'`,
302
- orderitem: "id"
303
- }
304
- }, {resolveMsg: null, rejectMsg: null}).then((plne) => {
305
- //tag
306
- //tag
307
- //tag
308
- for (let i = 0; i < plne.data.length; i++) {
309
- this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
310
- }
311
- //tag
312
- })
313
- },
314
- hiddenr() {
315
- this.$parent.isdetail = !this.$parent.isdetail
316
- },
317
- hidden() {
318
- this.criteriaShow = !this.criteriaShow
319
- },
320
- search () {
321
- this.$refs.paged.$refs.cri.search()
322
- this.$dispatch('search')
323
- },
324
- getorg (val) {
325
- this.f_orgid = this.$login.convertToIn(val.resids)
326
- this.f_filialeid = val[0]
327
-
328
- },
329
- selfSearch (args) {
330
- if (!this.f_orgid) {
331
- this.getorg([this.$login.f.orgid])
332
- args.condition = `f_filialeid in ('${this.$login.f.orgid}') and ${args.condition}`
280
+ if (ff==='f_checker_name') {
281
+ this.exportExcelField.f_checker_name='安检员'
282
+ }if (ff==='f_residential_area') {
283
+ this.exportExcelField.f_residential_area='小区名称'
284
+ }if (ff==='f_user_number') {
285
+ this.exportExcelField.f_user_number='档案数量'
333
286
  }
334
- if (this.f_orgid) {
335
- args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
287
+ }
288
+ },
289
+ pl() {
290
+ let getGasman = new HttpResetClass()
291
+ getGasman.load('POST', `api/af-safecheck/sql/safe_singleTable_OrderBy`, {
292
+ data: {
293
+ items: "id,f_plan_name",
294
+ tablename: "t_check_plan",
295
+ condition: `f_filialeid = '${this.curorgid}'`,
296
+ orderitem: "id"
336
297
  }
337
- if(this.f_check_start && this.f_check_end){
338
- if(new Date(this.f_check_start).getFullYear() == new Date(this.f_check_end).getFullYear() ){
339
- 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}`
340
- }else {
341
- args.condition += ` and (
298
+ }, {resolveMsg: null, rejectMsg: null}).then((plne) => {
299
+ //tag
300
+ //tag
301
+ //tag
302
+ for (let i = 0; i < plne.data.length; i++) {
303
+ this.planName.push({label: plne.data[i].f_plan_name, value: plne.data[i].id})
304
+ }
305
+ //tag
306
+ })
307
+ },
308
+ hiddenr() {
309
+ this.$parent.isdetail = !this.$parent.isdetail
310
+ },
311
+ hidden() {
312
+ this.criteriaShow = !this.criteriaShow
313
+ },
314
+ search () {
315
+ this.$refs.paged.$refs.cri.search()
316
+ this.$dispatch('search')
317
+ },
318
+ getorg (val) {
319
+ this.f_orgid = this.$login.convertToIn(val.resids)
320
+ this.f_filialeid = val[0]
321
+
322
+ },
323
+ selfSearch (args) {
324
+ if (!this.f_orgid) {
325
+ this.getorg([this.$login.f.orgid])
326
+ args.condition = `f_filialeid in ('${this.$login.f.orgid}') and ${args.condition}`
327
+ }
328
+ if (this.f_orgid) {
329
+ args.condition = `f_filialeid in ${this.f_orgid} and ${args.condition}`
330
+ }
331
+ if(this.f_check_start && this.f_check_end){
332
+ if(new Date(this.f_check_start).getFullYear() == new Date(this.f_check_end).getFullYear() ){
333
+ 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}`
334
+ }else {
335
+ args.condition += ` and (
342
336
  (f_year = ${new Date(this.f_check_start).getFullYear()} and f_month >= ${new Date(this.f_check_start).getMonth()+1})
343
337
  or
344
338
  ( f_year > ${new Date(this.f_check_start).getFullYear()} and f_year < ${new Date(this.f_check_end).getFullYear()})
345
339
  or
346
340
  (f_year = ${new Date(this.f_check_end).getFullYear()} and f_month <= ${new Date(this.f_check_end).getMonth()+1}))`
347
- }
348
- } else {
349
- if(this.f_check_start){
350
- args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1}`
351
- }
352
- if(this.f_check_end){
353
- args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
354
- }
355
341
  }
356
- this.$refs.paged.$refs.grid.$el.scrollTop = 0
357
- if (this.groupNameForSql=='undefined'){
358
- //tag
359
- this.$showMessage("请至少选择一项进行汇总")
360
- return
342
+ } else {
343
+ if(this.f_check_start){
344
+ args.condition += ` and f_year>=${new Date(this.f_check_start).getFullYear()} and f_month>=${new Date(this.f_check_start).getMonth()+1}`
345
+ }
346
+ if(this.f_check_end){
347
+ args.condition += ` and f_year<=${new Date(this.f_check_end).getFullYear()} and f_month<=${new Date(this.f_check_end).getMonth()+1}`
361
348
  }
362
- this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
363
- this.model.search(args.condition, args.model)
364
- },
349
+ }
350
+ this.$refs.paged.$refs.grid.$el.scrollTop = 0
351
+ if (this.groupNameForSql=='undefined'){
352
+ //tag
353
+ this.$showMessage("请至少选择一项进行汇总")
354
+ return
355
+ }
356
+ this.model.paramSource = {groupName: `'${this.groupNameForSql}'`}
357
+ this.model.search(args.condition, args.model)
358
+ },
365
359
 
366
- // 拼接groupName1
367
- getGroupName1 () {
368
- var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number','f_issue_time']
369
- var newtemp=[]
360
+ // 拼接groupName1
361
+ getGroupName1 () {
362
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
363
+ var newtemp=[]
370
364
 
371
- for (var i=0;i<temp.length;i++){
372
- for (var j=0;j<this.nameForSql.length;j++){
373
- //tag
374
- if(temp[i]==this.nameForSql[j]){
375
- newtemp.push(this.nameForSql[j])
376
- }
365
+ for (var i=0;i<temp.length;i++){
366
+ for (var j=0;j<this.nameForSql.length;j++){
367
+ //tag
368
+ if(temp[i]==this.nameForSql[j]){
369
+ newtemp.push(this.nameForSql[j])
377
370
  }
378
371
  }
379
- let str = ''
372
+ }
373
+ let str = ''
380
374
 
381
- for (var i=0;i < newtemp.length - 1; i++) {
382
- str += newtemp[i] + ','
383
- }
384
- str += newtemp[i]
385
- this.groupNameForSql = str.trim()
375
+ for (var i=0;i < newtemp.length - 1; i++) {
376
+ str += newtemp[i] + ','
386
377
  }
378
+ str += newtemp[i]
379
+ this.groupNameForSql = str.trim()
380
+ }
381
+ },
382
+ watch: {
383
+ // 'nameForSql' () {
384
+ //
385
+ // this.getGroupName1()
386
+ // },
387
+ 'nameForSql' () {
388
+ var e = document.createEvent("MouseEvents");
389
+ e.initEvent("click", true, true);
390
+ document.getElementById("btnaaa").dispatchEvent(e);
387
391
  },
388
- watch: {
389
- // 'nameForSql' () {
390
- //
391
- // this.getGroupName1()
392
- // },
393
- 'nameForSql' () {
394
- var e = document.createEvent("MouseEvents");
395
- e.initEvent("click", true, true);
396
- document.getElementById("btnaaa").dispatchEvent(e);
397
- },
398
- 'model.rows'(){
399
- //tag
400
- if(this.listflag){
401
- return;
402
- }
403
- this.listflag=true
404
- //tag
405
- var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number','f_issue_time']
406
- var newtemp=[]
407
- for (var i=0;i<temp.length;i++){
408
- for (var j=0;j<this.nameForSql.length;j++){
409
- //tag
410
- if(temp[i]==this.nameForSql[j]){
411
- newtemp.push(this.nameForSql[j])
412
- }
392
+ 'model.rows'(){
393
+ //tag
394
+ if(this.listflag){
395
+ return;
396
+ }
397
+ this.listflag=true
398
+ //tag
399
+ var temp=['f_plan_month','f_no_checkplan','f_residential_area','f_plan_name','f_checker_name','f_user_number']
400
+ var newtemp=[]
401
+ for (var i=0;i<temp.length;i++){
402
+ for (var j=0;j<this.nameForSql.length;j++){
403
+ //tag
404
+ if(temp[i]==this.nameForSql[j]){
405
+ newtemp.push(this.nameForSql[j])
413
406
  }
414
407
  }
415
- if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
416
- return
417
- }
418
- var temp=JSON.parse(JSON.stringify(this.model.rows))
408
+ }
409
+ if((newtemp.includes('f_user_number')&&newtemp.length==2)||(!newtemp.includes('f_user_number')&&newtemp.length==1)){
410
+ return
411
+ }
412
+ var temp=JSON.parse(JSON.stringify(this.model.rows))
419
413
 
420
- //遍历查询结果 为指定列增加样式
421
- for (var i=0;i<newtemp.length-1;i++){
422
- if(newtemp[i]=='f_user_number'){
423
- return;
424
- }
425
- //tag
426
- var ss=''
427
- for (var j=0;j<temp.length;j++){
428
- if(j>0&&i>0){
429
- var flag=false
430
- for(var t=i-1;t>-1;t--){
431
- //tag
432
- //tag
433
- //tag
434
- //tag
435
- if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&(temp[j][newtemp[t]] !=null && temp[j][newtemp[t]].indexOf('*&') )==-1){
436
- flag=true
437
- break
438
- }
439
- }
414
+ //遍历查询结果 为指定列增加样式
415
+ for (var i=0;i<newtemp.length-1;i++){
416
+ if(newtemp[i]=='f_user_number'){
417
+ return;
418
+ }
419
+ //tag
420
+ var ss=''
421
+ for (var j=0;j<temp.length;j++){
422
+ if(j>0&&i>0){
423
+ var flag=false
424
+ for(var t=i-1;t>-1;t--){
425
+ //tag
440
426
  //tag
441
- if(flag){
442
- ss=temp[j][newtemp[i]]
443
- continue
427
+ //tag
428
+ //tag
429
+ if(temp[j-1][newtemp[t]]!=temp[j][newtemp[t]]&&(temp[j][newtemp[t]] !=null && temp[j][newtemp[t]].indexOf('*&') )==-1){
430
+ flag=true
431
+ break
444
432
  }
445
433
  }
446
- if(temp[j][newtemp[i]]==ss){
447
- temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
448
- }else {
434
+ //tag
435
+ if(flag){
449
436
  ss=temp[j][newtemp[i]]
437
+ continue
450
438
  }
451
439
  }
440
+ if(temp[j][newtemp[i]]==ss){
441
+ temp[j][newtemp[i]]=temp[j][newtemp[i]]+'*&'
442
+ }else {
443
+ ss=temp[j][newtemp[i]]
444
+ }
452
445
  }
453
- //tag
454
- this.model.rows=JSON.parse(JSON.stringify(temp))
455
- },
446
+ }
447
+ //tag
448
+ this.model.rows=JSON.parse(JSON.stringify(temp))
449
+ },
456
450
  'model.rows.length'() {
457
451
  // 如果查询无结果,将合计置为0
458
452
  if(this.model.rows.length < 1){
@@ -464,48 +458,48 @@
464
458
  this.model.sums.f_jujian = 0
465
459
  }
466
460
  }
467
- },
468
- computed:{
469
- exportParameter(){
470
- // excel 导出条件拼接
471
- return {
472
- condition: this.$refs.paged.model.condition,
473
- groupName: this.groupNameForSql
474
- }
461
+ },
462
+ computed:{
463
+ exportParameter(){
464
+ // excel 导出条件拼接
465
+ return {
466
+ condition: this.$refs.paged.model.condition,
467
+ groupName: this.groupNameForSql
475
468
  }
476
469
  }
477
470
  }
471
+ }
478
472
  </script>
479
473
 
480
474
  <style scoped>
481
475
 
482
- .td-0{
483
- border: 1px solid #000000;
484
- }
476
+ .td-0{
477
+ border: 1px solid #000000;
478
+ }
485
479
 
486
- .td-1{
487
- border: none;
488
- border-top: 1px solid #000000;
489
- border-left: 1px solid #000000;
490
- border-right: 1px solid #000000;
491
- }
480
+ .td-1{
481
+ border: none;
482
+ border-top: 1px solid #000000;
483
+ border-left: 1px solid #000000;
484
+ border-right: 1px solid #000000;
485
+ }
492
486
 
493
- .td-2{
494
- border: none;
495
- border-left: 1px solid #000000;
496
- border-right: 1px solid #000000;
497
- }
498
- .td-4{
499
- border: none;
500
- border-top: 1px solid #000000;
501
- border-left: 1px solid #000000;
502
- border-right: 1px solid #000000;
503
- border-bottom: 1px solid #000000;
504
- }
505
- .td-3{
506
- border: none;
507
- border-left: 1px solid #000000;
508
- border-right: 1px solid #000000;
509
- border-bottom: 1px solid #000000;
510
- }
487
+ .td-2{
488
+ border: none;
489
+ border-left: 1px solid #000000;
490
+ border-right: 1px solid #000000;
491
+ }
492
+ .td-4{
493
+ border: none;
494
+ border-top: 1px solid #000000;
495
+ border-left: 1px solid #000000;
496
+ border-right: 1px solid #000000;
497
+ border-bottom: 1px solid #000000;
498
+ }
499
+ .td-3{
500
+ border: none;
501
+ border-left: 1px solid #000000;
502
+ border-right: 1px solid #000000;
503
+ border-bottom: 1px solid #000000;
504
+ }
511
505
  </style>