Просмотр исходного кода

Merge branch 'beta' of https://git.cocorobo.cn/jack/PPT into beta

jack 1 день назад
Родитель
Сommit
854d564a8a

+ 31 - 31
src/views/Student/components/choiceQuestionDetailDialog.vue

@@ -17,10 +17,10 @@
           }}</div>
           <div class="c_t45_msg">
             <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
-                v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.unsubmittedStudents.length
+                v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.workArray.length + props.showData.unsubmittedStudents.length
                 }}</span></div>
             <span v-if="props.showData.unsubmittedStudents.length > 0" @click="viewUnsubmittedStudents()">{{
-              lang.ssViewUnsubmittedStudents }}</span>
+              lang.ssViewSubmitStatus2 }}</span>
           </div>
           <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
           <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex >= props.showData.choiceQuestionListData.length - 1}" @click="changeWorkIndex(1)">{{ lang.ssNextQ }}</span>-->
@@ -869,7 +869,7 @@ watch(
 
 // 查看未提交学生
 const viewUnsubmittedStudents = () => {
-  selectUserDialogRef.value.open(lang.ssUnsubmittedStudents, { user: props.showData.unsubmittedStudents.map((item: any) => item.name) })
+  selectUserDialogRef.value.open(lang.ssSubmitStatus, { user: props.showData.unsubmittedStudents.map((item: any) => item.name),notFiledUser:props.showData.unsubmittedStudents.map((item: any) => item.name),isSubmitUser: props.workArray.map((item: any) => item.name)})
   // if (props.unsubmittedStudents.length > 0) {
   // unsubmittedStudentsDialogRef.value.open(props.unsubmittedStudents)
   // }
@@ -910,7 +910,7 @@ const aiAnalysisRefresh45 = () => {
 
   if (!currentAnalysis.value) {
     aiAnalysisData.value.push({
-      pid: props.workId,
+      pid: props.workId+(props.cid?','+props.cid:''),
       index: props.showData.workIndex,
       loading: true,
       generatingContent: true,
@@ -922,32 +922,32 @@ const aiAnalysisRefresh45 = () => {
   }
   else {
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).loading = true
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).json = { text: '', echartsData: '' }
   }
 
   chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
     if (event.type === 'message') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
 
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).loading = false
     }
     else if (event.type === 'messageEnd') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).noEnd = false
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
       saveAnalysis()
     }
