[update] 企标流程联调
This commit is contained in:
@@ -9,16 +9,16 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--项目名称-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('expirationDate')">
|
||||
<a-range-picker
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="queryParam.publicizeData"
|
||||
@change="searchQuery">
|
||||
</a-range-picker>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--<a-col :md="8" :sm="12">-->
|
||||
<!-- <a-form-item :label="$t('expirationDate')">-->
|
||||
<!-- <a-range-picker-->
|
||||
<!-- value-format="YYYY-MM-DD"-->
|
||||
<!-- format="YYYY-MM-DD"-->
|
||||
<!-- v-model="queryParam.publicizeData"-->
|
||||
<!-- @change="searchQuery">-->
|
||||
<!-- </a-range-picker>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!--</a-col>-->
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<div style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
@@ -44,6 +44,16 @@
|
||||
:scroll="{x: '100%'}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 耗时 -->
|
||||
<template v-slot:timeConsuming="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ record.endTime && record.createTime ? computedTimeConsuming(record) : global.emptyLine }}</template>
|
||||
<div class="table-text">
|
||||
{{ record.endTime && record.createTime ? computedTimeConsuming(record) : global.emptyLine }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--审批意见-->
|
||||
<template v-slot:approvalOpinion="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
@@ -158,9 +168,9 @@ export default {
|
||||
},
|
||||
// 耗时
|
||||
{
|
||||
dataIndex: 'projectHealth_dictText',
|
||||
title: this.$t('workCenter.processDetail.timeConsuming'),
|
||||
width: 100
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'timeConsuming' }
|
||||
},
|
||||
// 审批意见
|
||||
{
|
||||
@@ -228,6 +238,24 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 计算耗时
|
||||
computedTimeConsuming (record) {
|
||||
// 结束时间和创建时间
|
||||
const endTime = new Date(record.endTime)
|
||||
const createTime = new Date(record.createTime)
|
||||
// 计算时间差 转化为秒数
|
||||
const time = parseInt((endTime.getTime() - createTime.getTime()) / 1000)
|
||||
// 总秒数转化为对应的天数
|
||||
const days = parseInt(time / (24 * 60 * 60))
|
||||
// 计算小时
|
||||
const hours = parseInt((time % (24 * 60 * 60)) / (60 * 60))
|
||||
// 计算分钟
|
||||
const minutes = parseInt((time % (60 * 60)) / 60)
|
||||
// 计算秒
|
||||
const seconds = time % 60
|
||||
return (days ? days + '天 ' : '') + (hours ? hours + '小时 ' : '') +
|
||||
(minutes ? minutes + '分钟 ' : '') + (seconds ? seconds + '秒' : '')
|
||||
},
|
||||
// 附件列的查看点击
|
||||
fileLook (record) {
|
||||
this.$refs.uploadFile.open(record.commitFile)
|
||||
|
||||
@@ -314,7 +314,7 @@ export default {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileSuffix)
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (!canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.response.result.id)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
return
|
||||
}
|
||||
// pdf预览
|
||||
if (!canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(file.response.result.id)
|
||||
window.open(url)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user