Bläddra i källkod

fix: 修复各个table组件,时间组件 结束时间上送参数少一天的问题

yunxing 4 år sedan
förälder
incheckning
14bf2ccbc4

+ 10 - 9
src/views/equipment/table/inputDIalog.vue

@@ -205,15 +205,16 @@ export default {
                 this.$emit('confirm', this.inputForm.reportdate, this.inputForm.real, this.inputForm.locationName, this.inputForm.people)
             }
             this.dialogFormVisible = false
-            this.inputForm.status = ''
-            this.inputForm.yssjwcsj = ''
-            this.inputForm.complete = ''
-            this.inputForm.bill = ''
-            this.inputForm.ycgdtbsj = ''
-            this.inputForm.ycgdyssj = ''
-            this.inputForm.reportdate = ''
-            this.inputForm.real = ''
-            this.inputForm.locationName = ''
+            // TODO: 删除清空栏位值
+            // this.inputForm.status = ''
+            // this.inputForm.yssjwcsj = ''
+            // this.inputForm.complete = ''
+            // this.inputForm.bill = ''
+            // this.inputForm.ycgdtbsj = ''
+            // this.inputForm.ycgdyssj = ''
+            // this.inputForm.reportdate = ''
+            // this.inputForm.real = ''
+            // this.inputForm.locationName = ''
         },
     },
     mounted() {},

+ 3 - 1
src/views/equipment/table/otherTable.vue

@@ -87,6 +87,7 @@
     </div>
 </template>
 <script>
+import moment from 'moment'
 import { queryQtsx } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import { formatter, number_format } from '@/utils/format.js'
