(function(t){function e(e){for(var s,a,c=e[0],l=e[1],u=e[2],h=0,d=[];hi?this.addQuestionItems(s):this.reduceQuestionItems(s))}},"commonFields.startNo":function(t,e){if(t!==e){var i=this.commonFields.endNo;if(this.isChooseAnswer){var s=+i-+e;i=+t+s}this.questionChangeType=1,log("当前endNo,".concat(i,",当前startNo").concat(t)),this.questionLength=i-+t+1,this.isChooseAnswer&&(this.commonFields.endNo=i)}},"commonFields.endNo":function(t,e){if(t!==e){var i=this.commonFields.startNo;this.questionChangeType=-1,log("当前endNo,".concat(t,",当前startNo").concat(i)),this.questionLength=+t-+i+1}}},methods:{bindPopHideEvent:function(){var t=this;window.addEventListener("click",(function(e){var i=e.target.className;if("hSelect"===i)t.hideSelectDialog(t.$children);else{var s=t.findParent(e.target,"hSelect");s||t.hideSelectDialog(t.$children)}}),!1)},hideSelectDialog:function(t){var e=this;t.forEach((function(t){t.$children.length&&e.hideSelectDialog(t.$children),"HSelect"===t.$options.name&&t.optionsShow&&t.changeOptionsShowStatus()}))},findParent:function(t,e){var i=!1,s=t.parentNode;while(s&&"BODY"!==s.tagName){if(s.className.includes("hSelect")){i=!0;break}s=s.parentNode}return i},calcBigNo:function(){for(var t=[],e=1;e<100;e++){var i=SectionToChinese(e);t.push({label:i,value:i})}this.bigQuestionNos=t},calcQuesTypes:function(){var t=[];Object.keys(et).forEach((function(e){var i="7c"===e;t.push({label:et[e],value:i?e:+e})})),this.questionTypes=t},changeBigNo:function(t){this.commonFields.bigNo=t.value},calcStartNoForSubjectType:function(){var t=this,e=1,i=JSON.parse(localStorage.getItem("buildQuestions"))||{};for(var s in i){if(!this.isAdd&&s===this.modelId)break;e+=i[s].questions.length}this.startNoForSubjectType=e,this.isAdd&&(this.commonFields.endNo=this.startNoForSubjectType,this.$nextTick((function(){t.commonFields.startNo=t.startNoForSubjectType})))},changeDialogData:function(){var t=this.questionTypeFiledMap[this.commonFields.questionType]+"DialogFields";this.dialogData=this.copyObj(this[t])},changeType:function(t){var e=this,i=this.commonFields;i.startNo,i.endNo;this.commonFields.questionType=t.value,this.changeDialogData(),this.questions.forEach((function(t,i){e.$set(e.questions,i,Object(c["a"])(Object(c["a"])({},e.copyObj(e.dialogData.defaultItem)),{},{questionNo:e.startNoForSubjectType+i,score:t.score}))})),this.commonFields.endNo=this.startNoForSubjectType+(this.isChooseAnswer?1:0),this.$nextTick((function(){e.commonFields.startNo=e.startNoForSubjectType})),log("changeType after data:",this.questions),this.isChooseAnswer&&(this.defaultSelectOption={label:"二",value:2})},changeChooseOption:function(t){var e=t.value;this.commonFields.endNo=this.commonFields.startNo+e-1},batchChangeFields:function(t){var e=this,i="score"===t,s=this[i?"commonFields":"dialogData"][t];s&&(this.questions.forEach((function(i,n){e.$set(e.questions,n,Object(c["a"])(Object(c["a"])({},i),{},Object(a["a"])({},t,+s)))})),console.log(this.questions))},changeOptionsCount:function(){var t=this;this.questions.forEach((function(e,i){t.$set(t.questions,i,Object(c["a"])(Object(c["a"])({},e),{},{optionsCount:+t.dialogData.optionsCount}))}))},addQuestionItems:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("number"===typeof t){var e=this.commonFields,i=e.score,s=e.startNo,n=e.endNo,o={};this.isSelectType&&(o={optionsCount:this.dialogData.optionsCount},this.isMoreSelectType&&(o.halfScore=this.dialogData.halfScore));for(var a=!~this.questionChangeType,l=(this.questions.length,t);l>0;l--)this.questions[a?"push":"unshift"](Object(c["a"])(Object(c["a"])({},this.copyObj(this.dialogData.defaultItem)),{},{score:+i,questionNo:a?+n-l+1:+s+l-1},o));log("---",this.questions)}else this.commonFields.endNo+=1},reduceQuestionItems:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("number"===typeof t){var e=this.questions.length;~this.questionChangeType?this.questions.splice(0,t):this.questions.splice(e-t,e)}else{if(1===this.questionLength)return;this.commonFields.endNo-=1}},changeDirection:function(t){this.dialogData.direction=t,this.$forceUpdate()},changeColumn:function(t){this.dialogData.columns=t.value},changeRowLineHeight:function(t){this.dialogData.rowLineHeight=t.value},changeSocreLimit:function(t){this.dialogData.scoreStyle=t.value},setSmQuesLength:function(t){var e=t.smQuesCount,i=t._index,s=t.type,n=t.smTopicIndex,o=this.questions[i],a=null;a="topicQues"===s?o:o.smTopic[n];var c=a.smQuestion.length;if(c!==e){var l=Math.abs(c-e);if(c>e)a.smQuestion.splice(e,c);else{for(var u,r=[],h=0;hthis.max&&this.max?t.target.value=this.max:ethis.maxLength&&(t.target.value=e.substring(0,this.maxLength))),this.$emit("input",t.target.value),this.$emit("blur",t)}}}),_t=qt,xt=Object(m["a"])(_t,St,yt,!1,null,null,null),Tt=xt.exports,Ot=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("strong",{staticClass:"hgc_notice",on:{mouseover:t.showNoticeInfo,mouseout:t.hideNoticeInfo}}),i("i",{ref:"noticeContent_"+t.symbolId,staticClass:"noticeContent"},[t._v(t._s(t.msg)+" "),i("b",{ref:"noticeTriangle_"+t.symbolId})])])},Ct=[],wt={name:"HNotice",props:{msg:{type:String,default:"小问不需要单独设置模板区域但是每小问需批阅判分"}},data:function(){var t=this._symbol();return{symbolId:t}},methods:{showNoticeInfo:function(t){var e=t.target,i=this.$refs["noticeContent_"+this.symbolId],s=this.$refs["noticeTriangle_"+this.symbolId];i.style.display="block";var n=i.offsetHeight,o=i.offsetWidth,a=e.getBoundingClientRect(),c=a.top,l=a.left;i.style.top=c-n-10+"px",i.style.left=l-o/2+"px",s.style.top=c-10+"px",s.style.left=l+"px"},hideNoticeInfo:function(){var t=this.$refs["noticeContent_"+this.symbolId];t.style.display="none"}}},jt=wt,Nt=(i("ed8d"),Object(m["a"])(jt,Ot,Ct,!1,null,"12cf78dc",null)),Qt=Nt.exports,It=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"h_radioBox"},[i("div",{staticClass:"h_radioItem",class:{checked:!t.value},on:{click:function(e){return t.selRadio(0)}}},[i("i"),i("em",[t._v("横向")])]),i("div",{staticClass:"h_radioItem",class:{checked:1===t.value},on:{click:function(e){return t.selRadio(1)}}},[i("i"),i("em",[t._v("纵向")])])])},Ft=[],kt={name:"HRadio",props:{value:Number},methods:{selRadio:function(t){this.$emit("changeDirection",t)}}},Dt=kt,$t=Object(m["a"])(Dt,It,Ft,!1,null,null,null),Lt=$t.exports,Ht=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"hSelect",style:"width:"+t.cwidth,on:{click:t.changeOptionsShowStatus}},[i("h-input",{attrs:{value:t.selectedValue,icon:t.iconClass,readonly:"",placeholder:t.placeholder}}),i("transition",{attrs:{name:"slide-fade"}},[i("ul",{directives:[{name:"show",rawName:"v-show",value:t.optionsShow,expression:"optionsShow"}],staticClass:"optionList"},t._l(t.options,(function(e){return i("li",{key:e.label,staticClass:"optionItem",on:{click:function(i){return i.stopPropagation(),t.selectCurrent(e)}}},[t._v(t._s(e.label))])})),0)])],1)},Et=[],Mt={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(t,e){Object.keys(t).length&&(this.selectedItem=t,this.$emit("changeOption",this.selectedItem))}},methods:{changeOptionsShowStatus:function(){this.optionsShow=!this.optionsShow,this.iconClass=this.optionsShow?"up":"down"},selectCurrent:function(t){this.selectedItem=t,this.$emit("changeOption",t),this.changeOptionsShowStatus()}}},At=Mt,Bt=Object(m["a"])(At,Ht,Et,!1,null,null,null),Rt=Bt.exports,Pt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"h_switch",class:{open:t.status},on:{click:t.changeStatus}})},Jt=[],Kt={name:"HSwitch",props:{checked:{type:Boolean,default:!1},_index:{type:Number,default:0}},data:function(){return{status:this.checked}},methods:{changeStatus:function(){this.status=!this.status,this.$emit("changeStatus",{status:this.status,index:this._index})}}},zt=Kt,Zt=Object(m["a"])(zt,Pt,Jt,!1,null,null,null),Ut=Zt.exports,Vt={HInput:Tt,HSelect:Rt,HRadio:Lt,HCheck:vt,HSwitch:Ut,HNotice:Qt};for(var Wt in Vt)s["a"].component(Vt[Wt].name,Vt[Wt]);s["a"].config.productionTip=!1,s["a"].prototype.copyObj=X,s["a"].prototype.subjectId=19,s["a"].prototype._symbol=tt,s["a"].prototype.$tip=hgc_layer.msg.bind(hgc_layer),window.log=function(){},window.defaultQuestionData={modelId:guid(),questions:[{optionsCount:4,questionNo:1,score:5,type:1}],originQuestions:[{optionsCount:4,questionNo:1,score:5,type:1}],commonFields:{startNo:1,endNo:1,score:5,questionType:1,bigNo:"一",questionTypeTitle:""},questionType:1,dialogData:{optionsCount:4,direction:0,defaultItem:{optionsCount:4,type:1,score:5}}},window.QE=new s["a"]({el:"#questionEdit",components:{App:dt},data:function(){var t=this.copyObj(defaultQuestionData);return{questionEditStatus:!1,questionData:t}}})},"5ceb":function(t,e,i){"use strict";var s=i("e1ae"),n=i.n(s);n.a},"79d2":function(t,e,i){},"7c55":function(t,e,i){"use strict";var s=i("2395"),n=i.n(s);n.a},ace4:function(t,e,i){"use strict";var s=i("3223"),n=i.n(s);n.a},b69f:function(t,e,i){"use strict";var s=i("79d2"),n=i.n(s);n.a},e1ae:function(t,e,i){},ed8d:function(t,e,i){"use strict";var s=i("1051"),n=i.n(s);n.a}}); //# sourceMappingURL=app.ae517b1b.js.map