import{g as t,r as a,b as e,d as s,o as l,c as i,f as n,i as u,h as r,x as c,l as o,m as p,F as d,k as m,j as _,n as A,t as f,v as g,y as v,z as y}from"./index-4fa572a1.js";import{_ as x}from"./no-bus.fca891d8.js";import{o as b,b as k}from"./uni-app.es.772a0883.js";import{i as I,m as C}from"./isWeixin.e741caea.js";import{S as j}from"./search.f46795dd.js";import{_ as B}from"./_plugin-vue_export-helper.1b428a4d.js";import"./bottom.64dd5779.js";const h=B({__name:"record",setup(B){b((()=>{if(I()){let e=t("bus-userInfo");if(e){"车队长"!==JSON.parse(e).user_zz?a({url:"/pages/404/404?message=暂无权限"}):O()}else a({url:"/pages/index/index"})}else a({url:"/pages/404/404?message=请在微信客户端打开链接"})})),k((()=>{O(),setTimeout((function(){e()}),500)}));const h=s([{text:"全部",value:0},{text:"预约进行中",value:1},{text:"已截止",value:2},{text:"已分配",value:3},{text:"候补中",value:4}]),w=s([{text:"全部",value:0},{text:"今天",value:1},{text:"明天",value:2}]),L=s(1),U=s(0),Q=s([]),O=async()=>{const t=await C({url:"/appcarCaptainManage.action",data:{date_state:L.value,result_state:U.value}});t.data.length&&t.data.forEach((t=>{t.percent=Math.ceil(parseInt(t.user_num)/parseInt(t.contain)*100)})),Q.value=t.data},W=t=>{L.value=t.timeIndex-0+1,U.value=t.typeIndex,O()};return(t,a)=>{const e=u,s=y;return l(),i(e,{class:"container"},{default:n((()=>[r(c(j),{typeList:h.value,timeList:w.value,onHandLeConveyData:W},null,8,["typeList","timeList"]),(l(!0),o(d,null,p(Q.value,((t,a)=>(l(),i(e,{class:"list",key:a,onClick:a=>(t=>{const a=JSON.stringify(t);v({url:`/pages/detail/detail?info=${a}`})})(t)},{default:n((()=>[r(e,{class:"list-title"},{default:n((()=>[r(e,{class:"title-number"},{default:n((()=>[_("车牌："+f(0!=t.car_number?t.car_number:"无"),1)])),_:2},1024),r(e,{class:"title-icon"},{default:n((()=>[m("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZCAYAAADuWXTMAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAENSURBVDiNpZTBsYQgDIb/4Ctke2A4r3ayFxi7WO3CwWLUO/RgI8K7LPsYHiru5kaGLwnJH0gp1Xnv70S0aK07XLCKcz4R0Q1AzTkna+1cCjPGWBOdn0qp4uyVMWYVQize+8fLV1xBBQAhgHPuduUJlDqklBMR1QDgvZ/HcWz+UXvwlQBZGABejXuGM2OsGYZhju9Ue7C1duacE4BQwUMIsRhj1lN4L0DcyEM4FwDRJHbfnFrbtrVzbopc/WnmYMaYNa2gOHPafQB9EZwDtdbdKbwHAgciyYGpUL5SWBaOwSNt/6QOKeWEP0UdbhVLwbBNAPoj8F12Tj0lnyF9CgIA27YtO8MimIiWT0AA+AUFoauFpTd8IQAAAABJRU5ErkJggg=="})])),_:1})])),_:2},1024),r(e,{class:"list-item"},{default:n((()=>[_(" 状态： "),m("span",{class:g("预约进行中"==t.state_str||"候补中"==t.state_str?"list-item-type":"")},f(t.state_str),3)])),_:2},1024),r(e,{class:"list-item"},{default:n((()=>[_(" 发车日期： "),m("span",null,f(t.yy_date),1)])),_:2},1024),"预约进行中"==t.state_str||"已截止"==t.state_str?(l(),i(e,{key:0,class:"list-item"},{default:n((()=>[_(" 发车时间： "),m("span",null,f(0!=t.ci_time?t.ci_time:""),1)])),_:2},1024)):A("",!0),r(e,{class:"list-item"},{default:n((()=>[_(" 扫码时间： "),m("span",null,f(t.sm_start+"-"+t.sm_end),1)])),_:2},1024),r(e,{class:"list-item"},{default:n((()=>[_(" 线路： "),m("span",null,f(t.route),1)])),_:2},1024),r(e,{class:"list-item"},{default:n((()=>[_(" 终点： "),m("span",null,f(t.route_end),1)])),_:2},1024),r(e,{class:"list-item"},{default:n((()=>[_(" 人数： "),"预约进行中"==t.state_str||"已截止"==t.state_str?(l(),i(e,{key:0,class:"list-item-progress"},{default:n((()=>[r(s,{activeColor:"#3C50E8","stroke-width":"9",percent:t.percent?t.percent:0},null,8,["percent"])])),_:2},1024)):A("",!0),"预约进行中"==t.state_str||"已截止"==t.state_str?(l(),o("span",{key:1},f(t.user_num+"/"+t.contain),1)):(l(),o("span",{key:2},f(t.contain),1))])),_:2},1024)])),_:2},1032,["onClick"])))),128)),0==Q.value.length?(l(),i(e,{key:0,class:"list-nodata"},{default:n((()=>[m("img",{src:x}),r(e,null,{default:n((()=>[_("暂无数据")])),_:1})])),_:1})):A("",!0)])),_:1})}}},[["__scopeId","data-v-0d899e82"]]);export{h as default};
