Browse Source

更新样式

lex 2 năm trước cách đây
mục cha
commit
116556a73d

+ 7 - 4
src/school/attendance/components/attend-student.tsx

@@ -170,9 +170,12 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
         {/* <OSticky position="top" background="#F8F8F8"> */}
-        <Sticky offsetTop={toTop.value}>
+        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
           <div class={styles.chioseWrap}>
             <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
               <div
@@ -231,7 +234,7 @@ export default defineComponent({
             </List>
           </OFullRefresh>
         ) : (
-          <OEmpty class={styles.emptyTop}></OEmpty>
+          <OEmpty></OEmpty>
         )}
 
         <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
@@ -263,7 +266,7 @@ export default defineComponent({
           actions={state.subjects}
           onSelect={checkSubject}
         ></ActionSheet>
-      </>
+      </div>
     )
   }
 })

+ 7 - 4
src/school/attendance/components/attend-teacher.tsx

@@ -157,8 +157,11 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
-        <Sticky offsetTop={toTop.value}>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
+        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
           <div>
             <OSearch
               placeholder="请输入伴学指导姓名"
@@ -229,7 +232,7 @@ export default defineComponent({
             </List>
           </OFullRefresh>
         ) : (
-          <OEmpty class={styles.emptyTop} />
+          <OEmpty />
         )}
 
         <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
@@ -261,7 +264,7 @@ export default defineComponent({
           actions={state.courseList}
           onSelect={checkSubject}
         ></ActionSheet>
-      </>
+      </div>
     )
   }
 })

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

@@ -19,7 +19,3 @@
     }
   }
 }
-
-.emptyTop {
-  margin-top: 130px;
-}

+ 22 - 17
src/school/companion-teacher/companion-detail.tsx

