text: webpackJsonp([12],{19:function(e,t,n){try{(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=[{value:"Integer",label:"整数字段"},{value:"Number",label:"数值字段"},{value:"Text",label:"文本框单行"},{value:"TextArea",label:"文本框多行"},{value:"RichTextEditor",label:"富文本"},{value:"Select",label:"选择列表(单行)"},{value:"MultiSelect",label:"选择列表(多行)"},{value:"CheckboxGroup",label:"复选按钮"},{value:"RadioGroup",label:"单选按钮"},{value:"DatePicker",label:"日期选择控件"},{value:"DateTimePicker",label:"日期时间选择控件"},{value:"TimeTracking",label:"时间跟踪"},{value:"File",label:"文件"},{value:"SingleVersion",label:"单一版本选择"},{value:"MultiVersion",label:"多版本选择"},{value:"SingleUser",label:"单一用户选择"},{value:"MultiUser",label:"多用户选择"},{value:"Url",label:"URL"}];t.FieldTypes=e;var n=[{id:"new",name:"新建"},{id:"inprogress",name:"进行中"},{id:"completed",name:"完成"}];t.StateCategories=n;var a={project:[{id:"view_project",name:"查看项目"},{id:"manage_project",name:"管理项目"}],issue:[{id:"create_issue",name:"创建问题"},{id:"edit_issue",name:"编辑问题"},{id:"edit_self_issue",name:"编辑自己创建的问题"},{id:"delete_issue",name:"删除问题"},{id:"delete_self_issue",name:"删除自己创建的问题"},{id:"assign_issue",name:"分配问题"},{id:"assigned_issue",name:"被分配问题"},{id:"resolve_issue",name:"解决问题"},{id:"close_issue",name:"关闭问题"},{id:"reset_issue",name:"重置问题"},{id:"link_issue",name:"链接问题"},{id:"move_issue",name:"移动问题"},{id:"exec_workflow",name:"执行流程"}],comments:[{id:"add_comments",name:"添加评论"},{id:"edit_comments",name:"编辑评论"},{id:"edit_self_comments",name:"编辑自己的评论"},{id:"delete_comments",name:"删除评论"},{id:"delete_self_comments",name:"删除自己的评论"}],worklogs:[{id:"add_worklog",name:"添加工作日志"},{id:"edit_worklog",name:"编辑工作日志"},{id:"edit_self_worklog",name:"编辑自己的工作日志"},{id:"delete_worklog",name:"删除工作日志"},{id:"delete_self_worklog",name:"删除自己的工作日志"}],files:[{id:"upload_file",name:"上传附件"},{id:"download_file",name:"下载附件"},{id:"remove_file",name:"删除附件"},{id:"remove_self_file",name:"删除自己上传附件"}]};t.Permissions=a;var r=[{id:"create_issue",name:"创建问题"},{id:"edit_issue",name:"编辑问题"},{id:"del_issue",name:"删除问题"},{id:"resolve_issue",name:"解决问题"},{id:"close_issue",name:"关闭问题"},{id:"reopen_issue",name:"重新打开问题"},{id:"create_version",name:"创建版本"},{id:"edit_version",name:"编辑版本"},{id:"release_version",name:"发布版本"},{id:"merge_version",name:"合并版本"},{id:"del_version",name:"删除版本"},{id:"add_worklog",name:"添加工作日志"},{id:"edit_worklog",name:"编辑工作日志"}];t.webhookEvents=r;var o={CARD:"card",KANBAN_COLUMN:"kanban_column",KANBAN_FILTER:"kanban_filter"};t.CardTypes=o;var l=["#CCCCCC","#B3B3B3","#999999","#A4DD00","#68BC00","#006600","#73D8FF","#009CE0","#0062B1","#FCDC00","#FCC400","#FB9E00","#FE9200","#E27300","#C45100","#F44E3B","#D33115","#9F0500"];t.PriorityRGBs=l;var i=["#CCCCCC","#B3B3B3","#999999","#808080","#666666","#FDA1FF","#FA28FF","#AB149E","#AEA1FF","#7B64FF","#653294","#73D8FF","#009CE0","#0062B1","#68CCCA","#16A5A5","#0C797D","#A4DD00","#68BC00","#006600","#DBDF00","#B0BC00","#808900","#FCDC00","#FCC400","#FB9E00","#FE9200","#E27300","#C45100","#F44E3B","#D33115","#9F0500","#4D4D4D","#333333","#000000"];t.LabelRGBs=i;var s=600;t.DetailMinWidth=s;var u=1e3;t.DetailMaxWdith=u}).call(this)}finally{}},1829:function(e,t,n){try{(function(){"use strict";function a(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}function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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)}function i(e){return{actions:(0,m.bindActionCreators)(h,e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),d=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},c=n(1),f=r(c),p=n(21),m=n(22),y=n(2070),h=a(y),v=n(1835),b=n(1836),g=function(e){function t(e){o(this,n),d(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.pid=""}l(t,e),u(t,[{key:"index",value:function(){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,regeneratorRuntime.awrap(this.props.actions.index(this.pid));case 2:return e.abrupt("return",this.props.field.ecode);case 3:case"end":return e.stop()}},null,this)}},{key:"create",value:function(e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(this.props.actions.create(this.pid,e));case 2:return t.abrupt("return",this.props.field.ecode);case 3:case"end":return t.stop()}},null,this)}},{key:"update",value:function(e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(this.props.actions.update(this.pid,e));case 2:return t.abrupt("return",this.props.field.ecode);case 3:case"end":return t.stop()}},null,this)}},{key:"del",value:function(e){var t;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t=this.props.actions,n.next=3,regeneratorRuntime.awrap(t.del(this.pid,e));case 3:return n.abrupt("return",this.props.field.ecode);case 4:case"end":return n.stop()}},null,this)}},{key:"viewUsed",value:function(e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(this.props.actions.viewUsed(this.pid,e));case 2:return t.abrupt("return",this.props.field.ecode);case 3:case"end":return t.stop()}},null,this)}},{key:"componentWillMount",value:function(){var e=this.props.location.pathname,t=void 0===e?"":e;if(/^\/admin\/scheme/.test(t))this.pid="$_sys_$";else{var n=this.props.params.key;this.pid=n}}},{key:"render",value:function(){var e=this.props.location.pathname,t=void 0===e?"":e;return f.default.createElement("div",null,f.default.createElement(v,s({isSysConfig:/^\/admin\/scheme/.test(t),create:this.create.bind(this),i18n:this.props.i18n},this.props.field)),f.default.createElement(b,s({isSysConfig:/^\/admin\/scheme/.test(t),pkey:this.pid,index:this.index.bind(this),select:this.props.actions.select,update:this.update.bind(this),del:this.del.bind(this),delNotify:this.props.actions.delNotify,viewUsed:this.viewUsed.bind(this),i18n:this.props.i18n},this.props.field)))}}],[{key:"propTypes",value:{actions:c.PropTypes.object.isRequired,location:c.PropTypes.object.isRequired,params:c.PropTypes.object.isRequired,i18n:c.PropTypes.object.isRequired,field:c.PropTypes.object.isRequired},enumerable:!0}]);var n=t;return t=(0,p.connect)(function(e){var t=e.i18n,n=e.field;return{i18n:t,field:n}},i)(t)||t}(c.Component);t.default=g,e.exports=t.default}).call(this)}finally{}},1830:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),s=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},u=n(1),d=a(u),c=n(8),f=n(2),p=n(7),m=a(p),y=n(3),h=a(y),v=n(5),b=n(19),g=n(4),E=function(e,t){var n={};e.name||(n.name="必填");var a=["id","type","state","assignee","reporter","modifier","resolver","closer","created_at","updated_at","resolved_at","closed_at","regression_times","his_resolvers","resolved_logs","no","schema","parent_id","parent","subtasks","links","entry_id","definition_id","comments_num","worklogs_num","gitcommits_num","sprint","sprints","filter","from","from_kanban_id","limit","page","orderBy","stat_x","stat_y","stat_time","stat_dimension","is_accu","interval","recorded_at","scale","requested_at"];return e.key?(h.default.forEach(t.collection,function(e){a.push(e.key),"TimeTracking"===e.type?a.push(e.key+"_m"):"MultiUser"===e.type&&a.push(e.key+"_ids")}),a.indexOf(e.key)!==-1&&(n.key="该键值已存在或已被系统使用"),e.type&&("TimeTracking"===e.type&&a.indexOf(e.key+"_m")!==-1||"MultiUser"===e.type&&a.indexOf(e.key+"_m")!==-1)&&(n.key="该键值已存在或已被系统使用")):n.key="必填",e.type||(n.type="必填"),n},C=function(e){function t(e){r(this,n),s(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.state={ecode:0},this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}o(t,e),i(t,[{key:"handleSubmit",value:function(){var e,t,n,a,r;return regeneratorRuntime.async(function(o){for(;;)switch(o.prev=o.next){case 0:return e=this.props,t=e.values,n=e.create,a=e.close,o.next=6,regeneratorRuntime.awrap(n(t));case 6:r=o.sent,0===r?(this.setState({ecode:0}),a(),v.notify.show("新建完成。","success",2e3)):this.setState({ecode:r});case 8:case"end":return o.stop()}},null,this)}},{key:"handleCancel",value:function(){var e=this.props,t=e.close,n=e.submitting;n||(this.setState({ecode:0}),t())}},{key:"render",value:function(){var e=this.props,t=e.i18n.errMsg,n=e.isSysConfig,a=e.fields,r=a.name,o=a.key,i=a.type,s=a.applyToTypes,u=a.description,c=e.handleSubmit,p=e.invalid,y=e.options,v=e.submitting,E=h.default.map(y.types||[],function(e){return{label:e.name,value:e.id}});return d.default.createElement(f.Modal,{show:!0,onHide:this.handleCancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},d.default.createElement(f.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},d.default.createElement(f.Modal.Title,{id:"contained-modal-title-la"},"创建字段")),d.default.createElement("form",{onSubmit:c(this.handleSubmit),onKeyDown:function(e){13==e.keyCode&&e.preventDefault()}},d.default.createElement(f.Modal.Body,null,d.default.createElement(f.FormGroup,{controlId:"formControlsText",validationState:r.touched&&r.error?"error":null},d.default.createElement(f.ControlLabel,null,d.default.createElement("span",{className:"txt-impt"},"*"),"字段名"),d.default.createElement(f.FormControl,l({disabled:v,type:"text"},r,{placeholder:"字段名"})),r.touched&&r.error&&d.default.createElement(f.HelpBlock,{style:{"float":"right"}},r.error)),d.default.createElement(f.FormGroup,{controlId:"formControlsText",validationState:o.touched&&o.error?"error":null},d.default.createElement(f.ControlLabel,null,d.default.createElement("span",{className:"txt-impt"},"*"),"键值"),d.default.createElement(f.FormControl,l({disabled:v,type:"text"},o,{placeholder:"键值唯一"})),o.touched&&o.error&&d.default.createElement(f.HelpBlock,{style:{"float":"right"}},o.error)),d.default.createElement(f.FormGroup,{controlId:"formControlsSelect",validationState:i.touched&&i.error?"error":null},d.default.createElement(f.ControlLabel,null,d.default.createElement("span",{className:"txt-impt"},"*"),"类型"),d.default.createElement(m.default,{disabled:v,options:b.FieldTypes,simpleValue:!0,value:i.value,onChange:function(e){i.onChange(e)},placeholder:"请选择字段类型",clearable:!1}),i.touched&&i.error&&d.default.createElement(f.HelpBlock,{style:{"float":"right"}},i.error)),d.default.createElement(f.FormGroup,{controlId:"formControlsSelect",style:{display:n?"none":""}},d.default.createElement(f.ControlLabel,null,"适用类型"),d.default.createElement(m.default,{disabled:v,multi:!0,options:E,simpleValue:!0,value:s.value||null,onChange:function(e){s.onChange(e)},placeholder:"默认全部"})),d.default.createElement(f.FormGroup,{controlId:"formControlsText"},d.default.createElement(f.ControlLabel,null,"描述"),d.default.createElement(f.FormControl,l({disabled:v,type:"text"},u,{placeholder:"描述内容"})))),d.default.createElement(f.Modal.Footer,null,d.default.createElement("span",{className:"ralign"},0!==this.state.ecode&&!v&&t[this.state.ecode]),d.default.createElement("img",{src:g,className:v?"loading":"hide"}),d.default.createElement(f.Button,{disabled:v||p,type:"submit"},"确定"),d.default.createElement(f.Button,{bsStyle:"link",disabled:v,onClick:this.handleCancel},"取消"))))}}],[{key:"propTypes",value:{i18n:u.PropTypes.object.isRequired,isSysConfig:u.PropTypes.bool,submitting:u.PropTypes.bool,invalid:u.PropTypes.bool,options:u.PropTypes.object,values:u.PropTypes.object,fields:u.PropTypes.object,handleSubmit:u.PropTypes.func.isRequired,close:u.PropTypes.func.isRequired,create:u.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,c.reduxForm)({form:"field",fields:["name","key","type","applyToTypes","description"],validate:E})(t)||t}(u.Component);t.default=C,e.exports=t.default}).call(this)}finally{}},1831:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),s=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},u=n(1),d=a(u),c=n(8),f=(n(13),n(2)),p=n(7),m=a(p),y=n(66),h=a(y),v=n(3),b=a(v),g=n(5),E=n(6),C=n(4),w=function(e,t){var n=t.data,a={};return"Number"===n.type?e.defaultValue&&isNaN(e.defaultValue)&&(a.defaultValue="格式错误"):"Integer"===n.type?!e.defaultValue||!isNaN(e.defaultValue)&&/^-?\d+$/.test(e.defaultValue)||(a.defaultValue="格式错误"):"DatePicker"===n.type&&e.defaultValue&&!E(e.defaultValue).isValid()&&(a.defaultValue="格式错误"),e.minValue&&isNaN(e.minValue)&&(a.minValue="格式错误"),e.maxValue&&isNaN(e.maxValue)&&(a.minValue="格式错误"),(e.minValue||0===e.minValue)&&(e.maxValue||0===e.maxValue)&&parseFloat(e.minValue)>parseFloat(e.maxValue)&&(a.minValue="最小值不能大于最大值"),!e.maxLength&&0!==e.maxLength||/^\d+$/.test(e.maxLength)&&!(parseInt(e.maxLength)<1)||(a.maxLength="请输入大于1的整数"),a},_=function(e){function t(e){r(this,n),s(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.state={ecode:0},this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}o(t,e),i(t,[{key:"componentWillMount",value:function(){var e=this.props,t=e.initializeForm,n=e.data;"MultiSelect"!==n.type&&"CheckboxGroup"!==n.type||!b.default.isArray(n.defaultValue)?"DatePicker"===n.type&&n.defaultValue&&(n.defaultValue=E.unix(n.defaultValue)):n.defaultValue=n.defaultValue&&n.defaultValue.join(","),t(n)}},{key:"handleSubmit",value:function(){var e,t,n,a,r,o,l;return regeneratorRuntime.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e=this.props,t=e.values,n=e.config,a=e.close,r=e.data,o={},t.defaultValue&&"DatePicker"===r.type?o.defaultValue=parseInt(E(t.defaultValue).startOf("day").format("X")):o.defaultValue=t.defaultValue,i.next=9,regeneratorRuntime.awrap(n(t));case 9:l=i.sent,0===l?(this.setState({ecode:0}),a(),g.notify.show("设置完成。","success",2e3)):this.setState({ecode:l});case 11:case"end":return i.stop()}},null,this)}},{key:"handleCancel",value:function(){var e=this.props,t=e.close,n=e.submitting;n||(this.setState({ecode:0}),t())}},{key:"render",value:function(){var e=this.props,t=e.i18n.errMsg,n=e.fields,a=n.id,r=n.defaultValue,o=n.maxValue,i=n.minValue,s=n.maxLength,u=e.dirty,c=e.handleSubmit,p=e.invalid,y=e.submitting,v=e.data,g=[],E={};return["Select","MultiSelect","CheckboxGroup","RadioGroup"].indexOf(v.type)!==-1?(v.optionValues&&(g=b.default.map(v.optionValues||[],function(e){return{label:e.name,value:e.id}})),E=d.default.createElement(m.default,{options:g,simpleValue:!0,multi:"CheckboxGroup"===v.type||"MultiSelect"===v.type,value:r.value||null,onChange:function(e){r.onChange(e)},placeholder:"设置默认值"})):E="TextArea"===v.type||"RichTextEditor"===v.type?d.default.createElement(f.FormControl,l({componentClass:"textarea"},r,{placeholder:"输入默认值"})):"DatePicker"===v.type?d.default.createElement(h.default,{style:{width:"80%"},locale:"zh-cn",mode:"date",closeOnSelect:!0,dateFormat:"YYYY/MM/DD",timeFormat:!1,value:r.value,onChange:function(e){r.onChange(e)}}):d.default.createElement(f.FormControl,l({type:"Number"===v.type?"number":"text"},r,{placeholder:"输入默认值"})),d.default.createElement(f.Modal,{show:!0,onHide:this.handleCancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},d.default.createElement(f.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},d.default.createElement(f.Modal.Title,{id:"contained-modal-title-la"},"字段属性配置 - "+v.name)),d.default.createElement("form",{onSubmit:c(this.handleSubmit),onKeyDown:function(e){13==e.keyCode&&e.preventDefault()}},d.default.createElement(f.Modal.Body,null,d.default.createElement(f.FormGroup,{validationState:r.value&&r.error?"error":null},d.default.createElement(f.FormControl,l({type:"hidden"},a)),d.default.createElement(f.ControlLabel,null,"默认值"),E,r.error&&d.default.createElement(f.HelpBlock,null,r.error)),("Number"===v.type||"Integer"===v.type)&&d.default.createElement("div",null,d.default.createElement(f.FormGroup,{style:{width:"45%",display:"inline-block"},validationState:i.value&&i.error?"error":null},d.default.createElement(f.ControlLabel,null,"最小值"),d.default.createElement(f.FormControl,l({type:"Number"},i,{placeholder:"输入最小值"})),i.error&&d.default.createElement(f.HelpBlock,null,i.error)),d.default.createElement(f.FormGroup,{style:{width:"45%",display:"inline-block","float":"right"},validationState:o.value&&o.error?"error":null},d.default.createElement(f.ControlLabel,null,"最大值"),d.default.createElement(f.FormControl,l({type:"Number"},o,{placeholder:"输入最大值"})),o.error&&d.default.createElement(f.HelpBlock,null,o.error))),("TextArea"==v.type||"Text"==v.type||"RichTextEditor"==v.type)&&d.default.createElement(f.FormGroup,{style:{width:"45%"},validationState:s.value&&s.error?"error":null},d.default.createElement(f.ControlLabel,null,"最大长度"),d.default.createElement(f.FormControl,l({type:"Number"},s,{placeholder:"输入最大长度，默认不限制"})),s.error&&d.default.createElement(f.HelpBlock,null,s.error))),d.default.createElement(f.Modal.Footer,null,d.default.createElement("span",{className:"ralign"},0!==this.state.ecode&&!y&&t[this.state.ecode]),d.default.createElement("img",{src:C,className:y?"loading":"hide"}),d.default.createElement(f.Button,{disabled:y||!u||p,type:"submit"},"确定"),d.default.createElement(f.Button,{bsStyle:"link",disabled:y,onClick:this.handleCancel},"取消"))))}}],[{key:"propTypes",value:{i18n:u.PropTypes.object.isRequired,optionValues:u.PropTypes.array,submitting:u.PropTypes.bool,invalid:u.PropTypes.bool,dirty:u.PropTypes.bool,values:u.PropTypes.object,fields:u.PropTypes.object,handleSubmit:u.PropTypes.func.isRequired,config:u.PropTypes.func.isRequired,data:u.PropTypes.object.isRequired,initializeForm:u.PropTypes.func.isRequired,close:u.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,c.reduxForm)({form:"field",fields:["id","defaultValue","maxValue","minValue","maxLength"],validate:w})(t)||t}(u.Component);t.default=_,e.exports=t.default}).call(this)}finally{}},1832:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(2),c=n(5),f=function(e){function t(e){r(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.confirm=this.confirm.bind(this),this.cancel=this.cancel.bind(this)}return o(t,e),l(t,[{key:"confirm",value:function(){var e,t,n,a,r;return regeneratorRuntime.async(function(o){for(;;)switch(o.prev=o.next){case 0:return e=this.props,t=e.close,n=e.del,a=e.data,t(),o.next=7,regeneratorRuntime.awrap(n(a.id));case 7:r=o.sent,0===r?c.notify.show("删除完成。","success",2e3):c.notify.show("删除失败。","error",2e3);case 9:case"end":return o.stop()}},null,this)}},{key:"cancel",value:function(){var e=this.props.close;e()}},{key:"render",value:function(){var e=this.props.data;return u.default.createElement(d.Modal,{show:!0,onHide:this.cancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},u.default.createElement(d.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},u.default.createElement(d.Modal.Title,{id:"contained-modal-title-la"},"删除字段 - ",e.name)),u.default.createElement(d.Modal.Body,null,"该字段被删除后，问题中相关字段信息都将被删除，且不可恢复，请慎重。",u.default.createElement("br",null),"确认要删除此字段？"),u.default.createElement(d.Modal.Footer,null,u.default.createElement(d.Button,{onClick:this.confirm},"确定"),u.default.createElement(d.Button,{bsStyle:"link",onClick:this.cancel},"取消")))}}],[{key:"propTypes",value:{close:s.PropTypes.func.isRequired,del:s.PropTypes.func.isRequired,data:s.PropTypes.object.isRequired},enumerable:!0}]),t}(s.Component);t.default=f,e.exports=t.default}).call(this)}finally{}},1833:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(2),c=n(13),f=n(34),p=n(19),m=n(18),y={beginDrag:function(e){return{id:e.id,index:e.index}}},h={hover:function(e,t,n){var a=t.getItem().index,r=e.index;if(a!==r){var o=(0,c.findDOMNode)(n).getBoundingClientRect(),l=(o.bottom-o.top)/2,i=t.getClientOffset(),s=i.y-o.top;a<r&&s<l||a>r&&s>l||(e.move(a,r),t.getItem().index=r)}}},v=function(e){function t(e){r(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.state={editing:!1,touched:!1,hasErr:!1,text:""},this.save=this.save.bind(this)}o(t,e),l(t,[{key:"save",value:function(){var e=this.props,t=e.edit,n=e.index,a=e.id,r=t(n,a,this.state.text);r?this.setState({editing:!1,hasErr:!1}):this.setState({hasErr:!0})}},{key:"edit",value:function(){var e,t,n,a;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e=this.props,t=e.index,n=e.id,a=e.text,this.props.addEditingCards(n),r.next=7,regeneratorRuntime.awrap(this.setState({text:a,touched:!0,hasErr:!1,editing:!0}));case 7:m("#input-optionvalue-"+t).select();case 8:case"end":return r.stop()}},null,this)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,a=t.isDragging,r=t.connectDragSource,o=t.connectDropTarget,l=t.index,i=t.isEdited,s=void 0!==i&&i,c=t.edit,f=t.undo,p=t.del,m=a?0:1,y={"float":"right",cursor:"pointer",marginLeft:"5px"};return r(o(u.default.createElement("div",{style:{opacity:m},className:"dragcard"},this.state.editing?u.default.createElement("div",{style:{width:"100%"}},u.default.createElement(d.FormGroup,{style:{marginBottom:"0px"},validationState:this.state.touched&&this.state.hasErr?"error":null},u.default.createElement(d.FormControl,{id:"input-optionvalue-"+l,style:{height:"21px",fontSize:"10px"},type:"text",value:this.state.text,onKeyDown:function(t){"13"==t.keyCode&&(e.setState({touched:!0}),e.save())},onChange:function(t){e.setState({text:t.target.value,touched:!1})},onBlur:function(){e.setState({touched:!0}),e.save()},placeholder:"输入可选值"}))):u.default.createElement("span",null,n,s?u.default.createElement("span",{style:{color:"red"}}," - 已编辑"):""),!!p&&!this.state.editing&&u.default.createElement("span",{style:y,onClick:p,title:"删除",className:"rm-icon"},u.default.createElement("i",{className:"fa fa-remove"})),s&&!this.state.editing&&u.default.createElement("span",{style:y,onClick:function(){f(l)},title:"重置",className:"rm-icon"},u.default.createElement("i",{className:"fa fa-undo"})),!!c&&!this.state.editing&&u.default.createElement("span",{style:y,onClick:this.edit.bind(this),title:"编辑",className:"rm-icon"},u.default.createElement("i",{className:"fa fa-edit"})))))}}],[{key:"propTypes",value:{connectDragSource:s.PropTypes.func.isRequired,connectDropTarget:s.PropTypes.func.isRequired,index:s.PropTypes.number.isRequired,isDragging:s.PropTypes.bool.isRequired,id:s.PropTypes.any.isRequired,text:s.PropTypes.string.isRequired,del:s.PropTypes.func.isRequired,isEdited:s.PropTypes.bool,addEditingCards:s.PropTypes.func.isRequired,edit:s.PropTypes.func.isRequired,undo:s.PropTypes.func,move:s.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,f.DragSource)(p.CardTypes.CARD,y,function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging()}})(t)||t,t=(0,f.DropTarget)(p.CardTypes.CARD,h,function(e){return{connectDropTarget:e.dropTarget()}})(t)||t}(s.Component);t.default=v,e.exports=t.default}).call(this)}finally{}},1834:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),s=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},u=n(1),d=a(u),c=n(8),f=n(2),p=n(7),m=a(p),y=n(3),h=a(y),v=n(5),b=n(4),g=function(e){var t={};return e.name||(t.name="必填"),t},E=function(e){function t(e){r(this,n),s(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.state={ecode:0},this.handleSubmit=this.handleSubmit.bind(this),this.handleCancel=this.handleCancel.bind(this)}o(t,e),i(t,[{key:"componentWillMount",value:function(){var e=this.props,t=e.initializeForm,n=e.data;t(n)}},{key:"handleSubmit",value:function(){var e,t,n,a,r;return regeneratorRuntime.async(function(o){for(;;)switch(o.prev=o.next){case 0:return e=this.props,t=e.values,n=e.update,a=e.close,o.next=6,regeneratorRuntime.awrap(n(t));case 6:r=o.sent,0===r?(this.setState({ecode:0}),a(),v.notify.show("更新完成。","success",2e3)):this.setState({ecode:r});case 8:case"end":return o.stop()}},null,this)}},{key:"handleCancel",value:function(){var e=this.props,t=e.close,n=e.submitting;n||(this.setState({ecode:0}),t())}},{key:"render",value:function(){var e=this.props,t=e.i18n.errMsg,n=e.isSysConfig,a=e.fields,r=a.id,o=a.name,i=a.applyToTypes,s=a.description,u=e.dirty,c=e.handleSubmit,p=e.invalid,y=e.submitting,v=e.data,g=e.options,E=h.default.map(g.types||[],function(e){return{label:e.name,value:e.id}});return d.default.createElement(f.Modal,{show:!0,onHide:this.handleCancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},d.default.createElement(f.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},d.default.createElement(f.Modal.Title,{id:"contained-modal-title-la"},"编辑字段 - "+v.name)),d.default.createElement("form",{onSubmit:c(this.handleSubmit),onKeyDown:function(e){13==e.keyCode&&e.preventDefault()}},d.default.createElement(f.Modal.Body,null,d.default.createElement(f.FormGroup,{controlId:"formControlsText",validationState:o.touched&&o.error?"error":null},d.default.createElement(f.FormControl,l({type:"hidden"},r)),d.default.createElement(f.ControlLabel,null,d.default.createElement("span",{className:"txt-impt"},"*"),"字段名"),d.default.createElement(f.FormControl,l({disabled:y,type:"text"},o,{placeholder:"字段名"})),o.touched&&o.error&&d.default.createElement(f.HelpBlock,{style:{"float":"right"}},o.error)),d.default.createElement(f.FormGroup,{controlId:"formControlsSelect",style:{display:n?"none":""}},d.default.createElement(f.ControlLabel,null,"适用类型"),d.default.createElement(m.default,{
  disabled:y,multi:!0,options:E,simpleValue:!0,value:i.value,onChange:function(e){i.onChange(e)},placeholder:"默认全部",clearable:!1})),d.default.createElement(f.FormGroup,{controlId:"formControlsText"},d.default.createElement(f.ControlLabel,null,"描述"),d.default.createElement(f.FormControl,l({disabled:y,type:"text"},s,{placeholder:"描述内容"})))),d.default.createElement(f.Modal.Footer,null,d.default.createElement("span",{className:"ralign"},0!==this.state.ecode&&!y&&t[this.state.ecode]),d.default.createElement("img",{src:b,className:y?"loading":"hide"}),d.default.createElement(f.Button,{disabled:!u||y||p,type:"submit"},"确定"),d.default.createElement(f.Button,{bsStyle:"link",disabled:y,onClick:this.handleCancel},"取消"))))}}],[{key:"propTypes",value:{i18n:u.PropTypes.object.isRequired,isSysConfig:u.PropTypes.bool,submitting:u.PropTypes.bool,invalid:u.PropTypes.bool,options:u.PropTypes.object,dirty:u.PropTypes.bool,values:u.PropTypes.object,fields:u.PropTypes.object,handleSubmit:u.PropTypes.func.isRequired,close:u.PropTypes.func.isRequired,data:u.PropTypes.object.isRequired,initializeForm:u.PropTypes.func.isRequired,update:u.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,c.reduxForm)({form:"field",fields:["id","name","applyToTypes","description"],validate:g})(t)||t}(u.Component);t.default=E,e.exports=t.default}).call(this)}finally{}},1835:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(2),c=n(3),f=(a(c),n(1830)),p=(n(4),function(e){function t(e){r(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={createModalShow:!1},this.createModalClose=this.createModalClose.bind(this)}return o(t,e),l(t,[{key:"createModalClose",value:function(){this.setState({createModalShow:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.i18n,a=t.isSysConfig,r=t.create,o=t.indexLoading,l=t.collection,i=t.options;return u.default.createElement("div",null,u.default.createElement("div",{style:{marginTop:"5px"}},u.default.createElement(d.Button,{className:"create-btn",onClick:function(){e.setState({createModalShow:!0})},disabled:o},u.default.createElement("i",{className:"fa fa-plus"})," 新建字段")),u.default.createElement("div",{className:"info-col"},u.default.createElement("div",{className:"info-icon"},u.default.createElement("i",{className:"fa fa-info-circle"})),u.default.createElement("div",{className:"info-content"},u.default.createElement("span",null,"创建字段时键值必须唯一，且创建后键值不能改变。",u.default.createElement("br",null),"只能删除没有应用到界面",a&&"（包括各项目自定义界面）","中的字段。"))),this.state.createModalShow&&u.default.createElement(f,{show:!0,isSysConfig:a,close:this.createModalClose,create:r,collection:l,options:i,i18n:n}))}}],[{key:"propTypes",value:{i18n:s.PropTypes.object.isRequired,isSysConfig:s.PropTypes.bool,indexLoading:s.PropTypes.bool,collection:s.PropTypes.array,options:s.PropTypes.object,create:s.PropTypes.func.isRequired},enumerable:!0}]),t}(s.Component));t.default=p,e.exports=t.default}).call(this)}finally{}},1836:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(29),c=n(2),f=n(3),p=a(f),m=n(19),y=n(1834),h=n(1832),v=n(1837),b=n(1831),g=n(1838),E=n(4),C=["title","priority","resolution","assignee","module","comments","resolve_version","effect_versions","progress","expect_start_time","expect_complete_time","related_users","descriptions","epic","labels","original_estimate","story_points","attachments"],w=function(e){function t(e){r(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={editModalShow:!1,delNotifyShow:!1,viewUsedShow:!1,optionValuesConfigShow:!1,defaultValueConfigShow:!1,operateShow:!1,hoverRowId:""},this.editModalClose=this.editModalClose.bind(this),this.delNotifyClose=this.delNotifyClose.bind(this),this.viewUsedClose=this.viewUsedClose.bind(this),this.optionValuesConfigClose=this.optionValuesConfigClose.bind(this),this.defaultValueConfigClose=this.defaultValueConfigClose.bind(this)}return o(t,e),l(t,[{key:"componentWillMount",value:function(){var e=this.props.index;e()}},{key:"editModalClose",value:function(){this.setState({editModalShow:!1})}},{key:"delNotifyClose",value:function(){this.setState({delNotifyShow:!1})}},{key:"viewUsedClose",value:function(){this.setState({viewUsedShow:!1})}},{key:"optionValuesConfigClose",value:function(){this.setState({optionValuesConfigShow:!1})}},{key:"defaultValueConfigClose",value:function(){this.setState({defaultValueConfigShow:!1})}},{key:"operateSelect",value:function(e){var t=this.state.hoverRowId,n=this.props.select;n(t),"1"===e&&this.setState({editModalShow:!0}),"2"===e&&this.setState({delNotifyShow:!0}),"3"===e&&this.setState({defaultValueConfigShow:!0}),"4"===e&&this.setState({optionValuesConfigShow:!0}),"6"===e&&this.setState({viewUsedShow:!0})}},{key:"onRowMouseOver",value:function(e){e.id!==this.state.hoverRowId&&this.setState({operateShow:!0,hoverRowId:e.id})}},{key:"onMouseLeave",value:function(){this.setState({operateShow:!1,hoverRowId:""})}},{key:"render",value:function(){for(var e=this.props,t=e.i18n,n=e.isSysConfig,a=e.pkey,r=e.collection,o=e.selectedItem,l=e.loading,i=e.indexLoading,s=e.itemLoading,f=e.del,w=e.update,_=e.viewUsed,x=e.usedProjects,T=e.options,k=this.state,P=k.operateShow,O=k.hoverRowId,S=u.default.createElement("span",null,u.default.createElement("i",{className:"fa fa-cog"})),j=[],M=r.length,F=0;F<M;F++){var R="$_sys_$"!==a&&"$_sys_$"===r[F].project_key;j.push({id:r[F].id,name:u.default.createElement("div",null,u.default.createElement("span",{className:"table-td-title"},r[F].name,R&&u.default.createElement("span",{style:{fontWeight:"normal"}}," (全局)")),r[F].description&&u.default.createElement("span",{className:"table-td-desc"},r[F].description)),key:r[F].key,type:p.default.find(m.FieldTypes,{value:r[F].type}).label,screen:u.default.createElement("ul",{style:{marginBottom:"0px",paddingLeft:"0px",listStyle:"none"}},p.default.isEmpty(r[F].screens)?"-":p.default.map(r[F].screens,function(e,t){return u.default.createElement("li",{key:t},e.name)})),operation:R||C.indexOf(r[F].key)!==-1?u.default.createElement("div",null," "):u.default.createElement("div",null,P&&O===r[F].id&&!s&&u.default.createElement(c.DropdownButton,{pullRight:!0,bsStyle:"link",style:{textDecoration:"blink",color:"#000"},title:S,key:F,id:"dropdown-basic-"+F,onSelect:this.operateSelect.bind(this)},["Select","MultiSelect","RadioGroup","CheckboxGroup"].indexOf(r[F].type)!==-1&&u.default.createElement(c.MenuItem,{eventKey:"4"},"可选值配置"),("Select.Async"===r[F].type||"MultiSelect.Async"===r[F].type)&&u.default.createElement(c.MenuItem,{eventKey:"5"},"数据源配置"),["File","SingleVersion","MultiVersion","SingleUser","MultiUser","TimeTracking","DateTimePicker"].indexOf(r[F].type)===-1&&u.default.createElement(c.MenuItem,{eventKey:"3"},"属性配置"),u.default.createElement(c.MenuItem,{eventKey:"1"},"编辑"),"$_sys_$"===a&&u.default.createElement(c.MenuItem,{eventKey:"6"},"查看项目应用"),!r[F].is_used&&u.default.createElement(c.MenuItem,{eventKey:"2"},"删除")),u.default.createElement("img",{src:E,className:s&&o.id===r[F].id?"loading":"hide"}))})}var D={};return i?D.noDataText=u.default.createElement("div",null,u.default.createElement("img",{src:E,className:"loading"})):D.noDataText="暂无数据显示。",D.onRowMouseOver=this.onRowMouseOver.bind(this),u.default.createElement("div",{style:{marginBottom:"30px"}},u.default.createElement(d.BootstrapTable,{data:j,bordered:!1,hover:!0,options:D,trClassName:"tr-top"},u.default.createElement(d.TableHeaderColumn,{dataField:"id",hidden:!0,isKey:!0},"ID"),u.default.createElement(d.TableHeaderColumn,{dataField:"name"},"名称"),u.default.createElement(d.TableHeaderColumn,{dataField:"key"},"键值"),u.default.createElement(d.TableHeaderColumn,{dataField:"type"},"类型"),u.default.createElement(d.TableHeaderColumn,{dataField:"screen"},"应用界面"),u.default.createElement(d.TableHeaderColumn,{width:"60",dataField:"operation"})),this.state.editModalShow&&u.default.createElement(y,{show:!0,isSysConfig:n,close:this.editModalClose,update:w,data:o,options:T,i18n:t}),this.state.viewUsedShow&&u.default.createElement(g,{show:!0,close:this.viewUsedClose,view:_,loading:l,data:o,projects:x,i18n:t}),this.state.delNotifyShow&&u.default.createElement(h,{show:!0,close:this.delNotifyClose,data:o,del:f}),this.state.optionValuesConfigShow&&u.default.createElement(v,{show:!0,close:this.optionValuesConfigClose,data:o,config:w,loading:l,i18n:t}),this.state.defaultValueConfigShow&&u.default.createElement(b,{show:!0,close:this.defaultValueConfigClose,data:o,config:w,loading:l,i18n:t}))}}],[{key:"propTypes",value:{i18n:s.PropTypes.object.isRequired,isSysConfig:s.PropTypes.bool,pkey:s.PropTypes.string.isRequired,collection:s.PropTypes.array.isRequired,options:s.PropTypes.object.isRequired,selectedItem:s.PropTypes.object.isRequired,loading:s.PropTypes.bool.isRequired,itemLoading:s.PropTypes.bool.isRequired,indexLoading:s.PropTypes.bool.isRequired,index:s.PropTypes.func.isRequired,select:s.PropTypes.func.isRequired,update:s.PropTypes.func.isRequired,viewUsed:s.PropTypes.func.isRequired,usedProjects:s.PropTypes.array.isRequired,del:s.PropTypes.func.isRequired},enumerable:!0}]),t}(s.Component);t.default=w,e.exports=t.default}).call(this)}finally{}},1837:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(13),c=n(2),f=n(34),p=n(85),m=a(p),y=n(54),h=a(y),v=n(3),b=a(v),g=n(5),E=n(1833),C=a(E),w=n(4),_=function(e){function t(e){r(this,n),i(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e),this.add=this.add.bind(this),this.state={cards:[],editingCards:[],ecode:0,sort:1,enableAdd:!1,addErr:!1};for(var t=this.props.data.optionValues||[],a=t.length,o=0;o<a;o++)this.state.cards.push({id:t[o].id,old_text:t[o].name,text:t[o].name});this.state.strCards=JSON.stringify(this.state.cards)}o(t,e),l(t,[{key:"save",value:function(){var e,t,n,a,r,o;return regeneratorRuntime.async(function(l){for(;;)switch(l.prev=l.next){case 0:return e=this.props,t=e.close,n=e.config,a=e.data,r=0,o={id:a.id,optionValues:b.default.map(this.state.cards,function(e){return{id:e.id,name:e.text}})},l.next=8,regeneratorRuntime.awrap(n(o));case 8:r=l.sent,0===r?(this.setState({ecode:0}),t(),g.notify.show("配置完成。","success",2e3)):this.setState({ecode:r});case 10:case"end":return l.stop()}},null,this)}},{key:"cancel",value:function(){var e=this.props,t=e.close,n=e.loading;n||t()}},{key:"sort",value:function(){var e=this.state.cards;1==this.state.sort?this.setState(e.sort(function(e,t){return e.text.localeCompare(t.text)})):this.setState(e.sort(function(e,t){return t.text.localeCompare(e.text)})),this.state.sort=-this.state.sort}},{key:"addEditingCards",value:function(e){this.state.editingCards.push(e),this.setState({editingCards:this.state.editingCards})}},{key:"undoCard",value:function(e){if(this.state.cards[e]&&this.state.cards[e].old_text){var t=b.default.findIndex(this.state.cards,{text:this.state.cards[e].old_text});t===e||t===-1?(this.state.cards[e].text=this.state.cards[e].old_text,this.setState({cards:this.state.cards})):g.notify.show("重置失败，可选值可能重复。","error",2e3)}}},{key:"editCard",value:function(e,t,n){n=b.default.trim(n);var a=b.default.findIndex(this.state.cards,{text:n});return(a===-1||this.state.cards[a].id===t)&&(this.state.editingCards=b.default.reject(this.state.editingCards,function(e){return e===t}),n?this.state.cards[e].text=n:this.state.cards.splice(e,1),this.setState({cards:this.state.cards,editingCards:this.state.editingCards}),!0)}},{key:"deleteCard",value:function(e){this.state.cards.splice(e,1),this.setState({cards:this.state.cards})}},{key:"handleChange",value:function(e){this.setState({addErr:!1});var t=b.default.trim(e.target.value);""===t?this.setState({enableAdd:!1}):b.default.findIndex(this.state.cards,function(e){return e.text===t})!==-1?this.setState({enableAdd:!1}):this.setState({enableAdd:!0})}},{key:"add",value:function(){var e=b.default.trim((0,d.findDOMNode)(this.refs.addOpt).value);e&&this.state.enableAdd?(this.state.cards.push({id:e,text:e}),this.setState({cards:this.state.cards}),(0,d.findDOMNode)(this.refs.addOpt).value="",this.setState({enableAdd:!1})):this.setState({addErr:!0})}},{key:"moveCard",value:function(e,t){var n=this.state.cards,a=n[e];this.setState((0,h.default)(this.state,{cards:{$splice:[[e,1],[t,0,a]]}}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.cards,a=t.editingCards,r=t.strCards,o=(t.enableAdd,this.props),l=o.i18n.errMsg,i=o.loading;return u.default.createElement(c.Modal,{show:!0,onHide:this.cancel.bind(this),backdrop:"static","aria-labelledby":"contained-modal-title-sm"},u.default.createElement(c.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},u.default.createElement(c.Modal.Title,{id:"contained-modal-title-la"},"字段可选值配置 - "+this.props.data.name)),u.default.createElement(c.Modal.Body,{style:{height:"420px",overflow:"auto"}},n.length>0&&u.default.createElement("div",{style:{marginTop:"-6px"}},"通过上下拖拽改变显示顺序。",u.default.createElement(c.Button,{bsStyle:"link",onClick:this.sort.bind(this)},"按字母排序")),n.length>0?n.map(function(t,n){return u.default.createElement(C.default,{key:t.id,all:e.state.cards,index:n,id:t.id,text:t.text,isEdited:t.old_text&&t.text!==t.old_text,addEditingCards:e.addEditingCards.bind(e),move:e.moveCard.bind(e),undo:e.undoCard.bind(e),edit:e.editCard.bind(e),del:e.deleteCard.bind(e,n)})}):u.default.createElement("div",{style:{paddingBottom:"6px"}},"可选值列表为空"),u.default.createElement(c.Form,{horizontal:!0},u.default.createElement(c.FormGroup,{controlId:"formControlsText",validationState:this.state.addErr?"error":null},u.default.createElement(c.Col,{sm:12},u.default.createElement(c.FormControl,{style:{marginTop:"5px"},type:"text",ref:"addOpt",placeholder:"输入可选值，回车即可添加",onChange:this.handleChange.bind(this),onKeyDown:function(t){"13"==t.keyCode&&(t.preventDefault(),e.add())}}))))),u.default.createElement(c.Modal.Footer,null,u.default.createElement("span",{className:"ralign"},0!==this.state.ecode&&!i&&l[this.state.ecode]),u.default.createElement("img",{src:w,className:i?"loading":"hide"}),u.default.createElement(c.Button,{disabled:!b.default.isEmpty(a)||i||r==JSON.stringify(n),onClick:this.save.bind(this)},"确定"),u.default.createElement(c.Button,{bsStyle:"link",disabled:i,onClick:this.cancel.bind(this)},"取消")))}}],[{key:"propTypes",value:{i18n:s.PropTypes.object.isRequired,loading:s.PropTypes.bool,config:s.PropTypes.func.isRequired,data:s.PropTypes.object.isRequired,close:s.PropTypes.func.isRequired},enumerable:!0}]);var n=t;return t=(0,f.DragDropContext)(m.default)(t)||t}(s.Component);t.default=_,e.exports=t.default}).call(this)}finally{}},1838:function(e,t,n){try{(function(){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=function(e,t,n){for(var a=!0;a;){var r=e,o=t,l=n;a=!1,null===r&&(r=Function.prototype);var i=Object.getOwnPropertyDescriptor(r,o);if(void 0!==i){if("value"in i)return i.value;var s=i.get;if(void 0===s)return;return s.call(l)}var u=Object.getPrototypeOf(r);if(null===u)return;e=u,t=o,n=l,a=!0,i=u=void 0}},s=n(1),u=a(s),d=n(2),c=n(20),f=n(3),p=a(f),m=n(4),y=function(e){function t(e){r(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.handleCancel=this.handleCancel.bind(this)}return o(t,e),l(t,[{key:"componentWillMount",value:function(){var e=this.props,t=e.view,n=e.data;t(n.id)}},{key:"handleCancel",value:function(){var e=this.props.close;e()}},{key:"render",value:function(){var e=this.props,t=e.projects,n=e.data,a=e.loading;return u.default.createElement(d.Modal,{show:!0,onHide:this.handleCancel,backdrop:"static","aria-labelledby":"contained-modal-title-sm"},u.default.createElement(d.Modal.Header,{closeButton:!0,style:{background:"#f0f0f0",height:"50px"}},u.default.createElement(d.Modal.Title,{id:"contained-modal-title-la"},"查看项目应用 - "+n.name)),u.default.createElement(d.Modal.Body,{style:{height:"420px",overflow:"auto"}},a&&u.default.createElement("div",{style:{marginTop:"150px",textAlign:"center"}},u.default.createElement("img",{src:m,className:"loading"})),!a&&u.default.createElement("div",{style:{marginBottom:"10px"}},t.length>0?u.default.createElement("span",null,"共有应用项目 ",u.default.createElement("strong",null,t.length)," 个"):u.default.createElement("span",null,"暂无项目应用")),!a&&t.length>0&&u.default.createElement(d.Table,{condensed:!0,hover:!0,responsive:!0},u.default.createElement("thead",null,u.default.createElement("tr",null,u.default.createElement("th",null,"项目名称"),u.default.createElement("th",null,"界面"))),u.default.createElement("tbody",null,p.default.map(t,function(e,t){return u.default.createElement("tr",{key:t},u.default.createElement("td",null,"active"===e.status?u.default.createElement("span",null,u.default.createElement(c.Link,{to:"/project/"+e.key},e.name)):u.default.createElement("span",null,e.name,"(已关闭)")),u.default.createElement("td",null,"active"===e.status?u.default.createElement("span",null,u.default.createElement("ul",{style:{marginBottom:"0px",paddingLeft:"0px",listStyle:"none"}},p.default.isEmpty(e.screens)?"-":p.default.map(e.screens,function(t,n){return u.default.createElement("li",{key:n},u.default.createElement(c.Link,{to:"/project/"+e.key+"/screen"},t.name))}))):u.default.createElement("span",null,u.default.createElement("ul",{style:{marginBottom:"0px",paddingLeft:"0px",listStyle:"none"}},p.default.isEmpty(e.screens)?"-":p.default.map(e.screens,function(e,t){return u.default.createElement("li",{key:t},e.name)})))))})))),u.default.createElement(d.Modal.Footer,null,u.default.createElement(d.Button,{onClick:this.handleCancel},"关闭")))}}],[{key:"propTypes",value:{close:s.PropTypes.func.isRequired,view:s.PropTypes.func.isRequired,loading:s.PropTypes.bool.isRequired,data:s.PropTypes.object.isRequired,projects:s.PropTypes.array.isRequired},enumerable:!0}]),t}(s.Component);t.default=y,e.exports=t.default}).call(this)}finally{}},2070:function(e,t,n){try{(function(){"use strict";function e(e){return(0,s.asyncFuncCreator)({constant:"FIELD_INDEX",promise:function(t){return t.request({url:"/project/"+e+"/field"})}})}function a(e,t){return(0,s.asyncFuncCreator)({constant:"FIELD_CREATE",promise:function(n){return n.request({url:"/project/"+e+"/field",method:"post",data:t})}})}function r(e,t){return(0,s.asyncFuncCreator)({constant:"FIELD_UPDATE",promise:function(n){return n.request({url:"/project/"+e+"/field/"+t.id,method:"put",data:t})}})}function o(e){return{type:"FIELD_SELECT",id:e}}function l(e,t){return(0,s.asyncFuncCreator)({constant:"FIELD_DELETE",id:t,promise:function(n){return n.request({url:"/project/"+e+"/field/"+t,method:"delete"})}})}function i(e,t){return(0,s.asyncFuncCreator)({constant:"FIELD_VIEW_USED",id:t,promise:function(n){return n.request({url:"/project/"+e+"/field/"+t+"/used"})}})}Object.defineProperty(t,"__esModule",{value:!0}),t.index=e,t.create=a,t.update=r,t.select=o,t.del=l,t.viewUsed=i;var s=n(26)}).call(this)}finally{}}});
  //# sourceMappingURL=field-2fafc167f8a6ebfe8dae.js.map