فهرست منبع

对话文章角色相关问题

natasha 3 ماه پیش
والد
کامیت
465fa3a38c

BIN
src/assets/simple1.png


BIN
src/assets/simple2.png


BIN
src/assets/simple3.png


BIN
src/assets/simple4.png


BIN
src/assets/simple5.png


BIN
src/assets/simple6.png


BIN
src/assets/simple7.png


BIN
src/assets/simple8.png


+ 1 - 0
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -810,6 +810,7 @@ export default {
   height: 40px;
   min-height: 40px;
   margin-right: 8px;
+  overflow: hidden;
   font-size: 12px;
   color: #fff;
   border-radius: 50%;

+ 6 - 5
src/views/book/courseware/create/components/question/dialogue_article/ArticleSetting.vue

@@ -151,12 +151,13 @@ export default {
       let UserCode = '';
       let UserType = '';
       if (userInfor) {
-        let user = getToken();
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
+        let token = getToken();
+        UserCode = token?.gcls_sys_session_info?.user_id ?? '';
+        UserType = token?.gcls_sys_session_info?.user_type ?? '';
+        SessionID = token?.gcls_sys_session_info?.session_id ?? '';
       }
-      return `${process.env.VUE_APP_BASE_API}/GCLSFileServer/WebFileUpload?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&SecurityLevel=Mid`;
+
+      return `${process.env.VUE_APP_EEP}/FileServer/WebFileUpload?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&SecurityLevel=Mid`;
     },
   },
   methods: {

+ 6 - 2
src/views/book/courseware/preview/components/dialogue_article/NormalModelChs.vue

@@ -57,12 +57,16 @@
           :key="'detail' + index"
         >
           <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
-            <RoleChs :curRole="item.roleDetail" :type="1" />
+            <RoleChs :curRole="item.roleDetail" :type="curQue.property.role_img_type" />
             <div class="wordsList-box">
               <img :src="articleImg[index]" v-if="articleImg[0] && index == 0" />
-              <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
+              <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
                 <span class="pinyin">{{ item.roleDetail.detail.wordsList | handlePinyin }}</span>
                 <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
+              </div> -->
+              <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
+                <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
+                <span class="chs">{{ item.roleDetail.fullName }}</span>
               </div>
               <div
                 class="para-con"

+ 6 - 2
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -46,12 +46,16 @@
           :key="'detail' + index"
         >
           <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
-            <RoleChs :curRole="item.roleDetail" :type="1" />
+            <RoleChs :curRole="item.roleDetail" :type="curQue.property.role_img_type" />
             <div class="wordsList-box">
               <img :src="articleImg[index]" v-if="articleImg[0] && index == 0" />
-              <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
+              <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
                 <span class="pinyin">{{ item.roleDetail.detail.wordsList | handlePinyin }}</span>
                 <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
+              </div> -->
+              <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
+                <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
+                <span class="chs">{{ item.roleDetail.fullName }}</span>
               </div>
               <div class="para-con" :style="{ background: item.roleDetail.color.bg }">
                 <div

+ 30 - 2
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -72,13 +72,13 @@
                     ? 'rgba(0,0,0,0.85)'
                     : 'rgba(0,0,0,0.45)'
                 "
-                :type="1"
+                :type="curQue.property.role_img_type"
               />
             </template>
             <div v-else style="width: 36px; height: 36px"></div>
             <div class="sentence-box">
               <template v-if="item.sentArr[0].sentIndex == 0">
-                <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
+                <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
                   <span
                     :class="[
                       'pinyin',
@@ -105,6 +105,34 @@
                     ]"
                     >{{ item.roleDetail.detail.wordsList | handleChs }}</span
                   >
+                </div> -->
+                <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
+                  <span
+                    :class="[
+                      'pinyin',
+                      (curQue.wordTime &&
+                        curQue.wordTime[index] &&
+                        curTime >= curQue.wordTime[index].bg &&
+                        curTime <= curQue.wordTime[index].ed) ||
+                      sentIndex == index
+                        ? 'color85'
+                        : 'color45',
+                    ]"
+                    >{{ item.roleDetail.fullPinyin }}</span
+                  >
+                  <span
+                    :class="[
+                      'chs',
+                      (curQue.wordTime &&
+                        curQue.wordTime[index] &&
+                        curTime >= curQue.wordTime[index].bg &&
+                        curTime <= curQue.wordTime[index].ed) ||
+                      sentIndex == index
+                        ? 'color85'
+                        : 'color45',
+                    ]"
+                    >{{ item.roleDetail.fullName }}</span
+                  >
                 </div>
               </template>
               <div class="sentence-box-inner" :style="{ background: item.roleDetail.color.bg }">

+ 15 - 13
src/views/book/courseware/preview/components/dialogue_article/RoleChs.vue

@@ -1,22 +1,22 @@
 <template>
   <div v-if="curRole" class="role-rItem">
-    <span v-if="curRole.color" class="adult-book-input-roleText" :style="{ background: curRole.color }">{{
-      curRole.name
-    }}</span>
     <img
-      v-else-if="curRole.img_list.length > 0"
-      :src="curRole.img_list[0] && curRole.img_list[0].id"
+      v-if="type === 'upload'"
+      :src="curRole.img_list[0] && curRole.img_list[0].file_url"
       class="adult-book-input-roleImg"
     />
-    <div
-      v-else-if="curRole.simpleHead !== ''"
+    <img
+      v-else-if="type === 'simple' && curRole.simpleHead !== ''"
       class="adult-book-input-roleImg"
-      :class="['adult-book-input-roleImg' + curRole.simpleHead]"
-    ></div>
-    <template v-if="type != 1 && curRole.detail.wordsList.length > 0">
-      <span class="pinyin" :style="{ color: wordColor }">{{ curRole.detail.wordsList | handlePinyin }}</span>
-      <span class="chs" :style="{ color: wordColor }">{{ curRole.detail.wordsList | handleChs }}</span>
-    </template>
+      :src="require('@/assets/simple' + curRole.simpleHead + '.png')"
+    />
+    <span v-else class="adult-book-input-roleText" :style="{ background: curRole.color }">{{
+      curRole.fullName || curRole.name
+    }}</span>
+    <!-- <template>
+      <span class="pinyin" :style="{ color: wordColor }">{{ curRole.fullName }}</span>
+      <span class="chs" :style="{ color: wordColor }">{{ curRole.fullPinyin }}</span>
+    </template> -->
   </div>
 </template>
 
@@ -101,6 +101,8 @@ export default {
     &-roleImg {
       width: 36px;
       height: 36px;
+      overflow: hidden;
+      border-radius: 50%;
     }
   }
 

+ 6 - 2
src/views/book/courseware/preview/components/dialogue_article/WordModelChs.vue

@@ -44,12 +44,16 @@
           :key="'detail' + index"
         >
           <div class="article-content">
-            <RoleChs :curRole="item.roleDetail" :type="1" />
+            <RoleChs :curRole="item.roleDetail" :type="curQue.property.role_img_type" />
             <div class="wordsList-box">
               <img :src="articleImg[index]" v-if="articleImg[0] && index == 0" />
-              <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
+              <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
                 <span class="pinyin">{{ item.roleDetail.detail.wordsList | handlePinyin }}</span>
                 <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
+              </div> -->
+              <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
+                <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
+                <span class="chs">{{ item.roleDetail.fullName }}</span>
               </div>
               <div class="para-con" :style="{ background: item.roleDetail.color.bg }">
                 <div