2 lines
4.2 KiB
JavaScript
2 lines
4.2 KiB
JavaScript
import{P as I,I as q,D as N,G as T,H as U,C as P,F as S,w as G,N as H}from"./element-plus.a40e8d80.js";import{_ as L}from"./index.d663fb71.js";import{u as M,a as O}from"./vue-router.43c06794.js";import{e as $,f as j}from"./index.9d786a17.js";import{n as z,s as W}from"./message.ff98bfb7.js";import{l as J}from"./lodash.a2abcd4b.js";import{d as v,r as K,a0 as Q,s as X,o as m,c as p,W as e,O as t,P as Y,u as a,M as Z,T as l,U as c,a as r,V as ee,a7 as te}from"./@vue.c3e77981.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./axios.a8078129.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";const oe=r("div",{class:"font-medium mb-7"},"\u901A\u77E5\u540D\u79F0",-1),se=r("div",{class:"font-medium mb-7"},"\u77ED\u4FE1\u901A\u77E5",-1),ae={class:"w-80"},ne={class:"flex-1"},ue={class:"w-full max-w-[320px]"},ie={class:"form-tips"},le=v({name:"noticeEdit"}),$e=v({...le,setup(re){const f=M(),B=O(),d=K(!1),o=Q({id:"",scene_name:"",type:"",scene_desc:"",sms_notice:{status:0,template_id:"",content:"",tips:[]},oa_notice:{},mnp_notice:{},system_notice:{}}),g={"sms_notice.template_id":[{required:!0,message:"\u8BF7\u8F93\u5165\u6A21\u677FID",trigger:"blur"}],"sms_notice.content":[{required:!0,message:"\u8BF7\u8F93\u5165\u77ED\u4FE1\u5185\u5BB9",trigger:"blur"}]},{removeTab:D}=$(),F=X(),w=async()=>{d.value=!0;const u=await z({id:f.query.id});Object.keys(u).forEach(s=>{o[s]=u[s]}),d.value=!1},y=async()=>{var s;await((s=F.value)==null?void 0:s.validate());const u={id:o.id,template:J.exports.pick(o,["sms_notice","oa_notice","mnp_notice","system_notice"])};await W(u),j.msgSuccess("\u64CD\u4F5C\u6210\u529F"),D(),B.back()};return f.query.id&&w(),(u,s)=>{const V=I,_=q,i=N,E=T,h=U,b=P,k=S,A=G,x=L,C=H;return m(),p("div",null,[e(_,{class:"!border-none",shadow:"never"},{default:t(()=>[e(V,{content:"\u7F16\u8F91\u901A\u77E5\u8BBE\u7F6E",onBack:s[0]||(s[0]=n=>u.$router.back())})]),_:1}),Y((m(),Z(k,{ref_key:"formRef",ref:F,model:a(o),"label-width":"120px",rules:g},{default:t(()=>[e(_,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[oe,e(i,{label:"\u901A\u77E5\u540D\u79F0"},{default:t(()=>[l(c(a(o).scene_name),1)]),_:1}),e(i,{label:"\u901A\u77E5\u7C7B\u578B"},{default:t(()=>[l(c(a(o).type),1)]),_:1}),e(i,{label:"\u901A\u77E5\u4E1A\u52A1"},{default:t(()=>[l(c(a(o).scene_desc),1)]),_:1})]),_:1}),e(_,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[se,e(i,{label:"\u5F00\u542F\u72B6\u6001",prop:"sms_notice.status",required:""},{default:t(()=>[e(h,{modelValue:a(o).sms_notice.status,"onUpdate:modelValue":s[1]||(s[1]=n=>a(o).sms_notice.status=n)},{default:t(()=>[e(E,{label:"0"},{default:t(()=>[l("\u5173\u95ED")]),_:1}),e(E,{label:"1"},{default:t(()=>[l("\u5F00\u542F")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u6A21\u677FID",prop:"sms_notice.template_id"},{default:t(()=>[r("div",ae,[e(b,{modelValue:a(o).sms_notice.template_id,"onUpdate:modelValue":s[2]||(s[2]=n=>a(o).sms_notice.template_id=n),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677FID"},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u77ED\u4FE1\u5185\u5BB9",prop:"sms_notice.content"},{default:t(()=>[r("div",ne,[r("div",ue,[e(b,{type:"textarea",autosize:{minRows:6,maxRows:6},modelValue:a(o).sms_notice.content,"onUpdate:modelValue":s[3]||(s[3]=n=>a(o).sms_notice.content=n)},null,8,["modelValue"])]),r("div",ie,[(m(!0),p(ee,null,te(a(o).sms_notice.tips,(n,R)=>(m(),p("div",{key:R},c(n),1))),128))])])]),_:1})]),_:1})]),_:1},8,["model"])),[[C,a(d)]]),e(x,null,{default:t(()=>[e(A,{type:"primary",onClick:y},{default:t(()=>[l("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{$e as default};
|