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

2 lines
6.5 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{a3 as j,J as G,C as H,B as J,c as K,G as O,H as $,D as z}from"./element-plus.10e48c93.js";import{P as Q}from"./index.c570839a.js";import{a as W,b as X,c as Y}from"./user_menu.ebc433ce.js";import"./lodash.08438971.js";import{a as Z,M as ee,d as ue}from"./index.f095bcc5.js";import{d as v,C as oe,s as D,r as _,e as le,$ as V,a4 as ae,o as F,c as B,U as l,L as a,u,K as te,R as n}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"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.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 re={class:"edit-popup"},se=["src"],de=v({name:"userMenuEdit"}),ie=v({...de,props:{dictData:{type:Object,default:()=>({})},menuList:{type:Array,default:()=>[]}},emits:["success","close"],setup(y,{expose:h,emit:f}){const U=y,w=Z(),x=oe("base_url"),E=D(),m=D(),c=_("add");_(!1);const A=r=>{o.icon=r.data.uri},b=_([{id:0,name:"\u9876\u7EA7",children:[]}]);(()=>{U.menuList.forEach(r=>{b.value[0].children.push(r)})})();const k=le(()=>c.value=="edit"?"\u7F16\u8F91\u7CFB\u7EDF\u83DC\u5355\u8868":"\u65B0\u589E\u7CFB\u7EDF\u83DC\u5355\u8868"),o=V({id:"",pid:"",type:ee.MENU,name:"",icon:"",sort:0,notes:"",paths:"",params:"",is_show:1,is_disable:0}),M=V({pid:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E0A\u7EA7\u83DC\u5355",trigger:["blur"]}],type:[{required:!0,message:"\u8BF7\u8F93\u5165\u6743\u9650\u7C7B\u578B: M=\u76EE\u5F55\uFF0CC=\u83DC\u5355\uFF0CA=\u6309\u94AE",trigger:["blur"]}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",trigger:["blur"]}],icon:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u56FE\u6807",trigger:["blur"]}],sort:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u6392\u5E8F",trigger:["blur"]}],paths:[{required:!0,message:"\u8BF7\u8F93\u5165\u8DEF\u7531\u5730\u5740",trigger:["blur"]}],params:[{required:!1,message:"\u8BF7\u8F93\u5165\u8DEF\u7531\u53C2\u6570",trigger:["blur"]}],is_show:[{required:!0,message:"\u8BF7\u8F93\u5165\u662F\u5426\u663E\u793A",trigger:["blur"]}],is_disable:[{required:!0,message:"\u8BF7\u8F93\u5165\u662F\u5426\u7981\u7528",trigger:["blur"]}]}),C=async r=>{for(const e in o)r[e]!=null&&r[e]!=null&&(o[e]=r[e])},q=async r=>{const e=await W({id:r.id});C(e)},R=async()=>{var e,i;await((e=E.value)==null?void 0:e.validate());const r={...o};c.value=="edit"?await X(r):await Y(r),(i=m.value)==null||i.close(),f("success")},I=(r="add")=>{var e;c.value=r,(e=m.value)==null||e.open()},P=()=>{f("close")};return h({open:I,setFormData:C,getDetail:q}),(r,e)=>{const i=j,s=H,d=J,L=ae("Plus"),S=K,T=G,p=O,g=$,N=z;return F(),B("div",re,[l(Q,{ref_key:"popupRef",ref:m,title:u(k),async:!0,width:"550px",onConfirm:R,onClose:P},{default:a(()=>[l(N,{ref_key:"formRef",ref:E,model:u(o),"label-width":"90px",rules:u(M)},{default:a(()=>[l(s,{label:"\u4E0A\u7EA7\u83DC\u5355",prop:"pid"},{default:a(()=>[l(i,{class:"flex-1",modelValue:u(o).pid,"onUpdate:modelValue":e[0]||(e[0]=t=>u(o).pid=t),data:u(b),clearable:"","node-key":"id",props:{label:"name"},"default-expand-all":!0,placeholder:"\u8BF7\u9009\u62E9\u7236\u7EA7\u83DC\u5355","check-strictly":""},null,8,["modelValue","data"])]),_:1}),l(s,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:a(()=>[l(d,{model