You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/public/react/dist/static/js/205.3d57b666.chunk.js

1 line
9.4 KiB

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[205],{2048:function(t,e,a){"use strict";a(259);var n=a(167),r=a(8),o=a(7),c=a(10),s=a(9),i=a(11),u=a(0),l=a.n(u),p=(a(12),a(6),function(t){function e(t){var a;return Object(r.a)(this,e),(a=Object(c.a)(this,Object(s.a)(e).call(this,t))).state={},a}return Object(i.a)(e,t),Object(o.a)(e,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var t=this,e=this.props,a=(e.match,e.columns),r=e.tableData;return r&&r.length?l.a.createElement("table",{className:"edu-pop-table-all edu-txt-center color-grey-6 interval-td",cellspacing:"0",cellpadding:"0"},l.a.createElement("tbody",null,l.a.createElement("tr",null,a.map((function(e,r){return 0==r?l.a.createElement("td",{className:"gaugeOutfit"},l.a.createElement("span",null,a[0][0]),l.a.createElement("span",null,a[0][1])):l.a.createElement(n.a,{title:e},l.a.createElement("td",null,t.props.columnName||"\u76ee\u6807",r))}))),r.map((function(e,a){var r=e.map((function(e,r){return 0==r?l.a.createElement(n.a,{title:e},l.a.createElement("td",null,"\u6307\u6807\u70b9",t.props.firstColIndexArray?t.props.firstColIndexArray[a]:a+1)):l.a.createElement(n.a,{title:e?"\u53d6\u6d88\u652f\u6491":"\u9009\u62e9\u652f\u6491"},l.a.createElement("td",{onClick:function(){return t.props.onCellClick(a,r,!!e)}},l.a.createElement("i",{className:"iconfont icon-gouxuan ".concat(e?"color-green":"color-grey-eb"," font-16 mr5")})))}));return l.a.createElement("tr",{className:"sustainLine editTd"},r)})))):""}}]),e}(u.Component));e.a=p},2312:function(t,e,a){"use strict";a.r(e);var n=a(4),r=a(30),o=a(38),c=a(8),s=a(7),i=a(10),u=a(9),l=a(11),p=a(0),d=a.n(p),f=(a(12),a(28)),m=a(6),y=a.n(m),b=a(2048),g=a(592),h=a.n(g),E=function(t){function e(t){var a;return Object(c.a)(this,e),(a=Object(i.a)(this,Object(u.a)(e).call(this,t))).init=function(){a.graduationRequirementsIdIndexMap={},a.trainingSubitemsIdIndexMap={},a.state.graduation_subitems.forEach((function(t,e){a.graduationRequirementsIdIndexMap[t.id]=e})),a.state.graduation_standards.forEach((function(t,e){a.trainingSubitemsIdIndexMap[t.id]=e+1}));var t=[],e=[];a.state.graduation_subitems.forEach((function(n,r){t.push([n.content].concat(Object(o.a)(Array(a.state.graduation_standards.length)))),e.push("".concat(n.position,"-").concat(n.graduation_requirement_position))})),a.state.subitem_support_standards.forEach((function(e){t[a.graduationRequirementsIdIndexMap[e.graduation_subitem_id]][a.trainingSubitemsIdIndexMap[e.graduation_standard_id]]=!0})),a.setState({tableData:t,firstColIndexArray:e})},a.onCellClick=function(t,e,n){var o=a.state.graduation_subitems[t].id,c=a.state.graduation_standards[e-1].id,s=a.props.match.params.yearId,i="/ec_years/".concat(s,"/subitem_support_standards.json");(n?y.a.delete:y.a.post)(i,n?{params:{ec_graduation_subitem_id:o,ec_graduation_standard_id:c}}:{ec_graduation_subitem_id:o,ec_graduation_standard_id:c}).then((function(o){0==o.data.status&&(a.setState((function(a){return{tableData:h()(a.tableData,Object(r.a)({},t,Object(r.a)({},e,{$set:!n})))}})),a.props.showNotification("".concat(n?"\u53d6\u6d88":"\u9009\u62e9","\u6210\u529f")))})).catch((function(t){}))},a.state={},a}return Object(l.a)(e,t),Object(s.a)(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.match.params.yearId,a="/ec_years/".concat(e,"/subitem_support_standards.json");y.a.get(a).then((function(e){e.data.graduation_subitems&&t.setState(Object(n.a)({},e.data),(function(){t.init()}))})).catch((function(t){}))}},{key:"render",value:function(){var t=this.props,e=(t.match,t.history,t.current_user,this.state),a=e.tableData,n=e.graduation_standards,r=(e.graduation_subitems,e.is_manager,e.firstColIndexArray),c=n&&[["\u6bd5\u4e1a\u8981\u6c42","\u901a\u7528\u6807\u51c6"]].concat(Object(o.a)(n.map((function(t){return t.content}))));return d.a.createElement("div",{className:"educontent requirementVsObjective",style:{background:"#fff"}},d.a.createElement("ul",{className:"clearfix padding20-30 bor-bottom-greyE backgroundFFF",style:{marginBottom:"0px"}},d.a.createElement("li",{className:"fl"},d.a.createElement("p",{className:"font-18 courseSystem"}," \u6bd5\u4e1a\u8981\u6c42\u5bf9\u901a\u7528\u6807\u51c6\u7684\u652f\u6491 "),d.a.createElement("p",null,d.a.createElement("span",{className:"color-grey-9 mr10"},"\u7528\u77e9\u9635\u56fe\u7684\u5f62\u5f0f\u8bf4\u660e\u672c\u4e13\u4e1a\u6bd5\u4e1a\u8981\u6c42\u5bf912\u9879\u901a\u7528\u6807\u51c6\u7684\u8986\u76d6\u5173\u7cfb\uff0c\u9f20\u6807\u5de6\u952e\u5355\u51fb\u5355\u5143\u683c\u5373\u53ef"),d.a.createElement("a",{target:"_blank",href:"/forums/3532",className:"color-blue"},"\u67e5\u770b\u8be6\u60c5"))),d.a.createElement("a",{href:"/api/ec_years/".concat(this.props.yearId,"/subitem_support_standards.xlsx").concat(Object(f.N)()),target:"_blank",className:"ant-btn ant-btn-primary color-white fr mt20"},"\u5bfc\u51fa\u77e9\u9635")),d.a.createElement("div",{className:"padding20-30",style:{background:"#fff"}},d.a.createElement("p",{className:"clearfix mb20"},d.a.createElement("span",{className:"fl mr30"},d.a.createElement("i",{className:"iconfont icon-gouxuan color-green font-16 mr5"}),"\u8868\u793a\u652f\u6491"),d.a.createElement("span",{className:"fl"},d.a.createElement("i",{className:"iconfont icon-gouxuan color-grey-eb font-16 mr5"}),"\u8868\u793a\u4e0d\u652f\u6491")),d.a.createElement(b.a,{columns:c,tableData:a,columnName:"\u6807\u51c6",onCellClick:this.onCellClick,firstColIndexArray:r})))}}]),e}(p.Component);e.default=E},592:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(113),r=Object.prototype.hasOwnProperty,o=Array.prototype.splice,c=Object.prototype.toString;function s(t){return c.call(t).slice(8,-1)}var i=Object.assign||function(t,e){return u(e).forEach((function(a){r.call(e,a)&&(t[a]=e[a])})),t},u="function"==typeof Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function l(t){return Array.isArray(t)?i(t.constructor(t.length),t):"Map"===s(t)?new Map(t):"Set"===s(t)?new Set(t):t&&"object"==typeof t?i(Object.create(Object.getPrototypeOf(t)),t):t}var p=(Object.defineProperty(d.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),d.prototype.extend=function(t,e){this.commands[t]=e},d.prototype.update=function(t,e){var a=this,o="function"==typeof e?{$apply:e}:e;Array.isArray(t)&&Array.isArray(o)||n(!Array.isArray(o),"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."),n("object"==typeof o&&null!==o,"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: %s.",Object.keys(this.commands).join(", "));var c=t;return u(o).forEach((function(e){if(r.call(a.commands,e)){var n=t===c;c=a.commands[e](o[e],c,o,t),n&&a.isEquals(c,t)&&(c=t)}else{var i="Map"===s(t)?a.update(t.get(e),o[e]):a.update(t[e],o[e]),u="Map"===s(c)?c.get(e):c[e];a.isEquals(i,u)&&(void 0!==i||r.call(t,e))||(c===t&&(c=l(t)),"Map"===s(c)?c.set(e,i):c[e]=i)}})),c},d);function d(){this.commands=i({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,e){return t===e},this.update.newContext=function(){return(new d).update}}e.Context=p;var f={$push:function(t,e,a){return y(e,a,"$push"),t.length?e.concat(t):e},$unshift:function(t,e,a){return y(e,a,"$unshift"),t.length?t.concat(e):e},$splice:function(t,e,a,r){var c,s;return c=e,s=a,n(Array.isArray(c),"Expected $splice target to be an array; got %s",c),g(s.$splice),t.forEach((function(t){g(t),e===r&&t.length&&(e=l(r)),o.apply(e,t)})),e},$set:function(t,e,a){var r;return r=a,n(1===Object.keys(r).length,"Cannot have more than one key in an object with $set"),t},$toggle:function(t,e){b(t,"$toggle");var a=t.length?l(e):e;return t.forEach((function(t){a[t]=!e[t]})),a},$unset:function(t,e,a,n){return b(t,"$unset"),t.forEach((function(t){Object.hasOwnProperty.call(e,t)&&(e===n&&(e=l(n)),delete e[t])})),e},$add:function(t,e,a,n){return h(e,"$add"),b(t,"$add"),"Map"===s(e)?t.forEach((function(t){var a=t[0],r=t[1];e===n&&e.get(a)!==r&&(e=l(n)),e.set(a,r)})):t.forEach((function(t){e!==n||e.has(t)||(e=l(n)),e.add(t)})),e},$remove:function(t,e,a,n){return h(e,"$remove"),b(t,"$remove"),t.forEach((function(t){e===n&&e.has(t)&&(e=l(n)),e.delete(t)})),e},$merge:function(t,e,a,r){var o,c;return o=e,n((c=t)&&"object"==typeof c,"update(): $merge expects a spec of type 'object'; got %s",c),n(o&&"object"==typeof o,"update(): $merge expects a target of type 'object'; got %s",o),u(t).forEach((function(a){t[a]!==e[a]&&(e===r&&(e=l(r)),e[a]=t[a])})),e},$apply:function(t,e){var a;return n("function"==typeof(a=t),"update(): expected spec of $apply to be a function; got %s.",a),t(e)}},m=new p;function y(t,e,a){n(Array.isArray(t),"update(): expected target of %s to be an array; got %s.",a,t),b(e[a],a)}function b(t,e){n(Array.isArray(t),"update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?",e,t)}function g(t){n(Array.isArray(t),"update(): expected spec of $splice to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?",t)}function h(t,e){var a=s(t);n("Map"===a||"Set"===a,"update(): %s expects a target of type Set or Map; got %s",e,a)}e.isEquals=m.update.isEquals,e.extend=m.extend,e.default=m.update,e.default.default=t.exports=i(e.default,e)}}]);