var Pt=Object.defineProperty,Tt=Object.defineProperties;var Bt=Object.getOwnPropertyDescriptors;var st=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable;var it=(e,l,n)=>l in e?Pt(e,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[l]=n,Y=(e,l)=>{for(var n in l||(l={}))Ft.call(l,n)&&it(e,n,l[n]);if(st)for(var n of st(l))Qt.call(l,n)&&it(e,n,l[n]);return e},Ne=(e,l)=>Tt(e,Bt(l));import{c as O,w as J,r as j,o as Qe,a as ut,d as rt,i as ce,t as Je,h as Se,b as Me,p as pe,e as dt,E as Ue,u as ct,T as pt,f as qe,g as Jt,j as Xt,k as Yt,l as Gt,m as ht,n as Kt,q as Zt,s as el,v as ft,x as tl,y as ll,z as mt,A as k,B as le,C as y,D as s,F as t,G as w,H as L,I as E,J as B,K as X,L as gt,M as Re,N as se,O as Xe,P as q,Q as Ye,R as vt,S as _t,U as nl,V as ol,W as ye,X as al,Y as sl,Z as il,_ as ul,$ as rl,a0 as Ge,a1 as yt,a2 as dl,a3 as cl,a4 as pl,a5 as hl,a6 as fl,a7 as ml,a8 as gl,a9 as vl,aa as _l,ab as xt,ac as De,ad as bt,ae as yl,af as xl,ag as bl,ah as wl,ai as Vl,aj as Oe,ak as Cl,al as kl}from"./vendor.fb7751d4.js";const $l=function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const c of d)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function n(d){const c={};return d.integrity&&(c.integrity=d.integrity),d.referrerpolicy&&(c.referrerPolicy=d.referrerpolicy),d.crossorigin==="use-credentials"?c.credentials="include":d.crossorigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(d){if(d.ep)return;d.ep=!0;const c=n(d);fetch(d.href,c)}};$l();const wt=Symbol("Vue3DraggableResizable");function Vt(e){const l=window.getComputedStyle(e);return{width:parseFloat(l.getPropertyValue("width")),height:parseFloat(l.getPropertyValue("height"))}}function Ct(e){return(l,n,o)=>{!l||(typeof n=="string"&&(n=[n]),n.forEach(d=>l[e](d,o,{passive:!1})))}}const xe=Ct("addEventListener"),ie=Ct("removeEventListener");function kt(e){if(e&&e.length>0){const l=[];return e.forEach(n=>{$t.includes(n)&&!l.includes(n)&&l.push(n)}),l}else return[]}function zl(){return String(Math.random()).substr(2)+String(Date.now())}function Ll(e,l,n){if(e.disabled.value)return null;const o={row:[],col:[]},{parentWidth:d,parentHeight:c}=l;o.row.push(...e.adsorbRows),o.col.push(...e.adsorbCols),e.adsorbParent.value&&(o.row.push(0,c.value,c.value/2),o.col.push(0,d.value,d.value/2));const p=e.getPositionStore(n);return Object.values(p).forEach(({x:m,y:i,w:V,h:b})=>{o.row.push(i,i+b,i+b/2),o.col.push(m,m+V,m+V/2)}),{row:o.row.reduce((m,i)=>Ne(Y({},m),{[i]:{min:i-5,max:i+5,value:i}}),{}),col:o.col.reduce((m,i)=>Ne(Y({},m),{[i]:{min:i-5,max:i+5,value:i}}),{})}}function K(e){const l=j(e);return[l,o=>(l.value=o,o)]}function Sl(e,l){const[n,o]=K(e.initW),[d,c]=K(e.initH),[p,h]=K(e.x),[m,i]=K(e.y),[V,b]=K(e.active),[r,a]=K(!1),[z,C]=K(!1),[g,$]=K(""),[R,S]=K(1/0),[A,D]=K(1/0),[f,P]=K(e.minW),[v,_]=K(e.minH),M=O(()=>d.value/n.value);return J(n,U=>{l("update:w",U)},{immediate:!0}),J(d,U=>{l("update:h",U)},{immediate:!0}),J(m,U=>{l("update:y",U)}),J(p,U=>{l("update:x",U)}),J(V,(U,oe)=>{l("update:active",U),!oe&&U?l("activated"):oe&&!U&&l("deactivated")}),J(()=>e.active,U=>{b(U)}),{id:zl(),width:n,height:d,top:m,left:p,enable:V,dragging:r,resizing:z,resizingHandle:g,resizingMaxHeight:A,resizingMaxWidth:R,resizingMinWidth:f,resizingMinHeight:v,aspectRatio:M,setEnable:b,setDragging:a,setResizing:C,setResizingHandle:$,setResizingMaxHeight:D,setResizingMaxWidth:S,setResizingMinWidth:P,setResizingMinHeight:_,setWidth:U=>o(Math.floor(U)),setHeight:U=>c(Math.floor(U)),setTop:U=>i(Math.floor(U)),setLeft:U=>h(Math.floor(U))}}function Ml(e){const l=j(0),n=j(0);return Qe(()=>{if(e.value&&e.value.parentElement){const{width:o,height:d}=Vt(e.value.parentElement);l.value=o,n.value=d}}),{parentWidth:l,parentHeight:n}}function Ul(e,l,n){const{width:o,height:d,left:c,top:p,resizingMaxWidth:h,resizingMaxHeight:m,resizingMinWidth:i,resizingMinHeight:V}=n,{setWidth:b,setHeight:r,setTop:a,setLeft:z}=n,{parentWidth:C,parentHeight:g}=l,$={minWidth:O(()=>i.value),minHeight:O(()=>V.value),maxWidth:O(()=>{let S=1/0;return e.parent&&(S=Math.min(C.value,h.value)),S}),maxHeight:O(()=>{let S=1/0;return e.parent&&(S=Math.min(g.value,m.value)),S}),minLeft:O(()=>e.parent?0:-1/0),minTop:O(()=>e.parent?0:-1/0),maxLeft:O(()=>e.parent?C.value-o.value:1/0),maxTop:O(()=>e.parent?g.value-d.value:1/0)},R={setWidth(S){return e.disabledW?o.value:b(Math.min($.maxWidth.value,Math.max($.minWidth.value,S)))},setHeight(S){return e.disabledH?d.value:r(Math.min($.maxHeight.value,Math.max($.minHeight.value,S)))},setTop(S){return e.disabledY?p.value:a(Math.min($.maxTop.value,Math.max($.minTop.value,S)))},setLeft(S){return e.disabledX?c.value:z(Math.min($.maxLeft.value,Math.max($.minLeft.value,S)))}};return Y(Y({},$),R)}const Ke=["mousedown","touchstart"],be=["mouseup","touchend"],we=["mousemove","touchmove"];function Ee(e){return"touches"in e?[e.touches[0].pageX,e.touches[0].pageY]:[e.pageX,e.pageY]}function ql(e,l,n,o,d,c,p){const{left:h,top:m,width:i,height:V,dragging:b,id:r}=l,{setDragging:a,setEnable:z,setResizing:C,setResizingHandle:g}=l,{setTop:$,setLeft:R}=n;let S=0,A=0,D=0,f=0,P=null;const v=document.documentElement,_=H=>{var te;const G=H.target;((te=e.value)==null?void 0:te.contains(G))||(z(!1),a(!1),C(!1),g(""))},M=()=>{a(!1),ie(v,be,M),ie(v,we,U),P=null,c&&(c.updatePosition(r,{x:h.value,y:m.value,w:i.value,h:V.value}),c.setMatchedLine(null))},U=H=>{if(H.preventDefault(),!(b.value&&e.value))return;const[G,te]=Ee(H),ze=G-D,Le=te-f;let ae=S+ze,re=A+Le;if(P!==null){const de={col:[ae,ae+i.value/2,ae+i.value],row:[re,re+V.value/2,re+V.value]},fe={row:de.row.map((T,N)=>{let I=null;return Object.values(P.row).forEach(Q=>{T>=Q.min&&T<=Q.max&&(I=Q.value)}),I!==null&&(N===0?re=I:N===1?re=Math.floor(I-V.value/2):N===2&&(re=Math.floor(I-V.value))),I}).filter(T=>T!==null),col:de.col.map((T,N)=>{let I=null;return Object.values(P.col).forEach(Q=>{T>=Q.min&&T<=Q.max&&(I=Q.value)}),I!==null&&(N===0?ae=I:N===1?ae=Math.floor(I-i.value/2):N===2&&(ae=Math.floor(I-i.value))),I}).filter(T=>T!==null)};c.setMatchedLine(fe)}d("dragging",{x:R(ae),y:$(re)})},oe=H=>{!o.value||(a(!0),S=h.value,A=m.value,D=Ee(H)[0],f=Ee(H)[1],xe(v,we,U),xe(v,be,M),c&&!c.disabled.value&&(P=Ll(c,p,r)))};return J(b,(H,G)=>{!G&&H?(d("drag-start",{x:h.value,y:m.value}),z(!0),a(!0)):(d("drag-end",{x:h.value,y:m.value}),a(!1))}),Qe(()=>{const H=e.value;!H||(H.style.left=h+"px",H.style.top=m+"px",xe(v,Ke,_),xe(H,Ke,oe))}),ut(()=>{!e.value||(ie(v,Ke,_),ie(v,be,M),ie(v,we,U))}),{containerRef:e}}function El(e,l,n,o,d){const{setWidth:c,setHeight:p,setLeft:h,setTop:m}=l,{width:i,height:V,left:b,top:r,aspectRatio:a}=e,{setResizing:z,setResizingHandle:C,setResizingMaxWidth:g,setResizingMaxHeight:$,setResizingMinWidth:R,setResizingMinHeight:S}=e,{parentWidth:A,parentHeight:D}=n;let f=0,P=0,v=0,_=0,M=0,U=0,oe=1,H="",G="";const te=document.documentElement,ze=de=>{de.preventDefault();let[fe,T]=Ee(de),N=fe-M,I=T-U,Q=N,me=I;o.lockAspectRatio&&(N=Math.abs(N),I=N*oe,(Q<0||G==="m"&&me<0)&&(N=-N,I=-I)),H==="t"?(p(P-I),m(_-(V.value-P))):H==="b"&&p(P+I),G==="l"?(c(f-N),h(v-(i.value-f))):G==="r"&&c(f+N),d("resizing",{x:b.value,y:r.value,w:i.value,h:V.value})},Le=()=>{d("resize-end",{x:b.value,y:r.value,w:i.value,h:V.value}),C(""),z(!1),g(1/0),$(1/0),R(o.minW),S(o.minH),ie(te,we,ze),ie(te,be,Le)},ae=(de,fe)=>{if(!o.resizable)return;de.stopPropagation(),C(fe),z(!0),H=fe[0],G=fe[1];let T=o.minH,N=o.minW;if(T/N>a.value?N=T/a.value:T=N*a.value,R(N),S(T),parent){let Q=H==="t"?r.value+V.value:D.value-r.value,me=G==="l"?b.value+i.value:A.value-b.value;o.lockAspectRatio&&(Q/me{ie(te,be,Le),ie(te,we,ze)}),{handlesFiltered:O(()=>o.resizable?kt(o.handles):[]),resizeHandleDown:ae}}function Hl(e,l){const{setWidth:n,setHeight:o,setLeft:d,setTop:c}=l;J(()=>e.w,p=>{n(p)}),J(()=>e.h,p=>{o(p)}),J(()=>e.x,p=>{d(p)}),J(()=>e.y,p=>{c(p)})}const $t=["tl","tm","tr","ml","mr","bl","bm","br"],jl={initW:{type:Number,default:null},initH:{type:Number,default:null},w:{type:Number,default:0},h:{type:Number,default:0},x:{type:Number,default:0},y:{type:Number,default:0},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disabledX:{type:Boolean,default:!1},disabledY:{type:Boolean,default:!1},disabledW:{type:Boolean,default:!1},disabledH:{type:Boolean,default:!1},minW:{type:Number,default:0},minH:{type:Number,default:0},active:{type:Boolean,default:!1},parent:{type:Boolean,default:!1},handles:{type:Array,default:$t,validator:e=>kt(e).length===e.length},classNameDraggable:{type:String,default:"draggable"},classNameResizable:{type:String,default:"resizable"},classNameDragging:{type:String,default:"dragging"},classNameResizing:{type:String,default:"resizing"},classNameActive:{type:String,default:"active"},classNameHandle:{type:String,default:"handle"},lockAspectRatio:{type:Boolean,default:!1}},Al=["activated","deactivated","drag-start","resize-start","dragging","resizing","drag-end","resize-end","update:w","update:h","update:x","update:y","update:active"],Il=rt({name:"Vue3DraggableResizable",props:jl,emits:Al,setup(e,{emit:l}){const n=Sl(e,l),o=ce("identity");let d=null;o===wt&&(d={updatePosition:ce("updatePosition"),getPositionStore:ce("getPositionStore"),disabled:ce("disabled"),adsorbParent:ce("adsorbParent"),adsorbCols:ce("adsorbCols"),adsorbRows:ce("adsorbRows"),setMatchedLine:ce("setMatchedLine")});const c=j(),p=Ml(c),h=Ul(e,p,n);ql(c,n,h,Je(e,"draggable"),l,d,p);const m=El(n,h,p,e,l);return Hl(e,h),Y(Y(Y(Y({containerRef:c,containerProvider:d},n),p),h),m)},computed:{style(){return{width:this.width+"px",height:this.height+"px",top:this.top+"px",left:this.left+"px"}},klass(){return{[this.classNameActive]:this.enable,[this.classNameDragging]:this.dragging,[this.classNameResizing]:this.resizing,[this.classNameDraggable]:this.draggable,[this.classNameResizable]:this.resizable}}},mounted(){if(!this.containerRef)return;this.containerRef.ondragstart=()=>!1;const{width:e,height:l}=Vt(this.containerRef);this.setWidth(this.initW===null?this.w||e:this.initW),this.setHeight(this.initH===null?this.h||l:this.initH),this.containerProvider&&this.containerProvider.updatePosition(this.id,{x:this.left,y:this.top,w:this.width,h:this.height})},render(){return Se("div",{ref:"containerRef",class:["vdr-container",this.klass],style:this.style},[this.$slots.default&&this.$slots.default(),...this.handlesFiltered.map(e=>Se("div",{class:["vdr-handle","vdr-handle-"+e,this.classNameHandle,`${this.classNameHandle}-${e}`],style:{display:this.enable?"block":"none"},onMousedown:l=>this.resizeHandleDown(l,e),onTouchstart:l=>this.resizeHandleDown(l,e)}))])}});var zt=rt({name:"DraggableContainer",props:{disabled:{type:Boolean,default:!0},adsorbParent:{type:Boolean,default:!0},adsorbCols:{type:Array,default:null},adsorbRows:{type:Array,default:null},referenceLineVisible:{type:Boolean,default:!0},referenceLineColor:{type:String,default:"#f00"}},setup(e){const l=Me({}),n=(m,i)=>{l[m]=i},o=m=>{const i=Object.assign({},l);return m&&delete i[m],i},d=Me({matchedLine:null}),c=O(()=>d.matchedLine&&d.matchedLine.row||[]),p=O(()=>d.matchedLine&&d.matchedLine.col||[]),h=m=>{d.matchedLine=m};return pe("identity",wt),pe("updatePosition",n),pe("getPositionStore",o),pe("setMatchedLine",h),pe("disabled",Je(e,"disabled")),pe("adsorbParent",Je(e,"adsorbParent")),pe("adsorbCols",e.adsorbCols||[]),pe("adsorbRows",e.adsorbRows||[]),{matchedRows:c,matchedCols:p}},methods:{renderReferenceLine(){return this.referenceLineVisible?[...this.matchedCols.map(e=>Se("div",{style:{width:"0",height:"100%",top:"0",left:e+"px",borderLeft:`1px dashed ${this.referenceLineColor}`,position:"absolute"}})),...this.matchedRows.map(e=>Se("div",{style:{width:"100%",height:"0",left:"0",top:e+"px",borderTop:`1px dashed ${this.referenceLineColor}`,position:"absolute"}}))]:[]}},render(){return Se("div",{style:{width:"100%",height:"100%",position:"relative"}},[this.$slots.default&&this.$slots.default(),...this.renderReferenceLine()])}});const We=JSON.parse(localStorage.getItem("userInfo")).token,{ze_id:Nl,zs_id:ha,ykl_id:Rl}=JSON.parse(sessionStorage.getItem("ykl_lc")),ge=dt.create({baseURL:window.GLOBAL_CONFIG.api,timeout:180*1e3,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post"});ge.interceptors.request.use(async e=>{var l,n,o;return((l=e.method)==null?void 0:l.toLocaleLowerCase())==="get"?e.params=Object.assign({token:We},e.params):e.data=Object.assign({token:We,client:"web",api:"json",issubmit:((n=e.url)==null?void 0:n.endsWith("add"))||((o=e.url)==null?void 0:o.endsWith("edit"))?"1":void 0},e.data),e},e=>(console.error("request error: ",e),Promise.reject(e)));ge.interceptors.response.use(e=>{var o,d;e.data.code=(d=(o=e.data)==null?void 0:o.code)==null?void 0:d.toString(),e.data.msg=e.data.msg.replaceAll(/<.*?>/g," ");const{code:l,msg:n}=e.data;return l!=="1"&&Ue.error(n),e.data},e=>(console.error(`response error: ${e}`),Promise.reject(e)));var Lt=e=>ge.request(e);function St(e){const l=new FormData;return Object.keys(e).forEach(n=>l.append(n,e[n])),l}const Dl={empty:dt,default:ge,import:e=>ge(Y({timeout:10*60*1e3,transformRequest:[St]},e)),upload:e=>ge(Y({timeout:3*60*1e3,transformRequest:[St]},e)),download:e=>ge({timeout:1*60*1e3,method:"get",params:Y({token:We,limit:1e4,page:1,api:"xls"},e)})},{yzy:Mt}=window.GLOBAL_CONFIG;function Ol(){return Lt({url:Mt+"/yzy/kmksyjlc/format",data:{ze_id:Nl}})}function Wl(e){const{gid:l,pid:n,cid:o}=JSON.parse(sessionStorage.getItem("StepId")),d=JSON.parse(sessionStorage.getItem("ykl_lc"));return d.processList[l][n][o]=1,Lt({method:"post",url:Mt+"/yzy/kmksyjlc/save",data:{api:"json",version:2,token:We,client:"web",ykl_id:d.ykl_id,yk:{ykl_dtkmb:JSON.stringify(e),ykl_lc:JSON.stringify(d)}}}).then(c=>(c.code==="1"&&sessionStorage.setItem("stepsMap",JSON.stringify(d.processList)),Promise.resolve(c))).catch(()=>{Ue({message:"\u64CD\u4F5C\u5931\u8D25",type:"error",grouping:!0})})}const Pe=220,He=j(!0),Ze=j(Pe),Pl=ct(Ze,{duration:300,transition:pt.easeInOutCubic}),Tl=O(()=>Pl.value+"px");function Bl(){He.value=!0,Ze.value=Pe}function Fl(){He.value=!1,Ze.value=0}const Te=300,je=j(!0),et=j(Te),Ql=ct(et,{duration:300,transition:pt.easeInOutCubic}),Jl=O(()=>Ql.value+"px");function Xl(){je.value=!0,et.value=Te}function Yl(){je.value=!1,et.value=0}const ue=j(100),Gl=O(()=>`scale(${(ue.value/100).toFixed(2)})`);function Kl(){ue.value=Ut(ue.value+10)}function Zl(){ue.value<=10||(ue.value=Ut(ue.value-10))}function Ut(e){return e.toFixed(2)*1}const Z=Me([]),ve=j(0);function Be(e){ve.value=e}function en(){const e=(ve.value+1)%Z.length;Be(e)}function tn(){const e=(ve.value+Z.length-1)%Z.length;Be(e)}const x=j({}),Fe=O(()=>Object.keys(x.value)),qt=j({});function Ae(){const e={};let l={};console.log("updateQuestionMap AreaList :>> ",F),F.value.forEach(n=>{n.questions!=null?n.questions.forEach(o=>e[o._name]=o):l[n.noquestions]=n}),x.value=e,qt.value=l}const F=j([]);function ln(e){const n=F.value.splice(e,1)[0];if(n.form&&n.form.areatype===10&&!n.disuse)if(n.questions&&n.questions.length>0){const o=n.questions[0];if(Array.isArray(o.follow)&&o.follow.length>0){const d=o.follow[0],c=Ne(Y({},o),{hash:d,follow:o.follow.slice(1)});F.value.find(h=>h.hash===d).questions.push(c),Ae()}}else console.info("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u9898\u76EE");else n.questions&&n.questions.length>0&&Ae()}function nn(){const e={};return F.value.forEach(l=>{e[l.hash]=l}),e}const u=j({}),W=Me({}),ee=Me({base:{ttcc_w:20,ttcc_h:12},6:{tmsl:5,thjg:1,xxsl:4,plfx:1},7:{tmsl:5,thjg:1,xxsl:4,plfx:1},8:{tmsl:5,thjg:1,xxsl:2,plfx:1}}),he=j(0);async function Et(e,l){try{if(W.mode==="add"&&typeof e=="function"&&!await e())return;he.value++,W.mode==="add"&&typeof l=="function"&&await l()}catch(n){console.error("error :>> ",n)}}function tt(e,l){he.value--}function lt(e,l){return e===""||e===void 0?l.toString():e+"_"+l}const Ie=j(!1);function Ht(e,l){W.idx=e,W.info=l;try{const{paper:n,x:o,y:d,w:c,h:p}=l;W.imgsrc=Z[n].img,l.form?(W.mode="edit",u.value=JSON.parse(JSON.stringify(l.form))):(W.mode="add",u.value={}),Ie.value=!0}catch(n){console.error(n)}}function jt(){var a,z,C,g;F.value[W.idx].form=JSON.parse(JSON.stringify(u.value));const e=F.value[W.idx],{hash:l}=e,n=(z=(a=e==null?void 0:e.questions)==null?void 0:a.map($=>$._name))!=null?z:[],{areatype:o,qsth:d,jsth:c,thjg:p,ssdt:h,rows:m,cols:i,plfx:V,ttcc_w:b,ttcc_h:r}=u.value;if([6,7,8,9,10].includes(o)){if(e.questions=[],[6,7,8].includes(o)){const $=[],R=[];for(let S=d;S<=c;S+=p){const A=lt(h,S);$.push(A),R.push({_name:A,_type:o-5,options:V?i.length:m.length,answer:o===7?[]:void 0,hash:l,idx:(S-d)/p})}$.some(S=>x.value[S]&&!n.some(A=>A===S))?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(e.questions.push(...R),Reflect.deleteProperty(e,"disuse"))}else if(o===9){const $=lt(h,d);x.value[$]&&!n.some(R=>R===$)?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(e.questions.push({_name:$,_type:9-5,options:1,answer:[],hash:l}),Reflect.deleteProperty(e,"disuse"))}else if(o===10){const $=lt(h,d);x.value[$]?x.value[$]._type!==5?qe({title:"\u8B66\u544A",message:"\u5F53\u524D\u5DF2\u5B58\u5728\u76F8\u540C\u8BD5\u9898\u7F16\u53F7\uFF0C\u4E14\u672C\u6B21\u8BD5\u9898\u7C7B\u578B\u4E0E\u4E0A\u6B21\u8BD5\u9898\u7C7B\u578B\u4E0D\u5339\u914D\uFF0C\u672C\u6B21\u5212\u5757\u533A\u57DF\u6570\u636E\u5C06\u4F1A\u4FDD\u5B58\uFF0C\u8BD5\u9898\u6570\u636E\u4E0D\u751F\u6548\uFF0C\u8BF7\u8C03\u6574\u597D\u65E7\u9898\u53F7\u91CD\u65B0\u63D0\u4EA4\u8BD5\u9898\u6570\u636E\uFF1F"}).then(()=>{e.disuse=!0}):(x.value[$].follow=(C=x.value[$].follow)!=null?C:[],x.value[$].follow.push(l),Reflect.deleteProperty(e,"disuse")):(e.questions.push({_name:$,_type:10-5,answer:"",hash:l}),Reflect.deleteProperty(e,"disuse"))}}else e.questions=null,e.noquestions=(g=e.noquestions)!=null?g:o;Ae(),At(),Ie.value=!1}function on(e){qe.confirm("\u662F\u5426\u653E\u5F03\u672C\u6B21\u8BBE\u7F6E?").then(()=>{e(),At()}).catch(()=>{})}function At(){he.value=0,u.value={}}let It=0;const Nt=new Image(0,0),nt=document.createElement("canvas");nt.width=1;nt.height=1;Nt.src=nt.toDataURL("image/jpeg",0);function an(e){e.dataTransfer.setDragImage(Nt,0,0),It=F.value.push({paper:ve.value,x:e.offsetX,y:e.offsetY,w:0,h:0,x2:e.offsetX,y2:e.offsetY,ready:!1,hash:Date.now()})-1}function sn({offsetX:e,offsetY:l}){if(e<0||l<0)return;const n=F.value.length-1,o=F.value[n];o.x2=e,o.y2=l}function un({offsetX:e,offsetY:l}){if(e<0||l<0)return;const n=F.value.length-1,o=F.value[n];o.x2=e,o.y2=l;const{x:d,y:c,x2:p,y2:h}=o;o.x=Math.min(d,p),o.x2=Math.max(d,p),o.y=Math.min(c,h),o.y2=Math.max(c,h),o.w=o.x2-o.x,o.h=o.y2-o.y,o.ready=!0,Ht(It,o)}function rn(e){e.preventDefault(),e.dataTransfer.dropEffect="move"}const{width:Rt,height:dn}=Jt(),cn=Rt.value-Pe-Te-4,pn=O(()=>`${cn}px`);O(()=>dn.value-52-4);const Dt=O(()=>Rt.value-(He.value?Pe:0)-(je.value?Te:0));O(()=>`${Dt.value}px`);J(()=>Dt.value,()=>{});const Ve=j(void 0),Ce=j(void 0),hn=O(()=>`${Ve.value}px`),fn=O(()=>`${Ce.value}px`);function mn(e){return new Promise(l=>{const n=new Image;n.src=e,n.onload=()=>{Ve.value=n.width,Ce.value=n.height,l()}})}const{toggle:gn}=Xt();function vn(){window.location.href=location.origin+"/webapps/page/liankao/#/step/"+Rl}const ot={},ne={num2opt(e){if(ot[e]===void 0){const l=String.fromCharCode(65+e-1);ot[e]=l}return ot[e]},num2pdopt(e){return["T","F"][e-1]},blank2ans(e){return e.join("\u203B")},multi2ans(e){return e.sort().map(l=>ne.num2opt(l)).sort().join("")},judgeAnsByType(e,l){if(l===1)return ne.num2opt(e);if(l===2)return ne.multi2ans(e);if(l===3)return ne.num2pdopt(e);if(l===4)return ne.blank2ans(e);if(l===5)return e},judgeOptByType(e,l){if(l===1||l===2)return ne.num2opt(e);if(l===3)return ne.num2pdopt(e)}};function _n(){qe.confirm("\u662F\u5426\u786E\u8BA4\u7B54\u9898\u5361\u5DF2\u914D\u7F6E\u5B8C\u5168\uFF08\u5305\u62EC\u8BD5\u9898\u5206\u503C\u548C\u7B54\u6848\uFF09\uFF0C\u51C6\u5907\u63D0\u4EA4",{confirmButtonText:"\u786E\u8BA4\u65E0\u8BEF\uFF0C\u63D0\u4EA4",cancelButtonText:"\u6211\u518D\u770B\u770B\uFF0C\u6682\u4E0D\u63D0\u4EA4"}).then(()=>{const e=Ve.value<=Ce.value?"A4":"A3",l={width:Ve.value,height:Ce.value,hq_type:[{type:"1",name:"\u5355\u9009\u9898"},{type:"2",name:"\u591A\u9009\u9898"},{type:"3",name:"\u5224\u65AD\u9898"},{type:"4",name:"\u586B\u7A7A\u9898"},{type:"5",name:"\u95EE\u7B54\u8BA1\u7B97\u9898"}],totalPage:Z.length,locationType:0,pages:[{pageNo:1,rotate:e==="A4"?0:270,imge:{width:Ve.value,height:Ce.value},cut:[],location:0,locationType:0,questions:[],QrCode:{object:{x:0,y:0,width:0,height:0}},studentcode_bar:{object:{x:0,y:0,width:0,height:0}},absent:{x:0,y:0,width:100,height:100},studentcode_fill:{object:[]}},{pageNo:2,rotate:e==="A4"?0:90,imge:{width:Ve.value,height:Ce.value},cut:[],location:0,locationType:0,questions:[]}].splice(0,Z.length),useQrCode:0,info:{area:F.value}},n=nn(),o=l.pages;Object.entries(qt.value).forEach(([c,p])=>{const h=p.form;if(c*1==1&&(o[p.paper].studentcode_bar={object:{x:p.x,y:p.y,width:p.w,height:p.h}}),c*1==2&&(l.useQrCode=1,o[p.paper].QrCode={object:{x:p.x,y:p.y,width:p.w,height:p.h}}),c*1==4&&(o[p.paper].absent={x:p.x,y:p.y,width:p.w,height:p.h}),c*1==5&&(o[p.paper].disciplinary={x:p.x,y:p.y,width:p.w,height:p.h}),c*1==3){const m={};h.plfx===0?m.object=h.cols.map((i,V)=>({group:h.rows.map((b,r)=>({optName:r,x:p.x+i,y:p.y+b,width:h.ttcc_w,height:h.ttcc_h}))})):m.object=h.rows.map((i,V)=>({group:h.cols.map((b,r)=>({optName:r,x:p.x+b,y:p.y+i,width:h.ttcc_w,height:h.ttcc_h}))})),o[p.paper].studentcode_fill=m}});const d={};console.log("QuestionKeyList :>> ",Fe.value),console.log("AreaHashMap :>> ",n),Fe.value.forEach((c,p)=>{const h=x.value[c],m=[[],[]],i=n[h.hash],V=i.form,b={answer:ne.judgeAnsByType(h.answer,h._type),id:(p+1).toString(),modelId:"topicType"+h._type,name:h._name.replaceAll("_","-"),type:h._type,score:{full:h.score,half_full:0}};if([1,2,3].includes(h._type))h._type===3&&(b.type=1),h._type===2&&(b.score_part=h.score_part.map(({right_num:r,score:a})=>({right_num:r+"",score:a+""}))),d[i.hash]||(o[i.paper].cut.push({x:i.x,y:i.y,width:i.w,height:i.h,name:i.questions.map(({_name:r})=>r).join()}),d[i.hash]=!0),V.plfx?b.opt=V.cols.map((r,a)=>({optName:ne.judgeOptByType(a+1,h._type),x:i.x+r,y:i.y+V.rows[h.idx],width:V.ttcc_w,height:V.ttcc_h})):b.opt=V.rows.map((r,a)=>({optName:ne.judgeOptByType(a+1,h._type),x:i.x+V.cols[h.idx],y:i.y+r,width:V.ttcc_w,height:V.ttcc_h}));else if([4].includes(h._type)){const r={cut:{x:i.x,y:i.y,width:i.w,height:i.h},scorebox:{x:i.x,y:i.y,width:0,height:0,Score:[""],type:h._type},column:2,rowLinHeight:i.h,scoreStyle:""};Object.assign(b,r)}else if([5].includes(h._type)){const r={cut:{x:i.x,y:i.y,width:i.w,height:i.h,linkparm:1},scorebox:{x:i.x,y:i.y,width:0,height:0,type:h._type,limit:h.score,point:h.score>10?1:0},editorId:h._type+"",marktype:h._type};Object.assign(b,r),Array.isArray(h.follow)&&h.follow.forEach(a=>{const z=JSON.parse(JSON.stringify(b)),C=n[a];delete z.scorebox,z.cut={x:C.x,y:C.y,width:C.w,height:C.h,linkparm:0},i.paper===C.paper?m[0].push(z):i.paper===C.paper-1?m[1].push(z):console.error("\u5B58\u5728\u7B80\u7B54\u9898\u9875\u7801\u95EE\u9898:",C)})}console.log("object :>> "),o[i.paper].questions.push(b),o[i.paper].questions.push(...m[0]),i.paper+1> ",l),Wl(l).then(c=>{c.code==="1"?Ue.success("\u4FDD\u5B58\u6210\u529F"):Ue.error(c.msg)})}).catch(e=>{console.error(e)})}function yn(){gn()}function xn(e){var l;F.value=(l=e.area)!=null?l:[],Ae()}const Ot=j();function bn(e,l){Ot.value=e==null?void 0:e.hash}const Wt={1:"\u6761\u5F62\u7801\u533A\u57DF",2:"\u4E8C\u7EF4\u7801\u533A\u57DF",3:"\u586B\u6D82\u7801\u533A\u57DF",4:"\u7F3A\u8003\u6807\u8BC6\u533A\u57DF",5:"\u8FDD\u7EAA\u6807\u8BC6\u533A\u57DF",6:"\u5355\u9009\u9898\u533A\u57DF",7:"\u591A\u9009\u9898\u533A\u57DF",8:"\u5224\u65AD\u9898\u533A\u57DF",9:"\u586B\u7A7A\u9898\u533A\u57DF",10:"\u7B80\u7B54\u9898\u533A\u57DF"},wn=Object.entries(Wt).map(([e,l])=>({value:e*1,label:l}));var at=(e,l)=>{const n=e.__vccOpts||e;for(const[o,d]of l)n[o]=d;return n};const _e=e=>(vt("data-v-f0d2c87e"),e=e(),_t(),e),Vn={style:{padding:"10px 0px"}},Cn={class:"flex justify-end"},kn=q("\u4E0B\u4E00\u6B65"),$n={class:"flex flex-col justify-center"},zn={class:"flex justify-between"},Ln=q("\u4E0A\u4E00\u6B65"),Sn=q("\u4E0B\u4E00\u6B65"),Mn={class:"flex flex-col justify-start"},Un=_e(()=>w("div",{style:{"font-size":"12px","margin-top":"-12px","margin-bottom":"18px"}}," \uFF08\u53EA\u6709\u590D\u5408\u9898\u4E2D\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u8BE5\u9879\uFF0C\u5176\u4ED6\u9898\u76EE\u4E0D\u7528\uFF1B\u540C\u4E00\u7B80\u7B54\u9898\u4E0B\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u76F8\u540C\u7684\u8BE5\u9009\u9879\uFF09",-1)),qn=_e(()=>w("div",{style:{"font-size":"12px","margin-top":"-12px","margin-bottom":"18px"}}," \uFF08\u53EA\u6709\u590D\u5408\u9898\u4E2D\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u8BE5\u9879\uFF0C\u5176\u4ED6\u9898\u76EE\u4E0D\u7528\uFF1B\u540C\u4E00\u7B80\u7B54\u9898\u4E0B\u7684\u5C0F\u9898\u9700\u8981\u8BBE\u7F6E\u76F8\u540C\u7684\u8BE5\u9009\u9879\uFF09",-1)),En={class:"flex justify-between"},Hn=q("\u4E0A\u4E00\u6B65"),jn=q("\u5B8C\u6210"),An=["src"],In={class:"flex",style:{width:"550px"}},Nn={class:"flex flex-col w-200"},Rn=_e(()=>w("div",{class:"mb-6"},"\u884C\u5750\u6807\uFF1A",-1)),Dn={class:"mb-6 tagrow"},On={class:"flex flex-col w-200"},Wn=_e(()=>w("div",{class:"mb-6"},"\u5217\u5750\u6807\uFF1A",-1)),Pn={class:"mb-6 tagrow"},Tn={class:"flex flex-col w-200"},Bn=_e(()=>w("div",{class:"mb-6"},"\u586B\u6D82\u5C3A\u5BF8\uFF1A",-1)),Fn={class:"mb-6 tagrow"},Qn=_e(()=>w("span",null,"\u5BBD\uFF1A",-1)),Jn={class:"mb-6 tagrow"},Xn=_e(()=>w("span",null,"\u9AD8\uFF1A",-1)),Yn={class:"flex justify-between"},Gn=q("\u4E0A\u4E00\u6B65"),Kn=q("\u5B8C\u6210"),Zn={setup(e){const l=j();function n(){return l.value.validateField("areatype",r=>{if(r)u.value.areatype===3?(u.value.xhws=8,u.value.plfx=0):[6,7,8].includes(u.value.areatype)?(u.value.tmsl=ee[u.value.areatype].tmsl,u.value.thjg=ee[u.value.areatype].thjg,u.value.xxsl=ee[u.value.areatype].xxsl,u.value.plfx=ee[u.value.areatype].plfx):console.info("area type is not support get row & col number");else return!1;return!0})}function o(){u.value.jsth=(u.value.tmsl-1)*u.value.thjg+u.value.qsth}function d(){return l.value.validate(r=>{if(r){u.value.ttcc_w=ee.base.ttcc_w,u.value.ttcc_h=ee.base.ttcc_h;let a,z;u.value.areatype===3?(a=u.value.xhws,z=10):[6,7,8].includes(u.value.areatype)&&(a=u.value.tmsl,z=u.value.xxsl),u.value.plfx===0?(u.value.rows=Array.from({length:z},(C,g)=>Math.round(W.info.h/z*g)),u.value.cols=Array.from({length:a},(C,g)=>Math.round(W.info.w/a*g))):(u.value.rows=Array.from({length:a},(C,g)=>Math.round(W.info.h/a*g)),u.value.cols=Array.from({length:z},(C,g)=>Math.round(W.info.w/z*g)))}else return!1;return!0})}function c(r,a){if(r===1){const z=u.value[a][1]-u.value[a][0];u.value[a].forEach((C,g)=>{u.value[a][g]=u.value[a][0]+z*g})}}function p(r){ee.base.ttcc_w=r}function h(r){ee.base.ttcc_h=r}function m(r){ee[u.value.areatype].tmsl=r}function i(r){ee[u.value.areatype].thjg=r}function V(r){ee[u.value.areatype].xxsl=r}function b(r){ee[u.value.areatype].plfx=r}return(r,a)=>{const z=Yt,C=Gt,g=Ye,$=ht,R=Kt,S=Zt,A=el,D=ft,f=tl,P=ll,v=mt;return k(),le(v,{width:"720px",modelValue:t(Ie),"onUpdate:modelValue":a[21]||(a[21]=_=>Xe(Ie)?Ie.value=_:null),"before-close":t(on),"append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,draggable:""},{default:y(()=>[s(C,{active:t(he),simple:"","finish-status":"success"},{default:y(()=>[s(z,{title:"\u533A\u57DF\u7C7B\u578B\u8BBE\u7F6E"}),s(z,{title:"\u5C5E\u6027\u8BBE\u7F6E"}),s(z,{title:"\u5750\u6807\u8BBE\u7F6E"})]),_:1},8,["active"]),w("div",Vn,[s(P,{ref_key:"formRef",ref:l,model:t(u),"label-width":"100px","label-suffix":":",size:"small"},{default:y(()=>[t(he)===0?(k(),L(E,{key:0},[w("div",Cn,[s(g,{type:"primary",onClick:a[0]||(a[0]=_=>t(Et)(n))},{default:y(()=>[kn]),_:1})]),s($),w("div",$n,[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"areatype",label:"\u533A\u57DF\u7C7B\u578B"},{default:y(()=>[s(S,{modelValue:t(u).areatype,"onUpdate:modelValue":a[1]||(a[1]=_=>t(u).areatype=_),placeholder:""},{default:y(()=>[(k(!0),L(E,null,B(t(wn),({label:_,value:M})=>(k(),le(R,{label:_,value:M},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})])],64)):X("",!0),t(he)===1?(k(),L(E,{key:1},[w("div",zn,[s(g,{type:"primary",onClick:a[2]||(a[2]=_=>t(tt)())},{default:y(()=>[Ln]),_:1}),s(g,{type:"primary",onClick:a[3]||(a[3]=_=>t(Et)(d))},{default:y(()=>[Sn]),_:1})]),s($),w("div",Mn,[t(u).areatype===3?(k(),L(E,{key:0},[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"xhws",label:"\u5B66\u53F7\u4F4D\u6570"},{default:y(()=>[s(D,{modelValue:t(u).xhws,"onUpdate:modelValue":a[4]||(a[4]=_=>t(u).xhws=_)},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"plfx",label:"\u5B66\u53F7\u6392\u5217\u65B9\u5411"},{default:y(()=>[s(S,{modelValue:t(u).plfx,"onUpdate:modelValue":a[5]||(a[5]=_=>t(u).plfx=_),placeholder:""},{default:y(()=>[(k(),L(E,null,B([{label:"\u6A2A\u5411",value:0},{label:"\u7EB5\u5411",value:1}],({label:_,value:M})=>s(R,{label:_,value:M},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})],64)):X("",!0),[6,7,8].includes(t(u).areatype)?(k(),L(E,{key:1},[s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"tmsl",label:"\u9898\u76EE\u6570\u91CF"},{default:y(()=>[s(D,{modelValue:t(u).tmsl,"onUpdate:modelValue":a[6]||(a[6]=_=>t(u).tmsl=_),onChange:m},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"thjg",label:"\u9898\u53F7\u95F4\u9694"},{default:y(()=>[s(D,{modelValue:t(u).thjg,"onUpdate:modelValue":a[7]||(a[7]=_=>t(u).thjg=_),onChange:i},null,8,["modelValue"])]),_:1}),s(A,{label:"\u6240\u5C5E\u590D\u5408\u9898"},{default:y(()=>[s(D,{modelValue:t(u).ssdt,"onUpdate:modelValue":a[8]||(a[8]=_=>t(u).ssdt=_)},null,8,["modelValue"])]),_:1}),Un,s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"qsth",label:"\u8D77\u59CB\u9898\u53F7"},{default:y(()=>[s(D,{modelValue:t(u).qsth,"onUpdate:modelValue":a[9]||(a[9]=_=>t(u).qsth=_),onChange:o},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"jsth",label:"\u7ED3\u675F\u9898\u53F7"},{default:y(()=>[s(D,{modelValue:t(u).jsth,"onUpdate:modelValue":a[10]||(a[10]=_=>t(u).jsth=_)},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"xxsl",label:"\u9009\u9879\u6570\u91CF"},{default:y(()=>[s(D,{modelValue:t(u).xxsl,"onUpdate:modelValue":a[11]||(a[11]=_=>t(u).xxsl=_),onChange:V},null,8,["modelValue"])]),_:1}),s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"plfx",label:"\u9898\u53F7\u6392\u5217\u65B9\u5411"},{default:y(()=>[s(S,{modelValue:t(u).plfx,"onUpdate:modelValue":a[12]||(a[12]=_=>t(u).plfx=_),placeholder:"",onChange:b},{default:y(()=>[(k(),L(E,null,B([{label:"\u6A2A\u5411",value:0},{label:"\u7EB5\u5411",value:1}],({label:_,value:M})=>s(R,{label:_,value:M},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})],64)):X("",!0),[9,10].includes(t(u).areatype)?(k(),L(E,{key:2},[s(A,{label:"\u6240\u5C5E\u590D\u5408\u9898"},{default:y(()=>[s(D,{modelValue:t(u).ssdt,"onUpdate:modelValue":a[13]||(a[13]=_=>t(u).ssdt=_)},null,8,["modelValue"])]),_:1}),qn,s(A,{rules:{required:!0,message:"\u8BE5\u9879\u4E0D\u80FD\u4E3A\u7A7A"},prop:"qsth",label:"\u8D77\u59CB\u9898\u53F7"},{default:y(()=>[s(D,{modelValue:t(u).qsth,"onUpdate:modelValue":a[14]||(a[14]=_=>t(u).qsth=_)},null,8,["modelValue"])]),_:1})],64)):X("",!0),[3,6,7,8,9,10].includes(t(u).areatype)?X("",!0):(k(),le(f,{key:3,description:"\u65E0\u5176\u4ED6\u914D\u7F6E\u9879"}))])],64)):X("",!0),t(he)===2?(k(),L(E,{key:2},[w("div",En,[s(g,{type:"primary",onClick:a[15]||(a[15]=_=>t(tt)())},{default:y(()=>[Hn]),_:1}),s(g,{type:"primary",onClick:t(jt)},{default:y(()=>[jn]),_:1},8,["onClick"])]),s($),[3,6,7,8].includes(t(u).areatype)?(k(),L("div",{key:1,class:gt(["flex flex-col",{"flex-col":t(W).info.w>1060-600}])},[w("div",{class:"relative overhide",style:Re({width:t(W).info.w+"px",height:t(W).info.h+"px"})},[w("img",{src:t(W).imgsrc,class:"absolute",style:Re({left:-t(W).info.x+"px",top:-t(W).info.y+"px"}),alt:""},null,12,An),s(t(zt),null,{default:y(()=>[(k(!0),L(E,null,B(t(u).rows,(_,M)=>(k(),L(E,null,[(k(!0),L(E,null,B(t(u).cols,(U,oe)=>(k(),le(t(Il),{initW:t(u).ttcc_w,initH:t(u).ttcc_h,x:t(u).cols[oe],"onUpdate:x":H=>t(u).cols[oe]=H,y:t(u).rows[M],"onUpdate:y":H=>t(u).rows[M]=H,w:t(u).ttcc_w,"onUpdate:w":a[16]||(a[16]=H=>t(u).ttcc_w=H),h:t(u).ttcc_h,"onUpdate:h":a[17]||(a[17]=H=>t(u).ttcc_h=H),style:{backgroundColor:"#409eff50"}},null,8,["initW","initH","x","onUpdate:x","y","onUpdate:y","w","h"]))),256))],64))),256))]),_:1})],4),s($),w("div",In,[w("div",Nn,[Rn,(k(!0),L(E,null,B(t(u).rows,(_,M)=>(k(),L("div",Dn,[w("span",null,"\u7B2C"+se(M+1)+"\u884C",1),s(D,{size:"small",onChange:U=>c(M,"rows"),modelValue:t(u).rows[M],"onUpdate:modelValue":U=>t(u).rows[M]=U,min:M===0?0:t(u).rows[M-1]+t(u).ttcc_h},null,8,["onChange","modelValue","onUpdate:modelValue","min"])]))),256))]),w("div",On,[Wn,(k(!0),L(E,null,B(t(u).cols,(_,M)=>(k(),L("div",Pn,[w("span",null,"\u7B2C"+se(M+1)+"\u5217",1),s(D,{size:"small",onChange:U=>c(M,"cols"),modelValue:t(u).cols[M],"onUpdate:modelValue":U=>t(u).cols[M]=U,min:M===0?0:t(u).cols[M-1]+t(u).ttcc_w},null,8,["onChange","modelValue","onUpdate:modelValue","min"])]))),256))]),w("div",Tn,[Bn,w("div",Fn,[Qn,s(D,{size:"small",modelValue:t(u).ttcc_w,"onUpdate:modelValue":a[18]||(a[18]=_=>t(u).ttcc_w=_),onChange:p},null,8,["modelValue"])]),w("div",Jn,[Xn,s(D,{size:"small",modelValue:t(u).ttcc_h,"onUpdate:modelValue":a[19]||(a[19]=_=>t(u).ttcc_h=_),onChange:h},null,8,["modelValue"])])])])],2)):(k(),le(f,{key:0,description:"\u65E0\u5176\u4ED6\u914D\u7F6E\u9879"}))],64)):X("",!0),t(he)===3?(k(),L(E,{key:3},[w("div",Yn,[s(g,{type:"primary",onClick:a[20]||(a[20]=_=>t(tt)())},{default:y(()=>[Gn]),_:1}),s(g,{type:"primary",onClick:t(jt)},{default:y(()=>[Kn]),_:1},8,["onClick"])]),s($)],64)):X("",!0)]),_:1},8,["model"])])]),_:1},8,["modelValue","before-close"])}}};var eo=at(Zn,[["__scopeId","data-v-f0d2c87e"]]);const ke=j(!1);function to(){try{Ae(),ke.value=!0}catch(e){console.error(e)}}const lo=["id"],no={props:{id:{type:String,default:`tiny-${Date.now()}-${~~(Math.random()*1e4)}`},htmlClass:{default:"",type:String},modelValue:{default:""},plugins:{default(){return["advlist autolink lists link image charmap preview anchor pagebreak","searchreplace wordcount visualblocks visualchars code fullscreen","insertdatetime media nonbreaking save table directionality","template help emoticons"]},type:Array},toolbar1:{default:"formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat",type:String},toolbar2:{default:"",type:String},other_options:{default(){return{}},type:Object}},emits:["update:modelValue"],setup(e,{emit:l}){const n=e,o=j("");J(()=>n.modelValue,(m,i)=>{o.value=m,p()},{immediate:!0});let d=null,c=null;function p(){const m={selector:`#${n.id}`,base_url:window.GLOBAL_CONFIG.tiny+"/tiny",language:"zh-Hans",toolbar1:n.toolbar1,toolbar2:n.toolbar2,plugins:n.plugins.join(" "),autosave_restore_when_empty:!0,init_instance_callback:i=>{i.on("KeyUp",V=>{h()}),i.on("Change",V=>{i.getContent()!==n.modelValue&&h()}),i.on("init",V=>{i.setContent(o.value)}),d=i},images_upload_handler:(i,V)=>{const b=i.blob();return Dl.upload({url:"upload/main/file",data:{filedata:b},onUploadProgress(r){V(~~(r.loaded/r.total*100|0))}}).then(r=>r.code==="1"?window.GLOBAL_CONFIG.oss+r.data.url:"")}};nl.init(Object.assign(m,n.other_options))}function h(){c!==null&&clearTimeout(c),c=setTimeout(()=>{},300),l("update:modelValue",d.getContent())}return Qe(()=>{o.value=n.modelValue,p()}),ol(()=>{d.destroy()}),(m,i)=>(k(),L("div",null,[ye(w("textarea",{id:e.id,"onUpdate:modelValue":i[0]||(i[0]=V=>o.value=V)},null,8,lo),[[al,o.value]])]))}};const $e=e=>(vt("data-v-bbad25c6"),e=e(),_t(),e),oo={style:{display:"flex","justify-content":"space-between","margin-bottom":"6px"}},ao=q("\u5168\u9009/\u5168\u4E0D\u9009"),so=q("\u6279\u91CF\u8BBE\u7F6E"),io={style:{"text-align":"right"}},uo=q("\u786E\u8BA4"),ro=q("\u5206\u503C\u8BBE\u7F6E"),co=q("\u591A\u9009\u9898\u5224\u5206\u89C4\u5219"),po=q("\u6DFB\u52A0\u89C4\u5219"),ho={style:{"text-align":"left","margin-bottom":"1px"}},fo=q("\u9009\u5BF9"),mo=q("\u9898\u5F97"),go=q(" \u5206\uFF1B"),vo={class:"q_row"},_o={class:"q_id"},yo={class:"q_options"},xo={class:"q_score"},bo=$e(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),wo={class:"q_options"},Vo={class:"q_score"},Co=q("\u5224\u5206\u89C4\u5219"),ko=q("\u6DFB\u52A0\u89C4\u5219"),$o={style:{"text-align":"left","margin-bottom":"1px"}},zo=q("\u9009\u5BF9 "),Lo=q("\u9898\u5F97"),So=q(" \u5206\uFF1B"),Mo=$e(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Uo={class:"q_options"},qo={class:"q_score"},Eo=$e(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Ho={class:"q_options tk"},jo={class:"q_num"},Ao=$e(()=>w("span",null,"\u586B\u7A7A\u6570\uFF1A",-1)),Io={class:"q_score"},No=$e(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Ro={class:"q_options q_text"},Do={class:"q_score"},Oo=$e(()=>w("span",null,"\u5206\u6570\uFF1A",-1)),Wo={style:{"text-align":"center"}},Po=q("\u786E\u8BA4"),To={setup(e){const l=j(!1),n=j(0),o=j([]),d=j({});let c=!1;function p(){c=!c,Fe.value.forEach(b=>{d.value[b]=c})}function h(){Object.keys(d.value).forEach(b=>{d.value[b]===!0&&(x.value[b].score=n.value,x.value[b].score_part=o.value)}),l.value=!1,n.value=0,o.value=[]}J(()=>ke.value,b=>{b||(l.value=!1)});function m(b,r){const a=b.substr(-1).toLocaleUpperCase(),z=a.charCodeAt()-64;z<=x.value[r].options&&z>0&&(x.value[r].answerstr=a,x.value[r].answer=z)}function i(b,r){const z=[...new Set(b.toLocaleUpperCase().split("").map(C=>C.trim()).sort())].map(C=>C.charCodeAt()-64).filter(C=>C<=x.value[r].options&&C>0);x.value[r].answerstr=z.map(C=>String.fromCharCode(C+64)).join(""),x.value[r].answer=z}function V(b,r){const z=b.substr(-1).toLocaleUpperCase().charCodeAt()-64;z===6&&(x.value[r].answerstr="F",x.value[r].answer=2),z===20&&(x.value[r].answerstr="T",x.value[r].answer=1)}return(b,r)=>{const a=Ye,z=ht,C=ft,g=sl,$=il,R=yt,S=ul,A=rl,D=mt;return k(),le(D,{width:"1060px",modelValue:t(ke),"onUpdate:modelValue":r[5]||(r[5]=f=>Xe(ke)?ke.value=f:null),"append-to-body":"","destroy-on-close":""},{default:y(()=>[w("div",oo,[s(a,{onClick:p},{default:y(()=>[ao]),_:1}),s(g,{placement:"bottom-end",title:"\u6279\u91CF\u8BBE\u7F6E",width:365,visible:l.value,"onUpdate:visible":r[3]||(r[3]=f=>l.value=f)},{reference:y(()=>[s(a,{onClick:r[0]||(r[0]=f=>l.value=!l.value)},{default:y(()=>[so]),_:1})]),default:y(()=>[w("div",io,[s(a,{type:"primary",onClick:h,size:"small"},{default:y(()=>[uo]),_:1})]),s(z,{"content-position":"left"},{default:y(()=>[ro]),_:1}),s(C,{min:0,precision:1,modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=f=>n.value=f)},null,8,["modelValue"]),s(z,{"content-position":"left"},{default:y(()=>[co]),_:1}),s(a,{style:{"margin-bottom":"4px"},onClick:r[2]||(r[2]=f=>o.value.push({}))},{default:y(()=>[po]),_:1}),(k(!0),L(E,null,B(o.value,(f,P)=>(k(),L("div",ho,[fo,s(C,{size:"small",min:0,precision:0,modelValue:f.right_num,"onUpdate:modelValue":v=>f.right_num=v},null,8,["modelValue","onUpdate:modelValue"]),mo,s(C,{size:"small",min:0,precision:1,modelValue:f.score,"onUpdate:modelValue":v=>f.score=v},null,8,["modelValue","onUpdate:modelValue"]),go,s(a,{type:"danger",plain:"",size:"small",icon:t(Ge),onClick:v=>o.value.splice(P,1)},null,8,["icon","onClick"])]))),256))]),_:1},8,["visible"])]),(k(!0),L(E,null,B(t(Fe),(f,P)=>(k(),L("div",{key:P},[w("div",vo,[s($,{modelValue:d.value[f],"onUpdate:modelValue":v=>d.value[f]=v},{default:y(()=>[w("div",_o,se(f)+".",1)]),_:2},1032,["modelValue","onUpdate:modelValue"]),t(x)[f]._type===1?(k(),L(E,{key:0},[s(R,{modelValue:t(x)[f].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:v=>m(v,f),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",yo,[(k(!0),L(E,null,B(t(x)[f].options,v=>(k(),le(S,{modelValue:t(x)[f].answer,"onUpdate:modelValue":_=>t(x)[f].answer=_,label:v,border:""},{default:y(()=>[q(se(String.fromCharCode(65+v-1)),1)]),_:2},1032,["modelValue","onUpdate:modelValue","label"]))),256))]),w("div",xo,[bo,s(C,{min:0,precision:1,modelValue:t(x)[f].score,"onUpdate:modelValue":v=>t(x)[f].score=v},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(x)[f]._type===2?(k(),L(E,{key:1},[s(R,{modelValue:t(x)[f].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:v=>i(v,f),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",wo,[s(A,{modelValue:t(x)[f].answer,"onUpdate:modelValue":v=>t(x)[f].answer=v},{default:y(()=>[(k(!0),L(E,null,B(t(x)[f].options,v=>(k(),le($,{label:v,border:""},{default:y(()=>[q(se(String.fromCharCode(65+v-1)),1)]),_:2},1032,["label"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),w("div",Vo,[s(g,{placement:"bottom-end",title:"\u5224\u5206\u89C4\u5219",width:370,trigger:"click"},{reference:y(()=>[s(a,{type:"text",style:{"margin-right":"8px"},onClick:v=>{var _;return t(x)[f].score_part=(_=t(x)[f].score_part)!=null?_:[]}},{default:y(()=>[Co]),_:2},1032,["onClick"])]),default:y(()=>[s(a,{style:{"margin-bottom":"4px"},onClick:v=>t(x)[f].score_part.push({})},{default:y(()=>[ko]),_:2},1032,["onClick"]),(k(!0),L(E,null,B(t(x)[f].score_part,(v,_)=>(k(),L("div",$o,[zo,s(C,{size:"small",min:0,precision:0,modelValue:v.right_num,"onUpdate:modelValue":M=>v.right_num=M},null,8,["modelValue","onUpdate:modelValue"]),Lo,s(C,{size:"small",min:0,precision:1,modelValue:v.score,"onUpdate:modelValue":M=>v.score=M},null,8,["modelValue","onUpdate:modelValue"]),So,s(a,{type:"danger",plain:"",size:"small",icon:t(Ge),onClick:M=>t(x)[f].score_part.splice(_,1)},null,8,["icon","onClick"])]))),256))]),_:2},1024),Mo,s(C,{min:0,precision:1,modelValue:t(x)[f].score,"onUpdate:modelValue":v=>t(x)[f].score=v},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(x)[f]._type===3?(k(),L(E,{key:2},[s(R,{modelValue:t(x)[f].answerstr,placeholder:"\u8F93\u5165\u7B54\u6848\u6216\u4F7F\u7528\u9009\u62E9\u5668",onInput:v=>V(v,f),style:{width:"160px","margin-right":"20px"}},null,8,["modelValue","onInput"]),w("div",Uo,[(k(!0),L(E,null,B(t(x)[f].options,v=>(k(),le(S,{modelValue:t(x)[f].answer,"onUpdate:modelValue":_=>t(x)[f].answer=_,label:v,border:""},{default:y(()=>[q(se(["T","F"][v-1]),1)]),_:2},1032,["modelValue","onUpdate:modelValue","label"]))),256))]),w("div",qo,[Eo,s(C,{min:0,precision:1,modelValue:t(x)[f].score,"onUpdate:modelValue":v=>t(x)[f].score=v},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(x)[f]._type===4?(k(),L(E,{key:3},[w("div",Ho,[(k(!0),L(E,null,B(t(x)[f].options,v=>(k(),le(R,{modelValue:t(x)[f].answer[v-1],"onUpdate:modelValue":_=>t(x)[f].answer[v-1]=_,class:"tk_input",placeholder:`\u7B2C${v}\u7A7A`},{default:y(()=>[q(se(v),1)]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]))),256))]),w("div",jo,[Ao,s(C,{min:0,precision:0,modelValue:t(x)[f].options,"onUpdate:modelValue":v=>t(x)[f].options=v},null,8,["modelValue","onUpdate:modelValue"])]),w("div",Io,[No,s(C,{min:0,precision:1,modelValue:t(x)[f].score,"onUpdate:modelValue":v=>t(x)[f].score=v},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0),t(x)[f]._type===5?(k(),L(E,{key:4},[w("div",Ro,[s(no,{modelValue:t(x)[f].answer,"onUpdate:modelValue":v=>t(x)[f].answer=v},null,8,["modelValue","onUpdate:modelValue"])]),w("div",Do,[Oo,s(C,{min:0,precision:1,modelValue:t(x)[f].score,"onUpdate:modelValue":v=>t(x)[f].score=v},null,8,["modelValue","onUpdate:modelValue"])])],64)):X("",!0)])]))),128)),w("div",Wo,[s(a,{size:"large",type:"primary",onClick:r[4]||(r[4]=f=>ke.value=!1)},{default:y(()=>[Po]),_:1})])]),_:1},8,["modelValue"])}}};var Bo=at(To,[["__scopeId","data-v-bbad25c6"]]);const Fo={class:"container"},Qo={class:"aside la"},Jo=["onClick"],Xo=["src"],Yo={class:"main"},Go={class:"toolbar"},Ko=q("%"),Zo=q("\u4E0A\u4E00\u9875"),ea=q(" \u4E0B\u4E00\u9875 "),ta=q("\u8FD4\u56DE"),la=q("\u8BBE\u7F6E\u8BD5\u9898\u7B54\u6848"),na=q("\u63D0\u4EA4"),oa={class:"handleWrapper"},aa=["src"],sa={class:"aside ra"},ia=q("> "),ua={setup(e){dl(c=>({"55f7318a":t(Tl),"06e08ad8":t(Jl),a0853838:t(pn),"25d0be1a":t(hn),"37258b3f":t(fn),"4fc41292":t(Gl)}));const l=j(!0),n=j(!1);Ol().then(c=>{var m,i,V;const p=(m=c.data)==null?void 0:m.exam,h=(V=(i=c.data)==null?void 0:i.format)==null?void 0:V.info;if(h!==void 0&&xn(h),!Array.isArray(p.fj_content)||p.fj_content.length===0)throw new Error(0);Z.length=0,p.fj_content.forEach(({url:b,name:r},a)=>{if(typeof b=="string"&&b.length!==0)Z.push({idx:a,img:b,name:r});else throw console.error("\u56FE\u7247url\u9519\u8BEF",b),new Error(0)})}).then(()=>mn(Z[0].img)).then(()=>{l.value=!1,n.value=!0}).then(()=>Be(0)).catch(()=>{Ue.error("\u672A\u68C0\u6D4B\u5230\u7B54\u9898\u5361"),l.value=!1});function o(c,p){return c===""||c===void 0?p:c+"_"+p}function d(c){var h,m,i,V,b,r,a,z,C,g;const p=(m=(h=c.row)==null?void 0:h.form)==null?void 0:m.areatype;if(p===void 0)return"\u672A\u8BBE\u7F6E";{const $=Wt[(V=(i=c.row)==null?void 0:i.form)==null?void 0:V.areatype];return[6,7,8].includes(p)?$+" [\u9898\u53F7"+o((b=c.row)==null?void 0:b.form.ssdt,(r=c.row)==null?void 0:r.form.qsth)+"-"+o((a=c.row)==null?void 0:a.form.ssdt,(z=c.row)==null?void 0:z.form.jsth)+"]":[9,10].includes(p)?$+" [\u9898\u53F7"+o((C=c.row)==null?void 0:C.form.ssdt,(g=c.row)==null?void 0:g.form.qsth)+"]":$}}return(c,p)=>{const h=cl,m=Ye,i=yt,V=pl,b=hl,r=fl,a=ml,z=gl,C=vl;return k(),le(z,{locale:t(_l),zIndex:300},{default:y(()=>[ye((k(),L("section",Fo,[l.value?X("",!0):(k(),L(E,{key:0},[w("aside",Qo,[s(h,{class:"scrollbar"},{default:y(()=>[(k(!0),L(E,null,B(t(Z),g=>(k(),L("div",{key:g.idx,class:gt(["paperItem",{actived:t(ve)===g.idx}]),onClick:$=>t(Be)(g.idx)},[w("img",{class:"paperImg",src:g.img,draggable:"false"},null,8,Xo)],10,Jo))),128))]),_:1})]),w("main",Yo,[w("div",Go,[ye(s(m,{icon:t(xt),onClick:t(Bl)},null,8,["icon","onClick"]),[[De,!t(He)]]),ye(s(m,{icon:t(bt),onClick:t(Fl)},null,8,["icon","onClick"]),[[De,t(He)]]),w("div",null,[s(m,{icon:t(yl),onClick:t(Zl)},null,8,["icon","onClick"]),s(i,{style:{width:"140px"},modelValue:t(ue),"onUpdate:modelValue":p[0]||(p[0]=g=>Xe(ue)?ue.value=g:null)},{append:y(()=>[Ko]),_:1},8,["modelValue"]),s(m,{icon:t(xl),onClick:t(Kl)},null,8,["icon","onClick"])]),s(m,{icon:t(bl),onClick:t(yn)},null,8,["icon","onClick"]),s(b,null,{default:y(()=>[s(m,{icon:t(wl),onClick:t(tn)},{default:y(()=>[Zo]),_:1},8,["icon","onClick"]),s(m,{onClick:t(en)},{default:y(()=>[ea,s(V,{class:"el-icon--right"},{default:y(()=>[s(t(Vl))]),_:1})]),_:1},8,["onClick"])]),_:1}),s(m,{onClick:t(vn)},{default:y(()=>[ta]),_:1},8,["onClick"]),s(m,{onClick:t(to),type:"primary",disabled:!n.value},{default:y(()=>[la]),_:1},8,["onClick","disabled"]),s(m,{onClick:t(_n),type:"primary",disabled:!n.value},{default:y(()=>[na]),_:1},8,["onClick","disabled"]),ye(s(m,{icon:t(bt),onClick:t(Xl)},null,8,["icon","onClick"]),[[De,!t(je)]]),ye(s(m,{icon:t(xt),onClick:t(Yl)},null,8,["icon","onClick"]),[[De,t(je)]])]),w("div",oa,[s(t(zt),{class:"handleBar",onDragstart:Oe(t(an),["stop"]),onDrag:Oe(t(sn),["stop"]),onDragend:Oe(t(un),["stop"]),onDragover:Oe(t(rn),["stop"]),draggable:"true"},{default:y(()=>[w("img",{class:"mainImg",src:t(Z)[t(ve)].img},null,8,aa),(k(!0),L(E,null,B(t(F).filter(g=>g.paper===t(ve)),(g,$)=>(k(),L("div",{style:Re({position:"absolute",left:Math.min(g.x,g.x2)+"px",top:Math.min(g.y,g.y2)+"px",width:Math.abs(g.x2-g.x)+"px",height:Math.abs(g.y2-g.y)+"px",backgroundColor:t(Ot)===g.hash?"#409eff80":"#409eff30",zIndex:15})},null,4))),256))]),_:1},8,["onDragstart","onDrag","onDragend","onDragover"])])]),w("aside",sa,[s(h,{style:{height:"100%"}},{default:y(()=>[s(a,{data:t(F),"highlight-current-row":"",onCurrentChange:t(bn),size:"small"},{default:y(()=>[s(r,{type:"index",label:"\u5E8F\u53F7",width:"44"}),s(r,{label:"\u7C7B\u578B",width:"auto"},{default:y(g=>[w("span",{style:Re(g.row.disuse&&"text-decoration:line-through;color:var(--el-text-color-disabled)")},se(d(g)),5)]),_:1}),ia,s(r,{prop:"paper",label:"\u9875\u7801",width:"44"},{default:y(g=>[w("span",null,se(g.row.paper+1),1)]),_:1}),s(r,{fixed:"right",label:"\u64CD\u4F5C",width:"60"},{default:y(g=>[s(m,{type:"text",size:"small",icon:t(Cl),onClick:$=>t(Ht)(g.$index,g.row)},null,8,["icon","onClick"]),s(m,{type:"text",size:"small",icon:t(Ge),onClick:$=>t(ln)(g.$index)},null,8,["icon","onClick"])]),_:1})]),_:1},8,["data","onCurrentChange"])]),_:1})]),s(eo),s(Bo)],64))])),[[C,l.value]])]),_:1},8,["locale"])}}};var ra=at(ua,[["__scopeId","data-v-f1a4638e"]]);const da=kl(ra);da.mount("#app");