"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[8413,6278],{78413:function(e,t,i){i.r(t),i.d(t,{default:function(){return L}});var a=i(66252),l=i(49963),n=i(3577);const s={class:"generalMenu_printModel"},r=["src"],o={style:{"text-align":"center"}},d={key:0},c={key:1},p={key:1},m={key:0},u={key:1},g=["onClick"],w=["src"],y={style:{"text-align":"center"}},v={key:0},k={key:1},h={key:1},f={key:0},_={key:1};function b(e,t,i,b,C,D){const M=(0,a.up)("a-popover");return(0,a.wg)(),(0,a.iD)("div",s,[(0,a._)("div",{onClick:t[0]||(t[0]=(0,l.iM)(((...t)=>e.openPrintModel&&e.openPrintModel(...t)),["stop"])),class:(0,n.C_)(e.driverClass.class1),style:(0,n.j5)({...e.$props.style_,width:e.selectWidth})},[e.isCanvas?((0,a.wg)(),(0,a.j4)(M,{key:0},{content:(0,a.w5)((()=>[(0,a._)("img",{style:{width:"10rem",height:"10rem","object-fit":"contain"},src:e.item.img,alt:""},null,8,r),(0,a._)("span",o,(0,n.zw)(e.$t("Generate.referenceImage")),1)])),default:(0,a.w5)((()=>[e.item?.label?((0,a.wg)(),(0,a.iD)("span",d,(0,n.zw)(e.item?.label),1)):((0,a.wg)(),(0,a.iD)("span",c,(0,n.zw)(e.item?.name),1))])),_:1})):((0,a.wg)(),(0,a.iD)("div",p,[e.item?.label?((0,a.wg)(),(0,a.iD)("span",m,(0,n.zw)(e.item?.label),1)):((0,a.wg)(),(0,a.iD)("span",u,(0,n.zw)(e.item?.name),1))])),(0,a._)("div",{class:(0,n.C_)(["icon iconfont icon-xiala",{active:e.openClick}])},null,2)],6),(0,a.wy)((0,a._)("ul",{class:(0,n.C_)(e.driverClass.class2),style:(0,n.j5)({width:e.selectWidth})},[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.dataList,((t,i)=>((0,a.wg)(),(0,a.iD)("li",{class:(0,n.C_)([{active:e.deleteItem==i,hover:e.item?.label&&e.item?.label==t?.label||e.item?.name&&e.item?.name==t?.name},"printModel_item"]),onClick:a=>e.setprintModel(t,i)},[e.isCanvas?((0,a.wg)(),(0,a.j4)(M,{key:0,placement:"right"},{content:(0,a.w5)((()=>[-1!=t.img?((0,a.wg)(),(0,a.iD)("img",{key:0,style:{width:"10rem",height:"10rem","object-fit":"contain"},src:e.item.img,alt:""},null,8,w)):(0,a.kq)("",!0),(0,a._)("span",y,(0,n.zw)(e.$t("Generate.referenceImage")),1)])),default:(0,a.w5)((()=>[t?.label?((0,a.wg)(),(0,a.iD)("span",v,(0,n.zw)(t?.label),1)):((0,a.wg)(),(0,a.iD)("span",k,(0,n.zw)(t?.name),1))])),_:2},1024)):((0,a.wg)(),(0,a.iD)("div",h,[t?.label?((0,a.wg)(),(0,a.iD)("span",f,(0,n.zw)(t?.label),1)):((0,a.wg)(),(0,a.iD)("span",_,(0,n.zw)(t?.name),1))]))],10,g)))),256))],6),[[l.F8,e.openClick]])])}var C=i(2262),D=i(33907),M=i(40835),j=i(47332),z=(0,a.aZ)({name:"filterComponent",props:{item:{type:Object},dataList:{type:Array},driver__:{type:Boolean,default:!1},isCanvas:{type:Boolean,default:!1},deleteItem:{type:Number,default:-1},driverClass:{type:Object,default:{class1:"",class2:"",classList:{item1:"",item2:"",item3:""}}},style_:{type:Object,default:{}},selectWidth:{type:String,default:"20rem"}},emits:["setprintModel"],setup(e,{emit:t}){let i=(0,C.iH)(0),l=(0,C.iH)(!1),n=(0,D.oR)(),s=()=>{document.addEventListener("click",o),l.value=!0,(0,a.Y3)().then((()=>{e.driver__.driver&&M.RX.moveNext()}))},r=(n,s)=>{e.deleteItem!=s&&-1!=n.img&&(l.value=!1,i=s,(0,a.Y3)().then((()=>{e.driver__.driver&&M.RX.moveNext()})),t("setprintModel",n))},o=()=>{l.value=!1,document.removeEventListener("click",o)},d=t=>{let i=t.file,a=!0;if("done"===i.status){let t=JSON.parse(i.xhr.response);0==t.errCode?(i.type_="upload",e.dataList.forEach((e=>{-1==e.img&&(e.img=t.data.url,e.id=t.data.id)}))):a=!1}else"error"===i.status&&(a=!1)},c=i=>{i.img=-1,t("setprintModel",e.dataList[0])};return{selectIndex:i,openClick:l,store:n,setprintModel:r,openPrintModel:s,fileUploadChange:d,deleteFile:c}},data(e){return{upload:{isPin:0,gender:"",level1Type:"Sketchboard",timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},uploadUrl:"",type_:{type1:"generate",type2:"Sketchboard"},isTextarea:!1,isInputFocus:!1}},mounted(){this.uploadUrl=(0,j.M$)(),this.upload.gender=this.store.state.Workspace.probjects.sex}}),x=i(83744);const I=(0,x.Z)(z,[["render",b]]);var L=I}}]);