Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

2 wiersze
3.7KB

  1. var R=Object.defineProperty;var V=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var j=(i,a,e)=>a in i?R(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e,N=(i,a)=>{for(var e in a||(a={}))S.call(a,e)&&j(i,e,a[e]);if(V)for(var e of V(a))U.call(a,e)&&j(i,e,a[e]);return i};var w=(i,a,e)=>new Promise((g,m)=>{var v=c=>{try{r(e.next(c))}catch(f){m(f)}},p=c=>{try{r(e.throw(c))}catch(f){m(f)}},r=c=>c.done?g(c.value):Promise.resolve(c.value).then(v,p);r((e=e.apply(i,a)).next())});import{_ as W,d as A,b as k,r as x,o as G,c as u,e as J,f as K,i as l,j as n,k as D,g as b,F as q,x as H}from"./index.47f2a3eb.js";import Q from"./menuDialog.72527914.js";import{g as X,m as Y}from"./menuManage.cc9416a0.js";const Z={class:"flex justify-between items-center"},ee=b("span",null,"\u83DC\u5355\u5217\u8868",-1),te=["onClick"],ae=["onClick"],le=A({name:"menuManage"}),ne=Object.assign(le,{setup(i){const{proxy:a}=H(),e=k({title:void 0}),g=k([{label:"\u83DC\u5355\u540D\u79F0",key:"title",prop:"title",minWidth:"200"},{label:"\u6392\u5E8F",key:"sort",prop:"sort"},{label:"\u56FE\u6807",key:"icon",prop:"icon"},{label:"\u9875\u9762\u8DEF\u5F84",key:"path",prop:"path",minWidth:"200"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}]),m=x(),v=x(0),p=x([]),r=(...s)=>w(this,[...s],function*(o=m.value.pageParams){const t=yield X(N({},e));p.value=t.data}),c=()=>{p.value=f(p.value,e.title)},f=(o,s)=>o.map(t=>(t&&t.children&&(t.children=f(t.children,s)),t)).filter(t=>{var d;return s===""||t.title.indexOf(s)>-1||((d=t.children)==null?void 0:d.length)>0}),B=()=>{e.title=void 0,m.value.pageParams.pageNumber=1,m.value.pageParams.pageSize=10,r()},_=k({visible:!1,rowData:void 0}),O=()=>{_.visible=!0,_.rowData=void 0},T=o=>{_.visible=!0,_.rowData=o},C=o=>{const s=[];return o.forEach(t=>{var d;(d=t.children)!=null&&d.length&&C(t.children),s.push(t.id)}),s},$=o=>{const s=C([o]);a.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>w(this,null,function*(){yield Y(s),a.$message.success("\u5220\u9664\u6210\u529F\uFF01"),r()}))},z=o=>{_.visible=!1,o&&r()};return G(()=>{r()}),(o,s)=>{const t=u("el-input"),d=u("el-form-item"),M=u("el-col"),y=u("el-button"),F=u("el-row"),L=u("el-form"),P=u("el-card"),E=u("table-list");return J(),K(q,null,[l(P,{shadow:"never",class:"search mb-16"},{default:n(()=>[l(L,{"label-suffix":":",model:e,size:"small"},{default:n(()=>[l(F,{gutter:16},{default:n(()=>[l(M,{span:8},{default:n(()=>[l(d,{label:"\u83DC\u5355\u540D\u79F0"},{default:n(()=>[l(t,{modelValue:e.title,"onUpdate:modelValue":s[0]||(s[0]=h=>e.title=h),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),l(M,{span:16},{default:n(()=>[l(d,{class:"btn"},{default:n(()=>[l(y,{type:"primary",onClick:c},{default:n(()=>[D("\u67E5\u8BE2")]),_:1}),l(y,{onClick:B},{default:n(()=>[D("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),l(P,{shadow:"never"},{header:n(()=>[b("div",Z,[ee,l(y,{type:"primary",icon:"Plus",size:"small",onClick:O},{default:n(()=>[D(" \u65B0\u589E\u83DC\u5355 ")]),_:1})])]),default:n(()=>[l(E,{ref_key:"tableListRef",ref:m,column:g,data:p.value,total:v.value,"row-key":"id",pagination:!1,onGetTableData:r},{action:n(({scope:h})=>[b("a",{class:"text-primary",onClick:I=>T(h.row)},"\u7F16\u8F91",8,te),b("a",{class:"text-danger",onClick:I=>$(h.row)},"\u5220\u9664",8,ae)]),_:1},8,["column","data","total"])]),_:1}),l(Q,{visible:_.visible,data:_.rowData,onClose:z},null,8,["visible","data"])],64)}}}),ce=W(ne,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/systemManage/menuManage/index.vue"]]);export{ce as default};