2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
import{B as ae,C as le,w as oe,D as ne,I as ue,L as se,M as ie,b as re,J as de,N as pe}from"./element-plus.5df6f736.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import{k as I,f as ce,b as _e}from"./index.eba5ee3f.js";import{u as fe}from"./vue-router.ed788fee.js";import{u as ve}from"./usePaging.2a59f422.js";import{a as De}from"./useDictOptions.a0a89dbc.js";import{h as Fe,i as he}from"./land.781e312e.js";import"./lodash.33f675f2.js";import{_ as be}from"./edit.vue_vue_type_script_setup_true_name_landEdit_lang.853f525a.js";import{_ as ye}from"./bind.vue_vue_type_script_setup_true_name_landEdit_lang.fcb6e75e.js";import{d as q,s as S,r as k,_ as U,a3 as ke,ae as Ce,o as n,c as V,a as x,T as t,K as l,L as _,u as s,J as d,Q as N,U as T,j as Ee,a6 as we,R as p,n as A}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"./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";import"./index.1a7ccb5b.js";const ge=p("\u67E5\u8BE2"),Be=p("\u91CD\u7F6E"),Ve=p(" \u65B0\u589E "),xe=p(" \u5220\u9664 "),Ae={class:"mt-4"},$e=p(" \u7F16\u8F91 "),Le=p(" \u7ED1\u5B9A\u4EA7\u54C1 "),Re=p(" \u4EA7\u54C1\u7BA1\u7406 "),Pe=p(" \u571F\u5730\u56FE\u7247 "),Ie=p(" \u79CD\u690D\u4FE1\u606F "),Se=p(" \u5220\u9664 "),Ue={class:"flex mt-4 justify-end"},Ne=q({name:"landLists"}),Bt=q({...Ne,setup(Te){const{query:J}=fe(),h=S(),b=S(),y=k(!1),C=k(!1);let E=J.user_id;typeof E>"u"&&(E="");const i=U({user_id:E,title:"",master_name:"",master_phone:""}),w=k([]),j=o=>{w.value=o.map(({id:e})=>e)},{dictData:$}=De(""),{pager:v,getLists:D,resetParams:z,resetPage:K}=ve({fetchFun:Fe,params:i}),g=k(!1),F=U({picData:[]}),M=o=>{F.picData=[];const e=JSON.parse(o.pic);for(const u in e)F.picData.unshift(e[u]);console.log(F.picData),g.value=!0},O=async()=>{var o;y.value=!0,await A(),(o=h.value)==null||o.open("add")},Q=async o=>{var e,u;y.value=!0,await A(),(e=h.value)==null||e.open("edit"),(u=h.value)==null||u.setFormData(o)},G=async o=>{var e,u,m;C.value=!0,await A(),(e=b.value)==null||e.open("bind"),(u=b.value)==null||u.setFormData(o),(m=b.value)==null||m.setProduct(o)},L=async o=>{await ce.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:o}),D()};return D(),(o,e)=>{const u=ae,m=le,r=oe,H=ne,R=ue,W=_e,c=se,P=ke("router-link"),X=ie,Y=me,Z=re,ee=de,f=Ce("perms"),te=pe;return n(),V(T,null,[x("div",null,[t(R,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(H,{class:"mb-[-16px]",model:i,inline:""},{default:l(()=>[t(m,{label:"\u7528\u6237ID",prop:"user_id"},{default:l(()=>[t(u,{class:"w-[280px]",modelValue:i.user_id,"onUpdate:modelValue":e[0]||(e[0]=a=>i.user_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),t(m,{label:"\u571F\u5730\u540D\u79F0",prop:"title"},{default:l(()=>[t(u,{class:"w-[280px]",modelValue:i.title,"onUpdate:modelValue":e[1]||(e[1]=a=>i.title=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(m,{label:"\u571F\u5730\u8D1F\u8D23\u4EBA",prop:"master_name"},{default:l(()=>[t(u,{class:"w-[280px]",modelValue:i.master_name,"onUpdate:modelValue":e[2]||(e[2]=a=>i.master_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730\u8D1F\u8D23\u4EBA"},null,8,["modelValue"])]),_:1}),t(m,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"master_phone"},{default:l(()=>[t(u,{class:"w-[280px]",modelValue:i.master_phone,"onUpdate:modelValue":e[3]||(e[3]=a=>i.master_phone=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),t(m,null,{default:l(()=>[t(r,{type:"primary",onClick:s(K)},{default:l(()=>[ge]),_:1},8,["onClick"]),t(r,{onClick:s(z)},{default:l(()=>[Be]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((n(),d(R,{class:"!border-none",shadow:"never"},{default:l(()=>[_((n(),d(r,{type:"primary",onClick:O},{icon:l(()=>[t(W,{name:"el-icon-Plus"})]),default:l(()=>[Ve]),_:1})),[[f,["land.land/add"]]]),_((n(),d(r,{disabled:!w.value.length,onClick:e[4]||(e[4]=a=>L(w.value))},{default:l(()=>[xe]),_:1},8,["disabled"])),[[f,["land.land/delete"]]]),x("div",Ae,[t(X,{data:s(v).lists,onSelectionChange:j,style:{width:"100%"}},{default:l(()=>[t(c,{type:"selection",width:"55"}),t(c,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),t(c,{label:"\u571F\u5730\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),t(c,{label:"\u571F\u5730\u9762\u79EF",prop:"total_area","show-overflow-tooltip":""}),t(c,{label:"\u5269\u4F59\u9762\u79EF",prop:"residual_area","show-overflow-tooltip":""}),t(c,{label:"\u571F\u5730\u8D1F\u8D23\u4EBA",prop:"master_name","show-overflow-tooltip":""}),t(c,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"master_phone","show-overflow-tooltip":""}),t(c,{label:"\u64CD\u4F5C",width:"400",align:"center",fixed:"right"},{default:l(({row:a})=>[_((n(),d(r,{type:"primary",link:"",onClick:B=>Q(a)},{default:l(()=>[$e]),_:2},1032,["onClick"])),[[f,["land.land/edit"]]]),_((n(),d(r,{type:"primary",link:"",onClick:B=>G(a)},{default:l(()=>[Le]),_:2},1032,["onClick"])),[[f,["land.land/bind"]]]),_((n(),d(r,{type:"primary",link:""},{default:l(()=>[t(P,{to:{path:s(I)("land.product/lists"),query:{land_id:a.id}}},{default:l(()=>[Re]),_:2},1032,["to"])]),_:2},1024)),[[f,["land.product/lists"]]]),t(r,{type:"primary",link:"",onClick:B=>M(a)},{default:l(()=>[Pe]),_:2},1032,["onClick"]),_((n(),d(r,{type:"primary",link:""},{default:l(()=>[t(P,{to:{path:s(I)("land.land_plant/lists"),query:{land_id:a.id}}},{default:l(()=>[Ie]),_:2},1032,["to"])]),_:2},1024)),[[f,["land.land_plant/lists"]]]),_((n(),d(r,{type:"danger",link:"",onClick:B=>L(a.id)},{default:l(()=>[Se]),_:2},1032,["onClick"])),[[f,["land.land/delete"]]])]),_:1})]),_:1},8,["data"])]),x("div",Ue,[t(Y,{modelValue:s(v),"onUpdate:modelValue":e[5]||(e[5]=a=>Ee(v)?v.value=a:null),onChange:s(D)},null,8,["modelValue","onChange"])])]),_:1})),[[te,s(v).loading]]),y.value?(n(),d(be,{key:0,ref_key:"editRef",ref:h,"dict-data":s($),onSuccess:s(D),onClose:e[6]||(e[6]=a=>y.value=!1)},null,8,["dict-data","onSuccess"])):N("",!0),C.value?(n(),d(ye,{key:1,ref_key:"bindRef",ref:b,"dict-data":s($),onSuccess:s(D),onClose:e[7]||(e[7]=a=>C.value=!1)},null,8,["dict-data","onSuccess"])):N("",!0)]),t(ee,{modelValue:g.value,"onUpdate:modelValue":e[8]||(e[8]=a=>g.value=a),title:"\u571F\u5730\u56FE\u7247",center:""},{default:l(()=>[(n(!0),V(T,null,we(F.picData,a=>(n(),V("div",{style:{display:"inline-block",margin:"12px"},key:a},[t(Z,{style:{width:"200px",height:"200px"},src:a,"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{Bt as default};
|