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.
@@ -103,53 +103,53 @@
103
103
  </div>
104
104
 
105
105
 
106
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
107
- <label class="font_normal_body">安检状态</label>
108
- <v-select id="f_entry"
109
- class="select_list select"
110
- placeholder='安检状态' style="width: 60%"
111
- v-model='model.f_entry'
112
- :value.sync="$parent.$parent.model.f_entry"
113
- :options='$parent.$parent.f_entry_status'
114
- condition=""
115
- :value-single="true"
116
- close-on-select clear-button></v-select>
117
- </div>
118
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
119
- <role-selector-safe
120
- role-name="安检员"
121
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
122
- @re-res="$parent.$parent.getRes"
123
- :value.sync="model.f_checker_id"
124
- v-model="model.f_checker_id"
125
- condition="f_checker_name = '{}'">
126
- </role-selector-safe>
127
- </div>
128
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
129
- <label class="font_normal_body">片&emsp;&emsp;区</label>
130
- <v-select class="select_list select"
131
- placeholder='片区/管理站' style="width: 60%"
132
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
133
- :options='$parent.$parent.sliceArea'
134
- filer-key="name"
135
- close-on-select clear-button
136
- condition="f_slice_area='{}'"
137
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
138
- :value-single="true">
139
- </v-select>
140
- </div>
141
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
142
- <label class="font_normal_body">安检册</label>
143
- <v-select class="select_list select"
144
- placeholder='安检册' style="width: 60%"
145
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
146
- :options='$parent.$parent.checkBooks'
147
- filer-key="name"
148
- close-on-select clear-button
149
- condition="f_check_book_name like '%{}%'"
150
- :value-single="true">
151
- </v-select>
152
- </div>
106
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
107
+ <label class="font_normal_body">安检状态</label>
108
+ <v-select id="f_entry"
109
+ class="select_list select"
110
+ placeholder='安检状态' style="width: 60%"
111
+ v-model='model.f_entry'
112
+ :value.sync="$parent.$parent.model.f_entry"
113
+ :options='$parent.$parent.f_entry_status'
114
+ condition=""
115
+ :value-single="true"
116
+ close-on-select clear-button></v-select>
117
+ </div>
118
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
119
+ <role-selector-safe
120
+ role-name="安检员"
121
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
122
+ @re-res="$parent.$parent.getRes"
123
+ :value.sync="model.f_checker_id"
124
+ v-model="model.f_checker_id"
125
+ condition="f_checker_name = '{}'">
126
+ </role-selector-safe>
127
+ </div>
128
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
129
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
130
+ <v-select class="select_list select"
131
+ placeholder='片区/管理站' style="width: 60%"
132
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
133
+ :options='$parent.$parent.sliceArea'
134
+ filer-key="name"
135
+ close-on-select clear-button
136
+ condition="f_slice_area='{}'"
137
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
138
+ :value-single="true">
139
+ </v-select>
140
+ </div>
141
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
142
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
143
+ <v-select class="select_list select"
144
+ placeholder='抄表册' style="width: 60%"
145
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
146
+ :options='$parent.$parent.cbc'
147
+ filer-key="name"
148
+ close-on-select clear-button
149
+ condition="f_meter_book_num={}"
150
+ :value-single="true">
151
+ </v-select>
152
+ </div>
153
153
  <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
154
154
  <label class="font_normal_body">省&ensp;市&ensp;区</label>
155
155
  <v-select class="select_list select"
@@ -228,16 +228,16 @@
228
228
  </v-select>
229
229
  </div>
230
230
  <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
231
- <label class="font_normal_body">气表品牌</label>
231
+ <label class="font_normal_body">气表品牌</label>
232
232
  <v-select
