12.chunk.js 16.6 KB
webpackJsonpecCom([12],{1151:function(e,t,r){e.exports=r(1152)},1152:function(e,t,r){var n=function(){return this}()||Function("return this")(),a=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=a&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(1153),a)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},1153:function(e,t){!function(t){"use strict";function r(e,t,r,n){var i=t&&t.prototype instanceof a?t:a,o=Object.create(i.prototype),c=new v(n||[]);return o._invoke=u(e,r,c),o}function n(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function a(){}function i(){}function o(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(r,a,i,o){var c=n(e[r],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===typeof u&&g.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(u).then(function(e){s.value=e,i(s)},o)}o(c.arg)}function r(e,r){function n(){return new Promise(function(n,a){t(e,r,n,a)})}return a=a?a.then(n,n):n()}var a;this._invoke=r}function u(e,t,r){var a=D;return function(i,o){if(a===O)throw new Error("Generator is already running");if(a===I){if("throw"===i)throw o;return h()}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var s=l(c,r);if(s){if(s===x)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===D)throw a=I,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=O;var u=n(e,t,r);if("normal"===u.type){if(a=r.done?I:L,u.arg===x)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=I,r.method="throw",r.arg=u.arg)}}}function l(e,t){var r=e.iterator[t.method];if(r===m){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=m,l(e,t),"throw"===t.method))return x;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var a=n(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,x;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=m),t.delegate=null,x):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,x)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function v(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[_];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=m,t.done=!0,t};return n.next=n}}return{next:h}}function h(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,E="function"===typeof Symbol?Symbol:{},_=E.iterator||"@@iterator",w=E.asyncIterator||"@@asyncIterator",R=E.toStringTag||"@@toStringTag",b="object"===typeof e,T=t.regeneratorRuntime;if(T)return void(b&&(e.exports=T));T=t.regeneratorRuntime=b?e.exports:{},T.wrap=r;var D="suspendedStart",L="suspendedYield",O="executing",I="completed",x={},F={};F[_]=function(){return this};var k=Object.getPrototypeOf,A=k&&k(k(p([])));A&&A!==y&&g.call(A,_)&&(F=A);var N=o.prototype=a.prototype=Object.create(F);i.prototype=N.constructor=o,o.constructor=i,o[R]=i.displayName="GeneratorFunction",T.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},T.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,R in e||(e[R]="GeneratorFunction")),e.prototype=Object.create(N),e},T.awrap=function(e){return{__await:e}},c(s.prototype),s.prototype[w]=function(){return this},T.AsyncIterator=s,T.async=function(e,t,n,a){var i=new s(r(e,t,n,a));return T.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},c(N),N[R]="Generator",N[_]=function(){return this},N.toString=function(){return"[object Generator]"},T.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},T.values=p,v.prototype={constructor:v,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&g.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=m)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return i.type="throw",i.arg=e,r.next=t,n&&(r.method="next",r.arg=m),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return t("end");if(a.tryLoc<=this.prev){var o=g.call(a,"catchLoc"),c=g.call(a,"finallyLoc");if(o&&c){if(this.prev<a.catchLoc)return t(a.catchLoc,!0);if(this.prev<a.finallyLoc)return t(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return t(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return t(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,x):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),x},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),d(r),x}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;d(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=m),x}}}(function(){return this}()||Function("return this")())},1154:function(e,t,r){"use strict";t.__esModule=!0;var n=r(25),a=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){return function(){var t=e.apply(this,arguments);return new a.default(function(e,r){function n(i,o){try{var c=t[i](o),s=c.value}catch(e){return void r(e)}if(!c.done)return a.default.resolve(s).then(function(e){n("next",e)},function(e){n("throw",e)});e(s)}return n("next")})}}},1155:function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.saveFavourite=t.saveEditNode=t.saveAddNode=t.loadTree=t.init=void 0;var a=r(0),i=function(e){return e&&e.__esModule?e:{default:e}}(a),o=r(1156),c=n(o),s=r(32),u=n(s),l=u.callApi;t.init=function(){var e=c.PAGE_INIT_URL;return l(e,"POST",{})},t.loadTree=function(e){var t=c.LOAD_TREE_URL;return l(t,"POST",{parentId:e})},t.saveAddNode=function(e){var t=c.ADD_FAVOURITE_DIR;return l(t,"POST",(0,i.default)({},e))},t.saveEditNode=function(e){var t=c.EDIT_FAVOURITE_DIR;return l(t,"POST",(0,i.default)({},e))},t.saveFavourite=function(e){var t=c.SAVE_FAVOURITE_FROM_PAGE;return l(t,"POST",(0,i.default)({},e))}},1156:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PAGE_INIT_URL="/api/myfavourite/init",t.SAVE_FAVOURITE_FROM_PAGE="/api/sysfavourite/addpage",t.LOAD_TREE_URL="/api/favourite/query",t.ADD_FAVOURITE_DIR="/api/favourite/add",t.EDIT_FAVOURITE_DIR="/api/favourite/edit",t.DELETE_FAVOURITE_DIR="/api/favourite/delete",t.SAVE_FAVOURITE_DIR="/api/favourite/save",t.LOAD_FAVOURITE_LIST="/api/sysfavourite/search",t.EDIT_IMPORTANT_LEVEL="/api/sysfavourite/editLevel",t.DELETE_FAVOURITE="/api/sysfavourite/delete",t.GET_FAVOURITE="/api/sysfavourite/get",t.EDIT_FAVOURITE="/api/sysfavourite/edit",t.MOVE_FAVOURITES="/api/sysfavourite/move",t.ADD_FAVOURITES="/api/sysfavourite/add"},937:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a,i,o,c=r(1151),s=n(c),u=r(1154),l=n(u),f=r(25),d=n(f),v=r(17),p=n(v),h=r(0),m=n(h),y=r(6),g=n(y),E=r(1),_=n(E),w=r(3),R=n(w),b=r(4),T=n(b),D=r(5),L=n(D),O=r(7),I=r(84),x=n(I),F=r(41),k=n(F),A=r(23),N=n(A),S=r(62),P=n(S),j=r(42),C=n(j),U=r(207),V=n(U),M=r(9),G=n(M),K=r(1155),B=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(K),W=r(10),q=n(W),z=G.default.getLabel,Q=O.Form.Item,Y={labelCol:{span:7},wrapperCol:{span:17}},J={expandedKeys:[],operatingKey:"",clickExpanded:!0,treeData:[]},H=(i=a=function(e){function t(e){(0,_.default)(this,t);var r=(0,T.default)(this,(t.__proto__||(0,g.default)(t)).call(this,e));o.call(r);var n=e.favname,a=e.favouritetype,i=e.link,c=e.objid,s=e.importantlevel;e.visible;return i||(i=location.pathname+location.hash),r.state={visible:!1,formData:{favname:n,favouritetype:a,link:i,objid:c,importantlevel:s},typeList:[],levelList:[],treeData:[],selectedKey:"0",expandedKeys:[],operatingKey:"",clickExpanded:!0,spinning:!0,tip:""+z(82275,"数据加载中,请稍候..."),initTreeData:[],loadedTreeData:[]},r}return(0,L.default)(t,e),(0,R.default)(t,[{key:"componentWillUpdate",value:function(e,t,r){this.props.onOpen&&this.props.onOpen(this.props.visible,e.visible)}},{key:"componentWillReceiveProps",value:function(e){var t=e.visible;if(this.setState({visible:t}),this.props.visible!=t&&t){var r=e.favname,n=e.favouritetype,a=e.link,i=e.objid,o=e.importantlevel;e.visible;a||(a=location.pathname+location.hash);var c={favname:r,favouritetype:n,link:a,objid:i,importantlevel:o};this.setState((0,m.default)({spinning:!0,tip:""+z(82275,"数据加载中,请稍候...")},J,{formData:c})),this.initForm(),this.loadTreedata("0")}}},{key:"componentDidUpdate",value:function(){jQuery(".fav-browser-container .wea-new-scroll").css({height:"100%"})}},{key:"componentDidMount",value:function(){jQuery(".fav-browser-container .wea-new-scroll").css({height:"100%"})}},{key:"componentWillUnmount",value:function(){this.intervalid&&window.clearInterval(this.intervalid)}},{key:"render",value:function(){var e=this.state,t=e.visible,r=e.spinning,n=e.tip,a=(e.treeData,""+z(22255,"添加收藏")),i={width:650,height:600},o=this.props.onClose,c=[React.createElement(O.Button,{onClick:this.submitData},z("826","确定")),React.createElement(O.Button,{onClick:o},z("31129","取消"))],s={visible:t,title:a,style:i,onCancel:o,buttons:c,loadCss:!0},u=this.getFormComp();return React.createElement(k.default,s,React.createElement("div",{className:"fav-browser-container"},React.createElement(O.Spin,{spinning:r,tip:n,size:"large",style:{height:"100%"}},u,React.createElement("div",{className:"fav-browser-directory"},React.createElement("div",{className:"fav-directory-title"},React.createElement("div",{className:"fav-directory-text"},z(22246,"目标位置")),React.createElement("div",{className:"fav-directory-btn",onClick:this.selectRoot},React.createElement(O.Button,{title:z(125058,"添加目录")},React.createElement(O.Icon,{type:"plus"})))),React.createElement("div",{className:"fav-browser-tree"},React.createElement(N.default,{height:363},this.getTreeComp()))))))}}]),t}(React.Component),o=function(){var e=this;this.initForm=function(){B.init().then(function(t){var r=t.typeList,n=t.favTypeMap,a=[];r.forEach(function(e){"0"!=e.id&&a.push(e)});var i=[];for(var o in n){var c={};c.id=o,c.name=n[o],i.push(c)}e.setState({typeList:[].concat(a),levelList:i})})},this.getRadios=function(e){return[].concat((0,p.default)(e)).map(function(e){return{key:e.id,showname:e.name,selected:e.selected}})},this.getSelect=function(t,r,n){var a=t.map(function(e){var t={};return t.key=e.id,t.showname=e.name,t}),i=2;return n&&(i=1),React.createElement(C.default,{options:a,value:r,viewAttr:i,onChange:e.saveFavouritetype})},this.saveFavName=function(t){e.state.formData.favname=t},this.saveImportantlevel=function(t){e.state.formData.importantlevel=t},this.saveFavouritetype=function(t){e.state.formData.favouritetype=t},this.getFormItems=function(){var t=e.state,r=t.typeList,n=t.levelList,a=t.formData,i=a.favname,o=a.favouritetype,c=(a.link,a.objid),s=a.importantlevel,u=void 0===s?1:s;u=String(u),o+="";var l=[];if(l.push(React.createElement(Q,(0,m.default)({},Y,{label:z("22426","收藏标题")}),React.createElement(P.default,{placeholder:z("385874","请输入收藏标题"),defaultValue:i,viewAttr:3,stringLength:3e3,onChange:e.saveFavName,onBlur:e.saveFavName}))),n.length>0){var f=e.getRadios(n);l.push(React.createElement(Q,(0,m.default)({},Y,{label:z("18178","重要程度")}),React.createElement(C.default,{value:u,onChange:e.saveImportantlevel,detailtype:3,options:f})))}if(r.length>0){c=Number(c);var d=!1;c>0&&(d=!0);var v=e.getSelect(r,o,d);l.push(React.createElement(Q,(0,m.default)({},Y,{label:z("22242","收藏类型")}),v))}return l},this.getFormComp=function(){var t=e.getFormItems();return React.createElement("div",{className:"fav-browser-top"},React.createElement("div",{className:"fav-form-title"},z("81711","基本信息")),React.createElement("div",{className:"fav-form-basic"},React.createElement(O.Form,{horizontal:!0},t)))},this.getTreeComp=function(){return React.createElement(V.default,{ref:"tree",addToLast:!0,hasRadio:!0,onDatasChange:function(t){e.setState({initTreeData:t})},radioCheckedKey:e.state.selectedKey,onRadioCheck:function(t,r){e.setState({selectedKey:r})},datas:e.state.initTreeData,loadData:function(t){return e.asyncLoad(t.nodeid)},onAdd:function(t,r){return e.addDirectory(void 0==r?"0":r.nodeid,t)},onEdit:function(t,r){return e.editDirectory(t,r)}})},this.addDirectory=function(e,t){return new d.default(function(r){B.saveAddNode({parentid:e,favname:t}).then(function(e){if(1==e.success){var n=[];n.push({nodeid:e.id,canClick:!0,icon:"",isParent:!1,name:t,dragDisabled:!0,ops:[{type:"edit"},{type:"add"}]}),r(n[0])}})})},this.editDirectory=function(e,t){var r=[],n="",a=t.nodeid,i=e;return t.parentTreeKey?(r=t.treeKey.split("__"),n=3==r.length?r[0]:r.slice(r.length-3,r.length-2).join().split("-")[1]):n="0",new d.default(function(e){B.saveEditNode({parentid:n,favid:a,favname:i}).then(function(t){if(1==t.success){var r=[];r.push({nodeid:t.id,canClick:!0,icon:"",isParent:!1,name:i,dragDisabled:!0,ops:-1==a?[]:[{type:"edit"},{type:"add"}]}),e(r[0])}})})},this.submitData=function(t){t.preventDefault();var r=e.state.formData;if(r){if(!r.favname)return void O.Modal.error({content:""+z(385876,"收藏标题不能为空!")});var n=e.state.selectedKey;if(""==n||"0"==n)return void O.Modal.error({content:""+z("385877","请选择一个目录!")});e.setState({spinning:!0,tip:""+z(82275,"数据加载中,请稍候...")});var a=e.state.formData,i=a.link,o=a.objid,c=(0,x.default)(r,{link:i,objid:o,dirid:n});B.saveFavourite(c).then(function(r){e.setState({spinning:!1});var n=r.success,a=r.msg;"1"==n?(e.setState({visible:!1}),e.props.onClose(t),e.props.submitBack&&e.props.submitBack(r)):a&&O.Modal.error({content:a})})}else for(var s in err){var u=err[s].errors;if(u.length>0){O.Modal.error({content:u[0].message});break}}},this.loadTreedata=function(t){return new d.default(function(r,n){B.loadTree(t).then(function(n){if(e.setState({spinning:!1}),"1"==n.success){var a=n.data,i=[];a.map(function(e,t){i.push({nodeid:e.favid,canClick:!0,icon:1==e.child?"icon-coms-LargeArea":"",isParent:1==e.child,name:e.favname,dragDisabled:!0,ops:-1==e.favid?[]:[{type:"edit"},{type:"add"}]})}),0==t?e.setState({initTreeData:i}):e.setState({loadedTreeData:i}),r(e.state.initTreeData)}})})},this.asyncLoad=function(t){function r(){return new d.default(function(e,r){e(n.loadTreedata(t))})}var n=e;return function(){var e=(0,l.default)(s.default.mark(function e(){return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:return e.abrupt("return",new d.default(function(e){e({datas:n.state.loadedTreeData})}));case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()()},this.selectRoot=function(){e.refs.tree.addRootNode()}},i);H.PropTypes={onClose:React.PropTypes.func.isRequired};var X=(0,q.default)(H,"WeaCollet");t.default=X}});
//# sourceMappingURL=12.chunk.js.map?v=eaebe0c2