Commit 802e4887 by 潘建波

🐛ocx下载提示

1 parent bfc48606
No preview for this file type
......@@ -96,7 +96,14 @@ export default {
file_type: "video_ocx"
};
this.$api.ops.downloadOcx(params).then(response => {
location.href = response.data.file_url;
if (response.ecode) {
this.$message({
type: "error",
message: response.enode
});
} else {
location.href = response.file_url;
}
});
} else {
this.$message.error("视频控件加载失败请用IE10及以上版本打开!");
......@@ -149,6 +156,7 @@ export default {
},
mounted() {
if (this.checkIE()) {
try {
let isLoadingOcx =
typeof document.getElementById("VionVideo").GetVersion() === "string"
? true
......@@ -156,6 +164,9 @@ export default {
if (!isLoadingOcx) {
this.installOcxInfo();
}
} catch (error) {
this.downloadOCx();
}
}
},
beforeDestroy: function() {
......
......@@ -188,7 +188,19 @@ export default {
upData.append("is_temp", 0);
});
this.$api.resource.uploadStore(upData).then(res => {
if (res.unid) {
this.addVisible = false;
this.query();
this.$message({
type: "success",
message: "上传成功!"
});
} else {
this.$message({
type: "error",
message: res.enote
});
}
});
},
uploadsuccess() {
......
......@@ -113,12 +113,13 @@ export default {
},
mounted() {
this.initocx();
// try {
// if (document.getElementById("VionVideo").GetVersion()) {
// }
// } catch (error) {
// this.downloadOCx();
// }
try {
if (document.getElementById("VionVideo").GetVersion()) {
console.log("ocx已安装");
}
} catch (error) {
this.downloadOCx();
}
},
watch: {
ocxstate(val) {
......
......@@ -205,7 +205,7 @@ export default {
var freeArr = [];
this.freeList.forEach(ele => {
if (ele.license_info && ele.license_info.platType) {
this.platT.push(ele.license_info.platType);
this.platT.set(ele.license_info.platType);
}
});
}
......@@ -328,8 +328,19 @@ export default {
editTask(data) {
data.is_send = this.sendstatus(data);
this.$api.task.editTask(data, this.formData.task_id).then(res => {
if (res.ecode == "200") {
this.setvisible = false;
this.$emit("refresh");
this.$message({
message: res.enote,
type: "success"
});
} else {
this.$message({
message: res.enote,
type: "error"
});
}
});
},
sendstatus(data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!