233
- class="select_list select"
234
- placeholder='气表品牌' style="width: 60%"
235
- v-model='model.tableBrand'
236
- :value.sync="model.tableBrand"
237
- :options='$parent.$parent.tableBrands'
238
- condition="f_meter_brand = '{}'"
239
- :value-single="true"
240
- close-on-select clear-button></v-select>
233
+ class="select_list select"
234
+ placeholder='气表品牌' style="width: 60%"
235
+ v-model='model.tableBrand'
236
+ :value.sync="model.tableBrand"
237
+ :options='$parent.$parent.tableBrands'
238
+ condition="f_meter_brand = '{}'"
239
+ :value-single="true"
240
+ close-on-select clear-button></v-select>
241
241
  </div>
242
242
  <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
243
243
  <label class="font_normal_body">有无计划</label>
@@ -390,7 +390,7 @@
390
390
 
391
391
  </td>
392
392
  <td style="text-align: center" v-if="$parent.$parent.$parent.audioshow">
393
- <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
393
+ <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
394
394
  <audio controls="controls" v-if="row.f_recording1_path">
395
395
  <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
396
396
  </audio>
@@ -410,29 +410,29 @@
410
410
  </template>
411
411
 
412
412
  <script>
413
- import {PagedList} from 'vue-client'
414
- import Vue from 'vue'
415
- import co from 'co'
416
- import AppData from '../../stores/AppData'
417
- import * as Util from '../Util'
418
- import getNowDate from "../../utils/getNowDate";
419
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
420
- import BenzAMRRecorder from 'benz-amr-recorder'
421
- import {toEndDateString, toStartDateString} from "../Util";
413
+ import {PagedList} from 'vue-client'
414
+ import Vue from 'vue'
415
+ import co from 'co'
416
+ import AppData from '../../stores/AppData'
417
+ import * as Util from '../Util'
418
+ import getNowDate from "../../utils/getNowDate";
419
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
420
+ import BenzAMRRecorder from 'benz-amr-recorder'
421
+ import {toEndDateString, toStartDateString} from "../Util";
422
422
 
423
423
 
424
- let select = function* (self) {
425
- let http = new HttpResetClass()
426
- let getGasman = yield http.load('POST', '/rs/search', {
427
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
428
- userid: self.$login.f.id
429
- }, {resolveMsg: null, rejectMsg: null})
430
- ////tag
431
- self.checkersid.push({label: '全部', value: ''})
432
- getGasman.data.forEach((checker) => {
433
- self.checkersid.push({label: checker.name, value: checker.id})
434
- })
435
- }
424
+ let select = function* (self) {
425
+ let http = new HttpResetClass()
426
+ let getGasman = yield http.load('POST', '/rs/search', {
427
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
428
+ userid: self.$login.f.id
429
+ }, {resolveMsg: null, rejectMsg: null})
430
+ ////tag
431
+ self.checkersid.push({label: '全部', value: ''})
432
+ getGasman.data.forEach((checker) => {
433
+ self.checkersid.push({label: checker.name, value: checker.id})
434
+ })
435
+ }
436
436
 
