培训文档管理预览附件
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-05-19 14:48:47 +08:00
parent d6e9f9ddc2
commit 355f6bcf86
1 changed files with 15 additions and 4 deletions

View File

@ -167,7 +167,8 @@
<attachmentList v-if="config.visible" :config="config" :rowData="currentRow" :SystemDocumentId="SystemDocumentId"
@getList="getList" />
<!-- 预览文件 -->
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" v-if="perview_visible" />
<attachmentPreview :SystemDocumentId="SystemDocumentId" :visible.sync="perview_visible" :isView="true"
v-if="perview_visible" />
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')"
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
<span style="position: fixed; left: 16px; top: 45px;cursor: pointer;font-size: 18px;color:#409EFF"
@ -182,7 +183,7 @@
</BaseContainer>
</template>
<script>
import { getSystemDocumentList, deleteSystemDocument, publishSystemDocument, outLineSystemDocument } from '@/api/dictionary'
import { getSystemDocumentList, deleteSystemDocument, publishSystemDocument, outLineSystemDocument, getSystemDocumentAttachmentList } from '@/api/dictionary'
import { userAbandonDoc, getTrialUserTypeList } from '@/api/trials'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
@ -335,13 +336,23 @@ export default {
this.editVisible = true
},
//
handlePreview(row) {
async handlePreview(row) {
const { Name, FullFilePath } = row
this.currentRow = row
this.currentPath = FullFilePath
this.currentType = row.Name
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
let searchData = {
OffLine: false,
PageIndex: 1,
PageSize: 1000,
Asc: false,
SortField: null,
SystemDocumentId: row.Id
}
this.currentRow = Object.assign({}, row)
let res = await getSystemDocumentAttachmentList(searchData)
this.currentRow.AttachmentCount = res.Result.CurrentPageData.length
this.previewVisible = true
},
//