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