[add] 分标委在研项目
This commit is contained in:
@@ -660,3 +660,22 @@ export function isAllEqual(array) {
|
|||||||
return true
|
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) {
|
if (res.success) {
|
||||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
this.dataSource = res.result.result.records
|
this.dataSource = res.result.result.records
|
||||||
if (res.result.total) {
|
if (res.result.result.total) {
|
||||||
this.ipagination.total = res.result.total
|
this.ipagination.total = res.result.result.total
|
||||||
//清空列表选中
|
|
||||||
this.onClearSelected()
|
|
||||||
} else {
|
} else {
|
||||||
this.ipagination.total = 0
|
this.ipagination.total = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
bordered
|
||||||
:rowKey="record => record.id || record.childrenId"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@@ -24,6 +23,10 @@
|
|||||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
</template>
|
</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">
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
<a @click="handleDownload(record)">下载</a>
|
<a @click="handleDownload(record)">下载</a>
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
import { downloadFile } from '../../../api/manage'
|
import { downloadFile } from '../../../api/manage'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '../../../store/mutation-types'
|
import { ACCESS_TOKEN } from '../../../store/mutation-types'
|
||||||
|
import { processingTimestamp } from '../../../utils/util'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -76,6 +80,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
processingTimestamp,
|
||||||
/**
|
/**
|
||||||
* 下载
|
* 下载
|
||||||
* @param record
|
* @param record
|
||||||
@@ -100,6 +105,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
|
this.dataSource = []
|
||||||
this.visible = false
|
this.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user