Browse Source

k't'gktgc

SanHQin 3 months ago
parent
commit
15543fb662

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.8a13ac6e1e3ed957c61ad0d09224aa1b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.bb486323f0fa002ba2e7.js></script><script type=text/javascript src=./static/js/app.097c1bf5398c8cba6f64.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.fe08eefa3ddfede22d804bf8011ca3b8.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.bb486323f0fa002ba2e7.js></script><script type=text/javascript src=./static/js/app.8f756b7e11dc7ec9dcc5.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.fe08eefa3ddfede22d804bf8011ca3b8.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.fe08eefa3ddfede22d804bf8011ca3b8.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8f756b7e11dc7ec9dcc5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8f756b7e11dc7ec9dcc5.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 55 - 62
src/components/pages/classroomObservation/components/chatArea.vue

@@ -1777,28 +1777,31 @@ ${JSON.stringify(_list)}
               console.log("说话人编码失败", error);
             }
           }
-
+          console.log("behavioralCodingListIf", (_behavioralCodingList.filter(
+              i => (i.role.indexOf("Guest") == -1 && i.code == "")
+            )));
           if (
             _behavioralCodingList.filter(
-              i => (i.role.indexOf("Guest") == -1 && i.code == "")
-            ).length > 10 &&
+              i => i.role.indexOf("Guest") === -1 && i.code === ""
+            ).length >= 10 &&
             !_getBehavioralCodingLoading
           ) {
             try {
-              let _behavioralCodingListTemp = _behavioralCodingList
-                .filter(i => (i.role.indexOf("Guest") == -1 && i.code == ""))
+              const _behavioralCodingListTemp = _behavioralCodingList
+                .filter(i => i.role.indexOf("Guest") == -1 && i.code == "")
                 .slice(0, 10);
-              let params = {
+
+              console.log("behavioralCodingListTemp", _behavioralCodingListTemp);
+              const params = {
                 inputs: {
                   rows: JSON.stringify(
-                    _behavioralCodingListTemp.map(i => {
-                      return { content: i.content, role: i.role };
-                    })
+                    _behavioralCodingListTemp.map(i => ({
+                      content: i.content,
+                      role: i.role
+                    }))
                   ),
-                  options:
-                    "老师讲课,老师提问或点名,老师板书或操作,老师评价或反馈,老师其他,学生发言,学生小组活动,学生自主学习,学生汇报分享,学生其他",
-                  attention:
-                    "- 先根据说话人角色判断,再在对应角色的选项中选择选项\n- 如果没有合适的选项,默认使用`老师其他`或者`学生其他`"
+                  options: "老师讲课,老师提问或点名,老师板书或操作,老师评价或反馈,老师其他,学生发言,学生小组活动,学生自主学习,学生汇报分享,学生其他",
+                  attention: "- 先根据说话人角色判断,再在对应角色的选项中选择选项\n- 如果没有合适的选项,默认使用`老师其他`或者`学生其他`"
                 },
                 response_mode: "blocking",
                 user: _this.userId
@@ -1808,16 +1811,12 @@ ${JSON.stringify(_list)}
               _this
                 .getBehavioralCoding(params)
                 .then(res => {
-                  let _runData = res.data.data;
-                  let _runResult = _runData.outputs.result;
-                  _behavioralCodingListTemp.forEach((i, index) => {
-                    _behavioralCodingList.find(i2 => i2.index == i.index).code =
-                      _runResult[index];
-                  });
-
-                  _behavioralCodingList.forEach(i => {
-                    if (textList[i.index].code == "") {
-                      textList[i.index].code = i.code;
+                  const _runResult = res.data.data.outputs.result;
+                  _behavioralCodingListTemp.forEach((item, index) => {
+                    const foundItem = _behavioralCodingList.find(i => i.index === item.index);
+                    if (foundItem) {
+                      foundItem.code = _runResult[index];
+                      textList[item.index].code = foundItem.code;
                     }
                   });
                   _getBehavioralCodingLoading = false;
@@ -1964,48 +1963,42 @@ ${JSON.stringify(_list)}
               });
           }
           if (
-            _behavioralCodingList.filter(
-              i => (i.role.indexOf("Guest") == -1 && i.code == "")
-            ).length > 0
+            _behavioralCodingList.some(
+              i => i.role.indexOf("Guest") === -1 && i.code === ""
+            )
           ) {
             _flag = true;
-            let _behavioralCodingListTemp = _behavioralCodingList.filter(
-              i => (i.role.indexOf("Guest") == -1 && i.code == "")
-            );
-            let params = {
-              inputs: {
-                rows: JSON.stringify(
-                  _behavioralCodingListTemp.map(i => {
-                    return { content: i.content, role: i.role };
-                  })
-                ),
-                options:
-                  "老师讲课,老师提问或点名,老师板书或操作,老师评价或反馈,老师其他,学生发言,学生小组活动,学生自主学习,学生汇报分享,学生其他",
-                attention:
-                  "- 先根据说话人角色判断,再在对应角色的选项中选择选项\n- 如果没有合适的选项,默认使用`老师其他`或者`学生其他`"
-              },
-              response_mode: "blocking",
-              user: _this.userId
-            };
-            _this
-              .getBehavioralCoding(params)
-              .then(res => {
-                let _runData = res.data.data;
-                let _runResult = _runData.outputs.result;
-                _behavioralCodingListTemp.forEach((i, index) => {
-                  _behavioralCodingList.find(i2 => i2.index == i.index).code =
-                    _runResult[index];
-                });
-
-                _behavioralCodingList.forEach(i => {
-                  if (textList[i.index].code == "") {
-                    textList[i.index].code = i.code;
-                  }
+            const _behavioralCodingListTemp = _behavioralCodingList
+                .filter(i => i.role.indexOf("Guest") == -1 && i.code == "")
+              const params = {
+                inputs: {
+                  rows: JSON.stringify(
+                    _behavioralCodingListTemp.map(i => ({
+                      content: i.content,
+                      role: i.role
+                    }))
+                  ),
+                  options: "老师讲课,老师提问或点名,老师板书或操作,老师评价或反馈,老师其他,学生发言,学生小组活动,学生自主学习,学生汇报分享,学生其他",
+                  attention: "- 先根据说话人角色判断,再在对应角色的选项中选择选项\n- 如果没有合适的选项,默认使用`老师其他`或者`学生其他`"
+                },
+                response_mode: "blocking",
+                user: _this.userId
+              };
+              _this
+                .getBehavioralCoding(params)
+                .then(res => {
+                  const _runResult = res.data.data.outputs.result;
+                  _behavioralCodingListTemp.forEach((item, index) => {
+                    const foundItem = _behavioralCodingList.find(i => i.index === item.index);
+                    if (foundItem) {
+                      foundItem.code = _runResult[index];
+                      textList[item.index].code = foundItem.code;
+                    }
+                  });
+                })
+                .catch(err => {
+                  console.log("获取行为编码错误", err);
                 });
-              })
-              .catch(err => {
-                console.log("获取行为编码错误", err);
-              });
           }
 
           if (_flag) {

Some files were not shown because too many files changed in this diff