|
@@ -6874,6 +6874,7 @@ export default {
|
|
|
IRSBlockSize: this.$store.state.tempIRSBlockSize, // IRS Block 大小
|
|
|
pens: this.$store.state.tempPenstate,
|
|
|
gptActionList:this.$store.state.tempGptActionList,
|
|
|
+ isSyncOldCCRoster:this.$store.state.tempIsSyncOldCCRoster
|
|
|
};
|
|
|
this.$Spin.show(); // 畫面loading表現你可以自己調整
|
|
|
await this.$store.dispatch("preferences/updProfilePREF", data).then(() => {
|
|
@@ -7049,7 +7050,7 @@ export default {
|
|
|
else if (isPureAccount && this.classInfo.isIES5) type = 2;
|
|
|
else if (!isPureAccount && this.classInfo.isIES5) type = 3;
|
|
|
console.log(type,'AuthType',this.$store.state.loginType)
|
|
|
- return 3;
|
|
|
+ return type;
|
|
|
},
|
|
|
isAuthOpenAIAccount(){
|
|
|
return this.getFunc("aigpt")?.active
|
|
@@ -7512,6 +7513,7 @@ export default {
|
|
|
console.log(this.getPREFMemberList,"getPREFMemberList")
|
|
|
console.log(this.classInfo, "classInfo");
|
|
|
console.log(this.blobConnect);
|
|
|
+ console.log(this.getIsSyncOldCCRoster,"getIsSyncOldCCRoster")
|
|
|
|
|
|
if(!!this.getGptActionList){
|
|
|
this.$store.state.tempGptActionList=this.getGptActionList
|
|
@@ -7532,8 +7534,50 @@ export default {
|
|
|
|
|
|
//帶入自訂名單偏好設定20250523 先註解
|
|
|
// this.customMemberlist=this.getPREFMemberList?this.getPREFMemberList.length!=0?await this.$refs.editMemberList.fetchCCroster():[]:[]
|
|
|
- const fetchCCroster=await this.$refs.editMemberList.fetchCCroster()
|
|
|
- console.log(fetchCCroster,"fetchCCroster")
|
|
|
+
|
|
|
+ if (!this.getIsSyncOldCCRoster) {
|
|
|
+ const fetchCCrosterData = await this.$refs.editMemberList.fetchCCroster() || []
|
|
|
+ // console.log(fetchCCrosterData, "fetchCCrosterData")
|
|
|
+ if (!fetchCCrosterData || !Array.isArray(fetchCCrosterData) || fetchCCrosterData.length === 0) {
|
|
|
+ this.$store.state.tempIsSyncOldCCRoster = true;
|
|
|
+ this.updProfilePREF()
|
|
|
+ } else {
|
|
|
+ // 使用 Promise.all 確保所有 API 呼叫都完成
|
|
|
+ try {
|
|
|
+ const apiPromises = fetchCCrosterData.map((item) => {
|
|
|
+ return this.$api.ies5Api.createIES5StudentList({
|
|
|
+ courseName: "HiTeach",
|
|
|
+ groupListName: item.listName,
|
|
|
+ limitCount: 200,
|
|
|
+ courseId: "",
|
|
|
+ groupId: "",
|
|
|
+ member: item.list.map((item2) => {
|
|
|
+ return {
|
|
|
+ seatID: item2.seatID,
|
|
|
+ memberID: item2.memberID,
|
|
|
+ memberName: item2.memberName,
|
|
|
+ id: "",
|
|
|
+ code: null,
|
|
|
+ type: 3,
|
|
|
+ nickname: item2.memberName,
|
|
|
+ no: item2.seatID,
|
|
|
+ irs: item2.seatID,
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ // 等待所有 API 呼叫完成
|
|
|
+ await Promise.all(apiPromises);
|
|
|
+ console.log('所有名單同步完成');
|
|
|
+ this.$store.state.tempIsSyncOldCCRoster = true;
|
|
|
+ this.updProfilePREF()
|
|
|
+ } catch (error) {
|
|
|
+ console.error('名單同步過程中發生錯誤:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const res=await this.$api.ies5Api.getIES5TeacherInfo()
|
|
|
|
|
|
if (res.courses && Array.isArray(res.courses)) {
|
|
@@ -7548,6 +7592,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
|
|
|
|
|
|
this.getStorageSize("session");
|
|
@@ -7942,6 +7987,7 @@ export default {
|
|
|
getPREFPenState: "preferences/getPenState", // 取得預設畫筆設定檔
|
|
|
getGptActionList:'preferences/getGptActionList',
|
|
|
getPREFMemberList:"preferences/getPREFMemberList", // 取得自訂名單
|
|
|
+ getIsSyncOldCCRoster:"preferences/getIsSyncOldCCRoster", // 取得自訂名單
|
|
|
classInfo: "classInfo/getInfo", // 取得課堂設定
|
|
|
callLogout: "mqtt/getCallLogout", // 取得mqtt是否呼叫登出
|
|
|
mqttDeviceId: "mqtt/getDeviceId", // 取得mqtt 裝置ID
|