|
@@ -325,7 +325,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 1)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -378,7 +378,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 2)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -431,7 +431,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 3)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -478,7 +478,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 4)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -525,7 +525,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 5)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -571,7 +571,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 6)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -655,7 +655,7 @@
|
|
|
<div class="fileBoxRight">
|
|
|
<div
|
|
|
class="chapter_upload_ic_r"
|
|
|
- @click="deleteFile(index)"
|
|
|
+ @click="deleteFile(index, 7)"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -887,10 +887,23 @@
|
|
|
>
|
|
|
<div class="showFileArea" style="height: 80vh">
|
|
|
<!-- <vpdf v-if="/^\s*$/g.test(showFileUrl)&&showFileUrl.split('.')[showFileUrl.split('.').length-1]=='pdf'" :pdfUrl="showFileUrl"></vpdf> -->
|
|
|
+ <div
|
|
|
+ class="workd_media"
|
|
|
+ style="width: 90%; height: 90%"
|
|
|
+ v-if="videoDetail.sources"
|
|
|
+ >
|
|
|
+ <video-player
|
|
|
+ class="video-player vjs-custom-skin"
|
|
|
+ :playsinline="true"
|
|
|
+ :options="videoDetail"
|
|
|
+ @play="onPlayerPlay($event)"
|
|
|
+ style="width: 90%; height: 90%; margin: 0 auto"
|
|
|
+ ></video-player>
|
|
|
+ </div>
|
|
|
<vword
|
|
|
style="width: 100%; height: 100%; overflow: auto"
|
|
|
class="fullStyle"
|
|
|
- v-if="Wordss['type'] != 'pdf' && Wordss['name'] != '图片'"
|
|
|
+ v-else-if="Wordss['type'] != 'pdf' && Wordss['name'] != '图片'"
|
|
|
:pdfUrl="
|
|
|
'https://view.officeapps.live.com/op/view.aspx?src=' + showFileUrl
|
|
|
"
|
|
@@ -899,12 +912,12 @@
|
|
|
style="width: 100%; height: 100%; overflow: auto"
|
|
|
class="fullStyle"
|
|
|
:pdfUrl="showFileUrl"
|
|
|
- v-if="Wordss['type'] == 'pdf'"
|
|
|
+ v-else-if="Wordss['type'] == 'pdf'"
|
|
|
></vpdf>
|
|
|
<img
|
|
|
:src="showFileUrl"
|
|
|
alt="图片哦"
|
|
|
- v-if="Wordss['name'] == '图片'"
|
|
|
+ v-else-if="Wordss['name'] == '图片'"
|
|
|
style="width: auto; height: auto; max-width: 100%; max-height: 100%"
|
|
|
/>
|
|
|
</div>
|
|
@@ -924,6 +937,10 @@ export default {
|
|
|
type: Array,
|
|
|
required: true,
|
|
|
},
|
|
|
+ iid:{
|
|
|
+ type: String,
|
|
|
+ required: true,
|
|
|
+ }
|
|
|
},
|
|
|
components: { beUpload, vpdf, vword },
|
|
|
data() {
|
|
@@ -967,6 +984,8 @@ export default {
|
|
|
Image:
|
|
|
/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,
|
|
|
File: /^https?:\/\/(.+\/)+.+(\.(docx|xlsx|ppt|pdf))$/i,
|
|
|
+ vedio:
|
|
|
+ /^https?:\/\/(.+\/)+.+(\.(AVI|NAVI|MPEG|ASF|MOV|WMV|3GP|RM|RMVB|FLV|F4V|H.264|H.265|REAL VIDEO|MKV|WebM|HDDVD|MP4|MPG|M4V|MGV|OGV|QTM|STR|AMC|DVX|EVO|DAT|OGG|OGM))$/i,
|
|
|
},
|
|
|
word: [
|
|
|
"DOC",
|
|
@@ -983,6 +1002,8 @@ export default {
|
|
|
"PPAM",
|
|
|
"POTX",
|
|
|
"PPSM",
|
|
|
+ "XLSX",
|
|
|
+ "XLS",
|
|
|
],
|
|
|
pdf: ["PDF"],
|
|
|
image: [
|
|
@@ -999,6 +1020,65 @@ export default {
|
|
|
"PGPEG",
|
|
|
"AVIF",
|
|
|
],
|
|
|
+ vedio: [
|
|
|
+ "AVI",
|
|
|
+ "NAVI",
|
|
|
+ "MPEG",
|
|
|
+ "ASF",
|
|
|
+ "MOV",
|
|
|
+ "WMV",
|
|
|
+ "3GP",
|
|
|
+ "RM",
|
|
|
+ "RMVB",
|
|
|
+ "FLV",
|
|
|
+ "F4V",
|
|
|
+ "H.264",
|
|
|
+ "H.265",
|
|
|
+ "REAL VIDEO",
|
|
|
+ "MKV",
|
|
|
+ "WebM",
|
|
|
+ "HDDVD",
|
|
|
+ "MP4",
|
|
|
+ "MPG",
|
|
|
+ "M4V",
|
|
|
+ "MGV",
|
|
|
+ "OGV",
|
|
|
+ "QTM",
|
|
|
+ "STR",
|
|
|
+ "AMC",
|
|
|
+ "DVX",
|
|
|
+ "EVO",
|
|
|
+ "DAT",
|
|
|
+ "OGG",
|
|
|
+ "OGM",
|
|
|
+ ],
|
|
|
+ playerOptions: {
|
|
|
+ playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
|
|
|
+ autoplay: false, //如果true,浏览器准备好时开始回放。
|
|
|
+ muted: false, // 默认情况下将会消除任何音频。
|
|
|
+ loop: false, // 导致视频一结束就重新开始。
|
|
|
+ preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
|
|
|
+ language: "zh-CN",
|
|
|
+ aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
|
|
|
+ fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
|
|
|
+ sources: [
|
|
|
+ {
|
|
|
+ type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
|
|
|
+ src: "", //url地址require("../../assets/media/aaa.mp4")
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // poster: require("../../assets/tu31.png"), //你的封面地址
|
|
|
+ // poster: dataRes.imgUrl, //你的封面地址
|
|
|
+ notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
|
|
|
+ controlBar: {
|
|
|
+ timeDivider: true, //当前时间和持续时间的分隔符
|
|
|
+ durationDisplay: true, //显示持续时间
|
|
|
+ remainingTimeDisplay: false, //是否显示剩余时间功能
|
|
|
+ fullscreenToggle: true, //全屏按钮
|
|
|
+ },
|
|
|
+ },
|
|
|
+ playerO: {},
|
|
|
+ videoDetail: {},
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -1007,21 +1087,53 @@ export default {
|
|
|
console.log(val);
|
|
|
this.progress7.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].resultAccessory.push(val);
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
- deleteFile(val) {
|
|
|
+ deleteFile(val, t) {
|
|
|
console.log(val);
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].resultAccessory.splice(
|
|
|
- val,
|
|
|
- 1
|
|
|
- );
|
|
|
+ if (t == 1) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].resultAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else if (t == 2) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].firmAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else if (t == 3) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].competitionAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else if (t == 4) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].exchangeAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else if (t == 5) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].conversionAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else if (t == 6) {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].talentsAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"].taskAccessory.splice(
|
|
|
+ val,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ }
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
getfirmAccessory(val) {
|
|
|
//上传企业应用实证
|
|
|
this.progress1.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].firmAccessory.push(val);
|
|
|
- },
|
|
|
- deletefirmAccessory(val) {
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].firmAccessory.splice(val, 1);
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
getcompetitionAccessory(val) {
|
|
|
//双创竞赛成绩
|
|
@@ -1029,51 +1141,31 @@ export default {
|
|
|
this.myArrayProp[0]["ClosingstatementData"].competitionAccessory.push(
|
|
|
val
|
|
|
);
|
|
|
- },
|
|
|
- deletecompetitionAccessory(val) {
|
|
|
- this.myArrayProp[0].competitionAccessory.splice(val, 1);
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
getexchangeAccessory(val) {
|
|
|
//参展或交流活动
|
|
|
this.progress3.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].exchangeAccessory.push(val);
|
|
|
- },
|
|
|
- deleteexchangeAccessory(val) {
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].exchangeAccessory.splice(
|
|
|
- val,
|
|
|
- 1
|
|
|
- );
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
getconversionAccessory(val) {
|
|
|
//创业公司转化
|
|
|
this.progress4.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].conversionAccessory.push(val);
|
|
|
- },
|
|
|
- deleteconversionAccessory(val) {
|
|
|
- console.log(val);
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].conversionAccessory.splice(
|
|
|
- val,
|
|
|
- 1
|
|
|
- );
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
gettalentsAccessory(val) {
|
|
|
//创客人才培养
|
|
|
this.progress5.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].talentsAccessory.push(val);
|
|
|
- },
|
|
|
- deletetalentsAccessory(val) {
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].talentsAccessory.splice(
|
|
|
- val,
|
|
|
- 1
|
|
|
- );
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
gettaskAccessory(val) {
|
|
|
//
|
|
|
this.progress6.show = false;
|
|
|
this.myArrayProp[0]["ClosingstatementData"].taskAccessory.push(val);
|
|
|
- },
|
|
|
- deletetaskAccessory(val) {
|
|
|
- this.myArrayProp[0]["ClosingstatementData"].taskAccessory.splice(val, 1);
|
|
|
+ this.setFile();
|
|
|
},
|
|
|
|
|
|
ProgressFormattaskAccessory(value) {
|
|
@@ -1107,59 +1199,89 @@ export default {
|
|
|
//展示文件
|
|
|
checkFile(url) {
|
|
|
if (
|
|
|
- this.word.indexOf(
|
|
|
+ this.vedio.indexOf(
|
|
|
url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
- ) == -1 &&
|
|
|
- this.pdf.indexOf(
|
|
|
- url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
- ) == -1 &&
|
|
|
- this.image.indexOf(
|
|
|
- url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
- ) == -1
|
|
|
+ ) != -1
|
|
|
) {
|
|
|
- this.downFile(url);
|
|
|
- return;
|
|
|
- }
|
|
|
- this.showFileUrl = url;
|
|
|
- this.showFile = true;
|
|
|
- if (typeof url == "undefined") return { type: "", name: "" };
|
|
|
- let urlSplit = url.split(".");
|
|
|
- const type = urlSplit[urlSplit.length - 1];
|
|
|
- if (this.canonical.Image.test(url)) {
|
|
|
- this.Wordss = { type: type, name: "图片" };
|
|
|
- return console.log(this.Wordss);
|
|
|
+ this.videoDetail = {};
|
|
|
+ this.playerOptions.sources[0].src = url;
|
|
|
+ this.videoDetail = this.playerOptions;
|
|
|
+ this.showFile = true;
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ this.word.indexOf(
|
|
|
+ url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) == -1 &&
|
|
|
+ this.pdf.indexOf(
|
|
|
+ url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) == -1 &&
|
|
|
+ this.image.indexOf(
|
|
|
+ url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
|
|
|
+ ) == -1
|
|
|
+ ) {
|
|
|
+ this.downFile(url);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.showFileUrl = url;
|
|
|
+ this.showFile = true;
|
|
|
+ if (typeof url == "undefined") return { type: "", name: "" };
|
|
|
+ let urlSplit = url.split(".");
|
|
|
+ const type = urlSplit[urlSplit.length - 1];
|
|
|
+ if (this.canonical.Image.test(url)) {
|
|
|
+ this.Wordss = { type: type, name: "图片" };
|
|
|
+ return console.log(this.Wordss);
|
|
|
+ }
|
|
|
+ if (this.canonical.File.test(url)) {
|
|
|
+ this.Wordss = { type: type, name: "文档" };
|
|
|
+ return console.log(this.Wordss);
|
|
|
+ }
|
|
|
+ if (this.canonical.vedio.test(url)) {
|
|
|
+ this.Wordss = { type: type, name: "视频" };
|
|
|
+ return console.log(this.Wordss);
|
|
|
+ } else return (this.Wordss = { type: type, name: type });
|
|
|
}
|
|
|
- if (this.canonical.File.test(url)) {
|
|
|
- this.Wordss = { type: type, name: "文档" };
|
|
|
- return console.log(this.Wordss);
|
|
|
- } else return (this.Wordss = { type: type, name: type });
|
|
|
},
|
|
|
//下载文件
|
|
|
downFile(f) {
|
|
|
- let url = f;
|
|
|
- let _this = this;
|
|
|
- let _url = "";
|
|
|
+ var credentials = {
|
|
|
+ accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
|
+ secretAccessKey: "Q2SQw37HfolS7yeaR1Ndpy9Jl4E2YZKUuuy2muZR",
|
|
|
+ }; //秘钥形式的登录上传
|
|
|
+ window.AWS.config.update(credentials);
|
|
|
+ window.AWS.config.region = "cn-northwest-1"; //设置区域
|
|
|
+ let url2 = f;
|
|
|
+ let _url2 = "";
|
|
|
if (
|
|
|
- url.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
+ url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
|
|
|
) {
|
|
|
- _url = url.split(
|
|
|
+ _url2 = url2.split(
|
|
|
"https://view.officeapps.live.com/op/view.aspx?src="
|
|
|
)[1];
|
|
|
} else {
|
|
|
- _url = url;
|
|
|
+ _url2 = url2;
|
|
|
}
|
|
|
- let x = new XMLHttpRequest();
|
|
|
- x.open("GET", _url, true);
|
|
|
- x.responseType = "blob";
|
|
|
- x.onload = function () {
|
|
|
- let url = window.URL.createObjectURL(new Blob([x.response]));
|
|
|
- let a = document.createElement("a");
|
|
|
- a.name = f.name;
|
|
|
- a.href = url;
|
|
|
- a.download = f.name;
|
|
|
- a.click();
|
|
|
+ var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
+ let name = decodeURIComponent(
|
|
|
+ _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
|
|
|
+ );
|
|
|
+ var params = {
|
|
|
+ Bucket: "ccrb",
|
|
|
+ Key: name,
|
|
|
};
|
|
|
- x.send();
|
|
|
+ s3.getObject(params, function (err, data) {
|
|
|
+ if (err) console.log(err, err.stack); // an error occurred
|
|
|
+ else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data.Body]));
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.name = name;
|
|
|
+ a.href = url;
|
|
|
+ a.download = name;
|
|
|
+ a.click();
|
|
|
+ console.log(data);
|
|
|
+ } // sxuccessful response
|
|
|
+ });
|
|
|
+
|
|
|
+ return;
|
|
|
},
|
|
|
getPrice() {
|
|
|
this.myArrayProp[0].actualuse =
|
|
@@ -1173,6 +1295,27 @@ export default {
|
|
|
parseInt(this.myArrayProp[0]["money"].Transaction);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ onPlayerPlay() {},
|
|
|
+ setFile() {
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "/updateClosingstatementData", {
|
|
|
+ uid: this.$store.state.userInfo.userid,
|
|
|
+ pid: this.iid,
|
|
|
+ cdata: JSON.stringify(
|
|
|
+ this.myArrayProp[0]["ClosingstatementData"]
|
|
|
+ ),
|
|
|
+ sta: 2,
|
|
|
+ })
|
|
|
+ .then(
|
|
|
+ (res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
// console.log(this.myArrayProp);
|