chunk-39e24b28.bd3d1d03.js 16 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39e24b28"],{"00ee":function(t,e,i){var s=i("b622"),r=s("toStringTag"),n={};n[r]="z",t.exports="[object z]"===String(n)},"0ad3":function(t,e,i){},"0d26":function(t,e,i){var s=i("e330"),r=Error,n=s("".replace),a=function(t){return String(r(t).stack)}("zxcasd"),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(a);t.exports=function(t,e){if(l&&"string"==typeof t&&!r.prepareStackTrace)while(e--)t=n(t,o,"");return t}},"13d5":function(t,e,i){"use strict";var s=i("23e7"),r=i("d58f").left,n=i("a640"),a=i("2d00"),o=i("605d"),l=n("reduce"),c=!o&&a>79&&a<83;s({target:"Array",proto:!0,forced:!l||c},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},"2ba4":function(t,e,i){var s=i("40d5"),r=Function.prototype,n=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(s?a.bind(n):function(){return a.apply(n,arguments)})},"3bbe":function(t,e,i){var s=i("1626"),r=String,n=TypeError;t.exports=function(t){if("object"==typeof t||s(t))return t;throw n("Can't set "+r(t)+" as a prototype")}},"577e":function(t,e,i){var s=i("f5df"),r=String;t.exports=function(t){if("Symbol"===s(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},"605d":function(t,e,i){var s=i("c6b6"),r=i("da84");t.exports="process"==s(r.process)},7156:function(t,e,i){var s=i("1626"),r=i("861d"),n=i("d2bb");t.exports=function(t,e,i){var a,o;return n&&s(a=e.constructor)&&a!==i&&r(o=a.prototype)&&o!==i.prototype&&n(t,o),t}},a640:function(t,e,i){"use strict";var s=i("d039");t.exports=function(t,e){var i=[][t];return!!i&&s((function(){i.call(null,e||function(){return 1},1)}))}},ab36:function(t,e,i){var s=i("861d"),r=i("9112");t.exports=function(t,e){s(e)&&"cause"in e&&r(t,"cause",e.cause)}},aeb0:function(t,e,i){var s=i("9bf2").f;t.exports=function(t,e,i){i in t||s(t,i,{configurable:!0,get:function(){return e[i]},set:function(t){e[i]=t}})}},b980:function(t,e,i){var s=i("d039"),r=i("5c6c");t.exports=!s((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},c536:function(t,e,i){"use strict";i("0ad3")},d2bb:function(t,e,i){var s=i("e330"),r=i("825a"),n=i("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{t=s(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(i,[]),e=i instanceof Array}catch(a){}return function(i,s){return r(i),n(s),e?t(i,s):i.__proto__=s,i}}():void 0)},d58f:function(t,e,i){var s=i("59ed"),r=i("7b0b"),n=i("44ad"),a=i("07fa"),o=TypeError,l=function(t){return function(e,i,l,c){s(i);var h=r(e),u=n(h),d=a(h),p=t?d-1:0,f=t?-1:1;if(l<2)while(1){if(p in u){c=u[p],p+=f;break}if(p+=f,t?p<0:d<=p)throw o("Reduce of empty array with no initial value")}for(;t?p>=0:d>p;p+=f)p in u&&(c=i(c,u[p],p,h));return c}};t.exports={left:l(!1),right:l(!0)}},d9e2:function(t,e,i){var s=i("23e7"),r=i("da84"),n=i("2ba4"),a=i("e5cb"),o="WebAssembly",l=r[o],c=7!==Error("e",{cause:7}).cause,h=function(t,e){var i={};i[t]=a(t,e,c),s({global:!0,constructor:!0,arity:1,forced:c},i)},u=function(t,e){if(l&&l[t]){var i={};i[t]=a(o+"."+t,e,c),s({target:o,stat:!0,constructor:!0,arity:1,forced:c},i)}};h("Error",(function(t){return function(e){return n(t,this,arguments)}})),h("EvalError",(function(t){return function(e){return n(t,this,arguments)}})),h("RangeError",(function(t){return function(e){return n(t,this,arguments)}})),h("ReferenceError",(function(t){return function(e){return n(t,this,arguments)}})),h("SyntaxError",(function(t){return function(e){return n(t,this,arguments)}})),h("TypeError",(function(t){return function(e){return n(t,this,arguments)}})),h("URIError",(function(t){return function(e){return n(t,this,arguments)}})),u("CompileError",(function(t){return function(e){return n(t,this,arguments)}})),u("LinkError",(function(t){return function(e){return n(t,this,arguments)}})),u("RuntimeError",(function(t){return function(e){return n(t,this,arguments)}}))},e391:function(t,e,i){var s=i("577e");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:s(t)}},e5cb:function(t,e,i){"use strict";var s=i("d066"),r=i("1a2d"),n=i("9112"),a=i("3a9b"),o=i("d2bb"),l=i("e893"),c=i("aeb0"),h=i("7156"),u=i("e391"),d=i("ab36"),p=i("0d26"),f=i("b980"),m=i("83ab"),v=i("c430");t.exports=function(t,e,i,g){var y="stackTraceLimit",b=g?2:1,w=t.split("."),T=w[w.length-1],C=s.apply(null,w);if(C){var _=C.prototype;if(!v&&r(_,"cause")&&delete _.cause,!i)return C;var A=s("Error"),x=e((function(t,e){var i=u(g?e:t,void 0),s=g?new C(t):new C;return void 0!==i&&n(s,"message",i),f&&n(s,"stack",p(s.stack,2)),this&&a(_,this)&&h(s,this,x),arguments.length>b&&d(s,arguments[b]),s}));if(x.prototype=_,"Error"!==T?o?o(x,A):l(x,A,{name:!0}):m&&y in C&&(c(x,C,y),c(x,C,"prepareStackTrace")),l(x,C),!v)try{_.name!==T&&n(_,"name",T),_.constructor=x}catch(E){}return x}}},f5df:function(t,e,i){var s=i("00ee"),r=i("1626"),n=i("c6b6"),a=i("b622"),o=a("toStringTag"),l=Object,c="Arguments"==n(function(){return arguments}()),h=function(t,e){try{return t[e]}catch(i){}};t.exports=s?n:function(t){var e,i,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=h(e=l(t),o))?i:c?n(e):"Object"==(s=n(e))&&r(e.callee)?"Arguments":s}},fd9b:function(t,e,i){"use strict";var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"question-box"},[e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.type,expression:"type===1"}],staticStyle:{width:"100%"}},[t._t("default")],2),e("div",{staticClass:"p-8"},[e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.type,expression:"type===1"}],staticClass:"question-des"},[e("a-spin",{attrs:{spinning:t.spinning}},[e("div",{staticClass:"row-box question-describe",domProps:{innerHTML:t._s(t.$options.filters.concatTIP(t.data.html?t.data.html:""))}}),e("div",{ref:"QDes",staticClass:"question-answer"},[e("div",{staticClass:"row-box flex"},[e("div",{staticClass:"green-btn"},[t._v("答案:")]),1!=t.data.questionCategory?[e("div",{staticClass:"html-box",domProps:{innerHTML:t._s(t.$options.filters.concatTIP(t.data.answer?t.data.answer:""))}})]:t._e(),1==t.data.questionCategory?[e("div",[t._v(t._s("true"==String(t.data.answer).toLocaleLowerCase()?"正确":"错误"))])]:t._e()],2),e("div",{staticClass:"row-box flex"},[e("div",{staticClass:"green-btn"},[t._v("解析:")]),e("div",{staticClass:"html-box",domProps:{innerHTML:t._s(t.$options.filters.concatTIP(t.data.analysis?t.data.analysis:""))}})])])])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.type,expression:"type===2"}],staticClass:"edit-box"},[e("a-spin",{attrs:{spinning:t.spinning}},[e("div",{staticClass:"edit-top flex-align"},[e("div",{staticClass:"flex-items"},[e("div",{staticClass:"blue-dot"},[t._v(" "+t._s(t.index+1)+" ")]),e("span",[t._v(t._s(t.data.disciplineQuestionTypeName))])]),e("div",[e("a",{directives:[{name:"show",rawName:"v-show",value:1==t.steps,expression:"steps==1"}],staticClass:"m-r8",on:{click:function(e){return t.changeStep(2)}}},[t._v("下一步")]),e("a",{directives:[{name:"show",rawName:"v-show",value:2==t.steps,expression:"steps==2"}],staticClass:"m-r8",on:{click:function(e){return t.changeStep(1)}}},[t._v("上一步")]),e("a",{directives:[{name:"show",rawName:"v-show",value:2==t.steps,expression:"steps==2"}],staticClass:"m-r8",on:{click:t.saveEdit}},[t._v("保存")]),e("a",{staticClass:"m-r8",on:{click:t.clearData}},[t._v("放弃")])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:1==t.steps,expression:"steps==1"}],staticClass:"p-8"},[e("div",[t._v("题目:")]),e("Editor",{attrs:{isClear:!1},model:{value:t.timuHtml,callback:function(e){t.timuHtml=e},expression:"timuHtml"}}),0==t.data.questionCategory?[e("div",{staticClass:"m-t16"},[t._v("选项:")]),t._l(t.html1,(function(i,s){return e("div",{key:i.id,staticClass:"flex-align"},[e("span",{staticClass:"cards cards-dots cards-small"},[t._v(t._s(t.toLetter(s)))]),e("div",{staticClass:"m-t16",staticStyle:{width:"100%"}},[e("Editor",{model:{value:i.html,callback:function(e){t.$set(i,"html",e)},expression:"item.html"}})],1),e("a",{staticClass:"qustion-li-delete",on:{click:function(e){return t.delOption(i,s)}}},[t._v("删除")])])})),t.html1.length<10?e("a-button",{staticClass:"m-t16",attrs:{type:"primary"},on:{click:t.addOption}},[t._v("增加选项 ")]):t._e()]:t._e(),e("div",{staticClass:"edit-answer"},[e("div",[t._v("答案:")]),0==t.data.questionCategory?[e("a-button-group",t._l(t.html1,(function(i,s){return e("a-radio-button",{key:i.id,class:{"ant-radio-button-wrapper-checked":i.isAnswer},attrs:{value:i},on:{click:function(e){return t.multipleChange(i)}}},[t._v(t._s(t.toLetter(s)))])})),1)]:t._e(),1==t.data.questionCategory?[e("a-radio-group",{attrs:{value:"true"==t.html2.toLocaleLowerCase()},on:{change:t.singleChange}},[e("a-radio-button",{attrs:{value:!0}},[t._v("正确")]),e("a-radio-button",{attrs:{value:!1}},[t._v("错误")])],1)]:t._e(),2==t.data.questionCategory?[e("Editor",{model:{value:t.html2,callback:function(e){t.html2=e},expression:"html2"}})]:t._e()],2),e("div",[t._v("解析:")]),e("Editor",{attrs:{isClear:!1},model:{value:t.html3,callback:function(e){t.html3=e},expression:"html3"}})],2),2==t.steps?e("div",[e("div",[t._v("版式:")]),e("Editor",{attrs:{isClear:!1},model:{value:t.formatHtml,callback:function(e){t.formatHtml=e},expression:"formatHtml"}})],1):t._e()])],1)])])},r=[],n=(i("13d5"),i("d9e2"),i("14d9"),i("4ec3")),a=i("b893"),o=i("ceb0");const l={QuestionResolveTaskGetInfo:t=>Object(n["qb"])(t),QuestionGetInfo:t=>Object(n["jb"])(t),QuestionUpdateOrigin:(t,e)=>Object(n["wb"])(t,e),QuestionUpdate:(t,e)=>Object(n["vb"])(t,e)};var c={components:{Editor:o["a"]},props:{index:{type:Number,default:0},details:{type:Boolean,default:!1},data:{type:Object,default:()=>({html:"",answer:"",analysis:""})}},data(){return{spinning:!1,type:1,showDetails:this.details,answerHeight:0,infoDetails:{},editArr:[],steps:1,questionHtml:"",editType:null,addID:0}},computed:{formatHtml:{set(t){this.questionHtml=t},get(){if(0==this.data.questionCategory){let t="",e=this.editArr.filter(t=>1==t.resolveType);return t=this.timuHtml+e.reduce((t,e,i)=>{let s=Object(a["j"])(e.html);var r=document.createElement("span");r.innerHTML=this.toLetter(i)+". ";let n=s.getElementsByClassName("MsoNormal");if(n.length>0)s.getElementsByClassName("MsoNormal")[0].prepend(r);else{let t=s.getElementsByTagName("p");t.length>0&&s.getElementsByTagName("p")[0].prepend(r)}return s=Object(a["b"])(s),t+s},""),this.$options.filters.concatTIP(t)}return this.$options.filters.concatTIP(this.timuHtml)}},timuHtml:{set(t){let e=null;e=0==this.data.questionCategory?0:4;let i=this.editArr.filter(t=>t.resolveType==e);i.length>0&&(i[0].html=t)},get(){let t=0==this.data.questionCategory?this.html0:this.html4;return this.$options.filters.concatTIP(t)}},html0:{set(t){let e=this.editArr.filter(t=>1==t.resolveType);e.length>0&&(e[0].html=t)},get(){if(0==this.editArr.length)return"";let t=this.editArr.filter(t=>0==t.resolveType)[0].html;return null!==t&&"null"!=t||(t=this.editArr.filter(t=>4==t.resolveType)[0].html),t}},html1:{set(){},get(){if(0==this.editArr.length)return[];let t=this.editArr.filter(t=>1==t.resolveType).map(t=>(t.html=this.$options.filters.concatTIP(t.html),t));return t}},html2:{set(t){let e=this.editArr.filter(t=>2==t.resolveType);e.length>0&&(e[0].html=t)},get(){if(0==this.editArr.length)return"";let t=this.editArr.filter(t=>2==t.resolveType)[0].html;return this.$options.filters.concatTIP(t)}},html3:{set(t){let e=this.editArr.filter(t=>3==t.resolveType);e.length>0&&(e[0].html=t)},get(){if(0==this.editArr.length)return"";let t=this.editArr.filter(t=>3==t.resolveType)[0].html;return this.$options.filters.concatTIP(t)}},html4:{set(t){let e=this.editArr.filter(t=>4==t.resolveType);e.length>0&&(e[0].html=t)},get(){return 0==this.editArr.length?"":this.editArr.filter(t=>4==t.resolveType)[0].html}},html5:{set(t){let e=this.editArr.filter(t=>5==t.resolveType);e.length>0&&(e[0].html=t)},get(){return 0==this.editArr.length?"":this.editArr.filter(t=>5==t.resolveType)[0].html}}},mounted(){this.answerHeight=this.$refs.QDes.offsetHeight,this.showDetails||(this.$refs.QDes.style.height=0)},watch:{showDetails(t){this.$refs.QDes.style.height=t?this.answerHeight+"px":0}},methods:{showLoading(t=!1){this.spinning=t},changeStep(t){if(2==t&&0==this.data.questionCategory)try{this.html1.forEach(t=>{if(!t.html)throw this.$message.error("您还有选项尚未完善"),Error()})}catch(e){return}this.steps=t},addOption(){this.editArr.push({html:"",resolveType:1,isAnswer:!1,id:"test"+String(this.addID)}),this.addID=this.addID+1,console.log(this.addID,"this.addID")},delOption(t,e){this.editArr=this.editArr.filter(e=>e.id!=t.id)},toLetter(t){return String.fromCharCode(t+65)},init(){this.$refs.QDes.style.height=0},toggle(){let t=this.$refs.QDes.style.height;this.showDetails=0==parseInt(t)},toEdit(t,e=!1){if(this.editType=t,this.$store.state.questionEdit)return void this.$message.error("您还有题目正在编辑,请先完成编辑");this.$store.commit("changeQuestionEdit",!0),this.spinning=!0,this.type=2;let i={},s="";1==t?(i={resoleTaskQuestionId:this.data.id},s="QuestionResolveTaskGetInfo"):(i={id:this.data.id},s="QuestionGetInfo"),l[s](i).then(t=>{if(console.log(t,"试题详情"),this.infoDetails=t,this.editArr=JSON.parse(JSON.stringify(t.resolves)),console.log(this.editArr,"this.editArr"),console.log(this.data._questionCategory,"toEdit getquestionCategory"),1==this.data.questionCategory){let t=this.editArr.filter(t=>2==t.resolveType);null!=t[0].html&&"null"!=t[0].html||(t[0].html=""),e&&t.length>0&&(t[0].html="False")}this.spinning=!1}).catch(t=>{this.spinning=!1})},saveEdit(){if(!this.questionHtml)return void this.$message.error("版式不能为空!");this.spinning=!0,console.log(this.editArr,"editArr");let t="",e="";if(t=0==this.data.questionCategory?this.editArr.filter(t=>0==t.resolveType).length>0?this.editArr.filter(t=>0==t.resolveType)[0].html:"":this.editArr.filter(t=>4==t.resolveType).length>0?this.editArr.filter(t=>4==t.resolveType)[0].html:"",0==this.data.questionCategory){let t=this.editArr.filter(t=>1==t.resolveType);t.forEach((t,i)=>{t.isAnswer&&(e+=this.toLetter(i))}),e=e.split("").join(",")}else{let t=this.editArr.filter(t=>2==t.resolveType);e=t[0].html}let i=this.editArr.filter(t=>3==t.resolveType).length>0?this.editArr.filter(t=>3==t.resolveType)[0].html:"",s={questionHtml:this.$options.filters.clearTIP(this.questionHtml),stemHtml:this.$options.filters.clearTIP(t),answerHtml:this.$options.filters.clearTIP(e),analysisHtml:this.$options.filters.clearTIP(i),options:0==this.data.questionCategory?this.editArr.filter(t=>1==t.resolveType).map(t=>(String(t.id).indexOf("test")>-1&&(t.id=null),t.html=this.$options.filters.clearTIP(t.html),t)):[],questionCategory:this.data.questionCategory};console.log(s,"data");let r={};1==this.editType?(r={questionOriginId:this.data.questionOriginId},name="QuestionUpdateOrigin"):(r={id:this.data.id},name="QuestionUpdate"),l[name](s,r).then(t=>{this.$message.success("修改成功!"),this.cancleEdit(),this.data.html=s.questionHtml,this.data.answer=s.answerHtml,this.data.analysis=s.analysisHtml,this.addID=0,this.spinning=!1}).catch(t=>{this.spinning=!1})},clearData(){this.data.hasOwnProperty("_questionCategory")&&(this.data.disciplineQuestionTypeName=this.data._disciplineQuestionTypeName,this.data.disciplineQuestionTypeId=this.data._disciplineQuestionTypeId,this.data.questionCategory=this.data._questionCategory,delete this.data._disciplineQuestionTypeName,delete this.data._disciplineQuestionTypeId,delete this.data._questionCategory),this.cancleEdit()},cancleEdit(){this.infoDetails={},this.editArr=[],this.steps=1,this.type=1,this.addID=0,this.$store.commit("changeQuestionEdit",!1)},singleChange(t){console.log(t.target.value),console.log(this.html2,"html2");let e=this.editArr.filter(t=>2==t.resolveType);e.length>0&&(e[0].html=String(t.target.value))},multipleChange(t){console.log(t,"value"),t.isAnswer=!t.isAnswer}}},h=c,u=(i("c536"),i("2877")),d=Object(u["a"])(h,s,r,!1,null,"68b4781b",null);e["a"]=d.exports}}]);
  2. //# sourceMappingURL=chunk-39e24b28.bd3d1d03.js.map