|
@@ -364,6 +364,16 @@
|
|
|
ref="iiframe"
|
|
|
v-show="false"
|
|
|
></iframe>
|
|
|
+ <div class="chatAreaLoading" v-if="progressData.uploadLoading">
|
|
|
+ <div class="cal_box">
|
|
|
+ <div>
|
|
|
+ <img :src="require('../../../../assets/loading.gif')" alt="">
|
|
|
+ <span>上传中,请稍等...</span>
|
|
|
+ </div>
|
|
|
+ <el-progress style="width:100%;color: #fff;" :text-inside="true" :stroke-width="24" :percentage="progressData.value"></el-progress>
|
|
|
+ </div>
|
|
|
+ <!-- <el-progress style="width:80%" :text-inside="true" :stroke-width="24" :percentage="progressData.value"></el-progress> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -508,6 +518,10 @@ export default {
|
|
|
},
|
|
|
roleList: [],
|
|
|
publicRoleList: [],
|
|
|
+ progressData:{
|
|
|
+ uploadLoading:false,
|
|
|
+ value:0,
|
|
|
+ },
|
|
|
audioUrl: "",
|
|
|
editorBarData: {
|
|
|
type: "0", //0---文字 1-文件
|
|
@@ -582,6 +596,7 @@ export default {
|
|
|
},
|
|
|
// 上传录音
|
|
|
uploadRecording() {
|
|
|
+ if(!this.tid)return this.$message.error("请选择课程")
|
|
|
if (this.uploadFileLoading) return this.$message.info("请稍等...");
|
|
|
let input = document.createElement("input");
|
|
|
input.type = "file";
|
|
@@ -646,6 +661,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
recordedStart() {
|
|
|
+ if(!this.tid)return this.$message.error("请选择课程")
|
|
|
if (this.uploadFileLoading) return this.$message.info("请稍等...");
|
|
|
// 开始录音
|
|
|
if (this.audioUrl) {
|
|
@@ -1234,7 +1250,9 @@ export default {
|
|
|
var _this = this;
|
|
|
|
|
|
if (file) {
|
|
|
- this.loading = true;
|
|
|
+ // this.loading = true;
|
|
|
+ this.progressData.uploadLoading = true;
|
|
|
+ this.progressData.value = 0;
|
|
|
var params = {
|
|
|
Key:
|
|
|
file.name.split(".")[0] +
|
|
@@ -1255,6 +1273,7 @@ export default {
|
|
|
.upload(params, options)
|
|
|
.on("httpUploadProgress", function (evt) {
|
|
|
//这里可以写进度条
|
|
|
+ _this.progressData.value = parseInt((evt.loaded * 100) / evt.total)
|
|
|
// console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
|
|
|
})
|
|
|
.send(function (err, data) {
|
|
@@ -1262,6 +1281,7 @@ export default {
|
|
|
_this.$message.error("上传失败");
|
|
|
_this.uploadFileLoading = false;
|
|
|
_this.loading = false;
|
|
|
+ _this.progressData.uploadLoading = false;
|
|
|
} else {
|
|
|
// 判断是不是音频文件
|
|
|
const audioRegex = /\.(mp3|wav|ogg|flac|m4a)$/i;
|
|
@@ -1283,6 +1303,7 @@ export default {
|
|
|
_this.wavFileGetText(file);
|
|
|
_this.$emit("changeAudioUrl", data);
|
|
|
_this.loading = false;
|
|
|
+ _this.progressData.uploadLoading = false;
|
|
|
return;
|
|
|
}
|
|
|
_this.ajax
|
|
@@ -1374,6 +1395,7 @@ export default {
|
|
|
// console.log("pdf、xlsx、doc、docx文件处理");
|
|
|
}
|
|
|
_this.loading = false;
|
|
|
+ _this.progressData.uploadLoading = false;
|
|
|
if (!_this.fileIdId) return;
|
|
|
let pram2 = {
|
|
|
id: _this.fileIdId,
|
|
@@ -1396,6 +1418,7 @@ export default {
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
_this.uploadFileLoading = false;
|
|
|
+ _this.progressData.uploadLoading = false;
|
|
|
console.log(e);
|
|
|
_this.$message.error("获取fileId失败");
|
|
|
});
|
|
@@ -1424,7 +1447,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
- this.$message.error("获取角色列表失败");
|
|
|
+ console.log(e)
|
|
|
+ // this.$message.error("获取角色列表失败");
|
|
|
this.roleList = [];
|
|
|
});
|
|
|
},
|
|
@@ -1447,7 +1471,8 @@ export default {
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
this.publicRoleList = [];
|
|
|
- console.log("获取公共角色失败", e);
|
|
|
+ console.log(e)
|
|
|
+ // console.log("获取公共角色失败", e);
|
|
|
});
|
|
|
},
|
|
|
// 选择了@的角色
|
|
@@ -1493,6 +1518,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getData() {
|
|
|
+ if(!this.tid)return;
|
|
|
this.loading = true;
|
|
|
this.getRoleList();
|
|
|
this.getPublicRoleList();
|
|
@@ -1503,6 +1529,7 @@ export default {
|
|
|
},
|
|
|
// 保存转录文稿和原文速览
|
|
|
saveEditorBar(flag = false) {
|
|
|
+ if(!this.tid)return this.$message.error("请选择课程")
|
|
|
if (
|
|
|
this.editorBarData.type == "0" &&
|
|
|
flag &&
|
|
@@ -1518,7 +1545,7 @@ export default {
|
|
|
blob.name = `${this.tid}-classroomObservation.txt`;
|
|
|
return this.uploadFile(blob,false);
|
|
|
} else {
|
|
|
- this.loading = true;
|
|
|
+ // this.loading = true;
|
|
|
// let div = document.createElement("div");
|
|
|
// div.innerHTML = this.editorBarData.content;
|
|
|
// return this.loading = false;
|
|
@@ -1529,6 +1556,7 @@ export default {
|
|
|
editorBarData: this.editorBarData,
|
|
|
},
|
|
|
() => {
|
|
|
+ this.progressData.uploadLoading = false;
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -1546,6 +1574,7 @@ export default {
|
|
|
// 获取对话记录
|
|
|
getChatList() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
+ if(!this.tid)return;
|
|
|
if (this.chatLoading) return this.$message.info("请稍等...");
|
|
|
this.chatList = [];
|
|
|
if (!this.tid) return setTimeout(() => this.getChatList(), 100);
|
|
@@ -1639,6 +1668,7 @@ export default {
|
|
|
/* justify-content: center; */
|
|
|
box-sizing: border-box;
|
|
|
padding: 20px;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
.audio_class {
|
|
|
/* width: 100% !important; */
|
|
@@ -1670,7 +1700,7 @@ export default {
|
|
|
display: flex;
|
|
|
/* align-items: center; */
|
|
|
border-bottom: 1px #ccc solid;
|
|
|
- z-index: 99;
|
|
|
+ /* z-index: 99; */
|
|
|
}
|
|
|
.titBar > .titBarLeft {
|
|
|
width: 40%;
|
|
@@ -2138,4 +2168,47 @@ export default {
|
|
|
max-height: calc(100% - 42px);
|
|
|
overflow: auto;
|
|
|
}
|
|
|
+
|
|
|
+.chatAreaLoading{
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ background-color: rgba(255, 255, 255, 0.7);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.cal_box{
|
|
|
+ width: 300px;
|
|
|
+ height: 150px;
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 10px;
|
|
|
+ box-shadow: 0 0 4px 4px #fff;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.cal_box>div:nth-child(1){
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-size: 18px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.cal_box>div:nth-child(1)>img{
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.cal_box>>>.el-progress-bar__innerText{
|
|
|
+ color: #fff !important;
|
|
|
+}
|
|
|
</style>
|