lex %!s(int64=2) %!d(string=hai) anos
pai
achega
b6d21f7449

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/assets/companion-teacher-register-legacy.37a5770b.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/assets/index-legacy.2ae28dc5.js


+ 3 - 3
dist/assets/index-legacy.bd959491.js

@@ -433,7 +433,7 @@
                                 b(
                                 b(
                                   c,
                                   c,
                                   {
                                   {
-                                    placeholder: '请输入伴学老师姓名',
+                                    placeholder: '请输入伴学指导姓名',
                                     inputBackground: 'white',
                                     inputBackground: 'white',
                                     background: '#f6f8f9',
                                     background: '#f6f8f9',
                                     onSearch: function (e) {
                                     onSearch: function (e) {
@@ -593,7 +593,7 @@
                             )
                             )
                           : b(
                           : b(
                               x,
                               x,
-                              { btnStatus: !1, classImgSize: 'SMALL', tips: '暂无伴学老师' },
+                              { btnStatus: !1, classImgSize: 'SMALL', tips: '暂无伴学指导' },
                               null
                               null
                             ),
                             ),
                         b(
                         b(
@@ -615,7 +615,7 @@
                                     b('div', { class: A.codeContent }, [
                                     b('div', { class: A.codeContent }, [
                                       b('h2', { class: A.codeTitle }, [g.schoolName]),
                                       b('h2', { class: A.codeTitle }, [g.schoolName]),
                                       b('div', { class: A.codeName }, [
                                       b('div', { class: A.codeName }, [
-                                        v('邀请您成为乐团伴学老师')
+                                        v('邀请您成为乐团伴学指导')
                                       ]),
                                       ]),
                                       b('div', { class: A.codeQr }, [
                                       b('div', { class: A.codeQr }, [
                                         b(o, { text: g.url, size: '100%' }, null)
                                         b(o, { text: g.url, size: '100%' }, null)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/assets/manage-teacher-register-legacy.d7ea16ea.js


+ 2 - 2
dist/assets/unbind-legacy.ff30fb4d.js

@@ -330,7 +330,7 @@
                                   }
                                   }
                                 }
                                 }
                           )
                           )
-                        : o(l, { btnStatus: !1, classImgSize: 'SMALL', tips: '暂无伴学老师' }, null)
+                        : o(l, { btnStatus: !1, classImgSize: 'SMALL', tips: '暂无伴学指导' }, null)
                     ])
                     ])
                   }
                   }
                 )
                 )
