Commit 5bf56243 authored by xioln's avatar xioln

电子邮箱功能移动端需要查看上传的附件\手机端登录页面和主页都提醒保密要求

parent 2bf39f8d
<template>
<div class="mail-attachment">
<table-cell
ref="tableCell"
:tableData="tableData"
:tableColumns="columns"
@linkToUrl="link"
></table-cell>
<van-loading v-if="!tableData" type="spinner" size="24px" vertical />
<van-empty v-if="tableData.length === 0" description="数据为空" />
</div>
</template>
<script>
import TableCell from '@/components/tableCell'
import { downFileByFileIdFile } from '@/api/file'
export default {
props: {
basicData: {
type: Object,
default: () => { }
}
},
components: { TableCell },
data () {
return {
columns: [
{
title: '文件名',
key: 'originalFileName',
type: 'link'
},
{
title: '文件大小',
key: 'fileSize'
},
{
title: '扩展名',
key: 'fileExtension'
},
{
title: '创建者',
key: 'creator.userName'
}
],
allTableData: {},
activeNames: [],
tableData: []
}
},
watch: {
'basicData.objFileLinks': {
deep: true,
handler: function (val) {
if (val.length > 0) {
this.tableData = val.map(item => {
item.target.fileSize = this.$utils.formatGMK(item.target.fileSize)
return item.target
})
}
},
immediate: true
}
},
created () {
},
mounted () {
},
computed: {},
methods: {
link(item) {
downFileByFileIdFile(item.id).then(res => {
this.downLoadFileUrl(res)
}).catch(e => {
var reader = new FileReader()
reader.readAsText(e.data, 'utf-8')
reader.onload = (e) => {
const data = JSON.parse(reader.result)
this.$message.error(data.message)
}
})
},
downLoadFileUrl(res) {
if (res.headers['content-disposition']) {
const fileName = decodeURI(res.headers['content-disposition'].substring(res.headers['content-disposition'].indexOf('=') + 1, res.headers['content-disposition'].length))
const url = window.URL.createObjectURL(new Blob([res.data], { type: res.headers['content-type'] }))
this.$utils.downLoadFileUrl(url, decodeURI(fileName))
} else {
if (res.data instanceof Blob) {
var reader = new FileReader()
reader.addEventListener('loadend', () => {
const message = reader.result && JSON.parse(reader.result)
this.$utils.showMessage(message ? message.message : '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!', 'warning')
})
reader.readAsText(res.data, 'utf-8')
} else {
const message = res.data && res.data.message
this.$utils.showMessage(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!', 'warning')
}
}
}
}
}
</script>
<style lang="scss" scoped>
.mail-attachment {
padding: 10px;
}
</style>
......@@ -24,16 +24,16 @@
<div v-if="activeTab === 'ecrTab'">
<EcrTab :basicData="form" />
</div>
<div v-if="activeTab === 'dxBaseTab'">
<div v-if="activeTab === 'dxBaseTab'">
<DxBaseTab :basicData="form" />
</div>
<div v-if="activeTab === 'dxPartTab'">
<div v-if="activeTab === 'dxPartTab'">
<DxPartTab :basicData="form" />
</div>
<div v-if="activeTab === 'extMaterialBillTab'">
<div v-if="activeTab === 'extMaterialBillTab'">
<ExtMaterialBillTab :basicData="form" />
</div>
<div v-if="activeTab === 'actionAttachment'">
<div v-if="activeTab === 'actionAttachment'">
<ActionAttachment :basicData="form" />
</div>
</van-tab>
......@@ -143,6 +143,14 @@ export default {
this.activeTab = 'baseInfo'
await this.getFormData()
await this.getForm()
} else if (['ExtEmail', 'ExtShareInfo'].includes(this.$route.query.dxClassname)) {
this.tabs = [
{ title: '基本信息', key: 'baseInfo' },
{ title: '附件', key: 'actionAttachment' }
]
this.activeTab = 'baseInfo'
await this.getFormData()
await this.getForm()
} else if (['ExtActionInfo'].includes(this.$route.query.dxClassname)) {
this.tabs = [
{ title: '基本信息', key: 'baseInfo' },
......@@ -255,7 +263,7 @@ export default {
fiiterData (formData) {
formData.forEach(item => {
if (item.title && item.title !== '关联文档' && item.title !== '附件') {
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
const that = this
const fd = {
title: item.title,
......@@ -263,7 +271,7 @@ export default {
data: item.data.map(d => {
let show = false
if (d.component?.obscure) {
// eslint-disable-next-line no-eval
// eslint-disable-next-line no-eval
show = eval(d.component?.obscure.replace(/this/g, 'that'))
}
return {
......@@ -294,7 +302,7 @@ export default {
data: item.data.map(d => {
let show = false
if (d.component?.obscure) {
// eslint-disable-next-line no-eval
// eslint-disable-next-line no-eval
show = eval(d.component?.obscure.replace(/this/g, 'that'))
}
return {
......
......@@ -5,7 +5,8 @@
<div class="logo">
<span class="logo-title">
<img src="../../assets/login/logo.png" />
配套产品协同管理系统
配套产品协同管理系统&nbsp;
<span style="color:red;font-size:12px">(本系统禁止处理涉密信息!)</span>
</span>
</div>
</div>
......
......@@ -5,9 +5,10 @@
<!-- <van-image :src="require('@/assets/home/logo_title1.png')" /> -->
<span class="logo-title">
<img src="../../assets/login/logo.png" />
配套产品协同管理系统
<span>配套产品协同管理系统</span>
</span>
</div>
<div class="sub-title">本系统禁止处理涉密信息!</div>
<div class="login">
<div class="login-form">
<dee-form
......@@ -201,7 +202,6 @@ export default {
align-items: center;
justify-content: center;
margin-bottom: 5.74%;
img {
width: 250px;
height: 55px;
......@@ -214,7 +214,6 @@ export default {
display: flex;
align-items: center;
justify-content: center;
img {
width: 18px;
height: 18px;
......@@ -223,6 +222,12 @@ export default {
}
}
.sub-title {
font-size: 12px;
text-align: center;
color: red;
}
.login {
margin: 0 auto;
width: 84.3%;
......@@ -283,8 +288,8 @@ export default {
top: 30px;
}
.van-field__button{
img{
.van-field__button {
img {
width: 80px;
height: 35px;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment