您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 行
4.4KB

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