zhulizhen1111 4 years ago
parent
commit
294109b9b3

+ 4 - 0
src/utils/format.js

@@ -3,6 +3,9 @@ const formatTime = (time) => {
     return time > 10 ? time : "0" + time
 }
 const formatter = (date) => {
+    return moment.unix(date / 1000).format("YYYY.MM.DD")
+}
+const formatterTime = (date) => {
     return moment.unix(date / 1000).format("YYYY.MM.DD hh:mm")
 }
 const number_format = (number, decimals, dec_point, thousands_sep) => {
@@ -39,5 +42,6 @@ const number_format = (number, decimals, dec_point, thousands_sep) => {
 module.exports = {
     formatTime,
     formatter,
+    formatterTime,
     number_format,
 }

+ 4 - 4
src/views/equipment/table/wbTable.vue

@@ -107,10 +107,10 @@
                     </template>
                 </el-table-column>
                 <el-table-column prop='reportdate' label='填报时间' width='140'>
-                    <template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate):'--'}}</template>
+                    <template slot-scope='{row}'>{{row.reportdate?formatterTime(row.reportdate):'--'}}</template>
                 </el-table-column>
                 <el-table-column prop='sjjssj' label='验收时间' width='140'>
-                    <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj): '--'}}</template>
+                    <template slot-scope='{row}'>{{row.sjjssj?formatterTime(row.sjjssj): '--'}}</template>
                 </el-table-column>
                 <el-table-column prop='wonum' label='任务编号' show-overflow-tooltip resizable width='90'>
                     <template slot-scope='{row}'>
@@ -139,7 +139,7 @@ import { queryWbsms } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import { Select } from 'meri-design'
 import inputDialog from './inputDIalog'
-import { formatter, number_format } from '@/utils/format.js'
+import { formatterTime, number_format } from '@/utils/format.js'
 export default {
     components: { Select, inputDialog },
     data() {
@@ -152,7 +152,7 @@ export default {
             reportdate: '',
             ischange: '2',
             sbjc: '',
-            formatter,
+            formatterTime,
             number_format,
             changeOption: [
                 {

+ 4 - 4
src/views/equipment/table/wxTable.vue

@@ -107,10 +107,10 @@
                     </template>
                 </el-table-column>
                 <el-table-column prop='reportdate' label='填报时间' width='140'>
-                    <template slot-scope='{row}'>{{row.reportdate?formatter(row.reportdate): '--'}}</template>
+                    <template slot-scope='{row}'>{{row.reportdate?formatterTime(row.reportdate): '--'}}</template>
                 </el-table-column>
                 <el-table-column prop='sjjssj' label='验收时间' width='140'>
-                    <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj): '--'}}</template>
+                    <template slot-scope='{row}'>{{row.sjjssj?formatterTime(row.sjjssj): '--'}}</template>
                 </el-table-column>
                 <el-table-column prop='wonum' label='工单编号' show-overflow-tooltip resizable width='80'>
                     <template slot-scope='{row}'>
@@ -139,7 +139,7 @@ import { queryWx } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
 import inputDialog from './inputDIalog'
 import { Select } from 'meri-design'
-import { formatter, number_format } from '@/utils/format.js'
+import { formatterTime, number_format } from '@/utils/format.js'
 export default {
     components: { Select, inputDialog },
     data() {
@@ -154,7 +154,7 @@ export default {
             sbjc: '',
             matters: '',
             wonum: '',
-            formatter,
+            formatterTime,
             number_format,
             imgUrl: [],
             changeOption: [

+ 1 - 1
src/views/equipment/table/zwTable.vue

@@ -275,7 +275,7 @@ export default {
                     smsxt: this.smsxt,
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
-                    diff: this.diff,
+                    difference: this.diff,
                     size: this.size
                 }
             }