yjryu / KERIS star
류윤주 류윤주 2023-12-01
231201 이세현 이전글 다음글 첨부파일
@33c7c56a55874d6dc09edda5dd306f946a9a3875
client/views/pages/admin/technology/TechSelectOne.vue
--- client/views/pages/admin/technology/TechSelectOne.vue
+++ client/views/pages/admin/technology/TechSelectOne.vue
@@ -330,6 +330,17 @@
                 vm.post = response.data.techPostSelectOne.post;
                 vm.nextPost = response.data.techPostSelectOne.nextPost;
                 vm.fileList = response.data.selectFileList;
+                vm.thumbnailFileList = []
+                vm.attachFileList = []
+                for (let i = 0; i < vm.fileList.length; i++) {
+                    if (vm.fileList[i].file_ty === 'thumbnail') {
+                        vm.thumbnailFileList.push(vm.fileList[i]);
+                    } else {
+                        vm.attachFileList.push(vm.fileList[i]);
+                    }
+                }
+                vm.src = 'http://localhost:8080' + vm.thumbnailFileList[0].file_path.replace('C:', '') + '/' + vm.thumbnailFileList[0].file_nm + '.' + vm.thumbnailFileList[0].file_extn_nm
+
 
                 vm.getViewer(vm.post.post_content)
             }).catch(function (error) {
client/views/pages/user/Data/TechnologyOne.vue
--- client/views/pages/user/Data/TechnologyOne.vue
+++ client/views/pages/user/Data/TechnologyOne.vue
@@ -288,6 +288,17 @@
                 vm.post = response.data.techPostSelectOne.post;
                 vm.nextPost = response.data.techPostSelectOne.nextPost;
                 vm.fileList = response.data.selectFileList;
+                vm.thumbnailFileList = []
+                vm.attachFileList = []
+                for (let i = 0; i < vm.fileList.length; i++) {
+                    if (vm.fileList[i].file_ty === 'thumbnail') {
+                        vm.thumbnailFileList.push(vm.fileList[i]);
+                    } else {
+                        vm.attachFileList.push(vm.fileList[i]);
+                    }
+                }
+                vm.src = 'http://localhost:8080' + vm.thumbnailFileList[0].file_path.replace('C:', '') + '/' + vm.thumbnailFileList[0].file_nm + '.' + vm.thumbnailFileList[0].file_extn_nm
+
                 vm.getViewer(vm.post.post_content)
             }).catch(function (error) {
                 console.log("error - ", error)
Add a comment
List