|
@@ -43,7 +43,7 @@
|
|
<div class="file_list" v-for="(minItem,minIndex) in item.upList">
|
|
<div class="file_list" v-for="(minItem,minIndex) in item.upList">
|
|
<el-checkbox @change="checkedImg(minItem)" v-if="isLook" >{{minItem.name}}</el-checkbox>
|
|
<el-checkbox @change="checkedImg(minItem)" v-if="isLook" >{{minItem.name}}</el-checkbox>
|
|
<i v-if="!isLook" >{{minItem.name}}</i>
|
|
<i v-if="!isLook" >{{minItem.name}}</i>
|
|
- <i class="file_list_look" @click="lookFile(minItem)">查看</i>
|
|
|
|
|
|
+ <i class="file_list_look" @click="fullScreenFileLookClick(minItem)">查看</i>
|
|
<i v-if="isLook" class="file_list_look" @click="handleExport(1,minItem)">下载</i>
|
|
<i v-if="isLook" class="file_list_look" @click="handleExport(1,minItem)">下载</i>
|
|
</div>
|
|
</div>
|
|
<div class="item-title-box" v-if="item.materialType==2&&item.relationType==2"><i style="color: #F56C6C;">* </i>安全考试证书:<span style="color:#999;">(已同步证书信息)</span></div>
|
|
<div class="item-title-box" v-if="item.materialType==2&&item.relationType==2"><i style="color: #F56C6C;">* </i>安全考试证书:<span style="color:#999;">(已同步证书信息)</span></div>
|
|
@@ -77,20 +77,22 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
|
|
<fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
|
|
|
|
+ <fullScreenFileLook ref="fullScreenFileLook"></fullScreenFileLook>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
let Base64 = require('js-base64').Base64;
|
|
let Base64 = require('js-base64').Base64;
|
|
-import { optionHazard, downloadwBatch, getDetails, laboratoryApply} from "@/api/secureAccess/index";
|
|
|
|
// V3
|
|
// V3
|
|
import { laboratoryApplyGetDetails,laboratoryApplyUpdate} from "@/api/secureAccess/index";
|
|
import { laboratoryApplyGetDetails,laboratoryApplyUpdate} from "@/api/secureAccess/index";
|
|
import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
|
|
import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
|
|
|
|
+import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "info-page",
|
|
name: "info-page",
|
|
components: {
|
|
components: {
|
|
fullScreenView,
|
|
fullScreenView,
|
|
|
|
+ fullScreenFileLook
|
|
},
|
|
},
|
|
props:{
|
|
props:{
|
|
infoData: {},
|
|
infoData: {},
|
|
@@ -145,15 +147,27 @@ export default {
|
|
this.$refs['fullScreenView'].initialize();
|
|
this.$refs['fullScreenView'].initialize();
|
|
},
|
|
},
|
|
//文件浏览
|
|
//文件浏览
|
|
- lookFile(item){
|
|
|
|
- if(item.name.split('.')[1] == 'png' || item.name.split('.')[1] == 'jpg' || item.name.split('.')[1] == 'gif'){
|
|
|
|
- this.fullScreenViewClick(item.url);
|
|
|
|
- }else {
|
|
|
|
- window.open(window.location.href.split('://')[0]+'://'+this.judgmentNetworkReturnAddress()+'/admin/'+item.url)
|
|
|
|
|
|
+ fullScreenFileLookClick(item){
|
|
|
|
+ //判断类型
|
|
|
|
+ let type = '';
|
|
|
|
+ if(item.name.split('.')[1] == 'doc' || item.name.split('.')[1] == 'docx'){
|
|
|
|
+ type = 'docx'
|
|
|
|
+ }else if(item.name.split('.')[1] == 'xls' || item.name.split('.')[1] == 'xlsx'){
|
|
|
|
+ type = 'excel'
|
|
|
|
+ }else if(item.name.split('.')[1] == 'pdf'){
|
|
|
|
+ type = 'pdf'
|
|
|
|
+ }else if(item.name.split('.')[1] == 'png' || item.name.split('.')[1] == 'jpg' || item.name.split('.')[1] == 'gif'){
|
|
|
|
+ type = 'img'
|
|
|
|
+ }
|
|
|
|
+ //整合地址
|
|
|
|
+ let url = window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.url;
|
|
|
|
+ //判断图片还是文件
|
|
|
|
+ if(type == 'img'){
|
|
|
|
+ this.$set(this,'fullScreenViewProps',[url]);
|
|
|
|
+ this.$refs['fullScreenView'].initialize();
|
|
|
|
+ }else if(type == 'docx' || type == 'excel' || type == 'pdf'){
|
|
|
|
+ this.$refs['fullScreenFileLook'].initialize(item.name,url,type);
|
|
}
|
|
}
|
|
- // let visitUrl=window.location.href.split('://')[0]+'://'+process.env.VUE_APP_BASE_API+'/admin/'+item.url;
|
|
|
|
- // window.open(localStorage.getItem('filePreviewUrl') + '/onlinePreview?url='+encodeURIComponent(Base64.encode(visitUrl)));
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
/** 下载 */
|
|
/** 下载 */
|
|
handleExport(type,item) {
|
|
handleExport(type,item) {
|