437
437
  export default {
438
438
  title: '安检结果查看',
@@ -482,290 +482,263 @@ export default {
482
482
  model: model,
483
483
  excelHeaders: {
484
484
  //searchData:searchData,
485
- 'f_userinfo_code': '客户编号',
486
- 'f_user_name': '客户姓名',
487
- 'f_meternumber':'客户表号',
488
- 'f_user_phone':'客户电话',
489
- 'f_check_type': '客户类型',
490
- 'f_residential_area': '小区',
491
- 'f_address': '客户地址',
492
- 'f_entry_status': '安检状态',
493
- 'f_usegas': '用气状态',
494
- 'f_offsite_time': '安检时间',
495
- 'f_checker_name': '安检员',
496
- 'f_safecheck_type':'安检类型',
497
- 'f_repair_approved_note': '备注',
498
- 'f_gas_date': '开户时间',
499
- 'f_plan_name': '计划名称'
500
- },
501
- fun: this.$login.f,
502
- pcds:[],
503
- checkersid: [],
504
- approveds:this.$appdata.getParam('安检审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检审核状态')]:[{label: '全部', value: ''}],
505
- safetype: this.$appdata.getParam('安检类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')]:[{label: '全部', value: ''}],
506
- criteriaShow: false,
507
- checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
508
- f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
509
- showModal: false,
510
- safe_types:this.$appdata.getParam('计划类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('计划类型')]:[{label: '全部', value: ''}],
511
- f_approval_states: this.$appdata.getParam('安检单审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检单审核状态')]:[{label: '全部', value: ''}],
512
- f_entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
513
- no_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
514
- usegas: this.$appdata.getParam('用气状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气状态')]:[{label: '全部', value: ''}],
515
- showcheckmsg: false,
516
- checkInfo: {},
517
- orderDefault: "'f_offsite_time'",
518
- orderFields: {
519
- f_offsite_time: 'no'
520
- },
521
- sliceArea: [],
522
- cbc:[],
523
- checkBooks:[]
524
- }
525
- },
485
+ 'f_userinfo_code': '客户编号',
486
+ 'f_user_name': '客户姓名',
487
+ 'f_meternumber':'客户表号',
488
+ 'f_user_phone':'客户电话',
489
+ 'f_check_type': '客户类型',
490
+ 'f_residential_area': '小区',
491
+ 'f_address': '客户地址',
492
+ 'f_entry_status': '安检状态',
493
+ 'f_usegas': '用气状态',
494
+ 'f_offsite_time': '安检时间',
495
+ 'f_checker_name': '安检员',
496
+ 'f_safecheck_type':'安检类型',
497
+ 'f_repair_approved_note': '备注',
498
+ 'f_gas_date': '开户时间',
499
+ 'f_plan_name': '计划名称'
500
+ },
501
+ fun: this.$login.f,
502
+ pcds:[],
503
+ checkersid: [],
504
+ approveds:this.$appdata.getParam('安检审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检审核状态')]:[{label: '全部', value: ''}],
505
+ safetype: this.$appdata.getParam('安检类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')]:[{label: '全部', value: ''}],
506
+ criteriaShow: false,
507
+ checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
508
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
509
+ showModal: false,
510
+ safe_types:this.$appdata.getParam('计划类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('计划类型')]:[{label: '全部', value: ''}],
511
+ f_approval_states: this.$appdata.getParam('安检单审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检单审核状态')]:[{label: '全部', value: ''}],
512
+ f_entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
513
+ no_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
514
+ usegas: this.$appdata.getParam('用气状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用气状态')]:[{label: '全部', value: ''}],
515
+ showcheckmsg: false,
516
+ checkInfo: {},
517
+ orderDefault: "'f_offsite_time'",
518
+ orderFields: {
519
+ f_offsite_time: 'no'
520
+ },
521
+ sliceArea: [],
522
+ cbc:[]
523
+ }
524
+ },
526
525
  created() {
527
526
  // 使用 $on 监听事件
528
527
  this.$root.$on('audit-status-changed', () => {
529
528
  console.log('收到审核状态变更事件')
530
529
  this.refresh()
531
530
  })
532
- document.addEventListener('keydown', this.handleEnter, true);
533
- this.getCheckBook()
534
531
  },
535
532
  beforeDestroy() {
536
533
  // 记得在组件销毁前移除事件监听
537
534
  this.$root.$off('audit-status-changed')
538
535
  },
