2 lines
7.6 KiB
JavaScript
2 lines
7.6 KiB
JavaScript
import{B as ee,C as te,Q as ae,R as le,w as oe,D as ue,I as ne,L as se,_ as ie,M as de,N as re}from"./element-plus.5df6f736.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{t as ce,k as _e,f as fe,b as ve}from"./index.1f78e617.js";import{_ as Fe}from"./index.vue_vue_type_script_setup_true_lang.2b417e0a.js";import{u as be}from"./vue-router.ed788fee.js";import{u as Ce}from"./usePaging.2a59f422.js";import{a as Ee}from"./useDictOptions.8d220934.js";import{i as ye,j as ke}from"./product.b8535e4b.js";import Be from"./edit.f677a3ee.js";import{_ as ge}from"./bind.vue_vue_type_script_setup_true_name_landEdit_lang.8306c976.js";import{d as U,s as P,r as w,_ as he,a3 as De,ae as we,o as u,c as S,T as t,K as l,L as _,u as n,J as s,Q as k,U as Ve,a6 as Ae,a as V,R as r,S as A,j as xe,n as x}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.50c3b6f7.js";import"./axios.c2a2014a.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.33f675f2.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.5d5b8bda.js";import"./color.da05fa89.js";import"./clone.06747a68.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.1c707d7b.js";import"./ms.a9ae1d6d.js";import"./nprogress.fc605139.js";import"./vue-clipboard3.dc900a40.js";import"./clipboard.6beb87aa.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.5f547370.js";const Te=r("\u67E5\u8BE2"),$e=r("\u91CD\u7F6E"),Re=r(" \u65B0\u589E "),Ie=r(" \u5220\u9664 "),Pe={class:"mt-4"},Se=r(" \u7F16\u8F91 "),Ue=r(" \u7ED1\u5B9A\u8BBE\u5907 "),Le=r(" \u8BBE\u5907\u7BA1\u7406 "),Ne=r(" \u5220\u9664 "),je={class:"flex mt-4 justify-end"},qe=U({name:"productLists"}),$t=U({...qe,setup(Me){const{query:L}=be(),b=P(),B=P(),C=w(!1),g=w(!1);let h=L.land_id;typeof h>"u"&&(h="");const o=he({user_id:"",land_id:h,code:"",name:"",status:"",create_time:"",start_time:"",end_time:""}),D=w([]),N=i=>{D.value=i.map(({id:a})=>a)},{dictData:E}=Ee("product_status"),{pager:v,getLists:F,resetParams:j,resetPage:q}=Ce({fetchFun:ye,params:o}),M=async()=>{var i;C.value=!0,await x(),(i=b.value)==null||i.open("add")},Q=async i=>{var a,d;C.value=!0,await x(),(a=b.value)==null||a.open("edit"),(d=b.value)==null||d.setFormData(i)},J=async i=>{var a,d;g.value=!0,await x(),(a=B.value)==null||a.open("bind"),(d=B.value)==null||d.setFormData(i)},T=async i=>{await fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ke({id:i}),F()};return F(),(i,a)=>{const d=ee,c=te,$=ae,K=le,O=Fe,m=oe,z=ue,R=ne,G=ve,p=se,I=ie,H=pe,W=De("router-link"),X=de,Y=me,f=we("perms"),Z=re;return u(),S("div",null,[t(R,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(z,{class:"mb-[-16px]",model:o,inline:""},{default:l(()=>[t(c,{label:"\u7528\u6237ID",prop:"user_id"},{default:l(()=>[t(d,{class:"w-[280px]",modelValue:o.user_id,"onUpdate:modelValue":a[0]||(a[0]=e=>o.user_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u571F\u5730ID",prop:"land_id"},{default:l(()=>[t(d,{class:"w-[280px]",modelValue:o.land_id,"onUpdate:modelValue":a[1]||(a[1]=e=>o.land_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code"},{default:l(()=>[t(d,{class:"w-[280px]",modelValue:o.code,"onUpdate:modelValue":a[2]||(a[2]=e=>o.code=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[t(d,{class:"w-[280px]",modelValue:o.name,"onUpdate:modelValue":a[3]||(a[3]=e=>o.name=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u4EA7\u54C1\u72B6\u6001",prop:"status"},{default:l(()=>[t(K,{class:"w-[280px]",modelValue:o.status,"onUpdate:modelValue":a[4]||(a[4]=e=>o.status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1\u72B6\u6001"},{default:l(()=>[t($,{label:"\u5168\u90E8",value:""}),(u(!0),S(Ve,null,Ae(n(E).product_status,(e,y)=>(u(),s($,{key:y,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(c,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:l(()=>[t(O,{startTime:o.start_time,"onUpdate:startTime":a[5]||(a[5]=e=>o.start_time=e),endTime:o.end_time,"onUpdate:endTime":a[6]||(a[6]=e=>o.end_time=e)},null,8,["startTime","endTime"])]),_:1}),t(c,null,{default:l(()=>[t(m,{type:"primary",onClick:n(q)},{default:l(()=>[Te]),_:1},8,["onClick"]),t(m,{onClick:n(j)},{default:l(()=>[$e]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),s(R,{class:"!border-none",shadow:"never"},{default:l(()=>[_((u(),s(m,{type:"primary",onClick:M},{icon:l(()=>[t(G,{name:"el-icon-Plus"})]),default:l(()=>[Re]),_:1})),[[f,["land.product/add"]]]),_((u(),s(m,{disabled:!D.value.length,onClick:a[7]||(a[7]=e=>T(D.value))},{default:l(()=>[Ie]),_:1},8,["disabled"])),[[f,["land.product/delete"]]]),V("div",Pe,[t(X,{data:n(v).lists,onSelectionChange:N,style:{width:"100%"}},{default:l(()=>[t(p,{type:"selection",width:"55"}),t(p,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),t(p,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(p,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),t(p,{label:"\u6240\u5C5E\u571F\u5730",width:"200"},{default:l(({row:e})=>[e.land_id!=null?(u(),s(I,{key:0,class:"mr-2",type:"info"},{default:l(()=>[r("ID: "+A(e.land_id),1)]),_:2},1024)):k("",!0),e.title!=null?(u(),s(I,{key:1,class:"mr-2",type:"info"},{default:l(()=>[r("\u540D\u79F0: "+A(e.title),1)]),_:2},1024)):k("",!0)]),_:1}),t(p,{label:"\u4EA7\u54C1\u72B6\u6001",align:"center",prop:"status"},{default:l(({row:e})=>[t(H,{options:n(E).product_status,value:e.status},null,8,["options","value"])]),_:1}),t(p,{label:"\u521B\u5EFA\u65F6\u95F4",width:"180",align:"center",prop:"create_time"},{default:l(({row:e})=>[V("span",null,A(e.create_time?n(ce)(e.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),t(p,{label:"\u64CD\u4F5C",width:"300",align:"center",fixed:"right"},{default:l(({row:e})=>[_((u(),s(m,{type:"primary",link:"",onClick:y=>Q(e)},{default:l(()=>[Se]),_:2},1032,["onClick"])),[[f,["land.product/edit"]]]),_((u(),s(m,{type:"primary",link:"",onClick:y=>J(e)},{default:l(()=>[Ue]),_:2},1032,["onClick"])),[[f,["land.product/bind"]]]),_((u(),s(m,{type:"primary",link:""},{default:l(()=>[t(W,{to:{path:n(_e)("device.device/lists"),query:{product_id:e.id}}},{default:l(()=>[Le]),_:2},1032,["to"])]),_:2},1024)),[[f,["device.device/lists"]]]),_((u(),s(m,{type:"danger",link:"",onClick:y=>T(e.id)},{default:l(()=>[Ne]),_:2},1032,["onClick"])),[[f,["land.product/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",je,[t(Y,{modelValue:n(v),"onUpdate:modelValue":a[8]||(a[8]=e=>xe(v)?v.value=e:null),onChange:n(F)},null,8,["modelValue","onChange"])])]),_:1})),[[Z,n(v).loading]]),C.value?(u(),s(Be,{key:0,ref_key:"editRef",ref:b,"dict-data":n(E),onSuccess:n(F),onClose:a[9]||(a[9]=e=>C.value=!1)},null,8,["dict-data","onSuccess"])):k("",!0),g.value?(u(),s(ge,{key:1,ref_key:"bindRef",ref:B,"dict-data":n(E),onSuccess:n(F),onClose:a[10]||(a[10]=e=>g.value=!1)},null,8,["dict-data","onSuccess"])):k("",!0)])}}});export{$t as default};
|