webpackJsonp([185],{1847:function(e,t,a){"use strict";var n=a(0),l=a.n(n),s=a(1565),r=(a.n(s),a(293)),c=(a.n(r),function(e,t,a){return t&&o(e.prototype,t),a&&o(e,a),e});function o(e,t){for(var a=0;a ",f.a.createElement("span",{className:"color-grey-3"},a.title)),f.a.createElement("p",{className:"lineh-25 mb20 clearfix"},f.a.createElement("span",{className:"font-22 fl mr10 task-hide lineh-30",style:{maxWidth:"800px"}},a.title),f.a.createElement("span",{className:"mt10 fl"},f.a.createElement(y.a,{tags:c}),"pending"==a.status&&f.a.createElement("span",{class:"edu-filter-btn fl cdefault edu-activity-green ml10"},"草稿"),"processing"==a.status&&f.a.createElement("span",{class:"edu-filter-btn fl cdefault edu-activity-green ml10"},"审核中"),"refused"==a.status&&f.a.createElement("span",{class:"edu-filter-btn fl cdefault edu-activity-orange ml10"},"未通过")),f.a.createElement("a",{href:"/moop_cases",className:"fr color-grey-9 mt5"},"返回")),f.a.createElement("div",{className:"edu-back-white"},f.a.createElement("div",{className:"padding30"},f.a.createElement("div",{className:"df mb5"},f.a.createElement("a",{href:"/users/moop"},f.a.createElement("img",{alt:"82274?1563067098",className:"radius mr15 mt3",height:"50",src:Object(d.M)("images/"+(l&&l.image_url)),width:"50"})),f.a.createElement("div",{className:"flex1"},f.a.createElement("li",{className:"clearfix mb5"},f.a.createElement("span",{className:"font-16 fl"},l&&l.name),s&&s.can_deletable?f.a.createElement(d.a,{style:"greyLine",onClick:this.delCases,className:"fr"},"删除"):"",s&&s.can_editable?f.a.createElement(d.a,{style:"colorBlue",to:"/moop_cases/"+this.props.match.params.caseID+"/edit",className:"fr mr20"},"编辑"):""),f.a.createElement("li",{className:"clearfix lineh-20"},f.a.createElement("span",{className:"fl color-grey-9 mr20"},l&&l.school_name),f.a.createElement("span",{className:"fr"},f.a.createElement("span",{className:"fl color-grey-9 mr30"},"编码:",f.a.createElement("span",{className:"color-grey-6"},a.uuid)),a&&"published"==a.status?f.a.createElement("span",{className:"fl color-grey-9"},"发布时间:",f.a.createElement("span",{className:"color-grey-6"},a.published_at)):f.a.createElement("span",{className:"fl color-grey-9"},"上传时间:",f.a.createElement("span",{className:"color-grey-6"},a.created_at)))))),f.a.createElement("div",null,f.a.createElement("span",{className:"fl color-grey-9"},"作者:"),a.author_name,"/",a.author_school_name),f.a.createElement("style",null,"\n .setMDStyle .editormd-html-preview{\n width:100%!important;\n }\n "),f.a.createElement("div",{class:"mt20 setMDStyle"},a.content&&f.a.createElement(d.s,{content:a.content,id:"casesDetail",selector:"casesDetail",style:{width:"100%!important"}})),o&&f.a.createElement("div",{className:"mt10"},f.a.createElement(d.b,Object.assign({},this.props,this.state,{attachments:o}))),f.a.createElement("div",{class:"mt40"},r?f.a.createElement("p",{className:"pointsBtn pointedBtn"},f.a.createElement("span",null,"已赞"),f.a.createElement("span",null,n)):f.a.createElement("p",{onClick:function(){return e.props.praisePoint(e.props.match.params.caseID)},className:"pointsBtn"},f.a.createElement("span",null,f.a.createElement("i",{class:"iconfont icon-dianzan"})),f.a.createElement("span",null,n)))))))}}]),p);function p(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,e));return t.componentDidMount=function(){var e=t.props.match.params.caseID;t.props.getDetail(e)},t.delCases=function(){t.setState({modalsType:!0,modalsTopval:"是否确认删除?",modalsBottomval:""})},t.cancelDelClasses=function(){t.setState({modalsType:!1,modalsTopval:"",modalsBottomval:""})},t.sureDelClasses=function(){var e="/libraries/"+t.props.match.params.caseID+".json";c.a.delete(e).then(function(e){e&&(t.props.showNotification("删除成功"),t.props.history.push("/moop_cases"))}).catch(function(e){console.log(e)})},t.state={modalsType:"",modalsTopval:"",modalsBottomval:"",modalCancel:""},t}t.default=i}});