12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1b7ac67e"],{"049d":function(e,t,a){"use strict";var n=a("d2be"),r=a.n(n);r.a},"0aed":function(e,t,a){"use strict";a("aaba");var n=a("bf16"),r=a("86d4"),i=a("238a"),l=a("f6b4"),s=a("cb3d"),o=a("8714"),u=s("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var a="ab".split(e);return 2===a.length&&"a"===a[0]&&"b"===a[1]}();e.exports=function(e,t,a){var d=s(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,a=/a/;return a.exec=function(){return t=!0,null},"split"===e&&(a.constructor={},a.constructor[u]=function(){return a}),a[d](""),!t})):void 0;if(!p||!h||"replace"===e&&!c||"split"===e&&!f){var v=/./[d],g=a(l,d,""[e],(function(e,t,a,n,r){return t.exec===o?p&&!r?{done:!0,value:v.call(t,a,n)}:{done:!0,value:e.call(a,t,n)}:{done:!1}})),m=g[0],b=g[1];n(String.prototype,e,m),r(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"2d20":function(e,t,a){"use strict";var n=a("f87a"),r=a.n(n);r.a},"2fd4":function(e,t,a){var n=a("fb68"),r=a("75c4"),i=a("cb3d")("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},4803:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"add"},[a("p",[e._v("在线培训 > 视频管理 > 新增视频")]),a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],staticClass:"content"},[a("el-form",{attrs:{"label-width":"80px"}},[""!=e.id?a("el-form-item",{attrs:{label:"培训项目"}},[e.form.subject_id?a("Subject",{attrs:{subvalue:e.form.subject_item},on:{subChange:e.subChange}}):e._e()],1):a("el-form-item",{attrs:{label:"培训项目"}},[a("Subject",{on:{subChange:e.subChange}})],1),a("el-form-item",{attrs:{label:"培训类型"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.form.train_type,callback:function(t){e.$set(e.form,"train_type",t)},expression:"form.train_type"}},[a("el-option",{attrs:{label:"新办",value:"新办"}}),a("el-option",{attrs:{label:"换证",value:"换证"}}),a("el-option",{attrs:{label:"复审",value:"复审"}})],1)],1),a("el-form-item",{attrs:{label:"视频名称"}},[a("el-input",{attrs:{placeholder:"视频名称"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),a("el-form-item",{attrs:{label:"封面图"}},[e.form.img?a("p",[a("img",{attrs:{width:"300",src:e.form.img,alt:""}})]):e._e(),a("input",{attrs:{type:"file",id:"img"},on:{change:function(t){return e.upload("img")}}})]),a("el-form-item",{attrs:{label:"视频文件"}},[e.form.url?a("p",[a("video",{attrs:{width:"300",src:e.form.url}})]):e._e(),a("input",{attrs:{type:"file",id:"url"},on:{change:function(t){return e.upload("url")}}})]),a("el-form-item",{attrs:{label:" "}},[a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")])],1)],1)],1)])},r=[],i=a("fa7e"),l={components:{Subject:i["a"]},data:function(){return{fullscreenLoading:!1,form:{},id:""}},methods:{subChange:function(e,t){this.form.subject_id=t,this.form.subject_item=e.join("|")},upload:function(e){var t=this,a=document.getElementById(e).files,n=new FormData;n.append("file",a[0]),this.fullscreenLoading=!0,this.$api.uploadFile(n).then((function(a){if(t.fullscreenLoading=!1,0==a.data.code){var n=t.form;t.$set(n,e,a.data.data.url),t.$message({message:"上传成功!",type:"success"})}else t.$message.error(a.data.message)}))},getData:function(){var e=this;this.$api.getVideo({id:this.form.id}).then((function(t){e.form=t.data.data}))},save:function(){var e=this,t=this.form;t.id?this.$api.putVideo(t).then((function(t){0==t.data.code?(e.$message({message:"修改成功!",type:"success"}),e.$router.push({path:"/videos"})):e.$message.error(t.data.message)})):this.$api.saveVideo(t).then((function(t){0==t.data.code?(e.$message({message:"添加成功!",type:"success"}),e.$router.push({path:"/videos"})):e.$message.error(t.data.message)}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.deleteVideo({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))}},created:function(){this.$route.query.id&&(this.form.id=this.$route.query.id,this.id=this.$route.query.id,this.getData())}},s=l,o=(a("2d20"),a("4023")),u=Object(o["a"])(s,n,r,!1,null,null,null);t["default"]=u.exports},7108:function(e,t,a){"use strict";var n=a("7e23"),r=RegExp.prototype.exec;e.exports=function(e,t){var a=e.exec;if("function"===typeof a){var i=a.call(e,t);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(e))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},8714:function(e,t,a){"use strict";var n=a("f1fe"),r=RegExp.prototype.exec,i=String.prototype.replace,l=r,s="lastIndex",o=function(){var e=/a/,t=/b*/g;return r.call(e,"a"),r.call(t,"a"),0!==e[s]||0!==t[s]}(),u=void 0!==/()??/.exec("")[1],c=o||u;c&&(l=function(e){var t,a,l,c,f=this;return u&&(a=new RegExp("^"+f.source+"$(?!\\s)",n.call(f))),o&&(t=f[s]),l=r.call(f,e),o&&l&&(f[s]=f.global?l.index+l[0].length:t),u&&l&&l.length>1&&i.call(l[0],a,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(l[c]=void 0)})),l}),e.exports=l},"9a33":function(e,t,a){"use strict";var n=a("2fd4"),r=a("69b3"),i=a("f63e"),l=a("e754"),s=a("eafa"),o=a("7108"),u=a("8714"),c=a("238a"),f=Math.min,d=[].push,p="split",h="length",v="lastIndex",g=4294967295,m=!c((function(){RegExp(g,"y")}));a("0aed")("split",2,(function(e,t,a,c){var b;return b="c"=="abbc"[p](/(b)*/)[1]||4!="test"[p](/(?:)/,-1)[h]||2!="ab"[p](/(?:ab)*/)[h]||4!="."[p](/(.?)(.?)/)[h]||"."[p](/()()/)[h]>1||""[p](/.?/)[h]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!n(e))return a.call(r,e,t);var i,l,s,o=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,p=void 0===t?g:t>>>0,m=new RegExp(e.source,c+"g");while(i=u.call(m,r)){if(l=m[v],l>f&&(o.push(r.slice(f,i.index)),i[h]>1&&i.index<r[h]&&d.apply(o,i.slice(1)),s=i[0][h],f=l,o[h]>=p))break;m[v]===i.index&&m[v]++}return f===r[h]?!s&&m.test("")||o.push(""):o.push(r.slice(f)),o[h]>p?o.slice(0,p):o}:"0"[p](void 0,0)[h]?function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)}:a,[function(a,n){var r=e(this),i=void 0==a?void 0:a[t];return void 0!==i?i.call(a,r,n):b.call(String(r),a,n)},function(e,t){var n=c(b,e,this,t,b!==a);if(n.done)return n.value;var u=r(e),d=String(this),p=i(u,RegExp),h=u.unicode,v=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(m?"y":"g"),x=new p(m?u:"^(?:"+u.source+")",v),y=void 0===t?g:t>>>0;if(0===y)return[];if(0===d.length)return null===o(x,d)?[d]:[];var $=0,_=0,w=[];while(_<d.length){x.lastIndex=m?_:0;var C,E=o(x,m?d:d.slice(_));if(null===E||(C=f(s(x.lastIndex+(m?0:_)),d.length))===$)_=l(d,_,h);else{if(w.push(d.slice($,_)),w.length===y)return w;for(var j=1;j<=E.length-1;j++)if(w.push(E[j]),w.length===y)return w;_=$=C}}return w.push(d.slice($)),w}]}))},aaba:function(e,t,a){"use strict";var n=a("8714");a("e46b")({target:"RegExp",proto:!0,forced:n!==/./.exec},{exec:n})},cc57:function(e,t,a){var n=a("064e").f,r=Function.prototype,i=/^\s*function ([^ (]*)/,l="name";l in r||a("149f")&&n(r,l,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},d2be:function(e,t,a){},e754:function(e,t,a){"use strict";var n=a("fc81")(!0);e.exports=function(e,t,a){return t+(a?n(e,t).length:1)}},f1fe:function(e,t,a){"use strict";var n=a("69b3");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},f87a:function(e,t,a){},fa7e:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.subject_id?a("span",[a("el-cascader",{staticClass:"sub",attrs:{props:e.props1,clearable:"",placeholder:"请选择作业类别 / 准操项目",options:e.data},on:{change:e.handleChange},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}})],1):a("span",[e.value?a("el-cascader",{staticClass:"sub",attrs:{props:e.props,placeholder:"请选择培训科目 / 作业类别 / 准操项目",options:e.data},on:{change:e.handleChange},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}}):a("el-cascader",{staticClass:"sub",attrs:{props:e.props1,clearable:"",placeholder:"请选择培训科目 / 作业类别 / 准操项目",options:e.data},on:{change:e.handleChange},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}})],1)},r=[],i=(a("9a33"),a("cc57"),{data:function(){return{data:[],value1:[],props:{label:"name",checkStrictly:!0,value:"id"},props1:{label:"name",checkStrictly:!0,value:"name"}}},props:{value:"",subvalue:"",subject_id:""},methods:{getData:function(e){var t=this;this.$api.getSubList().then((function(e){var a=e.data.data;if(t.subject_id)for(var n=0;n<a.length;n++)a[n].id==t.subject_id&&(t.data=a[n].children);else t.data=e.data.data}))},handleChange:function(e){var t="",a=this;if(e.length>=3&&isNaN(e[0])){var n=this.data.filter((function(t){return t.name==e[0]})),r=n[0].children.filter((function(t){return t.name==e[1]})),i=r[0].children.filter((function(t){return t.name==e[2]}));t=i[0].id}setTimeout((function(){var n=document.querySelector(".el-input__inner").value,r=n.split(" / ");console.log(n),a.$emit("subChange",r,t,e)}),100)}},created:function(){this.getData(),this.value&&(this.value1=this.value),this.subvalue&&(this.value1=this.subvalue.split("|"))}}),l=i,s=(a("049d"),a("4023")),o=Object(s["a"])(l,n,r,!1,null,null,null);t["a"]=o.exports},fc81:function(e,t,a){var n=a("ee21"),r=a("f6b4");e.exports=function(e){return function(t,a){var i,l,s=String(r(t)),o=n(a),u=s.length;return o<0||o>=u?e?"":void 0:(i=s.charCodeAt(o),i<55296||i>56319||o+1===u||(l=s.charCodeAt(o+1))<56320||l>57343?e?s.charAt(o):i:e?s.slice(o,o+2):l-56320+(i-55296<<10)+65536)}}}}]);
- //# sourceMappingURL=chunk-1b7ac67e.4423ee00.js.map
|