index.26656681.js 47 KB

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