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

2 lines
7.0 KiB
JavaScript

import{B as H,C as J,Q as W,R as X,w as Y,D as Z,I as ee,L as te,_ as ae,M as le,N as oe}from"./element-plus.f958bb38.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.437cabf2.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{t as ne,f as ie,b as de}from"./index.79566453.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.2a805e45.js";import{u as me}from"./vue-router.12d45bc3.js";import{u as pe}from"./usePaging.160b82b8.js";import{a as ce}from"./useDictOptions.a1641d27.js";import{_ as _e,a as fe,b as Fe}from"./edit.vue_vue_type_script_setup_true_name_productEdit_lang.a20a591b.js";import{d as $,s as ve,r as A,$ as be,af as Ce,o as d,c as T,U as e,L as a,M as f,u,K as p,R as Ee,V as ye,a7 as we,a as V,S as s,T as F,k as De,n as I}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.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"./pinia.dfca86b4.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.2cdc8407.js";import"./index.ace66c08.js";const ge=s("\u67E5\u8BE2"),he=s("\u91CD\u7F6E"),Ve=s(" \u65B0\u589E "),ke=s(" \u5220\u9664 "),Be={class:"mt-4"},xe=s(" \u7F16\u8F91 "),Ae=s(" \u5220\u9664 "),Te={class:"flex mt-4 justify-end"},Ie=$({name:"productLists"}),yt=$({...Ie,setup($e){const{query:U}=me(),v=ve(),b=A(!1);let w=U.land_id;typeof w>"u"&&(w="");const o=be({user_id:"",land_id:w,code:"",name:"",status:"",create_time:"",start_time:"",end_time:""}),D=A([]),L=n=>{D.value=n.map(({id:l})=>l)},{dictData:g}=ce("product_status"),{pager:_,getLists:C,resetParams:P,resetPage:R}=pe({fetchFun:fe,params:o}),S=async()=>{var n;b.value=!0,await I(),(n=v.value)==null||n.open("add")},N=async n=>{var l,r;b.value=!0,await I(),(l=v.value)==null||l.open("edit"),(r=v.value)==null||r.setFormData(n)},k=async n=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Fe({id:n}),C()};return C(),(n,l)=>{const r=H,m=J,B=W,M=X,q=re,c=Y,j=Z,x=ee,K=de,i=te,E=ae,O=se,Q=le,z=ue,y=Ce("perms"),G=oe;return d(),T("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(j,{class:"mb-[-16px]",model:o,inline:""},{default:a(()=>[e(m,{label:"\u7528\u6237ID",prop:"user_id"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o.user_id,"onUpdate:modelValue":l[0]||(l[0]=t=>o.user_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u571F\u5730ID",prop:"land_id"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o.land_id,"onUpdate:modelValue":l[1]||(l[1]=t=>o.land_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o.code,"onUpdate:modelValue":l[2]||(l[2]=t=>o.code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o.name,"onUpdate:modelValue":l[3]||(l[3]=t=>o.name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u4EA7\u54C1\u72B6\u6001",prop:"status"},{default:a(()=>[e(M,{class:"w-[280px]",modelValue:o.status,"onUpdate:modelValue":l[4]||(l[4]=t=>o.status=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1\u72B6\u6001"},{default:a(()=>[e(B,{label:"\u5168\u90E8",value:""}),(d(!0),T(ye,null,we(u(g).product_status,(t,h)=>(d(),p(B,{key:h,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:a(()=>[e(q,{startTime:o.start_time,"onUpdate:startTime":l[5]||(l[5]=t=>o.start_time=t),endTime:o.end_time,"onUpdate:endTime":l[6]||(l[6]=t=>o.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(m,null,{default:a(()=>[e(c,{type:"primary",onClick:u(R)},{default:a(()=>[ge]),_:1},8,["onClick"]),e(c,{onClick:u(P)},{default:a(()=>[he]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((d(),p(x,{class:"!border-none",shadow:"never"},{default:a(()=>[f((d(),p(c,{type:"primary",onClick:S},{icon:a(()=>[e(K,{name:"el-icon-Plus"})]),default:a(()=>[Ve]),_:1})),[[y,["land.product/add"]]]),f((d(),p(c,{disabled:!D.value.length,onClick:l[7]||(l[7]=t=>k(D.value))},{default:a(()=>[ke]),_:1},8,["disabled"])),[[y,["land.product/delete"]]]),V("div",Be,[e(Q,{data:u(_).lists,onSelectionChange:L,style:{width:"100%"}},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),e(i,{label:"\u7528\u6237\u4FE1\u606F",width:"200"},{default:a(({row:t})=>[e(E,{class:"mr-2",type:"success"},{default:a(()=>[s("ID: "+F(t.user_id),1)]),_:2},1024),e(E,{class:"mr-2",type:"success"},{default:a(()=>[s("\u8D26\u6237: "+F(t.account),1)]),_:2},1024)]),_:1}),e(i,{label:"\u571F\u5730\u4FE1\u606F",width:"200"},{default:a(({row:t})=>[e(E,{class:"mr-2",type:"success"},{default:a(()=>[s("ID: "+F(t.land_id),1)]),_:2},1024),e(E,{class:"mr-2",type:"success"},{default:a(()=>[s("\u540D\u79F0: "+F(t.title),1)]),_:2},1024)]),_:1}),e(i,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),e(i,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u4EA7\u54C1\u72B6\u6001",align:"center",prop:"status"},{default:a(({row:t})=>[e(O,{options:u(g).product_status,value:t.status},null,8,["options","value"])]),_:1}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",width:"180",align:"center",prop:"create_time"},{default:a(({row:t})=>[V("span",null,F(t.create_time?u(ne)(t.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(i,{label:"\u64CD\u4F5C",width:"140",align:"center",fixed:"right"},{default:a(({row:t})=>[f((d(),p(c,{type:"primary",link:"",onClick:h=>N(t)},{default:a(()=>[xe]),_:2},1032,["onClick"])),[[y,["land.product/edit"]]]),f((d(),p(c,{type:"danger",link:"",onClick:h=>k(t.id)},{default:a(()=>[Ae]),_:2},1032,["onClick"])),[[y,["land.product/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",Te,[e(z,{modelValue:u(_),"onUpdate:modelValue":l[8]||(l[8]=t=>De(_)?_.value=t:null),onChange:u(C)},null,8,["modelValue","onChange"])])]),_:1})),[[G,u(_).loading]]),b.value?(d(),p(_e,{key:0,ref_key:"editRef",ref:v,"dict-data":u(g),onSuccess:u(C),onClose:l[9]||(l[9]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):Ee("",!0)])}}});export{yt as default};