@@ -66,14 +65,7 @@
@current-change="handleCurrentChange"
/>
-
-
-
-
-
-
-
-
+
@@ -82,10 +74,9 @@ import { ref } from 'vue'
// import { ElMessage, ElMessageBox } from 'element-plus'
import { Clock,View,Folder,Search } from '@element-plus/icons-vue'
import FileImage from '@/components/file-image/index.vue'
-import { getFileSuffix } from '@/utils/ruoyi'
+import FilePreview from '@/components/thirdFile-preview/index.vue'
import useUserStore from '@/store/modules/user'
import useResoureStore from '../store'
-import {getImgPath} from "@/api/file/third";
const userstore = useUserStore()
const sourceStore = useResoureStore()
@@ -93,8 +84,7 @@ const sourceStore = useResoureStore()
// const userInfo = userstore.user
//判断是否预览图片
const isViewImg = ref(false)
-//显示图片的路径
-const srcList = ref([])
+const thirdPreview = ref()
// 分页change
const handleSizeChange = (limit) => {
@@ -120,20 +110,9 @@ function timestampToDate(timestamp) {
return `${year}-${month}-${day}`;
}
//获取图片的路径
-const clickImg = (id) => {
- srcList.value = []
- getImgPath({itemId:id}).then(res => {
- if(res.code === 200){
- isViewImg.value = true
- res.data.forEach(item => {
- item.subsets.forEach(previewItem => {
- previewItem.previewFiles.forEach(fileItem => {
- srcList.value.push(fileItem.fileUrl)
- })
- })
- })
- }
- })
+const handleRow = (item) => {
+ isViewImg.value = true
+ thirdPreview.value.init(item.itemId)
}