multiStoreAdmin/build/store/assets/index.2a983ef7.js

2 lines
5.4 KiB
JavaScript

import{a1 as z,D as G,F as J,R as M,S as Q,w as W,G as H,J as X,M as Y,N as Z,O as ee}from"./element-plus.ab0703f2.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.5fc87b57.js";import{j as ae,f as oe,b as le}from"./index.5ab034a5.js";import{d as $,s as ne,r as D,$ as ie,ah as se,ap as ue,o as n,c as x,W as e,Q as t,u as a,aa as T,U as s,a as B,R as m,P as d,j as re,T as de,n as R}from"./@vue.340249d8.js";import{i as pe,e as me}from"./dict.289741c2.js";import{u as ce}from"./usePaging.fff444fa.js";import{_ as _e}from"./edit.vue_vue_type_script_setup_true_lang.2d7aa985.js";import"./lodash-es.edba6135.js";import"./@vueuse.e3650918.js";import"./@element-plus.558a564d.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.9886411c.js";import"./axios.45058a27.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.0f9ce7c3.js";import"./lodash.3d784a58.js";import"./vue-router.9ddb0e92.js";import"./pinia.97fe9b12.js";import"./css-color-function.5c1c877d.js";import"./color.97e03886.js";import"./clone.cfa55f7b.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.8c276ac9.js";import"./vue-clipboard3.44194d32.js";import"./clipboard.47836ecb.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.309a94da.js";import"./index.5670c3d4.js";const fe={class:"dict-type"},ye={class:"mt-4"},ve={class:"flex justify-end mt-4"},Ce=$({name:"dictType"}),lt=$({...Ce,setup(ge){const y=ne(),v=D(!1),u=ie({name:"",type:"",status:""}),{pager:c,getLists:C,resetPage:b,resetParams:P}=ce({fetchFun:me,params:u}),k=D([]),S=i=>{k.value=i.map(({id:o})=>o)},K=async()=>{var i;v.value=!0,await R(),(i=y.value)==null||i.open("add")},N=async i=>{var o,_;v.value=!0,await R(),(o=y.value)==null||o.open("edit"),(_=y.value)==null||_.setFormData(i)},w=async i=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:i}),C()};return C(),(i,o)=>{const _=G,g=J,E=M,U=Q,p=W,A=H,h=X,F=le,r=Y,V=z,j=se("router-link"),I=Z,L=te,f=ue("perms"),q=ee;return n(),x("div",fe,[e(h,{class:"!border-none",shadow:"never"},{default:t(()=>[e(A,{ref:"formRef",class:"mb-[-16px]",model:a(u),inline:""},{default:t(()=>[e(g,{label:"\u5B57\u5178\u540D\u79F0"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:a(u).name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(u).name=l),clearable:"",onKeyup:T(a(b),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u5B57\u5178\u7C7B\u578B"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:a(u).type,"onUpdate:modelValue":o[1]||(o[1]=l=>a(u).type=l),clearable:"",onKeyup:T(a(b),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u72B6\u6001"},{default:t(()=>[e(U,{class:"w-[280px]",modelValue:a(u).status,"onUpdate:modelValue":o[2]||(o[2]=l=>a(u).status=l)},{default:t(()=>[e(E,{label:"\u5168\u90E8",value:""}),e(E,{label:"\u6B63\u5E38",value:1}),e(E,{label:"\u505C\u7528",value:0})]),_:1},8,["modelValue"])]),_:1}),e(g,null,{default:t(()=>[e(p,{type:"primary",onClick:a(b)},{default:t(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:a(P)},{default:t(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(h,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[B("div",null,[m((n(),d(p,{type:"primary",onClick:K},{icon:t(()=>[e(F,{name:"el-icon-Plus"})]),default:t(()=>[s(" \u65B0\u589E ")]),_:1})),[[f,["setting.dict.dict_type/add"]]]),m((n(),d(p,{disabled:!a(k).length,type:"danger",onClick:o[3]||(o[3]=l=>w(a(k)))},{icon:t(()=>[e(F,{name:"el-icon-Delete"})]),default:t(()=>[s(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[f,["setting.dict.dict_type/delete"]]])]),m((n(),x("div",ye,[B("div",null,[e(I,{data:a(c).lists,size:"large",onSelectionChange:S},{default:t(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"ID",prop:"id"}),e(r,{label:"\u5B57\u5178\u540D\u79F0",prop:"name","min-width":"120"}),e(r,{label:"\u5B57\u5178\u7C7B\u578B",prop:"type","min-width":"120"}),e(r,{label:"\u72B6\u6001"},{default:t(({row:l})=>[l.status==1?(n(),d(V,{key:0},{default:t(()=>[s("\u6B63\u5E38")]),_:1})):(n(),d(V,{key:1,type:"danger"},{default:t(()=>[s("\u505C\u7528")]),_:1}))]),_:1}),e(r,{label:"\u5907\u6CE8",prop:"remark","show-tooltip-when-overflow":""}),e(r,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(r,{label:"\u64CD\u4F5C",width:"190",fixed:"right"},{default:t(({row:l})=>[m((n(),d(p,{link:"",type:"primary",onClick:O=>N(l)},{default:t(()=>[s(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/edit"]]]),m((n(),d(p,{type:"primary",link:""},{default:t(()=>[e(j,{to:{path:a(ae)("setting.dict.dict_data/lists"),query:{id:l.id}}},{default:t(()=>[s(" \u6570\u636E\u7BA1\u7406 ")]),_:2},1032,["to"])]),_:2},1024)),[[f,["setting.dict.dict_data/lists"]]]),m((n(),d(p,{link:"",type:"danger",onClick:O=>w(l.id)},{default:t(()=>[s(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",ve,[e(L,{modelValue:a(c),"onUpdate:modelValue":o[4]||(o[4]=l=>re(c)?c.value=l:null),onChange:a(C)},null,8,["modelValue","onChange"])])])),[[q,a(c).loading]])]),_:1}),a(v)?(n(),d(_e,{key:0,ref_key:"editRef",ref:y,onSuccess:a(C),onClose:o[5]||(o[5]=l=>v.value=!1)},null,8,["onSuccess"])):de("",!0)])}}});export{lt as default};