<template>
|
<div>
|
<div style="display: flex; margin-top: 0.1rem">
|
<van-col :span="8">
|
<div class="table_box">
|
<div class="content2 table_head" style="border-top: 1px solid #e9e9e9">{{$t('ebookPage.type.TR')}}</div>
|
</div>
|
</van-col>
|
<van-col :span="10">
|
<div class="table_box">
|
<div class="content2 table_head" style="border-top: 1px solid #e9e9e9">{{$t('ebookPage.name.TR')}}</div>
|
</div>
|
</van-col>
|
<van-col :span="6">
|
<div class="table_box">
|
<div class="content3 table_head" style="border-top: 1px solid #e9e9e9">{{$t('ebookPage.operation.TR')}}</div>
|
</div>
|
</van-col>
|
</div>
|
<div
|
style="display: flex; flex-direction: column"
|
v-for="(file_item, file_index) in m_AttachFilesList"
|
:key="'fileTable' + file_index"
|
>
|
<div style="width: 100%">
|
<van-col :span="24" style="display: flex; width: 100%">
|
<van-col :span="8">
|
<div class="table_box">
|
<div class="content2">{{ file_item.AttachType }}</div>
|
</div>
|
</van-col>
|
<van-col :span="10" style="display: flex">
|
<div class="table_box">
|
<div class="content2" style="white-space: nowrap;">{{ file_item.Name }}</div>
|
</div>
|
</van-col>
|
<van-col :span="6" style="display: flex">
|
<div class="table_box">
|
<div class="content3" style="color:rgb(99, 150, 194);">
|
<a @click="downFileDoc(file_item)">{{$t('ebookPage.download.TR')}}</a>
|
</div>
|
</div>
|
</van-col>
|
</van-col>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
m_AttachFilesList: [], //文档列表
|
SeriesID: ""
|
};
|
},
|
methods: {
|
initAttachFiles(data, seriesID) {
|
// console.log(data,95)
|
data.forEach(element => {
|
element.DsFileName =
|
this.$globalConfig.WebApiUrl.FileUrl +
|
"Series" +
|
seriesID +
|
"/" +
|
element.DsFileName;
|
});
|
this.m_AttachFilesList = data;
|
},
|
getSeriesID(ID) {
|
this.SeriesID = ID;
|
},
|
downFileDoc(fileData) {
|
// console.log(fileData,75)
|
var userID = this.$store.state.instante.account.UserID;
|
if (userID == null || userID == 0) {
|
this.m_isShowLoadingFrm = false;
|
this.$store.commit(
|
"instante/account/preLoginPageRoute",
|
this.$route.fullPath
|
);
|
this.$store.dispatch("instante/account/logout");
|
return;
|
}
|
|
this.initFileDownLog(fileData);
|
window.open(fileData.DsFileName, "_blank");
|
},
|
//初始化附件下载日志
|
initFileDownLog(FileData) {
|
let url =
|
this.$globalConfig.WebApiUrl.MainUrl + "v1/FileDownLog/AddSeriesAttachLog";
|
this.$axios({
|
method: "post",
|
url: url,
|
data: {
|
UserType: this.$store.state.instante.account.UserType,
|
UserID: this.$store.state.instante.account.UserID,
|
SoftType: this.$globalConfig.SoftType,
|
Lang: FileData.Language,
|
FileID: FileData.ID,
|
SeriesID: this.SeriesID,
|
FileName: FileData.Name
|
}
|
})
|
.then(res => {
|
// console.log(res);
|
})
|
.catch(err => {
|
console.log(err);
|
});
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss">
|
.table_box {
|
width: 99%;
|
height: 30px;
|
display: flex;
|
border-left: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
.content2 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
// border-right: 1px solid #e9e9e9;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
.van-cell {
|
padding: 0;
|
line-height: 30px;
|
input {
|
text-align: center;
|
}
|
}
|
}
|
.content3 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
border-right: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
}
|
.table_head {
|
border-top: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
}
|
}
|
</style>
|