12 |
- (function(e){function t(t){for(var s,a,c=t[0],u=t[1],l=t[2],h=0,p=[];h<c.length;h++)a=c[h],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(s in u)Object.prototype.hasOwnProperty.call(u,s)&&(e[s]=u[s]);r&&r(t);while(p.length)p.shift()();return n.push.apply(n,l||[]),i()}function i(){for(var e,t=0;t<n.length;t++){for(var i=n[t],s=!0,c=1;c<i.length;c++){var u=i[c];0!==o[u]&&(s=!1)}s&&(n.splice(t--,1),e=a(a.s=i[0]))}return e}var s={},o={app:0},n=[];function a(t){if(s[t])return s[t].exports;var i=s[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=e,a.c=s,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)a.d(i,s,function(t){return e[t]}.bind(null,s));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],u=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var r=u;n.push([0,"chunk-vendors"]),i()})({0:function(e,t,i){e.exports=i("56d7")},"0ec9":function(e,t,i){},"0f84":function(e,t,i){},"207f":function(e,t,i){"use strict";var s=i("a0f0"),o=i.n(s);o.a},"3ee1":function(e,t,i){},"4e66":function(e,t,i){},"56d7":function(e,t,i){"use strict";i.r(t);i("053b"),i("a133"),i("ed0d"),i("f09c"),i("e117");var s=i("c0a4"),o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"questionEditDialog"},[i("div",{staticClass:"title"},[i("span",[e._v("设置")]),i("i",{on:{click:e.hideSettingDialog}})]),i("div",{staticClass:"questionEditContent"},[i("div",{staticClass:"controlOption"},[i("div",{staticClass:"hrow"},[i("label",[e._v("大题号")]),i("h-select",{attrs:{hwidth:"114px",defaultOption:e.defaultBigQues,options:e.bigQuestionNos},on:{changeOption:e.changeBigNo}}),i("label",[e._v("题型标题")]),i("h-input",{attrs:{placeholder:"请输入题型标题名称",maxLength:10,ctype:"text",hwidth:"200px"},model:{value:e.commonFields.questionTypeTitle,callback:function(t){e.$set(e.commonFields,"questionTypeTitle",t)},expression:"commonFields.questionTypeTitle"}})],1),e._l(e.commonFields.questionTypeArr,(function(t,s){return i("div",{key:s,staticClass:"hrow row2"},[i("label",[e._v("题 类")]),0===s?i("h-select",{key:"QuesType",attrs:{hwidth:"114px",placeholder:"请选择题类",options:e.returnQuestionTypes,immediate:!1,defaultOption:e.defaultQuesType},on:{changeOption:e.changeType}}):i("div",{key:"QuesType",staticClass:"hSelect",staticStyle:{width:"114px"}},[i("div",{staticClass:"hInput"},[i("input",{attrs:{type:"text",readonly:"readonly",placeholder:"请选择题类"},domProps:{value:e.defaultQuesType.label}})])]),i("label",[e._v(e._s(e.isChooseAnswer?"第":"从"))]),i("h-input",{attrs:{hwidth:"30",ctype:"number"},model:{value:t.startNo,callback:function(i){e.$set(t,"startNo",i)},expression:"topicConfig.startNo"}}),e.isChooseAnswer?e._e():[i("label",[e._v("到")]),i("h-input",{attrs:{hwidth:"30",min:+t.startNo,ctype:"number"},model:{value:t.endNo,callback:function(i){e.$set(t,"endNo",i)},expression:"topicConfig.endNo"}})],i("label",[e._v("题")]),e.isChooseAnswer?[i("h-select",{attrs:{hwidth:"60px",placeholder:"请选择题类",options:e.selectOptions,defaultOption:e.defaultChooseNum},on:{changeOption:e.changeChooseOption}}),i("label",[e._v("选")]),i("h-select",{attrs:{hwidth:"60px",options:[{label:"一",value:1}],defaultOption:{label:"一",value:1}}})]:e._e(),e.isSelectType?[i("label",[e._v("每题")]),i("h-input",{attrs:{min:2,hwidth:"30",ctype:"number"},on:{blur:function(t){return e.batchChangeFields("optionsCount",e.dialogData)}},model:{value:e.dialogData.optionsCount,callback:function(t){e.$set(e.dialogData,"optionsCount",t)},expression:"dialogData.optionsCount"}}),i("label",[e._v("个选项")])]:e._e(),i("label",[e._v("每题")]),i("h-input",{attrs:{step:.5,hwidth:"30"},on:{blur:function(i){return e.batchChangeFields("score",t)}},model:{value:t.score,callback:function(i){e.$set(t,"score",i)},expression:"topicConfig.score"}}),i("label",[e._v("分")]),e.isMoreSelectType?[i("label",[e._v("半对")]),i("h-input",{attrs:{step:.5,max:Number(t.score-.5),hwidth:"30"},on:{blur:function(t){return e.batchChangeFields("halfScore",e.dialogData)}},model:{value:e.dialogData.halfScore,callback:function(t){e.$set(e.dialogData,"halfScore",t)},expression:"dialogData.halfScore"}}),i("label",[e._v("分")])]:e._e(),i("div",{staticClass:"opratorRowLength"},[i("span",{directives:[{name:"show",rawName:"v-show",value:17!=e.commonFields.questionType,expression:"commonFields.questionType!=17"}],staticClass:"rowBtn add",on:{click:e.addTopicConfig}}),i("span",{directives:[{name:"show",rawName:"v-show",value:e.commonFields.questionTypeArr.length>1,expression:"commonFields.questionTypeArr.length>1"}],staticClass:"rowBtn minus",on:{click:function(t){return e.delTopicConfig(s)}}})]),e.isChooseAnswer&&e.isZongHe?i("subject-select",{attrs:{TopicData:{subject:e.subject}},on:{changeSubject:e.changeSubject}}):e._e(),i("span",{staticClass:"color-red"},[e._v(e._s(e.errMsg))])],2)}))],2),i("div",{staticClass:"subjectListInfo"},[e.questions.length>0?i("ul",[e.isSelectType?e._l(e.questions,(function(t,s){return i("select-item",{key:t.questionNo,attrs:{questionType:e.commonFields.questionType,_index:s,question:t,isMoreSelectType:e.isMoreSelectType},on:{validateOptions:e.validateOptions,changeSubject:e.changeSubject}})})):e._e(),!e.isFillInBlank&&!e.isAnswer||e.isComposition?e._e():e._l(e.questions,(function(t,s){return i("topic-question-item",{key:t.questionNo,attrs:{_index:s,questionType:e.commonFields.questionType,question:t},on:{validateOptions:e.validateOptions,setSmQuesLength:e.setSmQuesLength,changeSetSmQuesStatus:e.changeSetSmQuesStatus,setSmQuesScore:e.setSmQuesScore,addSmTopic:e.addSmTopic,removeSmTopic:e.removeSmTopic,changeSubject:e.changeSubject}})})),e.isComposition?e._l(e.questions,(function(t,s){return i("composition-item",{key:t.questionNo,attrs:{_index:s,question:t},on:{validateOptions:e.validateOptions}})})):e._e()],2):i("span",{staticClass:"tips"},[e._v("请添加题目")])]),i("div",{staticClass:"layoutOption"},[e.isSelectType?i("select-layout",{attrs:{direction:e.dialogData.direction},on:{changeDirection:e.changeDirection}}):e.isFillInBlank?i("fillinblank-layout",{attrs:{defaultColumn:e.dialogData.columns,defaultRowLineHeight:e.dialogData.rowLineHeight,defaultScoreStyle:e.dialogData.scoreStyle,topicArrScore:e.topicArrScore},on:{changeColumn:e.changeColumn,changeRowLineHeight:e.changeRowLineHeight,changeSocreLimit:e.changeSocreLimit}}):e.isAnswer?i("answer-layout",{attrs:{isHalf:e.dialogData.isAddHalf,scoreLimit:e.dialogData.scoreLimit,questionType:{questionType:e.commonFields.questionType},topicArrScore:e.topicArrScore},on:{changeScoreLimit:e.changeScoreLimit,setHasHalfScore:e.setHasHalfScore}}):e._e()],1)]),i("div",{staticClass:"questionBtns"},[i("div",{staticClass:"h_btn",on:{click:e.addQuestionsToOnlineCard}},[e._v("确定")]),i("div",{staticClass:"h_btn border",on:{click:e.hideSettingDialog}},[e._v("取消")])])])},n=[],a=(i("b4fb"),i("4194"),i("fe59"),i("b130"),i("ecb4"),i("9302"),i("2eeb"),i("ea69"),i("513c"),i("fe8a"),i("e18c"),i("d575"),i("e35a"),i("90aa"),i("0d7a"),i("08ba"),i("ce3c")),c=i("e793"),u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("li",{staticClass:"subjectItem"},[i("div",{staticClass:"subjectContent"},[i("span",[e._v(e._s(e.question.questionNo))]),i("span",{staticClass:"tips"},[e._v("作文")]),i("div",{staticClass:"info"},[i("label",[e._v("分数")]),i("h-input",{attrs:{hwidth:"30"},on:{blur:function(t){return e.validateOptions(e.question)}},model:{value:e.questionMap.score,callback:function(t){e.$set(e.questionMap,"score",t)},expression:"questionMap.score"}})],1)])])},l=[],r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"hgc_chooseSubject"},[i("h-notice",{attrs:{msg:e.tipsText}}),i("label",[e._v("学科")]),i("h-select",{attrs:{hwidth:"70px",defaultOption:e.defaultOption,options:e.options},on:{changeOption:e.changeOption}})],1)},h=[],p={props:{TopicData:{type:Object}},data:function(){return{options:[{label:"物理",id:12},{label:"化学",id:13},{label:"生物",id:14}],wenzong:[{label:"政治",id:15},{label:"历史",id:16},{label:"地理",id:17}],lizong:[{label:"物理",id:12},{label:"化学",id:13},{label:"生物",id:14}],tipsText:"请选择当前题目所属的学科,用以生成各科考试成绩"}},created:function(){19===this.subjectId?this.options=this.wenzong:18===this.subjectId&&(this.options=this.lizong)},computed:{defaultOption:function(){var e=this,t=this.options[0];return void 0===e.TopicData||this.options.forEach((function(i){i.id==e.TopicData.subject&&(t=i)})),t}},methods:{changeOption:function(e){this.$emit("changeSubject",e)}}},d=p,m=(i("5ceb"),i("9ca4")),f=Object(m["a"])(d,r,h,!1,null,null,null),b=f.exports,g={name:"SelectItem",props:{_index:Number,question:{type:Object}},data:function(){return{questionMap:Object(c["a"])({},this.question)}},beforeUpdate:function(){this.questionMap=Object(c["a"])({},this.question)},methods:{validateOptions:function(e){this.$emit("validateOptions",Object(c["a"])(Object(c["a"])({},e),{},{index:this._index},this.questionMap))}}},v=g,S=Object(m["a"])(v,u,l,!1,null,null,null),y=S.exports,q=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("li",{staticClass:"subjectItem"},[i("div",{staticClass:"subjectContent"},[i("span",[e._v(e._s(e.question.questionNo))]),i("span",{staticClass:"tips"},[e._v(e._s(e.quetionLable))]),i("div",{staticClass:"info"},[e.$parent.isZongHe?i("subject-select",{attrs:{TopicData:e.question},on:{changeSubject:e.changeSubject}}):e._e(),i("label",[e._v("选项数")]),i("h-input",{attrs:{hwidth:"30",min:2,max:7},on:{blur:function(t){return e.validateOptions(e.question)}},model:{value:e.questionMap.optionsCount,callback:function(t){e.$set(e.questionMap,"optionsCount",t)},expression:"questionMap.optionsCount"}}),i("label",[e._v("分数")]),i("h-input",{attrs:{hwidth:"30",step:.5},on:{blur:function(t){return e.validateOptions(e.question)}},model:{value:e.questionMap.score,callback:function(t){e.$set(e.questionMap,"score",t)},expression:"questionMap.score"}}),e.isMoreSelectType?[i("label",[e._v("半对分")]),i("h-input",{attrs:{hwidth:"30",step:.5,max:Number(e.questionMap.score)},on:{blur:function(t){return e.validateOptions(e.question)}},model:{value:e.questionMap.halfScore,callback:function(t){e.$set(e.questionMap,"halfScore",t)},expression:"questionMap.halfScore"}})]:e._e()],2)])])},T=[],N={1:"单选",2:"多选",11:"不定项选择",5:"填空",7:"解答","7c":"作文",17:"选做"},C={1:"singleSelect",2:"moreSelect",11:"moreSelect",5:"fillInBlank",7:"answer","7c":"composition",17:"chooseAnswer"},_={"7c":4},x={name:"SelectItem",props:{questionType:Number,isMoreSelectType:Boolean,_index:Number,question:{type:Object}},data:function(){return{questionMap:Object(c["a"])({},this.question)}},beforeUpdate:function(){this.questionMap=Object(c["a"])({},this.question)},computed:{quetionLable:function(){return N[this.questionType]}},methods:{validateOptions:function(e){this.$emit("validateOptions",Object(c["a"])(Object(c["a"])({},e),{},{index:this._index},this.questionMap))},changeSubject:function(e){this.$emit("changeSubject",Object(c["a"])(Object(c["a"])({},e),{},{_index:this._index}))}},components:{SubjectSelect:b}},O=x,j=Object(m["a"])(O,q,T,!1,null,null,null),w=j.exports,Q=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"hrow"},[i("label",[e._v("手写打分")]),i("h-select",{attrs:{hwidth:"114px",options:e.options,defaultOption:{label:"上限"+e.scoreLimit,value:e.scoreLimit}},on:{changeOption:e.changeLimit}}),i("h-checkbox",{model:{value:e.hasHalfScore,callback:function(t){e.hasHalfScore=t},expression:"hasHalfScore"}}),i("div",{staticClass:"tips"},[e._v("仅对线下阅卷打分")])],1)},I=[],F={name:"AnswerLayout",props:{scoreLimit:{type:Number,default:15},isHalf:{type:Boolean,default:!1},questionType:{type:Object},topicArrScore:Array},data:function(){return{hasHalfScore:this.isHalf,options:[{label:"上限15",value:15},{label:"上限16",value:16},{label:"上限29",value:29},{label:"上限49",value:49}],optionsTwo:[{label:"上限15",value:15},{label:"上限29",value:29},{label:"上限69",value:69}],optionsThree:[{label:"上限15",value:15},{label:"上限16",value:16},{label:"上限29",value:29},{label:"上限49",value:49}]}},mounted:function(){"7c"==this.questionType.questionType&&(this.options=this.optionsTwo),this.changeOptins(this.topicArrScore)},methods:{changeLimit:function(e){this.$emit("changeScoreLimit",e)},changeOptins:function(e){var t=Math.min.apply(Math,e);if("7c"==this.questionType.questionType?this.options=this.optionsTwo:this.options=this.optionsThree,void 0===e||e.length<1||t<15)return this.changeLimit(this.options[0]),!1;var i=[];if(this.options.forEach((function(e){(e.value>t||e.value==t)&&i.push(e)})),this.options=i,Number(this.scoreLimit)==i[0].value)return!1;this.changeLimit(i[0])}},watch:{hasHalfScore:function(e){this.$emit("setHasHalfScore",e)},questionType:function(e){"7c"==e.questionType&&(this.options=this.optionsTwo,this.changeOptins(this.topicArrScore))},topicArrScore:function(e){e.length>1&&this.changeOptins(e)}}},D=F,$=Object(m["a"])(D,Q,I,!1,null,null,null),k=$.exports,L=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"hrow"},[i("label",[e._v("答题卡布局")]),i("label",[e._v("每行")]),i("h-select",{attrs:{hwidth:"114px",options:e.columns,defaultOption:{label:e.defaultColumn,value:e.defaultColumn}},on:{changeOption:e.changeColumn}}),i("label",[e._v("列")]),i("label",[e._v("行高")]),i("h-select",{attrs:{hwidth:"114px",options:e.lineHeights,defaultOption:{label:e.defaultRowLineHeight,value:e.defaultRowLineHeight}},on:{changeOption:e.changeRowLineHeight}}),i("label",[e._v("手写打分")]),i("h-select",{attrs:{hwidth:"114px",options:e.scoreStyles,defaultOption:{label:e.defaultScoreStyle?e.defaultScoreStyle:"空白方框",value:e.defaultScoreStyle}},on:{changeOption:e.changeSocreLimit}}),i("div",{staticClass:"tips"},[e._v("仅对线下阅卷打分")])],1)},E=[],A={name:"FillinblankLayout",props:{defaultColumn:{type:Number,default:1},defaultRowLineHeight:{type:Number,default:40},defaultScoreStyle:{type:String,default:""},topicArrScore:Array},data:function(){return{columns:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}],lineHeights:[{label:"25px",value:25},{label:"30px",value:30},{label:"35px",value:35},{label:"40px",value:40},{label:"45px",value:45},{label:"50px",value:50}],scoreStyles:[{label:"空白方框",value:""}],scoreOpt:[{label:"2/3/5",value:"2/3/5"},{label:"2/3/4/6",value:"2/3/4/6"},{label:"2/4",value:"2/4"}]}},methods:{changeColumn:function(e){this.$emit("changeColumn",e)},changeRowLineHeight:function(e){this.$emit("changeRowLineHeight",e)},changeSocreLimit:function(e){this.$emit("changeSocreLimit",e)}},watch:{topicArrScore:function(e){var t=this;this.scoreStyles=[{label:"空白方框",value:""}],this.scoreOpt.forEach((function(i){for(var s=!0,o=0;o<e.length;o++)if(-1==i.label.indexOf(e[o]))return!1;s&&t.scoreStyles.push(i)}))}}},H=A,M=Object(m["a"])(H,L,E,!1,null,null,null),B=M.exports,P=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"hrow"},[i("label",[e._v("选项排列方向")]),i("h-radio",{attrs:{value:e.direction},on:{changeDirection:e.changeDirection}})],1)},R=[],J={name:"SelectLayout",props:{direction:{type:Number,deafult:0}},methods:{changeDirection:function(e){this.$emit("changeDirection",e)}}},K=J,Z=Object(m["a"])(K,P,R,!1,null,null,null),z=Z.exports,U=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("li",{staticClass:"subjectItem"},[i("div",{staticClass:"subjectContent"},[i("span",[e._v(" "+e._s(e.questionNoCalc)+" "),17!==e.questionType?i("a",{staticClass:"light",attrs:{href:"javascript:;"},on:{click:e.addSmTopic}},[i("i",[e._v("+")]),e._v("添加小题 ")]):e._e()]),i("span",{staticClass:"tips"},[e._v(e._s(e.quetionLable))]),i("div",{staticClass:"info"},[e.$parent.isZongHe&&17!=e.question.questionTypeId?i("subject-select",{attrs:{TopicData:e.question},on:{changeSubject:e.changeSubject}}):e._e(),e.question.smTopic.length?e._e():[i("label",[i("h-notice"),i("h-switch",{attrs:{checked:e.question.hasSmQuestion},on:{changeStatus:e.changeStatus1}})],1),i("label",[e._v("含小问")]),i("h-input",{attrs:{hwidth:"30",min:2,max:10,disabled:!e.question.hasSmQuestion,value:e.question.smQuestion.length},on:{blur:function(t){return e.setSmQuesLength(t,"topicQues")}}})],i("label",[e._v("分数")]),17!=e.question.questionTypeId?i("h-input",{key:e.question.questionNo,attrs:{hwidth:"30",step:.5},on:{blur:function(t){return e.validateOptions(e.question)}},model:{value:e.question.score,callback:function(t){e.$set(e.question,"score",t)},expression:"question.score"}}):i("div",{key:e.question.questionNo,staticClass:"hInput",staticStyle:{width:"30px"}},[i("input",{attrs:{type:"text",readonly:"readonly"},domProps:{value:e.question.score}})])],2),!e.question.smTopic.length&&e.question.smQuestion.length?e._l(e.question.smQuestion,(function(t,s){return i("sm-question",{key:t.symbolKey,attrs:{alias:e.question.questionNo+"("+(s+1)+")",score:t.score,index:s},on:{setSmQuesScore:e.setSmQuesScore}})})):e._e()],2),e.question.smTopic.length?i("div",{staticClass:"smTopicList"},e._l(e.question.smTopic,(function(t,s){return i("div",{key:t.alias,staticClass:"smTopic"},[i("span",[i("i",{staticClass:"icon icon-del",on:{click:function(t){return e.removeSmTopic(s)}}}),e._v(" "+e._s(e.question.questionNo+"."+(s+1))+" ")]),i("span",{staticClass:"tips"},[e._v(e._s(e.quetionLable))]),i("div",{staticClass:"info"},[i("label",[i("h-notice"),i("h-switch",{attrs:{_index:s},on:{changeStatus:e.changeStatus2},model:{value:t.hasSmQuestion,callback:function(i){e.$set(t,"hasSmQuestion",i)},expression:"smTopicItem.hasSmQuestion"}})],1),i("label",[e._v("含小问")]),i("h-input",{attrs:{hwidth:"30",min:2,max:10,disabled:!t.hasSmQuestion,value:t.smQuestion.length},on:{blur:function(t){return e.setSmQuesLength(t,"smTopicQues",s)}}}),i("label",[e._v("分数")]),i("h-input",{attrs:{hwidth:"30",step:.5},on:{blur:e.setSmTopicScore},model:{value:t.score,callback:function(i){e.$set(t,"score",i)},expression:"smTopicItem.score"}})],1),e._l(t.smQuestion,(function(o,n){return i("sm-question",{key:o.symbolKey,attrs:{index:n,smTopicIndex:s,score:o.score,alias:t.alias+"("+(n+1)+")"},on:{setSmQuesScore:e.setSmQuesScore2}})}))],2)})),0):e._e()])},V=[],W=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"smQuestion"},[i("span",[e._v(e._s(e.alias))]),i("div",{staticClass:"info"},[i("label",[e._v("分数")]),i("h-input",{attrs:{hwidth:"30",step:.5},on:{blur:e.setSmQuesScore},model:{value:e.scoreItem,callback:function(t){e.scoreItem=t},expression:"scoreItem"}})],1)])},Y=[],G={props:{score:[Number,String],alias:String,index:Number,smTopicIndex:{type:Number,default:0}},data:function(){return{scoreItem:this.score}},methods:{setSmQuesScore:function(e){this.$emit("setSmQuesScore",{score:this.scoreItem,index:this.index,smTopicIndex:this.smTopicIndex})}}},X=G,ee=(i("f871"),Object(m["a"])(X,W,Y,!1,null,"1be4f43c",null)),te=ee.exports,ie=(i("1c2e"),function(e){return JSON.parse(JSON.stringify(e))}),se=function(){return Math.random().toString(36).substr(3,10)},oe={name:"FillInBlank",props:{questionType:Number,_index:Number,question:{type:Object}},components:{SmQuestion:te,SubjectSelect:b},computed:{quetionLable:function(){return N[this.questionType]},questionNoCalc:function(){var e=this.question,t=e.questionNo,i=e.topicNo,s=this._index;return 17===this.questionType?i+"-"+String.fromCharCode(65+s):t}},data:function(){return{score:this.question.score,defaultSmTopicItem:{score:1,hasSmQuestion:!1,smQuestion:[]}}},updated:function(){this.score=this.question.score},methods:{addSmTopic:function(){this.$emit("addSmTopic",this._index),this.setSmTopicScore()},setSmTopicScore:function(){for(var e=this.question.smTopic,t=(this.question.smTopic.length,0),i=0;i<e.length;i++)t+=Number(e[i].score);this.question.score=t},removeSmTopic:function(e){this.$emit("removeSmTopic",this._index,e),this.setSmTopicScore()},changeSubject:function(e){this.$emit("changeSubject",Object(c["a"])(Object(c["a"])({},e),{},{_index:this._index}))},changeStatus1:function(e){var t=e.status,i=e.index;this.$emit("changeSetSmQuesStatus",{_index:this._index,status:t,index:i,type:"topicSmQues"}),t&&this.$emit("setSmQuesLength",{smQuesCount:2,_index:this._index,type:"topicQues",smTopicIndex:0})},changeStatus2:function(e){var t=e.status,i=e.index;this.$emit("changeSetSmQuesStatus",{_index:this._index,status:t,index:i,type:"smTopicSmQues"}),t&&this.$emit("setSmQuesLength",{smQuesCount:2,_index:this._index,type:"smTopicQues",smTopicIndex:i})},setSmQuesLength:function(e,t,i){var s=+e.target.value;this.$emit("setSmQuesLength",{smQuesCount:s,_index:this._index,type:t,smTopicIndex:i||0})},setSmQuesScore:function(e){var t=e.index,i=e.smTopicIndex,s=e.score;this.$emit("setSmQuesScore",{_index:this._index,index:t,smTopicIndex:i,score:s,type:"topicSmQues"}),this.setTopicQuesScore()},setTopicQuesScore:function(){for(var e=this.question.smQuestion,t=0,i=0;i<e.length;i++)t+=Number(e[i].score);this.question.score=t},setSmQuesScore2:function(e){var t=e.index,i=e.smTopicIndex,s=e.score;this.$emit("setSmQuesScore",{_index:this._index,index:t,smTopicIndex:i,score:s,type:"smTopicSmQues"}),this.setSmTopicSmQuesScore()},setSmTopicSmQuesScore:function(){var e=this.question.smTopic;console.log(e);for(var t=0;t<e.length;t++){for(var i=this.question.smTopic[t].smQuestion,s=0,o=0;o<i.length;o++)s+=Number(i[o].score);e[t].score=s}this.setSmTopicScore()},validateOptions:function(e){this.$emit("validateOptions",Object(c["a"])(Object(c["a"])({},e),{},{optionsCount:+this.optionsCount,index:this._index}))}}},ne=oe,ae=(i("207f"),Object(m["a"])(ne,U,V,!1,null,"a1594944",null)),ce=ae.exports,ue={data:function(){return{singleSelectDialogFields:{optionsCount:4,direction:0,defaultItem:{optionsCount:4,type:1,score:"",marktype:0}},moreSelectDialogFields:{optionsCount:4,direction:0,halfScore:"",defaultItem:{optionsCount:4,type:1,score:"",marktype:0,halfScore:""}},fillInBlankDialogFields:{columns:1,rowLineHeight:40,scoreStyle:"",defaultItem:{hasSmQuestion:!1,type:5,score:"",scores:"",marktype:0,smTopic:[],smQuestion:[]}},answerDialogFields:{isAddHalf:!1,scoreLimit:15,defaultItem:{hasSmQuestion:!1,type:7,score:"",scores:"",marktype:0,smTopic:[],smQuestion:[]}},compositionDialogFields:{isAddHalf:!1,scoreLimit:15,defaultItem:{type:7,score:""}},chooseAnswerDialogFields:{isAddHalf:!1,scoreLimit:15,defaultItem:{hasSmQuestion:!1,type:7,score:"",scores:"",marktype:0,smTopic:[],smQuestion:[]}}}}},le={name:"App",props:{questionData:{type:Object,default:function(){var e=guid();return{modelId:e,questions:[],commonFields:{startNo:1,endNo:1,score:"",questionType:1,bigNo:"一",questionTypeTitle:""},dialogData:{optionsCount:4,direction:0,defaultItem:{optionsCount:4,type:1,score:""}},SelectbigNoArr:[]}}}},mixins:[ue],data:function(){var e=this.questionData,t=e.commonFields,i=e.dialogData,s=e.questionsDataKey,o=e.modelId,n=(e.questionType,e.markQuestionType),a=e.isAdd,c=e.subjectId,u=this.questionData.originQuestions;n=n||"";""!=n&&N[n];var l={label:N[n],value:n},r=u.length,h={label:SectionToChinese(r),value:r};return{modelId:o,questionEditStatus:!0,startNoForSubjectType:1,questionsDataKey:s,questions:u,commonFields:t,dialogData:i,questionTypeFiledMap:C,bigQuestionNos:[],SelectBigQuestionNos:[],questionTypes:[],defaultQuesType:l,selectOptions:[{label:"二",value:2},{label:"三",value:3},{label:"四",value:4}],defaultSelectOption:h,questionChangeType:-1,questionLength:u.length,isAdd:a,subject:c,topicArrScore:[],errMsg:"",defaultTopicConfig:{startNo:"",endNo:"",score:""}}},components:{SelectItem:w,TopicQuestionItem:ce,SelectLayout:z,FillinblankLayout:B,AnswerLayout:k,SubjectSelect:b,CompositionItem:y},mounted:function(){this.calcBigNo(),this.calcQuesTypes(),this.bindPopHideEvent(),this.calcStartNoForSubjectType(),this.questionsChangeEdit(this.questions)},computed:{defaultBigQues:function(){return this.bigQuestionNos[0]||{}},isSelectType:function(){return[1,2,11].includes(this.commonFields.questionType)},isMoreSelectType:function(){return[2,11].includes(this.commonFields.questionType)},isFillInBlank:function(){return 5===this.commonFields.questionType},isAnswer:function(){return[7,17,"7c"].includes(this.commonFields.questionType)},isChooseAnswer:function(){return 17===this.commonFields.questionType},isComposition:function(){return"7c"===this.commonFields.questionType},hasSmQuestionTopic:function(){return[7,17,5].includes(this.commonFields.questionType)},isZongHe:function(){return[18,19].includes(this.subjectId)},returnQuestionTypes:function(){var e=[8,9].includes(this.subjectId),t=[3].includes(this.subjectId);return t?this.DelQuestionTypes(["11","7c"]):e?this.DelQuestionTypes(["2"]):this.DelQuestionTypes(["2","7c"])},defaultChooseNum:function(){return{label:SectionToChinese(this.commonFields.ChooseNum),value:this.commonFields.ChooseNum}}},watch:{questionLength:{handler:function(e,t){var i=t||0,s=Math.abs(e-i);log("增加的题目数量",s)}},"commonFields.startNo":function(e,t){if(e!==t){var i=this.commonFields.endNo;if(this.isChooseAnswer){var s=+i-+t;i=+e+s}this.questionChangeType=1,log("当前endNo,".concat(i,",当前startNo").concat(e)),this.questionLength=i-+e+1,this.isChooseAnswer&&(this.commonFields.endNo=i)}},"commonFields.endNo":function(e,t){if(e!==t){var i=this.commonFields.startNo;this.questionChangeType=-1,log("当前endNo,".concat(e,",当前startNo").concat(i)),this.questionLength=+e-+i+1}},questions:{handler:function(e){this.questionsChangeEdit(e)},deep:!0},commonFields:{handler:function(e,t){this.commonFieldsChangeEdit(e,t)},deep:!0}},methods:{bindPopHideEvent:function(){var e=this;window.addEventListener("click",(function(t){var i=t.target.className;if("hSelect"===i)e.hideSelectDialog(e.$children);else{var s=e.findParent(t.target,"hSelect");s||e.hideSelectDialog(e.$children)}}),!1)},hideSelectDialog:function(e){var t=this;e.forEach((function(e){e.$children.length&&t.hideSelectDialog(e.$children),"HSelect"===e.$options.name&&e.optionsShow&&e.changeOptionsShowStatus()}))},findParent:function(e,t){var i=!1,s=e.parentNode;while(s&&s.tagName&&"BODY"!==s.tagName){if(s.className.includes("hSelect")){i=!0;break}s=s.parentNode}return i},calcBigNo:function(){for(var e=[],t=1;t<100;t++){var i=SectionToChinese(t);e.push({label:i,value:i})}this.questionData.SelectbigNoArr.forEach((function(t){e.forEach((function(i,s){i.label==t&&e.splice(s,1)}))})),this.questionData.isAdd||e.unshift({label:this.questionData.commonFields.bigNo,value:this.questionData.commonFields.bigNo}),this.bigQuestionNos=e},calcQuesTypes:function(){var e=[];console.log(N),Object.keys(N).forEach((function(t){var i="7c"===t;e.push({label:N[t],value:i?t:+t})}));var t=JSON.parse(JSON.stringify(e));this.questionTypes=e,this.questionTypes[2]=t[4],this.questionTypes[3]=t[2],this.questionTypes[4]=t[3]},changeBigNo:function(e){this.commonFields.bigNo=e.value},calcStartNoForSubjectType:function(){var e=this,t=1,i=JSON.parse(localStorage.getItem("buildQuestions"))||{};for(var s in i){if(!this.isAdd&&s===this.modelId)break;t+=i[s].questions.length}this.startNoForSubjectType=t,this.isAdd&&(this.commonFields.endNo=this.startNoForSubjectType,this.$nextTick((function(){e.commonFields.startNo=e.startNoForSubjectType})))},changeDialogData:function(){var e=this.questionTypeFiledMap[this.commonFields.questionType]+"DialogFields";this.dialogData=this.copyObj(this[e])},changeType:function(e){var t=this,i=this.commonFields;i.startNo,i.endNo;this.commonFields.questionType=e.value,this.defaultQuesType.value=e.value,this.defaultQuesType.label=e.label,this.changeDialogData(),this.questions.forEach((function(e,i){t.$set(t.questions,i,Object(c["a"])(Object(c["a"])({},t.copyObj(t.dialogData.defaultItem)),{},{questionNo:t.startNoForSubjectType+i,score:e.score}))})),this.commonFields.endNo=this.startNoForSubjectType+(this.isChooseAnswer?1:0),this.$nextTick((function(){t.commonFields.startNo=t.startNoForSubjectType})),log("changeType after data:",this.questions),this.isChooseAnswer&&(this.defaultSelectOption={label:"二",value:2})},changeChooseOption:function(e){var t=e.value;this.commonFields.ChooseNum=t},batchChangeFields:function(e,t){var i=this,s=this;s.errMsg="";var o="score"===e,n=this[o?"commonFields":"dialogData"][e];n&&(o?t.score<1&&(s.errMsg="分数格式错误",t.score=""):"optionsCount"===e?(1==this.commonFields.questionType&&(t.optionsCount<2&&(t.optionsCount=2,s.errMsg="选项数格式错误"),t.optionsCount>7&&(t.optionsCount=7,s.errMsg="选项数格式错误")),this.questions.forEach((function(t,s){i.$set(i.questions,s,Object(c["a"])(Object(c["a"])({},t),{},Object(a["a"])({},e,+n)))}))):"halfScore"===e&&this.questions.forEach((function(t,s){i.$set(i.questions,s,Object(c["a"])(Object(c["a"])({},t),{},Object(a["a"])({},e,+n)))})))},changeOptionsCount:function(){var e=this;this.questions.forEach((function(t,i){e.$set(e.questions,i,Object(c["a"])(Object(c["a"])({},t),{},{optionsCount:+e.dialogData.optionsCount}))}))},addQuestionItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("number"===typeof e){var t=this.commonFields,i=t.score,s=t.startNo,o=t.endNo,n={};this.isSelectType&&(n={optionsCount:this.dialogData.optionsCount},this.isMoreSelectType&&(n.halfScore=this.dialogData.halfScore));for(var a=!~this.questionChangeType,u=(this.questions.length,e);u>0;u--)this.questions[a?"push":"unshift"](Object(c["a"])(Object(c["a"])({},this.copyObj(this.dialogData.defaultItem)),{},{score:+i,questionNo:a?+o-u+1:+s+u-1},n));log("---",this.questions)}else this.commonFields.endNo=Number(this.commonFields.endNo)+1},reduceQuestionItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("number"===typeof e){var t=this.questions.length;~this.questionChangeType?this.questions.splice(0,e):this.questions.splice(t-e,t)}else{if(1===this.questionLength)return;this.commonFields.endNo-=1}},changeDirection:function(e){this.dialogData.direction=e,this.$forceUpdate()},changeColumn:function(e){this.dialogData.columns=e.value},changeRowLineHeight:function(e){this.dialogData.rowLineHeight=e.value},changeSocreLimit:function(e){this.dialogData.scoreStyle=e.value},setSmQuesLength:function(e){var t=e.smQuesCount,i=e._index,s=e.type,o=e.smTopicIndex,n=this.questions[i],a=null;a="topicQues"===s?n:n.smTopic[o];var c=a.smQuestion.length;if(c!==t){var u=Math.abs(c-t);if(c>t)a.smQuestion.splice(t,c);else{for(var l,r=[],h=0;h<u;h++)r.push({score:"",symbolKey:se()});(l=a.smQuestion).splice.apply(l,[c,0].concat(r))}}},changeSetSmQuesStatus:function(e){var t=e._index,i=e.status,s=e.index,o=e.type,n=this.questions[t],a=null,c="topicSmQues"===o;a=c?n:n.smTopic[s],i||(a.smQuestion=[]),a.hasSmQuestion=i},setSmQuesScore:function(e){var t=e._index,i=e.score,s=e.index,o=e.smTopicIndex,n=e.type,a=this.questions[t],c=null,u="topicSmQues"===n;c=u?a.smQuestion[s]:a.smTopic[o].smQuestion[s],c.score=i},addSmTopic:function(e){var t=this.questions[e];if(!t.smQuestion.length){var i=this.copyObj(this.dialogData.defaultItem);t.smTopic.push(Object(c["a"])(Object(c["a"])({},i),{},{alias:t.questionNo+"."+(t.smTopic.length+1),topicEditorIndex:t.questionNo+"_"+(t.smTopic.length+1)}))}},removeSmTopic:function(e,t){var i=this.questions[e];i.smTopic.splice(t,1),i.smTopic.forEach((function(e,t){e.alias=i.questionNo+"."+(t+1)}))},setHasHalfScore:function(e){this.dialogData.isAddHalf=e},changeScoreLimit:function(e){var t=e.value;this.dialogData.scoreLimit=t},changeSubject:function(e){var t=e.id,i=e._index,s=void 0===i?"all":i;if("all"!==s){var o=this.questions[s];o.smTopic&&o.smTopic.length>0?o.smTopic.forEach((function(e){e.subject=t})):o.subject=t}else this.questions.forEach((function(e){e.subject=t}))},validateOptions:function(e){e.optionsCount;var t=e.score,i=e.halfScore,s=e.index;(Number(i)>Number(t)||Number(i)==Number(t))&&(e.halfScore=t-.5),0==t&&(e.score=""),this.questions.splice(s,1,Object(c["a"])({},e))},isSameOption:function(e){for(var t=!0,i=0,s=this.questions.length;i<s-1;i++)if(log("compareField-".concat(e,",prevvalue-").concat(this.questions[i][e],",nextvale-").concat(this.questions[i+1][e])),+this.questions[i][e]!==+this.questions[i+1][e]){t=!1;break}return t},hideSettingDialog:function(){document.getElementById("questionEdit").style.display="none",window.QE.questionEditStatus=!1},toRenderData:function(e){var t=[];return this.hasSmQuestionTopic?e.forEach((function(e){var i=e.alias,s=e.questionNo,o=e.scores,n=[];if(o){var a=o.split(",");a.forEach((function(e){n.push({score:e})}))}if(i&&s!=i){var u=t.find((function(e){return e.questionNo===s})),l={alias:i,hasSmQuestion:!1,score:1,smQuestion:n};u?u.smTopic.push(l):(u.smTopic=[l],t.push(u))}else t.push(Object(c["a"])(Object(c["a"])({},e),{},{smQuestion:n}))})):t=e,t},validateSubmit:function(){var e=this;if(!this.commonFields.questionTypeTitle)return this.$tip("题型标题还没有填写~"),!1;var t=!1;if(this.questions.forEach((function(e){""==e.score&&(t=!0)})),""==this.commonFields.questionType)return this.$tip("题型没有选择"),!1;if(0==this.questions.length)return this.$tip("试题数量不能为空"),!1;if(t)return this.$tip("分数不能为空"),!1;var i=!1;return this.questions.forEach((function(t){var s=0;if([1,2,11].includes(t.questionTypeId)&&Number(t.optionsCount)<2)return e.$tip("选项设置错误"),i=!0,!1;if(t.smQuestion.length>0){var o=0;if(t.smQuestion.forEach((function(t){if(Number(t.score)<1)return e.$tip("小问分数设置错误"),i=!0,!1;o=Number(o)+Number(t.score)})),Number(t.score)!==Number(o))return e.$tip("小问分数设置错误"),i=!0,!1}return t.smTopic.length>0&&(t.smTopic.forEach((function(t){if(Number(t.score)<1)return e.$tip("小题分数设置错误"),i=!0,!1;if(s+=Number(t.score),t.smQuestion.length>0){var o=0;if(t.smQuestion.forEach((function(t){if(Number(t.score)<1)return e.$tip("小问分数设置错误"),i=!0,!1;o+=Number(t.score)})),Number(t.score)!==Number(o))return e.$tip("小问分数设置错误"),i=!0,!1}})),Number(t.score)!==Number(s))?(e.$tip("小题分数设置错误"),i=!0,!1):void 0})),!i},addQuestionsToOnlineCard:function(){var e=this.validateSubmit();if(e){log("submit dialogData",this.dialogData),log("submit commonFields",this.commonFields),log("submit questions",this.questions),this.submitDefaultItem={questionNum:1,questionTypeId:0,fullScore:0,optionCount:0,answer:"",marktype:"0",subject:"0",alias:"",scores:""};var t=[];t=this.hasSmQuestionTopic?this.formatSubmitDataForSmTopic():this.formatSubmitData();var i=this.formatBuildQuestions(t);this.isAdd?Print.appendSubject(i,this.modelId):(Print.editSubject(i,this.modelId),Print.getSaveSubjectInfo(i)),this.hideSettingDialog(),document.getElementsByClassName("addTips")[0].style.display="none"}},formatSubmitDataForSmTopic:function(){var e,t=this,i=[],s=this.commonFields.questionType,o=s;return this.questions.forEach((function(n){var a=n.questionNo,u=n.topicNo;if(e=e||a,n.smTopic.length>0)n.smTopic.forEach((function(e,a){var l=e.alias,r=e.score,h=e.topicEditorIndex,p=void 0!=n.subject?n.subject:t.subjectId,d="";e.smQuestion.length&&(d=e.smQuestion.map((function(e){return e.score})).join(",")),i.push(Object(c["a"])(Object(c["a"])({},t.submitDefaultItem),{},{questionTypeId:parseInt(s),questionNum:l,fullScore:r,scores:d,alias:l,markQuestionType:o,subject:p,topicNo:u,topicEditorIndex:void 0===h?l:h}))}));else{var l=n.score,r=n.topicNo,h=n.topicEditorIndex,p=void 0!=n.subject?n.subject:t.subjectId,d="";n.smQuestion.length&&(d=n.smQuestion.map((function(e){return e.score})).join(","));var m=Object(c["a"])(Object(c["a"])({},t.submitDefaultItem),{},{questionTypeId:parseInt(s),questionNum:a,fullScore:l,scores:d,markQuestionType:o,subject:p,topicNo:r,topicEditorIndex:void 0===h?a:h});m.alias=n.alias,t.isChooseAnswer&&(m.groupid=e),i.push(m)}})),i},formatSubmitData:function(){var e=this,t=this.commonFields.questionType,i=t,s=_[i]?_[i]:0;return this.questions.map((function(o){var n=o.questionNo,a=o.optionsCount,u=o.score,l=o.topicNo,r=o.alias,h=o.topicEditorIndex,p=o.halfScore,d=void 0!=o.subject?o.subject:e.subjectId;return Object(c["a"])(Object(c["a"])({},e.submitDefaultItem),{},{questionNum:n,optionCount:a,questionTypeId:parseInt(t),fullScore:u,halfScore:p,markQuestionType:i,marktype:s,subject:d,topicNo:l,alias:r,topicEditorIndex:void 0===h?n:h})}))},formatBuildQuestions:function(e){var t=Print.questionMap,i=this.commonFields,s=i.bigNo,o=i.questionTypeTitle,n=i.questionType,a=Object(c["a"])({questions:e,commonFields:this.commonFields,dialogData:this.dialogData,bigTitle:s+"、"+o,questionType:parseInt(n),markQuestionType:n,originQuestions:this.copyObj(this.questions),modelId:this.modelId},this.dialogData);return t[this.modelId]=a,t},setNewQuestions:function(e){Print.questionMap=e,log("setNewQuestions",e),localStorage.setItem("buildQuestions",JSON.stringify(e))},questionsChangeEdit:function(e){var t=this;this.topicArrScore=[],e.forEach((function(e){t.topicArrScore.push(e.score)}))},commonFieldsChangeEdit:function(e,t){var i=this,s=JSON.parse(localStorage.getItem("buildQuestions"))||{},o=Object.values(s),n=[];o.forEach((function(e){e.modelId!=i.modelId&&e.questions.forEach((function(e){n.push(e.topicNo)}))})),this.commonFields.questionTypeArr.forEach((function(e,t){i.topicNoChange(e,n,t)}))},topicNoChange:function(e,t,i){var s=this,o=Number(e.startNo),n=Number(e.endNo);if(o<1)return e.startNo="",this.questions=[],!1;var a=t.includes(o);if(a)return e.startNo="",s.errMsg="题号格式错误",!1;if(17!==this.commonFields.questionType){var c=t.includes(n);if(c)return e.endNo="",s.errMsg="题号格式错误",!1}var u=0;if(17==this.commonFields.questionType)u=1;else{if(!(n>0))return!1;u=Number(e.endNo)-Number(e.startNo)+1}for(var l=[],r=o;r<o+u;r++)l.push(r);for(var h=function(i){s.errMsg="题号格式错误"==s.errMsg?"":s.errMsg,t.forEach((function(t){if(t==l[i])return e.startNo="",e.endNo="",s.errMsg="题号格式错误",!1}))},p=0;p<l.length;p++)h(p);if(this.commonFields.questionTypeArr.length>1){if(i<this.commonFields.questionTypeArr.length-1)return!1;var d=[];if(17==this.commonFields.questionType||this.commonFields.questionTypeArr.forEach((function(e,t){if(t!=i){var s=Number(e.startNo),o=Number(e.endNo),n=o-s+1;if(s<1)return!1;for(var a=s;a<s+n;a++)d.push(a)}})),d.length<1)return!1;for(var m=d.toString(),f=0;f<l.length;f++)if(s.errMsg="",m.indexOf(l[f])>-1)return e.startNo="",e.endNo="",s.errMsg="题号已占用",!1}this.setTopicConfigList()},setTopicConfigList:function(){var e=this;this.questions=[];var t={};this.isSelectType&&(t={optionsCount:this.dialogData.optionsCount},this.isMoreSelectType&&(t.halfScore=this.dialogData.halfScore)),this.commonFields.questionTypeArr.forEach((function(i,s){if(Number(i.startNo)<1)return!1;for(var o=17==e.commonFields.questionType?e.commonFields.ChooseNum:Number(i.endNo)-Number(i.startNo)+1,n=0;n<o;n++){var a=Object(c["a"])({alias:Number(i.startNo)+n,answer:"",fullScore:i.score,markQuestionType:5,marktype:"0",questionNo:1,topicNo:1,questionTypeId:e.commonFields.questionType,questionTypeText:i.questionTypeText,score:i.score,subject:e.subjectId,smTopic:[],smQuestion:[],hasSmQuestion:!1},t);e.isZongHe&&(18==e.subjectId?a.subject=12:a.subject=15),a.questionNo=17==e.commonFields.questionType?Number(i.startNo)+String.fromCharCode(65+n):Number(i.startNo)+n,a.topicNo=17==e.commonFields.questionType?Number(i.startNo):Number(i.startNo)+n,e.questions.push(a)}}))},addTopicConfig:function(){var e=this,t=!0;if(this.commonFields.questionTypeArr.forEach((function(i){17!=e.commonFields.questionType?""!=i.startNo&&""!=i.endNo||(t=!1):""==i.startNo&&(t=!1)})),t){var i=JSON.parse(JSON.stringify(this.defaultTopicConfig));this.commonFields.questionTypeArr.push(i)}},delTopicConfig:function(e){if(this.commonFields.questionTypeArr.length>1)this.commonFields.questionTypeArr.splice(e,1);else{var t=JSON.parse(JSON.stringify(this.defaultTopicConfig));this.commonFields.questionTypeArr[0]=t,this.questions=[]}this.setTopicConfigList()},DelQuestionTypes:function(e){var t=JSON.parse(JSON.stringify(this.questionTypes));return t.length>0?(e.forEach((function(e){t.forEach((function(i,s){i.value==e&&t.splice(s,1)}))})),t):[]}}},re={mixins:[le]},he=re,pe=(i("7c55"),Object(m["a"])(he,o,n,!1,null,null,null)),de=pe.exports,me=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"h_checkBox"},[i("div",{staticClass:"h_checkItem",class:{checked:e.value}},[i("i"),i("em",[e._v("加入0.5分")]),i("input",{attrs:{type:"checkbox"},domProps:{value:e.value},on:{change:e.changeHandle}})])])},fe=[],be={name:"HCheckbox",props:{value:Boolean},methods:{changeHandle:function(e){this.$emit("input",e.target.checked)}}},ge=be,ve=(i("598d"),Object(m["a"])(ge,me,fe,!1,null,"14180bb2",null)),Se=ve.exports,ye=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"hInput",class:{disabled:e.disabled},style:"width:"+e.cwidth},[i("input",e._b({attrs:{type:"text",disabled:e.disabled},domProps:{value:e.value},on:{input:e.inputHandle,focus:e.focusFn,blur:e.blurFn}},"input",e.$attrs,!1)),e.icon?i("i",{class:e.icon}):e._e()])},qe=[],Te=(i("5e9f"),{name:"HInput",inheritAttrs:!1,props:{value:[String,Number],ctype:{type:String,default:"number"},disabled:{type:Boolean,default:!1},max:{type:Number,default:200},min:{type:Number,default:0},step:{type:Number,default:1},maxLength:Number,minLenth:Number,hwidth:{type:String,default:""},icon:{type:String,default:""}},mounted:function(){},computed:{cwidth:function(){return~this.hwidth.indexOf("px")||~this.hwidth.indexOf("%")?this.hwidth:this.hwidth+"px"}},data:function(){return{inputVal:this.value}},methods:{inputHandle:function(e){},focusFn:function(){this.$emit("focus")},blurFn:function(e){var t=e.target.value;if(""==t)return this.$emit("input",e.target.value),this.$emit("blur",e),!1;"number"===this.ctype?(t=+t.replace(/[^0-9\.]/g,""),t=Math.round(t/this.step)*this.step,t>this.max&&this.max?e.target.value=this.max:t<this.min&&this.min?e.target.value=this.min:e.target.value=t):"text"===this.ctype&&(t=t.replace(/(^\s+)|(\s+$)/g,""),this.maxLength&&t.length>this.maxLength&&(e.target.value=t.substring(0,this.maxLength))),this.$emit("input",e.target.value),this.$emit("blur",e)}}}),Ne=Te,Ce=Object(m["a"])(Ne,ye,qe,!1,null,null,null),_e=Ce.exports,xe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("strong",{staticClass:"hgc_notice",on:{mouseover:e.showNoticeInfo,mouseout:e.hideNoticeInfo}}),i("i",{ref:"noticeContent_"+e.symbolId,staticClass:"noticeContent"},[e._v(e._s(e.msg)+" "),i("b",{ref:"noticeTriangle_"+e.symbolId})])])},Oe=[],je={name:"HNotice",props:{msg:{type:String,default:"小问不需要单独设置模板区域但是每小问需批阅判分"}},data:function(){var e=this._symbol();return{symbolId:e}},methods:{showNoticeInfo:function(e){var t=e.target,i=this.$refs["noticeContent_"+this.symbolId],s=this.$refs["noticeTriangle_"+this.symbolId];i.style.display="block";var o=i.offsetHeight,n=i.offsetWidth,a=t.getBoundingClientRect(),c=a.top,u=a.left;i.style.top=c-o-10+"px",i.style.left=u-n/2+"px",s.style.top=c-10+"px",s.style.left=u+"px"},hideNoticeInfo:function(){var e=this.$refs["noticeContent_"+this.symbolId];e.style.display="none"}}},we=je,Qe=(i("fd3e"),Object(m["a"])(we,xe,Oe,!1,null,"0eccba95",null)),Ie=Qe.exports,Fe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"h_radioBox"},[i("div",{staticClass:"h_radioItem",class:{checked:!e.value},on:{click:function(t){return e.selRadio(0)}}},[i("i"),i("em",[e._v("横向")])]),i("div",{staticClass:"h_radioItem",class:{checked:1===e.value},on:{click:function(t){return e.selRadio(1)}}},[i("i"),i("em",[e._v("纵向")])])])},De=[],$e={name:"HRadio",props:{value:Number},methods:{selRadio:function(e){this.$emit("changeDirection",e)}}},ke=$e,Le=Object(m["a"])(ke,Fe,De,!1,null,null,null),Ee=Le.exports,Ae=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"hSelect",style:"width:"+e.cwidth,on:{click:e.changeOptionsShowStatus}},[i("h-input",{attrs:{value:e.selectedValue,icon:e.iconClass,readonly:"",placeholder:e.placeholder}}),i("transition",{attrs:{name:"slide-fade"}},[i("ul",{directives:[{name:"show",rawName:"v-show",value:e.optionsShow,expression:"optionsShow"}],staticClass:"optionList"},e._l(e.options,(function(t){return i("li",{key:t.label,staticClass:"optionItem",on:{click:function(i){return i.stopPropagation(),e.selectCurrent(t)}}},[e._v(e._s(t.label))])})),0)])],1)},He=[],Me={name:"HSelect",props:{placeholder:String,defaultOption:{type:Object,default:function(){return{}}},immediate:{type:Boolean,default:!0},options:{type:Array,default:function(){return[]}},hwidth:{type:String,default:"100%"}},computed:{cwidth:function(){return~this.hwidth.indexOf("px")||~this.hwidth.indexOf("%")?this.hwidth:this.hwidth+"px"},selectedValue:function(){return this.selectedItem.label||""}},data:function(){return{optionsShow:!1,iconClass:"down",selectedItem:this.defaultOption}},mounted:function(){Object.keys(this.defaultOption).length&&this.immediate&&(this.selectedItem=this.defaultOption,this.$emit("changeOption",this.selectedItem))},watch:{defaultOption:function(e,t){Object.keys(e).length&&(this.selectedItem=e,this.$emit("changeOption",this.selectedItem))}},methods:{changeOptionsShowStatus:function(){this.optionsShow=!this.optionsShow,this.iconClass=this.optionsShow?"up":"down"},selectCurrent:function(e){this.selectedItem=e,this.$emit("changeOption",e),this.changeOptionsShowStatus()}}},Be=Me,Pe=Object(m["a"])(Be,Ae,He,!1,null,null,null),Re=Pe.exports,Je=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"h_switch",class:{open:e.status},on:{click:e.changeStatus}})},Ke=[],Ze={name:"HSwitch",props:{checked:{type:Boolean,default:!1},_index:{type:Number,default:0}},data:function(){return{status:this.checked}},watch:{checked:function(e,t){this.status=this.checked}},methods:{changeStatus:function(){this.status=!this.status,this.$emit("changeStatus",{status:this.status,index:this._index})}}},ze=Ze,Ue=Object(m["a"])(ze,Je,Ke,!1,null,null,null),Ve=Ue.exports,We={HInput:_e,HSelect:Re,HRadio:Ee,HCheck:Se,HSwitch:Ve,HNotice:Ie};for(var Ye in We)s["a"].component(We[Ye].name,We[Ye]);s["a"].config.productionTip=!1,s["a"].prototype.copyObj=ie,s["a"].prototype.subjectId=subjectId,s["a"].prototype._symbol=se,s["a"].prototype.$tip=hgc_layer.msg.bind(hgc_layer),window.log=function(){},window.defaultQuestionData={modelId:guid(),questions:[],originQuestions:[],commonFields:{startNo:"",endNo:"",score:"",questionType:"",bigNo:"一",ChooseNum:2,questionTypeTitle:"",questionTypeArr:[{startNo:"",endNo:"",score:""}]},questionType:1,dialogData:{optionsCount:4,direction:0,defaultItem:{optionsCount:4,type:1,score:""}}},window.QE=new s["a"]({el:"#questionEdit",components:{App:de},data:function(){var e=this.copyObj(defaultQuestionData);return{questionEditStatus:!1,questionData:e}}})},"598d":function(e,t,i){"use strict";var s=i("6fc1"),o=i.n(s);o.a},"5ceb":function(e,t,i){"use strict";var s=i("3ee1"),o=i.n(s);o.a},"6fc1":function(e,t,i){},"7c55":function(e,t,i){"use strict";var s=i("4e66"),o=i.n(s);o.a},a0f0:function(e,t,i){},f871:function(e,t,i){"use strict";var s=i("0f84"),o=i.n(s);o.a},fd3e:function(e,t,i){"use strict";var s=i("0ec9"),o=i.n(s);o.a}});
- //# sourceMappingURL=app.1a74bcb6.js.map
|