|
|
@@ -6,6 +6,9 @@
|
|
|
<el-button type="primary" plain @click="disabled = !disabled"
|
|
|
>{{ disabled ? '编 辑' : '保 存' }}
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" plain @click="libraryDetail">
|
|
|
+ 查 看</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="padding">
|
|
|
@@ -90,6 +93,11 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+ <el-image-viewer
|
|
|
+ v-if="showImage"
|
|
|
+ :url-list="preList"
|
|
|
+ @close="showImage = false"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -123,6 +131,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ showImage: false,
|
|
|
+ preList: [],
|
|
|
disabled: true,
|
|
|
typeDic: [],
|
|
|
stuasDic: [],
|
|
|
@@ -184,6 +194,19 @@ export default {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 以图片形式查看文件
|
|
|
+ */
|
|
|
+ libraryDetail() {
|
|
|
+ this.$api.project
|
|
|
+ .articleDetailByFile(this.form.fileFolder.fileId)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.preList = res.data.imgs.map(e => e.filePath)
|
|
|
+ this.showImage = true
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|