@@ -448,7 +448,7 @@
                       return o(u, null, [
                       return o(u, null, [
                         o(n, null, null),
                         o(n, null, null),
                         o('div', { class: O.unbindTips }, [
                         o('div', { class: O.unbindTips }, [
-                          p('该伴学老师存在以下班级及课程未开始,请选择交接老师')
+                          p('该伴学指导存在以下班级及课程未开始,请选择交接老师')
                         ]),
                         ]),
                         o(
                         o(
                           x,
                           x,

+ 3 - 3
dist/project/companionTeacher.html

@@ -19,7 +19,7 @@
   <meta name="description" content="">
   <meta name="description" content="">
 
 
   <link rel="icon" href="../favicon.ico">
   <link rel="icon" href="../favicon.ico">
-  <title>乐团伴学老师注册</title>
+  <title>乐团伴学指导注册</title>
   <!-- 引入样式文件 -->
   <!-- 引入样式文件 -->
   <link rel="stylesheet" href="./js/vant-index.css" />
   <link rel="stylesheet" href="./js/vant-index.css" />
   <link rel="stylesheet" href="./css/companionTeacher.css">
   <link rel="stylesheet" href="./css/companionTeacher.css">
@@ -116,7 +116,7 @@
 
 
       <div class="protocol">
       <div class="protocol">
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px" checked-color="#FF8057"></van-checkbox>
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px" checked-color="#FF8057"></van-checkbox>
-        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学老师注册协议》</span>
+        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学指导注册协议》</span>
       </div>
       </div>
 
 
       <van-button size="large" block round class="btn-submit" color="#FF8057" :loading="btnLoading"
       <van-button size="large" block round class="btn-submit" color="#FF8057" :loading="btnLoading"
@@ -138,7 +138,7 @@
         <img src="./images/manageTeacher/top-banner1.png" class="submit-img" />
         <img src="./images/manageTeacher/top-banner1.png" class="submit-img" />
         <div class="submit-container">
         <div class="submit-container">
           <p class="submit-title">恭喜您已成功登记为</p>
           <p class="submit-title">恭喜您已成功登记为</p>
-          <p class="submit-o">{{ decodeURI(name) }} <span>【伴学老师】</span></p>
+          <p class="submit-o">{{ decodeURI(name) }} <span>【伴学指导】</span></p>
           <p class="submit-tips">请下载管乐团管理端APP进行授课</p>
           <p class="submit-tips">请下载管乐团管理端APP进行授课</p>
           <van-button type="primary" color="#FF8057" block round @click="submitStatus = false">立即下载</van-button>
           <van-button type="primary" color="#FF8057" block round @click="submitStatus = false">立即下载</van-button>
         </div>
         </div>

+ 1 - 1
dist/project/manageTeacher.html

@@ -87,7 +87,7 @@
 
 
       <div class="protocol">
       <div class="protocol">
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px"></van-checkbox>
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px"></van-checkbox>
-        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学老师注册协议》</span>
+        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学指导注册协议》</span>
       </div>
       </div>
 
 
       <van-button size="large" block round class="btn-submit" color="#64A9FF" :loading="btnLoading"
       <van-button size="large" block round class="btn-submit" color="#64A9FF" :loading="btnLoading"

+ 3 - 3
public/project/companionTeacher.html

@@ -19,7 +19,7 @@
   <meta name="description" content="">
   <meta name="description" content="">
 
 
   <link rel="icon" href="../favicon.ico">
   <link rel="icon" href="../favicon.ico">
-  <title>乐团伴学老师注册</title>
+  <title>乐团伴学指导注册</title>
   <!-- 引入样式文件 -->
   <!-- 引入样式文件 -->
   <link rel="stylesheet" href="./js/vant-index.css" />
   <link rel="stylesheet" href="./js/vant-index.css" />
   <link rel="stylesheet" href="./css/companionTeacher.css">
   <link rel="stylesheet" href="./css/companionTeacher.css">
@@ -117,7 +117,7 @@
 
 
       <div class="protocol">
       <div class="protocol">
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px" checked-color="#FF8057"></van-checkbox>
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px" checked-color="#FF8057"></van-checkbox>
-        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学老师注册协议》</span>
+        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学指导注册协议》</span>
       </div>
       </div>
 
 
       <van-button size="large" block round class="btn-submit" color="#FF8057" :loading="btnLoading"
       <van-button size="large" block round class="btn-submit" color="#FF8057" :loading="btnLoading"
@@ -139,7 +139,7 @@
         <img src="./images/manageTeacher/top-banner1.png" class="submit-img" />
         <img src="./images/manageTeacher/top-banner1.png" class="submit-img" />
         <div class="submit-container">
         <div class="submit-container">
           <p class="submit-title">恭喜您已成功登记为</p>
           <p class="submit-title">恭喜您已成功登记为</p>
-          <p class="submit-o">{{ decodeURI(name) }} <span>【伴学老师】</span></p>
+          <p class="submit-o">{{ decodeURI(name) }} <span>【伴学指导】</span></p>
           <p class="submit-tips">请下载管乐团老师端APP进行授课</p>
           <p class="submit-tips">请下载管乐团老师端APP进行授课</p>
           <van-button type="primary" color="#FF8057" block round @click="submitStatus = false">立即下载</van-button>
           <van-button type="primary" color="#FF8057" block round @click="submitStatus = false">立即下载</van-button>
         </div>
         </div>

+ 1 - 1
public/project/manageTeacher.html

@@ -88,7 +88,7 @@
 
 
       <div class="protocol">
       <div class="protocol">
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px"></van-checkbox>
         <van-checkbox v-model="checked" icon-size="16" style="margin-right: 6px"></van-checkbox>
-        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学老师注册协议》</span>
+        <span @click="() => { checked = !checked }">请认真阅读并勾选</span><span class="c">《乐团伴学指导注册协议》</span>
       </div>
       </div>
 
 
       <van-button size="large" block round class="btn-submit" color="#64A9FF" :loading="btnLoading"
       <van-button size="large" block round class="btn-submit" color="#64A9FF" :loading="btnLoading"

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

@@ -13,7 +13,7 @@ const noLoginRouter = [
     name: 'companion-teacher-register',
     name: 'companion-teacher-register',
     component: () => import('@/school/companion-teacher/companion-teacher-register'),
     component: () => import('@/school/companion-teacher/companion-teacher-register'),
     meta: {
     meta: {
-      title: '乐团伴学老师注册'
+      title: '乐团伴学指导注册'
     }
     }
   },
   },
   {
   {
@@ -114,7 +114,7 @@ export default [
         name: 'companion-teacher',
         name: 'companion-teacher',
         component: () => import('@/school/companion-teacher/index'),
         component: () => import('@/school/companion-teacher/index'),
         meta: {
         meta: {
-          title: '伴学老师'
+          title: '伴学指导'
         }
         }
       },
       },
       {
       {
@@ -122,7 +122,7 @@ export default [
         name: 'companion-teacher-detail',
         name: 'companion-teacher-detail',
         component: () => import('@/school/companion-teacher/companion-detail'),
         component: () => import('@/school/companion-teacher/companion-detail'),
         meta: {
         meta: {
-          title: '伴学老师详情'
+          title: '伴学指导详情'
         }
         }
       },
       },
       {
       {

+ 2 - 2
src/school/companion-teacher/companion-teacher-register.tsx

@@ -491,7 +491,7 @@ export default defineComponent({
               请认真阅读并勾选
               请认真阅读并勾选
             </span>
             </span>
             <span class={styles.c} onClick={onPreview}>
             <span class={styles.c} onClick={onPreview}>
-              《乐团伴学老师注册协议》
+              《乐团伴学指导注册协议》
             </span>
             </span>
           </div>
           </div>
 
 
@@ -556,7 +556,7 @@ export default defineComponent({
               <p class={styles['submit-title']}>恭喜您已成功登记为</p>
               <p class={styles['submit-title']}>恭喜您已成功登记为</p>
               <p class={styles['submit-o']}>
               <p class={styles['submit-o']}>
                 {state.name} <br />
                 {state.name} <br />
-                <span>【伴学老师】</span>
+                <span>【伴学指导】</span>
               </p>
               </p>
               <p class={styles['submit-tips']}>请下载管乐团老师端APP进行授课</p>
               <p class={styles['submit-tips']}>请下载管乐团老师端APP进行授课</p>
               <Button
               <Button

+ 1 - 1
src/school/companion-teacher/compontent/teacher.tsx

@@ -132,7 +132,7 @@ export default defineComponent({
             ))}
             ))}
           </List>
           </List>
         ) : (
         ) : (
-          <OEmpty btnStatus={false} tips="暂无伴学老师" />
+          <OEmpty btnStatus={false} tips="暂无伴学指导" />
         )}
         )}
       </>
       </>
     )
     )

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

@@ -281,7 +281,7 @@ export default defineComponent({
             }}
             }}
           </OHeader>
           </OHeader>
           <OSearch
           <OSearch
-            placeholder="请输入伴学老师姓名"
+            placeholder="请输入伴学指导姓名"
             inputBackground="white"
             inputBackground="white"
             background="#f6f8f9"
             background="#f6f8f9"
             onSearch={(val: any) => {
             onSearch={(val: any) => {
@@ -374,7 +374,7 @@ export default defineComponent({
             ))}
             ))}
           </List>
           </List>
         ) : (
         ) : (
-          <OEmpty btnStatus={false} tips="暂无伴学老师" />
+          <OEmpty btnStatus={false} tips="暂无伴学指导" />
         )}
         )}
 
 
         <Popup
         <Popup
