|
- import{_ as B,d as T,r as v,L as j,c as n,e as b,I as F,i as l,h as e,j as V,g as y,f as w,F as N,J as O,x as L}from"./index.121be81f.js";const J={class:"region"},P={class:"mr-16 flex-1"},z=["onClick"],A=T({name:"operatorDialog"}),E=Object.assign(A,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(u,{emit:x}){const{proxy:k}=L(),m=u,c=x,H=v([]),f=v(),t=v({name:void 0,operatorRegionHeads:[{key:new Date().getTime(),regionalHead:void 0,regionId:void 0,mobile:void 0}],remark:void 0}),R={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8FD0\u8425\u5546\u540D\u79F0",trigger:"blur"}]},h=()=>{t.value.operatorRegionHeads.push({key:new Date().getTime(),regionalHead:void 0,regionId:void 0,mobile:void 0})},$=r=>{t.value.operatorRegionHeads.length>1&&t.value.operatorRegionHeads.splice(r,1)},C=async r=>{!r||await r.validate(async o=>{o&&(m.data&&m.data.id?k.$message.success("\u7F16\u8F91\u6210\u529F\uFF01"):k.$message.success("\u65B0\u589E\u6210\u529F\uFF01"),c("close",!0))})};return j(()=>m.visible,async r=>{r||(f.value.resetFields(),t.value.operatorRegionHeads=[{key:new Date().getTime(),regionalHead:void 0,regionId:void 0,mobile:void 0}])}),(r,o)=>{const i=n("el-input"),s=n("el-form-item"),I=n("el-tree-select"),g=n("el-col"),U=n("el-row"),_=n("el-button"),D=n("el-form"),q=n("el-dialog");return b(),F(q,{"model-value":u.visible,title:`${u.data&&u.data.id?"\u7F16\u8F91":"\u65B0\u589E"}\u8FD0\u8425\u5546`,width:"840px","destroy-on-close":"",onClose:o[4]||(o[4]=a=>c("close"))},{footer:l(()=>[e(_,{type:"primary",onClick:o[2]||(o[2]=a=>C(f.value))},{default:l(()=>[V(" \u63D0\u4EA4 ")]),_:1}),e(_,{onClick:o[3]||(o[3]=a=>c("close"))},{default:l(()=>[V(" \u5173\u95ED ")]),_:1})]),default:l(()=>[e(D,{ref_key:"formRef",ref:f,model:t.value,rules:R,"label-suffix":":"},{default:l(()=>[e(s,{label:"\u8FD0\u8425\u5546\u540D\u79F0",prop:"name"},{default:l(()=>[e(i,{modelValue:t.value.name,"onUpdate:modelValue":o[0]||(o[0]=a=>t.value.name=a),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),y("div",J,[(b(!0),w(N,null,O(t.value.operatorRegionHeads,(a,p)=>(b(),w("div",{key:a.key,class:"flex"},[y("div",P,[e(U,{gutter:14},{default:l(()=>[e(g,{span:8},{default:l(()=>[e(s,{label:"\u533A\u57DF",prop:`operatorRegionHeads[${p}].regionId`,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u533A\u57DF",trigger:"change"}]},{default:l(()=>[e(I,{modelValue:a.regionId,"onUpdate:modelValue":d=>a.regionId=d,data:H.value,filterable:"",props:{label:"name",value:"id"},"check-strictly":"","render-after-expand":!1,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","data"])]),_:2},1032,["prop"])]),_:2},1024),e(g,{span:8},{default:l(()=>[e(s,{label:"\u533A\u57DF\u8D1F\u8D23\u4EBA",prop:`operatorRegionHeads[${p}].regionalHead`,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u533A\u57DF\u8D1F\u8D23\u4EBA",trigger:"change"}]},{default:l(()=>[e(i,{modelValue:a.regionalHead,"onUpdate:modelValue":d=>a.regionalHead=d,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(g,{span:8},{default:l(()=>[e(s,{label:"\u8054\u7CFB\u7535\u8BDD",prop:`operatorRegionHeads[${p}].mobile`,rules:[{required:!0,pattern:/^1[3456789]\d{9}$/,message:"\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}]},{default:l(()=>[e(i,{modelValue:a.mobile,"onUpdate:modelValue":d=>a.mobile=d,maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)]),_:2},1024)]),y("a",{class:"text-danger",onClick:d=>$(p)},"\u5220\u9664",8,z)]))),128)),e(_,{type:"primary",class:"w-full",plain:"",icon:"Plus",onClick:h},{default:l(()=>[V(" \u589E\u52A0\u533A\u57DF\u8D1F\u8D23\u4EBA ")]),_:1})]),e(s,{label:"\u5907\u6CE8",prop:"remark","label-width":"97px"},{default:l(()=>[e(i,{modelValue:t.value.remark,"onUpdate:modelValue":o[1]||(o[1]=a=>t.value.remark=a),maxlength:"200","show-word-limit":"",type:"textarea",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}}),K=B(E,[["__scopeId","data-v-94cd9c60"]]);export{K as default};
|