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.

1 line
6.4 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d207eed"],{a349:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e._self._c;return t("div",e._l(e.list,(function(s,i){return t("div",{key:s.id,staticClass:"d-flex my-2 justify-space-between"},[t("p",{staticStyle:{margin:"0 0 10px 0 !important"}},[e._v(e._s(s.showTitle)+":")]),"textarea"===s.showForm?t("div",{staticStyle:{width:"60%"}},[0===s.calcType?t("div",{staticClass:"d-flex flex-wrap justify-start"},[e._l(e.processList,(function(s,i){return[t("a-popconfirm",{key:i,attrs:{title:"是否确定删除?","ok-text":"是","cancel-text":"否",disabled:e.recordsDisabled},on:{confirm:function(t){return e.delPro(i)}}},[t("a-tag",{staticClass:"mt-2",staticStyle:{width:"70px","text-align":"center","margin-bottom":"4px"},attrs:{color:"#0038c5"}},[e._v(" "+e._s(s.name)+" ")])],1)]}))],2):t("a-textarea",{staticStyle:{height:"120px"},attrs:{disabled:e.recordsDisabled},model:{value:s.answers[0],callback:function(t){e.$set(s.answers,0,t)},expression:"item.answers[0]"}})],1):"number"===s.showForm?t("div",{staticClass:"d-flex",staticStyle:{width:"60%"}},[3===s.type?[t("a-button",{attrs:{disabled:e.recordsDisabled||!e.canTime,icon:"minus"},on:{click:e.numberTimeDel}}),t("a-input-number",{staticClass:"flex-1",attrs:{min:0,disabled:e.recordsDisabled},on:{change:e.handleNumChange},model:{value:e.canTime,callback:function(t){e.canTime=t},expression:"canTime"}}),t("a-button",{attrs:{icon:"plus",disabled:e.recordsDisabled},on:{click:e.numberTimeAdd}})]:[t("a-button",{attrs:{disabled:e.recordsDisabled||0==s.answers||s.answers[0]<=0,icon:"minus"},on:{click:function(t){return e.reduceAnswer(i)}}}),t("a-input-number",{staticClass:"flex-1",attrs:{min:0,disabled:e.recordsDisabled},model:{value:s.answers[0],callback:function(t){e.$set(s.answers,0,t)},expression:"item.answers[0]"}}),t("a-button",{attrs:{disabled:e.recordsDisabled,icon:"plus"},on:{click:function(t){return e.increaseAnswer(i)}}})]],2):"radio"===s.showForm?t("div",{staticStyle:{width:"60%"}},[t("a-radio-group",{staticClass:"d-flex flex-wrap",class:s.options.length>4?"flex-column":"",attrs:{"default-value":s.answers[0]?s.answers[0]:"",disabled:e.recordsDisabled},on:{change:function(t){return e.changeRadio(t,i)}}},e._l(s.options,(function(s){return t("a-radio",{key:s.dataKey,staticClass:"mb-3 pr-3 txtUpsideDown",attrs:{value:s.dataKey}},[e._v(" "+e._s(s.dataValue)+" ")])})),1)],1):e._e()])})),0)},a=[],r=(s("14d9"),s("2f62")),n={name:"OtherRecordsCopy",props:{question:{type:Array,default:()=>[]},recordsDisabled:{type:Boolean,default:()=>!1}},data(){return{str:"其他记录",list:[],correctNum:0,correctList:[],processList:[],insertNum:0,repeatNum:0,time:0}},computed:{...Object(r["e"])("ht",["Steps","timeNum"]),canTime:{get(){return this.timeNum},set(e){this.setTimeNum(e)}}},watch:{Steps(e,t){if(e<t){let{list:t}=this,s=JSON.parse(localStorage.getItem("Arr"+e));console.log("processList: ",s,e),localStorage.removeItem("Arr"+e);let i=[];for(let e=0;e<(null===s||void 0===s?void 0:s.length);e++)-1===i.indexOf(s[e].name)&&i.push(s[e].name);console.log("Arr11: ",i),this.list=[...t],this.$emit("Reevaluate")}}},created(){this.list=[...this.question],this.getAnswers();let e=this.list.find(e=>1===e.calcType&&3===e.type);e&&e.answers[0]&&this.setTimeNum(e.answers[0])},methods:{...Object(r["d"])("ht",["setSteps","setTimeNum"]),numberTimeDel(){let e=this.timeNum-1;this.handleNumChange(e)},numberTimeAdd(){let e=this.timeNum+1;this.handleNumChange(e)},handleNumChange(e){this.setTimeNum(e);let t=this.list.find(e=>1===e.calcType&&3===e.type);const s=this.list.findIndex(e=>1===e.calcType&&3===e.type);t.answers[0]=this.timeNum,this.list[s]},getAnswers(){let{list:e}=this;for(let a=0;a<this.list.length;a++){if(0===e[a].calcType&&e[a].answers.length){var t=Date.now(),s=e[a].answers[0].split(","),i=[];for(let e=0;e<s.length;e++){let a={time:t,name:s[e]};i.push(a)}this.processList=[...i]}1===e[a].calcType&&1===e[a].type&&(this.correctNum=e[a].answers[0]),1===e[a].calcType&&2===e[a].type&&(this.insertNum=e[a].answers[0]),1===e[a].c