webpackJsonp([1],{"1DRq":function(t,a){},NHnr:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("7+uW"),s={name:"ExperimentResults",data:function(){return{dataset:[],sample_num_in_dataset:{},page_index_list:[],page_content:[],current_page_index:0,current_dataset:""}},mounted:function(){var t=this;this.$axios.get(this.BASE_URL+"/batch-api/entry/",{params:{}}).then(function(a){t.dataset=a.data.content.dataset_name,t.page_index_list=[];for(var e=0;e<a.data.content.page_num;++e)t.page_index_list.push(e);t.page_content=a.data.content.result_list,t.current_page_index=0,t.sample_num_in_dataset=a.data.content.sample_num_in_dataset,t.current_dataset=a.data.content.current_dataset_name,console.log(t.current_dataset)})},methods:{triggerPage:function(t){var a=this;this.$axios.get(this.BASE_URL+"/batch-api/page/",{params:{dataset_name:a.current_dataset,page_index:t}}).then(function(e){a.page_content=e.data.content.result_list,a.current_page_index=t,console.log("in page "+t)})},triggerDataset:function(t){var a=this;this.$axios.get(this.BASE_URL+"/batch-api/entry/",{params:{dataset_name:t}}).then(function(t){a.dataset=t.data.content.dataset_name,a.page_index_list=[];for(var e=0;e<t.data.content.page_num;++e)a.page_index_list.push(e);a.page_content=t.data.content.result_list,a.current_page_index=0,a.sample_num_in_dataset=t.data.content.sample_num_in_dataset,a.current_dataset=t.data.content.current_dataset_name})}}},i={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"btn-group",attrs:{role:"group","aria-label":"Button group with nested dropdown"}},[t._l(t.page_index_list,function(a,n){return e("button",{key:n,staticClass:"btn",class:{"btn-secondary":n!=t.current_page_index,"btn-primary":n==t.current_page_index},attrs:{type:"button"},on:{click:function(a){return t.triggerPage(n)}}},[t._v(t._s(a))])}),t._v(" "),e("div",{staticClass:"btn-group",attrs:{role:"group"}},[e("button",{staticClass:"btn btn-secondary dropdown-toggle",attrs:{id:"btnGroupDrop1",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v("\n        数据集\n        ")]),t._v(" "),e("div",{staticClass:"dropdown-menu",attrs:{"aria-labelledby":"btnGroupDrop1"}},t._l(t.dataset,function(a,n){return e("a",{key:n,staticClass:"dropdown-item",attrs:{href:"#"},on:{click:function(e){return t.triggerDataset(a)}}},[t._v(t._s(a)+" "),e("span",{staticClass:"badge badge-light"},[t._v(t._s(t.sample_num_in_dataset[a]))])])}),0)])],2),t._v(" "),e("div",{staticClass:"data-and-tag-layout"},t._l(t.page_content,function(a,n){return e("div",{key:n},[e("div",{staticClass:"data-and-tag-card"},[e("div",{staticStyle:{"align-self":"flex-end","margin-right":"20px"}},[e("span",{staticClass:"badge badge-info"},[t._v(t._s(t.current_dataset))])]),t._v(" "),e("div",{staticClass:"data-and-tag-group"},t._l(a,function(a,n){return e("div",{key:n,staticClass:"data-and-tag-cell"},[e("div",{staticClass:"data-item"},["IMAGE"==a.type?e("img",{style:a.style,attrs:{src:a.data}}):"FILE"==a.type?e("a",[t._v(t._s(a.title))]):e("p",[t._v(t._s(a.data))])]),t._v(" "),e("div",{staticClass:"tag-item"},t._l(a.attribute,function(a,n,s){return e("div",{key:s,staticClass:"tag-attr"},[e("label",[t._v(t._s(n))]),t._v(" "),e("p",[t._v(t._s(a))])])}),0)])}),0)])])}),0)])},staticRenderFns:[]};var r={name:"App",components:{ExperimentResults:e("VU/8")(s,i,!1,function(t){e("m0H/")},"data-v-1020711a",null).exports}},d={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{attrs:{id:"app"}},[this._m(0),this._v(" "),a("div",{staticClass:"container"},[a("ExperimentResults")],1)])},staticRenderFns:[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"jumbotron",staticStyle:{"margin-top":"-60px"}},[a("h1",{staticClass:"display-4",staticStyle:{"text-align":"left"}},[this._v("AntGo: 实验结果")]),this._v(" "),a("p",{staticClass:"lead",staticStyle:{"text-align":"left"}},[this._v("帮助机器学习开发者快速查看模型效果")]),this._v(" "),a("hr",{staticClass:"my-4"}),this._v(" "),a("p",{staticStyle:{"text-align":"left"}},[this._v("通过定制infer_callback回调函数，实现定制化实验结果展示.")])])}]};var l=e("VU/8")(r,d,!1,function(t){e("1DRq")},null,null).exports,o=(e("K3J8"),e("qb6w"),e("Bb4J"),e("Tqaz")),_=e("mtWM"),c=e.n(_),u=(e("mw3O"),e("7t+N")),p=e.n(u);e("e0XP");c.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded",n.default.config.productionTip=!1,n.default.use(o.a),n.default.use(o.b),n.default.use(c.a),n.default.use(p.a),n.default.prototype.$axios=c.a,n.default.prototype.BASE_URL="",new n.default({el:"#app",components:{App:l},template:"<App/>"})},e0XP:function(t,a){},"m0H/":function(t,a){},qb6w:function(t,a){}},["NHnr"]);
//# sourceMappingURL=app.ca2cb381ac82e46e8daa.js.map