lex 2 роки тому
батько
коміт
1ce5375d2a

BIN
src/common/images/404.png


+ 3 - 3
src/school/attendance/components/attend-student.tsx

@@ -135,13 +135,13 @@ export default defineComponent({
 
     const getSubjects = async () => {
       try {
-        const res = await request.post('/api-school/subject/page', {
+        const res = await request.post('/api-school/subjectBasicConfig/page', {
           data: { page: 1, rows: 9999 }
         })
         state.subjects = res.data.rows.map((item) => {
           return {
-            name: item.name,
-            value: item.id as string
+            name: item.subjectName,
+            value: item.subjectId as string
           }
         })
         state.subjects.unshift({ name: '全部声部', value: '' })

+ 10 - 15
src/school/companion-teacher/companion-teacher-register.tsx

@@ -197,19 +197,22 @@ export default defineComponent({
         })
         state.columns = tempareas || []
 
-        const { data } = await request.post('/api-school/open/subject/page', {
-          data: {
-            page: 1,
-            rows: 50
+        const { data } = await request.post(
+          '/api-school/open/orchestraSubjectConfig/pageByOrchestraId',
+          {
+            data: {
+              page: 1,
+              rows: 50
+            }
           }
-        })
+        )
 
         const rows = data.rows || []
         const tempSubjects: any = []
-        rows.forEach((item) => {
+        rows.forEach((item: any) => {
           tempSubjects.push({
             text: item.name,
-            value: item.id
+            value: item.subjectId
           })
         })
         state.columnSubject = tempSubjects
@@ -522,14 +525,6 @@ export default defineComponent({
             onConfirm={onConfirmSubject}
           />
         </Popup>
-        <Popup v-model:show={state.showSubject} position="bottom" round>
-          <Picker
-            showToolbar
-            columns={state.columnSubject}
-            onCancel={() => (state.showSubject = false)}
-            onConfirm={onConfirmSubject}
-          />
-        </Popup>
         {/* 学历 */}
         {/* 学历分为专科、本科、硕士、博士、其他 */}
         <Popup v-model:show={state.showEducation} position="bottom" round>

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

@@ -70,7 +70,7 @@ export default defineComponent({
 
     const getSubjects = async () => {
       try {
-        const { data } = await request.post('/api-school/subject/page', {
+        const { data } = await request.post('/api-school/subjectBasicConfig/page', {
           data: {
             page: 1,
             rows: 50
@@ -80,8 +80,8 @@ export default defineComponent({
         const temp = data.rows || []
         temp.forEach((row: any) => {
           form.subjectList.push({
-            text: row.name,
-            value: row.id
+            text: row.subjectName,
+            value: row.subjectId
           })
         })
       } catch {

+ 9 - 6
src/school/manage-teacher/manage-teacher-register.tsx

@@ -126,19 +126,22 @@ export default defineComponent({
         })
         state.columns = tempareas || []
 
-        const { data } = await request.post('/api-school/open/subject/page', {
-          data: {
-            page: 1,
-            rows: 50
+        const { data } = await request.post(
+          '/api-school/open/orchestraSubjectConfig/pageByOrchestraId',
+          {
+            data: {
+              page: 1,
+              rows: 50
+            }
           }
-        })
+        )
 
         const rows = data.rows || []
         const tempSubjects: any = []
         rows.forEach((item) => {
           tempSubjects.push({
             text: item.name,
-            value: item.id
+            value: item.subjectId
           })
         })
         state.columnSubject = tempSubjects

+ 3 - 3
src/school/orchestra/create-orchestra/index.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
     // 获取声部
     const getSubjects = async () => {
       try {
-        const { data } = await request.post('/api-school/subject/page', {
+        const { data } = await request.post('/api-school/subjectBasicConfig/page', {
           data: {
             page: 1,
             rows: 50
@@ -75,8 +75,8 @@ export default defineComponent({
           // 判断是否在数据里,如果在则直接添加,不能重置数据
           if (index < 0) {
             temps.push({
-              id: item.id,
-              name: item.name,
+              id: item.subjectId,
+              name: item.subjectName,
               code: item.code,
               type: null,
               teacher: {}, // 老师信息

+ 5 - 5
src/school/orchestra/modal/subject-list.tsx

@@ -55,11 +55,11 @@ export default defineComponent({
           style={{ paddingBottom: '24px' }}
         >
           {props.subjectList.map((item: any) => (
-            <div class={styles.subject} onClick={() => onSelect(item.id)}>
+            <div class={styles.subject} onClick={() => onSelect(item.subjectId)}>
               <Checkbox
-                name={item.id}
+                name={item.subjectId}
                 class={styles.checkbox}
-                ref={(el: any) => (state.checkboxRefs[item.id] = el)}
+                ref={(el: any) => (state.checkboxRefs[item.subjectId] = el)}
                 onClick={(e: any) => {
                   e.stopPropagation()
                 }}
@@ -72,8 +72,8 @@ export default defineComponent({
                   )
                 }}
               />
-              <Image class={styles.img} src={item.img} />
-              <p class={styles.name}>{item.name}</p>
+              <Image class={styles.img} src={item.subjectImg} />
+              <p class={styles.name}>{item.subjectName}</p>
             </div>
           ))}
         </CheckboxGroup>

+ 3 - 3
src/school/ranking-list/components/day-bang.tsx

@@ -142,13 +142,13 @@ export default defineComponent({
 
     const getSubjects = async () => {
       try {
-        const res = await request.post('/api-school/subject/page', {
+        const res = await request.post('/api-school/subjectBasicConfig/page', {
           data: { page: 1, rows: 9999 }
         })
         state.subjects = res.data.rows.map((item) => {
           return {
-            name: item.name,
-            value: item.id as string
+            name: item.subjectName,
+            value: item.subjectId as string
           }
         })
         state.subjects.unshift({ name: '全部声部', value: '' })

+ 3 - 3
src/school/ranking-list/components/timer-bang.tsx

@@ -142,13 +142,13 @@ export default defineComponent({
 
     const getSubjects = async () => {
       try {
-        const res = await request.post('/api-school/subject/page', {
+        const res = await request.post('/api-school/subjectBasicConfig/page', {
           data: { page: 1, rows: 9999 }
         })
         state.subjects = res.data.rows.map((item) => {
           return {
-            name: item.name,
-            value: item.id as string
+            name: item.subjectName,
+            value: item.subjectId as string
           }
         })
         state.subjects.unshift({ name: '全部声部', value: '' })

BIN
src/student/music-group/pre-apply/images/banner.png


+ 16 - 4
src/student/music-group/pre-apply/index.module.less

@@ -49,16 +49,28 @@
     display: flex;
     align-items: center;
     justify-content: center;
-    span {
+    flex-direction: column;
+    .orchestraName {
       display: block;
-      padding: 0 35px;
-      font-size: 30px;
-      font-weight: bold;
+      padding: 0 25px;
+      font-size: 24px;
+      font-weight: 600;
       color: #ffffff;
       line-height: 38px;
       letter-spacing: 1px;
+      text-shadow: 2px 2px 0px #d83d00;
+      text-align: justify;
       text-align: center;
     }
+    .tips {
+      margin-top: 24px;
+      padding: 5px 11px;
+      background-color: #fff;
+      border-radius: 16px 0 16px 0;
+      font-size: 15px;
+      font-weight: 600;
+      color: #e45729;
+    }
   }
 }
 

+ 34 - 16
src/student/music-group/pre-apply/index.tsx

@@ -43,6 +43,20 @@ export default defineComponent({
           '/api-student/orchestraRegister/registerStatus/' + route.query.id
         )
         state.registerInfo = data || {}
+        const name = data.orchestraName
+        // const name = '华中科技大学大学同济医学院附'
+        // console.log(name.length)
+        if (name.length > 12 && name.length / 12 > 1 && name.length / 12 <= 2) {
+          const len = name.substring(12, 24)
+          if (len.length < 5) {
+            const splitLen = Math.ceil(name.length / 2)
+            const first = name.substring(0, splitLen)
+            const last = name.substring(splitLen, name.length)
+            state.registerInfo.orchestraName = first + '<br />' + last
+          } else {
+            state.registerInfo.orchestraName = name
+          }
+        }
 
         // 判断是否报名注册过
         state.register = data.register
@@ -107,18 +121,18 @@ export default defineComponent({
         }
 
         // 判断是否有openId 并且 purchase
-        // if (!data.openId && !data.purchase) {
-        //   if (browser().weixin) {
-        //     // 微信公众号支付
-        //     //授权
-        //     const code = getUrlCode()
-        //     if (!code) {
-        //       goAuth(data.wxAppId)
-        //     } else {
-        //       state.code = code
-        //     }
-        //   }
-        // }
+        if (!data.openId && !data.purchase) {
+          if (browser().weixin) {
+            // 微信公众号支付
+            //授权
+            const code = getUrlCode()
+            if (!code) {
+              goAuth(data.wxAppId)
+            } else {
+              state.code = code
+            }
+          }
+        }
       } catch {
         //
       }
@@ -191,11 +205,15 @@ export default defineComponent({
     return () => (
       <div class={styles.preApply}>
         <div class={styles.banner} ref={bannerRef}>
-          <span>
-            {state.registerInfo.orchestraName} <br />
-            乐团报名
-          </span>
+          {state.registerInfo.orchestraName && (
+            <>
+              <p class={styles.orchestraName} v-html={state.registerInfo.orchestraName}></p>
+
+              <div class={styles.tips}>快来参加乐团报名吧!</div>
+            </>
+          )}
         </div>
+
         <Sticky position="top">
           <Tabs
             lineWidth={20}

+ 3 - 3
src/views/exercise-record/index.tsx

@@ -171,13 +171,13 @@ export default defineComponent({
 
     const getSubjects = async () => {
       try {
-        const res = await request.post(`${platformApi.value}/subject/page`, {
+        const res = await request.post(`${platformApi.value}/subjectBasicConfig/page`, {
           data: { page: 1, rows: 9999 }
         })
         state.subjects = res.data.rows.map((item) => {
           return {
-            name: item.name,
-            value: item.id as string
+            name: item.subjectName,
+            value: item.subjectId as string
           }
         })
         state.subjects.unshift({ name: '全部声部', value: '' })