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.
95 lines
35 KiB
95 lines
35 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{"55Ip":
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
|
|
\***************************************************************/
|
|
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
|
|
/*! exports used: Link */function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(/*! react-router */"Ty5D"),r=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),i=n(/*! react */"q1tI"),o=n.n(i),l=n(/*! history */"YS25"),u=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),s=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),c=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var d=function(e,t){return"function"==typeof e?e(t):e},v=function(e,t){return"string"==typeof e?Object(l.c)(e,null,null,t):e},f=function(e){return e},m=o.a.forwardRef;void 0===m&&(m=f);var p=m((function(e,t){var n=e.innerRef,a=e.navigate,r=e.onClick,i=Object(s.a)(e,["innerRef","navigate","onClick"]),l=i.target,c=Object(u.a)({},i,{onClick:function(e){try{r&&r(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||l&&"_self"!==l||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),a())}});return c.ref=f!==m&&t||n,o.a.createElement("a",c)}));var b=m((function(e,t){var n=e.component,r=void 0===n?p:n,i=e.replace,l=e.to,b=e.innerRef,h=Object(s.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(a.e.Consumer,null,(function(e){e||Object(c.a)(!1);var n=e.history,a=v(d(l,e.location),e.location),s=a?n.createHref(a):"",p=Object(u.a)({},h,{href:s,navigate:function(){var t=d(l,e.location);(i?n.replace:n.push)(t)}});return f!==m?p.ref=t||b:p.innerRef=b,o.a.createElement(r,p)}))})),h=function(e){return e},_=o.a.forwardRef;void 0===_&&(_=h);_((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,i=e.activeClassName,l=void 0===i?"active":i,f=e.activeStyle,m=e.className,p=e.exact,g=e.isActive,x=e.location,E=e.sensitive,O=e.strict,w=e.style,y=e.to,j=e.innerRef,q=Object(s.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(a.e.Consumer,null,(function(e){e||Object(c.a)(!1);var n=x||e.location,i=v(d(y,n),n),s=i.pathname,S=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),z=S?Object(a.f)(n.pathname,{path:S,exact:p,sensitive:E,strict:O}):null,N=!!(g?g(z,n):z),A=N?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(m,l):m,I=N?Object(u.a)({},w,{},f):w,R=Object(u.a)({"aria-current":N&&r||null,className:A,style:I,to:i},q);return h!==_?R.ref=t||j:R.innerRef=j,o.a.createElement(b,R)}))}))},"5b1O":
|
|
/*!***********************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Polls/Answer/index.tsx + 3 modules ***!
|
|
\***********************************************************************/
|
|
/*! exports provided: checkedOtherName, default */
|
|
/*! all exports used */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Polls/Answer/index.less?modules (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/classrooms.ts */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/anchor/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/anchor/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"checkedOtherName",(function(){return P}));n("+L6B");var a=n("2/Rp"),r=(n("5GOC"),n("JsLm")),i=(n("/zsF"),n("PArb")),o=(n("14J3"),n("BMrR")),l=(n("jCWc"),n("kPKH")),u=(n("sPJy"),n("bE4q")),s=(n("miYZ"),n("tsqr")),c=(n("2qtc"),n("kLXV")),d=n("k1fw"),v=n("9og8"),f=n("tJVT"),m=n("PpiC"),p=(n("B9cy"),n("Ol7k")),b=(n("lUTK"),n("BvKs")),h=n("WmNS"),_=n.n(h),g=n("q1tI"),x=n.n(g),E=n("Ty5D"),O=n("9kvl"),w=n("55Ip"),y=n("jhfD"),j=n("wd/R"),q=n.n(j),S=n("blMm"),z=n.n(S),N=n("1vsH"),A=n("oUNq"),I=n("xKgJ"),R=(n("5NDa"),n("5rEg")),k=(n("7Kak"),n("9yH6")),C=function(e){var t,n,a,r,i=e.itemData,o=e.answerData,l=e.onSave,u=void 0===l?function(){}:l,s=Object(g.useState)([]),c=Object(f.a)(s,2),d=c[0],v=c[1],m=Object(g.useState)(),p=Object(f.a)(m,2),b=p[0],h=p[1],_=Object(g.useState)(),E=Object(f.a)(_,2),O=E[0],w=E[1];Object(g.useEffect)((function(){var e;v((null==i||null===(e=i.question)||void 0===e?void 0:e.answers)||[])}),[null==i||null===(t=i.question)||void 0===t?void 0:t.answers]),Object(g.useEffect)((function(){var e,t;h(null==i||null===(e=i.question)||void 0===e||null===(t=e.poll_answer_ids)||void 0===t?void 0:t[0])}),[null==i||null===(n=i.question)||void 0===n?void 0:n.poll_answer_ids]),Object(g.useEffect)((function(){var e;w(null==i||null===(e=i.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==i||null===(a=i.question)||void 0===a?void 0:a.poll_vote_texts]);return x.a.createElement(k.a.Group,{disabled:Object(I.c)()||Object(I.s)()&&1===(null==o||null===(r=o.poll)||void 0===r?void 0:r.user_poll_status),value:b,onChange:function(e){var t;!function(e,t){var n;h(e);var a=null===(n=d.find((function(e){return P(e.answer_text)})))||void 0===n?void 0:n.answer_id;u(t,e,e===a?O:"")}(e.target.value,null==i||null===(t=i.question)||void 0===t?void 0:t.id)}},d.map((function(e,t){return x.a.createElement("div",{className:"".concat(z.a.answerWrap," ").concat(z.a.flexRow),key:t},x.a.createElement(k.a,{value:null==e?void 0:e.answer_id}),x.a.createElement("span",{className:"font14"},null==e?void 0:e.answer_text),P(null==e?void 0:e.answer_text)&&x.a.createElement(R.a,{className:z.a.otherInput,value:O,onChange:function(e){return w(e.target.value)},onBlur:function(e){var t;return function(e){var t;if(b){var n=null===(t=d.find((function(e){return P(e.answer_text)})))||void 0===t?void 0:t.answer_id;u(e,b,b===n?O:"")}}(null==i||null===(t=i.question)||void 0===t?void 0:t.id)}}))})))},T=(n("sRBo"),n("kaz8")),D=function(e){var t,n,a,r,i=e.itemData,o=e.answerData,l=e.onSave,u=void 0===l?function(){}:l,s=Object(g.useState)([]),c=Object(f.a)(s,2),d=c[0],v=c[1],m=Object(g.useState)(),p=Object(f.a)(m,2),b=p[0],h=p[1],_=Object(g.useState)(),E=Object(f.a)(_,2),O=E[0],w=E[1];Object(g.useEffect)((function(){var e;v((null==i||null===(e=i.question)||void 0===e?void 0:e.answers)||[])}),[null==i||null===(t=i.question)||void 0===t?void 0:t.answers]),Object(g.useEffect)((function(){var e;h(null==i||null===(e=i.question)||void 0===e?void 0:e.poll_answer_ids)}),[null==i||null===(n=i.question)||void 0===n?void 0:n.poll_answer_ids]),Object(g.useEffect)((function(){var e;w(null==i||null===(e=i.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==i||null===(a=i.question)||void 0===a?void 0:a.poll_vote_texts]);return x.a.createElement(T.a.Group,{disabled:Object(I.c)()||Object(I.s)()&&1===(null==o||null===(r=o.poll)||void 0===r?void 0:r.user_poll_status),value:b,onChange:function(e){var t;!function(e,t){var n;h(e);var a=null===(n=d.find((function(e){return P(e.answer_text)})))||void 0===n?void 0:n.answer_id;e.includes(a)?u(t,e,O):u(t,e,"")}(e,null==i||null===(t=i.question)||void 0===t?void 0:t.id)}},null==d?void 0:d.map((function(e,t){return x.a.createElement("div",{className:"".concat(z.a.answerWrap," ").concat(z.a.flexRow)},x.a.createElement(T.a,{value:null==e?void 0:e.answer_id}),x.a.createElement("span",{className:"font14"},null==e?void 0:e.answer_text),P(null==e?void 0:e.answer_text)&&x.a.createElement(R.a,{className:z.a.otherInput,value:O,onChange:function(e){return w(e.target.value)},onBlur:function(e){var t;return function(e){var t;if(null!=b&&b.length){var n=null===(t=d.find((function(e){return P(e.answer_text)})))||void 0===t?void 0:t.answer_id;b.includes(n)?u(e,b,O):u(e,b,"")}}(null==i||null===(t=i.question)||void 0===t?void 0:t.id)}}))})))},F=function(e){var t,n,a=e.itemData,r=e.answerData,i=e.onSave,o=void 0===i?function(){}:i,l=Object(g.useState)(),u=Object(f.a)(l,2),s=u[0],c=u[1];return Object(g.useEffect)((function(){var e;c(null==a||null===(e=a.question)||void 0===e?void 0:e.poll_vote_texts)}),[null==a||null===(t=a.question)||void 0===t?void 0:t.poll_vote_texts]),x.a.createElement("div",null,x.a.createElement("textarea",{className:z.a.answerSubjective,placeholder:"在此填入答案",disabled:Object(I.c)()||Object(I.s)()&&1===(null==r||null===(n=r.poll)||void 0===n?void 0:n.user_poll_status),value:s,onChange:function(e){return c(e.target.value)},onBlur:function(e){var t;return o(null==a||null===(t=a.question)||void 0===t?void 0:t.id,null,s)}}))},V=n("9Bee"),P=(b.a.SubMenu,p.a.Content,p.a.Sider,function(e){return"其他"===e||"其它"===e}),W={1:"单选题",2:"多选题",3:"主观题"};t.default=Object(O.a)((function(e){var t=e.loading,n=e.user;return{globalSetting:e.globalSetting,user:n,loading:t.effects}}))((function(e){e.globalSetting,e.loading;var t,n,p,b,h,j,S,R,k,T,P,B,M,K,H,G,J,U,Y,L=e.user,Z=(e.dispatch,Object(m.a)(e,["globalSetting","loading","user","dispatch"]),Object(E.i)()),X=Object(g.useState)({}),Q=Object(f.a)(X,2),$=Q[0],ee=Q[1];Object(g.useEffect)((function(){te()}),[Z.categoryId]);var te=function(){var e=Object(v.a)(_.a.mark((function e(){var t;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(A.jb)(Object(d.a)({},Z));case 2:(t=e.sent)&&ee(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=Object(v.a)(_.a.mark((function e(t,n,a){var r;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return console.error("handleSave no questionId params"),e.abrupt("return");case 3:return e.next=5,Object(A.Gb)({questionId:t,poll_answer_id:n,vote_text:a});case 5:null!=(r=e.sent)&&r.poll_vote&&($.question_answered.find((function(e){return e.ques_id===t})).ques_status=r.poll_vote.question_status,ee(Object(d.a)({},$)));case 7:case"end":return e.stop()}}),e)})));return function(t,n,a){return e.apply(this,arguments)}}(),ae=function(){var e=Object(v.a)(_.a.mark((function e(){var t;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(A.Bb)({categoryId:Z.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(s.b.success(null==t?void 0:t.message),O.d.push("/classrooms/".concat(Z.coursesId,"/poll/").concat(Z.categoryId,"/detail")));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return x.a.createElement("section",{className:"edu-container"},x.a.createElement("section",{className:"animated fadeIn"},x.a.createElement("aside",{className:"mt10"},x.a.createElement(u.a,{separator:">"},x.a.createElement(u.a.Item,null,x.a.createElement(w.a,{to:"/classrooms/".concat(Z.coursesId,"/poll")},null==$||null===(t=$.course)||void 0===t?void 0:t.name)),x.a.createElement(u.a.Item,null,x.a.createElement(w.a,{to:"/classrooms/".concat(Z.coursesId,"/poll")},"问卷")),x.a.createElement(u.a.Item,null,x.a.createElement(w.a,{to:"/classrooms/".concat(Z.coursesId,"/poll/").concat(Z.categoryId,"/detail")},"问卷详情")),x.a.createElement(u.a.Item,null,null===(n=L.userInfo)||void 0===n?void 0:n.real_name))),x.a.createElement("aside",{className:[z.a.title,"mt20"].join(" ")},x.a.createElement(o.a,{style:{width:"100%"}},x.a.createElement(l.a,{flex:"1"},x.a.createElement(w.a,{to:"/classrooms/".concat(Z.coursesId,"/poll/").concat(Z.categoryId,"/detail")},x.a.createElement(y.a,{className:"font16 c-black"})),x.a.createElement("strong",{className:"font24 ml5"},null==$||null===(p=$.poll)||void 0===p?void 0:p.polls_name),x.a.createElement(N.k,{status:[N.i[null==$||null===(b=$.poll)||void 0===b?void 0:b.poll_status]]})),x.a.createElement(l.a,null))),(null==$||null===(h=$.poll)||void 0===h?void 0:h.polls_description)&&x.a.createElement(V.a,{className:z.a.pollDesc,value:null==$||null===(j=$.poll)||void 0===j?void 0:j.polls_description})),x.a.createElement("section",{className:[z.a.bg,"pt30","pl30","pr30","pb30","mt20","mb50"].join(" ")},x.a.createElement(o.a,{gutter:[30,0]},x.a.createElement(l.a,{className:""},x.a.createElement("aside",null,(null==$||null===(S=$.question_types)||void 0===S?void 0:S.q_counts)>0&&x.a.createElement("span",{className:"ml20 c-black"},"合计 ",null==$||null===(R=$.question_types)||void 0===R?void 0:R.q_counts,"题:"),(null==$||null===(k=$.question_types)||void 0===k?void 0:k.q_singles)>0&&x.a.createElement("span",{className:"ml20 c-grey-999"},"单选题 ",null==$||null===(T=$.question_types)||void 0===T?void 0:T.q_singles,"题"),(null==$||null===(P=$.question_types)||void 0===P?void 0:P.q_doubles)>0&&x.a.createElement("span",{className:"ml20 c-grey-999"},"多选题 ",null==$||null===(B=$.question_types)||void 0===B?void 0:B.q_doubles,"题"),(null==$||null===(M=$.question_types)||void 0===M?void 0:M.q_mains)>0&&x.a.createElement("span",{className:"ml20 c-grey-999"},"主观题 ",null==$||null===(K=$.question_types)||void 0===K?void 0:K.q_mains,"题")))),x.a.createElement(i.a,null),x.a.createElement(o.a,{gutter:[30,0]},x.a.createElement(l.a,{flex:"1"},x.a.createElement("span",{className:"".concat(z.a.answered," mr40 pl30")},"已答"),x.a.createElement("span",{className:z.a.unanswer},"未答")),x.a.createElement(l.a,null,x.a.createElement("span",{className:"c-grey-999"},"截止时间 ",(null==$||null===(H=$.poll)||void 0===H?void 0:H.end_time)&&q()(null==$||null===(G=$.poll)||void 0===G?void 0:G.end_time).format("YYYY-MM-DD HH:mm")))),x.a.createElement(o.a,{gutter:[30,0],className:"mt10"},x.a.createElement(l.a,{flex:"1"},x.a.createElement(r.a,{affix:!1,className:z.a.anchor},null==$||null===(J=$.question_answered)||void 0===J?void 0:J.map((function(e,t){return x.a.createElement(r.a.Link,{className:"".concat(z.a.answerFlag," ").concat(1==e.ques_status?z.a.answerActive:""),href:"#Anchor_".concat(t),title:e.ques_number})}))))),x.a.createElement(i.a,null),x.a.createElement("div",null,null==$||null===(U=$.questions)||void 0===U?void 0:U.map((function(e,t){return x.a.createElement("div",{className:z.a.questionItem,id:"Anchor_".concat(t)},x.a.createElement("div",{className:z.a.itemType},x.a.createElement("span",{className:"font16 c-blue mr5"},e.question.question_number,"、",W[e.question.question_type]),x.a.createElement("span",{className:z.a.itemFlag},1==e.question.is_necessary?"必答":"选答"),2==e.question.question_type&&e.question.min_choices&&e.question.max_choices&&x.a.createElement("span",null,e.question.min_choices==e.question.max_choices?"可选"+e.question.max_choices+"项":"可选"+e.question.min_choices+"-"+e.question.max_choices+"项")),x.a.createElement("p",null,e.question.question_title),1==e.question.question_type&&x.a.createElement(C,{answerData:$,itemData:e,onSave:ne}),2==e.question.question_type&&x.a.createElement(D,{answerData:$,itemData:e,onSave:ne}),3==e.question.question_type&&x.a.createElement(F,{answerData:$,itemData:e,onSave:ne}))})))),Object(I.s)()&&0===(null==$||null===(Y=$.poll)||void 0===Y?void 0:Y.user_poll_status)&&x.a.createElement("div",{className:"mt30 mb50"},x.a.createElement(a.a,{className:z.a.submitButton,type:"primary",onClick:function(){var e,t=0,n=0;null==$||null===(e=$.question_answered)||void 0===e||e.map((function(e){var a,r,i;0===(null==e?void 0:e.ques_status)&&(1===(null==$||null===(a=$.questions)||void 0===a||null===(r=a.find((function(t){var n;return(null==t||null===(n=t.question)||void 0===n?void 0:n.id)===e.ques_id})))||void 0===r||null===(i=r.question)||void 0===i?void 0:i.is_necessary)?t++:n++)})),t>0?c.a.info({width:530,title:"提示",centered:!0,okText:"知道啦",content:x.a.createElement("div",{className:"tc font16 c-black-333"},"有 ",t," 题必答题未答,无法提交 ",x.a.createElement("br",null),"请完成全部必答题后再提交")}):c.a.confirm({width:530,title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:x.a.createElement("div",{className:"tc font16 c-black-333"},n>0&&x.a.createElement(x.a.Fragment,null,"有 ",n," 题未答 ",x.a.createElement("br",null)),"提交后无法再修改答题,是否确认提交?"),onOk:function(){ae()}})}},"提交")))}))},"6cGi":
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/rc-util/es/hooks/useMergedState.js ***!
|
|
\*********************************************************/
|
|
/*! exports provided: default */
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),r=n(/*! react */"q1tI");function i(e,t){var n=t||{},i=n.defaultValue,o=n.value,l=n.onChange,u=n.postState,s=r.useState((function(){return void 0!==o?o:void 0!==i?"function"==typeof i?i():i:"function"==typeof e?e():e})),c=Object(a.a)(s,2),d=c[0],v=c[1],f=void 0!==o?o:d;u&&(f=u(f));var m=r.useRef(l);m.current=l;var p=r.useCallback((function(e){v(e),f!==e&&m.current&&m.current(e,f)}),[f,m]),b=r.useRef(!0);return r.useEffect((function(){b.current?b.current=!1:void 0===o&&v(o)}),[o]),[f,p]}},Y1PL:
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
|
|
\**********************************************************/
|
|
/*! exports provided: ResizableTextArea, default */
|
|
/*! all exports used */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return k}));var a=n("wx14"),r=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),l=n("LK+K"),u=n("q1tI"),s=n("VTBJ"),c=n("rePB"),d=n("Zm9Q"),v=(n("Kwbf"),n("c+Xe")),f=n("m+aA"),m=n("bdgK"),p=new Map;var b=new m.default((function(e){e.forEach((function(e){var t,n=e.target;null===(t=p.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var h=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component),_=u.createContext(null);function g(e){var t=e.children,n=e.disabled,a=u.useRef(null),r=u.useRef(null),i=u.useContext(_),o=u.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),l=u.isValidElement(t)&&Object(v.c)(t),c=l?t.ref:null,d=u.useMemo((function(){return Object(v.a)(c,a)}),[c,a]),m=u.useRef(e);m.current=e;var g=u.useCallback((function(e){var t=m.current,n=t.onResize,a=t.data,r=e.getBoundingClientRect(),l=r.width,u=r.height,c=e.offsetWidth,d=e.offsetHeight,v=Math.floor(l),f=Math.floor(u);if(o.current.width!==v||o.current.height!==f||o.current.offsetWidth!==c||o.current.offsetHeight!==d){var p={width:v,height:f,offsetWidth:c,offsetHeight:d};o.current=p;var b=c===Math.round(l)?l:c,h=d===Math.round(u)?u:d,_=Object(s.a)(Object(s.a)({},p),{},{offsetWidth:b,offsetHeight:h});null==i||i(_,e,a),n&&Promise.resolve().then((function(){n(_,e)}))}}),[]);return u.useEffect((function(){var e,t,i=Object(f.a)(a.current)||Object(f.a)(r.current);return i&&!n&&(e=i,t=g,p.has(e)||(p.set(e,new Set),b.observe(e)),p.get(e).add(t)),function(){return function(e,t){p.has(e)&&(p.get(e).delete(t),p.get(e).size||(b.unobserve(e),p.delete(e)))}(i,g)}}),[a.current,n]),u.createElement(h,{ref:r},l?u.cloneElement(t,{ref:d}):t)}function x(e){var t=e.children;return Object(d.a)(t).map((function(t,n){var r=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(n);return u.createElement(g,Object(a.a)({},e,{key:r}),t)}))}x.Collection=function(e){var t=e.children,n=e.onBatchResize,a=u.useRef(0),r=u.useRef([]),i=u.useContext(_),o=u.useCallback((function(e,t,o){a.current+=1;var l=a.current;r.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){l===a.current&&(null==n||n(r.current),r.current=[])})),null==i||i(e,t,o)}),[n,i]);return u.createElement(_.Provider,{value:o},t)};var E,O=x,w=n("bT9E"),y=n("TSYQ"),j=n.n(y),q="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",S=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],z={};function N(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&z[n])return z[n];var a=window.getComputedStyle(e),r=a.getPropertyValue("box-sizing")||a.getPropertyValue("-moz-box-sizing")||a.getPropertyValue("-webkit-box-sizing"),i=parseFloat(a.getPropertyValue("padding-bottom"))+parseFloat(a.getPropertyValue("padding-top")),o=parseFloat(a.getPropertyValue("border-bottom-width"))+parseFloat(a.getPropertyValue("border-top-width")),l=S.map((function(e){return"".concat(e,":").concat(a.getPropertyValue(e))})).join(";"),u={sizingStyle:l,paddingSize:i,borderSize:o,boxSizing:r};return t&&n&&(z[n]=u),u}var A,I=n("Gytx"),R=n.n(I);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(A||(A={}));var k=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).nextFrameActionId=void 0,i.resizeFrameId=void 0,i.textArea=void 0,i.saveTextArea=function(e){i.textArea=e},i.handleResize=function(e){var t=i.state.resizeStatus,n=i.props,a=n.autoSize,r=n.onResize;t===A.NONE&&("function"==typeof r&&r(e),a&&i.resizeOnNextFrame())},i.resizeOnNextFrame=function(){cancelAnimationFrame(i.nextFrameActionId),i.nextFrameActionId=requestAnimationFrame(i.resizeTextarea)},i.resizeTextarea=function(){var e=i.props.autoSize;if(e&&i.textArea){var t=e.minRows,n=e.maxRows,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;E||((E=document.createElement("textarea")).setAttribute("tab-index","-1"),E.setAttribute("aria-hidden","true"),document.body.appendChild(E)),e.getAttribute("wrap")?E.setAttribute("wrap",e.getAttribute("wrap")):E.removeAttribute("wrap");var r=N(e,t),i=r.paddingSize,o=r.borderSize,l=r.boxSizing,u=r.sizingStyle;E.setAttribute("style","".concat(u,";").concat(q)),E.value=e.value||e.placeholder||"";var s,c=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,v=E.scrollHeight;if("border-box"===l?v+=o:"content-box"===l&&(v-=i),null!==n||null!==a){E.value=" ";var f=E.scrollHeight-i;null!==n&&(c=f*n,"border-box"===l&&(c=c+i+o),v=Math.max(c,v)),null!==a&&(d=f*a,"border-box"===l&&(d=d+i+o),s=v>d?"":"hidden",v=Math.min(d,v))}return{height:v,minHeight:c,maxHeight:d,overflowY:s,resize:"none"}}(i.textArea,!1,t,n);i.setState({textareaStyles:a,resizeStatus:A.RESIZING},(function(){cancelAnimationFrame(i.resizeFrameId),i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:A.RESIZED},(function(){i.resizeFrameId=requestAnimationFrame((function(){i.setState({resizeStatus:A.NONE}),i.fixFirefoxAutoScroll()}))}))}))}))}},i.renderTextArea=function(){var e=i.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,r=e.autoSize,o=e.onResize,l=e.className,d=e.disabled,v=i.state,f=v.textareaStyles,m=v.resizeStatus,p=Object(w.a)(i.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),b=j()(n,l,Object(c.a)({},"".concat(n,"-disabled"),d));"value"in p&&(p.value=p.value||"");var h=Object(s.a)(Object(s.a)(Object(s.a)({},i.props.style),f),m===A.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return u.createElement(O,{onResize:i.handleResize,disabled:!(r||o)},u.createElement("textarea",Object(a.a)({},p,{className:b,style:h,ref:i.saveTextArea})))},i.state={textareaStyles:{},resizeStatus:A.NONE},i}return Object(i.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&R()(e.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(u.Component),C=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(r.a)(this,n),(a=t.call(this,e)).resizableTextArea=void 0,a.focus=function(){a.resizableTextArea.textArea.focus()},a.saveTextArea=function(e){a.resizableTextArea=e},a.handleChange=function(e){var t=a.props.onChange;a.setValue(e.target.value,(function(){a.resizableTextArea.resizeTextarea()})),t&&t(e)},a.handleKeyDown=function(e){var t=a.props,n=t.onPressEnter,r=t.onKeyDown;13===e.keyCode&&n&&n(e),r&&r(e)};var i=void 0===e.value||null===e.value?e.defaultValue:e.value;return a.state={value:i},a}return Object(i.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return u.createElement(k,Object(a.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(u.Component);t.default=C},bT9E:
|
|
/*!*****************************************!*\
|
|
!*** ./node_modules/rc-util/es/omit.js ***!
|
|
\*****************************************/
|
|
/*! exports provided: default */
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function r(e,t){var n=Object(a.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},blMm:
|
|
/*!********************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Polls/Answer/index.less?modules ***!
|
|
\********************************************************************/
|
|
/*! no static exports found */
|
|
/*! exports used: default */
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2bLPg",flex_space_between:"flex_space_between___ii_Ys",flex_box_vertical_center:"flex_box_vertical_center___18wOe",flex_box_center_end:"flex_box_center_end___1SRoQ",flex_box_column:"flex_box_column___blnVc",bg:"bg___3sTdE",title:"title___2Y9p8",questionIcons:"questionIcons___2ujoX",green:"green___1xTdr",orange:"orange___2RDy1",greenTip:"greenTip___jAu9x",redTip:"redTip___vdwze",orangeTip:"orangeTip___1_p7v",pollDesc:"pollDesc___2W78a",answered:"answered___1kVWf",unanswer:"unanswer___aOwgL",anchor:"anchor___vMbGr",answerFlag:"answerFlag___3rj3E",answerActive:"answerActive___3f5r8",questionItem:"questionItem___3ztao",itemType:"itemType___2PfIv",itemFlag:"itemFlag___2SMq7",answerWrap:"answerWrap___3wcDW",answerSubjective:"answerSubjective___1shV7",otherInput:"otherInput___10b9e",submitButton:"submitButton___3VWix",flexRow:"flexRow___2Jt_u"}},t23M:
|
|
/*!*****************************************************!*\
|
|
!*** ./node_modules/rc-resize-observer/es/index.js ***!
|
|
\*****************************************************/
|
|
/*! exports provided: default */
|
|
/*! exports used: default */function(e,t,n){"use strict";var a=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),r=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),i=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),o=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),l=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),u=n(/*! react */"q1tI"),s=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),c=n(/*! rc-util/es/Children/toArray */"Zm9Q"),d=n(/*! rc-util/es/warning */"Kwbf"),v=n(/*! rc-util/es/ref */"c+Xe"),f=n(/*! resize-observer-polyfill */"bdgK"),m=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,r=t[0].target,i=r.getBoundingClientRect(),o=i.width,l=i.height,u=r.offsetWidth,s=r.offsetHeight,c=Math.floor(o),d=Math.floor(l);if(e.state.width!==c||e.state.height!==d||e.state.offsetWidth!==u||e.state.offsetHeight!==s){var v={width:c,height:d,offsetWidth:u,offsetHeight:s};e.setState(v),n&&Promise.resolve().then((function(){n(Object(a.a)(Object(a.a)({},v),{},{offsetWidth:u,offsetHeight:s}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(s.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(c.a)(e);if(t.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(u.isValidElement(n)&&Object(v.c)(n)){var a=n.ref;t[0]=u.cloneElement(n,{ref:Object(v.a)(a,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!u.isValidElement(e)||"key"in e&&null!==e.key?e:u.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(u.Component);m.displayName="ResizeObserver",t.a=m}}]); |