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

2 lines
7.8 KiB
JavaScript

import{B as Y,C as Z,Q as ee,R as te,w as ue,D as ae,I as le,L as oe,_ as ne,M as ie,J as se,N as re}from"./element-plus.7a22678c.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.cabb2d32.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.f8debc0c.js";import{u as _e}from"./vue-router.ed788fee.js";import{u as ce}from"./usePaging.2a59f422.js";import{a as Ce}from"./useDictOptions.ec8b9539.js";import{_ as Ee,a as Fe,b as fe}from"./edit.vue_vue_type_script_setup_true_name_landPlantActionEdit_lang.895930b8.js";import{t as De,f as Be}from"./index.77d4e45f.js";import{d as P,s as ye,r as V,_ as w,ae as ve,o as d,c as U,a as D,T as e,K as a,L as A,u as o,J as C,Q as be,U as $,a6 as ge,R as p,S as B,j as ke,n as he}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.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.535d40f3.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";const Ve=p("\u67E5\u8BE2"),we=p("\u91CD\u7F6E"),Ae={class:"mt-4"},Te=p(" \u7F16\u8F91 "),xe=p(" \u64CD\u4F5C\u8BE6\u60C5 "),Ie=p(" \u5220\u9664 "),Le={class:"flex mt-4 justify-end"},Se=P({name:"landPlantActionLists"}),bt=P({...Se,setup(Ue){const{query:R}=_e(),y=ye(),v=V(!1);let b=R.plant_id;typeof b>"u"&&(b="");const l=w({user_id:"",plant_id:b,type:"",start_time:"",end_time:""}),T=w({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:{type:"\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"}}),N=V([]),M=n=>{N.value=n.map(({id:u})=>u)},{dictData:g}=Ce("land_plant_action"),{pager:m,getLists:E,resetParams:J,resetPage:j}=ce({fetchFun:Fe,params:l}),k=V(!1),F=w({gridData:[{}]}),q=n=>{var s,r;const u=JSON.parse(n.detail);F.gridData=[{}];for(const _ in T[n.type]){const h=(s=T[n.type][_])!=null?s:"-";F.gridData.push({item:h,value:(r=u[_])!=null?r:"-"})}F.gridData.splice(0,1),k.value=!0},O=async n=>{var u,s;v.value=!0,await he(),(u=y.value)==null||u.open("edit"),(s=y.value)==null||s.setFormData(n)},Q=async n=>{await Be.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:n}),E()};return E(),(n,u)=>{const s=Y,r=Z,_=ee,h=te,K=me,c=ue,z=ae,x=le,i=oe,I=ne,G=pe,L=ie,H=de,W=se,S=ve("perms"),X=re;return d(),U($,null,[D("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(z,{class:"mb-[-16px]",model:l,inline:""},{default:a(()=>[e(r,{label:"\u7528\u6237ID",prop:"user_id"},{default:a(()=>[e(s,{class:"w-[280px]",modelValue:l.user_id,"onUpdate:modelValue":u[0]||(u[0]=t=>l.user_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u79CD\u690DID",prop:"plant_id"},{default:a(()=>[e(s,{class:"w-[280px]",modelValue:l.plant_id,"onUpdate:modelValue":u[1]||(u[1]=t=>l.plant_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u79CD\u690DID"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u64CD\u4F5C\u7C7B\u578B",prop:"type"},{default:a(()=>[e(h,{class:"w-[280px]",modelValue:l.type,"onUpdate:modelValue":u[2]||(u[2]=t=>l.type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"},{default:a(()=>[e(_,{label:"\u5168\u90E8",value:""}),(d(!0),U($,null,ge(o(g).land_plant_action,(t,f)=>(d(),C(_,{key:f,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u79CD\u690D\u64CD\u4F5C\u65F6\u95F4",prop:"create_time"},{default:a(()=>[e(K,{startTime:l.start_time,"onUpdate:startTime":u[3]||(u[3]=t=>l.start_time=t),endTime:l.end_time,"onUpdate:endTime":u[4]||(u[4]=t=>l.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(r,null,{default:a(()=>[e(c,{type:"primary",onClick:o(j)},{default:a(()=>[Ve]),_:1},8,["onClick"]),e(c,{onClick:o(J)},{default:a(()=>[we]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),A((d(),C(x,{class:"!border-none",shadow:"never"},{default:a(()=>[D("div",Ae,[e(L,{data:o(m).lists,onSelectionChange:M,style:{width:"100%"}},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),e(i,{label:"\u6240\u5C5E\u571F\u5730\u79CD\u690D",width:"200"},{default:a(({row:t})=>[e(I,{class:"mr-2",type:"info"},{default:a(()=>[p("ID: "+B(t.plant_id),1)]),_:2},1024),e(I,{class:"mr-2",type:"info"},{default:a(()=>[p("\u7C7B\u578B: "+B(t.kind)+" \u54C1\u724C: "+B(t.breed),1)]),_:2},1024)]),_:1}),e(i,{label:"\u79CD\u690D\u64CD\u4F5C\u7C7B\u578B",align:"center",prop:"type"},{default:a(({row:t})=>[e(G,{options:o(g).land_plant_action,value:t.type},null,8,["options","value"])]),_:1}),e(i,{label:"\u79CD\u690D\u64CD\u4F5C",prop:"type_text","show-overflow-tooltip":""}),e(i,{label:"\u79CD\u690D\u64CD\u4F5C\u65F6\u95F4",width:"180",align:"center",prop:"plant_date"},{default:a(({row:t})=>[D("span",null,B(t.create_time?o(De)(t.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(i,{label:"\u64CD\u4F5C",width:"200",align:"center",fixed:"right"},{default:a(({row:t})=>[A((d(),C(c,{type:"primary",link:"",onClick:f=>O(t)},{default:a(()=>[Te]),_:2},1032,["onClick"])),[[S,["land.land_plant_action/edit"]]]),e(c,{type:"primary",link:"",onClick:f=>q(t)},{default:a(()=>[xe]),_:2},1032,["onClick"]),A((d(),C(c,{type:"danger",link:"",onClick:f=>Q(t.id)},{default:a(()=>[Ie]),_:2},1032,["onClick"])),[[S,["land.land_plant_action/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",Le,[e(H,{modelValue:o(m),"onUpdate:modelValue":u[5]||(u[5]=t=>ke(m)?m.value=t:null),onChange:o(E)},null,8,["modelValue","onChange"])])]),_:1})),[[X,o(m).loading]]),v.value?(d(),C(Ee,{key:0,ref_key:"editRef",ref:y,"dict-data":o(g),onSuccess:o(E),onClose:u[6]||(u[6]=t=>v.value=!1)},null,8,["dict-data","onSuccess"])):be("",!0)]),e(W,{modelValue:k.value,"onUpdate:modelValue":u[7]||(u[7]=t=>k.value=t),title:"\u79CD\u690D\u64CD\u4F5C\u8BE6\u60C5"},{default:a(()=>[e(L,{data:F.gridData},{default:a(()=>[e(i,{property:"item",label:"\u64CD\u4F5C\u9879",width:"150"}),e(i,{property:"value",label:"\u64CD\u4F5C\u5185\u5BB9"})]),_:1},8,["data"])]),_:1},8,["modelValue"])],64)}}});export{bt as default};