1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[64],{"+hnl":function(e,t,n){},"E+/Y":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpUrl=void 0;var r,o=n("JGtk"),a=(r=o)&&r.__esModule?r:{default:r};var u=JSON.parse(localStorage.chromesetting),i=u&&u.common.wiki,l=(0,a.default)(i);t.httpUrl=i;t.default=l},G99X:function(e,t,n){},H5Q0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(r=(u=i.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=document.createElement("div");function n(){u.unmountComponentAtNode(t)&&t.parentNode&&t.parentNode.removeChild(t)}document.body.appendChild(t),setTimeout((function(){u.render(a.default.createElement(c,{afterClose:n}),t)}))};var o=n("q1tI"),a=l(o),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("i8i4")),i=l(n("CWZq"));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=e.afterClose,n=(0,o.useState)(!0),u=r(n,2),l=u[0],c=u[1];return a.default.createElement(i.default,{isRender:l,Modifyloginvalue:function(){c(!1),t()}})}},JGtk:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKey=void 0;var r=l(n("TeRw")),o=l(n("tsqr"));t.default=function(e){window.location.href.indexOf("localhost")<0&&(a.default.defaults.withCredentials=!0);var t=a.default.create({baseURL:e,timeout:18e5});return t.interceptors.request.use((function(e){if(u.default.load(c)&&(e.headers.Authorization=u.default.load(c)),"3007"===window.location.port){var t=u.default.load(c);-1===e.url.indexOf("?")?e.url=e.url+"?token="+t:e.url=e.url+"&token="+t}return e}),(function(e){console.log(e)})),t.interceptors.response.use((function(e){var t=e||{};return 400===t.status?(o.default.error(t.data.message||"操作失败"),Promise.reject("error")):401===t.status?(o.default.error(t.data.message||"登录信息已过期"),Promise.reject("error")):403===t.status?(o.default.error(t.data.message||"无权限!"),Promise.reject("error")):40001===t.status?(r.default.open({message:"提示",description:"账户或密码错误!"}),Promise.reject("error")):200===e.status||200===t.status?e.data:void r.default.open({message:"提示",description:t.message})}),(function(e){console.log(e);var t=e.response||{};return 400===t.status?(o.default.error(t.data.message||"操作失败"),Promise.reject("error")):401===t.status?(o.default.error(t.data.message||"登录信息已过期"),(0,i.default)(),Promise.reject("error")):403===t.status?(o.default.error(t.data.message||"无权限!"),Promise.reject("error")):(r.default.open({message:"提示",description:e.message}),Promise.reject(e))})),t},n("O+I2"),n("8/o9");var a=l(n("vDqi")),u=l(n("Po8q")),i=l(n("H5Q0"));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.TokenKey="autologin_trustie"},MKzF:function(e,t,n){"use strict";n.r(t);n("SchZ"),n("+hnl")},"RS/3":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=b(n("2/Rp")),o=b(n("9yH6")),a=b(n("kaz8")),u=b(n("5rEg")),i=b(n("CtXQ")),l=b(n("tsqr")),c=b(n("Vl3Y")),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(r=(u=i.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("L/Qf"),n("K4yd"),n("MKzF"),n("1vPl"),n("2oDE"),n("8/o9"),n("tULf");var d=n("q1tI"),p=b(d),m=b(n("p7gc")),y=b(n("zBD+")),v=n("Rjun"),h=n("j/6D");function b(e){return e&&e.__esModule?e:{default:e}}n("j29u"),t.default=c.default.create()((function(e){var t=e.form,n=e.history,b=e.showNotification,g=e.projectDetail,k=e.match,O=e.project,w=g&&g.permission&&"Reporter"!==g.permission,j=t.getFieldDecorator,x=t.validateFields,C=t.setFieldsValue,E=(0,d.useState)(null),_=f(E,2),P=_[0],S=_[1],M=k.params.projectsId,N=k.params.owner,T=n.location.pathname.split("/").pop();"add"===T&&(T="");var V=(0,d.useState)(void 0),I=f(V,2),R=I[0],A=I[1],G=(0,d.useState)(!1),D=f(G,2),q=D[0],W=D[1],U=(0,d.useState)(),L=f(U,2),F=L[0],H=L[1];(0,d.useEffect)((function(){T&&O&&(0,h.getWiki)({owner:N,repo:M,pagename:T,projectId:O.id}).then((function(e){e&&e.data&&(A(e.data.md_content),C({name:e.data.name,content:e.data.md_content}))}))}),[N,T]),(0,d.useEffect)((function(){O&&(0,h.wikiPages)({owner:N,repo:M,projectId:O.id}).then((function(e){e&&"200"===e.message&&Array.isArray(e.data)?S(e.data):S([])}))}),[O]);var X=(0,d.useCallback)((function(e,t,n,r,o,a){return p.default.createElement(c.default.Item,{label:e,className:"mb0"},j(t,{rules:n,initialValue:o,validateFirst:!0})(r),a)}),[]);function z(e){e&&"200"===e.message?(b("操作成功"),K()):e&&"500"===e.message?l.default.error("请检查格式是否正确或文件名是否重复"):b(e.message||"操作失败")}function K(){n.push("/"+N+"/"+M+"/wiki")}function Q(e){"周报"===e?(A(v.weekModal),C({content:v.weekModal})):"月报"===e&&(A(v.monthModal),C({content:v.monthModal}))}return p.default.createElement("div",{className:"wiki-main"},p.default.createElement("div",{className:"wiki-head"},p.default.createElement("span",{className:"head-title"},p.default.createElement("span",{className:"back-wiki",onClick:K},"Wiki")," ",p.default.createElement(i.default,{type:"right"})," 编辑页面")),p.default.createElement("div",null,p.default.createElement("h4",{className:"mt20 mb0"},"标题"),X("","name",[{required:!0,message:"请输入标题"}],p.default.createElement(u.default,{placeholder:"请输入标题",className:"contact-input",maxLength:50})),p.default.createElement(c.default.Item,{className:"mb0 wiki-md"},p.default.createElement(m.default,{placeholder:"请输入wiki内容",height:500,mdID:"order-new-description",initValue:R,onChange:function(e){A(e),C({content:e})},className:"mt20"}),j("content",{rules:[{required:!0,message:"请输入wiki内容"}],validateFirst:!0})(p.default.createElement(u.default,{style:{display:"none"}}))),p.default.createElement(a.default,{checked:q,onChange:function(e){W(e.target.checked),e.target.checked||H()}},"添加模版"),p.default.createElement(o.default.Group,{onChange:function(e){var t=e.target.value;R?(0,y.default)({title:"添加模版",contentTitle:"您确定要添加“"+t+"”模板吗",content:"此操作会将“"+t+"”模板替换编辑栏内所有内容,请确认以防文件的丢失",okText:"确认添加",onOk:function(){H(t),W(!0),Q(t)}}):Q(t)},value:F},p.default.createElement(o.default,{value:"周报"},"周报"),p.default.createElement(o.default,{value:"月报"},"月报"))),w&&p.default.createElement(r.default,{className:"mt25",type:"primary",onClick:function(){x((function(e,t){if(!e){if(/[\[\]`\/:*?''<>|%-+_]/g.test(t.name))return void l.default.error("文件名不能有特殊字符");if(T)(0,h.updateWiki)(s({owner:N,repo:M,projectId:O.id,pagename:T},t,{commit_message:""})).then((function(e){return z(e)}));else{if(Array.isArray(P)){var n=!0,r=!1,o=void 0;try{for(var a,u=P[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){if(a.value.name===t.name)return l.default.error("不能与已有文件标题相同"),!1}}catch(e){r=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}}(0,h.addWiki)(s({owner:N,repo:M,projectId:O.id,pagename:t.name},t,{commit_message:""})).then((function(e){return z(e)}))}}}))}},"保存"))}))},Rjun:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monthModal=t.weekModal=t.editorConfig=void 0;var r=n("E+/Y");t.editorConfig={placeholder:"请输入",uploadImgServer:r.httpUrl+"/busiAttachments/upload",uploadFileName:"file",uploadImgHeaders:{"X-Requested-With":"XMLHttpRequest"},excludeMenus:["list","todo","emoticon","video"],uploadImgHooks:{customInsert:function(e,t){t&&t.data&&t.data.id&&e(r.httpUrl+"/busiAttachments/view/"+t.data.id)}}},t.weekModal="| 工作项目 | 本周工作计划 | 本周完成情况 |下周计划 | 待协同事项 |\n| ------------ | ------------ | ------------ | ------------ | ------------ |\n| | | | | |\n| | | | | |\n| | | | | |\n| | | | | |\n\n 备注:",t.monthModal="|工作项目 | 工作内容 | 项目进度情况 | 问题列表及解决方案| 下月工作计划 | 遗留未解决的问题 |\n| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ |\n| | | | | | |\n| | | | | | |\n| | | | | | |\n| | | | | | |\n\n 月度总结:"},"j/6D":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wikiPages=function(e){return(0,a.default)({url:"/api/wiki/wikiPages",method:"get",params:e})},t.getWiki=function(e){return(0,a.default)({url:"/api/wiki/getWiki",method:"get",params:e})},t.addWiki=function(e){return(0,a.default)({url:"/api/wiki/createWiki",method:"post",data:e})},t.updateWiki=function(e){return(0,a.default)({url:"/api/wiki/updateWiki",method:"PUT",data:e})},t.deleteWiki=function(e){return(0,a.default)({url:"/api/wiki/deleteWiki",method:"DELETE",data:e})};var r,o=n("E+/Y"),a=(r=o)&&r.__esModule?r:{default:r}},j29u:function(e,t,n){},kaz8:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("17x9"),a=n("VCL8"),u=n("TSYQ"),i=n.n(u),l=n("x1Ya"),c=n("Gytx"),s=n.n(c),f=n("H84U"),d=n("6CfX");function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?O(e):t}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(u,e);var t,n,o,a=g(u);function u(){var e;return v(this,u),(e=a.apply(this,arguments)).saveCheckbox=function(t){e.rcCheckbox=t},e.renderCheckbox=function(t){var n,o=t.getPrefixCls,a=O(e),u=a.props,c=a.context,s=u.prefixCls,f=u.className,d=u.children,p=u.indeterminate,v=u.style,h=u.onMouseEnter,b=u.onMouseLeave,g=j(u,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave"]),k=c.checkboxGroup,w=o("checkbox",s),x=y({},g);k&&(x.onChange=function(){g.onChange&&g.onChange.apply(g,arguments),k.toggleOption({label:d,value:u.value})},x.name=k.name,x.checked=-1!==k.value.indexOf(u.value),x.disabled=u.disabled||k.disabled);var C=i()(f,(m(n={},"".concat(w,"-wrapper"),!0),m(n,"".concat(w,"-wrapper-checked"),x.checked),m(n,"".concat(w,"-wrapper-disabled"),x.disabled),n)),E=i()(m({},"".concat(w,"-indeterminate"),p));return r.createElement("label",{className:C,style:v,onMouseEnter:h,onMouseLeave:b},r.createElement(l.a,y({},x,{prefixCls:w,className:E,ref:e.saveCheckbox})),void 0!==d&&r.createElement("span",null,d))},e}return t=u,(n=[{key:"componentDidMount",value:function(){var e=this.props.value,t=(this.context||{}).checkboxGroup,n=void 0===t?{}:t;n.registerValue&&n.registerValue(e),Object(d.a)("checked"in this.props||(this.context||{}).checkboxGroup||!("value"in this.props),"Checkbox","`value` is not validate prop, do you mean `checked`?")}},{key:"shouldComponentUpdate",value:function(e,t,n){return!s()(this.props,e)||!s()(this.state,t)||!s()(this.context.checkboxGroup,n.checkboxGroup)}},{key:"componentDidUpdate",value:function(e){var t=e.value,n=this.props.value,r=(this.context||{}).checkboxGroup,o=void 0===r?{}:r;n!==t&&o.registerValue&&o.cancelValue&&(o.cancelValue(t),o.registerValue(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.value,t=(this.context||{}).checkboxGroup,n=void 0===t?{}:t;n.cancelValue&&n.cancelValue(e)}},{key:"focus",value:function(){this.rcCheckbox.focus()}},{key:"blur",value:function(){this.rcCheckbox.blur()}},{key:"render",value:function(){return r.createElement(f.a,null,this.renderCheckbox)}}])&&h(t.prototype,n),o&&h(t,o),u}(r.Component);x.__ANT_CHECKBOX=!0,x.defaultProps={indeterminate:!1},x.contextTypes={checkboxGroup:o.any},Object(a.polyfill)(x);var C=x,E=n("BGR+");function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function S(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?R(e):t}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(u,e);var t,n,o,a=V(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,e)).cancelValue=function(e){t.setState((function(t){return{registeredValues:t.registeredValues.filter((function(t){return t!==e}))}}))},t.registerValue=function(e){t.setState((function(t){var n=t.registeredValues;return{registeredValues:[].concat(S(n),[e])}}))},t.toggleOption=function(e){var n=t.state.registeredValues,r=t.state.value.indexOf(e.value),o=S(t.state.value);-1===r?o.push(e.value):o.splice(r,1),"value"in t.props||t.setState({value:o});var a=t.props.onChange;if(a){var u=t.getOptions();a(o.filter((function(e){return-1!==n.indexOf(e)})).sort((function(e,t){return u.findIndex((function(t){return t.value===e}))-u.findIndex((function(e){return e.value===t}))})))}},t.renderGroup=function(e){var n=e.getPrefixCls,o=R(t),a=o.props,u=o.state,l=a.prefixCls,c=a.className,s=a.style,f=a.options,d=G(a,["prefixCls","className","style","options"]),p=n("checkbox",l),m="".concat(p,"-group"),y=Object(E.default)(d,["children","defaultValue","value","onChange","disabled"]),v=a.children;f&&f.length>0&&(v=t.getOptions().map((function(e){return r.createElement(C,{prefixCls:p,key:e.value.toString(),disabled:"disabled"in e?e.disabled:a.disabled,value:e.value,checked:-1!==u.value.indexOf(e.value),onChange:e.onChange,className:"".concat(m,"-item")},e.label)})));var h=i()(m,c);return r.createElement("div",P({className:h,style:s},y),v)},t.state={value:e.value||e.defaultValue||[],registeredValues:[]},t}return t=u,o=[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value||[]}:null}}],(n=[{key:"getChildContext",value:function(){return{checkboxGroup:{toggleOption:this.toggleOption,value:this.state.value,disabled:this.props.disabled,name:this.props.name,registerValue:this.registerValue,cancelValue:this.cancelValue}}}},{key:"shouldComponentUpdate",value:function(e,t){return!s()(this.props,e)||!s()(this.state,t)}},{key:"getOptions",value:function(){return this.props.options.map((function(e){return"string"==typeof e?{label:e,value:e}:e}))}},{key:"render",value:function(){return r.createElement(f.a,null,this.renderGroup)}}])&&N(t.prototype,n),o&&N(t,o),u}(r.Component);D.defaultProps={options:[]},D.propTypes={defaultValue:o.array,value:o.array,options:o.array.isRequired,onChange:o.func},D.childContextTypes={checkboxGroup:o.any},Object(a.polyfill)(D);var q=D;C.Group=q;t.default=C},"zBD+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n("kLXV")),o=s(n("2/Rp")),a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(r=(u=i.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){f(u({},e,{type:"delete"}))},t.Confirm=function(e){f(u({},e,{type:"confirm"}))},n("k3Gp"),n("L/Qf");var i=n("q1tI"),l=s(i),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n("i8i4"));function s(e){return e&&e.__esModule?e:{default:e}}function f(e){var t=e.type,n=e.afterClose,r=document.createElement("div");function o(){n&&n(),c.unmountComponentAtNode(r)&&r.parentNode&&r.parentNode.removeChild(r)}document.body.appendChild(r),setTimeout((function(){c.render(function(t){return"delete"===t?l.default.createElement(d,u({title:"删除",contentTitle:"确定要删除吗?",okText:"确认删除"},e,{afterClose:o,contentTitle:l.default.createElement(l.default.Fragment,null,l.default.createElement("i",{className:"red-circle iconfont icon-shanchu_tc_icon mr3"}),e.contentTitle)})):l.default.createElement(d,u({title:"选择",afterClose:o},e))}(t),r)}))}function d(e){var t=e.onCancel,n=e.onOk,u=e.title,c=e.contentTitle,s=e.content,f=e.okText,d=e.cancelText,p=e.afterClose,m=e.className,y=(0,i.useState)(!0),v=a(y,2),h=v[0],b=v[1];function g(){b(!1),t&&t()}return l.default.createElement(r.default,{visible:h,onCancel:g,afterClose:p,title:u,className:"myself-modal "+m,centered:!0,footer:[l.default.createElement(o.default,{type:"default",key:"back",onClick:g},d),l.default.createElement(o.default,{className:"foot-submit",key:"submit",onClick:function(){b(!1),n&&n()}},f)]},l.default.createElement("div",null,c&&l.default.createElement("p",{className:"content-title"},c),l.default.createElement("p",{className:"content-descibe"},s)))}n("G99X"),d.defaultProps={okText:"确认",cancelText:"取消",className:"",inputId:"copyText"}}}]); |