import w from"./target-select.40bd090b.js";import x from"./target-rule-setting.326c7c80.js";import F from"./freq-setting.ecd99b01.js";import{d as S,r as n,ai as s,o as V,c as C,U as e,O as t,a as r,S as f}from"./vue.adf17aba.js";const R=r("div",{class:"asj-h2"},"定向规则",-1),j=r("span",{class:"asj-h3"},"模板名称",-1),B=r("span",{class:"asj-h3"},"生效对象",-1),D={class:"auto-page-foot"},E=S({__name:"target-rule",props:{mode:{},data:{},submitFormData:{type:Function}},emits:["refresh"],setup(_,{emit:v}){const m=_,u=v,i=n(),o=n(m.data),c=n(),g=async()=>{const l=await c.value.validateForm();i.value.validate(async a=>{a&&l?(await m.submitFormData(),u("refresh")):console.log("验证失败：",[a,l])})},h=()=>{u("refresh")};return(l,a)=>{const y=s("el-input"),d=s("el-form-item"),b=s("el-form"),p=s("el-button");return V(),C("div",null,[R,e(b,{model:o.value,"label-position":"top",style:{"margin-top":"20px"},ref_key:"formRef",ref:i},{default:t(()=>[e(d,{prop:"name",rules:{required:!0,message:"必填项",trigger:"blur"}},{label:t(()=>[j]),default:t(()=>[e(y,{modelValue:o.value.name,"onUpdate:modelValue":a[0]||(a[0]=k=>o.value.name=k),style:{width:"30%"}},null,8,["modelValue"])]),_:1}),e(d,null,{label:t(()=>[B]),default:t(()=>[e(w,{mode:l.mode,data:o.value.rule},null,8,["mode","data"])]),_:1})]),_:1},8,["model"]),e(x,{rule:o.value.rule,ref_key:"ruleSettingRef",ref:c},null,8,["rule"]),e(F,{rule:o.value.rule},null,8,["rule"]),r("div",D,[e(p,{style:{width:"200px"},onClick:h},{default:t(()=>[f("取消")]),_:1}),e(p,{style:{width:"200px"},type:"primary",onClick:g},{default:t(()=>[f("提交")]),_:1})])])}}});export{E as _};
