suyuan/public/admin/assets/index.b1317945.js

2 lines
5.5 KiB
JavaScript

import{B as z,C as J,Q as M,R as O,w as G,D as H,I as W,L as X,_ as Y,M as Z,N as ee}from"./element-plus.7a22678c.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.cabb2d32.js";import{k as oe,f as ae,b as le}from"./index.8530c548.js";import{d as $,s as ne,r as D,_ as se,a3 as ie,ae as ue,o as l,c as x,T as e,K as t,J as r,u as n,Q as de,a8 as T,a as E,L as p,j as re,R as i,n as R}from"./@vue.108c970a.js";import{c as me,i as pe}from"./dict.95859b3b.js";import{u as ce}from"./usePaging.2a59f422.js";import{_ as _e}from"./edit.vue_vue_type_script_setup_true_lang.e8e6b7b5.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.e9a50c86.js";const fe={class:"dict-type"},ye=i("\u67E5\u8BE2"),ve=i("\u91CD\u7F6E"),Ce=i(" \u65B0\u589E "),ge=i(" \u5220\u9664 "),he={class:"mt-4"},be=i("\u6B63\u5E38"),ke=i("\u505C\u7528"),Ee=i(" \u7F16\u8F91 "),Be=i(" \u6570\u636E\u7BA1\u7406 "),we=i(" \u5220\u9664 "),Fe={class:"flex justify-end mt-4"},Ve=$({name:"dictType"}),_t=$({...Ve,setup(De){const y=ne(),v=D(!1),u=se({name:"",type:"",status:""}),{pager:c,getLists:C,resetPage:h,resetParams:K}=ce({fetchFun:me,params:u}),b=D([]),P=s=>{b.value=s.map(({id:o})=>o)},L=async()=>{var s;v.value=!0,await R(),(s=y.value)==null||s.open("add")},N=async s=>{var o,_;v.value=!0,await R(),(o=y.value)==null||o.open("edit"),(_=y.value)==null||_.setFormData(s)},B=async s=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:s}),C()};return C(),(s,o)=>{const _=z,g=J,k=M,S=O,m=G,A=H,w=W,F=le,d=X,V=Y,I=ie("router-link"),U=Z,j=te,f=ue("perms"),q=ee;return l(),x("div",fe,[e(w,{class:"!border-none",shadow:"never"},{default:t(()=>[e(A,{ref:"formRef",class:"mb-[-16px]",model:u,inline:""},{default:t(()=>[e(g,{label:"\u5B57\u5178\u540D\u79F0"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:u.name,"onUpdate:modelValue":o[0]||(o[0]=a=>u.name=a),clearable:"",onKeyup:T(n(h),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u5B57\u5178\u7C7B\u578B"},{default:t(()=>[e(_,{class:"w-[280px]",modelValue:u.type,"onUpdate:modelValue":o[1]||(o[1]=a=>u.type=a),clearable:"",onKeyup:T(n(h),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u72B6\u6001"},{default:t(()=>[e(S,{class:"w-[280px]",modelValue:u.status,"onUpdate:modelValue":o[2]||(o[2]=a=>u.status=a)},{default:t(()=>[e(k,{label:"\u5168\u90E8",value:""}),e(k,{label:"\u6B63\u5E38",value:1}),e(k,{label:"\u505C\u7528",value:0})]),_:1},8,["modelValue"])]),_:1}),e(g,null,{default:t(()=>[e(m,{type:"primary",onClick:n(h)},{default:t(()=>[ye]),_:1},8,["onClick"]),e(m,{onClick:n(K)},{default:t(()=>[ve]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(w,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[E("div",null,[p((l(),r(m,{type:"primary",onClick:L},{icon:t(()=>[e(F,{name:"el-icon-Plus"})]),default:t(()=>[Ce]),_:1})),[[f,["setting.dict.dict_type/add"]]]),p((l(),r(m,{disabled:!b.value.length,type:"danger",onClick:o[3]||(o[3]=a=>B(b.value))},{icon:t(()=>[e(F,{name:"el-icon-Delete"})]),default:t(()=>[ge]),_:1},8,["disabled"])),[[f,["setting.dict.dict_type/delete"]]])]),p((l(),x("div",he,[E("div",null,[e(U,{data:n(c).lists,size:"large",onSelectionChange:P},{default:t(()=>[e(d,{type:"selection",width:"55"}),e(d,{label:"ID",prop:"id"}),e(d,{label:"\u5B57\u5178\u540D\u79F0",prop:"name","min-width":"120"}),e(d,{label:"\u5B57\u5178\u7C7B\u578B",prop:"type","min-width":"120"}),e(d,{label:"\u72B6\u6001"},{default:t(({row:a})=>[a.status==1?(l(),r(V,{key:0},{default:t(()=>[be]),_:1})):(l(),r(V,{key:1,type:"danger"},{default:t(()=>[ke]),_:1}))]),_:1}),e(d,{label:"\u5907\u6CE8",prop:"remark","show-tooltip-when-overflow":""}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(d,{label:"\u64CD\u4F5C",width:"190",fixed:"right"},{default:t(({row:a})=>[p((l(),r(m,{link:"",type:"primary",onClick:Q=>N(a)},{default:t(()=>[Ee]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/edit"]]]),p((l(),r(m,{type:"primary",link:""},{default:t(()=>[e(I,{to:{path:n(oe)("setting.dict.dict_data/lists"),query:{id:a.id}}},{default:t(()=>[Be]),_:2},1032,["to"])]),_:2},1024)),[[f,["setting.dict.dict_data/lists"]]]),p((l(),r(m,{link:"",type:"danger",onClick:Q=>B(a.id)},{default:t(()=>[we]),_:2},1032,["onClick"])),[[f,["setting.dict.dict_type/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",Fe,[e(j,{modelValue:n(c),"onUpdate:modelValue":o[4]||(o[4]=a=>re(c)?c.value=a:null),onChange:n(C)},null,8,["modelValue","onChange"])])])),[[q,n(c).loading]])]),_:1}),v.value?(l(),r(_e,{key:0,ref_key:"editRef",ref:y,onSuccess:n(C),onClose:o[5]||(o[5]=a=>v.value=!1)},null,8,["onSuccess"])):de("",!0)])}}});export{_t as default};