1 |
- import{d as L,f as F,o as C,c as D,j as c,a as l,G as S,w as d,A as U,ak as B,r as v,af as X,C as Y,D as J,_ as j,e as P,Y as K,a0 as $,W as G,E as O,h as A,u as p,T as Q,U as Z,b as z,t as N,n as R,ae as q,X as ee,F as M,a2 as V,al as te,a5 as se,am as oe,ah as ne,a7 as le,an as ae,ao as ue,ap as ie,B as b,g as de,a1 as I,ag as ce,aq as re,ar as pe,as as ge,at as me}from"./index.d7eb9798.js";import{I as ve,a as T}from"./right-fill-pano.vue_vue_type_style_index_0_scoped_fd9c780b_lang.6a7c9c7f.js";import{R as _e}from"./right-fill-pano.ba0f0030.js";const H=r=>(Y("data-v-1d4d8f76"),r=r(),J(),r),fe={class:"edit-hot-layer"},ye={class:"edit-hot-item"},Fe={class:"edit-title"},he=U(" \u6807\u6CE8 "),Ee=H(()=>c("span",null,"\u9057\u7559\u90E8\u4F4D\uFF1A",-1)),ke=H(()=>c("span",null,"\u63D0\u53D6\u65B9\u6CD5\uFF1A",-1)),Ce=H(()=>c("span",null,"\u63D0\u53D6\u4EBA\uFF1A",-1)),we=["onClick"],xe={class:"edit-hot"},Ve=U(" \u786E\u5B9A "),be=L({__name:"edit",props:{data:null},emits:["quit","save"],setup(r,{emit:_}){const h=r,e=F({...h.data,images:[...h.data.images]}),w=()=>{e.value.title.trim()?e.value.images.length?_("save",e.value):B.error("\u81F3\u5C11\u4E0A\u4F20\u4E00\u5F20\u56FE\u7247\uFF01"):B.error("\u6807\u6CE8\u6807\u9898\u5FC5\u987B\u586B\u5199\uFF01")},x=g=>{const s=Array.isArray(g)?g:[g];e.value.images=s.map(o=>typeof o=="string"||"blob"in o?o:(console.log(o),{blob:o.file,url:o.preview}))},f=async g=>{const s=e.value.images.indexOf(g);~s&&await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6570\u636E\u5417\uFF1F")&&e.value.images.splice(s,1)};return(g,s)=>{const o=v("ui-icon"),n=v("ui-input");return C(),D("div",fe,[c("div",ye,[c("h3",Fe,[he,l(o,{type:"close",ctrl:"",onClick:s[0]||(s[0]=S(t=>g.$emit("quit"),["stop"])),class:"edit-close"})]),l(n,{require:"",class:"input",width:"100%",placeholder:"\u8BF7\u8F93\u5165\u70ED\u70B9\u6807\u9898",type:"text",modelValue:e.value.title,"onUpdate:modelValue":s[1]||(s[1]=t=>e.value.title=t),maxlength:"15"},null,8,["modelValue"]),l(n,{class:"input",width:"100%",height:"158px",placeholder:"\u7279\u5F81\u63CF\u8FF0\uFF1A",type:"richtext",modelValue:e.value.desc,"onUpdate:modelValue":s[2]||(s[2]=t=>e.value.desc=t),maxlength:200},null,8,["modelValue"]),l(n,{class:"input preplace",width:"100%",placeholder:"",type:"text",modelValue:e.value.part,"onUpdate:modelValue":s[3]||(s[3]=t=>e.value.part=t)},{preIcon:d(()=>[Ee]),_:1},8,["modelValue"]),l(n,{class:"input preplace",width:"100%",placeholder:"",type:"text",modelValue:e.value.method,"onUpdate:modelValue":s[4]||(s[4]=t=>e.value.method=t)},{preIcon:d(()=>[ke]),_:1},8,["modelValue"]),l(n,{class:"input preplace",width:"100%",type:"text",placeholder:"",modelValue:e.value.principal,"onUpdate:modelValue":s[5]||(s[5]=t=>e.value.principal=t)},{preIcon:d(()=>[Ce]),_:1},8,["modelValue"]),l(n,{class:"input",type:"file",width:"100%",height:"225px",preview:"",placeholder:"\u4E0A\u4F20\u56FE\u7247",othPlaceholder:"\u652F\u6301JPG\u3001PNG\u56FE\u7247\u683C\u5F0F\uFF0C\u5355\u5F20\u4E0D\u8D85\u8FC75MB\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F209\u5F20\u3002",accept:".jpg, .png",disable:!0,multiple:!0,maxSize:5*1024*1024,maxLen:9,modelValue:e.value.images,"onUpdate:modelValue":x},{valuable:d(()=>[l(ve,{tagging:e.value,hideInfo:!0},{icons:d(({active:t})=>[c("span",{onClick:i=>f(t),class:"del-file"},[l(o,{type:"del",ctrl:""})],8,we)]),_:1},8,["tagging"])]),_:1},8,["modelValue"]),c("div",xe,[c("span",{onClick:w,class:"fun-ctrl"},[l(o,{type:"edit"}),Ve])])])])}}});const Te=j(be,[["__scopeId","data-v-1d4d8f76"]]),Pe={class:"info"},De=["src"],Ie=L({__name:"sign",props:{tagging:null,selected:{type:Boolean}},emits:["delete","edit","select","flyPositions"],setup(r,{emit:_}){const h=r,e=P(()=>K(h.tagging.styleId)),w=P(()=>$(h.tagging)),x=P(()=>w.value.map(s=>G(s.modelId)).every(s=>!s||!O(s).value)),f=[{label:"\u7F16\u8F91",value:"edit"},{label:"\u5220\u9664",value:"delete"}],g={edit:()=>_("edit"),delete:()=>_("delete")};return(s,o)=>{const n=v("ui-icon"),t=v("ui-more"),i=v("ui-group-option");return C(),A(i,{class:R(["sign-tagging",{active:r.selected}]),onClick:o[3]||(o[3]=u=>_("select"))},{default:d(()=>[c("div",Pe,[p(e)?(C(),D("img",{key:0,src:p(Q)(p(Z)(r.tagging.images.length?r.tagging.images[0]:p(e).icon))},null,8,De)):z("",!0),c("div",null,[c("p",null,N(r.tagging.title),1),c("a",null,"\u653E\u7F6E\uFF1A"+N(p(w).length),1)])]),c("div",{class:"actions",onClick:o[2]||(o[2]=S(()=>{},["stop"]))},[l(n,{class:R({disabled:p(x)}),type:"pin",ctrl:"",onClick:o[0]||(o[0]=S(u=>s.$emit("flyPositions"),["stop"]))},null,8,["class"]),l(t,{options:f,style:{"margin-left":"20px"},onClick:o[1]||(o[1]=u=>g[u]())})])]),_:1},8,["class"])}}});const Se=j(Ie,[["__scopeId","data-v-c0b9bfe6"]]),Be=U(" \u65B0\u589E "),Ue=L({__name:"index",setup(r){const _=F(""),h=P(()=>V.value.filter(n=>n.title.includes(_.value))),e=F(null),w=n=>{!e.value||(te(e.value.id)?V.value.push(n):Object.assign(e.value,n),e.value=null)},x=n=>{const t=V.value.indexOf(n),i=$(n);I.value=I.value.filter(u=>!i.includes(u)),V.value.splice(t,1)};let f;const g=n=>{const t=$(n);f&&f();let i=!1;const u=y=>{if(i||y>=t.length)return;const m=t[y],E=G(m.modelId);if(!E||!O(E).value){u(y+1);return}const a=me.push(F(new WeakSet([m])));T.comeTo({position:m.localPos,modelId:m.modelId,dur:300,distance:3}),console.log("\u6539\u53D8\u4E86",b.showTaggingPositions.has(m)),setTimeout(()=>{a(),u(y+1)},2e3)};u(0),f=()=>i=!0},s=n=>{n.code==="Escape"&&f&&f()};q(()=>(document.documentElement.addEventListener("keyup",s,!1),()=>document.documentElement.removeEventListener("keydown",s,!1)));const o=F(null);return ee(o,(n,t,i)=>{if(o.value){const u=()=>o.value=null,y=se([oe.push(F(!0)),ne.push(F(!0)),le.push(F(!1)),ae.push(F(!1))]),m=async a=>{await ce(),await re();const k=T.getPositionByScreen({x:a.clientX,y:a.clientY});if(console.error(k),!k)B.error("\u5F53\u524D\u4F4D\u7F6E\u65E0\u6CD5\u6DFB\u52A0");else if(o.value){const W=pe({...k,taggingId:o.value.id});I.value.push(W),u()}},E=a=>a.code==="Escape"&&u();document.documentElement.addEventListener("keyup",E,!1),T.layout.addEventListener("click",m,!1),ue(u),i(()=>{document.documentElement.removeEventListener("keyup",E,!1),T.layout.removeEventListener("click",m,!1),y()})}}),q(ge),(n,t)=>{const i=v("ui-icon"),u=v("ui-button"),y=v("ui-group"),m=v("ui-input"),E=v("ui-group-option");return C(),D(M,null,[l(p(_e),null,{default:d(()=>[l(y,{borderBottom:""},{header:d(()=>[l(u,{onClick:t[0]||(t[0]=a=>e.value=p(ie)())},{default:d(()=>[l(i,{type:"add"}),Be]),_:1})]),_:1}),l(y,{title:"\u6807\u6CE8"},{icon:d(()=>[l(i,{ctrl:"",type:p(b).showTaggings?"eye-s":"eye-n",onClick:t[1]||(t[1]=a=>p(b).showTaggings=!p(b).showTaggings)},null,8,["type"])]),default:d(()=>[l(E,null,{default:d(()=>[l(m,{type:"text",width:"100%",placeholder:"\u641C\u7D22",modelValue:_.value,"onUpdate:modelValue":t[2]||(t[2]=a=>_.value=a)},{preIcon:d(()=>[l(i,{type:"search"})]),_:1},8,["modelValue"])]),_:1}),(C(!0),D(M,null,de(p(h),a=>(C(),A(Se,{key:a.id,tagging:a,selected:o.value===a,onEdit:k=>e.value=a,onDelete:k=>x(a),onSelect:k=>o.value=a,onFlyPositions:k=>g(a)},null,8,["tagging","selected","onEdit","onDelete","onSelect","onFlyPositions"]))),128))]),_:1})]),_:1}),e.value?(C(),A(Te,{key:0,data:e.value,onQuit:t[3]||(t[3]=a=>e.value=null),onSave:w},null,8,["data"])):z("",!0)],64)}}});export{Ue as default};
|