@@ -386,7 +386,7 @@ export default defineComponent({
             <div class={styles.codeImg} id="preview-container">
             <div class={styles.codeImg} id="preview-container">
               <div class={styles.codeContent}>
               <div class={styles.codeContent}>
                 <h2 class={[styles.codeTitle, 'van-ellipsis']}>{form.schoolName}</h2>
                 <h2 class={[styles.codeTitle, 'van-ellipsis']}>{form.schoolName}</h2>
-                <div class={styles.codeName}>邀请您成为乐团伴学老师</div>
+                <div class={styles.codeName}>邀请您成为乐团伴学指导</div>
 
 
                 <div class={styles.codeQr}>
                 <div class={styles.codeQr}>
                   <OQrcode text={form.url} size={'100%'} />
                   <OQrcode text={form.url} size={'100%'} />

+ 1 - 1
src/school/companion-teacher/unbind.tsx

@@ -111,7 +111,7 @@ export default defineComponent({
       <>
       <>
         <OHeader />
         <OHeader />
 
 
-        <div class={styles.unbindTips}>该伴学老师存在以下班级及课程未开始,请选择交接老师</div>
+        <div class={styles.unbindTips}>该伴学指导存在以下班级及课程未开始,请选择交接老师</div>
 
 
         <CellGroup inset class={styles.detailCellGroup}>
         <CellGroup inset class={styles.detailCellGroup}>
           {state.classList.map((item: any) => (
           {state.classList.map((item: any) => (

+ 1 - 1
src/school/mass-message/select-sned.tsx

@@ -77,7 +77,7 @@ export default defineComponent({
           <Tab title="学员" name="student">
           <Tab title="学员" name="student">
             <StudentList height={state.height} v-model:selectItem={state.selectStudent} />
             <StudentList height={state.height} v-model:selectItem={state.selectStudent} />
           </Tab>
           </Tab>
-          <Tab title="伴学老师" name="teacher">
+          <Tab title="伴学指导" name="teacher">
             <TeacherList height={state.height} v-model:selectItem={state.selectTeacher} />
             <TeacherList height={state.height} v-model:selectItem={state.selectTeacher} />
           </Tab>
           </Tab>
           <Tab title="管理老师" name="manage">
           <Tab title="管理老师" name="manage">

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

@@ -330,7 +330,7 @@ export default defineComponent({
                         color="#F44541"
                         color="#F44541"
                         size="large"
                         size="large"
                         onClick={() => {
                         onClick={() => {
-                          state.conflictMessage = '伴学指导请假冲突'
+                          state.conflictMessage = '老师请假冲突'
                           state.conflictStatus = true
                           state.conflictStatus = true
                           state.choiceCourse = item
                           state.choiceCourse = item
                         }}
                         }}

+ 2 - 2
src/school/train-planning/create.ts

@@ -46,10 +46,10 @@ export const weekFormat = (val: any) => {
 
 
 const original = () => {
 const original = () => {
   return {
   return {
-    status: false, // 未设置伴学老师弹窗
+    status: false, // 未设置伴学指导弹窗
     weekStatus: false, // 时间
     weekStatus: false, // 时间
     calendarStatus: false, // 日期
     calendarStatus: false, // 日期
-    classStatus: false, // 班级设置伴学老师
+    classStatus: false, // 班级设置伴学指导
     timerStatus: false, // 时间状态
     timerStatus: false, // 时间状态
     skipHoliday: 1, // 是否节假日
     skipHoliday: 1, // 是否节假日
     week: null as any, // 周次
     week: null as any, // 周次

+ 2 - 2
src/school/train-planning/modal/class-list/index.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
       try {
       try {
         const tempList: any = []
         const tempList: any = []
         state.list.forEach((item: any) => {
         state.list.forEach((item: any) => {
-          // 判断是否已经设置过伴学老师
+          // 判断是否已经设置过伴学指导
           if (item.teacherId) {
           if (item.teacherId) {
             tempList.push({
             tempList.push({
               classGroupId: item.id,
               classGroupId: item.id,
@@ -75,7 +75,7 @@ export default defineComponent({
     })
     })
     return () => (
     return () => (
       <div class={styles.classList}>
       <div class={styles.classList}>
-        <OHeader title="指定伴学老师" desotry={false} />
+        <OHeader title="指定伴学指导" desotry={false} />
 
 
         {state.list.map((item: any) => (
         {state.list.map((item: any) => (
           <Cell
           <Cell

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

@@ -5,6 +5,7 @@
   // overflow: hidden;
   // overflow: hidden;
   border-radius: 10px;
   border-radius: 10px;
 }
 }
+
 .unitSubjectTitle {
 .unitSubjectTitle {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
@@ -17,9 +18,13 @@
     color: #777777;
     color: #777777;
   }
   }
 }
 }
+.unitTitleSection {
+  margin-top: 20px;
+  border-radius: 6px;
+  border: 1px solid #d5d5d5;
+  padding: 25px 5px;
+}
 .unitTitleImg {
 .unitTitleImg {
-  padding-top: 20px;
-  padding-bottom: 10px;
   width: 100%;
   width: 100%;
 }
 }
 
 

+ 18 - 10
src/views/unit-test/model/drag-question/index.tsx

@@ -38,18 +38,22 @@ export default defineComponent({
       options: [
       options: [
         {
         {
           index: 1,
           index: 1,
+          order: 1,
           value: 'Sol'
           value: 'Sol'
         },
         },
         {
         {
           index: 2,
           index: 2,
+          order: 2,
           value: 'Sal'
           value: 'Sal'
         },
         },
         {
         {
           index: 3,
           index: 3,
+          order: 3,
           value: 'La'
           value: 'La'
         },
         },
         {
         {
           index: 4,
           index: 4,
+          order: 4,
           value: 'Si'
           value: 'Si'
         }
         }
       ]
       ]
@@ -105,10 +109,12 @@ export default defineComponent({
           1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
           1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
           <Tag type="primary">排序题</Tag>
           <Tag type="primary">排序题</Tag>
         </div>
         </div>
-        <Image
-          class={styles.unitTitleImg}
-          src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png"
-        />
+        <div class={styles.unitTitleSection}>
+          <Image
+            class={styles.unitTitleImg}
+            src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png"
+          />
+        </div>
 
 
         <div class={[styles.unitAnswers, 'van-hairline--top']}>
         <div class={[styles.unitAnswers, 'van-hairline--top']}>
           <div class={styles.sortReset}>
           <div class={styles.sortReset}>
@@ -117,11 +123,11 @@ export default defineComponent({
               type="primary"
               type="primary"
               round
               round
               onClick={() => {
               onClick={() => {
-                console.log(11, state.sortable)
-                // state.list = state.list.sort((a: any, b: any) => a.index - b.index)
-                // console.log(c, '222')
-                // state.options = c
-                // console.log(state.options, state.list)
+                const order = state.sortable.toArray()
+                state.sortable.sort(
+                  order.sort((a: any, b: any) => a - b),
+                  true
+                )
               }}
               }}
             >
             >
               重置
               重置
@@ -129,7 +135,9 @@ export default defineComponent({
           </div>
           </div>
           <div id={state.domId}>
           <div id={state.domId}>
             {state.options.map((item: any) => (
             {state.options.map((item: any) => (
-              <Tag class={[styles.items]}>{item.value + item.index}</Tag>
+              <Tag class={[styles.items]} data-id={item.index}>
+                {item.value + item.index}
+              </Tag>
             ))}
             ))}
           </div>
           </div>
         </div>
         </div>

+ 76 - 0
src/views/unit-test/model/keep-look-question/index.module.less

@@ -0,0 +1,76 @@
+.unitSubject {
+  padding: 15px;
+  margin: 0 13px;
+  background-color: #fff;
+  // overflow: hidden;
+  border-radius: 10px;
+}
+
+.unitSubjectTitle {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+  font-size: 16px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 26px;
+  .unitScore {
+    color: #777777;
+  }
+}
+
+.unitTitleImg {
+  width: 100%;
+  padding-top: 20px;
+  padding-bottom: 10px;
+}
+
+.unitAnswers {
+  position: relative;
+  padding-bottom: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+
+  .leftSection,
+  .rightSection {
+    position: relative;
+    width: 95px;
+    z-index: 2;
+  }
+  .img {
+    width: 95px;
+  }
+  .unitItem {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: #ffffff;
+    border-radius: 6px;
+    border: 2px solid #d5d5d5;
+    overflow: hidden;
+    height: 54px;
+    width: 100%;
+    margin-bottom: 15px;
+    font-size: 16px;
+    font-weight: 500;
+    color: #333333;
+    line-height: 22px;
+  }
+
+  .active {
+    border: 2px solid #ff8057;
+    color: #f67146;
+  }
+}
+
+.canvasSection {
+  position: absolute;
+  background: #f9f9f9;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  width: 100%;
+  height: 100%;
+}

+ 189 - 0
src/views/unit-test/model/keep-look-question/index.tsx

@@ -0,0 +1,189 @@
+import { Tag, Image, Button } from 'vant'
+import { defineComponent, nextTick, onMounted, PropType, reactive } from 'vue'
+import { labelOptions } from '../../unit'
+import styles from './index.module.less'
+import Sortable from 'sortablejs'
+import deepClone from '@/helpers/deep-clone'
+import { useRect } from '@vant/use'
+
+// 单选和多选题
+export default defineComponent({
+  name: 'keep-look-question',
+  props: {
+    value: {
+      type: [String, Number, Array],
+      default: ''
+    },
+    type: {
+      type: String as PropType<'radio' | 'checkbox'>,
+      default: 'radio'
+    },
+    answers: {
+      type: Object,
+      default: {}
+    },
+    /* 只读 */
+    readOnly: {
+      type: Boolean,
+      default: true
+    }
+  },
+  emits: ['update:value'],
+  setup(props, { emit }) {
+    const state = reactive({
+      canvasDomId: 'canvas' + +new Date(),
+      sortable: null as any,
+      list: [] as any,
+      options: [
+        {
+          index: 1,
+          value: 'Sol',
+          left: false,
+          right: false,
+          locked: false // 是否已经连线
+        },
+        {
+          index: 2,
+          value: 'Sal',
+          left: false,
+          right: false,
+          locked: false
+        },
+        {
+          index: 3,
+          value: 'La',
+          left: false,
+          right: false,
+          locked: false
+        },
+        {
+          index: 4,
+          value: 'Si',
+          left: false,
+          right: false,
+          locked: false
+        }
+      ],
+      selectItem: [] as any
+    })
+
+    const onLeftClick = (e: any, item: any) => {
+      const obj = useRect(e.target)
+      console.log(e, obj)
+      state.options.forEach((item: any) => {
+        item.left = false
+      })
+      item.left = !item.left
+
+      // 为true时添加定位
+      if (item.left) {
+        state.selectItem[0] = obj
+      }
+    }
+
+    const onRightClick = (e: any, item: any) => {
+      const obj = useRect(e.target)
+      console.log(e, obj)
+      state.options.forEach((item: any) => {
+        item.right = false
+      })
+      item.right = !item.right
+
+      // 为true时添加定位
+      if (item.right) {
+        state.selectItem[1] = obj
+
+        if (state.selectItem.length >= 2) {
+          drawLine()
+        }
+      }
+    }
+
+    const drawLine = () => {
+      const canvas: any = document.getElementById(state.canvasDomId)
+      const canvasPostion = useRect(canvas)
+      console.log(canvasPostion, 'canvasPostion')
+
+      const firstPostion = state.selectItem[0]
+      const secondPostion = state.selectItem[1]
+
+      const startPoint = {
+        x: firstPostion.width,
+        y: firstPostion.top + firstPostion.height / 2 - canvasPostion.top
+      }
+
+      const endPoint = {
+        x: secondPostion.left - canvasPostion.left,
+        y: secondPostion.top + secondPostion.height / 2 - canvasPostion.top
+      }
+
+      const ctx = canvas.getContext('2d')
+      console.log(startPoint, endPoint, ctx)
+
+      ctx.beginPath()
+      ctx.moveTo(startPoint.x, startPoint.y)
+      ctx.lineTo(endPoint.x, endPoint.y)
+      ctx.lineWidth = 1
+      ctx.strokeStyle = '#FF8057'
+      ctx.stroke()
+    }
+
+    // const onSelect = (item: any) => {
+    //   if (props.type === 'checkbox') {
+    //     // 判断是否已选过
+    //     const value: any = props.value
+    //     if (value.includes(item.index)) {
+    //       const index = value.findIndex((v: any) => v === item.index)
+    //       value.splice(index, 1)
+    //       emit('update:value', [...value])
+    //     } else {
+    //       emit('update:value', [item.index, ...value])
+    //     }
+    //   } else {
+    //     emit('update:value', item.index)
+    //   }
+    // }
+
+    return () => (
+      <div class={styles.unitSubject}>
+        <div class={styles.unitSubjectTitle}>
+          1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
+          <Tag type="primary">连连看</Tag>
+        </div>
+
+        <Image
+          class={styles.unitTitleImg}
+          src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png"
+        />
+
+        <div class={[styles.unitAnswers]}>
+          <div class={styles.leftSection}>
+            {state.options.map((item: any) => (
+              <div
+                class={[styles.unitItem, item.left && styles.active]}
+                onClick={(e: any) => onLeftClick(e, item)}
+              >
+                <Image
+                  src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png"
+                  class={styles.img}
+                />
+              </div>
+            ))}
+          </div>
+          <div class={styles.rightSection}>
+            {state.options.map((item: any) => (
+              <div
+                class={[styles.unitItem, item.right && styles.active]}
+                onClick={(e: any) => onRightClick(e, item)}
+              >
+                Re{item.index}
+              </div>
+            ))}
+          </div>
+
+          <canvas id={state.canvasDomId} class={styles.canvasSection}></canvas>
+        </div>
+      </div>
+    )
+  }
+})

+ 10 - 8
src/views/unit-test/unit-detail/index.tsx

@@ -10,7 +10,7 @@ import {
   SwipeItem,
   SwipeItem,
   Tag
   Tag
 } from 'vant'
 } from 'vant'
-import { defineComponent, reactive, ref } from 'vue'
+import { defineComponent, onMounted, reactive, ref } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import { useRoute, useRouter } from 'vue-router'
 import NoticeStart from '../model/notice-start'
 import NoticeStart from '../model/notice-start'
 import styles from './index.module.less'
 import styles from './index.module.less'
@@ -22,6 +22,7 @@ import ChoiceQuestion from '../model/choice-question'
 import AnswerList from '../model/answer-list'
 import AnswerList from '../model/answer-list'
 import ODialog from '@/components/o-dialog'
 import ODialog from '@/components/o-dialog'
 import DragQuestion from '../model/drag-question'
 import DragQuestion from '../model/drag-question'
+import KeepLookQuestion from '../model/keep-look-question'
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'unit-detail',
   name: 'unit-detail',
@@ -34,7 +35,7 @@ export default defineComponent({
       visiableNotice: false,
       visiableNotice: false,
       visiableAnswer: false,
       visiableAnswer: false,
       currentIndex: 0,
       currentIndex: 0,
-      questionList: [1, 2, 3, 4, 5],
+      questionList: [5],
       answerList: {},
       answerList: {},
       time: 30 * 60 * 1000,
       time: 30 * 60 * 1000,
       visiableSure: false,
       visiableSure: false,
@@ -78,12 +79,16 @@ export default defineComponent({
           duration={300}
           duration={300}
           touchable={false}
           touchable={false}
           lazyRender
           lazyRender
-          initialSwipe={state.currentIndex}
+          // initialSwipe={state.currentIndex}
+          onChange={(index: number) => {
+            state.currentIndex = index
+          }}
         >
         >
           {state.questionList.map((item: any) => (
           {state.questionList.map((item: any) => (
             <SwipeItem>
             <SwipeItem>
               {/* <ChoiceQuestion v-model:value={state.answerList[item]} type="checkbox" /> */}
               {/* <ChoiceQuestion v-model:value={state.answerList[item]} type="checkbox" /> */}
-              <DragQuestion />
+              {/* <DragQuestion /> */}
+              <KeepLookQuestion />
             </SwipeItem>
             </SwipeItem>
           ))}
           ))}
         </Swipe>
         </Swipe>
@@ -97,7 +102,6 @@ export default defineComponent({
                 type="primary"
                 type="primary"
                 plain
                 plain
                 onClick={() => {
                 onClick={() => {
-                  state.currentIndex -= 1
                   swipeRef.value?.prev()
                   swipeRef.value?.prev()
                 }}
                 }}
               >
               >
@@ -109,13 +113,11 @@ export default defineComponent({
               round
               round
               type="primary"
               type="primary"
               onClick={() => {
               onClick={() => {
-                if (state.questionList.length === state.currentIndex + 1) {
+                if (state.questionList.length - 1 === state.currentIndex) {
                   state.visiableSure = true
                   state.visiableSure = true
                 } else {
                 } else {
-                  state.currentIndex += 1
                   swipeRef.value?.next()
                   swipeRef.value?.next()
                 }
                 }
-                console.log(state.currentIndex)
               }}
               }}
             >
             >
               {state.questionList.length === state.currentIndex + 1 ? '测试完成' : '下一题'}
               {state.questionList.length === state.currentIndex + 1 ? '测试完成' : '下一题'}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio