You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
7.1 KiB
1 line
7.1 KiB
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<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var m=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,n.Component),c(i,[{key:"render",value:function(){var e=this.props.tags;return l.a.createElement(l.a.Fragment,null,e&&e.map(function(e,t){return l.a.createElement(l.a.Fragment,null,"获奖案例"==e.name?l.a.createElement("span",{key:t,className:"edu-filter-btn fl cdefault edu-activity-red ml10"},e.name):"入库案例"==e.name?l.a.createElement("span",{key:t,className:"edu-filter-btn fl cdefault edu-activity-blue ml10"},e.name):"企业案例"==e.name?l.a.createElement("span",{key:t,className:"edu-filter-btn fl cdefault edu-activity-orange-sub ml10"},e.name):l.a.createElement("span",{key:t,className:"edu-filter-btn fl cdefault edu-activity-36c53c-sub ml10"},e.name))}))}}]),i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),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,(i.__proto__||Object.getPrototypeOf(i)).call(this,e))}t.a=m},2265:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(0),f=a.n(n),l=a(1565),s=(a.n(l),a(293)),d=(a.n(s),a(5)),y=a(1847),r=a(12),c=a.n(r),h=a(163),o=function(e,t,a){return t&&m(e.prototype,t),a&&m(e,a),e};function m(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(p,n.Component),o(p,[{key:"render",value:function(){var e=this,t=this.props,a=t.CaseDetail,n=t.praise_count,l=t.creator,s=t.operation,r=t.user_praised,c=t.tags,o=t.attachments,m=this.state,i=m.modalsType,p=m.modalsTopval,u=m.modalsBottomval;return document.title=a&&null!=a.title?a&&a.title:"教学案例",f.a.createElement("div",{className:"educontent mt10 mb50"},a&&f.a.createElement(f.a.Fragment,null,f.a.createElement(h.a,{modalsType:i,modalsTopval:p,modalsBottomval:u,modalCancel:this.cancelDelClasses,modalSave:this.sureDelClasses}),f.a.createElement("p",{className:"mt10 mb20 clearfix lineh-20"},f.a.createElement("a",{href:"/moop_cases",className:"color-grey-9"},"教学案例")," > ",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}}); |