import{b as c,c as g}from"./reply.KzKATQCW.js";import{_ as k}from"./yb_admin_plugin.DNFUAscl.js";import{aZ as a,aL as p,u as w,I as l,bJ as t,H as n,bb as u,s as b,t as _}from"./@vue.Da0bZ210.js";import"./element-plus.DC208N5p.js";import"./lodash-es.DVGGNlzX.js";import"./@vueuse.BhH-hw9p.js";import"./@element-plus.pQhr8KT1.js";import"./async-validator.9PlIezaS.js";import"./@popperjs.C5az9QE8.js";import"./@ctrl.C4Rzlq_k.js";import"./dayjs.BLMYetss.js";import"./memoize-one.BdPwpGay.js";import"./normalize-wheel-es.BQoi3Ox2.js";import"./@floating-ui.DCXYYTka.js";import"./pinia.Tngw-S_5.js";import"./vue-i18n.C7BagGww.js";import"./@intlify.TnaUIxGf.js";import"./vue-router.DaVMGKLh.js";import"./echarts.Dms41JYJ.js";import"./tslib.BDyQ-Jie.js";import"./zrender.BueMfJu3.js";import"./moment.C5S46NFB.js";const V={title:"消息设置",name:"SetMessage",props:{gzh_id:{type:Number,default:0}},data(){return{form:{replay:"nocol",replay_keyword:"",subscribe:"nocol",subscribe_keyword:""},rules:{replay:[{required:!0,message:"请选择是否触发关键词",trigger:"change"}],replay_keyword:[{required:!0,message:"请输入关键字",trigger:"blur"}],subscribe:[{required:!0,message:"请选择是否触发关键词 ",trigger:"change"}],subscribe_keyword:[{required:!0,message:"请输入关键字",trigger:"blur"}]}}},created(){g({id:this.gzh_id}).then(e=>{let o=e.data;this.form={...this.form,...o.info}})},methods:{onSubmit(){this.$refs.form.validate(e=>{if(e)this.form.id=this.gzh_id,c(this.form).then(o=>{this.$baseMessage("保存成功"),this.callBack&&this.callBack()});else return!1})}}};function h(e,o,I,v,r,B){const m=a("el-radio"),d=a("el-radio-group"),i=a("el-form-item"),f=a("el-input"),y=a("el-form");return p(),w("div",null,[l(y,{ref:"form",model:r.form,rules:r.rules,"label-width":"100px",class:"demo-ruleForm"},{default:t(()=>[l(i,{label:e.translateI18n("默认回复"),prop:"reply"},{default:t(()=>[l(d,{modelValue:r.form.replay,"onUpdate:modelValue":o[0]||(o[0]=s=>r.form.replay=s)},{default:t(()=>[l(m,{label:"nocol"},{default:t(()=>[n(u(e.translateI18n("不处理")),1)]),_:1}),l(m,{label:"keyword"},{default:t(()=>[n(u(e.translateI18n("触发关键词")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),r.form.replay==="keyword"?(p(),b(i,{key:0,label:e.translateI18n("关键字"),prop:"replay_keyword"},{default:t(()=>[l(f,{modelValue:r.form.replay_keyword,"onUpdate:modelValue":o[1]||(o[1]=s=>r.form.replay_keyword=s)},null,8,["modelValue"])]),_:1},8,["label"])):_("",!0),l(i,{label:e.translateI18n("用户关注"),prop:"subscribe"},{default:t(()=>[l(d,{modelValue:r.form.subscribe,"onUpdate:modelValue":o[2]||(o[2]=s=>r.form.subscribe=s)},{default:t(()=>[l(m,{label:"nocol"},{default:t(()=>[n(u(e.translateI18n("不处理")),1)]),_:1}),l(m,{label:"keyword"},{default:t(()=>[n(u(e.translateI18n("触发关键词")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),r.form.subscribe==="keyword"?(p(),b(i,{key:1,label:e.translateI18n("关键字"),prop:"subscribe_keyword"},{default:t(()=>[l(f,{modelValue:r.form.subscribe_keyword,"onUpdate:modelValue":o[3]||(o[3]=s=>r.form.subscribe_keyword=s)},null,8,["modelValue"])]),_:1},8,["label"])):_("",!0)]),_:1},8,["model","rules"])])}const R=k(V,[["render",h]]);export{R as default};
