import{b as E,u as N,a as U,r,$,o as D,c as B,v as d,p as o,q as n,x as C,n as a,s as P,J as L,ak as j,j as q,k as R,i as S,m as F,bv as J}from"./index.8d733f79.js";import{E as K}from"./el-progress.ee3fa77d.js";import{d as h}from"./deviceType.30ac56e5.js";const z={class:"subPage-content"},O={class:"nav"},A={class:"details-wrap df-c-a"},G=["src"],X={__name:"deviceDetail",setup(H){E();const v=N(),g=U(),e=r({}),c=r(""),p=r(!1),y=()=>{v.push("/device/deviceType")},V="./",b=async()=>{var l;const s=await h({deviceTypeId:g.query.id});e.value=s.data,e.value.componentsName=e.value.components.map(u=>u.name),e.value.supportTypeName=(l=L.session.getJSON("enums").supportType.find(u=>+u.key===e.value.supportType))==null?void 0:l.desc,e.value.fileList=[],e.value.images.forEach(u=>{const m=`${V}/equipment-web/file/downloadImage?fileId=${u.imageId}`;e.value.fileList.push({url:m})})},I=s=>{c.value=s.url,p.value=!0};return b(),(s,l)=>{const u=$("Back"),m=j,f=q,i=R,_=S,w=K,T=F,k=J;return D(),B("div",z,[d("div",O,[o(m,{color:"#0052D9",size:"24",onClick:y,style:{cursor:"pointer"}},{default:n(()=>[o(u)]),_:1}),d("span",null,C(s.$t("deviceTypeView")),1)]),d("div",A,[o(T,{class:"content-wrap",model:a(e),disabled:""},{default:n(()=>[o(i,{label:s.$t("deviceType")},{default:n(()=>[o(f,{modelValue:a(e).name,"onUpdate:modelValue":l[0]||(l[0]=t=>a(e).name=t)},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:"Productkey"},{default:n(()=>[o(f,{modelValue:a(e).productKey,"onUpdate:modelValue":l[1]||(l[1]=t=>a(e).productKey=t)},null,8,["modelValue"])]),_:1}),o(i,{label:s.$t("componentC"),style:{height:"auto"}},{default:n(()=>[o(_,{modelValue:a(e).componentsName,"onUpdate:modelValue":l[2]||(l[2]=t=>a(e).componentsName=t),multiple:""},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:s.$t("supportType")},{default:n(()=>[o(_,{modelValue:a(e).supportTypeName,"onUpdate:modelValue":l[3]||(l[3]=t=>a(e).supportTypeName=t)},null,8,["modelValue"])]),_:1},8,["label"]),o(i,{label:s.$t("deviceImg")},{default:n(()=>[o(w,{class:"uploadImg-wrap","file-list":a(e).fileList,"onUpdate:file-list":l[4]||(l[4]=t=>a(e).fileList=t),action:"#",accept:".jpg,.png,jpeg","list-type":"picture-card","on-preview":I},null,8,["file-list"])]),_:1},8,["label"])]),_:1},8,["model"])]),o(k,{modelValue:a(p),"onUpdate:modelValue":l[5]||(l[5]=t=>P(p)?p.value=t:null)},{default:n(()=>[d("img",{src:a(c),alt:"Preview Image",class:"img-pre"},null,8,G)]),_:1},8,["modelValue"])])}}};export{X as default};
