multiStoreAdmin/build/store/assets/edit.824671f1.js

2 lines
4.3 KiB
JavaScript

import{Q as I,J as q,F as N,H as U,I as S,D as T,G as $,w as G,O as H}from"./element-plus.ab0703f2.js";import{_ as L}from"./index.16598435.js";import{u as O,a as P}from"./vue-router.9ddb0e92.js";import{e as Q,f as j}from"./index.5ab034a5.js";import{n as z,s as J}from"./message.cb9bf606.js";import{l as M}from"./lodash.3d784a58.js";import{d as v,r as W,$ as K,s as X,o as m,c as p,W as e,Q as t,R as Y,u as a,P as Z,U as l,V as c,a as r,F as ee,a9 as te}from"./@vue.340249d8.js";import"./lodash-es.edba6135.js";import"./@vueuse.e3650918.js";import"./@element-plus.558a564d.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.9886411c.js";import"./axios.45058a27.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.0f9ce7c3.js";import"./pinia.97fe9b12.js";import"./css-color-function.5c1c877d.js";import"./color.97e03886.js";import"./clone.cfa55f7b.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.8c276ac9.js";import"./vue-clipboard3.44194d32.js";import"./clipboard.47836ecb.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.309a94da.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"}),je=v({...le,setup(re){const f=O(),B=P(),d=W(!1),o=K({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}=Q(),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:M.exports.pick(o,["sms_notice","oa_notice","mnp_notice","system_notice"])};await J(u),j.msgSuccess("\u64CD\u4F5C\u6210\u529F"),D(),B.back()};return f.query.id&&w(),(u,s)=>{const V=I,_=q,i=N,E=U,h=S,b=T,k=$,A=G,x=L,R=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,C)=>(m(),p("div",{key:C},c(n),1))),128))])])]),_:1})]),_:1})]),_:1},8,["model"])),[[R,a(d)]]),e(x,null,{default:t(()=>[e(A,{type:"primary",onClick:y},{default:t(()=>[l("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{je as default};