21.chunk.js
3.66 KB
webpackJsonp([21],{1452:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,i=n(8),u=o(i),l=n(1),c=o(l),s=n(4),h=o(s),f=n(2),d=o(f),m=n(3),p=o(m),g=n(0),v=o(g),S=n(11),y=n(12),P=n(474),E=n(303),R=o(E),C={ContentPage:(0,P.asyncComponent)({resolve:function(){return n.e(12).then(n.bind(null,1453))}}),SubtasksPage:(0,P.asyncComponent)({resolve:function(){return n.e(14).then(n.bind(null,1454))}}),OpinionPage:(0,P.asyncComponent)({resolve:function(){return n.e(11).then(n.bind(null,1455))}}),InfoHeaderUi:(0,P.asyncComponent)({resolve:function(){return n.e(16).then(n.bind(null,1458))}}),OthersPage:(0,P.asyncComponent)({resolve:function(){return n.e(13).then(n.bind(null,1459))}}),InfoSearch:(0,P.asyncComponent)({resolve:function(){return n.e(17).then(n.bind(null,1461))}})},b=(r=(0,S.inject)("infoStore","mainStore"))(a=(0,y.withRouter)(a=(0,S.observer)(a=function(e){function t(){var e,n,o,r;(0,c.default)(this,t);for(var a=arguments.length,i=Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=o=(0,d.default)(this,(e=t.__proto__||(0,u.default)(t)).call.apply(e,[this].concat(i))),o.touchStart=function(e){o.pressTime=setTimeout(function(){var t=o.props.location,n=new URLSearchParams(t.search).get("id"),r=o.props.infoStore.form,a=r.formData.name.value||"";o.showActionSheet(a,n,e)},"1000")},o.handleTouchEnd=function(){clearTimeout(o.pressTime)},o.showActionSheet=function(e,t,n){n.persist();var r=o.props,a=r.mainStore.actionSheetStore.getActionBtn,i=r.history.push,u=r.match.url;a({message:e,historyPush:i,path:u.slice(0,u.indexOf("/info")),id:t})},r=n,(0,d.default)(o,r)}return(0,p.default)(t,e),(0,h.default)(t,[{key:"componentWillMount",value:function(){var e=this.props,t=e.infoStore.getPathname,n=e.location.pathname;t(R.default.getUrlChar(n))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.infoStore.initInfoPage,n=e.location;t({id:new URLSearchParams(n.search).get("id")})}},{key:"componentWillReceiveProps",value:function(e){if(e.location.search!==this.props.location.search){var t=e.infoStore,n=t.getPathname,o=t.initInfoPage,r=e.location,a=r.pathname;n(R.default.getUrlChar(a));o({id:new URLSearchParams(r.search).get("id")})}}},{key:"componentWillUnmount",value:function(){(0,this.props.infoStore.clearState)()}},{key:"render",value:function(){var e=this,t=this.props,n=t.infoStore,o=t.match,r=n.form,a=n.subtasksListStore,i=(n.refreshing,n.isCommentRight),u=n.isRight,l=function(e){var t=e.lastIndexOf(":");return e.slice(0,t)};return v.default.createElement("div",{className:"g-detailsLayout",style:{height:"100%"}},v.default.createElement(C.InfoHeaderUi,null),v.default.createElement(y.Switch,null,v.default.createElement(y.Route,{key:"content",path:l(o.path)+"content",render:function(){return v.default.createElement(C.ContentPage,{form:r,isRight:u,isCommentRight:i,touchStart:e.touchStart,handleTouchEnd:e.handleTouchEnd})}}),v.default.createElement(y.Route,{key:"level",path:l(o.path)+"level",exact:!0,render:function(){return v.default.createElement(C.SubtasksPage,{subtasksListStore:a,isright:u,isCommentRight:i})}}),v.default.createElement(y.Route,{path:l(o.path)+"opinion",render:function(){return v.default.createElement(C.OpinionPage,{isright:u,iscommentright:i,isopioion:"isopioion"})}}),v.default.createElement(y.Route,{path:l(o.path)+"document",render:function(){return v.default.createElement(C.OthersPage,{isright:u,iscommentright:i})}}),v.default.createElement(y.Route,{path:l(o.path)+"infoSearch",render:function(){return v.default.createElement(C.InfoSearch,{isright:u,iscommentright:i})}})))}}]),t}(g.Component))||a)||a)||a;t.default=b}});
//# sourceMappingURL=21.chunk.js.map?v=568c89d6