WokerTask/public/admin/assets/edit.d82a3124.js

2 lines
4.3 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{T as I,I as q,C as T,G as N,H as S,B as U,D as L,w as $,Q as G}from"./element-plus.10e48c93.js";import{_ as H}from"./index.f59a8748.js";import{u as M,a as j}from"./vue-router.9f65afb1.js";import{e as z,f as K}from"./index.f095bcc5.js";import{n as O,s as P}from"./message.2be6efb7.js";import{l as Q}from"./lodash.08438971.js";import{d as v,r as J,$ as W,s as X,o as m,c as p,U as e,L as t,M as Y,u as a,K as Z,R as r,S as c,a as l,T as ee,a7 as te}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";const oe=l("div",{class:"font-medium mb-7"},"\u901A\u77E5\u540D\u79F0",-1),se=l("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"},re=v({name:"noticeEdit"}),Oe=v({...re,setup(le){const f=M(),B=j(),d=J(!1),o=W({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}=z(),E=X(),w=async()=>{d.value=!0;const u=await O({id:f.query.id});Object.keys(u).forEach(s=>{o[s]=u[s]}),d.value=!1},y=async()=>{var s;await((s=E.value)==null?void 0:s.validate());const u={id:o.id,template:Q.exports.pick(o,["sms_notice","oa_notice","mnp_notice","system_notice"])};await P(u),K.msgSuccess("\u64CD\u4F5C\u6210\u529F"),D(),B.back()};return f.query.id&&w(),(u,s)=>{const V=I,_=q,i=T,F=N,h=S,b=U,k=L,A=$,x=H,R=G;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:E,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(()=>[r(c(a(o).scene_name),1)]),_:1}),e(i,{label:"\u901A\u77E5\u7C7B\u578B"},{default:t(()=>[r(c(a(o).type),1)]),_:1}),e(i,{label:"\u901A\u77E5\u4E1A\u52A1"},{default:t(()=>[r(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(F,{label:"0"},{default:t(()=>[r("\u5173\u95ED")]),_:1}),e(F,{label:"1"},{default:t(()=>[r("\u5F00\u542F")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u6A21\u677FID",prop:"sms_notice.template_id"},{default:t(()=>[l("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(()=>[l("div",ne,[l("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,