@@ -141,7 +142,8 @@ export default {
             //时间
             if (this.handledate) {
                 getParams.data.handledateStartDate = this.handledate[0] + '000000'
-                getParams.data.handledateEndDate = this.handledate[1] + '000000'
+                // getParams.data.handledateEndDate = this.handledate[1] + '000000'
+                getParams.data.handledateEndDate = moment(this.handledate[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //下拉
             if (this.handleresults && this.handleresults != 1) {

+ 9 - 4
src/views/equipment/table/rcwbTable.vue

@@ -152,6 +152,7 @@
 import { queryWb } from '@/api/room.js'
 import { mapGetters } from 'vuex'
 import { Select } from 'meri-design'
+import moment from 'moment'
 import inputDialog from './inputDIalog'
 import { formatterTime, number_format } from '@/utils/format.js'
 import { querySelect } from '@/api/public.js'
@@ -302,22 +303,26 @@ export default {
             //工单填报时间
             if (this.ycgdtbsj) {
                 data.reportdateStartDate = this.ycgdtbsj[0] + '000000'
-                data.reportdateEndDate = this.ycgdtbsj[1] + '000000'
+                // data.reportdateEndDate = this.ycgdtbsj[1] + '000000'
+                data.reportdateEndDate = moment(this.ycgdtbsj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //工单验收时间
             if (this.ycgdyssj) {
                 data.sjjssjStartDate = this.ycgdyssj[0] + '000000'
-                data.sjjssjEndDate = this.ycgdyssj[1] + '000000'
+                // data.sjjssjEndDate = this.ycgdyssj[1] + '000000'
+                data.sjjssjEndDate = moment(this.ycgdyssj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //任务开始时间
             if (this.reportdate) {
                 data.sjkssjStartDate = this.reportdate[0] + '000000'
-                data.sjkssjEndDate = this.reportdate[1] + '000000'
+                // data.sjkssjEndDate = this.reportdate[1] + '000000'
+                data.sjkssjEndDate = moment(this.reportdate[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //任务完成时间
             if (this.complete) {
                 data.sjwcsjStartDate = this.complete[0] + '000000'
-                data.sjwcsjEndDate = this.complete[1] + '000000'
+                // data.sjwcsjEndDate = this.complete[1] + '000000'
+                data.sjwcsjEndDate = moment(this.complete[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //输入框
             data.keyword = ''

+ 11 - 6
src/views/equipment/table/rcwxTable.vue

@@ -191,6 +191,7 @@
   </div>
 </template>
 <script>
+import moment from 'moment'
 import { queryWxzy, queryWxzyImg } from "@/api/equipmentList.js";
 import { mapGetters } from "vuex";
 import inputDialog from "./inputDIalog";
@@ -230,7 +231,7 @@ export default {
         "工单执行退回",
         "问题待解决",
         "执行中"
-      ] //默认选项如果statusOption存在则写入status中
+      ], //默认选项如果statusOption存在则写入status中
     };
   },
   computed: {
@@ -260,6 +261,7 @@ export default {
     },
     //多余输入框监听
     confirm(reportdate, real, locationName, people) {
+        debugger
       this.reportdate = reportdate;
       this.sjjssj = real;
       this.locationName = locationName;
@@ -287,14 +289,17 @@ export default {
       if (this.assetnum) {
         getParams.data.assetnum = this.assetnum;
       }
-      //下拉
+      //下拉 要求完成日期
       if (this.reportdate) {
         getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
-        getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+        // getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+        getParams.data.schedfinishEndDate = moment(this.reportdate[1]).add(1, 'day').format('YYYYMMDD000000')
       }
-      if (this.real) {
-        getParams.data.wotjyssjStartDate = this.real[0] + "000000";
-        getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+      //   实际完工日期
+      if (this.sjjssj) {
+        getParams.data.wotjyssjStartDate = this.sjjssj[0] + "000000";
+        // getParams.data.wotjyssjEndDate = this.sjjssj[1] + "000000";
+        getParams.data.wotjyssjEndDate = moment(this.sjjssj[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       if (this.source && this.source != "全部") {
         getParams.data.bxfwlymc = this.source;

+ 7 - 2
src/views/equipment/table/wbTable.vue

@@ -136,6 +136,7 @@
     </div>
 </template>
 <script>
+import moment from 'moment'
 import { queryWbsms } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import { Select } from 'meri-design'
@@ -237,13 +238,17 @@ export default {
                 // getParams.data.ischangepj = this.ischange
                 getParams.data.ismodel = this.ischange
             }
+            // 验收日期
             if (this.sjjssj) {
                 getParams.data.sjjssjStartDate = this.sjjssj[0] + '000000'
-                getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
+                // getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
+                getParams.data.sjjssjEndDate = moment(this.sjjssj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
+            // 填报时间
             if (this.reportdate) {
                 getParams.data.reportdateStartDate = this.reportdate[0] + '000000'
-                getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
+                // getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
+                getParams.data.reportdateEndDate = moment(this.reportdate[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //输入框
             getParams.data.keyword = ''

+ 7 - 2
src/views/equipment/table/wxTable.vue

@@ -136,6 +136,7 @@
     </div>
 </template>
 <script>
+import moment from 'moment'
 import { queryWx } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import inputDialog from './inputDIalog'
@@ -227,13 +228,17 @@ export default {
                 getParams.data.ismodel = this.ischange
                 // getParams.data.ischangepj = this.ischange
             }
+            // 验收日期
             if (this.sjjssj) {
                 getParams.data.sjjssjStartDate = this.sjjssj[0] + '000000'
-                getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
+                // getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
+                getParams.data.sjjssjEndDate = moment(this.sjjssj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
+            // 填报日期
             if (this.reportdate) {
                 getParams.data.reportdateStartDate = this.reportdate[0] + '000000'
-                getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
+                // getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
+                getParams.data.reportdateEndDate = moment(this.reportdate[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             //输入框搜索
             getParams.data.keyword = ''

+ 7 - 3
src/views/equipment/table/zwTable.vue

@@ -42,7 +42,7 @@
                 :placeholder='"请选择"'
                 :selectdata='sxjdOption'
                 style='margin:0 12px'
-                @change='getLpageChanged(1)'
+                @change='pageChanged(1)'
             ></Select>
             <!-- placeholder='选择立项时间' -->
             <div class='picker-box'>
@@ -118,6 +118,7 @@
     </div>
 </template>
 <script>
+import moment from 'moment'
 import Select from '@/components/Select/Select.vue'
 import { queryZw } from '@/api/equipmentList.js'
 import { querySelect } from '@/api/public.js'
@@ -291,11 +292,14 @@ export default {
             //验收
             if (this.yssjwcsj) {
                 getParams.data.yssjwcsjStartDate = this.yssjwcsj[0] + '000000'
-                getParams.data.yssjwcsjEndDate = this.yssjwcsj[1] + '000000'
+                // getParams.data.yssjwcsjEndDate = this.yssjwcsj[1] + '000000'
+                getParams.data.yssjwcsjEndDate = moment(this.yssjwcsj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
+            // 立项日期
             if (this.lxsjwcsj) {
                 getParams.data.lxsjwcsjStartDate = this.lxsjwcsj[0] + '000000'
-                getParams.data.lxsjwcsjEndDate = this.reportdate[1] + '000000'
+                // getParams.data.lxsjwcsjEndDate = this.lxsjwcsj[1] + '000000'
+                getParams.data.lxsjwcsjEndDate = moment(this.lxsjwcsj[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             if (this.status && this.status != 1) {
                 getParams.data.status = this.status

+ 3 - 1
src/views/other/gcfzDialog.vue

@@ -21,6 +21,7 @@
     </div>
 </template>
 <script>
+import moment from 'moment'
 // import Select from '@/components/Select/Select.vue'
 import { Select } from 'meri-design'
 import gcfzTable1 from './gcfz1'
@@ -95,7 +96,8 @@ export default {
             }
             if (this.dateVal.length > 0) {
                 getParams.recordtimeStartDate = this.dateVal[0] + '000000'
-                getParams.recordtimeEndDate = this.dateVal[1] + '000000'
+                // getParams.recordtimeEndDate = this.dateVal[1] + '000000'
+                getParams.recordtimeStartDate = moment(this.dateVal[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             queryfzyfchange({ getParams }).then((res) => {
                 if (res.result == 'success') {

+ 5 - 4
src/views/other/zhsxOtherTable1.vue

@@ -52,9 +52,9 @@
                 <template slot-scope='{row}'>{{formatter(row.createdate)||'--'}}</template>
             </el-table-column>
             <el-table-column prop label='政府部门' :show-overflow-tooltip='true' width='200'>
-                <template slot-scope='{row}'>
-                    {{row.department?row.department == '其他部门'?`${row.department} - ${row.otherdescription}`:row.department:'--'}}
-                </template>
+                <template
+                    slot-scope='{row}'
+                >{{row.department?row.department == '其他部门'?`${row.department} - ${row.otherdescription}`:row.department:'--'}}</template>
             </el-table-column>
             <el-table-column prop label='记录事项' :show-overflow-tooltip='true' min-width='660'>
                 <template slot-scope='{row}'>{{row.recordsx||'--'}}</template>
@@ -208,7 +208,8 @@ export default {
             }
             if (this.dateVal) {
                 getParams.createdateStartDate = this.dateVal[0] + '000000'
-                getParams.createdateEndDate = this.dateVal[1] + '000000'
+                // getParams.createdateEndDate = this.dateVal[1] + '000000'
+                getParams.createdateEndDate = moment(this.dateVal[1]).add(1, 'day').format('YYYYMMDD000000')
             }
             queryGlams({ getParams }).then((res) => {
                 if (res.result == 'success') {

+ 13 - 6
src/views/room/index.vue

@@ -438,6 +438,7 @@
   </div>
 </template>
 <script>
+import moment from "moment";
 import { queryEquipmentList, queryWxzy } from "@/api/equipmentList.js";
 import {
   queryDygjcxline,
@@ -814,11 +815,13 @@ export default {
       // 监听下拉框
       if (this.reportdate) {
         getParams.data.schedfinishStartDate = this.reportdate[0] + "000000";
-        getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+        // getParams.data.schedfinishEndDate = this.reportdate[1] + "000000";
+        getParams.data.schedfinishEndDate = moment(this.reportdate[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       if (this.real) {
         getParams.data.wotjyssjStartDate = this.real[0] + "000000";
-        getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+        // getParams.data.wotjyssjEndDate = this.real[1] + "000000";
+        getParams.data.wotjyssjEndDate = moment(this.real[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       if (this.source && this.source != "全部") {
         // getParams.data.bxfwlymc = this.source;
@@ -881,22 +884,26 @@ export default {
       // 任务开始日期
       if (this.rwksrq) {
         data.sjkssjStartDate = this.rwksrq[0] + "000000";
-        data.sjkssjEndDate = this.rwksrq[1] + "000000";
+        // data.sjkssjEndDate = this.rwksrq[1] + "000000";
+        data.sjkssjEndDate = moment(this.rwksrq[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       // 任务完成日期
       if (this.rwwcrq) {
         data.sjwcsjStartDate = this.rwwcrq[0] + "000000";
-        data.sjwcsjEndDate = this.rwwcrq[1] + "000000";
+        // data.sjwcsjEndDate = this.rwwcrq[1] + "000000";
+        data.sjwcsjEndDate = moment(this.rwwcrq[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       // 异常工单填报时间
       if (this.ycgdtbsj) {
         data.reportdateStartDate = this.ycgdtbsj[0] + "000000";
-        data.reportdateEndDate = this.ycgdtbsj[1] + "000000";
+        // data.reportdateEndDate = this.ycgdtbsj[1] + "000000";
+        data.reportdateEndDate = moment(this.ycgdtbsj[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       // 异常工单验收时间
       if (this.ycgdyssj) {
         data.sjjssjStartDate = this.ycgdyssj[0] + "000000";
-        data.sjjssjEndDate = this.ycgdyssj[1] + "000000";
+        // data.sjjssjEndDate = this.ycgdyssj[1] + "000000";
+        data.sjjssjEndDate = moment(this.ycgdyssj[1]).add(1, 'day').format('YYYYMMDD000000')
       }
       //
       // 是否正常