
--- client/views/pages/admin/technology/TechSelectOne.vue
+++ client/views/pages/admin/technology/TechSelectOne.vue
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 |
<table class="selectone-table"> |
12 | 12 |
<colgroup> |
13 | 13 |
<col width="10%" /> |
14 |
- <col width="90%" /> |
|
14 |
+ <col width="90%" /> |
|
15 | 15 |
</colgroup> |
16 | 16 |
<tbody> |
17 | 17 |
<tr> |
... | ... | @@ -33,21 +33,21 @@ |
33 | 33 |
</tr> |
34 | 34 |
<tr> |
35 | 35 |
<td colspan="2"> |
36 |
- <div v-if="post.ctgry_nm == 'service'"> |
|
36 |
+ <div v-if="post.ctgry_nm == 'service'"> |
|
37 | 37 |
<table class="tech-table"> |
38 |
- <tr> |
|
39 |
- <th style="width: 50px;"> |
|
40 |
- <p>배포날짜</p> |
|
41 |
- </th> |
|
42 |
- <td>{{ post.tech_doc_dt }}</td> |
|
43 |
- </tr> |
|
44 |
- <tr> |
|
45 |
- <th> |
|
46 |
- <p>링크</p> |
|
47 |
- </th> |
|
48 |
- <td>{{ post.link_url }}</td> |
|
49 |
- </tr> |
|
50 |
- </table> |
|
38 |
+ <tr> |
|
39 |
+ <th style="width: 50px;"> |
|
40 |
+ <p>배포날짜</p> |
|
41 |
+ </th> |
|
42 |
+ <td>{{ post.tech_doc_dt }}</td> |
|
43 |
+ </tr> |
|
44 |
+ <tr> |
|
45 |
+ <th> |
|
46 |
+ <p>링크</p> |
|
47 |
+ </th> |
|
48 |
+ <td>{{ post.link_url }}</td> |
|
49 |
+ </tr> |
|
50 |
+ </table> |
|
51 | 51 |
</div> |
52 | 52 |
<div class="tech-info" v-else> |
53 | 53 |
<span class="tech-info-img"> |
... | ... | @@ -93,10 +93,10 @@ |
93 | 93 |
</tr> |
94 | 94 |
<tr v-if="post.ctgry_nm != 'service'"> |
95 | 95 |
<td colspan="2" style="border-bottom: 1px solid #007aff;"> |
96 |
- <div id="viewer" ref="viewer" class="viewer"></div> |
|
96 |
+ <div v-if="post.ctgry_nm !== 'service'" id="viewer" ref="viewer" class="viewer"></div> |
|
97 | 97 |
</td> |
98 | 98 |
</tr> |
99 |
- <tr v-if="post.ctgry_nm != 'service'"> |
|
99 |
+ <tr v-if="post.ctgry_nm != 'service'"> |
|
100 | 100 |
<th style="width: 10%;">썸네일</th> |
101 | 101 |
<td class="file-list-zone"> |
102 | 102 |
<div v-if="thumbnailFileList.length == 0"> |
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 |
</ul> |
108 | 108 |
</td> |
109 | 109 |
</tr> |
110 |
- <tr class="file-zone" v-if="post.ctgry_nm != 'service'"> |
|
110 |
+ <tr class="file-zone" v-if="post.ctgry_nm != 'service'"> |
|
111 | 111 |
<th style="width: 10%;">첨부파일명</th> |
112 | 112 |
<td class="file-list-zone"> |
113 | 113 |
<div v-if="attachFileList.length == 0"> |
... | ... | @@ -229,7 +229,7 @@ |
229 | 229 |
postSelectOne: function () { |
230 | 230 |
const vm = this; |
231 | 231 |
axios({ |
232 |
- url: '/post/techPostSelectOne.json', |
|
232 |
+ url: '/post/techAdPostSelectOne.json', |
|
233 | 233 |
method: 'post', |
234 | 234 |
hearder: { |
235 | 235 |
'Content-Type': "application/json; charset=UTF-8", |
... | ... | @@ -264,23 +264,25 @@ |
264 | 264 |
}) |
265 | 265 |
}, |
266 | 266 |
getViewer(data) { |
267 |
- this.viewer = new Viewer({ |
|
268 |
- el: this.$refs.viewer, |
|
269 |
- initialEditType: 'wysiwyg', |
|
270 |
- previewStyle: 'vertical', |
|
271 |
- initialValue: data, |
|
272 |
- customHTMLRenderer: { |
|
273 |
- htmlBlock: { |
|
274 |
- iframe(node) { |
|
275 |
- return [ |
|
276 |
- { type: 'openTag', tagName: 'iframe', outerNewLine: true, attributes: node.attrs }, |
|
277 |
- { type: 'html', content: node.childrenHTML }, |
|
278 |
- { type: 'closeTag', tagName: 'iframe', outerNewLine: true }, |
|
279 |
- ]; |
|
280 |
- }, |
|
281 |
- } |
|
282 |
- }, |
|
283 |
- }); |
|
267 |
+ this.$nextTick(() => { |
|
268 |
+ this.viewer = new Viewer({ |
|
269 |
+ el: this.$refs.viewer, |
|
270 |
+ initialEditType: 'wysiwyg', |
|
271 |
+ previewStyle: 'vertical', |
|
272 |
+ initialValue: data, |
|
273 |
+ customHTMLRenderer: { |
|
274 |
+ htmlBlock: { |
|
275 |
+ iframe(node) { |
|
276 |
+ return [ |
|
277 |
+ { type: 'openTag', tagName: 'iframe', outerNewLine: true, attributes: node.attrs }, |
|
278 |
+ { type: 'html', content: node.childrenHTML }, |
|
279 |
+ { type: 'closeTag', tagName: 'iframe', outerNewLine: true }, |
|
280 |
+ ]; |
|
281 |
+ }, |
|
282 |
+ } |
|
283 |
+ }, |
|
284 |
+ }); |
|
285 |
+ }) |
|
284 | 286 |
}, |
285 | 287 |
|
286 | 288 |
downloadFile: function (item) { |
... | ... | @@ -351,7 +353,7 @@ |
351 | 353 |
console.log('------------이동-----------') |
352 | 354 |
console.log(vm.route) |
353 | 355 |
axios({ |
354 |
- url: '/post/techPostSelectOne.json', |
|
356 |
+ url: '/post/techAdPostSelectOne.json', |
|
355 | 357 |
method: 'post', |
356 | 358 |
hearder: { |
357 | 359 |
'Content-Type': "application/json; charset=UTF-8", |
... | ... | @@ -369,16 +371,19 @@ |
369 | 371 |
vm.fileList = response.data.selectFileList; |
370 | 372 |
vm.thumbnailFileList = [] |
371 | 373 |
vm.attachFileList = [] |
372 |
- for (let i = 0; i < vm.fileList.length; i++) { |
|
373 |
- if (vm.fileList[i].file_ty === 'thumbnail') { |
|
374 |
- vm.thumbnailFileList.push(vm.fileList[i]); |
|
375 |
- } else { |
|
376 |
- vm.attachFileList.push(vm.fileList[i]); |
|
374 |
+ if (response.data.selectFileList.length != 0) { |
|
375 |
+ vm.fileList = response.data.selectFileList; |
|
376 |
+ vm.thumbnailFileList = []; |
|
377 |
+ vm.attachFileList = []; |
|
378 |
+ for (let i = 0; i < vm.fileList.length; i++) { |
|
379 |
+ if (vm.fileList[i].file_ty === 'thumbnail') { |
|
380 |
+ vm.thumbnailFileList.push(vm.fileList[i]); |
|
381 |
+ } else { |
|
382 |
+ vm.attachFileList.push(vm.fileList[i]); |
|
383 |
+ } |
|
377 | 384 |
} |
385 |
+ vm.src = 'http://localhost:8080' + vm.thumbnailFileList[0].file_path.replace('C:', '') + '/' + vm.thumbnailFileList[0].file_nm + '.' + vm.thumbnailFileList[0].file_extn_nm |
|
378 | 386 |
} |
379 |
- vm.src = 'http://localhost:8080' + vm.thumbnailFileList[0].file_path.replace('C:', '') + '/' + vm.thumbnailFileList[0].file_nm + '.' + vm.thumbnailFileList[0].file_extn_nm |
|
380 |
- |
|
381 |
- |
|
382 | 387 |
vm.getViewer(vm.post.post_content) |
383 | 388 |
}).catch(function (error) { |
384 | 389 |
console.log("error - ", error) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?