import P from"./MatchMap-e1b64f71.js";import{T}from"./index-0e777de8.js";import L from"./StatisticsCard-67de743e.js";import{h as f,d as K,U as E,p as a,f as U,o as q,i as I,a as m,c as v,j as n,k as s,e as l,l as y,m as h,F as z,q as G,t as g,_ as H}from"./index-deffec86.js";import{g as J,a as Q,b as W}from"./common-8a6acaa7.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang-a8708aea.js";import"./activity-c9a7a2d3.js";import"./map-4f55c240.js";import"./index-a862924e.js";const Y=o=>f.post("/eventActivity/activity/areaList",o,{headers:{noLoading:!0}}),Z=o=>f.post("/eventActivity/plan/reviewData",o,{headers:{noLoading:!0}}),tt=o=>f.post("/eventActivity/activity/reviewData",o,{headers:{noLoading:!0}}),et={class:"out-box"},at={style:{flex:"1",overflow:"hidden"}},nt={class:"main-box"},it={class:"card location-container"},st={class:"detail-container"},ct={class:"grid-item"},lt={class:"statistics-table"},ot={class:"grid-item"},rt={class:"card map-container"},dt=K({__name:"index",setup(o){const R=E(),b=a([]),w=a([]),x=a("");a(!1),a(!0),a([]);const p=a("");a("1");const c=a(null),C=a({plan:[],activity:[]}),u=a([]),r=U(()=>R.companyAreaId),V=async()=>{var i;let t=await J({with_up:0});b.value=t.data;let e=(i=t==null?void 0:t.data[0])==null?void 0:i.company_area_id;c.value=e,w.value=[e],x.value=String(e)},B=t=>{c.value=t,k(),p.value=`${t}`.length==6?`${t}`:`${t}`.length==4?`${t}00`:`${t}0000`,Promise.all([j(),D(),$()])},d=a({}),F=async t=>{const{data:e}=await W({company_area_id:t,level:`${t}`.length>4?4:""});d.value={},e[0].next.forEach(i=>{d.value[i.company_area_id]=i.name})},k=async()=>{await F(c.value);const{data:t}=await Q({company_area_id:c.value,year:"all"});t.area_data?u.value=Object.keys(d.value).map(e=>t.area_data[e]?(t.area_data[e].type_name=d.value[e],t.area_data[e]):{type_name:d.value[e],count:0,join_num:0,match_number:0,plan_count:0,plan_join_num:0,plan_match_num:0}):u.value=[]},A=a([]),j=async()=>{const{data:t}=await Y({company_area_id:c.value});A.value=t.filter(e=>e.location.lat>0&&e.location.lon>0).map(e=>({id:e.activity_id,styleId:"myStyle",position:new window.TMap.LatLng(e.location.lat,e.location.lon),properties:{title:e.name,activity_id:e.activity_id}}))},M=a([]),D=async()=>{const{data:t}=await Z({company_area_id:c.value});M.value=[{title:"\u5F85\u5BA1\u6838",num:t.review,percent:t.review_rate},{title:"\u5DF2\u9A73\u56DE",num:t.reject,percent:t.reject_rate},{title:"\u901A\u8FC7",num:t.pass,percent:t.pass_rate}],C.value.plan=Object.values(t.area_data).map(e=>e)},S=a([]),$=async()=>{const{data:t}=await tt({company_area_id:c.value});S.value=[{title:"\u5F85\u5BA1\u6838",num:t.review,percent:t.review_rate},{title:"\u5DF2\u9A73\u56DE",num:t.reject,percent:t.reject_rate},{title:"\u901A\u8FC7",num:t.pass,percent:t.pass_rate}],C.value.activity=Object.values(t.area_data).map(e=>e)};return q(async()=>{await V(),k(),p.value=`${r.value}`.length==6?`${r.value}`:`${r.value}`.length==4?`${r.value}00`:`${r.value}0000`,Promise.all([j(),D(),$()])}),(t,e)=>{const i=I("el-table-column"),N=I("el-table");return m(),v("div",et,[n("div",null,[s(X,{isShow:!0,showAlert:!0})]),n("div",at,[n("div",nt,[n("div",it,[s(T,{ref:"TreeFilterRef",title:"\u533A\u57DF",data:l(b),defaultValue:l(x),expandKeys:l(w),onChange:B},null,8,["data","defaultValue","expandKeys"])]),n("div",st,[y(` <div class="grid-item">\r
				<StatisticsCard path="matchActivityPlanCheck" title="\u8D5B\u4E8B\u6D3B\u52A8\u8BA1\u5212" icon="group" :area-id="company_area">\r
					<template #table>\r
						<div class="statistics-table">\r
							<div class="statistics-item" v-for="(item, index) in planReviewData" :key="index">\r
								<span>{{ item.title }}</span>\r
								<span>{{ item.num }}</span>\r
								<span>{{ item.percent }}%</span>\r
							</div>\r
						</div>\r
					</template>\r
				</StatisticsCard>\r
			</div> `),n("div",ct,[s(L,{path:"matchActivityCheck",title:"\u8D5B\u4E8B\u6D3B\u52A8",icon:"group3","area-id":l(c)},{table:h(()=>[n("div",lt,[(m(!0),v(z,null,G(l(S),(_,O)=>(m(),v("div",{class:"statistics-item",key:O},[n("span",null,g(_.title),1),n("span",null,g(_.num),1),n("span",null,g(_.percent)+"%",1)]))),128))])]),_:1},8,["area-id"])]),n("div",ot,[s(L,{title:"\u6570\u636E\u7EDF\u8BA1",path:"statisticsManage",icon:"group2"},{table:h(()=>[s(N,{data:l(u),height:"100%",style:{width:"100%"}},{default:h(()=>[s(i,{prop:"type_name",label:"\u533A\u57DF",align:"center"}),s(i,{prop:"plan_count",label:"\u8BA1\u5212",align:"center"}),s(i,{prop:"count",label:"\u8D5B\u4E8B\u6D3B\u52A8",align:"center"}),s(i,{prop:"join_num",label:"\u53C2\u4E0E\u4EBA\u6570",align:"center"}),y(' <el-table-column prop="count" label="\u603B\u6570" align="center" /> ')]),_:1},8,["data"])]),_:1})])]),n("div",rt,[y(` <div class="select-container">\r
				<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" class="pr30" @change="handleCheckAllChange">\r
					\u5168\u90E8\r
				</el-checkbox>\r
				<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">\r
					<el-checkbox v-for="city in cities" :key="city" :label="city">{{ city }}</el-checkbox>\r
				</el-checkbox-group>\r
			</div> `),s(P,{"region-id":l(p),"geometries-list":l(A)},null,8,["region-id","geometries-list"])])])])])}}});const bt=H(dt,[["__scopeId","data-v-48e7f5a7"]]);export{bt as default};