@@ -989,7 +989,7 @@ const aiAnalysisRefresh15 = () => {
 30人中15人提交问答题(参与率50%),核心概念“同理心地图”掌握薄弱。发现学生13在智能体对话中6次答“不知道”,需单独辅导设计思维基础概念。建议课程增加POV框架实例演练,强化痛点识别能力训练。`
   if (!currentAnalysis.value) {
     aiAnalysisData.value.push({
-      pid: props.workId,
+      pid: props.workId+(props.cid?','+props.cid:''),
       index: props.showData.workIndex,
       loading: true,
       generatingContent: true,
@@ -1001,19 +1001,19 @@ const aiAnalysisRefresh15 = () => {
   }
   else {
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).loading = true
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).json = { text: '', echartsData: '' }
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).generatingContent = true
   }
   getWordCloud15().then((res) => {
     flag += 1
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).generatingContent = false
     if (flag == 2) {
       saveAnalysis()
@@ -1023,22 +1023,22 @@ const aiAnalysisRefresh15 = () => {
     console.log(event)
     if (event.type === 'message') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
 
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).loading = false
     }
     else if (event.type === 'messageEnd') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).noEnd = false
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
       flag += 1
       if (flag == 2) {
@@ -1090,7 +1090,7 @@ const getWordCloud15 = () => {
 
     chat_no_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang).promise.then((res) => {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.echartsData = JSON.parse(res)
       resolve(1)
     }).catch(err => {
@@ -1151,7 +1151,7 @@ ${a.content}\n`
   console.log("cs", msg)
   if (!currentAnalysis.value) {
     aiAnalysisData.value.push({
-      pid: props.workId,
+      pid: props.workId+(props.cid?','+props.cid:''),
       index: props.showData.workIndex,
       loading: true,
       json: { text: '', echartsData: '' },
@@ -1162,32 +1162,32 @@ ${a.content}\n`
   }
   else {
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).loading = true
     aiAnalysisData.value.find((item: any) => {
-      return item.pid === props.workId && item.index === props.showData.workIndex
+      return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
     }).json = { text: '', echartsData: '' }
   }
 
   chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
     if (event.type === 'message') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
 
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).loading = false
     }
     else if (event.type === 'messageEnd') {
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).json.text = event.data
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).noEnd = false
       aiAnalysisData.value.find((item: any) => {
-        return item.pid === props.workId && item.index === props.showData.workIndex
+        return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
       }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
       saveAnalysis()
     }
@@ -1200,7 +1200,7 @@ ${a.content}\n`
 // 当前分析
 const currentAnalysis = computed(() => {
   let _result = aiAnalysisData.value.find((item: any) => {
-    return item.pid === props.workId && item.index === props.showData.workIndex
+    return item.pid === props.workId+(props.cid?','+props.cid:'') && item.index === props.showData.workIndex
   })
 
   if (_result?.json?.echartsData) {

+ 24 - 1
src/views/Student/components/selectUserDialog.vue

@@ -5,7 +5,16 @@
       <div class="close" @click="close()"><svg  viewBox="0 0 1024 1024" width="200" height="200"><path d="M999.819275 905.894092c26.805506 27.003004 26.78811 70.77902-0.051166 97.756441-13.398148 13.484106-30.970362 20.234857-48.534389 20.234857-17.58961 0-35.171034-6.758937-48.577369-20.277836L511.657192 609.698113 120.30704 1003.263723c-13.407358 13.475919-30.970362 20.217461-48.53439 20.217461-17.58961 0-35.17922-6.758937-48.585555-20.269649-26.813692-27.003004-26.78811-70.77902 0.042979-97.764628l391.33378-393.557424L23.572882 117.989251c-26.813692-27.012214-26.796296-70.780043 0.034792-97.764627 26.839275-26.985608 70.332858-26.960025 97.137341 0.042979l390.989949 393.909441L903.07693 20.61962c26.831089-26.977421 70.315462-26.960025 97.129154 0.042979 26.813692 27.01119 26.78811 70.770833-0.042979 97.764627L608.812953 511.98465l391.006322 393.909442z"></path></svg></div>
     </div>
     <div class="content">
-      <div v-for="(item, index) in data.user" :key="index">
+      <div v-for="(item, index) in data.user" :key="index" v-if="!(data.notFiledUser && data.notFiledUser)">
+        {{ item }}
+      </div>
+      <span v-if="data.isSubmitUser">{{ lang.ssSubStu2 }}:</span>
+      <div v-for="(item, index) in data.isSubmitUser" :key="index" v-if="data.isSubmitUser">
+        {{ item }}
+      </div>
+      <div class="line" v-if="data.isSubmitUser && data.isSubmitUser"></div>
+      <span v-if="data.notFiledUser">{{ lang.ssUnsubStu2 }}:</span>
+      <div v-for="(item, index) in data.notFiledUser" :key="index" v-if="data.notFiledUser">
         {{ item }}
       </div>
     </div>
@@ -15,7 +24,9 @@
 <script setup>
 import { ref } from 'vue'
 import Modal from '@/components/Modal.vue'
+import { lang } from '@/main'
 const show = ref(false)
+
 const data = ref({})
 const title = ref("")
 
@@ -95,5 +106,17 @@ defineExpose({
     font-weight: 500;
     font-size: 1rem;
   }
+  &>span{
+    width: 100%;
+    display: block;
+    font-weight: 600;
+    font-size: 1rem;
+  }
+  &>.line{
+    padding: 0;
+    width: 100%;
+    height: 2px;
+    background: #FDF6DE;
+  }
 }
 </style>

+ 5 - 1
src/views/lang/cn.json

@@ -752,5 +752,9 @@
   "ssViewKeywordCloud":"点击查看词云",
   "ssKeyword":"关键词",
   "ssKeywordCloud":"词云",
-  "ssGeneratingContent":"生成中"
+  "ssGeneratingContent":"生成中",
+  "ssSubmitStatus":"提交情况",
+  "ssSubStu2":"已提交学生",
+  "ssUnsubStu2":"未提交学生",
+  "ssViewSubmitStatus2":"点击查看提交情况"
 }

+ 5 - 1
src/views/lang/en.json

@@ -752,5 +752,9 @@
   "ssViewKeywordCloud": "Click to view keyword cloud",
   "ssKeyword": "Keyword",
   "ssKeywordCloud": "Word Cloud",
-  "ssGeneratingContent": "Generating Content"
+  "ssGeneratingContent": "Generating Content",
+  "ssSubmitStatus":"Submission Status",
+  "ssSubStu2":"Submitted Students",
+  "ssUnsubStu2":"Unsubmitted Students",
+  "ssViewSubmitStatus2":"Click to view submission status"
 }

+ 5 - 1
src/views/lang/hk.json

@@ -752,5 +752,9 @@
   "ssViewKeywordCloud":"點擊查看詞雲",
   "ssKeyword":"關鍵詞",
   "ssKeywordCloud":"詞雲",
-  "ssGeneratingContent":"生成中"
+  "ssGeneratingContent":"生成中",
+  "ssSubmitStatus":"提交狀態",
+  "ssSubStu2":"已提交學生",
+  "ssUnsubStu2":"未提交學生",
+  "ssViewSubmitStatus2":"點擊查看提交狀態"
 }