2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{B as K,C as O,Q,R as z,w as G,D as H,I as J,L as W,b as X,M as Y,N as Z}from"./element-plus.f958bb38.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.437cabf2.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.2a805e45.js";import{u as oe}from"./vue-router.12d45bc3.js";import{u as ae}from"./usePaging.160b82b8.js";import{a as ue}from"./useDictOptions.c0216403.js";import{_ as ne,a as se,b as re}from"./edit.vue_vue_type_script_setup_true_name_landPlantEdit_lang.ce736595.js";import{t as ie,f as pe}from"./index.259175a0.js";import{d as y,s as de,r as g,$ as me,af as _e,o as i,c as B,U as e,L as o,M as v,u as n,K as m,R as ce,V as fe,a7 as Ce,a as w,T as De,k as be,S as f,n as Fe}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"./picker.29fa313d.js";import"./index.d41836ad.js";import"./index.8212fac8.js";import"./index.ad85fb33.js";import"./index.17197958.js";import"./index.vue_vue_type_script_setup_true_lang.97e8a9ad.js";import"./vue3-video-play.4851e3ad.js";import"./vuedraggable.2903c55e.js";import"./vue.305b70ee.js";import"./sortablejs.9ffc750f.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 ve=f("\u67E5\u8BE2"),we=f("\u91CD\u7F6E"),Ee={class:"mt-4"},he=f(" \u7F16\u8F91 "),ke=f(" \u5220\u9664 "),Ve={class:"flex mt-4 justify-end"},ge=y({name:"landPlantLists"}),kt=y({...ge,setup(Be){const{query:x}=oe(),C=de(),D=g(!1),a=me({land_id:Number(x.land_id),kind:"",breed:"",user:"",status:"",plant_date:""}),T=g([]),L=p=>{T.value=p.map(({id:l})=>l)},{dictData:b}=ue("plant_status"),{pager:d,getLists:_,resetParams:U,resetPage:I}=ae({fetchFun:se,params:a}),$=async p=>{var l,s;D.value=!0,await Fe(),(l=C.value)==null||l.open("edit"),(s=C.value)==null||s.setFormData(p)},A=async p=>{await pe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await re({id:p}),_()};return _(),(p,l)=>{const s=K,r=O,E=Q,P=z,R=le,c=G,S=H,h=J,u=W,N=te,k=X,q=Y,M=ee,V=_e("perms"),j=Z;return i(),B("div",null,[e(h,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(S,{class:"mb-[-16px]",model:a,inline:""},{default:o(()=>[e(r,{label:"\u571F\u5730ID",prop:"land_id"},{default:o(()=>[e(s,{class:"w-[280px]",modelValue:a.land_id,"onUpdate:modelValue":l[0]||(l[0]=t=>a.land_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u79CD\u690D\u79CD\u7C7B",prop:"kind"},{default:o(()=>[e(s,{class:"w-[280px]",modelValue:a.kind,"onUpdate:modelValue":l[1]||(l[1]=t=>a.kind=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u79CD\u7C7B"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u79CD\u690D\u54C1\u724C",prop:"breed"},{default:o(()=>[e(s,{class:"w-[280px]",modelValue:a.breed,"onUpdate:modelValue":l[2]||(l[2]=t=>a.breed=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u54C1\u724C"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u79CD\u690D\u4EBA\u5458",prop:"user"},{default:o(()=>[e(s,{class:"w-[280px]",modelValue:a.user,"onUpdate:modelValue":l[3]||(l[3]=t=>a.user=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u751F\u957F\u72B6\u6001",prop:"status"},{default:o(()=>[e(P,{class:"w-[280px]",modelValue:a.status,"onUpdate:modelValue":l[4]||(l[4]=t=>a.status=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u751F\u957F\u72B6\u6001"},{default:o(()=>[e(E,{label:"\u5168\u90E8",value:""}),(i(!0),B(fe,null,Ce(n(b).plant_status,(t,F)=>(i(),m(E,{key:F,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u64AD\u79CD\u65F6\u95F4",prop:"plant_date"},{default:o(()=>[e(R,{startTime:a.start_time,"onUpdate:startTime":l[5]||(l[5]=t=>a.start_time=t),endTime:a.end_time,"onUpdate:endTime":l[6]||(l[6]=t=>a.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(r,null,{default:o(()=>[e(c,{type:"primary",onClick:n(I)},{default:o(()=>[ve]),_:1},8,["onClick"]),e(c,{onClick:n(U)},{default:o(()=>[we]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),m(h,{class:"!border-none",shadow:"never"},{default:o(()=>[w("div",Ee,[e(q,{data:n(d).lists,onSelectionChange:L},{default:o(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u79CD\u690D\u79CD\u7C7B",prop:"kind","show-overflow-tooltip":""}),e(u,{label:"\u79CD\u690D\u54C1\u724C",prop:"breed","show-overflow-tooltip":""}),e(u,{label:"\u571F\u5730ID",prop:"land_id","show-overflow-tooltip":""}),e(u,{label:"\u6240\u5C5E\u571F\u5730",prop:"land.title","show-overflow-tooltip":""}),e(u,{label:"\u79CD\u690D\u9762\u79EF",prop:"area","show-overflow-tooltip":""}),e(u,{label:"\u79CD\u690D\u4EBA\u5458",prop:"user","show-overflow-tooltip":""}),e(u,{label:"\u751F\u957F\u72B6\u6001",prop:"status"},{default:o(({row:t})=>[e(N,{options:n(b).plant_status,value:t.status},null,8,["options","value"])]),_:1}),e(u,{label:"\u79CD\u690D\u56FE\u7247",prop:"pic"},{default:o(({row:t})=>[e(k,{style:{width:"50px",height:"50px"},src:t.pic},null,8,["src"])]),_:1}),e(u,{label:"\u6EAF\u6E90\u4E8C\u7EF4\u7801",prop:"qr_code"},{default:o(({row:t})=>[e(k,{style:{width:"50px",height:"50px"},src:t.qr_code},null,8,["src"])]),_:1}),e(u,{label:"\u64AD\u79CD\u65F6\u95F4",prop:"plant_date"},{default:o(({row:t})=>[w("span",null,De(t.plant_date?n(ie)(t.plant_date,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[v((i(),m(c,{type:"primary",link:"",onClick:F=>$(t)},{default:o(()=>[he]),_:2},1032,["onClick"])),[[V,["land.land_plant/edit"]]]),v((i(),m(c,{type:"danger",link:"",onClick:F=>A(t.id)},{default:o(()=>[ke]),_:2},1032,["onClick"])),[[V,["land.land_plant/delete"]]])]),_:1})]),_:1},8,["data"])]),w("div",Ve,[e(M,{modelValue:n(d),"onUpdate:modelValue":l[7]||(l[7]=t=>be(d)?d.value=t:null),onChange:n(_)},null,8,["modelValue","onChange"])])]),_:1})),[[j,n(d).loading]]),D.value?(i(),m(ne,{key:0,ref_key:"editRef",ref:C,"dict-data":n(b),onSuccess:n(_),onClose:l[8]||(l[8]=t=>D.value=!1)},null,8,["dict-data","onSuccess"])):ce("",!0)])}}});export{kt as default};
|