[update] 修改企标稽查,企标计划,企标宣贯导出后缀;企标复审计划,企标稽查,企标计划中列表日期有特殊判断
This commit is contained in:
@@ -335,6 +335,11 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 表格中需要标红的样式 */
|
||||||
|
.table-red-text {
|
||||||
|
color: #D52C26;
|
||||||
|
}
|
||||||
|
|
||||||
/* 表格中换行链接的样式 */
|
/* 表格中换行链接的样式 */
|
||||||
.link-a {
|
.link-a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -127,11 +127,11 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 计划稽查日期: 到期前一周标红?? -->
|
<!-- 计划稽查日期: 到期前一周标红 -->
|
||||||
<template slot="scheduledCheckDate" slot-scope="{text}">
|
<template slot="scheduledCheckDate" slot-scope="{text}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
<div class="table-text" :class="{'table-red-text': text && new Date(Date.parse(text)) > sevenDaysAgo}">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -324,14 +324,21 @@ export default {
|
|||||||
clickEvent: 'handleRectificationPlan',
|
clickEvent: 'handleRectificationPlan',
|
||||||
has: 'enterpriseStandardLibrary:check:rectificationPlan'
|
has: 'enterpriseStandardLibrary:check:rectificationPlan'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
sevenDaysAgo: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getSysCategoryTree()
|
this.getSysCategoryTree()
|
||||||
|
this.sevenDaysAgo = this.getSevenDaysAgo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isHasPermission,
|
isHasPermission,
|
||||||
|
// 获取七天前日期
|
||||||
|
getSevenDaysAgo () {
|
||||||
|
const dateStr = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + (new Date().getDate() - 7)
|
||||||
|
return new Date(Date.parse(dateStr))
|
||||||
|
},
|
||||||
// 获取组织机构树
|
// 获取组织机构树
|
||||||
getSysCategoryTree () {
|
getSysCategoryTree () {
|
||||||
queryDepartTreeList().then((res) => {
|
queryDepartTreeList().then((res) => {
|
||||||
@@ -361,6 +368,49 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 导出
|
||||||
|
handleExportXls (fileName) {
|
||||||
|
if (!fileName || typeof fileName !== 'string') {
|
||||||
|
fileName = '导出文件'
|
||||||
|
}
|
||||||
|
const param = this.getQueryParams()
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
param.selections = this.selectedRowKeys.join(',')
|
||||||
|
}
|
||||||
|
console.log('导出参数', param)
|
||||||
|
// 加一个大的提示
|
||||||
|
const modalLoading = this.$info({
|
||||||
|
title: '提示',
|
||||||
|
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||||
|
keyboard: false
|
||||||
|
})
|
||||||
|
// 把知道了这个按钮去掉
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||||
|
})
|
||||||
|
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||||
|
if (!data) {
|
||||||
|
this.$message.warning('文件下载失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
|
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||||
|
} else {
|
||||||
|
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', fileName + '.xls')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link) // 下载完成移除元素
|
||||||
|
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
// 销毁这个提示
|
||||||
|
modalLoading.destroy()
|
||||||
|
})
|
||||||
|
},
|
||||||
// 导出延期数据
|
// 导出延期数据
|
||||||
handleExportPostponeData (fileName) {
|
handleExportPostponeData (fileName) {
|
||||||
if (!fileName || typeof fileName !== 'string') {
|
if (!fileName || typeof fileName !== 'string') {
|
||||||
|
|||||||
@@ -180,11 +180,11 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 草稿计划完成日期,征求意见稿计划完成日期,计划报批日期: 当前日期大于计划日期时标红?? -->
|
<!-- 草稿计划完成日期,征求意见稿计划完成日期,计划报批日期: 当前日期大于计划日期时标红 -->
|
||||||
<template slot="specialDate" slot-scope="{text}">
|
<template slot="specialDate" slot-scope="{text}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
<div class="table-text" :class="{'table-red-text' : text && new Date(Date.parse(text)) < new Date()}">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -204,6 +204,7 @@
|
|||||||
import { queryDepartTreeList } from '@/api/api'
|
import { queryDepartTreeList } from '@/api/api'
|
||||||
import JTable from '@/components/jero/JTable'
|
import JTable from '@/components/jero/JTable'
|
||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import { downFile } from '../../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlanList',
|
name: 'PlanList',
|
||||||
@@ -320,21 +321,21 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'draftPlannedCompleteDate',
|
dataIndex: 'draftPlannedCompleteDate',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'specialDate' }
|
||||||
},
|
},
|
||||||
{ // 征求意见稿计划完成日期
|
{ // 征求意见稿计划完成日期
|
||||||
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
|
title: this.$t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200,
|
width: 200,
|
||||||
dataIndex: 'solicitationDraftPlanCompleteDate',
|
dataIndex: 'solicitationDraftPlanCompleteDate',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'specialDate' }
|
||||||
},
|
},
|
||||||
{ // 计划报批日期
|
{ // 计划报批日期
|
||||||
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
|
title: this.$t('enterpriseStandardLibrary.plan.planSubmissionDate'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'planApprovalDate',
|
dataIndex: 'planApprovalDate',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'specialDate' }
|
||||||
},
|
},
|
||||||
{ // 草稿完成日期
|
{ // 草稿完成日期
|
||||||
title: this.$t('enterpriseStandardLibrary.plan.draftFinishDate'),
|
title: this.$t('enterpriseStandardLibrary.plan.draftFinishDate'),
|
||||||
@@ -462,6 +463,49 @@ export default {
|
|||||||
id: record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
handleExportXls (fileName) {
|
||||||
|
if (!fileName || typeof fileName !== 'string') {
|
||||||
|
fileName = '导出文件'
|
||||||
|
}
|
||||||
|
const param = this.getQueryParams()
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
param.selections = this.selectedRowKeys.join(',')
|
||||||
|
}
|
||||||
|
console.log('导出参数', param)
|
||||||
|
// 加一个大的提示
|
||||||
|
const modalLoading = this.$info({
|
||||||
|
title: '提示',
|
||||||
|
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||||
|
keyboard: false
|
||||||
|
})
|
||||||
|
// 把知道了这个按钮去掉
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||||
|
})
|
||||||
|
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||||
|
if (!data) {
|
||||||
|
this.$message.warning('文件下载失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
|
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||||
|
} else {
|
||||||
|
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', fileName + '.xls')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link) // 下载完成移除元素
|
||||||
|
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
// 销毁这个提示
|
||||||
|
modalLoading.destroy()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ import Vue from 'vue'
|
|||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import { previewPdf } from '@/utils/previewPdf'
|
import { previewPdf } from '@/utils/previewPdf'
|
||||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||||
|
import { downFile } from '../../../api/manage'
|
||||||
|
|
||||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||||
const FILE_TYPE_PDF = 'pdf'
|
const FILE_TYPE_PDF = 'pdf'
|
||||||
@@ -226,6 +227,49 @@ export default {
|
|||||||
// 其余可预览文件仍使用KKFile进行预览
|
// 其余可预览文件仍使用KKFile进行预览
|
||||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||||
window.open(url)
|
window.open(url)
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
handleExportXls (fileName) {
|
||||||
|
if (!fileName || typeof fileName !== 'string') {
|
||||||
|
fileName = '导出文件'
|
||||||
|
}
|
||||||
|
const param = this.getQueryParams()
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
param.selections = this.selectedRowKeys.join(',')
|
||||||
|
}
|
||||||
|
console.log('导出参数', param)
|
||||||
|
// 加一个大的提示
|
||||||
|
const modalLoading = this.$info({
|
||||||
|
title: '提示',
|
||||||
|
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
|
||||||
|
keyboard: false
|
||||||
|
})
|
||||||
|
// 把知道了这个按钮去掉
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||||
|
})
|
||||||
|
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||||
|
if (!data) {
|
||||||
|
this.$message.warning('文件下载失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
|
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||||
|
} else {
|
||||||
|
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', fileName + '.xls')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link) // 下载完成移除元素
|
||||||
|
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
// 销毁这个提示
|
||||||
|
modalLoading.destroy()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,11 +85,11 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 复审日期: 大于当前日期时标红?? -->
|
<!-- 复审日期: 大于当前日期时标红 -->
|
||||||
<template slot="reviewDate" slot-scope="{text}">
|
<template slot="reviewDate" slot-scope="{text}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
<div class="table-text" :class="{'table-red-text' : text && new Date(Date.parse(text)) > new Date()}">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user