|
|
webpackJsonp([178],{1007:function(e,t,n){var u=n(50),l=Object.prototype.hasOwnProperty,c=Array.prototype.splice,a=Object.prototype.toString,p=function(e){return a.call(e).slice(8,-1)},r=Object.assign||function(t,n){return f(n).forEach(function(e){l.call(n,e)&&(t[e]=n[e])}),t},f="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){if(Array.isArray(e))return r(e.constructor(e.length),e);if("Map"===p(e))return new Map(e);if("Set"===p(e))return new Set(e);if(e&&"object"==typeof e){var t=Object.getPrototypeOf(e);return r(Object.create(t),e)}return e}function o(){var i=r({},m);return s.extend=function(e,t){i[e]=t},s.isEquals=function(e,t){return e===t},s;function s(r,o){"function"==typeof o&&(o={$apply:o}),Array.isArray(r)&&Array.isArray(o)||u(!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."),u("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(i).join(", "));var c=r;return f(o).forEach(function(e){if(l.call(i,e)){var t=r===c;c=i[e](o[e],c,o,r),t&&s.isEquals(c,r)&&(c=r)}else{var n="Map"===p(r)?s(r.get(e),o[e]):s(r[e],o[e]),a="Map"===p(c)?c.get(e):c[e];s.isEquals(n,a)&&(void 0!==n||l.call(r,e))||(c===r&&(c=d(r)),"Map"===p(c)?c.set(e,n):c[e]=n)}}),c}}var m={$push:function(e,t,n){return s(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return s(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,a){var r,o;return r=t,o=n,u(Array.isArray(r),"Expected $splice target to be an array; got %s",r),b(o.$splice),e.forEach(function(e){b(e),t===a&&e.length&&(t=d(a)),c.apply(t,e)}),t},$set:function(e,t,n){var a;return a=n,u(1===Object.keys(a).length,"Cannot have more than one key in an object with $set"),e},$toggle:function(e,t){y(e,"$toggle");var n=e.length?d(t):t;return e.forEach(function(e){n[e]=!t[e]}),n},$unset:function(e,t,n,a){return y(e,"$unset"),e.forEach(function(e){Object.hasOwnProperty.call(t,e)&&(t===a&&(t=d(a)),delete t[e])}),t},$add:function(e,a,t,r){return g(a,"$add"),y(e,"$add"),"Map"===p(a)?e.forEach(function(e){var t=e[0],n=e[1];a===r&&a.get(t)!==n&&(a=d(r)),a.set(t,n)}):e.forEach(function(e){a!==r||a.has(e)||(a=d(r)),a.add(e)}),a},$remove:function(e,t,n,a){return g(t,"$remove"),y(e,"$remove"),e.forEach(function(e){t===a&&t.has(e)&&(t=d(a)),t.delete(e)}),t},$merge:function(t,n,e,a){var r,o;return r=n,u((o=t)&&"object"==typeof o,"update(): $merge expects a spec of type 'object'; got %s",o),u(r&&"object"==typeof r,"update(): $merge expects a target of type 'object'; got %s",r),f(t).forEach(function(e){t[e]!==n[e]&&(n===a&&(n=d(a)),n[e]=t[e])}),n},$apply:function(e,t){var n;return u("function"==typeof(n=e),"update(): expected spec of $apply to be a function; got %s.",n),e(t)}},i=o();function s(e,t,n){u(Array.isArray(e),"update(): expected target of %s to be an array; got %s.",n,e),y(t[n],n)}function y(e,t){u(Array.isArray(e),"update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?",t,e)}function b(e){u(Array.isArray(e),"update(): expected spec of $splice to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?",e)}function g(e,t){var n=p(e);u("Map"===n||"Set"===n,"update(): %s expects a target of type Set or Map; got %s",t,n)}e.exports=i,e.exports.default=i,e.exports.newContext=o},2930:function(e,t,n){"use strict";var a=n(162),r=(n.n(a),n(161)),o=n.n(r),c=n(0),i=n.n(c),s=n(3),u=(n.n(s),n(12)),l=(n.n(u),function(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e});function p(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)}}var f=(function(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)}(d,c.Component),l(d,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var a=this,e=this.props,n=(e.match,e.columns),t=e.tableData;return t&&t.length?i.a.createElement("table",{className:"edu-pop-table-all edu-txt-center color-grey-6 interval-td",cellspacing:"0",cellpadding:"0"},i.a.createElement("tbody",null,i.a.createElement("tr",null,n.map(function(e,t){return 0==t?i.a.createElement("td",{className:"gaugeOutfit"},i.a.createElement("span",null,n[0][0]),i.a.createElement("span",null,n[0][1])):i.a.createElement(o.a,{title:e},i.a.createElement("td",null,a.props.columnName||"目标",t))})),t.map(function(e,n){var t=e.map(function(e,t){return 0==t?i.a.createElement(o.a,{title:e},i.a.createElement("td",null,"指标点",a.props.firstColIndexArray?a.props.firstColIndexArray[n]:n+1)):i.a.createElement(o.a,{title:e?"取消支撑":"选择支撑"},i.a.createElement("td",{onClick:function(){return a.props.onCellClick(n,t,!!e)}},i.a.createElement("i",{className:"iconfont icon-gouxuan "+(e?"color-green":"color-grey-eb")+" font-16 mr5"})))});return i.a.createElement("tr",{className:"sustainLine editTd"},t)}))):""}}]),d);function d(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,e));return t.state={},t}t.a=f},4086:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),c=n.n(a),r=n(3),o=(n.n(r),n(12)),i=n.n(o),s=n(2930),u=n(1007),l=n.n(u),p=function(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e};function f(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)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var y=(function(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)}(b,a.Component),p(b,[{key:"componentDidMount",value:function(){var t=this,e="/ec_years/"+this.props.match.params.yearId+"/subitem_support_standards.json";i.a.get(e).then(function(e){e.data.graduation_subitems&&t.setState(Object.assign({},e.data),function(){t.init()})}).catch(function(e){})}},{key:"render",value:function(){var e=this.props,t=(e.match,e.history,e.current_user,this.state),n=t.tableData,a=t.graduation_standards,r=(t.graduation_subitems,t.is_manager,t.firstColIndexArray),o=a&&[["毕业要求","通用标准"]].concat(m(a.map(function(e){return e.content})));return console.log(o,n),c.a.createElement("div",{className:"educontent requirementVsObjective",style:{background:"#fff"}},c.a.createElement("ul",{className:"clearfix padding20-30 bor-bottom-greyE backgroundFFF",style:{marginBottom:"0px"}},c.a.createElement("li",{className:"fl"},c.a.createElement("p",{className:"font-18 courseSystem"}," 毕业要求对通用标准的支撑 "),c.a.createElement("p",null,c.a.createElement("span",{className:"color-grey-9 mr10"},"用矩阵图的形式说明本专业毕业要求对12项通用标准的覆盖关系,鼠标左键单击单元格即可"),c.a.createElement("a",{target:"_blank",href:"/forums/3532",className:"color-blue"},"查看详情"))),c.a.createElement("a",{href:"/api/ec_years/"+this.props.yearId+"/subitem_support_standards.xlsx",target:"_blank",className:"ant-btn ant-btn-primary color-white fr mt20"},"导出矩阵")),c.a.createElement("div",{className:"padding20-30",style:{background:"#fff"}},c.a.createElement("p",{className:"clearfix mb20"},c.a.createElement("span",{className:"fl mr30"},c.a.createElement("i",{className:"iconfont icon-gouxuan color-green font-16 mr5"}),"表示支撑"),c.a.createElement("span",{className:"fl"},c.a.createElement("i",{className:"iconfont icon-gouxuan color-grey-eb font-16 mr5"}),"表示不支撑")),c.a.createElement(s.a,{columns:o,tableData:n,columnName:"标准",onCellClick:this.onCellClick,firstColIndexArray:r})))}}]),b);function b(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b);var c=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,e));return c.init=function(){c.graduationRequirementsIdIndexMap={},c.trainingSubitemsIdIndexMap={},c.state.graduation_subitems.forEach(function(e,t){c.graduationRequirementsIdIndexMap[e.id]=t}),c.state.graduation_standards.forEach(function(e,t){c.trainingSubitemsIdIndexMap[e.id]=t+1});var n=[],a=[];c.state.graduation_subitems.forEach(function(e,t){n.push([e.content].concat(m(Array(c.state.graduation_standards.length)))),a.push(e.position+"-"+e.graduation_requirement_position)}),c.state.subitem_support_standards.forEach(function(e){n[c.graduationRequirementsIdIndexMap[e.graduation_subitem_id]][c.trainingSubitemsIdIndexMap[e.graduation_standard_id]]=!0}),c.setState({tableData:n,firstColIndexArray:a})},c.onCellClick=function(t,n,a){console.log(t,n,a);var e=c.state.graduation_subitems[t].id,r=c.state.graduation_standards[n-1].id,o="/ec_years/"+c.props.match.params.yearId+"/subitem_support_standards.json";(a?i.a.delete:i.a.post)(o,a?{params:{ec_graduation_subitem_id:e,ec_graduation_standard_id:r}}:{ec_graduation_subitem_id:e,ec_graduation_standard_id:r}).then(function(e){0==e.data.status&&(c.setState(function(e){return{tableData:l()(e.tableData,d({},t,d({},n,{$set:!a})))}}),c.props.showNotification((a?"取消":"选择")+"成功"))}).catch(function(e){})},c.state={},c}t.default=y}}); |