2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
|
import{a5 as j,K as G,D as H,C as K,c as O,H as Q,I as W,F as $}from"./element-plus.ff90c99c.js";import{P as z}from"./index.6e7b2ec9.js";import{a as J,b as X,c as Y}from"./user_menu.57ad9f2a.js";import"./lodash.ffb5376d.js";import{a as Z,M as ee,d as ue}from"./index.9acc1fa4.js";import{d as v,E as oe,s as D,r as _,b as le,$ as V,ag as ae,o as F,c as B,W as l,Q as a,u,P as te,U as n}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./axios.f9df025a.js";import"./vue-router.6d4cf914.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.d1ea016b.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.4e7fd6e6.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.79024f1a.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 J({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=K,S=ae("Plus"),T=O,L=G,p=Q,g=W,N=$;return F(),B("div",re,[l(z,{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,["model
|