lex 2 سال پیش
والد
کامیت
3b887144c2

+ 5 - 0
src/components/o-empty/index.module.less

@@ -2,6 +2,11 @@
   padding: 14px;
   text-align: center;
   margin: 0 auto;
+  box-sizing: border-box;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
   .tips {
     font-size: 14px;
     color: #333;

+ 1 - 1
src/school/approval-manage/components/wait-approval.tsx

@@ -10,7 +10,7 @@ import ApprovalItem from './approval-item'
 import { approvalManageStrips } from '..'
 export default defineComponent({
   name: 'wait-approval',
-  setup(props, {emit}) {
+  setup(props, { emit }) {
     const router = useRouter()
     const forms = reactive({
       page: 1,

+ 62 - 57
src/school/attendance/components/attend-student.tsx

@@ -174,73 +174,78 @@ export default defineComponent({
     }
     return () => (
       <div
-        class={!showContact.value && 'emptyRootContainer'}
-        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+
+      // style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
       >
-        {/* <OSticky position="top" background="#F8F8F8"> */}
-        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
-          <div class={styles.chioseWrap}>
-            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-              <div
-                class={[styles.searchBand, styles.orchestraBand]}
-                onClick={() => {
-                  state.showPopoverTime = true
-                }}
-              >
-                <p> {forms.timeName} </p>
-                <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
-              </div>
+        {/* <Sticky offsetTop={toTop.value} style={{ width: '100%' }}> */}
+        <div class={styles.chioseWrap}>
+          <div style={{ background: '#F8F8F8' }}>
+            <div
+              class={[styles.searchBand, styles.orchestraBand]}
+              onClick={() => {
+                state.showPopoverTime = true
+              }}
+            >
+              <p> {forms.timeName} </p>
+              <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
             </div>
+          </div>
 
-            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-              <div
-                class={[styles.searchBand, styles.orchestraBand]}
-                onClick={() => {
-                  state.showPopoverOrchestra = true
-                }}
-              >
-                <p> {forms.orchestraName}</p>
+          <div style={{ background: '#F8F8F8' }}>
+            <div
+              class={[styles.searchBand, styles.orchestraBand]}
+              onClick={() => {
+                state.showPopoverOrchestra = true
+              }}
+            >
+              <p> {forms.orchestraName}</p>
 
-                <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
-              </div>
+              <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
             </div>
-            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-              <div
-                class={[styles.searchBand, styles.orchestraBand]}
-                onClick={() => {
-                  state.showPopoverSubject = true
-                }}
-              >
-                <p> {forms.subjectName}</p>
+          </div>
+          <div style={{ background: '#F8F8F8' }}>
+            <div
+              class={[styles.searchBand, styles.orchestraBand]}
+              onClick={() => {
+                state.showPopoverSubject = true
+              }}
+            >
+              <p> {forms.subjectName}</p>
 
-                <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
-              </div>
+              <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
             </div>
           </div>
-        </Sticky>
-        {/* </OSticky> */}
+        </div>
+        {/* </Sticky> */}
 
-        {showContact.value ? (
-          <OFullRefresh
-            v-model:modelValue={refreshing.value}
-            onRefresh={onRefresh}
-            style="min-height: 100vh;"
-          >
-            <List
-              loading-text=" "
-              // v-model:loading={loading.value}
-              finished={finished.value}
-              finished-text=" "
-              onLoad={getList}
+        <div
+          style={{
+            overflowY: 'auto',
+            height: 'calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 1.01333rem)'
+          }}
+        >
+          {showContact.value ? (
+            <OFullRefresh
+              v-model:modelValue={refreshing.value}
+              onRefresh={onRefresh}
+              style="min-height: calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 1.01333rem);"
             >
-              {list.value.map((item: any) => (
-                <StudentAttItem item={item}></StudentAttItem>
-              ))}
-            </List>
-          </OFullRefresh>
-        ) : (
-          <OEmpty tips="暂无考勤"></OEmpty>
-        )}
+              <List
+                loading-text=" "
+                // v-model:loading={loading.value}
+                finished={finished.value}
+                finished-text=" "
+                onLoad={getList}
+              >
+                {list.value.map((item: any) => (
+                  <StudentAttItem item={item}></StudentAttItem>
+                ))}
+              </List>
+            </OFullRefresh>
+          ) : (
+            <OEmpty tips="暂无考勤"></OEmpty>
+          )}
+        </div>
 
         <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
           <DatePicker

+ 74 - 68
src/school/attendance/components/attend-teacher.tsx

@@ -165,86 +165,92 @@ export default defineComponent({
     }
     return () => (
       <div
-        class={!showContact.value && 'emptyRootContainer'}
-        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      // class={!showContact.value && 'emptyRootContainer'}
+      // style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
       >
-        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
-          <div>
-            <OSearch
-              placeholder="请输入伴学指导姓名"
-              inputBackground="white"
-              background="#f6f6f6"
-              onSearch={(val: any) => {
-                console.log(val, 'onSearch')
-                forms.keyword = val
-                refreshing.value = true
-                getList()
-              }}
-            ></OSearch>
-            <div class={styles.chioseWrap}>
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={[styles.searchBand, styles.orchestraBand]}
-                  onClick={() => {
-                    state.showPopoverTime = true
-                  }}
-                >
-                  <p> {forms.timeName}</p>
+        {/* <Sticky offsetTop={toTop.value} style={{ width: '100%' }}> */}
+        <>
+          <OSearch
+            placeholder="请输入伴学指导姓名"
+            inputBackground="white"
+            background="#f6f6f6"
+            onSearch={(val: any) => {
+              console.log(val, 'onSearch')
+              forms.keyword = val
+              refreshing.value = true
+              getList()
+            }}
+          ></OSearch>
+          <div class={styles.chioseWrap}>
+            <div style={{ background: '#F8F8F8' }}>
+              <div
+                class={[styles.searchBand, styles.orchestraBand]}
+                onClick={() => {
+                  state.showPopoverTime = true
+                }}
+              >
+                <p> {forms.timeName}</p>
 
-                  <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
-                </div>
+                <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
               </div>
+            </div>
 
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={[styles.searchBand, styles.orchestraBand]}
-                  onClick={() => {
-                    state.showPopoverOrchestra = true
-                  }}
-                >
-                  <p>{forms.orchestraName}</p>
+            <div style={{ background: '#F8F8F8' }}>
+              <div
+                class={[styles.searchBand, styles.orchestraBand]}
+                onClick={() => {
+                  state.showPopoverOrchestra = true
+                }}
+              >
+                <p>{forms.orchestraName}</p>
 
-                  <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
-                </div>
+                <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
               </div>
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={[styles.searchBand, styles.orchestraBand]}
-                  onClick={() => {
-                    state.showPopoverSubject = true
-                  }}
-                >
-                  <p> {forms.courseTypeName}</p>
+            </div>
+            <div style={{ background: '#F8F8F8' }}>
+              <div
+                class={[styles.searchBand, styles.orchestraBand]}
+                onClick={() => {
+                  state.showPopoverSubject = true
+                }}
+              >
+                <p> {forms.courseTypeName}</p>
 
-                  <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
-                </div>
+                <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
               </div>
             </div>
           </div>
-        </Sticky>
+        </>
+        {/* </Sticky> */}
 
-        {showContact.value ? (
-          <OFullRefresh
-            v-model:modelValue={refreshing.value}
-            onRefresh={onRefresh}
-            style="min-height: 100vh;"
-          >
-            <List
-              loading-text=" "
-              // v-model:loading={loading.value}
-              finished={finished.value}
-              finished-text="没有更多了"
-              onLoad={getList}
+        <div
+          style={{
+            overflowY: 'auto',
+            height: 'calc(100vh - var(--van-tabs-line-height) - var(--header-height)  - 2.45333rem)'
+          }}
+        >
+          {showContact.value ? (
+            <OFullRefresh
+              v-model:modelValue={refreshing.value}
+              onRefresh={onRefresh}
+              style="min-height: calc(100vh - var(--van-tabs-line-height) - var(--header-height) - 2.45333rem)"
             >
-              {list.value.map((item: any) => (
-                <TeacherAttItem item={item}></TeacherAttItem>
-              ))}
-            </List>
-          </OFullRefresh>
-        ) : (
-          <OEmpty tips="暂无考勤" />
-        )}
-
+              <List
+                loading-text=" "
+                // v-model:loading={loading.value}
+                finished={finished.value}
+                finished-text=" "
+                onLoad={getList}
+              >
+                {list.value.map((item: any) => (
+                  <TeacherAttItem item={item}></TeacherAttItem>
+                ))}
+              </List>
+            </OFullRefresh>
+          ) : (
+            <OEmpty tips="暂无考勤" />
+          )}
+        </div>
         <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
           <DatePicker
             onCancel={() => {

+ 5 - 0
src/school/attendance/components/attent-student.module.less

@@ -7,6 +7,7 @@
   color: #333;
   font-weight: 500;
   font-size: 14px;
+  line-height: 38px;
   .orchestraBand {
     display: flex;
     flex-direction: row;
@@ -18,4 +19,8 @@
       white-space: nowrap;
     }
   }
+
+  & > div {
+    padding: 0 13px;
+  }
 }