|  | @@ -25,10 +25,7 @@
 | 
											
												
													
														|  |          v-for="(item, index) in list"
 |  |          v-for="(item, index) in list"
 | 
											
												
													
														|  |          :key="index"
 |  |          :key="index"
 | 
											
												
													
														|  |          class="sources-item"
 |  |          class="sources-item"
 | 
											
												
													
														|  | -        :class="[
 |  | 
 | 
											
												
													
														|  | -          select_sources_id === item.id ? 'active' : '',
 |  | 
 | 
											
												
													
														|  | -          type_index === 5 ? 'sources-item-txt' : type_index === 3 ? 'sources-item-zip' : '',
 |  | 
 | 
											
												
													
														|  | -        ]"
 |  | 
 | 
											
												
													
														|  | 
 |  | +        :class="[select_sources_id === item.id ? 'active' : '', type_index === 5 ? 'sources-item-txt' : '']"
 | 
											
												
													
														|  |          @click="selectSourceNode(item)"
 |  |          @click="selectSourceNode(item)"
 | 
											
												
													
														|  |        >
 |  |        >
 | 
											
												
													
														|  |          <template v-if="type_index === 0"> <el-image :src="item.file_url" fit="contain" /></template>
 |  |          <template v-if="type_index === 0"> <el-image :src="item.file_url" fit="contain" /></template>
 | 
											
										
											
												
													
														|  | @@ -42,10 +39,17 @@
 | 
											
												
													
														|  |            />
 |  |            />
 | 
											
												
													
														|  |          </template>
 |  |          </template>
 | 
											
												
													
														|  |          <template v-else-if="type_index === 2">
 |  |          <template v-else-if="type_index === 2">
 | 
											
												
													
														|  | -          <video controls :src="item.file_url" width="100%" height="140px"></video>
 |  | 
 | 
											
												
													
														|  | 
 |  | +          <video
 | 
											
												
													
														|  | 
 |  | +            class="sources-item-border"
 | 
											
												
													
														|  | 
 |  | +            :src="item.file_url"
 | 
											
												
													
														|  | 
 |  | +            width="100%"
 | 
											
												
													
														|  | 
 |  | +            height="140px"
 | 
											
												
													
														|  | 
 |  | +            :poster="item.video_preview_image_file_url"
 | 
											
												
													
														|  | 
 |  | +            preload="none"
 | 
											
												
													
														|  | 
 |  | +          ></video>
 | 
											
												
													
														|  |          </template>
 |  |          </template>
 | 
											
												
													
														|  |          <template v-else-if="type_index === 3">
 |  |          <template v-else-if="type_index === 3">
 | 
											
												
													
														|  | -          <iframe class="sources-item-border" :src="item.new_path" width="100%" height="300px" frameborder="0"></iframe>
 |  | 
 | 
											
												
													
														|  | 
 |  | +          <!-- <iframe class="sources-item-border" :src="item.new_path" width="100%" height="300px" frameborder="0"></iframe> -->
 | 
											
												
													
														|  |          </template>
 |  |          </template>
 | 
											
												
													
														|  |          <template v-else-if="type_index === 4"> </template>
 |  |          <template v-else-if="type_index === 4"> </template>
 | 
											
												
													
														|  |          <template v-else-if="type_index === 5">
 |  |          <template v-else-if="type_index === 5">
 | 
											
										
											
												
													
														|  | @@ -62,7 +66,15 @@
 | 
											
												
													
														|  |            </div>
 |  |            </div>
 | 
											
												
													
														|  |            <template #reference>
 |  |            <template #reference>
 | 
											
												
													
														|  |              <div class="sources-info">
 |  |              <div class="sources-info">
 | 
											
												
													
														|  | -              <p class="name">{{ item.name }}</p>
 |  | 
 | 
											
												
													
														|  | 
 |  | +              <p class="name">
 | 
											
												
													
														|  | 
 |  | +                {{ item.name
 | 
											
												
													
														|  | 
 |  | +                }}<SvgIcon
 | 
											
												
													
														|  | 
 |  | +                  v-show="item.file_id && (type_index === 3 || type_index === 2)"
 | 
											
												
													
														|  | 
 |  | +                  icon-class="uploadPreview"
 | 
											
												
													
														|  | 
 |  | +                  size="16"
 | 
											
												
													
														|  | 
 |  | +                  @click="viewDialog(item)"
 | 
											
												
													
														|  | 
 |  | +                />
 | 
											
												
													
														|  | 
 |  | +              </p>
 | 
											
												
													
														|  |                <b class="label">{{ item.label }}</b>
 |  |                <b class="label">{{ item.label }}</b>
 | 
											
												
													
														|  |              </div>
 |  |              </div>
 | 
											
												
													
														|  |            </template>
 |  |            </template>
 | 
											
										
											
												
													
														|  | @@ -75,21 +87,37 @@
 | 
											
												
													
														|  |        <el-button @click="dialogClose">取消</el-button>
 |  |        <el-button @click="dialogClose">取消</el-button>
 | 
											
												
													
														|  |        <el-button type="primary" @click="confirmSelect">选择</el-button>
 |  |        <el-button type="primary" @click="confirmSelect">选择</el-button>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  | 
 |  | +    <el-dialog
 | 
											
												
													
														|  | 
 |  | +      v-if="visible_flag"
 | 
											
												
													
														|  | 
 |  | +      :visible.sync="visible_flag"
 | 
											
												
													
														|  | 
 |  | +      :show-close="true"
 | 
											
												
													
														|  | 
 |  | +      :close-on-click-modal="true"
 | 
											
												
													
														|  | 
 |  | +      :modal-append-to-body="true"
 | 
											
												
													
														|  | 
 |  | +      :append-to-body="true"
 | 
											
												
													
														|  | 
 |  | +      :lock-scroll="true"
 | 
											
												
													
														|  | 
 |  | +      width="80%"
 | 
											
												
													
														|  | 
 |  | +      top="0"
 | 
											
												
													
														|  | 
 |  | +    >
 | 
											
												
													
														|  | 
 |  | +      <iframe v-if="visible_flag" :src="newpath" width="100%" :height="iframeHeight" frameborder="0"></iframe>
 | 
											
												
													
														|  | 
 |  | +    </el-dialog>
 | 
											
												
													
														|  |    </el-dialog>
 |  |    </el-dialog>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  <script>
 |  |  <script>
 | 
											
												
													
														|  |  import PaginationPage from '@/components/PaginationPage.vue';
 |  |  import PaginationPage from '@/components/PaginationPage.vue';
 | 
											
												
													
														|  | 
 |  | +import AudioLine from '@/views/personal_workbench/project/components/AudioLine.vue';
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import { PageQueryProjectResourceList } from '@/api/list';
 |  |  import { PageQueryProjectResourceList } from '@/api/list';
 | 
											
												
													
														|  |  import { H5StartupFile } from '@/api/app';
 |  |  import { H5StartupFile } from '@/api/app';
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const Base64 = require('js-base64').Base64;
 |  |  const Base64 = require('js-base64').Base64;
 | 
											
												
													
														|  | 
 |  | +import { getConfig } from '@/utils/auth';
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
												
													
														|  |    name: 'SelectResource',
 |  |    name: 'SelectResource',
 | 
											
												
													
														|  |    components: {
 |  |    components: {
 | 
											
												
													
														|  |      PaginationPage,
 |  |      PaginationPage,
 | 
											
												
													
														|  | 
 |  | +    AudioLine,
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    props: {
 |  |    props: {
 | 
											
												
													
														|  |      visible: {
 |  |      visible: {
 | 
											
										
											
												
													
														|  | @@ -176,6 +204,10 @@ export default {
 | 
											
												
													
														|  |        isDesc: false, // 排序是否为倒序
 |  |        isDesc: false, // 排序是否为倒序
 | 
											
												
													
														|  |        search_content: '',
 |  |        search_content: '',
 | 
											
												
													
														|  |        select_sources_id: '',
 |  |        select_sources_id: '',
 | 
											
												
													
														|  | 
 |  | +      visible_flag: false,
 | 
											
												
													
														|  | 
 |  | +      newpath: '',
 | 
											
												
													
														|  | 
 |  | +      iframeHeight: `${window.innerHeight - 100}px`,
 | 
											
												
													
														|  | 
 |  | +      file_preview_url: getConfig() ? getConfig().doc_preview_service_address : '',
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    created() {},
 |  |    created() {},
 | 
											
										
											
												
													
														|  | @@ -216,14 +248,16 @@ export default {
 | 
											
												
													
														|  |                item.new_path = `${this.file_preview_url}onlinePreview?url=${Base64.encode(item.file_url)}`;
 |  |                item.new_path = `${this.file_preview_url}onlinePreview?url=${Base64.encode(item.file_url)}`;
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |              this.loading = false;
 |  |              this.loading = false;
 | 
											
												
													
														|  | -          } else if (this.type_index === 3) {
 |  | 
 | 
											
												
													
														|  | -            resource_list.forEach((item) => {
 |  | 
 | 
											
												
													
														|  | -              H5StartupFile({ file_id: item.file_id, index_file_name: 'index.html' }).then((res) => {
 |  | 
 | 
											
												
													
														|  | -                item.new_path = res.file_url;
 |  | 
 | 
											
												
													
														|  | -                this.loading = false;
 |  | 
 | 
											
												
													
														|  | -              });
 |  | 
 | 
											
												
													
														|  | -            });
 |  | 
 | 
											
												
													
														|  | -          } else {
 |  | 
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +          // else if (this.type_index === 3) {
 | 
											
												
													
														|  | 
 |  | +          //   resource_list.forEach((item) => {
 | 
											
												
													
														|  | 
 |  | +          //     H5StartupFile({ file_id: item.file_id, index_file_name: 'index.html' }).then((res) => {
 | 
											
												
													
														|  | 
 |  | +          //       item.new_path = res.file_url;
 | 
											
												
													
														|  | 
 |  | +          //       this.loading = false;
 | 
											
												
													
														|  | 
 |  | +          //     });
 | 
											
												
													
														|  | 
 |  | +          //   });
 | 
											
												
													
														|  | 
 |  | +          // }
 | 
											
												
													
														|  | 
 |  | +          else {
 | 
											
												
													
														|  |              this.loading = false;
 |  |              this.loading = false;
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |            this.list = resource_list;
 |  |            this.list = resource_list;
 | 
											
										
											
												
													
														|  | @@ -255,6 +289,19 @@ export default {
 | 
											
												
													
														|  |          intro: selectedResource.intro,
 |  |          intro: selectedResource.intro,
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | 
 |  | +    // 预览
 | 
											
												
													
														|  | 
 |  | +    viewDialog(file) {
 | 
											
												
													
														|  | 
 |  | +      this.newpath = '';
 | 
											
												
													
														|  | 
 |  | +      if (this.type_index === 3) {
 | 
											
												
													
														|  | 
 |  | +        H5StartupFile({ file_id: file.file_id, index_file_name: 'index.html' }).then((res) => {
 | 
											
												
													
														|  | 
 |  | +          this.newpath = res.file_url;
 | 
											
												
													
														|  | 
 |  | +          this.visible_flag = true;
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      } else {
 | 
											
												
													
														|  | 
 |  | +        this.newpath = `${this.file_preview_url}onlinePreview?url=${Base64.encode(file.file_url)}`;
 | 
											
												
													
														|  | 
 |  | +        this.visible_flag = true;
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 |