浏览代码

Merge branch 'iteration-20231012'

lex 1 年之前
父节点
当前提交
8e7cf4be0b
共有 3 个文件被更改,包括 89 次插入8 次删除
  1. 11 6
      src/views/tenantStudentRejest/index.module.less
  2. 77 1
      src/views/tenantStudentRejest/index.tsx
  3. 1 1
      vite.config.ts

+ 11 - 6
src/views/tenantStudentRejest/index.module.less

@@ -1,7 +1,10 @@
 .resjetStudentWrap {
   width: 100%;
-  height: 891px;
+  // height: 891px;
+  min-height: 100vh;
   position: relative;
+  background: #FEDBC6;
+  overflow: hidden;
 
   .bgWrap {
     position: absolute;
@@ -63,10 +66,11 @@
 
   .infoWrap {
     padding: 12px 12px 0;
-    top: 326px;
+    // top: 326px;
     position: relative;
-    width: 371px;
-    height: 565px;
+    // width: 371px;
+    // height: 565px;
+    margin-top: 326px;
     background: linear-gradient(180deg,
         rgba(255, 255, 255, 0.22) 0%,
         rgba(255, 255, 255, 0) 100%);
@@ -78,7 +82,7 @@
 
     .infoWrapCore {
       background-color: #fff;
-      height: 443px;
+      // height: 443px;
       background: #ffffff;
       border-radius: 18px;
       overflow: hidden;
@@ -98,7 +102,7 @@
 
 .group {
   overflow: hidden;
-  padding: 14px 0 20px;
+  padding: 14px 0 0px;
 
   .noArrow {
     :global {
@@ -201,6 +205,7 @@
   left: 50%;
   margin-left: -151px;
   margin-top: 24px;
+  margin-bottom: 24px;
 }
 
 .showWrap {

+ 77 - 1
src/views/tenantStudentRejest/index.tsx

@@ -31,6 +31,7 @@ import rejectBtn from './images/rejectBtn.png'
 import studentSuccess from './images/studentSuccess.png'
 import request from '@/helpers/request'
 import dayjs from 'dayjs'
+import { removeAuth } from '@/helpers/utils'
 export default defineComponent({
   name: 'tenantStudentRejest',
   setup() {
@@ -41,6 +42,8 @@ export default defineComponent({
       phone: '',
       subjectId: '',
       subjectName: '',
+      tenantGroupName: '',
+      tenantGroupId: '',
       birthdate: '',
       code: '',
       genderName: '',
@@ -62,6 +65,8 @@ export default defineComponent({
       searchStatus: false,
       openStatus: false,
       dateState: false,
+      tenantGroupList: [] as any,
+      tenantGroupStatus: false,
       genderState: false,
       genderList: [
         { text: '男', value: '1' },
@@ -137,14 +142,43 @@ export default defineComponent({
       forms.subjectName = val.text
       forms.subjectId = val.value
       data.searchStatus = false
-      console.log(val, 'confirmSubject')
+    }
+
+    const confirmTenant = (val: any) => {
+      console.log(val, 'confirmTenant')
+      forms.tenantGroupName = val.text
+      forms.tenantGroupId = val.value
+      data.tenantGroupStatus = false
     }
 
     const confirmDate = (val: any) => {
       forms.birthdate = dayjs(val).format('YYYY-MM-DD')
       data.dateState = false
     }
+    const tenantGroupList = async () => {
+      try {
+        const res = await request.post('/api-tenant/open/tenantGroup/page', {
+          data: {
+            page: 1,
+            rows: 999,
+            tenantId: data.id
+          }
+        })
+
+        data.tenantGroupList =
+          res.data.rows.map((item: any) => {
+            return {
+              text: item.name,
+              value: item.id
+            }
+          }) || []
+      } catch {
+        //
+      }
+    }
     onMounted(() => {
+      removeAuth()
+      tenantGroupList()
       getSubjectList()
     })
     const confirmGender = (val: any) => {
@@ -210,6 +244,7 @@ export default defineComponent({
         console.log(e)
       }
     }
+
     return () => (
       <>
         <div class={styles.videoClass}>
@@ -353,6 +388,28 @@ export default defineComponent({
                         )
                       }}
                     </Field>
+                    <Field
+                      border={false}
+                      inputAlign="right"
+                      label="小组"
+                      placeholder="请选择小组"
+                      readonly
+                      v-model={forms.tenantGroupName}
+                      onClick={() => (data.tenantGroupStatus = true)}
+                    >
+                      {{
+                        button: () => (
+                          <img
+                            style={{
+                              display: 'block',
+                              width: '12px',
+                              height: '12px'
+                            }}
+                            src={icon_arrow}
+                          />
+                        )
+                      }}
+                    </Field>
                   </CellGroup>
                 </Form>
               </div>
@@ -383,6 +440,25 @@ export default defineComponent({
               onConfirm={confirmSubject}
             ></Picker>
           </Popup>
+
+          <Popup
+            show={data.tenantGroupStatus}
+            position="bottom"
+            round
+            columns-field-names={{ text: '' }}
+            safe-area-inset-bottom
+            onClose={() => (data.tenantGroupStatus = false)}
+            onClosed={() => (data.openStatus = false)}
+          >
+            <Picker
+              columns={data.tenantGroupList}
+              onCancel={() => {
+                data.tenantGroupStatus = false
+              }}
+              onConfirm={confirmTenant}
+            ></Picker>
+          </Popup>
+
           <Popup
             show={data.dateState}
             position="bottom"

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/';
-const proxyUrl = 'https://test.colexiu.com/'
+const proxyUrl = 'https://dev.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.143:8000/'
 export default defineConfig({
   base: './',