Browse Source

修改名称

lex 2 years ago
parent
commit
2144757ba7

+ 1 - 1
README.md

@@ -93,7 +93,7 @@ gyt/basic
 后台-课件
 gyt/courseware
 
-后台-单元测验-创建题目
+后台-阶段自测-创建题目
 question-bank
 
 群发消息

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-legacy.23f4c04a.js


+ 1 - 1
public/project/initiation.html

@@ -386,7 +386,7 @@
             this.canSignUp = orchestraDetail.data.data.status
             if (orchestraDetail.data.data.status !== 'INITIATION_SURVEY') {
               vant.showToast('乐团启蒙阶段已结束')
-              return
+              // return
             }
           }
         } catch {

+ 53 - 7
public/project/preRegister.html

@@ -224,9 +224,16 @@
       </van-cell-group>
 
       <van-cell-group inset class="cell-group">
-        <van-field label="选报声部" v-model="stu.registerSubjectId" readonly name="registerSubjectId"
-          :rules="[{ required: true, message: '请选择选报声部', trigger: 'onChange' }]" @click="pickerChange2"
-          placeholder="请选择选报声部">
+        <van-field label="首选声部" v-model="stu.registerSubjectId" readonly name="registerSubjectId"
+          :rules="[{ required: true, message: '请选择首选声部', trigger: 'onChange' }]" @click="pickerChange2"
+          placeholder="请选择首选声部">
+          <template #right-icon>
+            <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
+          </template>
+        </van-field>
+        <van-field label="次选声部" v-model="stu.standbyRegisterSubjectId" readonly name="standbyRegisterSubjectId"
+          :rules="[{ required: true, message: '请选择次选声部', trigger: 'onChange' }]" @click="pickerChange3"
+          placeholder="请选择次选声部">
           <template #right-icon>
             <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
           </template>
@@ -287,6 +294,10 @@
       <van-picker show-toolbar :columns="subjectList" @cancel="subjectPicker = false" @confirm="onConfirmSubject" />
     </van-popup>
 
+    <van-popup v-model:show="subjectPicker2" position="bottom" round>
+      <van-picker show-toolbar :columns="subjectList" @cancel="subjectPicker2 = false" @confirm="onConfirmSubject2" />
+    </van-popup>
+
     <van-popup v-model:show="submitStatus" round style="width: 100%;background-color: transparent;"
       :close-on-click-overlay="false">
       <div class="submit-container">
@@ -324,7 +335,9 @@
           schoolId: null,
           showPicker: false,
           classPicker: false,
+          subjectPickerType: 'first',
           subjectPicker: false,
+          subjectPicker2: false,
           submitStatus: false,
           pattern: /^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/,
           nameReg: /^[\u4E00-\u9FA5]+$/,
@@ -347,9 +360,11 @@
             currentGradeNum: null, // 年级编号
             currentClass: '', // 班级
             currentClassNum: null, // 年级编号
-            registerSubjectId: '',
+            registerSubjectId: '', // 首选声部
             registerSubjectNum: null, // 所在声部
-            instrumentsPrepareMode: null,
+            standbyRegisterSubjectId: '', // 次选声部
+            standbyRegisterSubjectNum: '', // 次选声部
+            instrumentsPrepareMode: 'GROUP_PURCHASE',
             learningSystemPrepareMode: 'GROUP_PURCHASE',
           },
           btnLoading: false,
@@ -403,7 +418,7 @@
             this.canSignUp = orchestraDetail.data.data.status
             if (orchestraDetail.data.data.status !== 'PRE_REGISTER') {
               vant.showToast('乐团预报名阶段已结束')
-              return
+              // return
             }
           }
 
@@ -478,6 +493,7 @@
               var grade = this.currentGrade.find(item => item.value == detail.currentGrade)
               var cls = this.classList.find(item => item.value == detail.currentClass)
               var subjects = this.subjectList.find(item => item.value == detail.registerSubjectId)
+              var subjects2 = this.subjectList.find(item => item.value == detail.standbyRegisterSubjectId)
               this.stu = {
                 username: detail.username, // 姓名
                 sex: detail.sex ? 1 : 0, // 性别
@@ -488,6 +504,8 @@
                 currentClassNum: detail.currentClass, // 年级编号
                 registerSubjectId: subjects.text, //
                 registerSubjectNum: detail.registerSubjectId, //
+                standbyRegisterSubjectId: subjects2.text,
+                standbyRegisterSubjectNum: detail.standbyRegisterSubjectId,
                 instrumentsPrepareMode: detail.instrumentsPrepareMode,
                 learningSystemPrepareMode: detail.learningSystemPrepareMode,
               }
