text: import{d as O,j as V,l as M,m as y,e as v,o as r,b as _,w as p,a as e,t as i,f as g,c as h,k as S,F as w,z as A}from"./vendor.9d37dd73.js";import{l as C}from"./lodash.c8ee468d.js";import{B as U,_ as N}from"./index.d29c9db7.js";import{B as R}from"./base-modal.2684ffef.js";import{S as W}from"./select-box.f66e98c2.js";const F=O({components:{BaseModal:R,BaseButton:U,SelectBox:W},props:{device:{type:Object,required:!0,default:()=>{}},modelValue:{type:Boolean,required:!1,default:!0},admin:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","click:positive","click:negative"],setup(o,{emit:l}){const u=V({get:()=>o.modelValue,set:s=>{l("update:modelValue",s)}});let t=M({SW_GROUP_ID:"",SW_GROUP_NM:"",CAT_MODEL_ID:"",swGroupCodes:[{value:"-"}],deviceModels:[{value:"-"}],swVersions:[{value:"-"}]});function f(){var s=window.localStorage.getItem("token"),n=window.localStorage.getItem("vanId");s==null&&(s="");var d="van_id="+n;return y.get("http://tms-test-server.p-e.kr:8081/swgroup/list?"+d,{headers:{Authorization:s}}).then(m=>{var I=m.data.list;return t.swGroupCodes=C.exports.map(I,function(B){return{key:B.SW_GROUP_NM,value:B.SW_GROUP_ID}}),m.data.total_count})}function D(){var s=window.localStorage.getItem("token"),n=window.localStorage.getItem("vanId");s==null&&(s="");var d="van_id="+n;y.get("http://tms-test-server.p-e.kr:8081/terminal_mdl?"+d,{headers:{Authorization:s}}).then(c=>{var m=c.data.list;t.deviceModels=C.exports.map(m,function(b){return{value:b.CAT_MODEL_NM}})})}const a=s=>{var n=window.localStorage.getItem("token"),d=window.localStorage.getItem("vanId");window.localStorage.getItem("userNm"),y.put("http://tms-test-server.p-e.kr:8081/terminal/?",{VAN_ID:d,CAT_MODEL_ID:t.CAT_MODEL_ID,SW_GROUP_ID:t.SW_GROUP_ID,CAT_SERIAL_NO:o.device.deviceNumber},{headers:{Authorization:n}}).then(c=>{c.data.list,l("click:positive")})};function G(s){var n=C.exports.find(t.swGroupCodes,function(d){return d.value==s});t.SW_GROUP_ID=n.value,t.SW_GROUP_NM=n.key}function k(s){var n=C.exports.find(t.swGroupCodes,function(d){return d.value==s});t.SW_GROUP_ID=n.value,t.SW_GROUP_NM=n.key}return f(),D(),{changeForm:t,isOpen:u,closeModal(){u.value=!1},onSelectGroupId:G,onSelectGroupNm:k,onSave:a}}}),E={class:"my-3 grid h-10 grid-cols-8"},P=e("div",{class:"col-span-2 my-auto text-center font-bold"}," \uB2E8\uB9D0\uAE30 \uBC88\uD638 ",-1),L={class:"col-span-6 my-auto"},T={class:"my-3 grid h-10 grid-cols-8"},z=e("div",{class:"col-span-2 my-auto text-center font-bold"}," \uB2E8\uB9D0\uAE30 \uBAA8\uB378 ",-1),q={class:"col-span-6 my-auto"},j={class:"col-span-4 my-auto"},x={class:"my-3 grid h-10 grid-cols-8"},H=e("div",{class:"col-span-2 my-auto text-center font-bold"}," S/W Group \uCF54\uB4DC ",-1),J={class:"col-span-4 my-auto"},K={class:"my-3 grid h-10 grid-cols-8"},Q=e("div",{class:"col-span-2 my-auto text-center font-bold"}," S/W Group \uBA85 ",-1),X={class:"col-span-4 my-auto"},Y={class:"my-3 grid h-10 grid-cols-8"},Z=e("div",{class:"col-span-2 my-auto text-center font-bold"}," S/W Version ",-1),$={class:"col-span-6 my-auto"},ee={class:"my-3 grid h-10 grid-cols-8"},oe=e("div",{class:"col-span-2 my-auto text-center font-bold"},"\uC0C1\uD0DC",-1),ae={class:"col-span-6 my-auto"},te={class:"my-3 grid h-10 grid-cols-8"},se=e("div",{class:"col-span-2 my-auto text-center font-bold"},"\uB4F1\uB85D\uC77C",-1),le={class:"col-span-6 my-auto"},ne={class:"my-3 grid h-10 grid-cols-8"},de=e("div",{class:"col-span-2 my-auto text-center font-bold"},"\uB4F1\uB85D\uC790",-1),re={class:"col-span-6 my-auto"},ue={key:0,class:"mt-12 text-center"};function ie(o,l){const u=v("el-option"),t=v("el-select"),f=v("base-button"),D=v("base-modal");return r(),_(D,{modelValue:o.isOpen,"onUpdate:modelValue":l[3]||(l[3]=a=>o.isOpen=a),class:"w-2/3",title:"\uB2E8\uB9D0\uAE30 \uC0C1\uC138 \uC870\uD68C","no-action":"","no-exit-guard":o.admin},{modalBody:p(()=>[e("div",null,[e("div",E,[P,e("div",L,i(o.device.deviceNumber),1)]),e("div",T,[z,e("div",q,[e("div",j,[g(t,{clearable:"",placeholder:"\uC120\uD0DD",modelValue:o.changeForm.CAT_MODEL_ID,"onUpdate:modelValue":l[0]||(l[0]=a=>o.changeForm.CAT_MODEL_ID=a),onChange:o.onSelectGroupId,size:"large",class:"w-full"},{default:p(()=>[(r(!0),h(w,null,S(o.changeForm.deviceModels,a=>(r(),_(u,{key:a.value,label:a.value,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])])]),e("div",x,[H,e("div",J,[g(t,{clearable:"",placeholder:"\uC120\uD0DD",modelValue:o.changeForm.SW_GROUP_ID,"onUpdate:modelValue":l[1]||(l[1]=a=>o.changeForm.SW_GROUP_ID=a),onChange:o.onSelectGroupId,size:"large",class:"w-full"},{default:p(()=>[(r(!0),h(w,null,S(o.changeForm.swGroupCodes,a=>(r(),_(u,{key:a.value,label:a.value,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])]),e("div",K,[Q,e("div",X,[g(t,{clearable:"",placeholder:"\uC120\uD0DD",modelValue:o.changeForm.SW_GROUP_NM,"onUpdate:modelValue":l[2]||(l[2]=a=>o.changeForm.SW_GROUP_NM=a),onChange:o.onSelectGroupNm,size:"large",class:"w-full"},{default:p(()=>[(r(!0),h(w,null,S(o.changeForm.swGroupCodes,a=>(r(),_(u,{key:a.value,label:a.value,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])]),e("div",Y,[Z,e("div",$,i(o.device.swVersion),1)]),e("div",ee,[oe,e("div",ae,i(o.device.status),1)]),e("div",te,[se,e("div",le,i(o.device.applicationDate),1)]),e("div",ne,[de,e("div",re,i(o.device.applicationUser),1)])]),o.admin?A("",!0):(r(),h("div",ue,[g(f,{class:"mr-4 border-sk-gray bg-sk-gray text-white",text:"\uC218\uC815 \uBC0F \uC800\uC7A5",type:"button",onClick:o.onSave},null,8,["onClick"])]))]),_:1},8,["modelValue","no-exit-guard"])}var ge=N(F,[["render",ie]]);export{ge as D};
  