suyuan/public/admin/assets/index.93114752.js

2 lines
8.7 KiB
JavaScript

import{B as ae,C as le,Q as oe,R as ne,w as ie,D as se,I as re,L as de,_ as pe,M as me,J as ce,b as _e,N as Ce}from"./element-plus.5df6f736.js";import{_ as Fe}from"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import{_ as Ee}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.2b417e0a.js";import{u as De}from"./vue-router.ed788fee.js";import{u as ye}from"./usePaging.2a59f422.js";import{a as ve}from"./useDictOptions.8d220934.js";import{_ as Be,a as ge,b as be}from"./edit.vue_vue_type_script_setup_true_name_landPlantActionEdit_lang.7d123783.js";import{t as ke,f as he}from"./index.1f78e617.js";import{d as M,s as Ve,r as D,_ as y,ae as we,o as r,c as v,a as B,T as t,K as a,L as T,u as n,J as E,Q as xe,U as I,a6 as R,R as c,S as g,j as Ae,n as Te}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"./index.5f547370.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";const Ie=c("\u67E5\u8BE2"),Le=c("\u91CD\u7F6E"),Pe={class:"mt-4"},Se=c(" \u7F16\u8F91 "),Ue=c(" \u64CD\u4F5C\u8BE6\u60C5 "),$e=c(" \u64CD\u4F5C\u56FE\u7247 "),Ne=c(" \u5220\u9664 "),Re={class:"flex mt-4 justify-end"},Me=M({name:"landPlantActionLists"}),xt=M({...Me,setup(Je){const{query:J}=De(),b=Ve(),k=D(!1);let h=J.plant_id;typeof h>"u"&&(h="");const o=y({user_id:"",plant_id:h,type:"",start_time:"",end_time:""}),L=y({1:{kind:"\u80A5\u6599\u79CD\u7C7B",breed:"\u80A5\u6599\u54C1\u724C",dosage:"\u80A5\u6599\u7528\u91CF",start_date:"\u5F00\u59CB\u65E5\u671F",end_date:"\u7ED3\u675F\u65E5\u671F",area:"\u65BD\u80A5\u9762\u79EF",user:"\u53C2\u4E0E\u4EBA",pic:"\u65BD\u80A5\u56FE\u7247",remark:"\u5907\u6CE8\u4FE1\u606F"},2:{kind:"\u9664\u8349\u5242\u79CD\u7C7B",breed:"\u9664\u8349\u5242\u54C1\u724C",dosage:"\u9664\u8349\u5242\u7528\u91CF",start_date:"\u5F00\u59CB\u65E5\u671F",end_date:"\u7ED3\u675F\u65E5\u671F",area:"\u4F5C\u4E1A\u9762\u79EF",user:"\u53C2\u4E0E\u4EBA",pic:"\u9664\u8349\u56FE\u7247",remark:"\u5907\u6CE8\u4FE1\u606F"},3:{type:"\u704C\u6E89\u7C7B\u578B",start_date:"\u5F00\u59CB\u65E5\u671F",end_date:"\u7ED3\u675F\u65E5\u671F",area:"\u704C\u6E89\u9762\u79EF",user:"\u53C2\u4E0E\u4EBA",pic:"\u704C\u6E89\u56FE\u7247",remark:"\u5907\u6CE8\u4FE1\u606F"},4:{kind:"\u6740\u866B\u5242\u79CD\u7C7B",breed:"\u6740\u866B\u5242\u54C1\u724C",dosage:"\u6740\u866B\u5242\u7528\u91CF",start_date:"\u5F00\u59CB\u65E5\u671F",end_date:"\u7ED3\u675F\u65E5\u671F",area:"\u4F5C\u4E1A\u9762\u79EF",user:"\u53C2\u4E0E\u4EBA",pic:"\u6740\u866B\u56FE\u7247",remark:"\u5907\u6CE8\u4FE1\u606F"},5:{user:"\u53C2\u4E0E\u4EBA",pic:"\u6536\u83B7\u56FE\u7247",remark:"\u5907\u6CE8\u4FE1\u606F"}}),O=y({1:"\u55B7\u704C",2:"\u6EF4\u704C",3:"\u6C9F\u704C"}),j=D([]),q=l=>{j.value=l.map(({id:u})=>u)},{dictData:V}=ve("land_plant_action"),{pager:C,getLists:f,resetParams:z,resetPage:Q}=ye({fetchFun:ge,params:o}),w=D(!1),x=D(!1),d=y({gridData:[{}],picData:[]}),K=l=>{var i,p;const u=JSON.parse(l.detail);d.gridData=[{}];for(const m in L[l.type]){const A=(i=L[l.type][m])!=null?i:"-";l.type==3&&m=="type"&&(u[m]=O[u[m]]),d.gridData.push({item:A,value:(p=u[m])!=null?p:"-"})}d.gridData.splice(0,1),x.value=!0},G=l=>{d.picData=[];const u=JSON.parse(l.detail);for(const i in u.pic)d.picData.unshift(u.pic[i]);w.value=!0},H=async l=>{var u,i;k.value=!0,await Te(),(u=b.value)==null||u.open("edit"),(i=b.value)==null||i.setFormData(l)},W=async l=>{await he.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:l}),f()};return f(),(l,u)=>{const i=ae,p=le,m=oe,A=ne,X=fe,_=ie,Y=se,P=re,s=de,S=pe,Z=Ee,U=me,ee=Fe,$=ce,te=_e,N=we("perms"),ue=Ce;return r(),v(I,null,[B("div",null,[t(P,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(Y,{class:"mb-[-16px]",model:o,inline:""},{default:a(()=>[t(p,{label:"\u7528\u6237ID",prop:"user_id"},{default:a(()=>[t(i,{class:"w-[280px]",modelValue:o.user_id,"onUpdate:modelValue":u[0]||(u[0]=e=>o.user_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),t(p,{label:"\u79CD\u690DID",prop:"plant_id"},{default:a(()=>[t(i,{class:"w-[280px]",modelValue:o.plant_id,"onUpdate:modelValue":u[1]||(u[1]=e=>o.plant_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690DID"},null,8,["modelValue"])]),_:1}),t(p,{label:"\u64CD\u4F5C\u7C7B\u578B",prop:"type"},{default:a(()=>[t(A,{class:"w-[280px]",modelValue:o.type,"onUpdate:modelValue":u[2]||(u[2]=e=>o.type=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"},{default:a(()=>[t(m,{label:"\u5168\u90E8",value:""}),(r(!0),v(I,null,R(n(V).land_plant_action,(e,F)=>(r(),E(m,{key:F,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u79CD\u690D\u64CD\u4F5C\u65F6\u95F4",prop:"create_time"},{default:a(()=>[t(X,{startTime:o.start_time,"onUpdate:startTime":u[3]||(u[3]=e=>o.start_time=e),endTime:o.end_time,"onUpdate:endTime":u[4]||(u[4]=e=>o.end_time=e)},null,8,["startTime","endTime"])]),_:1}),t(p,null,{default:a(()=>[t(_,{type:"primary",onClick:n(Q)},{default:a(()=>[Ie]),_:1},8,["onClick"]),t(_,{onClick:n(z)},{default:a(()=>[Le]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),T((r(),E(P,{class:"!border-none",shadow:"never"},{default:a(()=>[B("div",Pe,[t(U,{data:n(C).lists,onSelectionChange:q,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:"\u6240\u5C5E\u571F\u5730\u79CD\u690D",width:"200"},{default:a(({row:e})=>[t(S,{class:"mr-2",type:"info"},{default:a(()=>[c("ID: "+g(e.plant_id),1)]),_:2},1024),t(S,{class:"mr-2",type:"info"},{default:a(()=>[c("\u7C7B\u578B: "+g(e.kind)+" \u54C1\u724C: "+g(e.breed),1)]),_:2},1024)]),_:1}),t(s,{label:"\u79CD\u690D\u64CD\u4F5C\u7C7B\u578B",align:"center",prop:"type"},{default:a(({row:e})=>[t(Z,{options:n(V).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\u65F6\u95F4",width:"180",align:"center",prop:"plant_date"},{default:a(({row:e})=>[B("span",null,g(e.create_time?n(ke)(e.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),t(s,{label:"\u64CD\u4F5C",width:"260",align:"center",fixed:"right"},{default:a(({row:e})=>[T((r(),E(_,{type:"primary",link:"",onClick:F=>H(e)},{default:a(()=>[Se]),_:2},1032,["onClick"])),[[N,["land.land_plant_action/edit"]]]),t(_,{type:"primary",link:"",onClick:F=>K(e)},{default:a(()=>[Ue]),_:2},1032,["onClick"]),t(_,{type:"primary",link:"",onClick:F=>G(e)},{default:a(()=>[$e]),_:2},1032,["onClick"]),T((r(),E(_,{type:"danger",link:"",onClick:F=>W(e.id)},{default:a(()=>[Ne]),_:2},1032,["onClick"])),[[N,["land.land_plant_action/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",Re,[t(ee,{modelValue:n(C),"onUpdate:modelValue":u[5]||(u[5]=e=>Ae(C)?C.value=e:null),onChange:n(f)},null,8,["modelValue","onChange"])])]),_:1})),[[ue,n(C).loading]]),k.value?(r(),E(Be,{key:0,ref_key:"editRef",ref:b,"dict-data":n(V),onSuccess:n(f),onClose:u[6]||(u[6]=e=>k.value=!1)},null,8,["dict-data","onSuccess"])):xe("",!0)]),t($,{modelValue:x.value,"onUpdate:modelValue":u[7]||(u[7]=e=>x.value=e),title:"\u79CD\u690D\u64CD\u4F5C\u8BE6\u60C5"},{default:a(()=>[t(U,{data:d.gridData},{default:a(()=>[t(s,{property:"item",label:"\u64CD\u4F5C\u9879",width:"150"}),t(s,{property:"value",label:"\u64CD\u4F5C\u5185\u5BB9"})]),_:1},8,["data"])]),_:1},8,["modelValue"]),t($,{modelValue:w.value,"onUpdate:modelValue":u[8]||(u[8]=e=>w.value=e),title:"\u79CD\u690D\u64CD\u4F5C\u56FE\u7247",center:""},{default:a(()=>[(r(!0),v(I,null,R(d.picData,e=>(r(),v("div",{style:{display:"inline-block",margin:"12px"},key:e},[t(te,{style:{width:"200px",height:"200px"},src:e,"zoom-rate":1.2,"max-scale":5,"min-scale":.2,"preview-src-list":d.picData,"initial-index":4,fit:"cover",center:""},null,8,["src","zoom-rate","min-scale","preview-src-list"])]))),128))]),_:1},8,["modelValue"])],64)}}});export{xt as default};