lex 2 年之前
父節點
當前提交
e22629f007

+ 8 - 15
src/school/approval-manage/batch-adjust.tsx

@@ -21,27 +21,13 @@ import {
 import { defineComponent, onMounted, reactive } from 'vue'
 import { useRouter } from 'vue-router'
 import PracticeClass from '../train-planning/modal/practice-class'
+import { forms } from './batch'
 import styles from './batch-adjust.module.less'
 
 export default defineComponent({
   name: 'batch-adjust',
   setup() {
     const router = useRouter()
-    const forms = reactive({
-      changeType: 1, // 调整方式
-      startTimeStatus: false,
-      startTime: [],
-      endTimeMinDate: new Date(),
-      endTimeStatus: false,
-      endTime: [],
-      adjustDay: null as any,
-      orchestraStatus: false,
-      orchestraList: [] as any, // 乐团列表
-      orchestraId: null as any,
-      orchestraName: null as any,
-      classGroupIdList: [] as any, // 选中班级id集合
-      classStatus: false
-    })
 
     // 获取乐团列表
     const getOrchestra = async () => {
@@ -76,6 +62,13 @@ export default defineComponent({
           }
         })
         console.log(data)
+        router.push({
+          path: '/course-preview',
+          query: {
+            cacheId: data,
+            type: 'change'
+          }
+        })
       } catch {
         //
       }

+ 17 - 0
src/school/approval-manage/batch.ts

@@ -0,0 +1,17 @@
+import { reactive } from "vue";
+
+export const forms = reactive({
+  changeType: 1, // 调整方式
+  startTimeStatus: false,
+  startTime: [],
+  endTimeMinDate: new Date(),
+  endTimeStatus: false,
+  endTime: [],
+  adjustDay: null as any,
+  orchestraStatus: false,
+  orchestraList: [] as any, // 乐团列表
+  orchestraId: null as any,
+  orchestraName: null as any,
+  classGroupIdList: [] as any, // 选中班级id集合
+  classStatus: false
+})

+ 3 - 2
src/school/train-planning/component/course-preview/index.tsx

@@ -32,6 +32,7 @@ export default defineComponent({
     const route = useRoute()
     const router = useRouter()
     const state = reactive({
+      type: route.query.type,
       conflictStatus: false,
       conflictMessage: '该时间段伴学指导在其他学校有课',
       tabValue: '',
@@ -163,7 +164,7 @@ export default defineComponent({
         state.isClick = true
         await request.post('/api-school/orchestra/trainingPlan/' + route.query.cacheId)
         setTimeout(() => {
-          showToast('排课成功')
+          showToast(state.type === 'change' ? '调整成功' : '排课成功')
         }, 100)
         setTimeout(() => {
           state.isClick = false
@@ -325,7 +326,7 @@ export default defineComponent({
               onClick={onSubmit}
               disabled={state.isClick}
             >
-              确认排课
+              {state.type === 'change' ? '确认调整' : '确认排课'}
             </Button>
           </div>
         </OSticky>

+ 3 - 2
src/views/information/information-detail.tsx

@@ -25,9 +25,10 @@ export default defineComponent({
     })
     return () => (
       <div class={styles.detail}>
-        <div class={styles.title}>常见的乐器可以分为三大类,你真的了解过吗</div>
+        <div class={styles.title}>{detail.value.title}</div>
         <div class={styles.who}>
-          <span>管乐团</span>2022-12-05 11:47
+          <span>管乐团</span>
+          {detail.value.createTime}
         </div>
 
         <div class={styles.content} v-html={detail.value.content}></div>