Commit a94de873 authored by 李维's avatar 李维

添加获取DPE数据接口

parent 1c01ddcf
No preview for this file type
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>form_vue</title><script defer="defer" src="js/chunk-vendors.18bbe7ed.js"></script><script defer="defer" src="js/app.9b1b0d9e.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.703caa6a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script><script>if (document.domain.indexOf("iteachabc.com") > 0) {
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>form_vue</title><script defer="defer" src="js/chunk-vendors.18bbe7ed.js"></script><script defer="defer" src="js/app.213f4f60.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.703caa6a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script>// 刷新CDN路径
// https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js
// https://teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js
const commonPostMessage = function (messageObj) {
const obj = {...messageObj, urlParams: window.location.search, origin: "template"}
window.parent.postMessage(obj, '*');
};
const postMessageCallbackQueue = {};
const commonPostMessageWithCallback = function (messageObj, callback) {
if(postMessageCallbackQueue[messageObj.action]){
console.error(`action为${messageObj.action}的事件正在执行,请更换action名称或等待事件执行完成后再发起`);
return;
}
postMessageCallbackQueue[messageObj.action] = true;
const onMessage = (e) => {
let msgData = e.data;
if(msgData.origin==="template"){
return;
}
if(msgData && msgData.action === messageObj.action){
postMessageCallbackQueue[messageObj.action] = false;
window.removeEventListener("message", onMessage);
callback && callback(msgData.data);
}
};
window.addEventListener("message", onMessage);
commonPostMessage(messageObj);
};
const getQueryString = function (name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
const r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
};
const realAir = {
uploadUrl: null,
uploadVideoUrl: null,
uploadData: null,
getDataCallback: null,
setDataCallback: null,
getUploadCallback: null,
getUploadVideoCallback: null,
pageLoaded: false,
isCourseInScreen: false,
osmoCallback: null,
osmoHandwritingCallback: null,
osmoFingerReadCallback: null,
onCourseInScreen: null,
hideAirClassLoading: function(templateName,loadData){
// 隐藏页面加载时候的loading
if (deleteHistory && typeof (deleteHistory) == 'function') {
deleteHistory();
}
commonPostMessage({action: "course-ready", data: {template:templateName,loadData:loadData,urlParams: window.location.search}});
window.air.pageLoaded = true;
window.courseware.next();
var cc = window.cc;
if (cc && cc.director && cc.director._scene) {
try {
const canvas = cc.find("Canvas");
canvas.on("mousemove", function () {});
cc.director._scene.on("mousemove", function () {
commonPostMessage({ action: "mousemove" });
});
cc.director._scene.on("touchmove", function () {
commonPostMessage({ action: "mousemove" });
});
if (cc.systemEvent && cc.SystemEvent) {
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, (event) => {
const KEY = cc.KEY || cc.macro.KEY;
switch (event.keyCode) {
case KEY.left:
commonPostMessage({ action: "ArrowLeft" });
break;
case KEY.right:
commonPostMessage({ action: "ArrowRight" });
break;
}
});
}
} catch (e) {
console.log("====cc.director._scene绑定事件====");
}
}
},
};
const uploadCallbackQueue = [];
const uploadVideoCallbackQueue = [];
try{
window.air = new Proxy(realAir, {
set: function (target, key, value, receiver) {
if (key=="getUploadCallback") {
uploadCallbackQueue.push(value);
}
if (key=="getUploadVideoCallback") {
uploadVideoCallbackQueue.push(value);
}
return Reflect.set(target, key, value, receiver);
},
get: function (target, key, receiver) {
return Reflect.get(target, key, receiver);
},
deleteProperty: function(target, key){
return Reflect.deleteProperty(target, key);
}
});
}catch(e){
console.error("浏览器不支持ES6新特性Proxy/Reflect,请使用谷歌浏览器!");
}
function deleteHistory() {
const disableBack = () => {
window.history.pushState(null, "", document.URL);
window.addEventListener("popstate", () => {
window.history.pushState(null, "", document.URL);
});
}
disableBack();
window.addEventListener("load", disableBack);
}
deleteHistory();
window.addEventListener("load", () => {
// 禁用移动端长按选中文字
let bodyStyle = document.body.getAttribute("style");
if(bodyStyle){
bodyStyle += '; user-select: none; -webkit-user-select: none; -moz-user-select: none;';
}else{
bodyStyle = 'user-select: none; -webkit-user-select: none; -moz-user-select: none;';
}
document.body.setAttribute("style", bodyStyle);
});
if (window.self !== window.top) {
window.addEventListener("message", function (e) {
let msgData = e.data;
// console.log("子页面接收到了消息", msgData);
if(msgData.type === "webpackWarnings" || msgData.type === "webpackOk") {
return;
}
if(msgData.action==="airEvents"){
return;
}
if(msgData.origin==="template"){
return;
}
if (msgData.action === "getUpload") {
window.air.uploadUrl = msgData.uploadUrl;
window.air.uploadData = msgData.uploadData;
for (let i = 0; i < uploadCallbackQueue.length; i++) {
uploadCallbackQueue[i](msgData.uploadUrl, msgData.uploadData);
}
return;
}
if (msgData.action === "getVideoUpload") {
window.air.uploadVideoUrl = msgData.uploadVideoUrl;
window.air.uploadData = msgData.uploadData;
for (let i = 0; i < uploadVideoCallbackQueue.length; i++) {
uploadVideoCallbackQueue[i](msgData.uploadVideoUrl, msgData.uploadData);
}
return;
}
if (msgData.action === "pauseCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.game.pause();
console.log('pause了');
}
return;
}
if (msgData.action === "resumeCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.game.resume();
console.log('resume了');
}
return;
}
if (msgData.action === "restartCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.audioEngine.stopAll();
// cc.game.restart();
console.log('restart了');
}
return;
}
if (msgData.action === "osmoCallback") {
window.air.osmoCallback && window.air.osmoCallback(msgData.data);
return;
}
if (msgData.action === "osmoHandwritingCallback") {
window.air.osmoHandwritingCallback && window.air.osmoHandwritingCallback(msgData.data);
return;
}
if (msgData.action === "osmoFingerReadCallback") {
window.air.osmoFingerReadCallback && window.air.osmoFingerReadCallback(msgData.data);
return;
}
if (msgData.action === "setData") {
window.air.setDataCallback && window.air.setDataCallback();
return;
}
if (msgData.action === "getData") {
try {
const res = JSON.parse(msgData.data);
if (res.msg !== "success") {
console.log('数据加载失败!');
return;
}
if (res.data && res.data != 'null') {
window.air.callData = JSON.parse(res.data);
}
window.air.callDataFlag = true;
return;
} catch (e) {
console.log('数据加载失败!');
}
}
if (msgData.action === "getDPEData") {
try {
const res = JSON.parse(msgData.data);
if (res.msg !== "success") {
console.log('数据加载失败!');
return;
}
if (res.data && res.data != 'null') {
window.air.callData = JSON.parse(res.data);
}
window.air.callDataFlag = true;
return;
} catch (e) {
console.log('数据加载失败!');
}
}
});
commonPostMessage({ action: "getUpload" });
commonPostMessage({ action: "getVideoUpload" });
document.onmousemove = function(){
commonPostMessage({ action: "mousemove" });
};
document.ontouchmove = function(){
commonPostMessage({ action: "mousemove" });
};
document.onkeydown = (event) => {
switch(event.key) {
case "ArrowLeft":
commonPostMessage({ action: "ArrowLeft" });
break;
case "ArrowRight":
commonPostMessage({ action: "ArrowRight" });
break;
}
}
document.oncontextmenu = function(){
return false;
}
}
window.courseware = (function () {
let obj = {
airEvents: {},
eventQueue: [],
eventLock: false,
next: () => {
let exe = obj.eventQueue.splice(0,1);
if(exe.length>0){
obj.eventLock = true;
let evtName = exe[0].evtName;
let data = exe[0].data;
if(obj.airEvents[evtName]){
if(evtName === "course-in-screen"){
if(window.air.isCourseInScreen){
return;
}
window.air.isCourseInScreen = true;
}
console.log(`evtName==${evtName}的方法被执行`);
obj.airEvents[evtName](data, obj.next);
} else {
if(evtName === "course-in-screen" && window.air.onCourseInScreen){
if(!window.air.pageLoaded){
console.log(`页面还没有加载完就执行了courseInScreen事件,请排查产生原因`);
return;
}
if(window.air.isCourseInScreen){
console.log(`courseInScreen事件执行了多次,请排查产生原因`);
return;
}
window.air.onCourseInScreen(()=>{
obj.next();
});
return;
}
console.warn(`airclass教室交互事件 ${evtName} 没有被捕获,请确认监听事件的先后顺序2`);
obj.next();
}
}else{
obj.eventLock = false;
}
}
};
if (window.self !== window.top) {
window.addEventListener("message", function (e) {
let msgData = e.data;
if(msgData.origin==="template"){
return;
}
if(msgData.action!=="airEvents"){
return;
}
let evtName = msgData.evt;
let res = msgData.data;
if (evtName === "course-out-screen"){
console.log(`evtName==${evtName}的方法被执行`);
window.location.reload();
return;
}
if (res&&evtName!='userchange') {
//userchange事件传过来的值不需要转换
res = JSON.parse(res);
}
if(!window.air.pageLoaded){
//如果页面还没有加载完成
obj.eventQueue.push({"evtName": evtName, data: res});
}else{
if (obj.eventQueue.length === 0 && !obj.eventLock) {
//如果没有消息积压并且事件锁未锁定
obj.eventLock = true;
if(obj.airEvents[evtName]){
if(evtName === "course-in-screen"){
if(window.air.isCourseInScreen){
return;
}
window.air.isCourseInScreen = true;
}
console.log(`evtName==${evtName}的方法被执行`);
obj.airEvents[evtName](res, obj.next);
} else {
if(evtName === "course-in-screen" && window.air.onCourseInScreen){
if(!window.air.pageLoaded){
console.log(`页面还没有加载完就执行了courseInScreen事件,请排查产生原因`);
return;
}
if(window.air.isCourseInScreen){
console.log(`courseInScreen事件执行了多次,请排查产生原因`);
return;
}
window.air.onCourseInScreen(()=>{
obj.next();
});
return;
}
console.warn(`airclass教室交互事件 ${evtName} 没有被捕获,请确认监听事件的先后顺序1`);
obj.next();
}
} else {
obj.eventQueue.push({"evtName": evtName, data: res});
}
}
});
obj.getData = function (callback, key = '') {
commonPostMessage({ action: "getData", data: window.location.search });
window.air.callDataFlag = false;
const liuintval = setInterval(()=>{
if(window.air.callDataFlag){
console.log("========我进来了=========");
clearInterval(liuintval);
setTimeout(() => {
console.log("执行回调,回调数据为:");
console.log(window.air.callData);
callback(window.air.callData);
}, 100);
}
}, 100);
};
obj.getDPEData = function (callback, key = '') {
commonPostMessage({ action: "getDPEData", data: window.location.search });
window.air.callDataFlag = false;
const liuintval = setInterval(()=>{
if(window.air.callDataFlag){
clearInterval(liuintval);
setTimeout(() => {
console.log("DPE Data:");
console.log(window.air.callData);
callback(window.air.callData);
}, 100);
}
}, 100);
};
obj.setData = function (data, callback, key = '') {
let str = JSON.stringify(data);
console.log("==setData==", str);
commonPostMessage({ action: "setData", data: str });
window.air.setDataCallback = callback;
};
obj.uploadUrl = function () {
return window.air.uploadUrl;
};
obj.uploadVideoUrl = function () {
return window.air.uploadVideoUrl;
};
obj.uploadData = function () {
return window.air.uploadData;
};
obj.nextPage = function(){
const index = getQueryString("index");
commonPostMessage({ action: "callJumpPage", data: parseInt(index)+1 });
};
obj.beforePage = function(){
const index = getQueryString("index");
commonPostMessage({ action: "callJumpPage", data: parseInt(index)-1 });
};
obj.jumpPage = function(page){
commonPostMessage({ action: "callJumpPage", data: page });
};
obj.activeFormulaBoard = function(callback){
if(callback){
commonPostMessageWithCallback({ action: "activeFormulaBoard" }, callback);
} else {
commonPostMessage({ action: "activeFormulaBoard" });
}
};
obj.activeWhiteBoard = function(callback){
if(callback){
commonPostMessageWithCallback({ action: "activeWhiteBoard" }, callback);
} else {
commonPostMessage({ action: "activeWhiteBoard" });
}
};
obj.beganRecording = function(){
commonPostMessage({ action: "beganRecording" });
};
obj.endRecording = function(callback){
commonPostMessageWithCallback({ action: "endRecording" }, callback);
};
obj.speakPoints = function(audioUrl, evalText, callback){
const obj = {audioUrl, evalText};
commonPostMessageWithCallback({ action: "speakPoints", data: JSON.stringify(obj) }, callback);
};
obj.startRecord = function(testText){
commonPostMessage({ action: "startRecord", data: testText });
};
obj.stopRecord = function(_isgradepapers, _callback){
let callback = _callback;
let isgradepapers;
if(_isgradepapers && typeof _isgradepapers === "function") {
callback = _isgradepapers;
isgradepapers = 1;
} else {
isgradepapers = _isgradepapers;
}
if(!callback){
// 不传回调函数就表示取消评测
commonPostMessage({ action: "stopRecord", iscancle: 1 });
}else{
commonPostMessageWithCallback({ action: "stopRecord", iscancle: 0, isgradepapers }, callback);
}
};
obj.greadPapersForText = function(params, callback){
let str = "";
if( typeof(params) === "object"){
str = JSON.stringify(params);
}else{
str = params;
}
commonPostMessageWithCallback({ action: "greadPapersForText", data: str }, callback);
};
obj.lansiEvaluation = function(params, callback){
let str = "";
if( typeof(params) === "object"){
str = JSON.stringify(params);
}else{
str = params;
}
commonPostMessageWithCallback({ action: "lansiEvaluation", data: str }, callback);
};
obj.startTest = function(testText){
commonPostMessage({ action: "startTest", data: testText });
};
obj.stopTest = function(callback){
if(!callback){
// 不传回调函数就表示取消评测
commonPostMessage({ action: "stopTest", iscancle: 1 });
}else{
commonPostMessageWithCallback({ action: "stopTest", iscancle: 0 }, callback);
}
};
obj.openDubbingPage = function(){
commonPostMessage({ action: "openDubbingPage"});
},
obj.openDubbingPageTwo = function(){
commonPostMessage({ action: "openDubbingPageTwo"});
},
obj.openRecognitionCamera = function(callback){
commonPostMessageWithCallback({ action: "openRecognitionCamera"}, callback);
},
obj.sendAnswer = function(idOrObj, answer, isRight, startTime){
if(typeof(idOrObj) === "object"){
commonPostMessageWithCallback({ action: "sendAnswer", data: JSON.stringify(idOrObj) }, idOrObj.callback);
}else{
commonPostMessage({ action: "sendAnswer", data: JSON.stringify({id: idOrObj, answer, isRight, startTime }) });
}
};
obj.getAnswer = function(queryObj, callback){
commonPostMessageWithCallback({ action: "getAnswer", data: JSON.stringify(queryObj)}, callback);
};
obj.openOsmo = function(){
commonPostMessage({ action: "openOsmo" });
};
obj.closeOsmo = function(){
commonPostMessage({ action: "closeOsmo" });
};
obj.openOsmoHandwriting = function(){
commonPostMessage({ action: "openOsmoHandwriting" });
};
obj.closeOsmoHandwriting = function(){
commonPostMessage({ action: "closeOsmoHandwriting" });
};
obj.openOsmoFingerRead = function(){
commonPostMessage({ action: "openOsmoFingerRead" });
};
obj.closeOsmoFingerRead = function(){
commonPostMessage({ action: "closeOsmoFingerRead" });
};
obj.gameEnd = function(){
commonPostMessage({ action: "gameEnd" });
};
obj.getTemplates = function(callback){
commonPostMessageWithCallback({ action: "getTemplates" }, callback);
};
obj.getTemplateUrl = function(templateName, callback){
commonPostMessageWithCallback({ action: "getTemplateUrl", data: templateName}, callback);
};
obj.sendEvent = function(evtName,data,key = ''){
if(evtName==="reconnect"){
console.error("reconnect是内置的断线重连事件名称,请勿使用此名称作为事件名");
return;
}
if(evtName==="userchange"){
console.error("userchange是内置的用户变更事件名称,请勿使用此名称作为事件名");
return;
}
let str = null;
if(data){
str = JSON.stringify(data);
}
commonPostMessage({ action: "airEvents",evt: evtName, data: str });
};
obj.onEvent = function(evtName,callback){
obj.airEvents[evtName] = callback;
};
obj.removeEvent = function(evtName){
if(obj.airEvents[evtName]){
delete obj.airEvents[evtName];
}
};
obj.sendErrorLog = function (error) {
// todo 这块预留后面采集模板的报错信息
// commonPostMessage({ action: "errorlog", data: error.stack }, '*');
};
} else {
obj.getData = function (callback, key = '') {
let data = localStorage.getItem("courseware_data_" + key);
if (data) {
data = JSON.parse(data);
}
callback && callback(data);
};
obj.getDPEData = function (callback) {
// 模拟获取DPE元数据
callback && callback(null);
};
obj.setData = function (data, callback, key = '') {
console.log("******local********");
localStorage.setItem("courseware_data_" + key, JSON.stringify(data));
callback && callback();
};
obj.uploadUrl = function () {
var protocolStr = document.location.protocol;
return `${protocolStr}//staging-teach.ireadabc.com/fileUpload`;
};
obj.uploadVideoUrl = function () {
var protocolStr = document.location.protocol;
return `${protocolStr}//staging-teach.ireadabc.com/videoUpload`;
};
obj.uploadData = function () {
return {};
};
obj.nextPage = function(){
console.log("******nextPage********");
};
obj.beforePage = function(){
console.log("******beforePage********");
};
obj.jumpPage = function(page){
console.log("******jumpPage********");
};
obj.activeFormulaBoard = function(callback){
console.log("******activeFormulaBoard********");
callback && callback(null);
};
obj.activeWhiteBoard = function(callback){
console.log("******activeWhiteBoard********");
callback && callback(null);
};
obj.beganRecording = function(){
console.log("******beganRecording********");
};
obj.endRecording = function(callback){
console.log("******endRecording********");
callback&&callback("");
};
obj.speakPoints = function(audioUrl, evalText, callback){
console.log("******speakPoints********");
callback&&callback("");
};
obj.startRecord = function(){
console.log("******startRecord********");
};
obj.stopRecord = function(callback){
console.log("******stopRecord********");
callback&&callback("");
};
obj.greadPapersForText = function(params, callback){
console.log("******greadPapersForText********");
callback&&callback("");
}
obj.lansiEvaluation = function(params, callback){
console.log("******lansiEvaluation********");
callback&&callback("");
}
obj.startTest = function(testText){
console.log("******startTest********");
};
obj.stopTest = function(callback){
console.log("******stopTest********");
callback&&callback("");
};
obj.openDubbingPage = function(){
console.log("******openDubbingPage********");
},
obj.openDubbingPageTwo = function(){
console.log("******openDubbingPageTwo********");
},
obj.openRecognitionCamera = function(callback){
console.log("******openRecognitionCamera********");
callback&&callback("");
},
obj.sendAnswer = function(answer, isRight, startTime){
console.log("******sendAnswer********");
};
obj.getAnswer = function(queryObj, callback){
console.log("******getAnswer********");
callback&&callback("");
};
obj.openOsmo = function(){
console.log("******openOsmo********");
};
obj.closeOsmo = function(){
console.log("******closeOsmo********");
};
obj.openOsmoHandwriting = function(){
console.log("******openOsmoHandwriting********");
};
obj.closeOsmoHandwriting = function(){
console.log("******closeOsmoHandwriting********");
};
obj.openOsmoFingerRead = function(){
console.log("******openOsmoFingerRead********");
};
obj.closeOsmoFingerRead = function(){
console.log("******closeOsmoFingerRead********");
};
obj.gameEnd = function(){
console.log("******gameEnd********");
};
obj.getTemplates = function(callback){
callback&&callback("");
};
obj.getTemplateUrl = function(templateName, callback){
const obj = {
play_url: "",
form_url: "",
};
callback&&callback(JSON.stringify(obj));
};
obj.sendEvent = function(evtName, data, key = ''){
if(evtName==="reconnect"){
console.error("reconnect是内置的断线重连事件名称,请勿使用此名称作为事件名");
return;
}
if(evtName==="userchange"){
console.error("userchange是内置的用户变更事件名称,请勿使用此名称作为事件名");
return;
}
return;
};
obj.onEvent = function(evtName,callback){
console.warn("==本地测试用,onEvent的监听事件会直接触发==", "事件名:"+ evtName);
callback && callback("", function(){});
};
obj.removeEvent = function(evtName){
};
obj.sendErrorLog = function (error) {
};
}
return obj;
})();</script><script>if (document.domain.indexOf("iteachabc.com") > 0) {
document.domain = "iteachabc.com";
}</script><div id="app"></div></body></html>
\ No newline at end of file
(function(){"use strict";var e={568:function(e,t,i){var n=i(5471),a=i(1052),r=i.n(a),s=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("div",{staticClass:"main-header"},[t("div",{staticStyle:{float:"left"}},[t("span",[e._v("当前编辑视频:")]),t("el-button",{attrs:{type:"text"},on:{click:e.handleClickSelectSyllabus}},[e._v("在库中选择视频")])],1),t("div",{staticStyle:{float:"right"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleClickSave}},[e._v("保存")])],1)]),t("div",{staticClass:"main-body"},[t("div",{ref:"refDubbingScrollList",staticClass:"dubbing-items"},[e._l(e.dubbingData.dubbingItems,(function(i,n){return t("el-card",{key:n,staticClass:"box-card"},[t("div",{staticStyle:{position:"relative"}},[t("span",{staticClass:"item-index",staticStyle:{position:"absolute"}},[e._v(e._s(n+1)+" "),t("span",{staticStyle:{"font-size":"medium","line-height":"normal"}},[e._v(e._s(e.currentSelectDubbingIndex==n?"正在编辑":""))])]),t("div",{staticStyle:{"text-align":"right"}},[t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleClickDelete(n)}}},[e._v("删除")]),t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.handleClickSetCurrent(n)}}},[e._v("编辑")])],1)]),t("el-divider"),t("el-form",{attrs:{"label-width":"50px"}},[t("el-form-item",{attrs:{label:"原文"}},[t("el-input",{attrs:{type:"text"},model:{value:i.orgText,callback:function(t){e.$set(i,"orgText",t)},expression:"item.orgText"}})],1),t("el-form-item",{attrs:{label:"开始"}},[t("el-input",{attrs:{type:"text"},model:{value:i.timelineIn,callback:function(t){e.$set(i,"timelineIn",t)},expression:"item.timelineIn"}},[t("template",{slot:"append"},[e._v("(秒)")])],2)],1),t("el-form-item",{attrs:{label:"结束"}},[t("el-input",{attrs:{type:"text"},model:{value:i.timelineOut,callback:function(t){e.$set(i,"timelineOut",t)},expression:"item.timelineOut"}},[t("template",{slot:"append"},[e._v("(秒)")])],2)],1)],1)],1)})),t("el-card",{staticClass:"box-card"},[t("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.handelClickAdd}},[e._v("新建")])],1)],2),t("div",{staticClass:"video-panel"},[t("div",{staticClass:"center-container"},[e.updateVideoSource?e._e():t("video",{ref:"refVideo",attrs:{controls:"",width:"768px"}},[t("source",{attrs:{src:e.videoUrl,type:"video/mp4"}}),e._v(" Your browser does not support the video tag. ")]),t("TimeRangeSelector",{on:{change:e.handleRangeChange},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1)]),t("el-collapse-transition",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.currentSelectDubbingIndex>=0,expression:"currentSelectDubbingIndex >= 0"}],staticClass:"button-group"},[t("el-button",{attrs:{type:"",size:"medium",icon:"el-icon-refresh"},on:{click:e.handleClickPlayRange}},[e._v("播放区间")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isPlaying,expression:"!isPlaying"}],attrs:{type:"",size:"medium",icon:"el-icon-video-play"},on:{click:e.handleClickPlay}},[e._v("播放")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isPlaying,expression:"isPlaying"}],attrs:{type:"",size:"medium",icon:"el-icon-video-pause"},on:{click:e.handleClickPause}},[e._v("暂停")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handelClickRre10s}},[e._v("向前1秒")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handleClickSetStart}},[e._v("设置为起点")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handleClickSetEnd}},[e._v("设置为结束点")])],1)])],1),t("el-dialog",{attrs:{title:"选择内容",visible:e.dialogSelectShow,width:"500px"},on:{"update:visible":function(t){e.dialogSelectShow=t}}},[t("div",{staticClass:"el-main",staticStyle:{height:"300px"}},[t("el-tree",{attrs:{data:e.treeListData,props:e.treeProps,lazy:!0,load:e.handleLazyLoadTreeData},on:{"node-click":e.handleClickTreeNode}})],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("span",{staticClass:"current-selected-text"},[e._v("当前选择:"+e._s(e.currentSelectTreeNode?e.currentSelectTreeNode.name:"")+" - "+e._s(e.currentSelectTreeNode?e.currentSelectTreeNode.id:""))]),t("el-button",{on:{click:e.handleClickCancelSelect}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleClickConfirmSelect}},[e._v("确 定")])],1)])],1)},l=[],o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"com-trs"},[t("div",{ref:"refEcharts",staticClass:"chart-slider"})])},c=[],d={name:"TimeRangeSelector",props:{value:{type:Object,default:()=>({start:0,end:100})}},watch:{value:{handler(e){this.parentValueChange=!0,this.setTimeRange(100*e.start,100*e.end)},deep:!0}},data(){return{insECharts:null,parentValueChange:!1}},mounted(){this.initEcharts()},methods:{initEcharts(){this.insECharts||(this.insECharts=this.$echarts.init(this.$refs.refEcharts));const e={grid:{left:10,right:10,top:10,bottom:10},tooltip:{},dataZoom:[{type:"slider"}],xAxis:{show:!1},yAxis:{show:!1}};this.insECharts.on("dataZoom",(e=>{this.parentValueChange?this.parentValueChange=!1:(this.$emit("change",{start:e.start/100,end:e.end/100}),this.$emit("input",{start:e.start/100,end:e.end/100}))})),this.insECharts.setOption(e)},setTimeRange(e,t){this.insECharts.dispatchAction({type:"dataZoom",dataZoomIndex:0,start:e,end:t})}}},u=d,h=i(1656),f=(0,h.A)(u,o,c,!1,null,"291eb56d",null),m=f.exports,p=i(4335);const b=523,g=275931,v="https://ema.iteachabc.com/api/syllabus/v1",y=e=>new Promise((async(t,i)=>{const n=await p.A.get(`${v}/list?orgid=${b}&pid=${e||g}`);t(n.data)})),S=e=>new Promise((async(t,i)=>{const n=await p.A.get(`${v}/getdata?syllabusid=${e}`);t(n.data)}));var C={name:"App",components:{TimeRangeSelector:m},data(){return{isPlaying:!1,videoUrl:"",timeRange:{start:0,end:1},dubbingData:{backgroundAudio:{url:"",duration:0,size:0},dubbingItems:[]},dialogSelectShow:!1,treeListData:[],currentSelectTreeNode:null,treeProps:{children:"children",label:"name",isLeaf:function(e,t){return"1"==e.has_courseware}},updateVideoSource:!1,currentSelectDubbingIndex:-1}},async mounted(){this.getData()},methods:{async getData(){const e=await this.$getDPEData();console.log("====dpeData====",e);const t=await this.$getData();console.log("====getData====",t),this.dubbingData=t||{backgroundAudio:{url:"",duration:0,size:0},dubbingItems:[]}},handleRangeChange(e){this.$refs.refVideo.currentTime=e.start*this.$refs.refVideo.duration;const t=this.timeRange.start*this.$refs.refVideo.duration,i=this.timeRange.end*this.$refs.refVideo.duration;this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn=t,this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut=i},handleClickPlayRange(){const e=this.timeRange.start*this.$refs.refVideo.duration,t=this.timeRange.end*this.$refs.refVideo.duration;this.$refs.refVideo.currentTime=e,this.$refs.refVideo.play().then((()=>{this.isPlaying=!0;const e=()=>{this.$refs.refVideo.currentTime>=t&&(this.$refs.refVideo.pause(),this.isPlaying=!1,this.$refs.refVideo.removeEventListener("timeupdate",e))};this.$refs.refVideo.addEventListener("timeupdate",e,!1)})).catch((e=>{console.log(e)}))},handleClickPlay(){this.$refs.refVideo.play(),this.isPlaying=!0},handleClickPause(){this.$refs.refVideo.pause(),this.isPlaying=!1},handelClickRre10s(){this.$refs.refVideo.currentTime-=1},handleClickSetStart(){this.timeRange.start=this.$refs.refVideo.currentTime/this.$refs.refVideo.duration,this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn=this.$refs.refVideo.currentTime},handleClickSetEnd(){this.timeRange.end=this.$refs.refVideo.currentTime/this.$refs.refVideo.duration,this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut=this.$refs.refVideo.currentTime},handleClickSetCurrent(e,t=!1){const i=this.dubbingData.dubbingItems[e].timelineIn/this.$refs.refVideo.duration,n=this.dubbingData.dubbingItems[e].timelineOut/this.$refs.refVideo.duration;this.currentSelectDubbingIndex=e,this.timeRange={start:i,end:n},t&&this.handleClickPlayRange()},handleClickDelete(e){this.$confirm("确定要删除吗?").then((t=>{this.dubbingData.dubbingItems.splice(e,1)})).catch((e=>""))},handelClickAdd(){this.dubbingData.dubbingItems.push({orgText:"",transText:"",timelineIn:0,timelineOut:1}),this.$nextTick((()=>{this.$refs.refDubbingScrollList.scrollTop=this.$refs.refDubbingScrollList.scrollHeight}))},async handleClickSelectSyllabus(){this.dialogSelectShow=!0;const e=await y();this.treeListData=e.rows},handleClickTreeNode(e){"1"==e.has_courseware&&(this.currentSelectTreeNode=e)},handleLazyLoadTreeData(e,t){y(e.data.id).then((e=>{t(e.rows)}))},handleClickCancelSelect(){this.dialogSelectShow=!1,this.currentSelectTreeNode=null,this.treeListData=[]},async handleClickConfirmSelect(){const e=await S(this.currentSelectTreeNode.id);let t=null;try{t=JSON.parse(e.data)}catch(i){}this.videoUrl=t?t.url:"",this.updateVideoSource=!0,this.$nextTick((()=>{this.updateVideoSource=!1})),this.handleClickCancelSelect()},async handleClickSave(){this.$setData(this.dubbingData)}}},k=C,w=(0,h.A)(k,s,l,!1,null,null,null),D=w.exports,$=i(9393);n["default"].use(r()),n["default"].config.productionTip=!1,n["default"].prototype.$getData=()=>new Promise(((e,t)=>{window.courseware.getData((t=>{e(t)}),"default_key")})),n["default"].prototype.$getDPEData=()=>new Promise(((e,t)=>{window.courseware.getDPEData((t=>{e(t)}))})),n["default"].prototype.$setData=e=>{window.courseware.setData(e,null,"default_key")},n["default"].prototype.$echarts=$,new n["default"]({render:function(e){return e(D)}}).$mount("#app")}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n](r,r.exports,i),r.loaded=!0,r.exports}i.m=e,function(){i.amdO={}}(),function(){var e=[];i.O=function(t,n,a,r){if(!n){var s=1/0;for(d=0;d<e.length;d++){n=e[d][0],a=e[d][1],r=e[d][2];for(var l=!0,o=0;o<n.length;o++)(!1&r||s>=r)&&Object.keys(i.O).every((function(e){return i.O[e](n[o])}))?n.splice(o--,1):(l=!1,r<s&&(s=r));if(l){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,a,r]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={524:0};i.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,r,s=n[0],l=n[1],o=n[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(o)var d=o(i)}for(t&&t(n);c<s.length;c++)r=s[c],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(d)},n=self["webpackChunkform_vue"]=self["webpackChunkform_vue"]||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var n=i.O(void 0,[504],(function(){return i(568)}));n=i.O(n)})();
//# sourceMappingURL=app.213f4f60.js.map
\ No newline at end of file
{"version":3,"file":"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KAE1BD,EAAgBC,GAAW,EAE5B,OAAOhD,EAAoBW,EAAEC,EAC9B,EAEI0C,EAAqBC,KAAK,wBAA0BA,KAAK,yBAA2B,GACxFD,EAAmBE,QAAQP,EAAqBQ,KAAK,KAAM,IAC3DH,EAAmB/E,KAAO0E,EAAqBQ,KAAK,KAAMH,EAAmB/E,KAAKkF,KAAKH,G,IC/CvF,IAAII,EAAsB1D,EAAoBW,OAAER,EAAW,CAAC,MAAM,WAAa,OAAOH,EAAoB,IAAM,IAChH0D,EAAsB1D,EAAoBW,EAAE+C,E","sources":["webpack://form_vue/./src/App.vue?848b","webpack://form_vue/./src/components/TimeRangeSelector.vue?7787","webpack://form_vue/src/components/TimeRangeSelector.vue","webpack://form_vue/./src/components/TimeRangeSelector.vue?a7a2","webpack://form_vue/./src/components/TimeRangeSelector.vue","webpack://form_vue/./src/api/syllabus.js","webpack://form_vue/src/App.vue","webpack://form_vue/./src/App.vue?6a4a","webpack://form_vue/./src/App.vue","webpack://form_vue/./src/main.js","webpack://form_vue/webpack/bootstrap","webpack://form_vue/webpack/runtime/amd options","webpack://form_vue/webpack/runtime/chunk loaded","webpack://form_vue/webpack/runtime/compat get default export","webpack://form_vue/webpack/runtime/define property getters","webpack://form_vue/webpack/runtime/global","webpack://form_vue/webpack/runtime/hasOwnProperty shorthand","webpack://form_vue/webpack/runtime/make namespace object","webpack://form_vue/webpack/runtime/node module decorator","webpack://form_vue/webpack/runtime/jsonp chunk loading","webpack://form_vue/webpack/startup"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{staticClass:\"main-header\"},[_c('div',{staticStyle:{\"float\":\"left\"}},[_c('span',[_vm._v(\"当前编辑视频:\")]),_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleClickSelectSyllabus}},[_vm._v(\"在库中选择视频\")])],1),_c('div',{staticStyle:{\"float\":\"right\"}},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleClickSave}},[_vm._v(\"保存\")])],1)]),_c('div',{staticClass:\"main-body\"},[_c('div',{ref:\"refDubbingScrollList\",staticClass:\"dubbing-items\"},[_vm._l((_vm.dubbingData.dubbingItems),function(item,index){return _c('el-card',{key:index,staticClass:\"box-card\"},[_c('div',{staticStyle:{\"position\":\"relative\"}},[_c('span',{staticClass:\"item-index\",staticStyle:{\"position\":\"absolute\"}},[_vm._v(_vm._s(index + 1)+\" \"),_c('span',{staticStyle:{\"font-size\":\"medium\",\"line-height\":\"normal\"}},[_vm._v(_vm._s(_vm.currentSelectDubbingIndex==index ? '正在编辑' : ''))])]),_c('div',{staticStyle:{\"text-align\":\"right\"}},[_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"danger\"},on:{\"click\":function($event){return _vm.handleClickDelete(index)}}},[_vm._v(\"删除\")]),_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"primary\"},on:{\"click\":function($event){return _vm.handleClickSetCurrent(index)}}},[_vm._v(\"编辑\")])],1)]),_c('el-divider'),_c('el-form',{attrs:{\"label-width\":\"50px\"}},[_c('el-form-item',{attrs:{\"label\":\"原文\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.orgText),callback:function ($$v) {_vm.$set(item, \"orgText\", $$v)},expression:\"item.orgText\"}})],1),_c('el-form-item',{attrs:{\"label\":\"开始\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.timelineIn),callback:function ($$v) {_vm.$set(item, \"timelineIn\", $$v)},expression:\"item.timelineIn\"}},[_c('template',{slot:\"append\"},[_vm._v(\"(秒)\")])],2)],1),_c('el-form-item',{attrs:{\"label\":\"结束\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.timelineOut),callback:function ($$v) {_vm.$set(item, \"timelineOut\", $$v)},expression:\"item.timelineOut\"}},[_c('template',{slot:\"append\"},[_vm._v(\"(秒)\")])],2)],1)],1)],1)}),_c('el-card',{staticClass:\"box-card\"},[_c('el-button',{staticStyle:{\"width\":\"100%\"},attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handelClickAdd}},[_vm._v(\"新建\")])],1)],2),_c('div',{staticClass:\"video-panel\"},[_c('div',{staticClass:\"center-container\"},[(!_vm.updateVideoSource)?_c('video',{ref:\"refVideo\",attrs:{\"controls\":\"\",\"width\":\"768px\"}},[_c('source',{attrs:{\"src\":_vm.videoUrl,\"type\":\"video/mp4\"}}),_vm._v(\" Your browser does not support the video tag. \")]):_vm._e(),_c('TimeRangeSelector',{on:{\"change\":_vm.handleRangeChange},model:{value:(_vm.timeRange),callback:function ($$v) {_vm.timeRange=$$v},expression:\"timeRange\"}})],1)]),_c('el-collapse-transition',[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentSelectDubbingIndex >= 0),expression:\"currentSelectDubbingIndex >= 0\"}],staticClass:\"button-group\"},[_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-refresh\"},on:{\"click\":_vm.handleClickPlayRange}},[_vm._v(\"播放区间\")]),_c('el-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isPlaying),expression:\"!isPlaying\"}],attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-video-play\"},on:{\"click\":_vm.handleClickPlay}},[_vm._v(\"播放\")]),_c('el-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isPlaying),expression:\"isPlaying\"}],attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-video-pause\"},on:{\"click\":_vm.handleClickPause}},[_vm._v(\"暂停\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handelClickRre10s}},[_vm._v(\"向前1秒\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handleClickSetStart}},[_vm._v(\"设置为起点\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handleClickSetEnd}},[_vm._v(\"设置为结束点\")])],1)])],1),_c('el-dialog',{attrs:{\"title\":\"选择内容\",\"visible\":_vm.dialogSelectShow,\"width\":\"500px\"},on:{\"update:visible\":function($event){_vm.dialogSelectShow=$event}}},[_c('div',{staticClass:\"el-main\",staticStyle:{\"height\":\"300px\"}},[_c('el-tree',{attrs:{\"data\":_vm.treeListData,\"props\":_vm.treeProps,\"lazy\":true,\"load\":_vm.handleLazyLoadTreeData},on:{\"node-click\":_vm.handleClickTreeNode}})],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('span',{staticClass:\"current-selected-text\"},[_vm._v(\"当前选择:\"+_vm._s(_vm.currentSelectTreeNode ? _vm.currentSelectTreeNode.name : \"\")+\" - \"+_vm._s(_vm.currentSelectTreeNode ? _vm.currentSelectTreeNode.id : \"\"))]),_c('el-button',{on:{\"click\":_vm.handleClickCancelSelect}},[_vm._v(\"取 消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleClickConfirmSelect}},[_vm._v(\"确 定\")])],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"com-trs\"},[_c('div',{ref:\"refEcharts\",staticClass:\"chart-slider\"})])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"com-trs\">\n <div ref=\"refEcharts\" class=\"chart-slider\"></div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'TimeRangeSelector',\n props: {\n value: {\n type: Object,\n default: () => {\n return {\n start: 0,\n end: 100\n }\n }\n }\n },\n watch: {\n value: {\n handler(val) {\n this.parentValueChange = true;\n this.setTimeRange(val.start * 100, val.end * 100);\n },\n deep: true\n }\n },\n data() {\n return {\n insECharts: null,\n parentValueChange: false\n }\n },\n mounted() {\n this.initEcharts();\n },\n methods: {\n initEcharts() {\n if(!this.insECharts) {\n this.insECharts = this.$echarts.init(this.$refs.refEcharts);\n }\n\n const option = {\n grid: {\n left: 10,\n right: 10,\n top: 10,\n bottom: 10\n },\n tooltip: {},\n\n dataZoom: [\n {\n type: 'slider'\n },\n ],\n xAxis: { show: false } ,\n yAxis: { show: false },\n\n };\n\n this.insECharts.on('dataZoom', (evt) => {\n if(this.parentValueChange) {\n this.parentValueChange = false;\n return;\n }\n this.$emit('change', {\n start: evt.start / 100,\n end: evt.end / 100\n })\n this.$emit('input', {\n start: evt.start / 100,\n end: evt.end / 100\n })\n })\n\n this.insECharts.setOption(option);\n },\n setTimeRange(start, end) {\n this.insECharts.dispatchAction({\n type: 'dataZoom',\n // 可选,dataZoom 组件的 index,多个 dataZoom 组件时有用,默认为 0\n dataZoomIndex: 0,\n // 开始位置的百分比,0 - 100\n start: start,\n // 结束位置的百分比,0 - 100\n end: end,\n // // 开始位置的数值\n // startValue: number,\n // // 结束位置的数值\n // endValue: number\n });\n\n }\n },\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\n.com-trs {\n width: 100%;\n height: 50px;\n}\n\n.chart-slider {\n width: 100%;\n height: 100%;\n}\n</style>","import mod from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TimeRangeSelector.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TimeRangeSelector.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./TimeRangeSelector.vue?vue&type=template&id=291eb56d&scoped=true\"\nimport script from \"./TimeRangeSelector.vue?vue&type=script&lang=js\"\nexport * from \"./TimeRangeSelector.vue?vue&type=script&lang=js\"\nimport style0 from \"./TimeRangeSelector.vue?vue&type=style&index=0&id=291eb56d&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"291eb56d\",\n null\n \n)\n\nexport default component.exports","import axios from \"axios\";\nconst org = 523;\nconst dpe_root = 275931;\nconst base_url = \"https://ema.iteachabc.com/api/syllabus/v1\";\n\nexport const getSyllabusListById = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/list?orgid=${org}&pid=${syllabus_id?syllabus_id:dpe_root}`);\n resolve(res.data);\n })\n}\n\nexport const getFirstCoursewareBySyllId = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getdata?syllabusid=${syllabus_id}`);\n resolve(res.data);\n })\n}\n\nexport const getCoursewarePageBySyllId = (syllabus_id, page) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getpagedata?syllabusid=${syllabus_id}&page=${page}`);\n resolve(res.data);\n })\n}\n\nexport const getAllCoursewareBySyllId = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getdatalist?syllabusids=${syllabus_id}`);\n resolve(res.data);\n })\n}\n\nexport const getPidPathName = (pid_path) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/pathname?pid_path=${pid_path}`);\n resolve(res.data);\n })\n}","<template>\n <div id=\"app\">\n <div class=\"main-header\">\n <div style=\"float: left;\">\n <span>当前编辑视频:</span>\n <el-button type=\"text\" @click=\"handleClickSelectSyllabus\">在库中选择视频</el-button>\n </div>\n <div style=\"float: right;\">\n <el-button type=\"primary\" @click=\"handleClickSave\">保存</el-button>\n </div>\n </div>\n <div class=\"main-body\">\n <div ref=\"refDubbingScrollList\" class=\"dubbing-items\">\n <el-card v-for=\"item, index in dubbingData.dubbingItems\" :key=\"index\" class=\"box-card\">\n <div style=\"position: relative;\">\n <span style=\"position: absolute;\" class=\"item-index\">{{ index + 1 }} <span style=\"font-size: medium; line-height: normal;\">{{ currentSelectDubbingIndex==index ? '正在编辑' : '' }}</span></span>\n <div style=\"text-align: right;\">\n <el-button size=\"mini\" type=\"danger\" @click=\"handleClickDelete(index)\">删除</el-button>\n <el-button size=\"mini\" type=\"primary\" @click=\"handleClickSetCurrent(index)\">编辑</el-button>\n </div>\n </div>\n <el-divider></el-divider>\n <el-form label-width=\"50px\">\n <el-form-item label=\"原文\">\n <el-input type=\"text\" v-model=\"item.orgText\" />\n </el-form-item>\n <!-- <el-form-item label=\"译文\">\n <el-input type=\"text\" v-model=\"item.transText\"/>\n </el-form-item> -->\n <el-form-item label=\"开始\">\n <el-input type=\"text\" v-model=\"item.timelineIn\">\n <template slot=\"append\">(秒)</template>\n </el-input>\n </el-form-item>\n <el-form-item label=\"结束\">\n <el-input type=\"text\" v-model=\"item.timelineOut\">\n <template slot=\"append\">(秒)</template>\n </el-input>\n </el-form-item>\n </el-form>\n </el-card>\n <el-card class=\"box-card\">\n <el-button type=\"primary\" @click=\"handelClickAdd\" style=\"width: 100%;\">新建</el-button>\n </el-card>\n </div>\n <div class=\"video-panel\">\n <div class=\"center-container\">\n <video v-if=\"!updateVideoSource\" ref=\"refVideo\" controls width=\"768px\">\n <source :src=\"videoUrl\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>\n <TimeRangeSelector v-model=\"timeRange\" @change=\"handleRangeChange\"></TimeRangeSelector>\n </div>\n </div>\n <el-collapse-transition>\n <div v-show=\"currentSelectDubbingIndex >= 0\" class=\"button-group\">\n <el-button type=\"\" size=\"medium\" icon=\"el-icon-refresh\" @click=\"handleClickPlayRange\">播放区间</el-button>\n <el-button v-show=\"!isPlaying\" type=\"\" size=\"medium\" icon=\"el-icon-video-play\" @click=\"handleClickPlay\">播放</el-button>\n <el-button v-show=\"isPlaying\" type=\"\" size=\"medium\" icon=\"el-icon-video-pause\" @click=\"handleClickPause\">暂停</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handelClickRre10s\">向前1秒</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handleClickSetStart\">设置为起点</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handleClickSetEnd\">设置为结束点</el-button>\n </div>\n </el-collapse-transition>\n </div>\n\n <el-dialog title=\"选择内容\" :visible.sync=\"dialogSelectShow\" width=\"500px\">\n <div class=\"el-main\" style=\"height: 300px;\">\n <el-tree :data=\"treeListData\" :props=\"treeProps\" @node-click=\"handleClickTreeNode\" :lazy=\"true\"\n :load=\"handleLazyLoadTreeData\"></el-tree>\n </div>\n <div slot=\"footer\" class=\"dialog-footer\">\n <span class=\"current-selected-text\">当前选择:{{ currentSelectTreeNode ? currentSelectTreeNode.name : \"\" }} -\n {{ currentSelectTreeNode ? currentSelectTreeNode.id : \"\" }}</span>\n <el-button @click=\"handleClickCancelSelect\">取 消</el-button>\n <el-button type=\"primary\" @click=\"handleClickConfirmSelect\">确 定</el-button>\n </div>\n </el-dialog>\n\n </div>\n</template>\n\n<script>\nimport TimeRangeSelector from './components/TimeRangeSelector.vue'\nimport { getSyllabusListById, getFirstCoursewareBySyllId, getPidPathName } from '@/api/syllabus'\n\nexport default {\n name: 'App',\n components: {\n TimeRangeSelector\n },\n data() {\n return {\n // 是否正在播放\n isPlaying: false,\n\n // 视频地址\n videoUrl: '',\n\n // 时间区间\n timeRange: {\n start: 0,\n end: 1\n },\n\n // 配音数据\n dubbingData: {\n backgroundAudio: {\n url: \"\",\n duration: 0,\n size: 0\n },\n dubbingItems: []\n },\n\n\n // 选择内容对话框显示隐藏控制\n dialogSelectShow: false,\n\n // 树形列表数据\n treeListData: [],\n\n // 当前选择的节点信息\n currentSelectTreeNode: null,\n\n // 树形列表配置\n treeProps: {\n children: 'children',\n label: 'name',\n isLeaf: function (data, node) {\n return data.has_courseware == \"1\";\n }\n },\n\n // 是否更新视频资源\n updateVideoSource: false,\n\n // 当前选择的配音秀索引\n currentSelectDubbingIndex: -1\n };\n },\n async mounted() {\n this.getData();\n // this.$setData([\n // {\n // \"orgText\": \"Apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"0.352728\",\n // \"timelineOut\": \"2.349307\"\n // },\n // {\n // \"orgText\": \"Green apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"4.938305\",\n // \"timelineOut\": \"7.2651\"\n // },\n // {\n // \"orgText\": \"Red apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"10.687003\",\n // \"timelineOut\": \"13.054597\"\n // },\n // {\n // \"orgText\": \"Juicy apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"16.128933\",\n // \"timelineOut\": \"20.358868\"\n // },\n // {\n // \"orgText\": \"Gulp,gulp,hic!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"20.674126\",\n // \"timelineOut\": \"23.316044\"\n // },\n // {\n // \"orgText\": \"BOTH:apples!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"26.360674\",\n // \"timelineOut\": \"29.569075\"\n // },\n // {\n // \"orgText\": \"Shiny apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"34.97507\",\n // \"timelineOut\": \"37.929512\"\n // },\n // {\n // \"orgText\": \"Crunchy apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"41.66807\",\n // \"timelineOut\": \"44.267387\"\n // },\n // {\n // \"orgText\": \"Bobbing apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"48.00274\",\n // \"timelineOut\": \"50.683136\"\n // },\n // {\n // \"orgText\": \"Way-hay!Apples!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"53.787037\",\n // \"timelineOut\": \"57.842\"\n // }\n // ])\n },\n methods: {\n async getData() {\n const dpeData = await this.$getDPEData();\n console.log(\"====dpeData====\", dpeData)\n \n const res = await this.$getData();\n console.log(\"====getData====\", res)\n if(!res) {\n // 默认数据\n this.dubbingData = {\n backgroundAudio: {\n url: \"\",\n duration: 0,\n size: 0\n },\n dubbingItems: []\n }\n } else {\n this.dubbingData = res\n }\n },\n\n handleRangeChange(event) {\n this.$refs.refVideo.currentTime = event.start * this.$refs.refVideo.duration;\n const sTime = this.timeRange.start * this.$refs.refVideo.duration;\n const eTime = this.timeRange.end * this.$refs.refVideo.duration;\n\n this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn = sTime;\n this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut = eTime;\n },\n\n // 点击区间播放\n handleClickPlayRange() {\n const sTime = this.timeRange.start * this.$refs.refVideo.duration;\n const eTime = this.timeRange.end * this.$refs.refVideo.duration;\n\n this.$refs.refVideo.currentTime = sTime;\n this.$refs.refVideo.play().then(() => {\n this.isPlaying = true;\n const checkTime = () => {\n if (this.$refs.refVideo.currentTime >= eTime) {\n this.$refs.refVideo.pause();\n this.isPlaying = false;\n this.$refs.refVideo.removeEventListener('timeupdate', checkTime);\n }\n }\n this.$refs.refVideo.addEventListener('timeupdate', checkTime, false);\n })\n .catch(error => {\n console.log(error);\n });\n\n },\n\n handleClickPlay() {\n this.$refs.refVideo.play();\n this.isPlaying = true;\n },\n\n handleClickPause() {\n this.$refs.refVideo.pause();\n this.isPlaying = false;\n },\n\n handelClickRre10s() {\n this.$refs.refVideo.currentTime -= 1;\n },\n\n handleClickSetStart() {\n this.timeRange.start = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;\n this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn = this.$refs.refVideo.currentTime;\n \n },\n\n handleClickSetEnd() {\n this.timeRange.end = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;\n this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut = this.$refs.refVideo.currentTime;\n },\n\n handleClickSetCurrent(index, play = false) {\n const timelineIn = this.dubbingData.dubbingItems[index].timelineIn / this.$refs.refVideo.duration;\n const timelineOut = this.dubbingData.dubbingItems[index].timelineOut / this.$refs.refVideo.duration;\n\n this.currentSelectDubbingIndex = index;\n\n this.timeRange = {\n start: timelineIn,\n end: timelineOut\n }\n\n play && this.handleClickPlayRange()\n },\n\n // 删除配音秀\n handleClickDelete(index) {\n this.$confirm(\"确定要删除吗?\").then(res=>{\n this.dubbingData.dubbingItems.splice(index, 1)\n }).catch(_=>\"\")\n },\n\n // 添加配音\n handelClickAdd() {\n this.dubbingData.dubbingItems.push({\n orgText: '',\n transText: '',\n timelineIn: 0,\n timelineOut: 1\n })\n this.$nextTick(() => {\n this.$refs.refDubbingScrollList.scrollTop = this.$refs.refDubbingScrollList.scrollHeight;\n })\n },\n\n // 点击切换配音资源\n async handleClickSelectSyllabus() {\n this.dialogSelectShow = true;\n const resData = await getSyllabusListById();\n this.treeListData = resData.rows;\n },\n\n // 点击树形列表节点\n handleClickTreeNode(node) {\n if (node.has_courseware == \"1\") {\n this.currentSelectTreeNode = node;\n }\n },\n\n // 懒加载树形列表数据\n handleLazyLoadTreeData(node, resolve) {\n getSyllabusListById(node.data.id).then(data => {\n resolve(data.rows)\n })\n },\n\n // 取消选择\n handleClickCancelSelect() {\n this.dialogSelectShow = false;\n this.currentSelectTreeNode = null;\n this.treeListData = [];\n },\n\n // 确定选择节点\n async handleClickConfirmSelect() {\n // 获取视频课件信息\n const resData = await getFirstCoursewareBySyllId(this.currentSelectTreeNode.id);\n\n let jsonData = null;\n try {\n jsonData = JSON.parse(resData.data);\n } catch (error) {\n \n }\n\n // 获取视频地址\n this.videoUrl = jsonData ? jsonData.url : '';\n\n // 重新加载视频组件\n this.updateVideoSource = true;\n this.$nextTick(() => {\n this.updateVideoSource = false;\n })\n\n // 关闭对话框\n this.handleClickCancelSelect();\n },\n\n // 保存数据\n async handleClickSave() {\n this.$setData(this.dubbingData)\n }\n }\n}\n</script>\n\n<style>\nbody,\nhtml {\n margin: 0;\n padding: 0;\n height: 100%;\n overflow: hidden;\n background-color: #FFFFFF;\n}\n\n#app {}\n\n.cascader-item {\n width: 150px;\n}\n\n.button-item {\n margin-left: 10px;\n}\n\n.current-selected-text {\n float: left;\n font-size: small;\n}\n\n.video-panel {\n margin-left: 320px;\n}\n\n.center-container {\n width: 768px;\n margin-left: 320px;\n padding: 20px 10px;\n margin: 0 auto;\n}\n\n.button-group {\n margin-left: 320px;\n text-align: center;\n}\n\n.dubbing-items {\n width: 300px;\n height: calc(100% - 90px);\n background-color: #f0f0f0;\n position: absolute;\n left: 0;\n overflow: auto;\n padding: 10px;\n}\n\n.box-card {\n margin-bottom: 10px;\n}\n\n::v-deep .el-card__body {\n padding: 0 !important;\n}\n\n.item-index {\n font-size: 20px;\n font-weight: bold;\n margin-right: 10px;\n}\n\n.main-header {\n height: 70px;\n line-height: 70px;\n position: fixed;\n z-index: 99;\n top: 0;\n background-color: #FFFFFF;\n width: calc(100% - 40px);\n border-bottom: 1px solid #dcdfe6;\n padding: 0 20px;\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);\n}\n\n.main-body {\n margin-top: 70px;\n height: calc(100% - 70px);\n overflow: auto;\n}\n</style>\n","import mod from \"-!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=393e29f9\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=393e29f9&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport ElementUI from 'element-ui';\nimport 'element-ui/lib/theme-chalk/index.css';\nimport App from './App.vue'\nimport * as echarts from 'echarts';\n\nVue.use(ElementUI);\n\nVue.config.productionTip = false\nVue.prototype.$getData = () => {\n return new Promise((resolve, reject) => {\n (window).courseware.getData((data) => {\n resolve(data)\n }, \"default_key\")\n })\n}\n\nVue.prototype.$getDPEData = () => {\n return new Promise((resolve, reject) => {\n (window).courseware.getDPEData((data) => {\n resolve(data)\n })\n })\n}\n\nVue.prototype.$setData = (data) => {\n (window).courseware.setData(data, null, \"default_key\")\n}\n\nVue.prototype.$echarts = echarts\n\nnew Vue({\n render: function (h) { return h(App) },\n}).$mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkform_vue\"] = self[\"webpackChunkform_vue\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [504], function() { return __webpack_require__(568); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["render","_vm","this","_c","_self","attrs","staticClass","staticStyle","_v","on","handleClickSelectSyllabus","handleClickSave","ref","_l","dubbingData","item","index","key","_s","currentSelectDubbingIndex","$event","handleClickDelete","handleClickSetCurrent","model","value","callback","$$v","$set","expression","slot","handelClickAdd","updateVideoSource","_e","videoUrl","handleRangeChange","timeRange","directives","name","rawName","handleClickPlayRange","isPlaying","handleClickPlay","handleClickPause","handelClickRre10s","handleClickSetStart","handleClickSetEnd","dialogSelectShow","treeListData","treeProps","handleLazyLoadTreeData","handleClickTreeNode","currentSelectTreeNode","id","handleClickCancelSelect","handleClickConfirmSelect","staticRenderFns","props","type","Object","default","start","end","watch","handler","val","parentValueChange","setTimeRange","deep","data","insECharts","mounted","initEcharts","methods","$echarts","init","$refs","refEcharts","option","grid","left","right","top","bottom","tooltip","dataZoom","xAxis","show","yAxis","evt","$emit","setOption","dispatchAction","dataZoomIndex","component","org","dpe_root","base_url","getSyllabusListById","syllabus_id","Promise","async","resolve","reject","res","get","getFirstCoursewareBySyllId","components","TimeRangeSelector","backgroundAudio","url","duration","size","dubbingItems","children","label","isLeaf","node","has_courseware","getData","dpeData","$getDPEData","console","log","$getData","event","refVideo","currentTime","sTime","eTime","timelineIn","timelineOut","play","then","checkTime","pause","removeEventListener","addEventListener","catch","error","$confirm","splice","_","push","orgText","transText","$nextTick","refDubbingScrollList","scrollTop","scrollHeight","resData","rows","jsonData","JSON","parse","$setData","use","config","productionTip","prototype","courseware","getDPEData","setData","echarts","h","App","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","m","amdO","deferred","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","keys","every","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","window","obj","prop","hasOwnProperty","call","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
(function(){"use strict";var e={311:function(e,t,i){var n=i(5471),a=i(1052),r=i.n(a),s=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("div",{staticClass:"main-header"},[t("div",{staticStyle:{float:"left"}},[t("span",[e._v("当前编辑视频:")]),t("el-button",{attrs:{type:"text"},on:{click:e.handleClickSelectSyllabus}},[e._v("在库中选择视频")])],1),t("div",{staticStyle:{float:"right"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.handleClickSave}},[e._v("保存")])],1)]),t("div",{staticClass:"main-body"},[t("div",{ref:"refDubbingScrollList",staticClass:"dubbing-items"},[e._l(e.dubbintItems,(function(i,n){return t("el-card",{key:n,staticClass:"box-card"},[t("div",{staticStyle:{position:"relative"}},[t("span",{staticClass:"item-index",staticStyle:{position:"absolute"}},[e._v(e._s(n+1)+" "),t("span",{staticStyle:{"font-size":"medium","line-height":"normal"}},[e._v(e._s(e.currentSelectDubbingIndex==n?"正在编辑":""))])]),t("div",{staticStyle:{"text-align":"right"}},[t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleClickDelete(n)}}},[e._v("删除")]),t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.handleClickSetCurrent(n)}}},[e._v("编辑")])],1)]),t("el-divider"),t("el-form",{attrs:{"label-width":"50px"}},[t("el-form-item",{attrs:{label:"原文"}},[t("el-input",{attrs:{type:"text"},model:{value:i.orgText,callback:function(t){e.$set(i,"orgText",t)},expression:"item.orgText"}})],1),t("el-form-item",{attrs:{label:"开始"}},[t("el-input",{attrs:{type:"text"},model:{value:i.timelineIn,callback:function(t){e.$set(i,"timelineIn",t)},expression:"item.timelineIn"}},[t("template",{slot:"append"},[e._v("(秒)")])],2)],1),t("el-form-item",{attrs:{label:"结束"}},[t("el-input",{attrs:{type:"text"},model:{value:i.timelineOut,callback:function(t){e.$set(i,"timelineOut",t)},expression:"item.timelineOut"}},[t("template",{slot:"append"},[e._v("(秒)")])],2)],1)],1)],1)})),t("el-card",{staticClass:"box-card"},[t("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.handelClickAdd}},[e._v("新建")])],1)],2),t("div",{staticClass:"video-panel"},[t("div",{staticClass:"center-container"},[e.updateVideoSource?e._e():t("video",{ref:"refVideo",attrs:{controls:"",width:"768px"}},[t("source",{attrs:{src:e.videoUrl,type:"video/mp4"}}),e._v(" Your browser does not support the video tag. ")]),t("TimeRangeSelector",{on:{change:e.handleRangeChange},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1)]),t("el-collapse-transition",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.currentSelectDubbingIndex>=0,expression:"currentSelectDubbingIndex >= 0"}],staticClass:"button-group"},[t("el-button",{attrs:{type:"",size:"medium",icon:"el-icon-refresh"},on:{click:e.handleClickPlayRange}},[e._v("播放区间")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isPlaying,expression:"!isPlaying"}],attrs:{type:"",size:"medium",icon:"el-icon-video-play"},on:{click:e.handleClickPlay}},[e._v("播放")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isPlaying,expression:"isPlaying"}],attrs:{type:"",size:"medium",icon:"el-icon-video-pause"},on:{click:e.handleClickPause}},[e._v("暂停")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handelClickRre10s}},[e._v("向前1秒")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handleClickSetStart}},[e._v("设置为起点")]),t("el-button",{attrs:{type:"",size:"medium"},on:{click:e.handleClickSetEnd}},[e._v("设置为结束点")])],1)])],1),t("el-dialog",{attrs:{title:"选择内容",visible:e.dialogSelectShow,width:"500px"},on:{"update:visible":function(t){e.dialogSelectShow=t}}},[t("div",{staticClass:"el-main",staticStyle:{height:"300px"}},[t("el-tree",{attrs:{data:e.treeListData,props:e.treeProps,lazy:!0,load:e.handleLazyLoadTreeData},on:{"node-click":e.handleClickTreeNode}})],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("span",{staticClass:"current-selected-text"},[e._v("当前选择:"+e._s(e.currentSelectTreeNode?e.currentSelectTreeNode.name:"")+" - "+e._s(e.currentSelectTreeNode?e.currentSelectTreeNode.id:""))]),t("el-button",{on:{click:e.handleClickCancelSelect}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleClickConfirmSelect}},[e._v("确 定")])],1)])],1)},l=[],o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"com-trs"},[t("div",{ref:"refEcharts",staticClass:"chart-slider"})])},c=[],d={name:"TimeRangeSelector",props:{value:{type:Object,default:()=>({start:0,end:100})}},watch:{value:{handler(e){this.parentValueChange=!0,this.setTimeRange(100*e.start,100*e.end)},deep:!0}},data(){return{insECharts:null,parentValueChange:!1}},mounted(){this.initEcharts()},methods:{initEcharts(){this.insECharts||(this.insECharts=this.$echarts.init(this.$refs.refEcharts));const e={grid:{left:10,right:10,top:10,bottom:10},tooltip:{},dataZoom:[{type:"slider"}],xAxis:{show:!1},yAxis:{show:!1}};this.insECharts.on("dataZoom",(e=>{this.parentValueChange?this.parentValueChange=!1:(this.$emit("change",{start:e.start/100,end:e.end/100}),this.$emit("input",{start:e.start/100,end:e.end/100}))})),this.insECharts.setOption(e)},setTimeRange(e,t){this.insECharts.dispatchAction({type:"dataZoom",dataZoomIndex:0,start:e,end:t})}}},u=d,h=i(1656),f=(0,h.A)(u,o,c,!1,null,"291eb56d",null),m=f.exports,p=i(4335);const b=523,g=275931,v="https://ema.iteachabc.com/api/syllabus/v1",y=e=>new Promise((async(t,i)=>{const n=await p.A.get(`${v}/list?orgid=${b}&pid=${e||g}`);t(n.data)})),S=e=>new Promise((async(t,i)=>{const n=await p.A.get(`${v}/getdata?syllabusid=${e}`);t(n.data)}));var C={name:"App",components:{TimeRangeSelector:m},data(){return{isPlaying:!1,videoUrl:"https://teach.cdn.ireadabc.com/3d13b9a7b2cb777836a3d5b29c38384b.mp4",timeRange:{start:0,end:1},dubbintItems:[],dialogSelectShow:!1,treeListData:[],currentSelectTreeNode:null,treeProps:{children:"children",label:"name",isLeaf:function(e,t){return"1"==e.has_courseware}},updateVideoSource:!1,currentSelectDubbingIndex:-1}},async mounted(){this.getData()},methods:{async getData(){const e=await this.$getData();console.log("====getData====",e),this.dubbintItems=e||[]},handleRangeChange(e){this.$refs.refVideo.currentTime=e.start*this.$refs.refVideo.duration;const t=this.timeRange.start*this.$refs.refVideo.duration,i=this.timeRange.end*this.$refs.refVideo.duration;this.dubbintItems[this.currentSelectDubbingIndex].timelineIn=t,this.dubbintItems[this.currentSelectDubbingIndex].timelineOut=i},handleClickPlayRange(){const e=this.timeRange.start*this.$refs.refVideo.duration,t=this.timeRange.end*this.$refs.refVideo.duration;this.$refs.refVideo.currentTime=e,this.$refs.refVideo.play().then((()=>{this.isPlaying=!0;const e=()=>{this.$refs.refVideo.currentTime>=t&&(this.$refs.refVideo.pause(),this.isPlaying=!1,this.$refs.refVideo.removeEventListener("timeupdate",e))};this.$refs.refVideo.addEventListener("timeupdate",e,!1)})).catch((e=>{console.log(e)}))},handleClickPlay(){this.$refs.refVideo.play(),this.isPlaying=!0},handleClickPause(){this.$refs.refVideo.pause(),this.isPlaying=!1},handelClickRre10s(){this.$refs.refVideo.currentTime-=1},handleClickSetStart(){this.timeRange.start=this.$refs.refVideo.currentTime/this.$refs.refVideo.duration,this.dubbintItems[this.currentSelectDubbingIndex].timelineIn=this.$refs.refVideo.currentTime},handleClickSetEnd(){this.timeRange.end=this.$refs.refVideo.currentTime/this.$refs.refVideo.duration,this.dubbintItems[this.currentSelectDubbingIndex].timelineOut=this.$refs.refVideo.currentTime},handleClickSetCurrent(e,t=!1){const i=this.dubbintItems[e].timelineIn/this.$refs.refVideo.duration,n=this.dubbintItems[e].timelineOut/this.$refs.refVideo.duration;this.currentSelectDubbingIndex=e,this.timeRange={start:i,end:n},t&&this.handleClickPlayRange()},handleClickDelete(e){this.$confirm("确定要删除吗?").then((t=>{this.dubbintItems.splice(e,1)})).catch((e=>""))},handelClickAdd(){this.dubbintItems.push({orgText:"",transText:"",timelineIn:0,timelineOut:1}),this.$nextTick((()=>{this.$refs.refDubbingScrollList.scrollTop=this.$refs.refDubbingScrollList.scrollHeight}))},async handleClickSelectSyllabus(){this.dialogSelectShow=!0;const e=await y();this.treeListData=e.rows},handleClickTreeNode(e){"1"==e.has_courseware&&(this.currentSelectTreeNode=e)},handleLazyLoadTreeData(e,t){y(e.data.id).then((e=>{t(e.rows)}))},handleClickCancelSelect(){this.dialogSelectShow=!1,this.currentSelectTreeNode=null,this.treeListData=[]},async handleClickConfirmSelect(){const e=await S(this.currentSelectTreeNode.id);let t=null;try{t=JSON.parse(e.data)}catch(i){}this.videoUrl=t?t.url:"",this.updateVideoSource=!0,this.$nextTick((()=>{this.updateVideoSource=!1})),this.handleClickCancelSelect()},async handleClickSave(){this.$setData(this.dubbintItems)}}},k=C,w=(0,h.A)(k,s,l,!1,null,null,null),x=w.exports,$=i(9393);n["default"].use(r()),n["default"].config.productionTip=!1,n["default"].prototype.$getData=()=>new Promise(((e,t)=>{window.courseware.getData((t=>{e(t)}),"default_key")})),n["default"].prototype.$setData=e=>{window.courseware.setData(e,null,"default_key")},n["default"].prototype.$echarts=$,new n["default"]({render:function(e){return e(x)}}).$mount("#app")}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n](r,r.exports,i),r.loaded=!0,r.exports}i.m=e,function(){i.amdO={}}(),function(){var e=[];i.O=function(t,n,a,r){if(!n){var s=1/0;for(d=0;d<e.length;d++){n=e[d][0],a=e[d][1],r=e[d][2];for(var l=!0,o=0;o<n.length;o++)(!1&r||s>=r)&&Object.keys(i.O).every((function(e){return i.O[e](n[o])}))?n.splice(o--,1):(l=!1,r<s&&(s=r));if(l){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,a,r]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={524:0};i.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,r,s=n[0],l=n[1],o=n[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(o)var d=o(i)}for(t&&t(n);c<s.length;c++)r=s[c],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(d)},n=self["webpackChunkform_vue"]=self["webpackChunkform_vue"]||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var n=i.O(void 0,[504],(function(){return i(311)}));n=i.O(n)})();
//# sourceMappingURL=app.9b1b0d9e.js.map
\ No newline at end of file
{"version":3,"file":"js/app.9b1b0d9e.js","mappings":"qFAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,MAAM,CAAC,GAAK,QAAQ,CAACF,EAAG,MAAM,CAACG,YAAY,eAAe,CAACH,EAAG,MAAM,CAACI,YAAY,CAAC,MAAQ,SAAS,CAACJ,EAAG,OAAO,CAACF,EAAIO,GAAG,aAAaL,EAAG,YAAY,CAACE,MAAM,CAAC,KAAO,QAAQI,GAAG,CAAC,MAAQR,EAAIS,4BAA4B,CAACT,EAAIO,GAAG,cAAc,GAAGL,EAAG,MAAM,CAACI,YAAY,CAAC,MAAQ,UAAU,CAACJ,EAAG,YAAY,CAACE,MAAM,CAAC,KAAO,WAAWI,GAAG,CAAC,MAAQR,EAAIU,kBAAkB,CAACV,EAAIO,GAAG,SAAS,KAAKL,EAAG,MAAM,CAACG,YAAY,aAAa,CAACH,EAAG,MAAM,CAACS,IAAI,uBAAuBN,YAAY,iBAAiB,CAACL,EAAIY,GAAIZ,EAAgB,cAAE,SAASa,EAAKC,GAAO,OAAOZ,EAAG,UAAU,CAACa,IAAID,EAAMT,YAAY,YAAY,CAACH,EAAG,MAAM,CAACI,YAAY,C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AoB+B,EAAEgB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOhD,EAAoBW,EAAEC,EAC9B,EAEI0C,EAAqBC,KAAK,wBAA0BA,KAAK,yBAA2B,GACxFD,EAAmBE,QAAQP,EAAqBQ,KAAK,KAAM,IAC3DH,EAAmB/E,KAAO0E,EAAqBQ,KAAK,KAAMH,EAAmB/E,KAAKkF,KAAKH,G,IC/CvF,IAAII,EAAsB1D,EAAoBW,OAAER,EAAW,CAAC,MAAM,WAAa,OAAOH,EAAoB,IAAM,IAChH0D,EAAsB1D,EAAoBW,EAAE+C,E","sources":["webpack://form_vue/./src/App.vue?ce5f","webpack://form_vue/./src/components/TimeRangeSelector.vue?7787","webpack://form_vue/src/components/TimeRangeSelector.vue","webpack://form_vue/./src/components/TimeRangeSelector.vue?a7a2","webpack://form_vue/./src/components/TimeRangeSelector.vue","webpack://form_vue/./src/api/syllabus.js","webpack://form_vue/src/App.vue","webpack://form_vue/./src/App.vue?6a4a","webpack://form_vue/./src/App.vue","webpack://form_vue/./src/main.js","webpack://form_vue/webpack/bootstrap","webpack://form_vue/webpack/runtime/amd options","webpack://form_vue/webpack/runtime/chunk loaded","webpack://form_vue/webpack/runtime/compat get default export","webpack://form_vue/webpack/runtime/define property getters","webpack://form_vue/webpack/runtime/global","webpack://form_vue/webpack/runtime/hasOwnProperty shorthand","webpack://form_vue/webpack/runtime/make namespace object","webpack://form_vue/webpack/runtime/node module decorator","webpack://form_vue/webpack/runtime/jsonp chunk loading","webpack://form_vue/webpack/startup"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{staticClass:\"main-header\"},[_c('div',{staticStyle:{\"float\":\"left\"}},[_c('span',[_vm._v(\"当前编辑视频:\")]),_c('el-button',{attrs:{\"type\":\"text\"},on:{\"click\":_vm.handleClickSelectSyllabus}},[_vm._v(\"在库中选择视频\")])],1),_c('div',{staticStyle:{\"float\":\"right\"}},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleClickSave}},[_vm._v(\"保存\")])],1)]),_c('div',{staticClass:\"main-body\"},[_c('div',{ref:\"refDubbingScrollList\",staticClass:\"dubbing-items\"},[_vm._l((_vm.dubbintItems),function(item,index){return _c('el-card',{key:index,staticClass:\"box-card\"},[_c('div',{staticStyle:{\"position\":\"relative\"}},[_c('span',{staticClass:\"item-index\",staticStyle:{\"position\":\"absolute\"}},[_vm._v(_vm._s(index + 1)+\" \"),_c('span',{staticStyle:{\"font-size\":\"medium\",\"line-height\":\"normal\"}},[_vm._v(_vm._s(_vm.currentSelectDubbingIndex==index ? '正在编辑' : ''))])]),_c('div',{staticStyle:{\"text-align\":\"right\"}},[_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"danger\"},on:{\"click\":function($event){return _vm.handleClickDelete(index)}}},[_vm._v(\"删除\")]),_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"primary\"},on:{\"click\":function($event){return _vm.handleClickSetCurrent(index)}}},[_vm._v(\"编辑\")])],1)]),_c('el-divider'),_c('el-form',{attrs:{\"label-width\":\"50px\"}},[_c('el-form-item',{attrs:{\"label\":\"原文\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.orgText),callback:function ($$v) {_vm.$set(item, \"orgText\", $$v)},expression:\"item.orgText\"}})],1),_c('el-form-item',{attrs:{\"label\":\"开始\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.timelineIn),callback:function ($$v) {_vm.$set(item, \"timelineIn\", $$v)},expression:\"item.timelineIn\"}},[_c('template',{slot:\"append\"},[_vm._v(\"(秒)\")])],2)],1),_c('el-form-item',{attrs:{\"label\":\"结束\"}},[_c('el-input',{attrs:{\"type\":\"text\"},model:{value:(item.timelineOut),callback:function ($$v) {_vm.$set(item, \"timelineOut\", $$v)},expression:\"item.timelineOut\"}},[_c('template',{slot:\"append\"},[_vm._v(\"(秒)\")])],2)],1)],1)],1)}),_c('el-card',{staticClass:\"box-card\"},[_c('el-button',{staticStyle:{\"width\":\"100%\"},attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handelClickAdd}},[_vm._v(\"新建\")])],1)],2),_c('div',{staticClass:\"video-panel\"},[_c('div',{staticClass:\"center-container\"},[(!_vm.updateVideoSource)?_c('video',{ref:\"refVideo\",attrs:{\"controls\":\"\",\"width\":\"768px\"}},[_c('source',{attrs:{\"src\":_vm.videoUrl,\"type\":\"video/mp4\"}}),_vm._v(\" Your browser does not support the video tag. \")]):_vm._e(),_c('TimeRangeSelector',{on:{\"change\":_vm.handleRangeChange},model:{value:(_vm.timeRange),callback:function ($$v) {_vm.timeRange=$$v},expression:\"timeRange\"}})],1)]),_c('el-collapse-transition',[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentSelectDubbingIndex >= 0),expression:\"currentSelectDubbingIndex >= 0\"}],staticClass:\"button-group\"},[_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-refresh\"},on:{\"click\":_vm.handleClickPlayRange}},[_vm._v(\"播放区间\")]),_c('el-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isPlaying),expression:\"!isPlaying\"}],attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-video-play\"},on:{\"click\":_vm.handleClickPlay}},[_vm._v(\"播放\")]),_c('el-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isPlaying),expression:\"isPlaying\"}],attrs:{\"type\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-video-pause\"},on:{\"click\":_vm.handleClickPause}},[_vm._v(\"暂停\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handelClickRre10s}},[_vm._v(\"向前1秒\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handleClickSetStart}},[_vm._v(\"设置为起点\")]),_c('el-button',{attrs:{\"type\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.handleClickSetEnd}},[_vm._v(\"设置为结束点\")])],1)])],1),_c('el-dialog',{attrs:{\"title\":\"选择内容\",\"visible\":_vm.dialogSelectShow,\"width\":\"500px\"},on:{\"update:visible\":function($event){_vm.dialogSelectShow=$event}}},[_c('div',{staticClass:\"el-main\",staticStyle:{\"height\":\"300px\"}},[_c('el-tree',{attrs:{\"data\":_vm.treeListData,\"props\":_vm.treeProps,\"lazy\":true,\"load\":_vm.handleLazyLoadTreeData},on:{\"node-click\":_vm.handleClickTreeNode}})],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('span',{staticClass:\"current-selected-text\"},[_vm._v(\"当前选择:\"+_vm._s(_vm.currentSelectTreeNode ? _vm.currentSelectTreeNode.name : \"\")+\" - \"+_vm._s(_vm.currentSelectTreeNode ? _vm.currentSelectTreeNode.id : \"\"))]),_c('el-button',{on:{\"click\":_vm.handleClickCancelSelect}},[_vm._v(\"取 消\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.handleClickConfirmSelect}},[_vm._v(\"确 定\")])],1)])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"com-trs\"},[_c('div',{ref:\"refEcharts\",staticClass:\"chart-slider\"})])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"com-trs\">\n <div ref=\"refEcharts\" class=\"chart-slider\"></div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'TimeRangeSelector',\n props: {\n value: {\n type: Object,\n default: () => {\n return {\n start: 0,\n end: 100\n }\n }\n }\n },\n watch: {\n value: {\n handler(val) {\n this.parentValueChange = true;\n this.setTimeRange(val.start * 100, val.end * 100);\n },\n deep: true\n }\n },\n data() {\n return {\n insECharts: null,\n parentValueChange: false\n }\n },\n mounted() {\n this.initEcharts();\n },\n methods: {\n initEcharts() {\n if(!this.insECharts) {\n this.insECharts = this.$echarts.init(this.$refs.refEcharts);\n }\n\n const option = {\n grid: {\n left: 10,\n right: 10,\n top: 10,\n bottom: 10\n },\n tooltip: {},\n\n dataZoom: [\n {\n type: 'slider'\n },\n ],\n xAxis: { show: false } ,\n yAxis: { show: false },\n\n };\n\n this.insECharts.on('dataZoom', (evt) => {\n if(this.parentValueChange) {\n this.parentValueChange = false;\n return;\n }\n this.$emit('change', {\n start: evt.start / 100,\n end: evt.end / 100\n })\n this.$emit('input', {\n start: evt.start / 100,\n end: evt.end / 100\n })\n })\n\n this.insECharts.setOption(option);\n },\n setTimeRange(start, end) {\n this.insECharts.dispatchAction({\n type: 'dataZoom',\n // 可选,dataZoom 组件的 index,多个 dataZoom 组件时有用,默认为 0\n dataZoomIndex: 0,\n // 开始位置的百分比,0 - 100\n start: start,\n // 结束位置的百分比,0 - 100\n end: end,\n // // 开始位置的数值\n // startValue: number,\n // // 结束位置的数值\n // endValue: number\n });\n\n }\n },\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\n.com-trs {\n width: 100%;\n height: 50px;\n}\n\n.chart-slider {\n width: 100%;\n height: 100%;\n}\n</style>","import mod from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TimeRangeSelector.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./TimeRangeSelector.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./TimeRangeSelector.vue?vue&type=template&id=291eb56d&scoped=true\"\nimport script from \"./TimeRangeSelector.vue?vue&type=script&lang=js\"\nexport * from \"./TimeRangeSelector.vue?vue&type=script&lang=js\"\nimport style0 from \"./TimeRangeSelector.vue?vue&type=style&index=0&id=291eb56d&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"291eb56d\",\n null\n \n)\n\nexport default component.exports","import axios from \"axios\";\nconst org = 523;\nconst dpe_root = 275931;\nconst base_url = \"https://ema.iteachabc.com/api/syllabus/v1\";\n\nexport const getSyllabusListById = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/list?orgid=${org}&pid=${syllabus_id?syllabus_id:dpe_root}`);\n resolve(res.data);\n })\n}\n\nexport const getFirstCoursewareBySyllId = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getdata?syllabusid=${syllabus_id}`);\n resolve(res.data);\n })\n}\n\nexport const getCoursewarePageBySyllId = (syllabus_id, page) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getpagedata?syllabusid=${syllabus_id}&page=${page}`);\n resolve(res.data);\n })\n}\n\nexport const getAllCoursewareBySyllId = (syllabus_id) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/getdatalist?syllabusids=${syllabus_id}`);\n resolve(res.data);\n })\n}\n\nexport const getPidPathName = (pid_path) => {\n return new Promise(async (resolve, reject) => {\n const res = await axios.get(`${base_url}/pathname?pid_path=${pid_path}`);\n resolve(res.data);\n })\n}","<template>\n <div id=\"app\">\n <div class=\"main-header\">\n <div style=\"float: left;\">\n <span>当前编辑视频:</span>\n <el-button type=\"text\" @click=\"handleClickSelectSyllabus\">在库中选择视频</el-button>\n </div>\n <div style=\"float: right;\">\n <el-button type=\"primary\" @click=\"handleClickSave\">保存</el-button>\n </div>\n </div>\n <div class=\"main-body\">\n <div ref=\"refDubbingScrollList\" class=\"dubbing-items\">\n <el-card v-for=\"item, index in dubbintItems\" :key=\"index\" class=\"box-card\">\n <div style=\"position: relative;\">\n <span style=\"position: absolute;\" class=\"item-index\">{{ index + 1 }} <span\n style=\"font-size: medium; line-height: normal;\">{{ currentSelectDubbingIndex==index ?\n '正在编辑' : '' }}</span></span>\n <div style=\"text-align: right;\">\n <el-button size=\"mini\" type=\"danger\" @click=\"handleClickDelete(index)\">删除</el-button>\n <el-button size=\"mini\" type=\"primary\" @click=\"handleClickSetCurrent(index)\">编辑</el-button>\n </div>\n </div>\n <el-divider></el-divider>\n <el-form label-width=\"50px\">\n <el-form-item label=\"原文\">\n <el-input type=\"text\" v-model=\"item.orgText\" />\n </el-form-item>\n <!-- <el-form-item label=\"译文\">\n <el-input type=\"text\" v-model=\"item.transText\"/>\n </el-form-item> -->\n <el-form-item label=\"开始\">\n <el-input type=\"text\" v-model=\"item.timelineIn\">\n <template slot=\"append\">(秒)</template>\n </el-input>\n </el-form-item>\n <el-form-item label=\"结束\">\n <el-input type=\"text\" v-model=\"item.timelineOut\">\n <template slot=\"append\">(秒)</template>\n </el-input>\n </el-form-item>\n </el-form>\n </el-card>\n <el-card class=\"box-card\">\n <el-button type=\"primary\" @click=\"handelClickAdd\" style=\"width: 100%;\">新建</el-button>\n </el-card>\n </div>\n <div class=\"video-panel\">\n <div class=\"center-container\">\n <video v-if=\"!updateVideoSource\" ref=\"refVideo\" controls width=\"768px\">\n <source :src=\"videoUrl\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>\n <TimeRangeSelector v-model=\"timeRange\" @change=\"handleRangeChange\"></TimeRangeSelector>\n </div>\n </div>\n <el-collapse-transition>\n <div v-show=\"currentSelectDubbingIndex >= 0\" class=\"button-group\">\n <el-button type=\"\" size=\"medium\" icon=\"el-icon-refresh\" @click=\"handleClickPlayRange\">播放区间</el-button>\n <el-button v-show=\"!isPlaying\" type=\"\" size=\"medium\" icon=\"el-icon-video-play\" @click=\"handleClickPlay\">播放</el-button>\n <el-button v-show=\"isPlaying\" type=\"\" size=\"medium\" icon=\"el-icon-video-pause\" @click=\"handleClickPause\">暂停</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handelClickRre10s\">向前1秒</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handleClickSetStart\">设置为起点</el-button>\n <el-button type=\"\" size=\"medium\" @click=\"handleClickSetEnd\">设置为结束点</el-button>\n </div>\n </el-collapse-transition>\n </div>\n\n <el-dialog title=\"选择内容\" :visible.sync=\"dialogSelectShow\" width=\"500px\">\n <div class=\"el-main\" style=\"height: 300px;\">\n <el-tree :data=\"treeListData\" :props=\"treeProps\" @node-click=\"handleClickTreeNode\" :lazy=\"true\"\n :load=\"handleLazyLoadTreeData\"></el-tree>\n </div>\n <div slot=\"footer\" class=\"dialog-footer\">\n <span class=\"current-selected-text\">当前选择:{{ currentSelectTreeNode ? currentSelectTreeNode.name : \"\" }} -\n {{ currentSelectTreeNode ? currentSelectTreeNode.id : \"\" }}</span>\n <el-button @click=\"handleClickCancelSelect\">取 消</el-button>\n <el-button type=\"primary\" @click=\"handleClickConfirmSelect\">确 定</el-button>\n </div>\n </el-dialog>\n\n </div>\n</template>\n\n<script>\nimport TimeRangeSelector from './components/TimeRangeSelector.vue'\nimport { getSyllabusListById, getFirstCoursewareBySyllId, getPidPathName } from '@/api/syllabus'\n\nexport default {\n name: 'App',\n components: {\n TimeRangeSelector\n },\n data() {\n return {\n // 是否正在播放\n isPlaying: false,\n\n // 视频地址\n videoUrl: 'https://teach.cdn.ireadabc.com/3d13b9a7b2cb777836a3d5b29c38384b.mp4',\n\n // 时间区间\n timeRange: {\n start: 0,\n end: 1\n },\n\n // 配音列表\n dubbintItems: [],\n\n // 选择内容对话框显示隐藏控制\n dialogSelectShow: false,\n\n // 树形列表数据\n treeListData: [],\n\n // 当前选择的节点信息\n currentSelectTreeNode: null,\n\n // 树形列表配置\n treeProps: {\n children: 'children',\n label: 'name',\n isLeaf: function (data, node) {\n return data.has_courseware == \"1\";\n }\n },\n\n // 是否更新视频资源\n updateVideoSource: false,\n\n // 当前选择的配音秀索引\n currentSelectDubbingIndex: -1\n };\n },\n async mounted() {\n this.getData();\n // this.$setData([\n // {\n // \"orgText\": \"Apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"0.352728\",\n // \"timelineOut\": \"2.349307\"\n // },\n // {\n // \"orgText\": \"Green apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"4.938305\",\n // \"timelineOut\": \"7.2651\"\n // },\n // {\n // \"orgText\": \"Red apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"10.687003\",\n // \"timelineOut\": \"13.054597\"\n // },\n // {\n // \"orgText\": \"Juicy apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"16.128933\",\n // \"timelineOut\": \"20.358868\"\n // },\n // {\n // \"orgText\": \"Gulp,gulp,hic!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"20.674126\",\n // \"timelineOut\": \"23.316044\"\n // },\n // {\n // \"orgText\": \"BOTH:apples!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"26.360674\",\n // \"timelineOut\": \"29.569075\"\n // },\n // {\n // \"orgText\": \"Shiny apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"34.97507\",\n // \"timelineOut\": \"37.929512\"\n // },\n // {\n // \"orgText\": \"Crunchy apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"41.66807\",\n // \"timelineOut\": \"44.267387\"\n // },\n // {\n // \"orgText\": \"Bobbing apple.\",\n // \"transText\": \"\",\n // \"timelineIn\": \"48.00274\",\n // \"timelineOut\": \"50.683136\"\n // },\n // {\n // \"orgText\": \"Way-hay!Apples!\",\n // \"transText\": \"\",\n // \"timelineIn\": \"53.787037\",\n // \"timelineOut\": \"57.842\"\n // }\n // ])\n },\n methods: {\n async getData() {\n const res = await this.$getData();\n console.log(\"====getData====\", res)\n if(!res) {\n // 默认数据\n this.dubbintItems = []\n } else {\n this.dubbintItems = res\n }\n },\n\n handleRangeChange(event) {\n this.$refs.refVideo.currentTime = event.start * this.$refs.refVideo.duration;\n const sTime = this.timeRange.start * this.$refs.refVideo.duration;\n const eTime = this.timeRange.end * this.$refs.refVideo.duration;\n\n this.dubbintItems[this.currentSelectDubbingIndex].timelineIn = sTime;\n this.dubbintItems[this.currentSelectDubbingIndex].timelineOut = eTime;\n },\n\n // 点击区间播放\n handleClickPlayRange() {\n const sTime = this.timeRange.start * this.$refs.refVideo.duration;\n const eTime = this.timeRange.end * this.$refs.refVideo.duration;\n\n this.$refs.refVideo.currentTime = sTime;\n this.$refs.refVideo.play().then(() => {\n this.isPlaying = true;\n const checkTime = () => {\n if (this.$refs.refVideo.currentTime >= eTime) {\n this.$refs.refVideo.pause();\n this.isPlaying = false;\n this.$refs.refVideo.removeEventListener('timeupdate', checkTime);\n }\n }\n this.$refs.refVideo.addEventListener('timeupdate', checkTime, false);\n })\n .catch(error => {\n console.log(error);\n });\n\n },\n\n handleClickPlay() {\n this.$refs.refVideo.play();\n this.isPlaying = true;\n },\n\n handleClickPause() {\n this.$refs.refVideo.pause();\n this.isPlaying = false;\n },\n\n handelClickRre10s() {\n this.$refs.refVideo.currentTime -= 1;\n },\n\n handleClickSetStart() {\n this.timeRange.start = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;\n this.dubbintItems[this.currentSelectDubbingIndex].timelineIn = this.$refs.refVideo.currentTime;\n \n },\n\n handleClickSetEnd() {\n this.timeRange.end = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;\n this.dubbintItems[this.currentSelectDubbingIndex].timelineOut = this.$refs.refVideo.currentTime;\n },\n\n handleClickSetCurrent(index, play = false) {\n const timelineIn = this.dubbintItems[index].timelineIn / this.$refs.refVideo.duration;\n const timelineOut = this.dubbintItems[index].timelineOut / this.$refs.refVideo.duration;\n\n this.currentSelectDubbingIndex = index;\n\n this.timeRange = {\n start: timelineIn,\n end: timelineOut\n }\n\n play && this.handleClickPlayRange()\n },\n\n // 删除配音秀\n handleClickDelete(index) {\n this.$confirm(\"确定要删除吗?\").then(res=>{\n this.dubbintItems.splice(index, 1)\n }).catch(_=>\"\")\n },\n\n // 添加配音\n handelClickAdd() {\n this.dubbintItems.push({\n orgText: '',\n transText: '',\n timelineIn: 0,\n timelineOut: 1\n })\n this.$nextTick(() => {\n this.$refs.refDubbingScrollList.scrollTop = this.$refs.refDubbingScrollList.scrollHeight;\n })\n },\n\n // 点击切换配音资源\n async handleClickSelectSyllabus() {\n this.dialogSelectShow = true;\n const resData = await getSyllabusListById();\n this.treeListData = resData.rows;\n },\n\n // 点击树形列表节点\n handleClickTreeNode(node) {\n if (node.has_courseware == \"1\") {\n this.currentSelectTreeNode = node;\n }\n },\n\n // 懒加载树形列表数据\n handleLazyLoadTreeData(node, resolve) {\n getSyllabusListById(node.data.id).then(data => {\n resolve(data.rows)\n })\n },\n\n // 取消选择\n handleClickCancelSelect() {\n this.dialogSelectShow = false;\n this.currentSelectTreeNode = null;\n this.treeListData = [];\n },\n\n // 确定选择节点\n async handleClickConfirmSelect() {\n // 获取视频课件信息\n const resData = await getFirstCoursewareBySyllId(this.currentSelectTreeNode.id);\n\n let jsonData = null;\n try {\n jsonData = JSON.parse(resData.data);\n } catch (error) {\n \n }\n\n // 获取视频地址\n this.videoUrl = jsonData ? jsonData.url : '';\n\n // 重新加载视频组件\n this.updateVideoSource = true;\n this.$nextTick(() => {\n this.updateVideoSource = false;\n })\n\n // 关闭对话框\n this.handleClickCancelSelect();\n },\n\n // 保存数据\n async handleClickSave() {\n this.$setData(this.dubbintItems)\n }\n }\n}\n</script>\n\n<style>\nbody,\nhtml {\n margin: 0;\n padding: 0;\n height: 100%;\n overflow: hidden;\n background-color: #FFFFFF;\n}\n\n#app {}\n\n.cascader-item {\n width: 150px;\n}\n\n.button-item {\n margin-left: 10px;\n}\n\n.current-selected-text {\n float: left;\n font-size: small;\n}\n\n.video-panel {\n margin-left: 320px;\n}\n\n.center-container {\n width: 768px;\n margin-left: 320px;\n padding: 20px 10px;\n margin: 0 auto;\n}\n\n.button-group {\n margin-left: 320px;\n text-align: center;\n}\n\n.dubbing-items {\n width: 300px;\n height: calc(100% - 90px);\n background-color: #f0f0f0;\n position: absolute;\n left: 0;\n overflow: auto;\n padding: 10px;\n}\n\n.box-card {\n margin-bottom: 10px;\n}\n\n::v-deep .el-card__body {\n padding: 0 !important;\n}\n\n.item-index {\n font-size: 20px;\n font-weight: bold;\n margin-right: 10px;\n}\n\n.main-header {\n height: 70px;\n line-height: 70px;\n position: fixed;\n z-index: 99;\n top: 0;\n background-color: #FFFFFF;\n width: calc(100% - 40px);\n border-bottom: 1px solid #dcdfe6;\n padding: 0 20px;\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);\n}\n\n.main-body {\n margin-top: 70px;\n height: calc(100% - 70px);\n overflow: auto;\n}\n</style>\n","import mod from \"-!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=2040ca32\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=2040ca32&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport ElementUI from 'element-ui';\nimport 'element-ui/lib/theme-chalk/index.css';\nimport App from './App.vue'\nimport * as echarts from 'echarts';\n\nVue.use(ElementUI);\n\nVue.config.productionTip = false\nVue.prototype.$getData = () => {\n return new Promise((resolve, reject) => {\n (window).courseware.getData((data) => {\n resolve(data)\n }, \"default_key\")\n })\n}\n\nVue.prototype.$setData = (data) => {\n (window).courseware.setData(data, null, \"default_key\")\n}\n\nVue.prototype.$echarts = echarts\n\nnew Vue({\n render: function (h) { return h(App) },\n}).$mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkform_vue\"] = self[\"webpackChunkform_vue\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [504], function() { return __webpack_require__(311); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["render","_vm","this","_c","_self","attrs","staticClass","staticStyle","_v","on","handleClickSelectSyllabus","handleClickSave","ref","_l","item","index","key","_s","currentSelectDubbingIndex","$event","handleClickDelete","handleClickSetCurrent","model","value","callback","$$v","$set","expression","slot","handelClickAdd","updateVideoSource","_e","videoUrl","handleRangeChange","timeRange","directives","name","rawName","handleClickPlayRange","isPlaying","handleClickPlay","handleClickPause","handelClickRre10s","handleClickSetStart","handleClickSetEnd","dialogSelectShow","treeListData","treeProps","handleLazyLoadTreeData","handleClickTreeNode","currentSelectTreeNode","id","handleClickCancelSelect","handleClickConfirmSelect","staticRenderFns","props","type","Object","default","start","end","watch","handler","val","parentValueChange","setTimeRange","deep","data","insECharts","mounted","initEcharts","methods","$echarts","init","$refs","refEcharts","option","grid","left","right","top","bottom","tooltip","dataZoom","xAxis","show","yAxis","evt","$emit","setOption","dispatchAction","dataZoomIndex","component","org","dpe_root","base_url","getSyllabusListById","syllabus_id","Promise","async","resolve","reject","res","get","getFirstCoursewareBySyllId","components","TimeRangeSelector","dubbintItems","children","label","isLeaf","node","has_courseware","getData","$getData","console","log","event","refVideo","currentTime","duration","sTime","eTime","timelineIn","timelineOut","play","then","checkTime","pause","removeEventListener","addEventListener","catch","error","$confirm","splice","_","push","orgText","transText","$nextTick","refDubbingScrollList","scrollTop","scrollHeight","resData","rows","jsonData","JSON","parse","url","$setData","use","config","productionTip","prototype","courseware","setData","echarts","h","App","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","m","amdO","deferred","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","keys","every","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","window","obj","prop","hasOwnProperty","call","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
......@@ -11,7 +11,750 @@
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<script type="text/javascript" src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script>
<!-- <script type="text/javascript" src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script> -->
<script>
// 刷新CDN路径
// https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js
// https://teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js
const commonPostMessage = function (messageObj) {
const obj = {...messageObj, urlParams: window.location.search, origin: "template"}
window.parent.postMessage(obj, '*');
};
const postMessageCallbackQueue = {};
const commonPostMessageWithCallback = function (messageObj, callback) {
if(postMessageCallbackQueue[messageObj.action]){
console.error(`action为${messageObj.action}的事件正在执行,请更换action名称或等待事件执行完成后再发起`);
return;
}
postMessageCallbackQueue[messageObj.action] = true;
const onMessage = (e) => {
let msgData = e.data;
if(msgData.origin==="template"){
return;
}
if(msgData && msgData.action === messageObj.action){
postMessageCallbackQueue[messageObj.action] = false;
window.removeEventListener("message", onMessage);
callback && callback(msgData.data);
}
};
window.addEventListener("message", onMessage);
commonPostMessage(messageObj);
};
const getQueryString = function (name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
const r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
};
const realAir = {
uploadUrl: null,
uploadVideoUrl: null,
uploadData: null,
getDataCallback: null,
setDataCallback: null,
getUploadCallback: null,
getUploadVideoCallback: null,
pageLoaded: false,
isCourseInScreen: false,
osmoCallback: null,
osmoHandwritingCallback: null,
osmoFingerReadCallback: null,
onCourseInScreen: null,
hideAirClassLoading: function(templateName,loadData){
// 隐藏页面加载时候的loading
if (deleteHistory && typeof (deleteHistory) == 'function') {
deleteHistory();
}
commonPostMessage({action: "course-ready", data: {template:templateName,loadData:loadData,urlParams: window.location.search}});
window.air.pageLoaded = true;
window.courseware.next();
var cc = window.cc;
if (cc && cc.director && cc.director._scene) {
try {
const canvas = cc.find("Canvas");
canvas.on("mousemove", function () {});
cc.director._scene.on("mousemove", function () {
commonPostMessage({ action: "mousemove" });
});
cc.director._scene.on("touchmove", function () {
commonPostMessage({ action: "mousemove" });
});
if (cc.systemEvent && cc.SystemEvent) {
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, (event) => {
const KEY = cc.KEY || cc.macro.KEY;
switch (event.keyCode) {
case KEY.left:
commonPostMessage({ action: "ArrowLeft" });
break;
case KEY.right:
commonPostMessage({ action: "ArrowRight" });
break;
}
});
}
} catch (e) {
console.log("====cc.director._scene绑定事件====");
}
}
},
};
const uploadCallbackQueue = [];
const uploadVideoCallbackQueue = [];
try{
window.air = new Proxy(realAir, {
set: function (target, key, value, receiver) {
if (key=="getUploadCallback") {
uploadCallbackQueue.push(value);
}
if (key=="getUploadVideoCallback") {
uploadVideoCallbackQueue.push(value);
}
return Reflect.set(target, key, value, receiver);
},
get: function (target, key, receiver) {
return Reflect.get(target, key, receiver);
},
deleteProperty: function(target, key){
return Reflect.deleteProperty(target, key);
}
});
}catch(e){
console.error("浏览器不支持ES6新特性Proxy/Reflect,请使用谷歌浏览器!");
}
function deleteHistory() {
const disableBack = () => {
window.history.pushState(null, "", document.URL);
window.addEventListener("popstate", () => {
window.history.pushState(null, "", document.URL);
});
}
disableBack();
window.addEventListener("load", disableBack);
}
deleteHistory();
window.addEventListener("load", () => {
// 禁用移动端长按选中文字
let bodyStyle = document.body.getAttribute("style");
if(bodyStyle){
bodyStyle += '; user-select: none; -webkit-user-select: none; -moz-user-select: none;';
}else{
bodyStyle = 'user-select: none; -webkit-user-select: none; -moz-user-select: none;';
}
document.body.setAttribute("style", bodyStyle);
});
if (window.self !== window.top) {
window.addEventListener("message", function (e) {
let msgData = e.data;
// console.log("子页面接收到了消息", msgData);
if(msgData.type === "webpackWarnings" || msgData.type === "webpackOk") {
return;
}
if(msgData.action==="airEvents"){
return;
}
if(msgData.origin==="template"){
return;
}
if (msgData.action === "getUpload") {
window.air.uploadUrl = msgData.uploadUrl;
window.air.uploadData = msgData.uploadData;
for (let i = 0; i < uploadCallbackQueue.length; i++) {
uploadCallbackQueue[i](msgData.uploadUrl, msgData.uploadData);
}
return;
}
if (msgData.action === "getVideoUpload") {
window.air.uploadVideoUrl = msgData.uploadVideoUrl;
window.air.uploadData = msgData.uploadData;
for (let i = 0; i < uploadVideoCallbackQueue.length; i++) {
uploadVideoCallbackQueue[i](msgData.uploadVideoUrl, msgData.uploadData);
}
return;
}
if (msgData.action === "pauseCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.game.pause();
console.log('pause了');
}
return;
}
if (msgData.action === "resumeCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.game.resume();
console.log('resume了');
}
return;
}
if (msgData.action === "restartCocos") {
let cc = window.cc;
if (cc && cc.game) {
cc.audioEngine.stopAll();
// cc.game.restart();
console.log('restart了');
}
return;
}
if (msgData.action === "osmoCallback") {
window.air.osmoCallback && window.air.osmoCallback(msgData.data);
return;
}
if (msgData.action === "osmoHandwritingCallback") {
window.air.osmoHandwritingCallback && window.air.osmoHandwritingCallback(msgData.data);
return;
}
if (msgData.action === "osmoFingerReadCallback") {
window.air.osmoFingerReadCallback && window.air.osmoFingerReadCallback(msgData.data);
return;
}
if (msgData.action === "setData") {
window.air.setDataCallback && window.air.setDataCallback();
return;
}
if (msgData.action === "getData") {
try {
const res = JSON.parse(msgData.data);
if (res.msg !== "success") {
console.log('数据加载失败!');
return;
}
if (res.data && res.data != 'null') {
window.air.callData = JSON.parse(res.data);
}
window.air.callDataFlag = true;
return;
} catch (e) {
console.log('数据加载失败!');
}
}
if (msgData.action === "getDPEData") {
try {
const res = JSON.parse(msgData.data);
if (res.msg !== "success") {
console.log('数据加载失败!');
return;
}
if (res.data && res.data != 'null') {
window.air.callData = JSON.parse(res.data);
}
window.air.callDataFlag = true;
return;
} catch (e) {
console.log('数据加载失败!');
}
}
});
commonPostMessage({ action: "getUpload" });
commonPostMessage({ action: "getVideoUpload" });
document.onmousemove = function(){
commonPostMessage({ action: "mousemove" });
};
document.ontouchmove = function(){
commonPostMessage({ action: "mousemove" });
};
document.onkeydown = (event) => {
switch(event.key) {
case "ArrowLeft":
commonPostMessage({ action: "ArrowLeft" });
break;
case "ArrowRight":
commonPostMessage({ action: "ArrowRight" });
break;
}
}
document.oncontextmenu = function(){
return false;
}
}
window.courseware = (function () {
let obj = {
airEvents: {},
eventQueue: [],
eventLock: false,
next: () => {
let exe = obj.eventQueue.splice(0,1);
if(exe.length>0){
obj.eventLock = true;
let evtName = exe[0].evtName;
let data = exe[0].data;
if(obj.airEvents[evtName]){
if(evtName === "course-in-screen"){
if(window.air.isCourseInScreen){
return;
}
window.air.isCourseInScreen = true;
}
console.log(`evtName==${evtName}的方法被执行`);
obj.airEvents[evtName](data, obj.next);
} else {
if(evtName === "course-in-screen" && window.air.onCourseInScreen){
if(!window.air.pageLoaded){
console.log(`页面还没有加载完就执行了courseInScreen事件,请排查产生原因`);
return;
}
if(window.air.isCourseInScreen){
console.log(`courseInScreen事件执行了多次,请排查产生原因`);
return;
}
window.air.onCourseInScreen(()=>{
obj.next();
});
return;
}
console.warn(`airclass教室交互事件 ${evtName} 没有被捕获,请确认监听事件的先后顺序2`);
obj.next();
}
}else{
obj.eventLock = false;
}
}
};
if (window.self !== window.top) {
window.addEventListener("message", function (e) {
let msgData = e.data;
if(msgData.origin==="template"){
return;
}
if(msgData.action!=="airEvents"){
return;
}
let evtName = msgData.evt;
let res = msgData.data;
if (evtName === "course-out-screen"){
console.log(`evtName==${evtName}的方法被执行`);
window.location.reload();
return;
}
if (res&&evtName!='userchange') {
//userchange事件传过来的值不需要转换
res = JSON.parse(res);
}
if(!window.air.pageLoaded){
//如果页面还没有加载完成
obj.eventQueue.push({"evtName": evtName, data: res});
}else{
if (obj.eventQueue.length === 0 && !obj.eventLock) {
//如果没有消息积压并且事件锁未锁定
obj.eventLock = true;
if(obj.airEvents[evtName]){
if(evtName === "course-in-screen"){
if(window.air.isCourseInScreen){
return;
}
window.air.isCourseInScreen = true;
}
console.log(`evtName==${evtName}的方法被执行`);
obj.airEvents[evtName](res, obj.next);
} else {
if(evtName === "course-in-screen" && window.air.onCourseInScreen){
if(!window.air.pageLoaded){
console.log(`页面还没有加载完就执行了courseInScreen事件,请排查产生原因`);
return;
}
if(window.air.isCourseInScreen){
console.log(`courseInScreen事件执行了多次,请排查产生原因`);
return;
}
window.air.onCourseInScreen(()=>{
obj.next();
});
return;
}
console.warn(`airclass教室交互事件 ${evtName} 没有被捕获,请确认监听事件的先后顺序1`);
obj.next();
}
} else {
obj.eventQueue.push({"evtName": evtName, data: res});
}
}
});
obj.getData = function (callback, key = '') {
commonPostMessage({ action: "getData", data: window.location.search });
window.air.callDataFlag = false;
const liuintval = setInterval(()=>{
if(window.air.callDataFlag){
console.log("========我进来了=========");
clearInterval(liuintval);
setTimeout(() => {
console.log("执行回调,回调数据为:");
console.log(window.air.callData);
callback(window.air.callData);
}, 100);
}
}, 100);
};
obj.getDPEData = function (callback, key = '') {
commonPostMessage({ action: "getDPEData", data: window.location.search });
window.air.callDataFlag = false;
const liuintval = setInterval(()=>{
if(window.air.callDataFlag){
clearInterval(liuintval);
setTimeout(() => {
console.log("DPE Data:");
console.log(window.air.callData);
callback(window.air.callData);
}, 100);
}
}, 100);
};
obj.setData = function (data, callback, key = '') {
let str = JSON.stringify(data);
console.log("==setData==", str);
commonPostMessage({ action: "setData", data: str });
window.air.setDataCallback = callback;
};
obj.uploadUrl = function () {
return window.air.uploadUrl;
};
obj.uploadVideoUrl = function () {
return window.air.uploadVideoUrl;
};
obj.uploadData = function () {
return window.air.uploadData;
};
obj.nextPage = function(){
const index = getQueryString("index");
commonPostMessage({ action: "callJumpPage", data: parseInt(index)+1 });
};
obj.beforePage = function(){
const index = getQueryString("index");
commonPostMessage({ action: "callJumpPage", data: parseInt(index)-1 });
};
obj.jumpPage = function(page){
commonPostMessage({ action: "callJumpPage", data: page });
};
obj.activeFormulaBoard = function(callback){
if(callback){
commonPostMessageWithCallback({ action: "activeFormulaBoard" }, callback);
} else {
commonPostMessage({ action: "activeFormulaBoard" });
}
};
obj.activeWhiteBoard = function(callback){
if(callback){
commonPostMessageWithCallback({ action: "activeWhiteBoard" }, callback);
} else {
commonPostMessage({ action: "activeWhiteBoard" });
}
};
obj.beganRecording = function(){
commonPostMessage({ action: "beganRecording" });
};
obj.endRecording = function(callback){
commonPostMessageWithCallback({ action: "endRecording" }, callback);
};
obj.speakPoints = function(audioUrl, evalText, callback){
const obj = {audioUrl, evalText};
commonPostMessageWithCallback({ action: "speakPoints", data: JSON.stringify(obj) }, callback);
};
obj.startRecord = function(testText){
commonPostMessage({ action: "startRecord", data: testText });
};
obj.stopRecord = function(_isgradepapers, _callback){
let callback = _callback;
let isgradepapers;
if(_isgradepapers && typeof _isgradepapers === "function") {
callback = _isgradepapers;
isgradepapers = 1;
} else {
isgradepapers = _isgradepapers;
}
if(!callback){
// 不传回调函数就表示取消评测
commonPostMessage({ action: "stopRecord", iscancle: 1 });
}else{
commonPostMessageWithCallback({ action: "stopRecord", iscancle: 0, isgradepapers }, callback);
}
};
obj.greadPapersForText = function(params, callback){
let str = "";
if( typeof(params) === "object"){
str = JSON.stringify(params);
}else{
str = params;
}
commonPostMessageWithCallback({ action: "greadPapersForText", data: str }, callback);
};
obj.lansiEvaluation = function(params, callback){
let str = "";
if( typeof(params) === "object"){
str = JSON.stringify(params);
}else{
str = params;
}
commonPostMessageWithCallback({ action: "lansiEvaluation", data: str }, callback);
};
obj.startTest = function(testText){
commonPostMessage({ action: "startTest", data: testText });
};
obj.stopTest = function(callback){
if(!callback){
// 不传回调函数就表示取消评测
commonPostMessage({ action: "stopTest", iscancle: 1 });
}else{
commonPostMessageWithCallback({ action: "stopTest", iscancle: 0 }, callback);
}
};
obj.openDubbingPage = function(){
commonPostMessage({ action: "openDubbingPage"});
},
obj.openDubbingPageTwo = function(){
commonPostMessage({ action: "openDubbingPageTwo"});
},
obj.openRecognitionCamera = function(callback){
commonPostMessageWithCallback({ action: "openRecognitionCamera"}, callback);
},
obj.sendAnswer = function(idOrObj, answer, isRight, startTime){
if(typeof(idOrObj) === "object"){
commonPostMessageWithCallback({ action: "sendAnswer", data: JSON.stringify(idOrObj) }, idOrObj.callback);
}else{
commonPostMessage({ action: "sendAnswer", data: JSON.stringify({id: idOrObj, answer, isRight, startTime }) });
}
};
obj.getAnswer = function(queryObj, callback){
commonPostMessageWithCallback({ action: "getAnswer", data: JSON.stringify(queryObj)}, callback);
};
obj.openOsmo = function(){
commonPostMessage({ action: "openOsmo" });
};
obj.closeOsmo = function(){
commonPostMessage({ action: "closeOsmo" });
};
obj.openOsmoHandwriting = function(){
commonPostMessage({ action: "openOsmoHandwriting" });
};
obj.closeOsmoHandwriting = function(){
commonPostMessage({ action: "closeOsmoHandwriting" });
};
obj.openOsmoFingerRead = function(){
commonPostMessage({ action: "openOsmoFingerRead" });
};
obj.closeOsmoFingerRead = function(){
commonPostMessage({ action: "closeOsmoFingerRead" });
};
obj.gameEnd = function(){
commonPostMessage({ action: "gameEnd" });
};
obj.getTemplates = function(callback){
commonPostMessageWithCallback({ action: "getTemplates" }, callback);
};
obj.getTemplateUrl = function(templateName, callback){
commonPostMessageWithCallback({ action: "getTemplateUrl", data: templateName}, callback);
};
obj.sendEvent = function(evtName,data,key = ''){
if(evtName==="reconnect"){
console.error("reconnect是内置的断线重连事件名称,请勿使用此名称作为事件名");
return;
}
if(evtName==="userchange"){
console.error("userchange是内置的用户变更事件名称,请勿使用此名称作为事件名");
return;
}
let str = null;
if(data){
str = JSON.stringify(data);
}
commonPostMessage({ action: "airEvents",evt: evtName, data: str });
};
obj.onEvent = function(evtName,callback){
obj.airEvents[evtName] = callback;
};
obj.removeEvent = function(evtName){
if(obj.airEvents[evtName]){
delete obj.airEvents[evtName];
}
};
obj.sendErrorLog = function (error) {
// todo 这块预留后面采集模板的报错信息
// commonPostMessage({ action: "errorlog", data: error.stack }, '*');
};
} else {
obj.getData = function (callback, key = '') {
let data = localStorage.getItem("courseware_data_" + key);
if (data) {
data = JSON.parse(data);
}
callback && callback(data);
};
obj.getDPEData = function (callback) {
// 模拟获取DPE元数据
callback && callback(null);
};
obj.setData = function (data, callback, key = '') {
console.log("******local********");
localStorage.setItem("courseware_data_" + key, JSON.stringify(data));
callback && callback();
};
obj.uploadUrl = function () {
var protocolStr = document.location.protocol;
return `${protocolStr}//staging-teach.ireadabc.com/fileUpload`;
};
obj.uploadVideoUrl = function () {
var protocolStr = document.location.protocol;
return `${protocolStr}//staging-teach.ireadabc.com/videoUpload`;
};
obj.uploadData = function () {
return {};
};
obj.nextPage = function(){
console.log("******nextPage********");
};
obj.beforePage = function(){
console.log("******beforePage********");
};
obj.jumpPage = function(page){
console.log("******jumpPage********");
};
obj.activeFormulaBoard = function(callback){
console.log("******activeFormulaBoard********");
callback && callback(null);
};
obj.activeWhiteBoard = function(callback){
console.log("******activeWhiteBoard********");
callback && callback(null);
};
obj.beganRecording = function(){
console.log("******beganRecording********");
};
obj.endRecording = function(callback){
console.log("******endRecording********");
callback&&callback("");
};
obj.speakPoints = function(audioUrl, evalText, callback){
console.log("******speakPoints********");
callback&&callback("");
};
obj.startRecord = function(){
console.log("******startRecord********");
};
obj.stopRecord = function(callback){
console.log("******stopRecord********");
callback&&callback("");
};
obj.greadPapersForText = function(params, callback){
console.log("******greadPapersForText********");
callback&&callback("");
}
obj.lansiEvaluation = function(params, callback){
console.log("******lansiEvaluation********");
callback&&callback("");
}
obj.startTest = function(testText){
console.log("******startTest********");
};
obj.stopTest = function(callback){
console.log("******stopTest********");
callback&&callback("");
};
obj.openDubbingPage = function(){
console.log("******openDubbingPage********");
},
obj.openDubbingPageTwo = function(){
console.log("******openDubbingPageTwo********");
},
obj.openRecognitionCamera = function(callback){
console.log("******openRecognitionCamera********");
callback&&callback("");
},
obj.sendAnswer = function(answer, isRight, startTime){
console.log("******sendAnswer********");
};
obj.getAnswer = function(queryObj, callback){
console.log("******getAnswer********");
callback&&callback("");
};
obj.openOsmo = function(){
console.log("******openOsmo********");
};
obj.closeOsmo = function(){
console.log("******closeOsmo********");
};
obj.openOsmoHandwriting = function(){
console.log("******openOsmoHandwriting********");
};
obj.closeOsmoHandwriting = function(){
console.log("******closeOsmoHandwriting********");
};
obj.openOsmoFingerRead = function(){
console.log("******openOsmoFingerRead********");
};
obj.closeOsmoFingerRead = function(){
console.log("******closeOsmoFingerRead********");
};
obj.gameEnd = function(){
console.log("******gameEnd********");
};
obj.getTemplates = function(callback){
callback&&callback("");
};
obj.getTemplateUrl = function(templateName, callback){
const obj = {
play_url: "",
form_url: "",
};
callback&&callback(JSON.stringify(obj));
};
obj.sendEvent = function(evtName, data, key = ''){
if(evtName==="reconnect"){
console.error("reconnect是内置的断线重连事件名称,请勿使用此名称作为事件名");
return;
}
if(evtName==="userchange"){
console.error("userchange是内置的用户变更事件名称,请勿使用此名称作为事件名");
return;
}
return;
};
obj.onEvent = function(evtName,callback){
console.warn("==本地测试用,onEvent的监听事件会直接触发==", "事件名:"+ evtName);
callback && callback("", function(){});
};
obj.removeEvent = function(evtName){
};
obj.sendErrorLog = function (error) {
};
}
return obj;
})();
</script>
<script>
if (document.domain.indexOf("iteachabc.com") > 0) {
document.domain = "iteachabc.com";
......
......@@ -11,11 +11,9 @@
</div>
<div class="main-body">
<div ref="refDubbingScrollList" class="dubbing-items">
<el-card v-for="item, index in dubbintItems" :key="index" class="box-card">
<el-card v-for="item, index in dubbingData.dubbingItems" :key="index" class="box-card">
<div style="position: relative;">
<span style="position: absolute;" class="item-index">{{ index + 1 }} <span
style="font-size: medium; line-height: normal;">{{ currentSelectDubbingIndex==index ?
'正在编辑' : '' }}</span></span>
<span style="position: absolute;" class="item-index">{{ index + 1 }} <span style="font-size: medium; line-height: normal;">{{ currentSelectDubbingIndex==index ? '正在编辑' : '' }}</span></span>
<div style="text-align: right;">
<el-button size="mini" type="danger" @click="handleClickDelete(index)">删除</el-button>
<el-button size="mini" type="primary" @click="handleClickSetCurrent(index)">编辑</el-button>
......@@ -97,7 +95,7 @@ export default {
isPlaying: false,
// 视频地址
videoUrl: 'https://teach.cdn.ireadabc.com/3d13b9a7b2cb777836a3d5b29c38384b.mp4',
videoUrl: '',
// 时间区间
timeRange: {
......@@ -105,8 +103,16 @@ export default {
end: 1
},
// 配音列表
dubbintItems: [],
// 配音数据
dubbingData: {
backgroundAudio: {
url: "",
duration: 0,
size: 0
},
dubbingItems: []
},
// 选择内容对话框显示隐藏控制
dialogSelectShow: false,
......@@ -200,13 +206,23 @@ export default {
},
methods: {
async getData() {
const dpeData = await this.$getDPEData();
console.log("====dpeData====", dpeData)
const res = await this.$getData();
console.log("====getData====", res)
if(!res) {
// 默认数据
this.dubbintItems = []
this.dubbingData = {
backgroundAudio: {
url: "",
duration: 0,
size: 0
},
dubbingItems: []
}
} else {
this.dubbintItems = res
this.dubbingData = res
}
},
......@@ -215,8 +231,8 @@ export default {
const sTime = this.timeRange.start * this.$refs.refVideo.duration;
const eTime = this.timeRange.end * this.$refs.refVideo.duration;
this.dubbintItems[this.currentSelectDubbingIndex].timelineIn = sTime;
this.dubbintItems[this.currentSelectDubbingIndex].timelineOut = eTime;
this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn = sTime;
this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut = eTime;
},
// 点击区间播放
......@@ -258,18 +274,18 @@ export default {
handleClickSetStart() {
this.timeRange.start = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;
this.dubbintItems[this.currentSelectDubbingIndex].timelineIn = this.$refs.refVideo.currentTime;
this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineIn = this.$refs.refVideo.currentTime;
},
handleClickSetEnd() {
this.timeRange.end = this.$refs.refVideo.currentTime / this.$refs.refVideo.duration;
this.dubbintItems[this.currentSelectDubbingIndex].timelineOut = this.$refs.refVideo.currentTime;
this.dubbingData.dubbingItems[this.currentSelectDubbingIndex].timelineOut = this.$refs.refVideo.currentTime;
},
handleClickSetCurrent(index, play = false) {
const timelineIn = this.dubbintItems[index].timelineIn / this.$refs.refVideo.duration;
const timelineOut = this.dubbintItems[index].timelineOut / this.$refs.refVideo.duration;
const timelineIn = this.dubbingData.dubbingItems[index].timelineIn / this.$refs.refVideo.duration;
const timelineOut = this.dubbingData.dubbingItems[index].timelineOut / this.$refs.refVideo.duration;
this.currentSelectDubbingIndex = index;
......@@ -284,13 +300,13 @@ export default {
// 删除配音秀
handleClickDelete(index) {
this.$confirm("确定要删除吗?").then(res=>{
this.dubbintItems.splice(index, 1)
this.dubbingData.dubbingItems.splice(index, 1)
}).catch(_=>"")
},
// 添加配音
handelClickAdd() {
this.dubbintItems.push({
this.dubbingData.dubbingItems.push({
orgText: '',
transText: '',
timelineIn: 0,
......@@ -356,7 +372,7 @@ export default {
// 保存数据
async handleClickSave() {
this.$setData(this.dubbintItems)
this.$setData(this.dubbingData)
}
}
}
......
......@@ -15,6 +15,14 @@ Vue.prototype.$getData = () => {
})
}
Vue.prototype.$getDPEData = () => {
return new Promise((resolve, reject) => {
(window).courseware.getDPEData((data) => {
resolve(data)
})
})
}
Vue.prototype.$setData = (data) => {
(window).courseware.setData(data, null, "default_key")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment