niucloud-admin/niucloud/public/admin/assets/agreement_edit-55043ab7.js
全栈小学生 4b27cfb131 update source
2023-06-08 18:47:18 +08:00

2 lines
4.2 KiB
JavaScript

import"./base-962c0c23.js";/* empty css *//* empty css *//* empty css *//* empty css */import{_ as S}from"./index.vue_vue_type_script_setup_true_lang-9977cd4d.js";/* empty css */import{u as A,t as s}from"./index-105fbad0.js";import{A as N,B as P}from"./sys-4abedf95.js";import{u as T,a as $}from"./vue-router-79053937.js";import{D as j}from"./index-7525671c.js";import{E as q}from"./index-93f2c618.js";import{a as I,E as U}from"./index-61c777fa.js";import{E as L}from"./index-69523418.js";import{E as O}from"./index-bba9e58c.js";import{v as z}from"./directive-c0c3e9a3.js";import{d as M,r as y,M as G,c as H,b as k,e as J,f as n,u as o,x as d,L as K,m as Q,p as l,q as r,v as x}from"./runtime-core.esm-bundler-dc7a07d7.js";import"./index.vue_vue_type_style_index_0_lang-d0d31f1b.js";import"./el-overlay-60700377.js";import"./event-ff03ec12.js";import"./index-5d86eb33.js";import"./focus-trap-b8b5a003.js";import"./attachment-56217309.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-58212670.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-d57cc47d.js";import"./index-cc03da8f.js";import"./index-8bcaafa6.js";import"./storage-abe718b1.js";import"./index-50a00d09.js";import"./index-7a123a20.js";import"./index-a9dd5cf5.js";import"./index-190f0dba.js";import"./index-9f244af6.js";import"./index-df51d91a.js";import"./isEqual-c7d5e6d9.js";import"./_Uint8Array-6ff3cafa.js";import"./flatten-d5d1dc97.js";import"./index-100b1469.js";import"./index-b933df38.js";import"./index-4f5c40a5.js";import"./strings-4868a118.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./common-080b9b9f.js";import"./common-2cf17469.js";import"./el-radio-bfd4b1ad.js";import"./el-avatar-3bb47ce2.js";import"./_initCloneObject-28e6bdaa.js";const W={class:"main-container"},X={class:"detail-head"},Y=n("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),Z={class:"ml-[1px]"},tt=n("span",{class:"adorn"},"|",-1),et={class:"right"},ot={class:"fixed-footer-wrap"},at={class:"fixed-footer"},me=M({__name:"agreement_edit",setup(rt){A();const u=T(),_=$(),f=u.query.key||"",m=y(!1),V=j(),w=u.meta.title,v={agreement_key:"",content:"",title:"",agreement_key_name:""},e=G({...v});m.value=!0,f&&(async(p="")=>{Object.assign(e,v);const t=await(await N(p)).data;Object.keys(e).forEach(a=>{t[a]!=null&&(e[a]=t[a])}),m.value=!1})(f);const g=y(),E=H(()=>({title:[{required:!0,message:s("titlePlaceholder"),trigger:"blur"}]})),D=async p=>{m.value||!p||await p.validate(async t=>{if(t){m.value=!0;const a=e;a.key=e.agreement_key,P(a).then(c=>{m.value=!1,b()}).catch(()=>{m.value=!1})}})},b=()=>{V.removeTab(u.path),_.push({path:"/setting/agreement"})};return(p,t)=>{const a=q,c=I,B=S,C=U,F=L,h=O,R=z;return k(),J("div",W,[n("div",X,[n("div",{class:"left",onClick:t[0]||(t[0]=i=>o(_).push({path:"/setting/agreement"}))},[Y,n("span",Z,d(o(s)("returnToPreviousPage")),1)]),tt,n("span",et,d(o(w)),1)]),K((k(),Q(F,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[r(C,{model:e,"label-width":"90px",ref_key:"formRef",ref:g,rules:o(E),class:"page-form"},{default:l(()=>[r(c,{label:o(s)("type")},{default:l(()=>[r(a,{modelValue:e.agreement_key_name,"onUpdate:modelValue":t[1]||(t[1]=i=>e.agreement_key_name=i),readonly:"",class:"input-width"},null,8,["modelValue"])]),_:1},8,["label"]),r(c,{label:o(s)("title"),prop:"title"},{default:l(()=>[r(a,{modelValue:e.title,"onUpdate:modelValue":t[2]||(t[2]=i=>e.title=i),clearable:"",placeholder:o(s)("titlePlaceholder"),class:"input-width",maxlength:"20"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),r(c,{label:o(s)("content")},{default:l(()=>[r(B,{modelValue:e.content,"onUpdate:modelValue":t[3]||(t[3]=i=>e.content=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})),[[R,m.value]]),n("div",ot,[n("div",at,[r(h,{type:"primary",onClick:t[4]||(t[4]=i=>D(g.value))},{default:l(()=>[x(d(o(s)("save")),1)]),_:1}),r(h,{onClick:t[5]||(t[5]=i=>b())},{default:l(()=>[x(d(o(s)("cancel")),1)]),_:1})])])])}}});export{me as default};