539
- methods: {
540
- handleEnter(e) {
541
- if (e.key === 'Enter') {
542
- this.$refs.paged.$refs.criteria.search()
543
- }
544
- },
545
- getCheckBook(){
546
- this.checkBooks=[]
547
- new HttpResetClass().load('POST', `/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
548
- data: {
549
- items: 'id,f_check_book_name,f_check_book_type',
550
- tablename: 't_check_book',
551
- condition: `f_orgid = '${this.$login.f.orgid}'`,
552
- orderitem: 'id desc'
553
- }
554
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
555
- this.checkBooks.push({label: '全部', value: ''})
556
- res.data.forEach(ress => {
557
- this.checkBooks.push({
558
- label: ress.f_check_book_name,
559
- value: ress.f_check_book_name
560
- })
561
- })
536
+ methods: {
537
+ showback1(){
538
+ this.showinfo1 = true
539
+ this.showinfo2 = false
540
+ },
541
+ showback2(){
542
+ this.showinfo1 = true
543
+ this.showinfo3 = false
544
+ },
545
+ //气表品牌查询
546
+ getTableBrands() {
547
+ new HttpResetClass().load("POST", `/api/af-safecheck/sql/safe_singleTable_OrderBy`,
548
+ {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
549
+ {resolveMsg: null, rejectMsg: null}).then((resp) => {
550
+ resp.data.forEach((result) => {
551
+ this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
562
552
  })
563
- },
564
- showback1(){
565
- this.showinfo1 = true
566
- this.showinfo2 = false
567
- },
568
- showback2(){
569
- this.showinfo1 = true
570
- this.showinfo3 = false
571
- },
572
- //气表品牌查询
573
- getTableBrands() {
574
- new HttpResetClass().load("POST", `/api/af-safecheck/sql/safe_singleTable_OrderBy`,
575
- {data: {items: "*", tablename: "t_gasbrand", orderitem: "id", condition: ` 1=1 `}},
576
- {resolveMsg: null, rejectMsg: null}).then((resp) => {
577
- resp.data.forEach((result) => {
578
- this.tableBrands.push({label: result.f_meter_brand, value: result.f_meter_brand})
579
- })
553
+ })
554
+ },
555
+ //获取省市区列表
556
+ getPcd(val){
557
+ this.pcds = [{label:'全部',value:''}]
558
+ new HttpResetClass().load("POST", `/api/af-safecheck/sql/safe_singleTable_OrderBy`,
559
+ {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
560
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
561
+ pcdlist.data.forEach((result)=>{
562
+ this.pcds.push({label:result.f_pcd,value:result.f_pcd})
580
563
  })
581
- },
582
- //获取省市区列表
583
- getPcd(val){
584
- this.pcds = [{label:'全部',value:''}]
585
- new HttpResetClass().load("POST", `/api/af-safecheck/sql/safe_singleTable_OrderBy`,
586
- {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
587
- {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
588
- pcdlist.data.forEach((result)=>{
589
- this.pcds.push({label:result.f_pcd,value:result.f_pcd})
564
+ })
565
+ },
566
+ showaudio(){
567
+ //tag
568
+ this.audioshow=!this.audioshow
569
+ //tag
570
+ },
571
+ getmeterbook(val){
572
+ this.cbc=[]
573
+ this.cbc.push({
574
+ label:'全部',
575
+ value:''
576
+ })
577
+ if (val==''){
578
+
579
+ this.cbcs.forEach(res=>{
580
+ this.cbc.push({
581
+ label:res.f_book_name,
582
+ value:res.id
590
583
  })
591
584
  })
592
- },
593
- showaudio(){
594
- //tag
595
- this.audioshow=!this.audioshow
596
- //tag
597
- },
598
- getmeterbook(val){
599
- this.cbc=[]
600
- this.cbc.push({
601
- label:'全部',
602
- value:''
603
- })
604
- if (val==''){
605
-
606
- this.cbcs.forEach(res=>{
585
+ }else{
586
+ this.cbcs.forEach(res=>{
587
+ if (res.f_book_slice_area==val){
607
588
  this.cbc.push({
608
589
  label:res.f_book_name,
609
590
  value:res.id
610
591
  })
592
+ }
593
+ })
594
+ }
595
+ },
596
+ Mreadibook(val){
597
+ ////tag
598
+ ////tag
599
+ if (val){
600
+ new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
601
+ items: 'name',
602
+ tablename: 't_zone',
603
+ condition: `parentid in ${val}`,
604
+ orderitem: 'id'
605
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
606
+ this.sliceArea=[]
607
+ this.sliceArea.push({
608
+ label:'全部',
609
+ value:''
611
610
  })
612
- }else{
613
- this.cbcs.forEach(res=>{
614
- if (res.f_book_slice_area==val){
615
- this.cbc.push({
616
- label:res.f_book_name,
617
- value:res.id
618
- })
619
- }
620
- })
621
- }
622
- },
623
- Mreadibook(val){
624
- ////tag
625
- ////tag
626
- if (val){
627
- new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
628
- items: 'name',
629
- tablename: 't_zone',
630
- condition: `parentid in ${val}`,
631
- orderitem: 'id'
632
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
633
- this.sliceArea=[]
611
+ res.data.forEach(ress=>{
634
612
  this.sliceArea.push({
635
- label:'全部',
636
- value:''
613
+ label:ress.name,
614
+ value:ress.name
637
615
  })
638
- res.data.forEach(ress=>{
639
- this.sliceArea.push({
640
- label:ress.name,
641
- value:ress.name
642
- })
643
- })
644
-
645
616
  })
646
- }
647
- },
648
- getAllMeterBook(val){
649
- ////tag
650
- ////tag
651
- this.cbcs=[]
652
- if (val){
653
- new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
654
- items: 'f_book_name,f_book_slice_area,id',
655
- tablename: 't_meter_book',
656
- condition: `f_filiale_id in ${val}`,
657
- orderitem: 'id'
658
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
659
- res.data.forEach(ress=>{
660
- this.cbcs.push({
661
- id:ress.id,
662
- f_book_name:ress.f_book_name,
663
- f_book_slice_area:ress.f_book_slice_area
664
- })
617
+
618
+ })
619
+ }
620
+ },
621
+ getAllMeterBook(val){
622
+ ////tag
623
+ ////tag
624
+ this.cbcs=[]
625
+ if (val){
626
+ new HttpResetClass().load('POST',`/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
627
+ items: 'f_book_name,f_book_slice_area,id',
628
+ tablename: 't_meter_book',
629
+ condition: `f_filiale_id in ${val}`,
630
+ orderitem: 'id'
631
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
632
+ res.data.forEach(ress=>{
633
+ this.cbcs.push({
634
+ id:ress.id,
635
+ f_book_name:ress.f_book_name,
636
+ f_book_slice_area:ress.f_book_slice_area
665
637
  })
666
- this.cbc=[]
638
+ })
639
+ this.cbc=[]
640
+ this.cbc.push({
641
+ label:'全部',
642
+ value:''
643
+ })
644
+ this.cbcs.forEach(res=>{
667
645
  this.cbc.push({
668
- label:'全部',
669
- value:''
670
- })
671
- this.cbcs.forEach(res=>{
672
- this.cbc.push({
673
- label:res.f_book_name,
674
- value:res.id
675
- })
646
+ label:res.f_book_name,
647
+ value:res.id
676
648
  })
677
649
  })
678
- }
679
- },
680
- getRes(obj) {
681
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
682
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
683
- this.Mreadibook(this.model.f_filialeid)
684
- this.getAllMeterBook(this.model.f_filialeid)
685
- this.getPcd(this.model.f_filialeid)
686
- //this.$refs.paged.$refs.criteria.search()
687
- },
650
+ })
651
+ }
652
+ },
653
+ getRes(obj) {
654
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
655
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
656
+ this.Mreadibook(this.model.f_filialeid)
657
+ this.getAllMeterBook(this.model.f_filialeid)
658
+ this.getPcd(this.model.f_filialeid)
659
+ //this.$refs.paged.$refs.criteria.search()
660
+ },
688
661
 
