[add] 分标委在研项目

This commit is contained in:
zhaoxiao
2021-12-14 15:03:03 +08:00
parent 931af39e09
commit f1a10730cf
3 changed files with 28 additions and 5 deletions
+19
View File
@@ -660,3 +660,22 @@ export function isAllEqual(array) {
return true
}
}
/**
* 将时间戳转换为YYYY-MM-DD HH:mm:ss格式
*/
export function processingTimestamp(value) {
let data = new Date(value)
let y = data.getFullYear()
let m = data.getMonth() + 1
m = m < 10 ? ('0' + m) : m
let d = data.getDate()
d = d < 10 ? ('0' + d) : d
let h = data.getHours()
h = h < 10 ? ('0' + h) : h
let minute = data.getMinutes()
let second = data.getSeconds()
minute = minute < 10 ? ('0' + minute) : minute
second = second < 10 ? ('0' + second) : second
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
}
@@ -160,10 +160,8 @@ export default {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.result.records
if (res.result.total) {
this.ipagination.total = res.result.total
//清空列表选中
this.onClearSelected()
if (res.result.result.total) {
this.ipagination.total = res.result.result.total
} else {
this.ipagination.total = 0
}
@@ -13,7 +13,6 @@
ref="table"
size="middle"
bordered
:rowKey="record => record.id || record.childrenId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
@@ -24,6 +23,10 @@
<j-ellipsis :value="text" :length="18"></j-ellipsis>
</template>
<template slot="time" slot-scope="text">
<j-ellipsis :value="processingTimestamp(text)" :length="20"></j-ellipsis>
</template>
<!-- 操作-->
<span slot="action" class="action-span-cell" slot-scope="text, record">
<a @click="handleDownload(record)">下载</a>
@@ -43,6 +46,7 @@
import { downloadFile } from '../../../api/manage'
import Vue from 'vue'
import { ACCESS_TOKEN } from '../../../store/mutation-types'
import { processingTimestamp } from '../../../utils/util'
const columns = [
{
@@ -76,6 +80,7 @@ export default {
}
},
methods: {
processingTimestamp,
/**
* 下载
* @param record
@@ -100,6 +105,7 @@ export default {
}
},
handleCancel() {
this.dataSource = []
this.visible = false
}
}