2 lines
7.9 KiB
JavaScript
2 lines
7.9 KiB
JavaScript
import{B as z,C as G,R as Q,S as W,w as X,D as Y,H as Z,I as ee,_ as te,b as le,J as ae,K as oe}from"./element-plus.c4a2af8a.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.d8a052c5.js";import{u as ie}from"./vue-router.12d45bc3.js";import{u as de}from"./usePaging.160b82b8.js";import{t as re,k as pe,f as me}from"./index.5f96bf79.js";import{u as _e}from"./useDictOptions.905ca20a.js";import{_ as ce,a as fe,b as De}from"./edit.vue_vue_type_script_setup_true_name_landPlantEdit_lang.db4990d7.js";import{d as I,s as Ce,r as x,$ as Fe,a4 as be,af as ve,o as r,c as T,U as e,L as l,M as F,u as s,K as m,R as he,V as we,a7 as Ee,a as k,S as n,T as f,k as ye,n as ke}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"./picker.81de4367.js";import"./index.e7d2ea5d.js";import"./index.e0178f39.js";import"./index.dad8a04d.js";import"./index.6621cde4.js";import"./index.vue_vue_type_script_setup_true_lang.f10703bb.js";import"./vue3-video-play.4851e3ad.js";import"./vuedraggable.2903c55e.js";import"./vue.305b70ee.js";import"./sortablejs.9ffc750f.js";const ge=n("\u67E5\u8BE2"),Ve=n("\u91CD\u7F6E"),Be={class:"mt-4"},xe=n(" \u79CD\u690D\u64CD\u4F5C "),Te=n(" \u7F16\u8F91 "),Ie=n(" \u5220\u9664 "),Ue={class:"flex mt-4 justify-end"},Le=I({name:"landPlantLists"}),It=I({...Le,setup(Pe){const{query:U}=ie(),b=Ce(),v=x(!1);let h=U.land_id;typeof h>"u"&&(h="");const o=Fe({user_id:"",land_id:h,kind:"",breed:"",user:"",status:"",plant_date:"",start_time:"",end_time:""}),L=x([]),P=p=>{L.value=p.map(({id:a})=>a)},{dictData:w}=_e("plant_status"),{pager:_,getLists:D,resetParams:R,resetPage:S}=de({fetchFun:fe,params:o}),$=async p=>{var a,i;v.value=!0,await ke(),(a=b.value)==null||a.open("edit"),(i=b.value)==null||i.setFormData(p)},A=async p=>{await me.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await De({id:p}),D()};return D(),(p,a)=>{const i=z,d=G,g=Q,q=W,N=ne,c=X,M=Y,V=Z,u=ee,C=te,K=se,B=le,j=be("router-link"),H=ae,J=ue,E=ve("perms"),O=oe;return r(),T("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(M,{class:"mb-[-16px]",model:o,inline:""},{default:l(()=>[e(d,{label:"\u7528\u6237ID",prop:"user_id"},{default:l(()=>[e(i,{class:"w-[280px]",modelValue:o.user_id,"onUpdate:modelValue":a[0]||(a[0]=t=>o.user_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u571F\u5730ID",prop:"land_id"},{default:l(()=>[e(i,{class:"w-[280px]",modelValue:o.land_id,"onUpdate:modelValue":a[1]||(a[1]=t=>o.land_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u79CD\u690D\u79CD\u7C7B",prop:"kind"},{default:l(()=>[e(i,{class:"w-[280px]",modelValue:o.kind,"onUpdate:modelValue":a[2]||(a[2]=t=>o.kind=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u79CD\u7C7B"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u79CD\u690D\u54C1\u724C",prop:"breed"},{default:l(()=>[e(i,{class:"w-[280px]",modelValue:o.breed,"onUpdate:modelValue":a[3]||(a[3]=t=>o.breed=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u54C1\u724C"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u79CD\u690D\u4EBA\u5458",prop:"user"},{default:l(()=>[e(i,{class:"w-[280px]",modelValue:o.user,"onUpdate:modelValue":a[4]||(a[4]=t=>o.user=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u751F\u957F\u72B6\u6001",prop:"status"},{default:l(()=>[e(q,{class:"w-[280px]",modelValue:o.status,"onUpdate:modelValue":a[5]||(a[5]=t=>o.status=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u751F\u957F\u72B6\u6001"},{default:l(()=>[e(g,{label:"\u5168\u90E8",value:""}),(r(!0),T(we,null,Ee(s(w).plant_status,(t,y)=>(r(),m(g,{key:y,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u64AD\u79CD\u65F6\u95F4",prop:"plant_date"},{default:l(()=>[e(N,{startTime:o.start_time,"onUpdate:startTime":a[6]||(a[6]=t=>o.start_time=t),endTime:o.end_time,"onUpdate:endTime":a[7]||(a[7]=t=>o.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(d,null,{default:l(()=>[e(c,{type:"primary",onClick:s(S)},{default:l(()=>[ge]),_:1},8,["onClick"]),e(c,{onClick:s(R)},{default:l(()=>[Ve]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),F((r(),m(V,{class:"!border-none",shadow:"never"},{default:l(()=>[k("div",Be,[e(H,{data:s(_).lists,onSelectionChange:P,style:{width:"100%"}},{default:l(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),e(u,{label:"\u7528\u6237\u4FE1\u606F",width:"200"},{default:l(({row:t})=>[e(C,{class:"ml-2",type:"success"},{default:l(()=>[n("ID: "+f(t.user_id),1)]),_:2},1024),e(C,{class:"ml-2",type:"success"},{default:l(()=>[n("\u8D26\u6237: "+f(t.account),1)]),_:2},1024)]),_:1}),e(u,{label:"\u571F\u5730\u4FE1\u606F",width:"200"},{default:l(({row:t})=>[e(C,{class:"ml-2",type:"success"},{default:l(()=>[n("ID: "+f(t.land_id),1)]),_:2},1024),e(C,{class:"ml-2",type:"success"},{default:l(()=>[n("\u540D\u79F0: "+f(t.title),1)]),_:2},1024)]),_:1}),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:"\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:l(({row:t})=>[e(K,{options:s(w).plant_status,value:t.status},null,8,["options","value"])]),_:1}),e(u,{label:"\u79CD\u690D\u56FE\u7247",width:"150",prop:"pic"},{default:l(({row:t})=>[e(B,{style:{width:"50px",height:"50px"},src:t.pic},null,8,["src"])]),_:1}),e(u,{label:"\u6EAF\u6E90\u4E8C\u7EF4\u7801",width:"150",prop:"qr_code"},{default:l(({row:t})=>[e(B,{style:{width:"50px",height:"50px"},src:t.qr_code},null,8,["src"])]),_:1}),e(u,{label:"\u64AD\u79CD\u65F6\u95F4",width:"180",prop:"plant_date"},{default:l(({row:t})=>[k("span",null,f(t.plant_date?s(re)(t.plant_date,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"200",align:"center",fixed:"right"},{default:l(({row:t})=>[F((r(),m(c,{type:"primary",link:""},{default:l(()=>[e(j,{to:{path:s(pe)("land.land_plant_action/lists"),query:{plant_id:t.id}}},{default:l(()=>[xe]),_:2},1032,["to"])]),_:2},1024)),[[E,["land.land_plant_action/lists"]]]),F((r(),m(c,{type:"primary",link:"",onClick:y=>$(t)},{default:l(()=>[Te]),_:2},1032,["onClick"])),[[E,["land.land_plant/edit"]]]),F((r(),m(c,{type:"danger",link:"",onClick:y=>A(t.id)},{default:l(()=>[Ie]),_:2},1032,["onClick"])),[[E,["land.land_plant/delete"]]])]),_:1})]),_:1},8,["data"])]),k("div",Ue,[e(J,{modelValue:s(_),"onUpdate:modelValue":a[8]||(a[8]=t=>ye(_)?_.value=t:null),onChange:s(D)},null,8,["modelValue","onChange"])])]),_:1})),[[O,s(_).loading]]),v.value?(r(),m(ce,{key:0,ref_key:"editRef",ref:b,"dict-data":s(w),onSuccess:s(D),onClose:a[9]||(a[9]=t=>v.value=!1)},null,8,["dict-data","onSuccess"])):he("",!0)])}}});export{It as default};
|