689
- change(row) {
690
- row.f_upload_state = '已传'
691
- this.shouinfodata = JSON.parse(JSON.stringify(row))
692
- this.showinfo1 = false
693
- if (row.f_safe_type == '已挂表未办卡安检'){
694
- this.showinfo2 = false
695
- this.showinfo3 = true
696
- return
697
- }
698
- this.showinfo2 = true
699
- this.showinfo3 = false
700
- },
701
- showChooser() {
702
- this.showModal = true
703
- },
704
- hidden() {
705
- this.criteriaShow = !this.criteriaShow
706
- },
707
- refresh() {
708
- this.$refs.paged.$refs.criteria.search()
709
- },
710
- ok() {
711
- this.showModal = false
712
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
713
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
714
- this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
715
- }
716
- },
717
- cancel() {
718
- this.showModal = false
719
- this.model.f_check_plan = {f_plan_name: '', id: ''}
720
- this.model.f_plan_id=''
721
- },
722
- print(row) {
723
- this.showcheckmsg = true
724
- this.checkInfo = row
725
- },
662
+ change(row) {
663
+ row.f_upload_state = '已传'
664
+ this.shouinfodata = JSON.parse(JSON.stringify(row))
665
+ this.showinfo1 = false
666
+ if (row.f_safe_type == '已挂表未办卡安检'){
667
+ this.showinfo2 = false
668
+ this.showinfo3 = true
669
+ return
670
+ }
671
+ this.showinfo2 = true
672
+ this.showinfo3 = false
673
+ },
674
+ showChooser() {
675
+ this.showModal = true
676
+ },
677
+ hidden() {
678
+ this.criteriaShow = !this.criteriaShow
679
+ },
680
+ refresh() {
681
+ this.$refs.paged.$refs.criteria.search()
682
+ },
683
+ ok() {
684
+ this.showModal = false
685
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
686
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
687
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
688
+ }
689
+ },
690
+ cancel() {
691
+ this.showModal = false
692
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
693
+ this.model.f_plan_id=''
694
+ },
695
+ print(row) {
696
+ this.showcheckmsg = true
697
+ this.checkInfo = row
698
+ },
726
699
 
