var g=(b,y,u)=>new Promise((l,c)=>{var m=t=>{try{o(u.next(t))}catch(s){c(s)}},a=t=>{try{o(u.throw(t))}catch(s){c(s)}},o=t=>t.done?l(t.value):Promise.resolve(t.value).then(m,a);o((u=u.apply(b,y)).next())});import{_ as T,d as V,r as v,N as B,P,f as p,g as x,K as k,m as d,l as _,p as I,h as $,G as h,L as q,q as M}from"./index.9fabe127.js";import{t as D,a as z}from"./tagsManage.89f3f2db.js";const K=V({name:"editPersonInfoDialog"}),O=Object.assign(K,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(b,{emit:y}){const{proxy:u}=M(),l=b,c=y,m=v(!1),a=v({}),o=v(),t=n=>g(this,null,function*(){!n||n.validate(e=>g(this,null,function*(){if(e){m.value=!0;try{const r=a.value.tagId.map(f=>({tagId:f,projectCode:l.data.projectCode}));yield z(r),u.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),m.value=!1,c("close",!0)}catch(r){m.value=!1}}}))}),s=v([]),C=v(!1),N=n=>g(this,null,function*(){C.value=!0;const e=yield D(l.data.areaCode,{pageNumber:1,pageSize:1e4,name:n});C.value=!1,s.value=e.data.records});return B(()=>l.visible,n=>g(this,null,function*(){var e,r;if(n){const f=yield D(l.data.areaCode,{pageNumber:1,pageSize:1e4});s.value=f.data.records,(r=(e=l.data)==null?void 0:e.tags)!=null&&r.length?a.value={tagId:l.data.tags.map(w=>w.id)}:(a.value={tagId:[]},yield P(),o.value.resetFields())}else a.value={}})),(n,e)=>{const r=p("el-option"),f=p("el-select"),w=p("el-form-item"),F=p("el-form"),j=p("el-button"),L=p("el-dialog");return x(),k(L,{"model-value":b.visible,title:"\u8BBE\u7F6E\u6807\u7B7E",width:"600px","destroy-on-close":"",onClose:e[3]||(e[3]=i=>c("close"))},{footer:d(()=>[_(j,{type:"primary",loading:m.value,onClick:e[1]||(e[1]=i=>t(o.value))},{default:d(()=>[I(" \u63D0\u4EA4 ")]),_:1},8,["loading"]),_(j,{onClick:e[2]||(e[2]=i=>c("close"))},{default:d(()=>[I(" \u5173\u95ED ")]),_:1})]),default:d(()=>[_(F,{ref_key:"dialogFormRef",ref:o,model:a.value,"label-width":"auto","status-icon":"",class:"mt-16","label-suffix":"\uFF1A"},{default:d(()=>[_(w,{label:"\u6807\u7B7E",prop:"tagId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9"}]},{default:d(()=>[_(f,{modelValue:a.value.tagId,"onUpdate:modelValue":e[0]||(e[0]=i=>a.value.tagId=i),class:"w-full",multiple:"",filterable:"",remote:"","remote-method":N,loading:C.value},{default:d(()=>[(x(!0),$(h,null,q(s.value,(i,S)=>(x(),k(r,{key:S,label:i.name,value:i.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}}),J=T(O,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectStoreManage/projectStore/components/setTagDialog.vue"]]);export{J as default};
