text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6972e212"],{"0dec":function(t,e,a){t.exports=a("f292")},"11e9":function(t,e,a){var s=a("52a7"),n=a("4630"),i=a("6821"),r=a("6a99"),o=a("69a8"),l=a("c69a"),c=Object.getOwnPropertyDescriptor;e.f=a("9e1e")?c:function(t,e){if(t=i(t),e=r(e,!0),l)try{return c(t,e)}catch(a){}if(o(t,e))return n(!s.f.call(t,e),t[e])}},"23a9":function(t,e,a){},"5dbc":function(t,e,a){var s=a("d3f4"),n=a("8b97").set;t.exports=function(t,e,a){var i,r=e.constructor;return r!==a&&"function"==typeof r&&(i=r.prototype)!==a.prototype&&s(i)&&n&&n(t,i),t}},"8b97":function(t,e,a){var s=a("d3f4"),n=a("cb7c"),i=function(t,e){if(n(t),!s(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,s){try{s=a("9b43")(Function.call,a("11e9").f(Object.prototype,"__proto__").set,2),s(t,[]),e=!(t instanceof Array)}catch(n){e=!0}return function(t,a){return i(t,a),e?t.__proto__=a:s(t,a),t}}({},!1):void 0),check:i}},9093:function(t,e,a){var s=a("ce10"),n=a("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return s(t,n)}},aa63:function(t,e,a){t.exports=a.p+"static/img/modelbg.fcbe2049.jpg"},aa77:function(t,e,a){var s=a("5ca1"),n=a("be13"),i=a("79e5"),r=a("fdef"),o="["+r+"]",l="​",c=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),p=function(t,e,a){var n={},o=i((function(){return!!r[t]()||l[t]()!=l})),c=n[t]=o?e(g):r[t];a&&(n[a]=c),s(s.P+s.F*o,"String",n)},g=p.trim=function(t,e){return t=String(n(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=p},ba92:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"e",(function(){return i})),a.d(e,"f",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return c}));var s=a("b775");function n(t){return Object(s["a"])({url:"/layout/"+t+"/get/",method:"get"})}function i(t){return Object(s["a"])({url:"/layout/"+t+"/start/",method:"get"})}function r(t){return Object(s["a"])({url:"/layout/"+t+"/stop/",method:"get"})}function o(t,e){return Object(s["a"])({url:"/layout/"+t+"/flag/?flag="+e,method:"get"})}function l(t,e){return(void 0===e||null===e||e<1)&&(e=1),Object(s["a"])({url:"/layout/"+t+"/rank/?page="+e,method:"get"})}function c(t,e,a){return void 0!==t&&null!=t||(t=""),void 0!==a&&null!==a||(a="all"),(void 0===e||null===e||e<1)&&(e=1),Object(s["a"])({url:"/get/scenedata/?tag="+a+"&page="+e+"&query="+t,method:"get"})}},c5f6:function(t,e,a){"use strict";var s=a("7726"),n=a("69a8"),i=a("2d95"),r=a("5dbc"),o=a("6a99"),l=a("79e5"),c=a("9093").f,u=a("11e9").f,p=a("86cc").f,g=a("aa77").trim,d="Number",m=s[d],h=m,f=m.prototype,_=i(a("2aeb")(f))==d,v="trim"in String.prototype,y=function(t){var e=o(t,!1);if("string"==typeof e&&e.length>2){e=v?e.trim():g(e,3);var a,s,n,i=e.charCodeAt(0);if(43===i||45===i){if(a=e.charCodeAt(2),88===a||120===a)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:s=2,n=49;break;case 79:case 111:s=8,n=55;break;default:return+e}for(var r,l=e.slice(2),c=0,u=l.length;c<u;c++)if(r=l.charCodeAt(c),r<48||r>n)return NaN;return parseInt(l,s)}}return+e};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof m&&(_?l((function(){f.valueOf.call(a)})):i(a)!=d)?r(new h(y(e)),a,m):y(e)};for(var x,b=a("9e1e")?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;b.length>T;T++)n(h,x=b[T])&&!n(m,x)&&p(m,x,u(h,x));m.prototype=f,f.constructor=m,a("2aba")(s,d,m)}},d4fe:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-row",[a("el-col",{attrs:{span:16}},[a("el-card",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingFlag,expression:"loadingFlag"}],attrs:{"element-loading-text":t.loadingText}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("场景信息")]),t._v(" "),t.isRun?t._e():a("el-tooltip",{attrs:{content:"运行中"}},[a("i",{staticClass:"el-icon-loading",staticStyle:{color:"#20a0ff"}})]),t._v(" "),t.isRun?a("el-tooltip",{attrs:{content:"未启动"}},[a("i",{staticClass:"fa fa-stop",attrs:{"aria-hidden":"true"}})]):t._e()],1),t._v(" "),a("el-container",[a("el-aside",{attrs:{width:"356px"}},[t.layout.image_name!==t.imgpath?a("img",{attrs:{src:t.layout.image_name,alt:"",width:"356px",height:"248px"}}):t._e()]),t._v(" "),a("el-main",{staticStyle:{"margin-top":"-15px"}},[a("el-row",[a("el-col",{attrs:{span:19}},[a("span",{staticClass:"info2"},[t._v(t._s(t.layout.name))])])],1),t._v(" "),a("el-row",{staticStyle:{"margin-top":"15px"}},[a("el-col",{attrs:{span:5}},[a("span",{staticClass:"info3"},[t._v("难易程度")])]),t._v(" "),a("el-col",{attrs:{span:19}},[a("el-rate",{attrs:{disabled:"","show-score":"","text-color":"#ff9900","score-template":"{value}"},model:{value:t.difvalue,callback:function(e){t.difvalue=e},expression:"difvalue"}})],1)],1),t._v(" "),a("el-row",{staticStyle:{"margin-top":"20px"}},[a("el-col",{attrs:{span:5}},[a("span",{staticClass:"info3"},[t._v("当前进度")])]),t._v(" "),a("el-col",{attrs:{span:19}},[a("el-progress",{staticStyle:{width:"90%",color:"#2a58e8"},attrs:{"text-inside":!0,"stroke-width":20,color:"rgba(64, 158, 255, 1)",percentage:parseFloat(t.currentProgress),status:"success"}})],1)],1),t._v(" "),a("el-row",{staticStyle:{"margin-top":"20px"}},[a("el-col",{attrs:{span:5}},[a("span",{staticClass:"info3"},[t._v("当前排名")])]),t._v(" "),a("el-col",{attrs:{span:19}},[0===t.currentRank?a("span",[t._v("\n                    未上榜\n                  ")]):t.currentRank>0?a("span",[t._v("\n                    "+t._s(t.currentRank)+"\n                  ")]):t._e()])],1),t._v(" "),a("el-row",{staticStyle:{"margin-top":"20px"}},[a("el-col",{attrs:{span:5}},[a("span",{staticClass:"info3",staticStyle:{"margin-bottom":"auto"}},[t._v("Flag")])]),t._v(" "),a("el-col",{attrs:{span:19}},[a("el-input",{staticStyle:{width:"80%"},attrs:{disabled:t.isRun,size:"small",placeholder:"请输入Flag：格式flag-{xxxxxxxx}"},model:{value:t.flag,callback:function(e){t.flag=e},expression:"flag"}}),t._v(" "),a("el-button",{staticStyle:{color:"rgba(64, 158, 255, 1)"},attrs:{size:"small",disabled:t.isRun,type:"text"},on:{click:t.handleFlag}},[t._v("提交")])],1)],1),t._v(" "),a("el-row",{staticStyle:{"margin-top":"12px"}},[!0===t.isAdmin&&t.isRun?a("el-button",{staticClass:"btn1",attrs:{size:"medium"},on:{click:t.handleRun}},[a("span",{staticClass:"span1"},[a("i",{staticClass:"el-icon-video-play",staticStyle:{"margin-right":"2px"}}),t._v("启动场景")])]):t._e(),t._v(" "),!0!==t.isAdmin||t.isRun?t._e():a("el-button",{staticClass:"btn1",attrs:{size:"small"},on:{click:t.handleStop}},[a("span",{staticClass:"span1"},[a("i",{staticClass:"el-icon-loading",staticStyle:{"margin-right":"2px"}}),t._v("停止场景")])]),t._v("\n                该场景已有\n                "),a("span",{staticClass:"span5"},[t._v(t._s(t.adoptCount))]),t._v("\n                人完成/\n                "),a("span",{staticClass:"span6"},[t._v(t._s(t.failCount))]),t._v("\n                人未通过\n              ")],1)],1),t._v(" "),a("el-aside",{attrs:{width:"60px"}},[a("el-row",[a("el-col",[a("span",{staticClass:"txt8"},[t._v(t._s(t.currentScore))]),t._v(" "),a("span",{staticClass:"word5"},[t._v("分")])])],1)],1)],1),t._v(" "),a("el-divider"),t._v(" "),a("el-container",[a("el-main",[a("el-row",[a("span",{staticClass:"span2"},[t._v("环境描述")])]),t._v(" "),a("el-row",{staticStyle:{"margin-top":"24px"}},[a("span",{staticClass:"span3"},[t._v(" "+t._s(t.layout.desc)+" ")])]),t._v(" "),a("el-row",{staticStyle:{"margin-top":"24px"}},[a("span",{staticClass:"span2"},[t._v("访问地址")])]),t._v(" "),t._l(t.open,(function(e,s){return a("el-row",{staticStyle:{"margin-top":"24px"}},[a("span",{staticClass:"span3"},[t._v(" "+t._s(e)+" ")])])}))],2)],1)],1)],1),t._v(" "),a("el-col",{staticStyle:{"margin-left":"10px"},attrs:{span:7}},[a("el-card",[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("场景排名")])]),t._v(" "),a("div",[a("el-table",{attrs:{data:t.rankList}},[a("el-table-column",{attrs:{type:"index",label:"排名",width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.page.currentPageNum*t.page.size+e.$index+1-t.page.size>=4?a("p",{staticStyle:{"margin-left":"15px"}},[t._v(t._s(t.page.currentPageNum*t.page.size+e.$index+1-t.page.size))]):t._e(),t._v(" "),t.page.currentPageNum*t.page.size+e.$index+1-t.page.size===1?a("svg-icon",{staticStyle:{"margin-left":"15px",height:"48px"},attrs:{"icon-class":"trophy1"}}):t._e(),t._v(" "),t.page.currentPageNum*t.page.size+e.$index+1-t.page.size===2?a("svg-icon",{staticStyle:{"margin-left":"15px",height:"48px"},attrs:{"icon-class":"trophy2"}}):t._e(),t._v(" "),t.page.currentPageNum*t.page.size+e.$index+1-t.page.size===3?a("svg-icon",{staticStyle:{"margin-left":"15px",height:"48px"},attrs:{"icon-class":"trophy3"}}):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"username","show-overflow-tooltip":!0,label:"用户"}}),t._v(" "),a("el-table-column",{attrs:{prop:"score",label:"积分",width:"80"}})],1)],1),t._v(" "),a("div",{staticStyle:{"margin-top":"20px"}},[a("el-pagination",{attrs:{"page-size":t.page.size,layout:"total, prev, pager, next, jumper",total:t.page.total},on:{"current-change":t.handleRank}})],1)])],1)],1),t._v(" "),a("div",{staticStyle:{"margin-top":"20px"}})],1)},n=[],i=(a("7f7f"),a("db72")),r=a("2f62"),o=a("ba92"),l=(a("0dec"),{name:"timeindex.vue",data:function(){return{layout:{id:"",name:"",desc:"",image_name:""},loadingFlag:!0,loadingText:"环境启动中",flag:"",isAdmin:!1,page:{total:0,size:20,page:1,currentPageNum:1},isRun:!1,currentProgress:"",currentRank:0,currentScore:0,adoptCount:0,failCount:0,incompletePeple:0,open:[],rankList:[],writeup_date:"",drawer:!1,drawerFlag:!1,derection:"btt",imgpath:"/images/",difvalue:3.5}},computed:Object(i["a"])({},Object(r["b"])(["name","avatar","roles","rank"])),created:function(){this.roles.length>0&&"admin"===this.roles[0]&&(this.isAdmin=!0),this.initModelInfo(),this.handleRank(1)},methods:{initModelInfo:function(){var t=this;this.loadingText="模式信息初始化中",this.loadingFlag=!0;var e=this.$route.query.layout_id;void 0!==e&&null!=e&&""!==e||(this.$message({message:"参数不能为空",type:"error"}),this.$router.push({path:"/scene/list"})),this.layout.id=e,Object(o["c"])(e).then((function(e){t.loadingFlag=!1;var s=e.data,n=s.status,i=s.msg;200===n?(t.layout.name=s.data["layout"]["name"],t.layout.desc=s.data["layout"]["desc"],s.data["layout"]["image_name"]?t.layout.image_name="/images/"+s.data["layout"]["image_name"]:t.layout.image_name=a("aa63"),t.open=s.data["open"],s.data["is_run"]||(t.isRun=!0)):t.$message({message:i,type:"error"})})).catch((function(e){t.loadingFlag=!1,t.$message({message:"服务器内部错误",type:"error"}),t.$router.push({path:"/scene/list"})}))},handleRun:function(){var t=this;this.loadingFlag=!0,this.loadingText="模式启动中";var e=this.layout.id;void 0!==e&&null!=e&&""!==e||(this.$message({message:"参数不能为空",type:"error"}),this.$router.push({path:"/scene/list"})),Object(o["e"])(e).then((function(e){t.loadingFlag=!1;var a=e.data,s=a.status,n=a.msg;200===s?(t.layout.name=a.data["layout"]["name"],t.layout.desc=a.data["layout"]["desc"],t.open=a.data["open"],void 0===a.data["is_run"]&&(a.data["is_run"]=!0),t.isRun=!a.data["is_run"],t.$message({message:"启动成功",type:"success"})):t.$message({message:n,type:"error"})})).catch((function(e){t.loadingFlag=!1,t.$message({message:"服务器内部错误",type:"error"}),t.$router.push({path:"/scene/list"})}))},handleStop:function(){var t=this;this.loadingFlag=!0,this.loadingText="模式停止中";var e=this.layout.id;void 0!==e&&null!=e&&""!==e||(this.$message({message:"参数不能为空",type:"error"}),this.$router.push({path:"/scene/list"})),Object(o["f"])(e).then((function(e){t.loadingFlag=!1;var a=e.data,s=a.status,n=a.msg;200===s?(t.$message({message:"关闭成功",type:"success"}),t.initModelInfo()):t.$message({message:n,type:"error"})})).catch((function(e){t.loadingFlag=!1,t.$message({message:"服务器内部错误",type:"error"})}))},handleFlag:function(){var t=this,e=this.flag;this.loadingFlag=!0,this.loadingText="Flag 提交中",""!==e&&null!==e?Object(o["b"])(this.layout.id,e).then((function(e){t.loadingFlag=!1;var a=e.data,s=a.status;200===s?(t.$message({message:"恭喜！通过",type:"success"}),t.flag="",t.handleRank(1)):t.$message({message:a.msg,type:"error"})})).catch((function(e){t.loadingFlag=!1,t.$message({message:"服务器内部错误",type:"error"})})):this.$message({message:"flag 不能为空",type:"error"})},handleRank:function(t){var e=this;this.loadingFlag=!0,this.loadingText="排行初始化中",this.page.page=t,this.page.currentPageNum=t,Object(o["d"])(this.layout.id,t).then((function(t){e.loadingFlag=!1;var a=t.data;e.page.total=a.count,e.rankList=a.result,e.currentProgress=a.progress,e.currentRank=a.current,e.currentScore=a.score,e.adoptCount=a.adopt_count,e.failCount=e.page.total-e.adoptCount})).catch((function(t){e.loadingFlag=!1,e.$message({message:"服务器内部错误",type:"error"})}))},computeTableIndex:function(t){return(this.page.page-1)*this.page.size+t+1}}}),c=l,u=(a("d891"),a("2877")),p=Object(u["a"])(c,s,n,!1,null,"6cb1b0f6",null);e["default"]=p.exports},d891:function(t,e,a){"use strict";a("23a9")},f292:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.msTime.show?a("p",[t.msTime.day>0?a("span",[a("span",[t._v(t._s(t.msTime.day))]),a("i",[t._v(t._s(t.dayTxt))])]):t._e(),t._v(" "),a("span",[t._v(t._s(t.msTime.hour))]),a("i",[t._v(t._s(t.hourTxt))]),t._v(" "),a("span",[t._v(t._s(t.msTime.minutes))]),a("i",[t._v(t._s(t.minutesTxt))]),t._v(" "),a("span",[t._v(t._s(t.msTime.seconds))]),a("i",[t._v(t._s(t.secondsTxt))])]):t._e()])},n=[],i=(a("6b54"),a("c5f6"),{replace:!0,data:function(){return{tipShow:!0,msTime:{show:!1,day:"",hour:"",minutes:"",seconds:""},star:"",end:"",current:""}},watch:{currentTime:function(t,e){this.gogogo()}},props:{tipText:{type:String,default:"距离开始"},tipTextEnd:{type:String,default:"距离结束"},id:{type:String,default:"1"},currentTime:{type:Number},startTime:{type:Number},endTime:{type:Number},endText:{type:String,default:"已结束"},dayTxt:{type:String,default:":"},hourTxt:{type:String,default:":"},minutesTxt:{type:String,default:":"},secondsTxt:{type:String,default:":"},secondsFixed:{type:Boolean,default:!1}},mounted:function(){console.log(this),this.gogogo()},methods:{gogogo:function(){var t=this;10==this.startTime.toString().length?this.star=1e3*this.startTime:this.star=this.startTime,10==this.endTime.toString().length?this.end=1e3*this.endTime:this.end=this.endTime,this.currentTime?10==this.currentTime.toString().length?this.current=1e3*this.currentTime:this.current=this.currentTime:this.current=(new Date).getTime(),this.end<this.current?(this.msTime.show=!1,this.end_message()):this.current<this.star?(this.$set(this,"tipShow",!0),setTimeout((function(){t.runTime(t.star,t.current,t.start_message)}),1)):(this.end>this.current&&this.star<this.current||this.star==this.current)&&(this.$set(this,"tipShow",!1),this.msTime.show=!0,this.$emit("start_callback",this.msTime.show),setTimeout((function(){t.runTime(t.end,t.star,t.end_message,!0)}),1))},runTime:function(t,e,a,s){var n=this,i=this.msTime,r=t-e;if(r>0){this.msTime.show=!0,i.day=Math.floor(r/864e5),r-=864e5*i.day,i.hour=Math.floor(r/36e5),r-=36e5*i.hour,i.minutes=Math.floor(r/6e4),r-=6e4*i.minutes,i.seconds=Math.floor(r/1e3).toFixed(0),r-=1e3*i.seconds,i.hour<10&&(i.hour="0"+i.hour),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds);var o=Date.now(),l=Date.now(),c=l-o;setTimeout((function(){s?n.runTime(n.end,e+=1e3,a,!0):n.runTime(n.star,e+=1e3,a)}),1e3-c)}else a()},start_message:function(){var t=this;this.$set(this,"tipShow",!1),this.$emit("start_callback",this.msTime.show),setTimeout((function(){t.runTime(t.end,t.star,t.end_message,!0)}),1)},end_message:function(){this.msTime.show=!1,this.currentTime<=0||this.$emit("end_callback",this.msTime.show)}}}),r=i,o=a("2877"),l=Object(o["a"])(r,s,n,!1,null,null,null);e["default"]=l.exports},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"}}]);
  //# sourceMappingURL=chunk-6972e212.7d599773.js.map