@@ -547,6 +565,7 @@
               currentClass: stu.currentClassNum,
               currentGrade: stu.currentGradeNum,
               registerSubjectId: stu.registerSubjectNum,
+              standbyRegisterSubjectId: stu.standbyRegisterSubjectNum,
               code: this.code
             })
             if (res.data.code === 200) {
@@ -580,7 +599,29 @@
           this.classPicker = true
         },
         pickerChange2(type) {
+          let tempId = this.stu.standbyRegisterSubjectNum
+          this.subjectList.forEach((item) => {
+            if (item.value == tempId) {
+              item.disabled = true
+            } else {
+              item.disabled = false
+            }
+          })
+
           this.subjectPicker = true
+
+        },
+        pickerChange3() {
+          let tempId = this.stu.registerSubjectNum
+          this.subjectList.forEach((item) => {
+            if (item.value == tempId) {
+              item.disabled = true
+            } else {
+              item.disabled = false
+            }
+          })
+
+          this.subjectPicker2 = true
         },
         onConfirm(options) {
           var stu = this.stu
@@ -598,8 +639,13 @@
           var stu = this.stu
           stu.registerSubjectId = options.selectedOptions[0].text
           stu.registerSubjectNum = options.selectedOptions[0].value
-
           this.subjectPicker = false
+        },
+        onConfirmSubject2(options) {
+          var stu = this.stu
+          stu.standbyRegisterSubjectId = options.selectedOptions[0].text
+          stu.standbyRegisterSubjectNum = options.selectedOptions[0].value
+          this.subjectPicker2 = false
         }
       }
     })

+ 9 - 1
src/router/routes-common.ts

