|
@@ -1700,7 +1700,7 @@ ${JSON.stringify(_list)}
|
|
|
|
|
|
console.log("roleList",_roleList);
|
|
|
console.log("getRoleList",_getRoleList)
|
|
|
- if (_getRoleList.length >= 5 && !_getRoleLoading) {
|
|
|
+ if (_getRoleList.length >= 10 && !_getRoleLoading) {
|
|
|
try {
|
|
|
let params = {
|
|
|
inputs: {
|
|
@@ -1720,13 +1720,34 @@ ${JSON.stringify(_list)}
|
|
|
.then(res => {
|
|
|
let _runData = res.data.data;
|
|
|
let _runResult = _runData.outputs.result;
|
|
|
+ let _numRole = [];
|
|
|
|
|
|
_runResult.forEach((txt, index) => {
|
|
|
let _oldRole = _getRoleList[index].role;
|
|
|
- if (!_roleList[_oldRole]) {
|
|
|
- _roleList[_oldRole] = txt;
|
|
|
+ if(_numRole.map(i=>i.role).includes(_oldRole)){
|
|
|
+ let _findIndex = _numRole.findIndex(i=>i.role==_oldRole);
|
|
|
+ if(txt=="学生"){
|
|
|
+ _numRole[_findIndex].s+=1;
|
|
|
+ }else if(txt=="老师"){
|
|
|
+ _numRole[_findIndex].t+=1;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(txt=="学生"){
|
|
|
+ _numRole.push({role:_oldRole,t:0,s:1});
|
|
|
+ }else if(txt=="老师"){
|
|
|
+ _numRole.push({role:_oldRole,t:1,s:0});
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ //根据数量判断是老师还是学生
|
|
|
+ _numRole.forEach(i=>{
|
|
|
+ if(i.t > i.s){
|
|
|
+ _roleList[i.role] = "老师";
|
|
|
+ }else if(i.t < i.s){
|
|
|
+ _roleList[i.role] = "学生";
|
|
|
+ }
|
|
|
+ })
|
|
|
//已经有的role
|
|
|
let roleKeys = Object.keys(_roleList);
|
|
|
|
|
@@ -1761,7 +1782,7 @@ ${JSON.stringify(_list)}
|
|
|
|
|
|
_this.transcriptionData.content += privText;
|
|
|
|
|
|
- console.log(textList);
|
|
|
+ // console.log(textList);
|
|
|
|
|
|
let _result = `
|
|
|
<table
|