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.
NewEduCoderBuild/p__CoreCurriculum__Index__i...

1 line
3.1 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[45950],{77318:function(e,t,o){o.r(t);var n=o(18698),a=o.n(n),r=o(42122),i=o.n(r),c=o(27424),s=o.n(c),u=o(67294),l=o(88275),d=o(91773),g=o(85893);t.default=(0,l.connect)((function(e){var t=e.user,o=e.loading,n=e.globalSetting,a=e.coreCurriculum;return{user:t,loading:o.effects,globalSetting:n,coreCurriculum:a}}))((function(e){var t,o=e.coreCurriculum,n=e.dispatch,r=(e.loading,e.user,e.globalSetting),c=(o.CoreSubjects,d.Z.useForm()),l=(s()(c,1)[0],(0,u.useState)(!1)),p=s()(l,2),m=(p[0],p[1],(0,u.useState)("")),h=s()(m,2),f=h[0],w=(h[1],(0,u.useState)({page:1,limit:12})),y=s()(w,2),S=y[0];y[1];(0,u.useEffect)((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i()(i()({},S),{},{keyword:f});n({type:"coreCurriculum/getCoreSubjects",payload:i()({},e)})}()}),[S]),(0,u.useEffect)((function(){return n({type:"globalSetting/footerToggle",payload:!1}),function(){n({type:"globalSetting/footerToggle",payload:!0})}}),[]);var v=(0,u.useRef)(null),b=function(e){var t=e.data;if(e.source===v.current.contentWindow&&"string"==typeof t)try{console.log("eventData: ",t);var o=JSON.parse(t);if("object"===a()(o)){var n=o.courseId,r=o.type,i=o.nodeUid,c=o.path,s=o.tab,u=o.graphType,l=new URLSearchParams;n&&l.set("courseId",n),r&&l.set("type",r),s&&l.set("tab",s),i&&l.set("nodeUid",i),c&&l.set("path",c),u&&l.set("graphType",u),window.location.search!=="?".concat(l.toString())&&(console.log("newQueryParams.toString(): ",l.toString()),window.history.replaceState({},"",window.location.pathname+"?".concat(l.toString())))}}catch(e){console.error("解析消息数据出错:",e)}};return(0,u.useEffect)((function(){return function(){var e=v.current;if(e&&e.src){var t=new URLSearchParams(window.location.search),o=t.get("courseId"),n=t.get("path"),a=t.get("tab"),r=t.get("nodeUid"),i=t.get("graphType"),c=new URL(e.src);n&&(c.pathname="/"+n),o&&(console.log("courseId: ",o),c.searchParams.set("mapUid",o)),a&&(console.log("tab: ",a),c.searchParams.set("tab",a)),r&&c.searchParams.set("nodeUid",r),["systemEditMap","knowledgeRelation","referencedList","contentSource","teachingOperating","commonMapDetailForce","graphFullScreen","questionSystem","courseEdit","addAndEditProblem","mapSourceFullScreen"].includes(n)&&(c.pathname="/"+n+"/"+o),i&&c.searchParams.set("graphType",i),e.src=c.toString()}}(),window.addEventListener("message",b),function(){window.removeEventListener("message",b)}}),[]),(0,g.jsx)("section",{children:(0,g.jsx)("iframe",{src:null==r||null===(t=r.setting)||void 0===t?void 0:t.core_subject_url,ref:v,id:"myIframe",style:{position:"absolute",top:"70px",left:0,width:"100%",height:"calc(-70px + 100vh)",border:0}})})}))},33507:function(e,t){t.Z=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}})}}]);