Browse Source

课堂观察

SanHQin 1 month ago
parent
commit
374167ccda

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.63d78a884fa2edbba51626d439a96095.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.13ce8e475898fba4b86d.js></script><script type=text/javascript src=./static/js/vendor.760a0579ba72af98e473.js></script><script type=text/javascript src=./static/js/app.30084e4ae7bf0fc56720.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.3f295093c5232d62e65e07860f5112c4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.062f14352151ff2301df.js></script><script type=text/javascript src=./static/js/app.ea97d8e640be741e3566.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.3f295093c5232d62e65e07860f5112c4.css


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.9f2408d57b212f100e92.js.map


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


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


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


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


+ 2 - 2
dist/static/js/manifest.13ce8e475898fba4b86d.js → dist/static/js/manifest.23ea04dc469b57e2b4f8.js

@@ -1,2 +1,2 @@
-!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"9f2408d57b212f100e92",1:"14e8e8c7e44fc858e4a6",2:"94e1427bfc7ef0b4c685",3:"3a9f53a78da16650e6b8"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
-//# sourceMappingURL=manifest.13ce8e475898fba4b86d.js.map
+!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"eb6bdee5e7207bfd76b0",1:"14e8e8c7e44fc858e4a6",2:"94e1427bfc7ef0b4c685",3:"3a9f53a78da16650e6b8"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
+//# sourceMappingURL=manifest.23ea04dc469b57e2b4f8.js.map

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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.062f14352151ff2301df.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.062f14352151ff2301df.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage-manifest.2ece51fa34be51c8610a.js.map


+ 23 - 22
src/components/pages/classroomObservation/components/analysisItem.vue

@@ -1007,32 +1007,33 @@ export default {
         const md = new markdownIt();
         let _contentHtml = md.render(_content);
 
-        let _contentTableList = [];
-        const rowRegex = /<tr[^>]*>([\s\S]*?)<\/tr>/g; // 匹配表格行,[\s\S] 匹配所有字符
-        const cellRegex = /<(th|td)[^>]*>([\s\S]*?)<\/\1>/g; // 匹配单元格,[\s\S] 匹配所有字符
-
-        let rowMatch;
-        while ((rowMatch = rowRegex.exec(_contentHtml)) !== null) {
-          const rowContent = rowMatch[1]; // 每一行的内容
-          const rowData = [];
-          let cellMatch;
-
-          // 匹配每个单元格 (th 或 td)
-          while ((cellMatch = cellRegex.exec(rowContent)) !== null) {
-            let _text = cellMatch[2].trim();
-            _text = _text.replace(/&[a-zA-Z]+;/g, "");
-            _text = _text.replace(/<\/?[^>]+(>|$)/g, "");
-            rowData.push(_text); // 将每个单元格的内容添加到当前行的数组中
-          }
+        // 只提取第一个表格
+        const tableRegex = /<table[^>]*>([\s\S]*?)<\/table>/i;
+        const tableMatch = _contentHtml.match(tableRegex);
 
-          // 如果该行有数据,推送到 _contentTableList 中
-          if (rowData.length) {
-            _contentTableList.push(rowData);
+        let _contentTableList = [];
+        if (tableMatch) {
+          const tableHtml = tableMatch[1];
+          const rowRegex = /<tr[^>]*>([\s\S]*?)<\/tr>/g; // 匹配表格行
+          const cellRegex = /<(th|td)[^>]*>([\s\S]*?)<\/\1>/g; // 匹配单元格
+
+          let rowMatch;
+          while ((rowMatch = rowRegex.exec(tableHtml)) !== null) {
+            const rowContent = rowMatch[1];
+            const rowData = [];
+            let cellMatch;
+            while ((cellMatch = cellRegex.exec(rowContent)) !== null) {
+              let _text = cellMatch[2].trim();
+              _text = _text.replace(/&[a-zA-Z]+;/g, "");
+              _text = _text.replace(/<\/?[^>]+(>|$)/g, "");
+              rowData.push(_text);
+            }
+            if (rowData.length) {
+              _contentTableList.push(rowData);
+            }
           }
         }
 
-        // 输出提取的表格数据
-
         resolve(_contentTableList);
       });
     },

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