2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
|
|
import{b as e,e as t,w as a,v as l,Q as s,a0 as n,_ as c,N as o,g as r,y as i,z as u,G as d,l as p,d as _,r as m,q as f,h as y,$ as x,A as g,j as b,k as v}from"./index-f6e54d8f.js";import{_ as h}from"./uni-card.fea6370f.js";import{_ as C}from"./_plugin-vue_export-helper.1b428a4d.js";import{u as I,_ as k}from"./useLayout.9cce4498.js";import"./Loading.7fe45b05.js";import"./u-loading-icon.3bd3dc6a.js";import"./Search.vue_vue_type_script_setup_true_lang.fed60e7a.js";import"./u-icon.de9898cd.js";const T=C({name:"UniSegmentedControl",emits:["clickItem"],props:{current:{type:Number,default:0},values:{type:Array,default:()=>[]},activeColor:{type:String,default:"#2979FF"},inActiveColor:{type:String,default:"transparent"},styleType:{type:String,default:"button"}},data:()=>({currentIndex:0}),watch:{current(e){e!==this.currentIndex&&(this.currentIndex=e)}},computed:{},created(){this.currentIndex=this.current},methods:{_onClick(e){this.currentIndex!==e&&(this.currentIndex=e,this.$emit("clickItem",{currentIndex:e}))}}},[["render",function(_,m,f,y,x,g){const b=d,v=p;return e(),t(v,{class:c([["text"===f.styleType?"segmented-control--text":"segmented-control--button"],"segmented-control"]),style:o({borderColor:"text"===f.styleType?"":f.activeColor})},{default:a((()=>[(e(!0),l(s,null,n(f.values,((l,s)=>(e(),t(v,{class:c([["text"===f.styleType?"":"segmented-control__item--button",0===s&&"button"===f.styleType?"segmented-control__item--button--first":"",s===f.values.length-1&&"button"===f.styleType?"segmented-control__item--button--last":""],"segmented-control__item"]),key:s,style:o({backgroundColor:s===x.currentIndex&&"button"===f.styleType?f.activeColor:"button"===f.styleType?f.inActiveColor:"transparent",borderColor:s===x.currentIndex&&"text"===f.styleType||"button"===f.styleType?f.activeColor:f.inActiveColor}),onClick:e=>g._onClick(s)},{default:a((()=>[r(v,null,{default:a((()=>[r(b,{style:o({color:s===x.currentIndex?"text"===f.styleType?f.activeColor:"#fff":"text"===f.styleType?"#000":f.activeColor}),class:c(["segmented-control__text","text"===f.styleType&&s===x.currentIndex?"segmented-control__item--text":""])},{default:a((()=>[i(u(l),1)])),_:2},1032,["style","class"])])),_:2},1024)])),_:2},1032,["class","style","onClick"])))),128))])),_:1},8,["class","style"])}],["__scopeId","data-v-49c252dc"]]),w=C(_({__name:"KeFuXunCha",setup(l){const s=m(0),n=["待巡查","已巡查"],c=m(0),o=[{id:1,title:"机器人创客",teacher:"叶老师",location:"教学楼3楼",expected:18,actual:18,leave:0,absent:0,imageUrl:"placeholder1.png"},{id:2,title:"篮球",teacher:"叶老师",location:"教学楼3楼",expected:18,actual:18,leave:0,absent:0,imageUrl:"placeholder2.png"},{id:3,title:"足球",teacher:"叶老师",location:"教学楼3楼",expected:18,actual:18,leave:0,absent:0,imageUrl:"placeholder3.png"}],[_,{reload:C,setParam:w}]=I({api:async e=>new Promise((e=>{setTimeout((()=>{e({message:"测试",resultCode:1,rows:o})}),1e3)})),componentProps:{fixed:!1}}),j=e=>{s.value!==e.currentIndex&&(s.value=e.currentIndex,console.log(`切换到: ${n[s.value]}`),C({pageNo:1,param:{status:s.value}}))},S=()=>{console.log("跳转到巡查记录"),g({title:"功能暂未开放",icon:"none"})},A=()=>{console.log("跳转到巡查汇总"),g({title:"功能暂未开放",icon:"none"})};return(l,o)=>{const m=d,g=p,C=b(v("uni-card"),h),I=b(v("uni-segmented-control"),T),w=b(v("BasicListLayout"),k);return e(),t(g,{class:"page-container"},{default:a((()=>[f(" 1. 顶部 Banner "),r(g,{class:"header-banner mx-15 mt-15 r-md",style:{"box-sizing":"border-box"}},{default:a((()=>[r(g,{class:"banner-text"},{default:a((()=>[r(m,{class:"banner-title"},{default:a((()=>[i("上课巡查")])),_:1}),r(m,{class:"banner-subtitle"},{default:a((()=>[i("泸州市实验小学城西学校")])),_:1})])),_:1}),f(" 右侧图片区域,暂时留空或用占位符 "),r(g,{class:"banner-image-placeholder"})])),_:1}),f(" 2. 我的应用 "),r(g,{class:"section my-apps mt-15 px-15"},{default:a((()=>[r(g,{class:"section-title-bar"},{default:a((()=>[r(g,{class:"decorator"}),r(m,{class:"title-text"},{default:a((
|