@@ -34,7 +34,8 @@ export default defineComponent({
     const state = reactive({
       showMessage: false,
       detail: {} as any,
-      classList: [] as any
+      classList: [] as any,
+      showDialog: false
     })
     const getDetail = async () => {
       try {
@@ -79,24 +80,17 @@ export default defineComponent({
         return
       }
 
+      state.showDialog = true
+    }
+
+    const onConfirm = async () => {
       try {
-        showDialog({
-          title: '提示',
-          message: '是否解除绑定',
-          showCancelButton: true
-        }).then(async () => {
-          await request.post('/api-school/classGroup/handoverTeacher', {
-            data: {
-              teacherId: route.query.id
-            }
-          })
-          setTimeout(() => {
-            showToast('解绑成功')
-          }, 100)
-          setTimeout(() => {
-            router.back()
-          }, 1000)
+        await request.post('/api-school/classGroup/handoverTeacher', {
+          data: {
+            teacherId: route.query.id
+          }
         })
+        router.back()
       } catch {
         //
       }
@@ -280,6 +274,17 @@ export default defineComponent({
             </div>
           </div>
         </Popup>
+
+        <ODialog
+          v-model:show={state.showDialog}
+          title="解除绑定"
+          message="解除绑定后,该伴学指导将退出所有班级群,若需重新绑定可通过伴学老师邀请码重新填写资料后绑定\n\n确认需要解除绑定吗?"
+          messageAlign="left"
+          showCancelButton
+          confirmButtonText="确认"
+          cancelButtonText="取消"
+          onConfirm={onConfirm}
+        />
       </>
     )
   }

+ 0 - 4
src/school/companion-teacher/index.module.less

@@ -208,7 +208,3 @@
     line-height: 20px;
   }
 }
-
-.emptyTop {
-  margin-top: 120px;
-}

+ 4 - 4
src/school/companion-teacher/index.tsx

@@ -152,7 +152,7 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <>
+      <div class={!form.listState.dataShow && 'emptyRootContainer'}>
         <OSticky
           position="top"
           onGetHeight={(height: any) => {
@@ -186,7 +186,7 @@ export default defineComponent({
               onSearch()
             }}
           />
-          <div style={{ padding: '12px 13px 16px', background: '#F8F8F8' }}>
+          <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
             <div class={styles.searchBand} onClick={() => (form.showPopover = true)}>
               {form.subjectText} <Icon name={form.showPopover ? 'arrow-up' : 'arrow-down'} />
             </div>
@@ -294,7 +294,7 @@ export default defineComponent({
             </List>
           </OFullRefresh>
         ) : (
-          <OEmpty class={styles.emptyTop} btnStatus={false} tips="暂无伴学指导" />
+          <OEmpty btnStatus={false} tips="暂无伴学指导" />
         )}
 
         <Popup
@@ -382,7 +382,7 @@ export default defineComponent({
             onConfirm={(item: any) => onConfirmSubject(item)}
           />
         </Popup>
-      </>
+      </div>
     )
   }
 })

+ 10 - 4
src/school/mass-message/component/class-list/index.tsx

@@ -30,9 +30,13 @@ export default defineComponent({
       type: [String, Number],
       default: 'auto'
     },
+    bottomHeight: {
+      type: [String, Number],
+      default: 0
+    },
     selectItem: {
       type: Array,
-      default: []
+      default: () => []
     }
   },
   emits: ['close', 'confirm', 'update:selectItem'],
@@ -119,7 +123,6 @@ export default defineComponent({
     }
 
     const onSelect = (type: string) => {
-      console.log(type, '2121')
       forms.checkboxRefs[type].toggle()
 
       const list: any = []
@@ -158,8 +161,11 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={styles.practiceClass}>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={[styles.practiceClass, !forms.listState.dataShow && 'emptyRootContainer']}
+        style={{ 'min-height': `calc(100vh - ${props.height}px - ${props.bottomHeight}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <div
             style={{
               padding: '12px 13px',

+ 9 - 2
src/school/mass-message/component/manage-list/index.tsx

@@ -27,6 +27,10 @@ export default defineComponent({
       type: [String, Number],
       default: 'auto'
     },
+    bottomHeight: {
+      type: [String, Number],
+      default: 0
+    },
     removeTeacherId: {
       type: String,
       default: ''
@@ -144,8 +148,11 @@ export default defineComponent({
     })
 
     return () => (
-      <div>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={[!forms.listState.dataShow && 'emptyRootContainer']}
+        style={{ 'min-height': `calc(100vh - ${props.height}px - ${props.bottomHeight}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <OSearch
             inputBackground="white"
             background="#F8F8F8"

+ 10 - 3
src/school/mass-message/component/student-list/index.tsx

@@ -25,13 +25,17 @@ export default defineComponent({
       type: [String, Number],
       default: 'auto'
     },
+    bottomHeight: {
+      type: [String, Number],
+      default: 0
+    },
     selectItem: {
       type: Array,
       default: () => []
     }
   },
   emits: ['close', 'select', 'update:selectItem'],
-  setup(props, { slots, attrs, emit }) {
+  setup(props, { emit }) {
     const forms = reactive({
       teacherStatus: false,
       isLoad: false,
@@ -132,8 +136,11 @@ export default defineComponent({
     })
 
     return () => (
-      <div>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={[!forms.listState.dataShow && 'emptyRootContainer']}
+        style={{ 'min-height': `calc(100vh - ${props.height}px - ${props.bottomHeight}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <OSearch
             inputBackground="white"
             background="#F8F8F8"

+ 9 - 2
src/school/mass-message/component/teacher-list/teacher-list.tsx

@@ -27,6 +27,10 @@ export default defineComponent({
       type: [String, Number],
       default: 'auto'
     },
+    bottomHeight: {
+      type: [String, Number],
+      default: 0
+    },
     removeTeacherId: {
       type: String,
       default: ''
@@ -145,8 +149,11 @@ export default defineComponent({
     })
 
     return () => (
-      <div>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={[!forms.listState.dataShow && 'emptyRootContainer']}
+        style={{ 'min-height': `calc(100vh - ${props.height}px - ${props.bottomHeight}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <OSearch
             inputBackground="white"
             background="#F8F8F8"

+ 29 - 7
src/school/mass-message/select-sned.tsx

@@ -13,7 +13,7 @@ export default defineComponent({
   props: {
     selectList: {
       type: Object,
-      default: {}
+      default: () => ({})
     },
     selectStatus: {
       type: Boolean,
@@ -21,9 +21,10 @@ export default defineComponent({
     }
   },
   emits: ['close', 'confirm', 'update:selectList'],
-  setup(props, { emit, expose }) {
+  setup(props, { emit }) {
     const state = reactive({
       height: 'auto' as any,
+      bottomHeight: 0,
       tabValue: 'class',
       selectClass: [] as any,
       selectStudent: [] as any,
@@ -72,20 +73,41 @@ export default defineComponent({
       <div class={styles.orchestraDetail} style={{ background: '#f6f6f6', minHeight: '100vh' }}>
         <Tabs sticky lineWidth={20} lineHeight={4} v-model:active={state.tabValue}>
           <Tab title="班级" name="class">
-            <ClassList height={state.height} v-model:selectItem={state.selectClass} />
+            <ClassList
+              height={state.height}
+              bottomHeight={state.bottomHeight}
+              v-model:selectItem={state.selectClass}
+            />
           </Tab>
           <Tab title="学员" name="student">
-            <StudentList height={state.height} v-model:selectItem={state.selectStudent} />
+            <StudentList
+              height={state.height}
+              bottomHeight={state.bottomHeight}
+              v-model:selectItem={state.selectStudent}
+            />
           </Tab>
           <Tab title="伴学指导" name="teacher">
-            <TeacherList height={state.height} v-model:selectItem={state.selectTeacher} />
+            <TeacherList
+              height={state.height}
+              bottomHeight={state.bottomHeight}
+              v-model:selectItem={state.selectTeacher}
+            />
           </Tab>
           <Tab title="管理老师" name="manage">
-            <ManageList height={state.height} v-model:selectItem={state.selectManage} />
+            <ManageList
+              height={state.height}
+              bottomHeight={state.bottomHeight}
+              v-model:selectItem={state.selectManage}
+            />
           </Tab>
         </Tabs>
 
-        <OSticky position="bottom">
+        <OSticky
+          position="bottom"
+          onGetHeight={(height: any) => {
+            state.bottomHeight = height
+          }}
+        >
           <div class={'btnGroup'}>
             <Button round block type="primary" onClick={onSubmit}>
               确认