2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{G as I,H as M,L as j,M as q,N as G,O as H,B as K,C as Q,w as Z,D as J}from"./element-plus.2acb577d.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as X,b as Y}from"./index.81df6f20.js";import{u as ee}from"./usePaging.23706826.js";import{u as te}from"./useDictOptions.4fbfb4d7.js";import{e as oe,a as ae}from"./oa_car_cate.bcd4ddc3.js";import"./lodash.6bfd3540.js";import{_ as le}from"./edit.vue_vue_type_script_setup_true_name_oaCarCateEdit_lang.3524bcaf.js";import{d as B,s as ne,r as x,Z as se,am as ue,o as u,c as ie,U as t,L as a,u as o,R as r,M as _,K as m,a as V,i as re,Q as me,n as y}from"./@vue.821a47ec.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./index.f292cd50.js";const pe={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=B({name:"oaCarCateLists"}),Xe=B({...ce,setup(_e){const f=ne(),F=x(!1),s=se({title:"",name:"",status:""}),w=x([]),D=n=>{w.value=n.map(({id:e})=>e)},{dictData:$}=te(""),{pager:p,getLists:C,resetParams:L,resetPage:N}=ee({fetchFun:ae,params:s}),P=async()=>{var n;F.value=!0,await y(),(n=f.value)==null||n.open("add")},R=async n=>{var e,d;F.value=!0,await y(),(e=f.value)==null||e.open("edit"),(d=f.value)==null||d.setFormData(n)},k=async n=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await oe({id:n}),C()};return C(),(n,e)=>{const d=K,v=Q,g=I,S=M,i=Z,U=J,E=j,h=Y,c=q,z=G,O=W,b=ue("perms"),T=H;return u(),ie("div",null,[t(E,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(U,{class:"mb-[-16px]",model:o(s),inline:""},{default:a(()=>[t(v,{label:"\u8F66\u8F86\u540D\u79F0",prop:"title"},{default:a(()=>[t(d,{class:"w-[280px]",modelValue:o(s).title,"onUpdate:modelValue":e[0]||(e[0]=l=>o(s).title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8F66\u8F86\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(v,{label:"\u8F66\u8F86\u53F7\u7801",prop:"name"},{default:a(()=>[t(d,{class:"w-[280px]",modelValue:o(s).name,"onUpdate:modelValue":e[1]||(e[1]=l=>o(s).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8F66\u8F86\u53F7\u7801"},null,8,["modelValue"])]),_:1}),t(v,{label:"\u72B6\u6001",prop:"status"},{default:a(()=>[t(S,{modelValue:o(s).status,"onUpdate:modelValue":e[2]||(e[2]=l=>o(s).status=l),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!flex-1"},{default:a(()=>[t(g,{label:"\u7981\u7528",value:0}),t(g,{label:"\u542F\u7528",value:1})]),_:1},8,["modelValue"])]),_:1}),t(v,null,{default:a(()=>[t(i,{type:"primary",onClick:o(N)},{default:a(()=>e[6]||(e[6]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(i,{onClick:o(L)},{default:a(()=>e[7]||(e[7]=[r("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),m(E,{class:"!border-none",shadow:"never"},{default:a(()=>[_((u(),m(i,{type:"primary",onClick:P},{icon:a(()=>[t(h,{name:"el-icon-Plus"})]),default:a(()=>[e[8]||(e[8]=r(" \u65B0\u589E "))]),_:1})),[[b,["works.xzgl.oa_car_cate/add"]]]),_((u(),m(i,{disabled:!o(w).length,onClick:e[3]||(e[3]=l=>k(o(w)))},{default:a(()=>e[9]||(e[9]=[r(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[b,["works.xzgl.oa_car_cate/delete"]]]),V("div",pe,[t(z,{data:o(p).lists,onSelectionChange:D},{default:a(()=>[t(c,{type:"selection",width:"55"}),t(c,{label:"\u8F66\u8F86\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),t(c,{label:"\u8F66\u8F86\u53F7\u7801",prop:"name","show-overflow-tooltip":""}),t(c,{label:"\u72B6\u6001",prop:"status_text","show-overflow-tooltip":""}),t(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((u(),m(i,{type:"primary",link:"",onClick:A=>R(l)},{default:a(()=>e[10]||(e[10]=[r(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[b,["works.xzgl.oa_car_cate/edit"]]]),_((u(),m(i,{type:"danger",link:"",onClick:A=>k(l.id)},{default:a(()=>e[11]||(e[11]=[r(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[b,["works.xzgl.oa_car_cate/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",de,[t(O,{modelValue:o(p),"onUpdate:modelValue":e[4]||(e[4]=l=>re(p)?p.value=l:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(p).loading]]),o(F)?(u(),m(le,{key:0,ref_key:"editRef",ref:f,"dict-data":o($),onSuccess:o(C),onClose:e[5]||(e[5]=l=>F.value=!1)},null,8,["dict-data","onSuccess"])):me("",!0)])}}});export{Xe as default};
|