c27af4e9 by 焦小希

修改时间过滤器

1 parent 39438852
......@@ -68,6 +68,21 @@ var self = new Vue({
mounted(){
this.getData();
},
//私有过滤器
filters:{
dataFormat:function (originVal) {
const dt = new Date(originVal)
const y = dt.getFullYear()
const m = (dt.getMonth() + 1 + '').padStart(2, '0')
const d = (dt.getDate() + '').padStart(2, '0')
const hh = (dt.getHours() + '').padStart(2, '0')
const mm = (dt.getMinutes() + '').padStart(2, '0')
const ss = (dt.getSeconds() + '').padStart(2, '0')
// yyyy-mm-dd hh:mm:ss
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
}
},
methods:{
getData() {
axios.get(CONF_NEWGHSC_SERVERURL + '/dblb/list/worked', {
......
......@@ -183,6 +183,11 @@
align="center"
width="200"
>
<template slot-scope="scope">
<span>{{
scope.row.CREATETIME | dataFormat
}}</span>
</template>
</el-table-column>
<el-table-column
prop="RECEIVETIME"
......