@@ -96,7 +96,7 @@ export const router: RouteRecordRaw[] = [
     name: 'unit-test',
     component: () => import('@/views/unit-test'),
     meta: {
-      title: '单元测验'
+      title: '阶段自测'
     }
   },
   {
@@ -148,6 +148,14 @@ export const router: RouteRecordRaw[] = [
     }
   },
   {
+    path: '/mine-myphoto',
+    name: 'mine-myphoto',
+    component: () => import('@/views/mine-orchestra/my-photo'),
+    meta: {
+      title: '乐团剪影'
+    }
+  },
+  {
     path: '/photo-list',
     name: 'photo-list',
     component: () => import('@/views/mine-orchestra/photo-list/index'),

+ 9 - 1
src/router/routes-school.ts

@@ -78,6 +78,14 @@ export default [
         }
       },
       {
+        path: '/school-photo',
+        name: 'school-photo',
+        component: () => import('@/school/orchestra/compontent/photo'),
+        meta: {
+          title: '乐团剪影'
+        }
+      },
+      {
         path: '/photo-detail',
         name: 'photo-detail',
         component: () => import('@/school/orchestra/compontent/photo-detail'),
@@ -355,7 +363,7 @@ export default [
         name: 'unit-list',
         component: () => import('@/views/unit-test/unit-list/index'),
         meta: {
-          title: '单元测验'
+          title: '阶段自测'
         }
       },
       {

+ 3 - 3
src/router/routes-teacher.ts

@@ -84,7 +84,7 @@ export default [
         name: 'unit-list',
         component: () => import('@/views/unit-test/unit-list/index'),
         meta: {
-          title: '单元测验'
+          title: '阶段自测'
         }
       },
       {
@@ -116,7 +116,7 @@ export default [
         name: 'uni-last',
         component: () => import('@/views/unit-test/unit-create/uni-last'),
         meta: {
-          title: '单元测验'
+          title: '阶段自测'
         }
       },
       {
@@ -128,7 +128,7 @@ export default [
         }
       }
 
-      //unitDetail 选择单元测验
+      //unitDetail 选择阶段自测
     ]
   },
   ...rootRouter,

+ 17 - 0
src/school/approval-manage/batch-adjust.tsx

@@ -19,6 +19,7 @@ import {
   Popup,
   Radio,
   RadioGroup,
+  showToast,
   Tag
 } from 'vant'
 import { defineComponent, onMounted, reactive } from 'vue'
@@ -62,6 +63,22 @@ export default defineComponent({
 
     const onSubmit = async () => {
       try {
+        if (forms.classGroupIdList.length <= 0) {
+          showToast('请选择班级')
+          return
+        }
+        if (!forms.startTime.join('-')) {
+          showToast('请选择课程开始日期')
+          return
+        }
+        if (!forms.endTime.join('-')) {
+          showToast('请选择课程结束日期')
+          return
+        }
+        if (!forms.adjustDay) {
+          showToast('请输入调整天数')
+          return
+        }
         form.submitLoading = true
         const res = await request.post('/api-school/courseSchedule/batchAdjust', {
           hideLoading: true,

+ 1 - 0
src/school/orchestra/compontent/photo.module.less

@@ -1,4 +1,5 @@
 .phone {
+  overflow: hidden;
   padding: 0 13px 0;
 }
 .addPhone {

+ 2 - 2
src/school/orchestra/orchestra-detail.tsx

@@ -53,14 +53,14 @@ export default defineComponent({
           <Tabs sticky lineWidth={20} lineHeight={4} v-model:active={tabValue.value}>
             <Tab title="乐团信息" name="information"></Tab>
             <Tab title="训练进度" name="plan"></Tab>
-            <Tab title="训练照片" name="photo"></Tab>
+            {/* <Tab title="训练照片" name="photo"></Tab> */}
             {/* <Tab title="乐团资讯" name="info"></Tab> */}
           </Tabs>
         </OSticky>
 
         {tabValue.value === 'information' && <Information termTimes={termTimes.value} />}
         {tabValue.value === 'plan' && <Plan height={tabHeight.value} termTimes={termTimes.value} />}
-        {tabValue.value === 'photo' && <Photo height={tabHeight.value} />}
+        {/* {tabValue.value === 'photo' && <Photo height={tabHeight.value} />} */}
       </div>
     )
   }

+ 51 - 51
src/student/music-group/pre-apply/component/payment.tsx

@@ -385,26 +385,21 @@ export default defineComponent({
             </>
           )}
 
-          {/* 判断是否已经购买教材 */}
-          {!state.paymentOrderDetails.includes('TEXTBOOK') && (
+          {!state.paymentOrderDetails.includes('VIP') && (
             <>
-              {/* <div class={styles.applyTitle}>教材</div> */}
+              {/* <div class={styles.applyTitle}>乐团学习系统</div> */}
               <CellGroup
                 inset
                 class={[styles.mlr13, styles.sectionCell]}
-                onClick={() => {
-                  return
-                  // onSelect(state.textBookInfo.goodsId)
-                }}
+                onClick={() => onSelect(state.vipInfo.goodsId)}
               >
                 <Cell border={false}>
                   {{
                     icon: () => (
                       <Checkbox
-                        name={state.textBookInfo.goodsId}
-                        disabled
+                        name={state.vipInfo.goodsId}
                         class={styles.checkbox}
-                        ref={(el: any) => (state.checkboxRefs[state.textBookInfo.goodsId] = el)}
+                        ref={(el: any) => (state.checkboxRefs[state.vipInfo.goodsId] = el)}
                         onClick={(e: Event) => {
                           e.stopPropagation()
                         }}
@@ -422,36 +417,30 @@ export default defineComponent({
                       <div class={styles.section}>
                         <Image
                           class={styles.img}
-                          src={state.textBookInfo.goodsUrl}
+                          src={state.vipInfo.goodsUrl}
                           onClick={(e: any) => {
                             e.stopPropagation()
-                            state.selectGoodsId = state.textBookInfo.goodsId
-                            state.currentPrice = state.textBookInfo.currentPrice
-                            state.selectGoodsInfo = {}
-                            state.goodsStatus = true
+                            state.memberBaoStatus = true
                           }}
                         />
                         <div class={styles.sectionContent}>
                           <h2
                             onClick={(e: any) => {
                               e.stopPropagation()
-                              state.selectGoodsId = state.textBookInfo.goodsId
-                              state.currentPrice = state.textBookInfo.currentPrice
-                              state.selectGoodsInfo = {}
-                              state.goodsStatus = true
+                              state.memberBaoStatus = true
                             }}
                           >
-                            {state.textBookInfo.goodsName}
+                            {state.vipInfo.goodsName}
                           </h2>
                           <Tag
                             color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
                             textColor="#fff"
                             class={styles.brandName}
                           >
-                            {state.textBookInfo.brandName}
+                            6个月
                           </Tag>
                           <p class={[styles.model, 'van-multi-ellipsis--l2']}>
-                            {state.textBookInfo.description}
+                            {state.vipInfo.description}
                           </p>
                         </div>
                       </div>
@@ -465,25 +454,15 @@ export default defineComponent({
                         <div class={styles.sectionPrice}>
                           <p class={styles.price}>
                             团购价:
-                            <span
-                              class={[
-                                state.textBookInfo.currentPrice > 0 ? styles.numFont : styles.free
-                              ]}
-                            >
-                              {state.textBookInfo.currentPrice > 0 ? (
-                                <>
-                                  <span class={styles.numPrefix}>¥</span>
-                                  {moneyFormat(state.textBookInfo.currentPrice)}
-                                </>
-                              ) : (
-                                '免费'
-                              )}
+                            <span class={styles.numFont}>
+                              <span class={styles.numPrefix}>¥</span>
+                              {moneyFormat(state.vipInfo.currentPrice)}
                             </span>
                           </p>
                           <p class={styles.originPrice}>
                             原价:
                             <del class={styles.numFont}>
-                              ¥{moneyFormat(state.textBookInfo.originalPrice)}
+                              ¥{moneyFormat(state.vipInfo.originalPrice)}
                             </del>
                           </p>
                         </div>
@@ -495,21 +474,26 @@ export default defineComponent({
             </>
           )}
 
-          {!state.paymentOrderDetails.includes('VIP') && (
+          {/* 判断是否已经购买教材 */}
+          {!state.paymentOrderDetails.includes('TEXTBOOK') && (
             <>
-              {/* <div class={styles.applyTitle}>乐团学习系统</div> */}
+              {/* <div class={styles.applyTitle}>教材</div> */}
               <CellGroup
                 inset
                 class={[styles.mlr13, styles.sectionCell]}
-                onClick={() => onSelect(state.vipInfo.goodsId)}
+                onClick={() => {
+                  return
+                  // onSelect(state.textBookInfo.goodsId)
+                }}
               >
                 <Cell border={false}>
                   {{
                     icon: () => (
                       <Checkbox
-                        name={state.vipInfo.goodsId}
+                        name={state.textBookInfo.goodsId}
+                        disabled
                         class={styles.checkbox}
-                        ref={(el: any) => (state.checkboxRefs[state.vipInfo.goodsId] = el)}
+                        ref={(el: any) => (state.checkboxRefs[state.textBookInfo.goodsId] = el)}
                         onClick={(e: Event) => {
                           e.stopPropagation()
                         }}
@@ -527,30 +511,36 @@ export default defineComponent({
                       <div class={styles.section}>
                         <Image
                           class={styles.img}
-                          src={state.vipInfo.goodsUrl}
+                          src={state.textBookInfo.goodsUrl}
                           onClick={(e: any) => {
                             e.stopPropagation()
-                            state.memberBaoStatus = true
+                            state.selectGoodsId = state.textBookInfo.goodsId
+                            state.currentPrice = state.textBookInfo.currentPrice
+                            state.selectGoodsInfo = {}
+                            state.goodsStatus = true
                           }}
                         />
                         <div class={styles.sectionContent}>
                           <h2
                             onClick={(e: any) => {
                               e.stopPropagation()
-                              state.memberBaoStatus = true
+                              state.selectGoodsId = state.textBookInfo.goodsId
+                              state.currentPrice = state.textBookInfo.currentPrice
+                              state.selectGoodsInfo = {}
+                              state.goodsStatus = true
                             }}
                           >
-                            {state.vipInfo.goodsName}
+                            {state.textBookInfo.goodsName}
                           </h2>
                           <Tag
                             color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
                             textColor="#fff"
                             class={styles.brandName}
                           >
-                            6个月
+                            {state.textBookInfo.brandName}
                           </Tag>
                           <p class={[styles.model, 'van-multi-ellipsis--l2']}>
-                            {state.vipInfo.description}
+                            {state.textBookInfo.description}
                           </p>
                         </div>
                       </div>
@@ -564,15 +554,25 @@ export default defineComponent({
                         <div class={styles.sectionPrice}>
                           <p class={styles.price}>
                             团购价:
-                            <span class={styles.numFont}>
-                              <span class={styles.numPrefix}>¥</span>
-                              {moneyFormat(state.vipInfo.currentPrice)}
+                            <span
+                              class={[
+                                state.textBookInfo.currentPrice > 0 ? styles.numFont : styles.free
+                              ]}
+                            >
+                              {state.textBookInfo.currentPrice > 0 ? (
+                                <>
+                                  <span class={styles.numPrefix}>¥</span>
+                                  {moneyFormat(state.textBookInfo.currentPrice)}
+                                </>
+                              ) : (
+                                '免费'
+                              )}
                             </span>
                           </p>
                           <p class={styles.originPrice}>
                             原价:
                             <del class={styles.numFont}>
-                              ¥{moneyFormat(state.vipInfo.originalPrice)}
+                              ¥{moneyFormat(state.textBookInfo.originalPrice)}
                             </del>
                           </p>
                         </div>

+ 16 - 2
src/views/adapay/payment/index.module.less

@@ -59,7 +59,7 @@
       color: #000000;
       span {
         font-size: 18px;
-        padding-left: 3px;
+        // padding-right: 3px;
       }
     }
   }
@@ -69,8 +69,22 @@
     // background-color: #f6f8f9;
   }
 
+  .payTypeRe {
+    display: flex;
+    align-items: center;
+  }
+  .recommend {
+    margin-left: 5px;
+    background: linear-gradient(122deg, #ffa371 0%, #ff6b3b 100%);
+    border-radius: 10px;
+    font-size: 12px;
+    color: #ffffff;
+    line-height: 16px;
+    padding: 0 5px;
+  }
+
   .payBtn {
-    width: 80% !important;
+    width: 90% !important;
     margin: 0 auto;
     font-size: 16px;
     font-weight: 600;

+ 11 - 6
src/views/adapay/payment/index.tsx

@@ -77,20 +77,19 @@ export default defineComponent({
     return () => (
       <div class={styles.payment}>
         <Icon onClick={onClose} name="cross" size={20} />
-        <div class={[styles.title, 'van-hairline--bottom']}>选择支付方式</div>
+        <div class={[styles.title]}>选择支付方式</div>
 
         <div class={styles.payAmount}>
           <p>应付金额</p>
           <div class={styles.amount}>
+            <span>¥</span>
             {moneyFormat(props.paymentConfig.currentPrice)}
-            <span>元</span>
           </div>
         </div>
         <RadioGroup v-model={state.payType}>
           <CellGroup border={false}>
             <Cell
-              title="微信支付"
-              border={false}
+              border={true}
               center
               onClick={() => {
                 // wx_lite
@@ -98,12 +97,18 @@ export default defineComponent({
               }}
               v-slots={{
                 icon: () => <Icon name="wechat-pay" color="#15c434" size={22} />,
-                'right-icon': () => <Radio name="wx" />
+                'right-icon': () => <Radio name="wx" />,
+                title: () => (
+                  <div class={styles.payTypeRe}>
+                    微信支付 <span class={styles.recommend}>推荐</span>
+                  </div>
+                )
               }}
             ></Cell>
             <Cell
               title="支付宝支付"
-              border={false}
+              border={true}
+              // class="van-hairline--bottom"
               center
               onClick={() => {
                 // alipay

+ 1 - 1
src/views/exercise-after-class/index.tsx

@@ -220,7 +220,7 @@ export default defineComponent({
         // console.log(itemIndex ,data.trainings, data.videoData?.materialId)
         const isLastIndex = itemIndex === data.trainings.length - 1
         showConfirmDialog({
-          title: '课后训练',
+          title: '课后作业',
           message: '你已完成该练习~',
           confirmButtonColor: 'var(--van-primary)',
           confirmButtonText: isLastIndex ? '完成' : '下一题',

+ 1 - 1
src/views/exercise-after-class/types.ts

@@ -2,5 +2,5 @@ export const featureType = {
     UNIT_TEST: '',
     PRACTICE: '练习',
     EVALUATION: '评测',
-    LESSON_TRAINING: '课后训练'
+    LESSON_TRAINING: '课后作业'
 }

+ 6 - 3
src/views/mine-orchestra/index.tsx

@@ -163,14 +163,17 @@ export default defineComponent({
               >
                 <Tab name="course" title="我的班级">
                   <div class={styles.content}>
-                    <MyClass orchestraName={modelData.orchestra?.name || ''} list={modelData.orchestra?.classGroupIdList || []} />
+                    <MyClass
+                      orchestraName={modelData.orchestra?.name || ''}
+                      list={modelData.orchestra?.classGroupIdList || []}
+                    />
                   </div>
                 </Tab>
-                <Tab name="photo" title="乐团相册">
+                {/* <Tab name="photo" title="乐团相册">
                   <div class={styles.content}>
                     <MyPhoto orchestraId={modelData.orchestra?.id || ''} />
                   </div>
-                </Tab>
+                </Tab> */}
                 <Tab name="deeds" title="乐团事迹">
                   <div class={styles.content}>
                     <OrchestraDeeds orchestraId={modelData.orchestra?.id || ''} />

+ 1 - 1
src/views/mine-orchestra/my-photo/index.tsx

@@ -81,7 +81,7 @@ export default defineComponent({
     return () => (
       <div
         class={[styles.phoneDetail, !data.list.length && 'emptyRootContainer']}
-        style={{ height: '100%', minHeight: 'auto' }}
+        // style={{ height: '100%', minHeight: 'auto' }}
       >
         {!data.loading && !!data.list.length && (
           <List

+ 2 - 2
src/views/unit-test/index.tsx

@@ -248,7 +248,7 @@ export default defineComponent({
                             <div class={styles.name}>{item.orchestraName}</div>
                             <div class={styles.endTime}>
                               截止时间:
-                              {dayjs(item.expiryDate || new Date()).format('YYYY-MM-DD HH:mm')}
+                              {dayjs(item.expiryDate || new Date()).format('YYYY-MM-DD')}
                             </div>
                           </div>
                           {item.status === 'A_PASS' || item.status === 'B_NO_PASS' ? (
@@ -304,7 +304,7 @@ export default defineComponent({
             </List>
           </OFullRefresh>
         ) : (
-          <OEmpty tips="暂无单元测验" />
+          <OEmpty tips="暂无阶段自测" />
         )}
 
         <ActionSheet

+ 6 - 2
src/views/unit-test/model/drag-question/index.module.less

@@ -85,18 +85,22 @@
     }
   }
 
+  .itemsContainer {
+    display: inline-block;
+    margin-right: 10px;
+    margin-bottom: 8px;
+  }
+
   .items,
   .imgs {
     min-width: 56px;
     height: 36px;
     font-size: 16px;
     font-weight: 500;
-    margin-right: 10px;
     border-radius: 4px;
     background: #ffebdd;
     color: #f67146;
     justify-content: center;
-    margin-bottom: 8px;
   }
 
   .imgs {

+ 41 - 48
src/views/unit-test/model/drag-question/index.tsx

@@ -1,5 +1,5 @@
 import { Tag, Image, Button } from 'vant'
-import { computed, defineComponent, nextTick, onMounted, PropType, reactive } from 'vue'
+import { computed, defineComponent, nextTick, onMounted, PropType, reactive, watch } from 'vue'
 import { AnswerType, labelOptions, QuestionType } from '../../unit'
 import Draggable from 'vuedraggable'
 import styles from './index.module.less'
@@ -61,7 +61,7 @@ export default defineComponent({
     })
 
     onMounted(() => {
-      initSortable()
+      // initSortable()
     })
 
     const initSortable = () => {
@@ -72,9 +72,6 @@ export default defineComponent({
           animation: 150,
           sort: true,
           fallbackTolerance: 3,
-          onAdd(ele: any, e: any) {
-            console.log(ele, e, 'add information')
-          },
           onUpdate: (evt: any) => {
             const updatePosition = (list: any) =>
               list.splice(evt.newIndex, 0, list.splice(evt.oldIndex, 1)[0])
@@ -90,7 +87,7 @@ export default defineComponent({
           }
         })
 
-        console.log(state.sortable)
+        // console.log(state.sortable)
       })
     }
 
@@ -100,7 +97,7 @@ export default defineComponent({
       const result: any = []
 
       list.forEach((item: any, index: number) => {
-        console.log(item, 'item')
+        // console.log(item, 'item')
         result.push({
           answerId: item.answerId,
           answer: item.answer,
@@ -108,7 +105,7 @@ export default defineComponent({
         })
       })
 
-      console.log('🚀 ~ onSelect ~ result', result)
+      // console.log('🚀 ~ onSelect ~ result', result)
       emit('update:value', result)
     }
 
@@ -117,7 +114,7 @@ export default defineComponent({
       // 判断是否已经选中了
       if (item.checked || props.readOnly) return
       const result: any = []
-      console.log(state.options, 'state.options')
+      // console.log(state.options, 'state.options')
       state.options.forEach((option: any, index: any) => {
         // console.log(option, '------')
         result.push({
@@ -139,7 +136,7 @@ export default defineComponent({
         answerExtra: state.list.length + 1
       })
 
-      console.log(state.list, '------', result, 'result lis4t')
+      // console.log(state.list, '------', result, 'result lis4t')
       emit('update:value', result)
 
       nextTick(() => {
@@ -150,7 +147,7 @@ export default defineComponent({
     const answers = computed(() => {
       const list: any = props.data.answers || []
       const value: any = props.value || []
-      console.log(value, 'answer')
+      // console.log(value, 'answer')
       list.forEach((item: any) => {
         const tempIndex = value.findIndex(
           (c: any) => c.answerId === item.examinationQuestionAnswerId
@@ -189,40 +186,26 @@ export default defineComponent({
             tempList.push(tmp)
           })
           state.options = tempList
-          console.log(state.options, 'after options')
-
-          // console.log(state.sortable.toArray())
-          // answers.forEach((item: any) => {
-          //   ids.push(item.itemIndex)
-          // })
-          // state.sortable.sort(
-          //   ids.sort((a: any, b: any) => a - b),
-          //   true
-          // )
-          // state.list = state.options
         }
       })
-      // else {
-      //   const resultValue: any = []
-      //   answers.forEach((answer: any) => {
-      //     const tmp = {
-      //       index: answer.examinationQuestionAnswerId, // 左边的值
-      //       leftValue: answer.questionAnswer, // 左边的值
-      //       rightValue: answer.questionExtra, // 右边的值
-      //       leftType: answer.questionAnswerTypeCode || 'TXT', // 左边类型
-      //       rightType: answer.questionExtraTypeCode || 'TXT' // 右边类型
-      //     }
-      //     resultValue.push({
-      //       answerId: answer.examinationQuestionAnswerId,
-      //       answer: answer.questionAnswer,
-      //       answerExtra: answer.questionExtra
-      //     })
-      //     state.options.push(tmp)
-      //   })
-      //   // 进页面就默认初始化答案
-      // }
     }
 
+    watch(
+      () => state.options,
+      () => {
+        const list = state.options || []
+        const result: any = []
+        list.forEach((item: any, index: number) => {
+          result.push({
+            answerId: item.index,
+            answer: item.leftValue,
+            answerExtra: index + 1
+          })
+        })
+        emit('update:value', result)
+      }
+    )
+
     onMounted(() => {
       initOptions()
     })
@@ -273,12 +256,13 @@ export default defineComponent({
                   state.options = []
                   state.list = []
                   onSelect()
+                  initOptions()
                 }}
               >
                 重置
               </Button>
             </div>
-            <div id={state.domId}>
+            {/* <div id={state.domId}>
               {state.options.length > 0 &&
                 state.options.map((item: any) => (
                   <>
@@ -297,15 +281,24 @@ export default defineComponent({
                     )}
                   </>
                 ))}
-            </div>
+            </div> */}
 
-            {/* <Draggable v-model:modelValue={state.options} itemKey="itemIndex" componentData={}>
+            <Draggable
+              v-model:modelValue={state.options}
+              itemKey="itemIndex"
+              // componentData={{
+              //   on: {
+              //     change: () => {
+              //       console.log('input')
+              //     }
+              //   }
+              // }}
+            >
               {{
                 item: (element: any) => {
-                  console.log(element)
                   const item = element.element
                   return (
-                    <>
+                    <div class={styles.itemsContainer}>
                       {item.leftType === AnswerType.TXT && (
                         <Tag class={[styles.items]} data-id={item.itemIndex}>
                           {item.leftValue}
@@ -319,11 +312,11 @@ export default defineComponent({
                           fit="cover"
                         />
                       )}
-                    </>
+                    </div>
                   )
                 }
               }}
-            </Draggable> */}
+            </Draggable>
           </div>
         </div>
         {props.showAnalysis && (

+ 1 - 1
src/views/unit-test/model/notice-start/index.tsx

@@ -63,7 +63,7 @@ export default defineComponent({
             </div>
 
             <p class={styles.rContent}>
-              1、单元测验仅可进行一次,请通过练习模式充分练习后再进行测试,以保障测验分数准确;
+              1、阶段自测仅可进行一次,请通过练习模式充分练习后再进行测试,以保障测验分数准确;
               <br />
               2、点击开始测验后开始测验计时,到达测验时长后自动完成;
               <br />

+ 7 - 7
src/views/unit-test/unit-create/uni-last.tsx

@@ -215,13 +215,13 @@ export default defineComponent({
               color={'#FF8057'}
               shrink
             >
-              <Tab name="one" title="I类学生">
+              <Tab name="one" title="单团学生">
                 <NewspaperItem item={datas.uniDetail[1]}></NewspaperItem>
               </Tab>
-              <Tab name="two" title="II类学生">
+              <Tab name="two" title="双团学生">
                 <NewspaperItem item={datas.uniDetail[2]}></NewspaperItem>
               </Tab>
-              <Tab name="three" title="III类学生">
+              <Tab name="three" title="多团学生">
                 <NewspaperItem item={datas.uniDetail[3]}></NewspaperItem>
               </Tab>
             </Tabs>
@@ -248,12 +248,12 @@ export default defineComponent({
               default: () => (
                 <div class={styles.DialogConent}>
                   <p>
-                    根据学生入团的批次对不同训练阶段的学生进行分类,不同训练阶段的学生可布置不同标准的课后训练和单元测验内容。
+                    根据学生入团的批次对不同训练阶段的学生进行分类,不同训练阶段的学生可布置不同标准的课后作业和阶段自测内容。
                   </p>
                   <br />
-                  <p>&nbsp;&nbsp;&nbsp;I类学生:最新进入本乐团的学员</p>
-                  <p>&nbsp;II 类学生:较早进入本乐团的学员</p>
-                  <p>III 类学生:最早进入本乐团的学员</p>
+                  <p>单团学生:最新进入本乐团的学员</p>
+                  <p>双团学生:较早进入本乐团的学员</p>
+                  <p>多团学生:最早进入本乐团的学员</p>
                 </div>
               )
             }}

+ 1 - 1
src/views/unit-test/unit-list/index.tsx

@@ -163,7 +163,7 @@ export default defineComponent({
             </List>
           </OFullRefresh>
         ) : (
-          <OEmpty tips="暂无单元测验" />
+          <OEmpty tips="暂无阶段自测" />
         )}
 
         <ActionSheet

+ 7 - 13
src/views/unit-test/unit-list/unitDetail.tsx

@@ -88,13 +88,13 @@ export default defineComponent({
             color={'#FF8057'}
             shrink
           >
-            <Tab name={1} title="I类学生">
+            <Tab name={1} title="单团学生">
               <UnitStudentList type={1}></UnitStudentList>
             </Tab>
-            <Tab name={2} title="II类学生">
+            <Tab name={2} title="双团学生">
               <UnitStudentList type={2}></UnitStudentList>
             </Tab>
-            <Tab name={3} title="III类学生">
+            <Tab name={3} title="多团学生">
               <UnitStudentList type={3}></UnitStudentList>
             </Tab>
           </Tabs>
@@ -137,18 +137,12 @@ export default defineComponent({
             default: () => (
               <div class={styles.DialogConent}>
                 <p>
-                  根据学生入团的批次对不同训练阶段的学生进行分类,不同训练阶段的学生可布置不同标准的课后训练和单元测验内容。
+                  根据学生入团的批次对不同训练阶段的学生进行分类,不同训练阶段的学生可布置不同标准的课后作业和阶段自测内容。
                 </p>
                 <br />
-                <p>
-                  <span>I类学生:</span>最新进入本乐团的学员
-                </p>
-                <p>
-                  <span>II类学生:</span>较早进入本乐团的学员
-                </p>
-                <p>
-                  <span>III类学生:</span>最早进入本乐团的学员
-                </p>
+                <p>单团学生:最新进入本乐团的学员</p>
+                <p>双团学生:较早进入本乐团的学员</p>
+                <p>多团学生:最早进入本乐团的学员</p>
               </div>
             )
           }}

Some files were not shown because too many files changed in this diff