2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{C as z,D as G,J as H,K as W,w as X,F as Y,L as ee,M as oe,N as le,O as ae}from"./element-plus.73c9e9a6.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.317e431e.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.acdb5f99.js";import{f as ne,b as se}from"./index.bd5cd373.js";import{u as de}from"./usePaging.77fa9d39.js";import{u as re}from"./useDictOptions.3ea9a314.js";import{d as pe,e as ie}from"./code.f61a7faa.js";import"./lodash.403d4198.js";import{_ as me}from"./edit.vue_vue_type_script_setup_true_name_codeEdit_lang.6719fd1d.js";import{_ as ce}from"./details.vue_vue_type_script_setup_true_name_codeDETAILS_lang.e0bf3c2b.js";import{d as S,s as $,r as k,Z as _e,ap as fe,o as r,c as U,U as e,L as t,u as o,T as Fe,a9 as ve,K as i,R as c,M as F,a as L,j as Ce,Q as R,n as g}from"./@vue.663bc523.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./index.fa58e261.js";const be={class:"mt-4"},Ee={class:"flex mt-4 justify-end"},ye=S({name:"codeLists"}),no=S({...ye,setup(we){const v=$(),w=$(),C=k(!1),B=k(!1),u=_e({name:"",py:"",code:"",type:"",data:"",more:"",sort:""}),V=k([]),N=s=>{V.value=s.map(({id:l})=>l)},{dictData:b}=re("code_type"),{pager:_,getLists:f,resetParams:P,resetPage:T}=de({fetchFun:ie,params:u}),I=async()=>{var s;C.value=!0,await g(),(s=v.value)==null||s.open("add")},j=async s=>{var l,n;C.value=!0,await g(),(l=v.value)==null||l.open("edit"),(n=v.value)==null||n.setFormData(s)},A=async s=>{var l,n;B.value=!0,await g(),(l=w.value)==null||l.open(),(n=w.value)==null||n.setFormData(s)},D=async s=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:s}),f()};return f(),(s,l)=>{const n=z,p=G,h=H,K=W,m=X,M=Y,x=ee,O=se,d=oe,q=ue,J=le,Q=te,E=fe("perms"),Z=ae;return r(),U("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(M,{class:"mb-[-16px]",model:o(u),inline:""},{default:t(()=>[e(p,{label:"\u6761\u7801\u540D\u79F0",prop:"name"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).name,"onUpdate:modelValue":l[0]||(l[0]=a=>o(u).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6761\u7801\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).py,"onUpdate:modelValue":l[1]||(l[1]=a=>o(u).py=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u62FC\u97F3\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6761\u7801\u5185\u5BB9",prop:"code"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).code,"onUpdate:modelValue":l[2]||(l[2]=a=>o(u).code=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6761\u7801\u5185\u5BB9"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6761\u7801\u7C7B\u578B",prop:"type"},{default:t(()=>[e(K,{class:"w-[280px]",modelValue:o(u).type,"onUpdate:modelValue":l[3]||(l[3]=a=>o(u).type=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6761\u7801\u7C7B\u578B"},{default:t(()=>[e(h,{label:"\u5168\u90E8",value:""}),(r(!0),U(Fe,null,ve(o(b).code_type,(a,y)=>(r(),i(h,{key:y,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).data,"onUpdate:modelValue":l[4]||(l[4]=a=>o(u).data=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).more,"onUpdate:modelValue":l[5]||(l[5]=a=>o(u).more=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6269\u5C55\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6392\u5E8F",prop:"sort"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:o(u).sort,"onUpdate:modelValue":l[6]||(l[6]=a=>o(u).sort=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(p,null,{default:t(()=>[e(m,{type:"primary",onClick:o(T)},{default:t(()=>[c("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(m,{onClick:o(P)},{default:t(()=>[c("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),F((r(),i(x,{class:"!border-none",shadow:"never"},{default:t(()=>[F((r(),i(m,{type:"primary",onClick:I},{icon:t(()=>[e(O,{name:"el-icon-Plus"})]),default:t(()=>[c(" \u65B0\u589E ")]),_:1})),[[E,["goods.code/add"]]]),F((r(),i(m,{disabled:!o(V).length,onClick:l[7]||(l[7]=a=>D(o(V)))},{default:t(()=>[c(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[E,["goods.code/delete"]]]),L("div",be,[e(J,{data:o(_).lists,onSelectionChange:N},{default:t(()=>[e(d,{type:"selection",width:"55"}),e(d,{label:"ID",prop:"id",width:"55"}),e(d,{label:"\u6761\u7801\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(d,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py","show-overflow-tooltip":""}),e(d,{label:"\u6761\u7801\u5185\u5BB9",prop:"code","show-overflow-tooltip":""}),e(d,{label:"\u6761\u7801\u7C7B\u578B",prop:"type"},{default:t(({row:a})=>[e(q,{options:o(b).code_type,value:a.type},null,8,["options","value"])]),_:1}),e(d,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(d,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more","show-overflow-tooltip":""}),e(d,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(d,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:a})=>[F((r(),i(m,{type:"primary",link:"",onClick:y=>j(a)},{default:t(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["goods.code/edit"]]]),e(m,{type:"primary",link:"",onClick:y=>A(a)},{default:t(()=>[c(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"]),F((r(),i(m,{type:"danger",link:"",onClick:y=>D(a.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[E,["goods.code/delete"]]])]),_:1})]),_:1},8,["data"])]),L("div",Ee,[e(Q,{modelValue:o(_),"onUpdate:modelValue":l[8]||(l[8]=a=>Ce(_)?_.value=a:null),onChange:o(f)},null,8,["modelValue","onChange"])])]),_:1})),[[Z,o(_).loading]]),o(C)?(r(),i(me,{key:0,ref_key:"editRef",ref:v,"dict-data":o(b),onSuccess:o(f),onClose:l[9]||(l[9]=a=>C.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0),o(B)?(r(),i(ce,{key:1,ref_key:"detailRef",ref:w,"dict-data":o(b),onSuccess:o(f),onClose:l[10]||(l[10]=a=>B.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0)])}}});export{no as default};
|