|
|
@@ -31,10 +31,15 @@
|
|
|
<div>{{ trainingData?.recorderName }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
+
|
|
|
<div class="label labelPeople">培训资料</div>
|
|
|
<template v-for="item in studyList">
|
|
|
-
|
|
|
- <imgCom :width="'100'" v-if="this_window.origin+item.url" :key="item.url" :height="'100'" :src="this_window.origin+item.url"></imgCom>
|
|
|
+ <div :key="item.url" class="imglIST" style="{width:'100px',height: '100px';}">
|
|
|
+
|
|
|
+ <imgCom :width="'100'" v-if="this_window.origin+item.url&&item.type==0" :height="'100'" :src="this_window.origin+item.url"></imgCom>
|
|
|
+ <!-- <VuePdf v-else :src="this_window.origin+item.url"></VuePdf> -->
|
|
|
+ <VuePdf v-else :src="this_window.origin+'/statics/2023/09/14/20230914210939A064.pdf'"></VuePdf>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
@@ -88,10 +93,12 @@ import { upload } from '@/api/public'
|
|
|
import imgCom from '@/components/imgCom/index.vue'
|
|
|
import { base64ToBlob } from '@/utils/base64TurnImg.js'
|
|
|
import config from '@/config/index'
|
|
|
+import VuePdf from "vue-pdf"
|
|
|
export default {
|
|
|
name: 'SocAppAddTraining',
|
|
|
components: {
|
|
|
NavBar,
|
|
|
+ VuePdf,
|
|
|
imgCom,
|
|
|
writingPad
|
|
|
},
|
|
|
@@ -129,8 +136,14 @@ export default {
|
|
|
let list = data.fileList || []
|
|
|
if (list.length > 0) {
|
|
|
list.forEach(item => {
|
|
|
-
|
|
|
- this.studyList.push(JSON.parse(item))
|
|
|
+ let i=JSON.parse(item)
|
|
|
+ console.log(i);
|
|
|
+ if(i.url.split('.')[1]=='pdf'){
|
|
|
+ i.type=1
|
|
|
+ }else{
|
|
|
+ i.type=0
|
|
|
+ }
|
|
|
+ this.studyList.push(i)
|
|
|
})
|
|
|
}
|
|
|
|