flx:修改在线预览地址
This commit is contained in:
parent
9ede922d69
commit
99ddf51c66
@ -84,12 +84,12 @@
|
||||
<el-table-column width="120" prop="supervisingUnitName" label="工程监理单位" align="center"></el-table-column>
|
||||
<el-table-column width="120" prop="epcContractorName" label="工程承包商" align="center"></el-table-column>
|
||||
<el-table-column width="120" prop="constructionUnitName" label="工程分包商" align="center"></el-table-column>
|
||||
<el-table-column width="150" prop="technicalDocumentType" label="技术文件类型" align="center">
|
||||
<!-- <el-table-column width="150" prop="technicalDocumentType" label="技术文件类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.technicalDocumentType ?
|
||||
techniqueFileTypeList[scope.row.technicalDocumentType - 1].fileName : '--' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column width="150" prop="schemeType" label="方案类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.schemeType ? schemeTypeList[scope.row.schemeType - 1].title : '--'
|
||||
@ -139,7 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新增 -->
|
||||
<el-dialog :destroy-on-close="true" :modal-append-to-body="false" :title="cardDialogTitle" :visible.sync="cardDialog" width="667px"
|
||||
<el-dialog :destroy-on-close="true" :modal-append-to-body="false" :title="cardDialogTitle" :visible.sync="cardDialog" :width="dialogType == 3 ? '900px' : '667px'"
|
||||
:before-close="handleClose">
|
||||
<div class="dialog_content" v-if="dialogType == 1 || dialogType == 5">
|
||||
<el-form size="medium" :model="cardForm" ref="cardForm" :rules="rules" label-width="125px"
|
||||
@ -196,14 +196,14 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="技术文件类型" prop="technicalDocumentType">
|
||||
<!-- <el-form-item label="技术文件类型" prop="technicalDocumentType">
|
||||
<el-select v-model="cardForm.technicalDocumentType"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.fileName" :value="item.id"
|
||||
v-for="(item, index) in techniqueFileTypeList" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- multiple clearable-->
|
||||
<el-form-item label="方案类型" prop="schemeType">
|
||||
<el-radio-group style="display: flex; align-items: center; height: 36px"
|
||||
@ -355,6 +355,17 @@
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" align="center">
|
||||
<template slot="header" slot-scope="{ row }">
|
||||
<el-checkbox :indeterminate="isView.indeterminate" v-model="isView.isCheck"
|
||||
@change="handleCheckAllChange($event, 'isView')">是否查看</el-checkbox>
|
||||
</template>
|
||||
<template slot-scope="{ row }">
|
||||
<el-checkbox-group v-model="isView.selectionData">
|
||||
<el-checkbox :key="row.userId" :label="row.userId">是否查看</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination class="pagerBox" @size-change="handleSizeChangeStaff" @current-change="handleCurrentChangeStaff"
|
||||
:current-page="personnelInfo.pageNo" :page-sizes="$store.state.PAGESIZRS"
|
||||
@ -471,10 +482,13 @@ export default {
|
||||
pointList: [],
|
||||
schemeTypeList: [{
|
||||
id: 1,
|
||||
title: "施工组织设计或重大施工方案",
|
||||
title: "施工组织设计",
|
||||
}, {
|
||||
id: 2,
|
||||
title: "一般性施工方案",
|
||||
title: "施工技术方案",
|
||||
}, {
|
||||
id: 3,
|
||||
title: "施工技术措施",
|
||||
}], // 方案类型
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
@ -510,6 +524,11 @@ export default {
|
||||
indeterminate: false,//全选按钮的不确定状态
|
||||
selectionData: [],//表格选中的数据
|
||||
}, // 删除
|
||||
isView: {
|
||||
isCheck: false,//全选按钮绑定值
|
||||
indeterminate: false,//全选按钮的不确定状态
|
||||
selectionData: [],//表格选中的数据
|
||||
}, // 是否查看
|
||||
personnelList: [],//人员列表
|
||||
personnelInfo: {
|
||||
constructionPlanLedgerId: "",
|
||||
@ -603,6 +622,7 @@ export default {
|
||||
this.isAuthorize.selectionData.includes(item.userId) ? item.isAuthorize = 1 : item.isAuthorize = 0;
|
||||
this.isModified.selectionData.includes(item.userId) ? item.isModified = 1 : item.isModified = 0;
|
||||
this.isDeleted.selectionData.includes(item.userId) ? item.isDeleted = 1 : item.isDeleted = 0;
|
||||
this.isView.selectionData.includes(item.userId) ? item.isView = 1 : item.isView = 0;
|
||||
|
||||
prev.push(item);
|
||||
return prev;
|
||||
@ -753,16 +773,18 @@ export default {
|
||||
console.log(row.schemeAttachment);
|
||||
// row.schemeAttachment[0].url
|
||||
// http://jxj.zhgdyun.com:51234/image/66b488ec1448862baf3a277f.mp4
|
||||
// let src = encode("/xmgl/file/preview?fileUrl=" + "http://42.180.188.17:11211/image/66b5cb336b90493b9585508f.xlsx" + "&fullfilename=" + row.schemeAttachment[0].name);
|
||||
// http://42.180.188.17:11211/image/66b5cb336b90493b9585508f.xlsx
|
||||
// let src = encode("/xmgl/file/preview?fileUrl=" + "http://42.180.188.17:11211/image/669b96b66b90a34a1aa4ec9c.jpg" + "&fullfilename=" + "111.jpg");
|
||||
// http://182.90.224.147:8012/onlinePreview?url=;
|
||||
let src = encode(row.schemeAttachment[0].url);
|
||||
const videoList = [".mp4", ".avi", ".wmv"];
|
||||
const every = videoList.every(item => {
|
||||
return row.schemeAttachment[0].name.indexOf(item) == -1;
|
||||
});
|
||||
console.log(every);
|
||||
// this.previewUrl = every ? `http://jxjzw.zhgdyun.com:8012/onlinePreview?url=${src}` : row.schemeAttachment[0].url;
|
||||
let src = row.schemeAttachment[0].url;
|
||||
this.previewUrl = every ? `https://ofd.xdocin.com/view?src=${encodeURIComponent(src)}` : row.schemeAttachment[0].url;
|
||||
this.previewUrl = every ? `http://jxjzw.zhgdyun.com:8012/onlinePreview?url=${encodeURIComponent(src)}` : row.schemeAttachment[0].url;
|
||||
// let src = row.schemeAttachment[0].url;
|
||||
// this.previewUrl = every ? `https://ofd.xdocin.com/view?src=${encodeURIComponent(src)}` : row.schemeAttachment[0].url;
|
||||
console.log(this.previewUrl);
|
||||
// https://view.xdocin.com/view?src=${encodeURIComponent(src)};
|
||||
// http://42.180.188.17:9809/image/665e7d0dbe74b65b6b7c0619.docx
|
||||
@ -798,6 +820,8 @@ export default {
|
||||
if (item.isAuthorize == 1) this.isAuthorize.selectionData.push(item.userId);
|
||||
if (item.isModified == 1) this.isModified.selectionData.push(item.userId);
|
||||
if (item.isDeleted == 1) this.isDeleted.selectionData.push(item.userId);
|
||||
if (item.isView == 1) this.isView.selectionData.push(item.userId);
|
||||
|
||||
|
||||
prev.push(item);
|
||||
return prev;
|
||||
@ -963,7 +987,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
dateRange() {
|
||||
const { preview, download, qrcode, isAuthorize, isModified, isDeleted } = this
|
||||
const { preview, download, qrcode, isAuthorize, isModified,isView, isDeleted } = this
|
||||
return {
|
||||
preview: preview.selectionData,
|
||||
download: download.selectionData,
|
||||
@ -971,6 +995,7 @@ export default {
|
||||
isAuthorize: isAuthorize.selectionData,
|
||||
isModified: isModified.selectionData,
|
||||
isDeleted: isDeleted.selectionData,
|
||||
isView: isView.selectionData,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -199,6 +199,7 @@ import {
|
||||
} from "@/assets/js/api/project";
|
||||
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
|
||||
import { isJSON } from "@/util/nowDate/index";
|
||||
import { encode } from 'js-base64'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -525,7 +526,7 @@ export default {
|
||||
});
|
||||
console.log(every);
|
||||
let src = row.url.includes('http://') ? row.url : this.$store.state.FILEURL + row.url;
|
||||
this.previewUrl = every ? `https://ofd.xdocin.com/view?src=${encodeURIComponent(src)}` : src;
|
||||
this.previewUrl = every ? `http://jxjzw.zhgdyun.com:8012/onlinePreview?url=${encodeURIComponent(encode(src))}` : src;
|
||||
console.log(this.previewUrl);
|
||||
this.cardDialog = true;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user