2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
import{B as ee,C as te,Q as le,R as ae,w as oe,D as ue,I as ne,L as se,_ as ie,b as re,M as de,J as pe,N as me}from"./element-plus.a3f01f50.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.b069f63a.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.6c01626d.js";import{u as De}from"./vue-router.ed788fee.js";import{u as Ce}from"./usePaging.2a59f422.js";import{t as be,k as Fe,f as ve}from"./index.8b9a2a7d.js";import{a as ke}from"./useDictOptions.8fdd5c8d.js";import{_ as ye,a as ge,b as he}from"./edit.vue_vue_type_script_setup_true_name_landPlantEdit_lang.7253d3ea.js";import{d as S,s as we,r as V,_ as P,a3 as Ee,ae as Ve,o as i,c as b,a as F,T as t,K as a,L as v,u,J as _,Q as Be,U as B,a6 as R,R as p,S as x,j as xe,n as Te}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.f258b2c3.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.eff1ffd5.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.241b9b5d.js";import"./picker.897a6610.js";import"./index.9a4d0376.js";import"./index.dd3d8dc2.js";import"./index.f3065123.js";import"./index.de769f9e.js";import"./index.vue_vue_type_script_setup_true_lang.ab282602.js";import"./vue3-video-play.5aacf00d.js";import"./vuedraggable.0b47cde1.js";import"./vue.118acae4.js";import"./sortablejs.9ffc750f.js";const Ue=p("\u67E5\u8BE2"),Ie=p("\u91CD\u7F6E"),Le={class:"mt-4"},Pe=p(" \u7F16\u8F91 "),Re=p(" \u79CD\u690D\u56FE\u7247 "),Se=p(" \u79CD\u690D\u64CD\u4F5C "),$e=p(" \u5220\u9664 "),Ae={class:"flex mt-4 justify-end"},Ne=S({name:"landPlantLists"}),$t=S({...Ne,setup(qe){const{query:$}=De(),k=we(),y=V(!1);let g=$.land_id;typeof g>"u"&&(g="");const o=P({user_id:"",land_id:g,kind:"",breed:"",user:"",status:"",plant_date:"",start_time:"",end_time:""}),A=V([]),N=r=>{A.value=r.map(({id:l})=>l)},{dictData:h}=ke("plant_status"),{pager:c,getLists:D,resetParams:q,resetPage:J}=Ce({fetchFun:ge,params:o}),w=V(!1),f=P({picData:[]}),M=r=>{f.picData=[];const l=JSON.parse(r.pic);for(const s in l)f.picData.unshift(l[s]);console.log(f.picData),w.value=!0},j=async r=>{var l,s;y.value=!0,await Te(),(l=k.value)==null||l.open("edit"),(s=k.value)==null||s.setFormData(r)},z=async r=>{await ve.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:r}),D()};return D(),(r,l)=>{const s=ee,d=te,T=le,O=ae,Q=fe,m=oe,K=ue,U=ne,n=se,I=ie,G=ce,L=re,H=Ee("router-link"),W=de,X=_e,Y=pe,E=Ve("perms"),Z=me;return i(),b(B,null,[F("div",null,[t(U,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(K,{class:"mb-[-16px]",model:o,inline:""},{default:a(()=>[t(d,{label:"\u7528\u6237ID",prop:"user_id"},{default:a(()=>[t(s,{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(d,{label:"\u571F\u5730ID",prop:"land_id"},{default:a(()=>[t(s,{class:"w-[280px]",modelValue:o.land_id,"onUpdate:modelValue":l[1]||(l[1]=e=>o.land_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),t(d,{label:"\u79CD\u690D\u79CD\u7C7B",prop:"kind"},{default:a(()=>[t(s,{class:"w-[280px]",modelValue:o.kind,"onUpdate:modelValue":l[2]||(l[2]=e=>o.kind=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u79CD\u7C7B"},null,8,["modelValue"])]),_:1}),t(d,{label:"\u79CD\u690D\u54C1\u724C",prop:"breed"},{default:a(()=>[t(s,{class:"w-[280px]",modelValue:o.breed,"onUpdate:modelValue":l[3]||(l[3]=e=>o.breed=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u54C1\u724C"},null,8,["modelValue"])]),_:1}),t(d,{label:"\u79CD\u690D\u4EBA\u5458",prop:"user"},{default:a(()=>[t(s,{class:"w-[280px]",modelValue:o.user,"onUpdate:modelValue":l[4]||(l[4]=e=>o.user=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690D\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),t(d,{label:"\u751F\u957F\u72B6\u6001",prop:"status"},{default:a(()=>[t(O,{class:"w-[280px]",modelValue:o.status,"onUpdate:modelValue":l[5]||(l[5]=e=>o.status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u751F\u957F\u72B6\u6001"},{default:a(()=>[t(T,{label:"\u5168\u90E8",value:""}),(i(!0),b(B,null,R(u(h).plant_status,(e,C)=>(i(),_(T,{key:C,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(d,{label:"\u64AD\u79CD\u65F6\u95F4",prop:"plant_date"},{default:a(()=>[t(Q,{startTime:o.start_time,"onUpdate:startTime":l[6]||(l[6]=e=>o.start_time=e),endTime:o.end_time,"onUpdate:endTime":l[7]||(l[7]=e=>o.end_time=e)},null,8,["startTime","endTime"])]),_:1}),t(d,null,{default:a(()=>[t(m,{type:"primary",onClick:u(J)},{default:a(()=>[Ue]),_:1},8,["onClick"]),t(m,{onClick:u(q)},{default:a(()=>[Ie]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),_(U,{class:"!border-none",shadow:"never"},{default:a(()=>[F("div",Le,[t(W,{data:u(c).lists,onSelectionChange:N,style:{width:"100%"}},{default:a(()=>[t(n,{type:"selection",width:"55"}),t(n,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),t(n,{label:"\u6240\u5C5E\u571F\u5730",width:"200"},{default:a(({row:e})=>[t(I,{class:"mr-2",type:"info"},{default:a(()=>[p("ID: "+x(e.land_id),1)]),_:2},1024),t(I,{class:"mr-2",type:"info"},{default:a(()=>[p("\u540D\u79F0: "+x(e.title),1)]),_:2},1024)]),_:1}),t(n,{label:"\u79CD\u690D\u79CD\u7C7B",prop:"kind","show-overflow-tooltip":""}),t(n,{label:"\u79CD\u690D\u54C1\u724C",prop:"breed","show-overflow-tooltip":""}),t(n,{label:"\u79CD\u690D\u9762\u79EF",prop:"area","show-overflow-tooltip":""}),t(n,{label:"\u79CD\u690D\u4EBA\u5458",prop:"user","show-overflow-tooltip":""}),t(n,{label:"\u751F\u957F\u72B6\u6001",align:"center",prop:"status"},{default:a(({row:e})=>[t(G,{options:u(h).plant_status,value:e.status},null,8,["options","value"])]),_:1}),t(n,{label:"\u6EAF\u6E90\u4E8C\u7EF4\u7801",width:"150",align:"center",prop:"qr_code"},{default:a(({row:e})=>[t(L,{style:{width:"50px",height:"50px"},src:e.qr_code},null,8,["src"])]),_:1}),t(n,{label:"\u64AD\u79CD\u65F6\u95F4",width:"180",align:"center",prop:"plant_date"},{default:a(({row:e})=>[F("span",null,x(e.plant_date?u(be)(e.plant_date,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),t(n,{label:"\u64CD\u4F5C",width:"300",align:"center",fixed:"right"},{default:a(({row:e})=>[v((i(),_(m,{type:"primary",link:"",onClick:C=>j(e)},{default:a(()=>[Pe]),_:2},1032,["onClick"])),[[E,["land.land_plant/edit"]]]),t(m,{type:"primary",link:"",onClick:C=>M(e)},{default:a(()=>[Re]),_:2},1032,["onClick"]),v((i(),_(m,{type:"primary",link:""},{default:a(()=>[t(H,{to:{path:u(Fe)("land.land_plant_action/lists"),query:{plant_id:e.id}}},{default:a(()=>[Se]),_:2},1032,["to"])]),_:2},1024)),[[E,["land.land_plant_action/lists"]]]),v((i(),_(m,{type:"danger",link:"",onClick:C=>z(e.id)},{default:a(()=>[$e]),_:2},1032,["onClick"])),[[E,["land.land_plant/delete"]]])]),_:1})]),_:1},8,["data"])]),F("div",Ae,[t(X,{modelValue:u(c),"onUpdate:modelValue":l[8]||(l[8]=e=>xe(c)?c.value=e:null),onChange:u(D)},null,8,["modelValue","onChange"])])]),_:1})),[[Z,u(c).loading]]),y.value?(i(),_(ye,{key:0,ref_key:"editRef",ref:k,"dict-data":u(h),onSuccess:u(D),onClose:l[9]||(l[9]=e=>y.value=!1)},null,8,["dict-data","onSuccess"])):Be("",!0)]),t(Y,{modelValue:w.value,"onUpdate:modelValue":l[10]||(l[10]=e=>w.value=e),title:"\u79CD\u690D\u56FE\u7247",center:""},{default:a(()=>[(i(!0),b(B,null,R(f.picData,e=>(i(),b("div",{style:{display:"inline-block",margin:"12px"},key:e},[t(L,{style:{width:"200px",height:"200px"},src:e,"zoom-rate":1.2,"max-scale":5,"min-scale":.2,"preview-src-list":f.picData,"initial-index":4,fit:"cover",center:""},null,8,["src","zoom-rate","min-scale","preview-src-list"])]))),128))]),_:1},8,["modelValue"])],64)}}});export{$t as default};
|