727
- sort(field, rule) {
728
- // 将所有排序方式设为不排序,实现相互排斥
729
- for (let key in this.orderFields) {
730
- if (key === field) {
731
- this.orderFields[key] = rule
732
- } else {
733
- this.orderFields[key] = 'no'
734
- }
735
- }
736
- // 如果新规则不排序,还原为默认排序
737
- if (rule === 'no') {
738
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
700
+ sort(field, rule) {
701
+ // 将所有排序方式设为不排序,实现相互排斥
702
+ for (let key in this.orderFields) {
703
+ if (key === field) {
704
+ this.orderFields[key] = rule
739
705
  } else {
740
- this.model.paramSource.orderitem = `'${field} ${rule}'`
706
+ this.orderFields[key] = 'no'
741
707
  }
742
- this.search()
743
- },
744
- search() {
745
- console.log('审核通过回调')
746
- this.$refs.paged.$refs.criteria.search()
747
- },
748
- selfSearch(args) {
749
- ////tag
750
- //args.condition+=" and f_check_type='民用'"
751
- if(args.model.f_check_date){
752
- const daysBefore = Number(args.model.f_check_date);
753
- if ( daysBefore > 0) {
754
- // 获取当前日期
755
- const now = new Date();
756
- // 计算三天前的日期
757
- const threeDaysBefore = new Date(now.getTime() - (daysBefore * 24 * 60 * 60 * 1000));
758
- // 如果需要格式化日期,可以使用Date对象的方法
759
- var formattedDate = threeDaysBefore.toISOString().split('T')[0];
760
- args.condition += ` and f_offsite_time <='${formattedDate} 23:59:59'`;
761
- } else {
762
- console.error('f_check_date不是一个有效的正整数');
763
- }
764
- }
765
- this.model.search(args.condition, args.model, args.condValue)
766
708
  }
709
+ // 如果新规则不排序,还原为默认排序
710
+ if (rule === 'no') {
711
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
712
+ } else {
713
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
714
+ }
715
+ this.search()
716
+ },
717
+ search() {
718
+ console.log('审核通过回调')
719
+ this.$refs.paged.$refs.criteria.search()
767
720
  },
768
- ready() {
721
+ selfSearch(args) {
722
+ ////tag
723
+ //args.condition+=" and f_check_type='民用'"
724
+ if(args.model.f_check_date){
725
+ const daysBefore = Number(args.model.f_check_date);
726
+ if ( daysBefore > 0) {
727
+ // 获取当前日期
728
+ const now = new Date();
729
+ // 计算三天前的日期
730
+ const threeDaysBefore = new Date(now.getTime() - (daysBefore * 24 * 60 * 60 * 1000));
731
+ // 如果需要格式化日期,可以使用Date对象的方法
732
+ var formattedDate = threeDaysBefore.toISOString().split('T')[0];
733
+ args.condition += ` and f_offsite_time <='${formattedDate} 23:59:59'`;
734
+ } else {
735
+ console.error('f_check_date不是一个有效的正整数');
736
+ }
737
+ }
738
+ this.model.search(args.condition, args.model, args.condValue)
739
+ }
740
+ },
741
+ ready() {
769
742
  if(this.safeAudit){
770
743
  let oa = {
771
744
  'f_approved_by':'审核人',
@@ -776,48 +749,48 @@ export default {
776
749
  }
777
750
  this.excelHeaders = Object.assign({}, this.excelHeaders, oa)
778
751
  }
779
- this.function = this.f
780
- //获取气表品牌
781
- this.getTableBrands()
782
- let gen = select(this)
783
- //this.pianqu()
784
- this.Mreadibook(`('${this.$login.f.orgid}')`)
785
- co(gen)
786
- this.$refs.paged.$refs.criteria.model.f_check_start = Util.toStartDateString() + ' 00:00:00'
787
- this.$refs.paged.$refs.criteria.model.f_check_end = Util.toEndDateString() + ' 23:59:59'
788
- },
789
- watch: {
790
- 'model.f_no_checkplan'(val) {
791
- if (this.model.f_no_checkplan){
792
- this.searchData.f_no_checkplan = val
793
- }
794
- if (this.model.f_no_checkplan == '有计划安检') {
752
+ this.function = this.f
753
+ //获取气表品牌
754
+ this.getTableBrands()
755
+ let gen = select(this)
756
+ //this.pianqu()
757
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
758
+ co(gen)
759
+ this.$refs.paged.$refs.criteria.model.f_check_start = Util.toStartDateString() + ' 00:00:00'
760
+ this.$refs.paged.$refs.criteria.model.f_check_end = Util.toEndDateString() + ' 23:59:59'
761
+ },
762
+ watch: {
763
+ 'model.f_no_checkplan'(val) {
764
+ if (this.model.f_no_checkplan){
765
+ this.searchData.f_no_checkplan = val
766
+ }
767
+ if (this.model.f_no_checkplan == '有计划安检') {
795
768
 
796
- this.showChooser()
797
- }
798
- },
799
- 'model.condition'(val) {
800
- if (val) {
801
- this.searchData.condition = val
802
- }
769
+ this.showChooser()
770
+ }
771
+ },
772
+ 'model.condition'(val) {
773
+ if (val) {
774
+ this.searchData.condition = val
775
+ }
803
776
 
804
- },
805
- 'model.f_entry'(val) {
806
- this.searchData.f_entry_status = val
807
- },
808
- 'model.f_plan_id'(val) {
809
- if (val) {
810
- this.searchData.f_plan_id = val
811
- }
812
- },
813
- 'model.f_slice_area'(val) {
814
- },
815
- 'model.f_approved'(val) {
816
- if (val) {
817
- this.searchData.f_approved = val
818
- }
777
+ },
778
+ 'model.f_entry'(val) {
779
+ this.searchData.f_entry_status = val
780
+ },
781
+ 'model.f_plan_id'(val) {
782
+ if (val) {
783
+ this.searchData.f_plan_id = val
784
+ }
785
+ },
786
+ 'model.f_slice_area'(val) {
787
+ },
788
+ 'model.f_approved'(val) {
789
+ if (val) {
790
+ this.searchData.f_approved = val
819
791
  }
820
792
  }
821
-
822
793
  }
794
+
795
+ }
823
796
  </script>