Ver Fonte

first commit

lsc há 5 meses atrás
pai
commit
c17fa101dd
100 ficheiros alterados com 34719 adições e 3 exclusões
  1. 63 0
      dist/index.html
  2. 1 0
      dist/static/cocoroboffmpeg/css/app.1d41ea99.css
  3. BIN
      dist/static/cocoroboffmpeg/favicon.ico
  4. 253 0
      dist/static/cocoroboffmpeg/ffmpeg-core.js
  5. BIN
      dist/static/cocoroboffmpeg/ffmpeg-core.wasm
  6. 0 0
      dist/static/cocoroboffmpeg/ffmpeg-core.worker.js
  7. 13 0
      dist/static/cocoroboffmpeg/index.html
  8. 0 0
      dist/static/cocoroboffmpeg/js/app.5c23ccd0.js
  9. 0 0
      dist/static/cocoroboffmpeg/js/app.5c23ccd0.js.map
  10. 0 0
      dist/static/cocoroboffmpeg/js/chunk-vendors.8366e8e5.js
  11. 0 0
      dist/static/cocoroboffmpeg/js/chunk-vendors.8366e8e5.js.map
  12. 0 0
      dist/static/css/app.a7b2d655cbda7c7e4e23a0c209e1f8ba.css
  13. 0 0
      dist/static/css/app.a7b2d655cbda7c7e4e23a0c209e1f8ba.css.map
  14. 253 0
      dist/static/ffmpeg/ffmpeg-core.js
  15. BIN
      dist/static/ffmpeg/ffmpeg-core.wasm
  16. 0 0
      dist/static/ffmpeg/ffmpeg-core.worker.js
  17. BIN
      dist/static/fonts/element-icons.535877f.woff
  18. BIN
      dist/static/fonts/element-icons.732389d.ttf
  19. BIN
      dist/static/img/addStage.b6a9d67.png
  20. BIN
      dist/static/img/bz_icon_data.1882026.png
  21. BIN
      dist/static/img/bz_icon_data_active.6254a5a.png
  22. BIN
      dist/static/img/hx_icon_data.be59b10.png
  23. BIN
      dist/static/img/hx_icon_data_active.3816a5e.png
  24. BIN
      dist/static/img/icon_add.0f4f852.png
  25. BIN
      dist/static/img/icon_last.834d3b3.png
  26. BIN
      dist/static/img/icon_next.9c51962.png
  27. BIN
      dist/static/img/icon_return2.cf697fa.png
  28. 0 0
      dist/static/js/app.771e7c5cadeec4456ad3.js
  29. 0 0
      dist/static/js/app.771e7c5cadeec4456ad3.js.map
  30. 2 0
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js
  31. 0 0
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  32. 0 0
      dist/static/js/vendor.114c70b69d26bbdf9624.js
  33. 0 0
      dist/static/js/vendor.114c70b69d26bbdf9624.js.map
  34. BIN
      dist/static/logo.ico
  35. 3 3
      src/components/pages/knowledge/folder.vue
  36. 17 0
      src/components/pages/knowledge/folderFileBox.vue
  37. 472 0
      src/components/pages/test/add/addTest.vue
  38. 421 0
      src/components/pages/test/add/addTestJ.vue
  39. 219 0
      src/components/pages/test/add/components/GapFilling/gap.vue
  40. 209 0
      src/components/pages/test/add/components/GapFilling/index.vue
  41. 203 0
      src/components/pages/test/add/components/addCheckPopover.vue
  42. 1011 0
      src/components/pages/test/add/components/checkOrder.vue
  43. 469 0
      src/components/pages/test/add/components/choice/choice.vue
  44. 296 0
      src/components/pages/test/add/components/choice/index.vue
  45. 287 0
      src/components/pages/test/add/components/course/course.vue
  46. 112 0
      src/components/pages/test/add/components/course/courseDilog.vue
  47. 2010 0
      src/components/pages/test/add/components/course/courseIndex.vue
  48. 323 0
      src/components/pages/test/add/components/course/index.vue
  49. 166 0
      src/components/pages/test/add/components/course2/course.vue
  50. 112 0
      src/components/pages/test/add/components/course2/courseDilog.vue
  51. 2011 0
      src/components/pages/test/add/components/course2/courseIndex.vue
  52. 320 0
      src/components/pages/test/add/components/course2/index.vue
  53. 262 0
      src/components/pages/test/add/components/evaBox/eva.vue
  54. 224 0
      src/components/pages/test/add/components/evaBox/index.vue
  55. 528 0
      src/components/pages/test/add/components/file/file.vue
  56. 536 0
      src/components/pages/test/add/components/file/index.vue
  57. 213 0
      src/components/pages/test/add/components/number/index.vue
  58. 166 0
      src/components/pages/test/add/components/sweep/index.vue
  59. 192 0
      src/components/pages/test/add/components/timeBox/index.vue
  60. 170 0
      src/components/pages/test/add/components/timeBox/time.vue
  61. 40 0
      src/components/pages/test/add/edit/check/checkGlobal_style.css
  62. 219 0
      src/components/pages/test/add/edit/check/choice.vue
  63. 243 0
      src/components/pages/test/add/edit/check/course.vue
  64. 377 0
      src/components/pages/test/add/edit/check/course2.vue
  65. 170 0
      src/components/pages/test/add/edit/check/eva.vue
  66. 1157 0
      src/components/pages/test/add/edit/check/file.vue
  67. 192 0
      src/components/pages/test/add/edit/check/gap.vue
  68. 346 0
      src/components/pages/test/add/edit/check/index.vue
  69. 258 0
      src/components/pages/test/add/edit/check/number.vue
  70. 261 0
      src/components/pages/test/add/edit/check/sweep.vue
  71. 142 0
      src/components/pages/test/add/edit/check/time.vue
  72. 332 0
      src/components/pages/test/add/edit/check/uploadFile.vue
  73. 940 0
      src/components/pages/test/add/edit/edit/index.vue
  74. 625 0
      src/components/pages/test/add/edit/edit/indexJ.vue
  75. 531 0
      src/components/pages/test/add/edit/index.vue
  76. 220 0
      src/components/pages/test/add/edit/indexJ.vue
  77. 106 0
      src/components/pages/test/add/global_styles.css
  78. 101 0
      src/components/pages/test/add/minxins/minxin.js
  79. 323 0
      src/components/pages/test/add/setInfo/aiCreate.vue
  80. 363 0
      src/components/pages/test/add/setInfo/aiCreate2.vue
  81. 951 0
      src/components/pages/test/add/setInfo/index.vue
  82. 835 0
      src/components/pages/test/add/setInfo/indexJ.vue
  83. 591 0
      src/components/pages/test/add/setInfo/manualCreated.vue
  84. 324 0
      src/components/pages/test/aggregate/index.vue
  85. 2242 0
      src/components/pages/test/check/aiBoxRight.vue
  86. 260 0
      src/components/pages/test/check/check.vue
  87. 1555 0
      src/components/pages/test/check/docxTemplateDialog.vue
  88. 4800 0
      src/components/pages/test/check/index.vue
  89. 309 0
      src/components/pages/test/check/index2.vue
  90. 267 0
      src/components/pages/test/check/indexJiu.vue
  91. 95 0
      src/components/pages/test/check/txtHtmlView.vue
  92. 2400 0
      src/components/pages/test/checkAi/aiLeader.vue
  93. 52 0
      src/components/pages/test/checkAi/eChartTemplate.vue
  94. 331 0
      src/components/pages/test/checkAi/wangEnduit.vue
  95. 179 0
      src/components/pages/test/choseCheck/csvTableView.vue
  96. 453 0
      src/components/pages/test/choseCheck/index.vue
  97. 106 0
      src/components/pages/test/choseCheck/txtView.vue
  98. 143 0
      src/components/pages/test/data/checkPie.vue
  99. 175 0
      src/components/pages/test/data/pie1.vue
  100. 168 0
      src/components/pages/test/data/pie2.vue

+ 63 - 0
dist/index.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>PBL教师端</title><link rel="shortcut icon" type=image/x-icon href=static/logo.ico><style>@charset "utf-8";
+    /* @font-face {
+        font-family: 'Source Han Sans SC';
+        src: url('./static/SourceHanSans-Regular.otf') format('truetype');
+        font-weight: normal;
+        font-style: normal;
+      } */
+
+    div::-webkit-scrollbar {
+      /*滚动条整体样式*/
+      width: 6px;
+      /*高宽分别对应横竖滚动条的尺寸*/
+      height: 6px;
+    }
+
+    /*定义滚动条轨道 内阴影+圆角*/
+    div::-webkit-scrollbar-track {
+      border-radius: 10px;
+      background-color: rgba(0, 0, 0, 0.1);
+    }
+
+    /*定义滑块 内阴影+圆角*/
+    div::-webkit-scrollbar-thumb {
+      border-radius: 10px;
+      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+      background-color: rgba(0, 0, 0, 0.1);
+    }
+
+    html,
+    body {
+      height: 100%;
+      width: 100%;
+      background: #e6eaf0;
+      font-family: '黑体';
+    }</style><link href=./static/css/app.a7b2d655cbda7c7e4e23a0c209e1f8ba.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.114c70b69d26bbdf9624.js></script><script type=text/javascript src=./static/js/app.771e7c5cadeec4456ad3.js></script></body></html><script>function stopSafari() {
+    //阻止safari浏览器双击放大功能
+    let lastTouchEnd = 0  //更新手指弹起的时间
+    document.documentElement.addEventListener("touchstart", function (event) {
+      //多根手指同时按下屏幕,禁止默认行为
+      if (event.touches.length > 1) {
+        event.preventDefault();
+      }
+    });
+    document.documentElement.addEventListener("touchend", function (event) {
+      let now = (new Date()).getTime();
+      if (now - lastTouchEnd <= 300) {
+        //当两次手指弹起的时间小于300毫秒,认为双击屏幕行为
+        event.preventDefault();
+      } else { // 否则重新手指弹起的时间
+        lastTouchEnd = now;
+      }
+    }, false);
+    //阻止双指放大页面
+    document.documentElement.addEventListener("gesturestart", function (event) {
+      event.preventDefault();
+    });
+  }
+
+  window.onload = () => {
+    stopSafari();
+  }
+  
+  document.domain = document.domain.split(".").slice(-2).join(".");</script>

+ 1 - 0
dist/static/cocoroboffmpeg/css/app.1d41ea99.css

@@ -0,0 +1 @@
+.ffmpeg[data-v-f4706aa4]{width:100vw;height:100vh;background-color:#fff}

BIN
dist/static/cocoroboffmpeg/favicon.ico


+ 253 - 0
dist/static/cocoroboffmpeg/ffmpeg-core.js

@@ -0,0 +1,253 @@
+
+var createFFmpegCore = (function() {
+  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
+  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
+  return (
+function(createFFmpegCore) {
+  createFFmpegCore = createFFmpegCore || {};
+
+
+var f;f||(f=typeof createFFmpegCore !== 'undefined' ? createFFmpegCore : {});var ba,ca;f.ready=new Promise(function(a,b){ba=a;ca=b});var da={},ea;for(ea in f)f.hasOwnProperty(ea)&&(da[ea]=f[ea]);var fa=[],ha="./this.program";function ja(a,b){throw b;}var ka=!1,la=!1,h=!1,ma=!1;ka="object"===typeof window;la="function"===typeof importScripts;h="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ma=!ka&&!h&&!la;var l=f.ENVIRONMENT_IS_PTHREAD||!1;
+l&&(oa=f.buffer);var pa="";function qa(a){return f.locateFile?f.locateFile(a,pa):pa+a}var ra,sa,ta,va;
+if(h){pa=la?require("path").dirname(pa)+"/":__dirname+"/";ra=function(a,b){ta||(ta=require("fs"));va||(va=require("path"));a=va.normalize(a);return ta.readFileSync(a,b?null:"utf8")};sa=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1<process.argv.length&&(ha=process.argv[1].replace(/\\/g,"/"));fa=process.argv.slice(2);process.on("uncaughtException",function(a){if(!(a instanceof wa))throw a;});process.on("unhandledRejection",n);ja=function(a){process.exit(a)};f.inspect=
+function(){return"[Emscripten Module object]"};var xa;try{xa=require("worker_threads")}catch(a){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),a;}global.Worker=xa.Worker}else if(ma)"undefined"!=typeof read&&(ra=function(a){return read(a)}),sa=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!=typeof scriptArgs?fa=scriptArgs:
+"undefined"!=typeof arguments&&(fa=arguments),"function"===typeof quit&&(ja=function(a){quit(a)}),"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ka||la)la?pa=self.location.href:"undefined"!==typeof document&&document.currentScript&&(pa=document.currentScript.src),_scriptDir&&(pa=_scriptDir),0!==pa.indexOf("blob:")?pa=pa.substr(0,pa.lastIndexOf("/")+1):pa="",h?(ra=function(a,
+b){ta||(ta=require("fs"));va||(va=require("path"));a=va.normalize(a);return ta.readFileSync(a,b?null:"utf8")},sa=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a}):(ra=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},la&&(sa=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}));h&&"undefined"===typeof performance&&(global.performance=require("perf_hooks").performance);
+var ya=f.print||console.log.bind(console),u=f.printErr||console.warn.bind(console);for(ea in da)da.hasOwnProperty(ea)&&(f[ea]=da[ea]);da=null;f.arguments&&(fa=f.arguments);f.thisProgram&&(ha=f.thisProgram);f.quit&&(ja=f.quit);var za,Aa=0,Ba;f.wasmBinary&&(Ba=f.wasmBinary);var noExitRuntime;f.noExitRuntime&&(noExitRuntime=f.noExitRuntime);"object"!==typeof WebAssembly&&n("no native wasm support detected");var Ca,Da,threadInfoStruct=0,selfThreadId=0,Ea=!1;
+function assert(a,b){a||n("Assertion failed: "+b)}function Fa(a){var b=f["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b}
+function Ga(a,b,c,d){var e={string:function(q){var t=0;if(null!==q&&void 0!==q&&0!==q){var w=(q.length<<2)+1;t=Ha(w);Ia(q,v,t,w)}return t},array:function(q){var t=Ha(q.length);y.set(q,t);return t}},g=Fa(a),k=[];a=0;if(d)for(var m=0;m<d.length;m++){var r=e[c[m]];r?(0===a&&(a=A()),k[m]=r(d[m])):k[m]=d[m]}c=g.apply(null,k);c="string"===b?C(c):"boolean"===b?!!c:c;0!==a&&D(a);return c}
+function Ja(a,b,c){c=b+c;for(var d="";!(b>=c);){var e=a[b++];if(!e)break;if(e&128){var g=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var k=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|k:(e&7)<<18|g<<12|k<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function C(a,b){return a?Ja(v,a,b):""}
+function Ia(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var m=a.charCodeAt(++g);k=65536+((k&1023)<<10)|m&1023}if(127>=k){if(c>=d)break;b[c++]=k}else{if(2047>=k){if(c+1>=d)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++]=224|k>>12}else{if(c+3>=d)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-e}
+function Ka(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function La(a){var b=Ka(a)+1,c=Ma(b);c&&Ia(a,y,c,b);return c}function Na(a){var b=Ka(a)+1,c=Ha(b);Ia(a,y,c,b);return c}function Pa(a,b,c){for(var d=0;d<a.length;++d)y[b++>>0]=a.charCodeAt(d);c||(y[b>>0]=0)}var oa,y,v,Qa,Ra,E,F,G,Sa,Ta=f.INITIAL_MEMORY||2146435072;
+if(l)Ca=f.wasmMemory,oa=f.buffer;else if(f.wasmMemory)Ca=f.wasmMemory;else if(Ca=new WebAssembly.Memory({initial:Ta/65536,maximum:Ta/65536,shared:!0}),!(Ca.buffer instanceof SharedArrayBuffer))throw u("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),h&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),
+Error("bad memory");Ca&&(oa=Ca.buffer);Ta=oa.byteLength;var Ua=oa;oa=Ua;f.HEAP8=y=new Int8Array(Ua);f.HEAP16=Qa=new Int16Array(Ua);f.HEAP32=E=new Int32Array(Ua);f.HEAPU8=v=new Uint8Array(Ua);f.HEAPU16=Ra=new Uint16Array(Ua);f.HEAPU32=F=new Uint32Array(Ua);f.HEAPF32=G=new Float32Array(Ua);f.HEAPF64=Sa=new Float64Array(Ua);var H,Va=[],Wa=[],Xa=[],Ya=[],Za=[];function $a(){var a=f.preRun.shift();Va.unshift(a)}var ab=0,bb=null,cb=null;
+function eb(){assert(!l,"addRunDependency cannot be used in a pthread worker");ab++;f.monitorRunDependencies&&f.monitorRunDependencies(ab)}function fb(){ab--;f.monitorRunDependencies&&f.monitorRunDependencies(ab);if(0==ab&&(null!==bb&&(clearInterval(bb),bb=null),cb)){var a=cb;cb=null;a()}}f.preloadedImages={};f.preloadedAudios={};
+function n(a){if(f.onAbort)f.onAbort(a);l&&console.error("Pthread aborting at "+Error().stack);u(a);Ea=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ca(a);throw a;}function gb(a){var b=hb;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function ib(){return gb("data:application/octet-stream;base64,")}var hb="ffmpeg-core.wasm";ib()||(hb=qa(hb));
+function jb(){try{if(Ba)return new Uint8Array(Ba);if(sa)return sa(hb);throw"both async and sync fetching of the wasm failed";}catch(a){n(a)}}function kb(){return Ba||!ka&&!la||"function"!==typeof fetch||gb("file://")?Promise.resolve().then(jb):fetch(hb,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+hb+"'";return a.arrayBuffer()}).catch(function(){return jb()})}
+var J,L,mb={5454720:function(){throw"Canceled!";},5454940:function(a,b){setTimeout(function(){lb(a,b)},0)},5455042:function(){return 5242880}};function nb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(f);else{var c=b.vh;"number"===typeof c?void 0===b.Tf?H.get(c)():H.get(c)(b.Tf):c(void 0===b.Tf?null:b.Tf)}}}function ob(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){return b===b?b:b+" ["+b+"]"})}
+f.dynCall=function(a,b,c){var d;-1!=a.indexOf("j")?d=c&&c.length?f["dynCall_"+a].apply(null,[b].concat(c)):f["dynCall_"+a].call(null,b):d=H.get(b).apply(null,c);return d};var pb=0,qb=0,rb=0;function sb(a,b,c){pb=a|0;rb=b|0;qb=c|0}f.registerPthreadPtr=sb;
+function tb(a,b){if(0>=a||a>y.length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=Atomics.load(E,M.Vf>>2),d=0;if(c==a&&Atomics.compareExchange(E,M.Vf>>2,c,0)==c&&(--b,d=1,0>=b))return 1;a=Atomics.notify(E,a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;}f._emscripten_futex_wake=tb;
+function ub(a){if(l)throw"Internal Error! cancelThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cancelThread!";M.Ef[a].worker.postMessage({cmd:"cancel"})}function vb(a){if(l)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cleanupThread!";E[a+12>>2]=0;(a=M.Ef[a])&&M.Ag(a.worker)}
+var M={Ph:1,nj:{Ih:0,Jh:0},Gf:[],Kf:[],lj:function(){},pi:function(){M.xf=Ma(232);for(var a=0;58>a;++a)F[M.xf/4+a]=0;E[M.xf+12>>2]=M.xf;a=M.xf+156;E[a>>2]=a;var b=Ma(512);for(a=0;128>a;++a)F[b/4+a]=0;Atomics.store(F,M.xf+104>>2,b);Atomics.store(F,M.xf+40>>2,M.xf);Atomics.store(F,M.xf+44>>2,42);M.Ch();sb(M.xf,!la,1);wb(M.xf)},ri:function(){M.Ch();ba(f);M.receiveObjectTransfer=M.Ii;M.setThreadStatus=M.Li;M.threadCancel=M.Pi;M.threadExit=M.Qi},Ch:function(){M.Vf=xb},Ef:{},Dg:[],Li:function(){},eh:function(){for(;0<
+M.Dg.length;)M.Dg.pop()();l&&threadInfoStruct&&yb()},Qi:function(a){var b=pb|0;b&&(Atomics.store(F,b+4>>2,a),Atomics.store(F,b+0>>2,1),Atomics.store(F,b+60>>2,1),Atomics.store(F,b+64>>2,0),M.eh(),tb(b+0,2147483647),sb(0,0,0),threadInfoStruct=0,l&&postMessage({cmd:"exit"}))},Pi:function(){M.eh();Atomics.store(F,threadInfoStruct+4>>2,-1);Atomics.store(F,threadInfoStruct+0>>2,1);tb(threadInfoStruct+0,2147483647);threadInfoStruct=selfThreadId=0;sb(0,0,0);postMessage({cmd:"cancelDone"})},Oi:function(){for(var a in M.Ef){var b=
+M.Ef[a];b&&b.worker&&M.Ag(b.worker)}M.Ef={};for(a=0;a<M.Gf.length;++a){var c=M.Gf[a];c.terminate()}M.Gf=[];for(a=0;a<M.Kf.length;++a)c=M.Kf[a],b=c.yf,M.Pg(b),c.terminate();M.Kf=[]},Pg:function(a){if(a){if(a.threadInfoStruct){var b=E[a.threadInfoStruct+104>>2];E[a.threadInfoStruct+104>>2]=0;zb(b);zb(a.threadInfoStruct)}a.threadInfoStruct=0;a.Kg&&a.Rf&&zb(a.Rf);a.Rf=0;a.worker&&(a.worker.yf=null)}},Ag:function(a){delete M.Ef[a.yf.Lh];M.Gf.push(a);M.Kf.splice(M.Kf.indexOf(a),1);M.Pg(a.yf);a.yf=void 0},
+Ii:function(){},vi:function(a,b){a.onmessage=function(c){var d=c.data,e=d.cmd;a.yf&&(M.Mg=a.yf.threadInfoStruct);if(d.targetThread&&d.targetThread!=(pb|0)){var g=M.Ef[d.xj];g?g.worker.postMessage(c.data,d.transferList):console.error('Internal error! Worker sent a message "'+e+'" to target pthread '+d.targetThread+", but that thread no longer exists!")}else if("processQueuedMainThreadWork"===e)Ab();else if("spawnThread"===e)Bb(c.data);else if("cleanupThread"===e)vb(d.thread);else if("killThread"===
+e){c=d.thread;if(l)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in killThread!";E[c+12>>2]=0;c=M.Ef[c];c.worker.terminate();M.Pg(c);M.Kf.splice(M.Kf.indexOf(c.worker),1);c.worker.yf=void 0}else if("cancelThread"===e)ub(d.thread);else if("loaded"===e)a.loaded=!0,b&&b(a),a.og&&(a.og(),delete a.og);else if("print"===e)ya("Thread "+d.threadId+": "+d.text);else if("printErr"===e)u("Thread "+d.threadId+": "+d.text);
+else if("alert"===e)alert("Thread "+d.threadId+": "+d.text);else if("exit"===e)a.yf&&Atomics.load(F,a.yf.Lh+68>>2)&&M.Ag(a);else if("exitProcess"===e){noExitRuntime=!1;try{Cb(d.returnCode)}catch(k){if(k instanceof wa)return;throw k;}}else"cancelDone"===e?M.Ag(a):"objectTransfer"!==e&&("setimmediate"===c.data.target?a.postMessage(c.data):u("worker sent an unknown command "+e));M.Mg=void 0};a.onerror=function(c){u("pthread sent an error! "+c.filename+":"+c.lineno+": "+c.message)};h&&(a.on("message",
+function(c){a.onmessage({data:c})}),a.on("error",function(c){a.onerror(c)}),a.on("exit",function(){}));a.postMessage({cmd:"load",urlOrBlob:f.mainScriptUrlOrBlob||_scriptDir,wasmMemory:Ca,wasmModule:Da})},Vh:function(){var a=qa("ffmpeg-core.worker.js");M.Gf.push(new Worker(a))},li:function(){0==M.Gf.length&&(M.Vh(),M.vi(M.Gf[0]));return 0<M.Gf.length?M.Gf.pop():null},Zi:function(a){for(a=performance.now()+a;performance.now()<a;);}};f.establishStackSpace=function(a){D(a)};f.getNoExitRuntime=function(){return noExitRuntime};
+var Db;h?Db=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:l?Db=function(){return performance.now()-f.__performance_now_clock_drift}:"undefined"!==typeof dateNow?Db=dateNow:Db=function(){return performance.now()};function Eb(a){return E[Fb()>>2]=a}function Gb(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=Db();else return Eb(28),-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0}function Hb(a,b){if(l)return N(1,1,a,b);Ya.unshift({vh:a,Tf:b})}
+function Ib(a,b){a=new Date(1E3*E[a>>2]);E[b>>2]=a.getUTCSeconds();E[b+4>>2]=a.getUTCMinutes();E[b+8>>2]=a.getUTCHours();E[b+12>>2]=a.getUTCDate();E[b+16>>2]=a.getUTCMonth();E[b+20>>2]=a.getUTCFullYear()-1900;E[b+24>>2]=a.getUTCDay();E[b+36>>2]=0;E[b+32>>2]=0;E[b+28>>2]=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;Ib.ih||(Ib.ih=La("GMT"));E[b+40>>2]=Ib.ih;return b}
+function Jb(){function a(k){return(k=k.toTimeString().match(/\(([A-Za-z ]+)\)$/))?k[1]:"GMT"}if(l)return N(2,1);if(!Jb.Yh){Jb.Yh=!0;var b=(new Date).getFullYear(),c=new Date(b,0,1),d=new Date(b,6,1);b=c.getTimezoneOffset();var e=d.getTimezoneOffset(),g=Math.max(b,e);E[Kb()>>2]=60*g;E[Lb()>>2]=Number(b!=e);c=a(c);d=a(d);c=La(c);d=La(d);e<b?(E[Mb()>>2]=c,E[Mb()+4>>2]=d):(E[Mb()>>2]=d,E[Mb()+4>>2]=c)}}
+function Nb(a,b){Jb();a=new Date(1E3*E[a>>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a;a=E[Mb()+(a?4:0)>>2];
+E[b+40>>2]=a;return b}function Ob(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function Pb(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ob(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}
+function Qb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Rb(a){if("/"===a)return"/";a=Pb(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Sb(a,b){return Pb(a+"/"+b)}
+function Tb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(h)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){n("randomDevice")}}
+function Ub(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:O.cwd();if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ob(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}
+function Vb(a,b){function c(k){for(var m=0;m<k.length&&""===k[m];m++);for(var r=k.length-1;0<=r&&""===k[r];r--);return m>r?[]:k.slice(m,r-m+1)}a=Ub(a).substr(1);b=Ub(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,g=0;g<d;g++)if(a[g]!==b[g]){e=g;break}d=[];for(g=e;g<a.length;g++)d.push("..");d=d.concat(b.slice(e));return d.join("/")}var Wb=[];function Xb(a,b){Wb[a]={input:[],output:[],Yf:b};O.dh(a,Yb)}
+var Yb={open:function(a){var b=Wb[a.node.rdev];if(!b)throw new O.af(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Yf.flush(a.tty)},flush:function(a){a.tty.Yf.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Yf.xh)throw new O.af(60);for(var e=0,g=0;g<d;g++){try{var k=a.tty.Yf.xh(a.tty)}catch(m){throw new O.af(29);}if(void 0===k&&0===e)throw new O.af(6);if(null===k||void 0===k)break;e++;b[c+g]=k}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d){if(!a.tty||!a.tty.Yf.Zg)throw new O.af(60);
+try{for(var e=0;e<d;e++)a.tty.Yf.Zg(a.tty,b[c+e])}catch(g){throw new O.af(29);}d&&(a.node.timestamp=Date.now());return e}},$b={xh:function(a){if(!a.input.length){var b=null;if(h){var c=Buffer.Sf?Buffer.Sf(256):new Buffer(256),d=0;try{d=ta.readSync(process.stdin.fd,c,0,256,null)}catch(e){if(-1!=e.toString().indexOf("EOF"))d=0;else throw e;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==
+typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=Zb(b,!0)}return a.input.shift()},Zg:function(a,b){null===b||10===b?(ya(Ja(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(ya(Ja(a.output,0)),a.output=[])}},dc={Zg:function(a,b){null===b||10===b?(u(Ja(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(u(Ja(a.output,0)),a.output=[])}},P={Df:null,jf:function(){return P.createNode(null,
+"/",16895,0)},createNode:function(a,b,c,d){if(O.si(c)||O.isFIFO(c))throw new O.af(63);P.Df||(P.Df={dir:{node:{Af:P.cf.Af,nf:P.cf.nf,lookup:P.cf.lookup,Ff:P.cf.Ff,rename:P.cf.rename,unlink:P.cf.unlink,rmdir:P.cf.rmdir,readdir:P.cf.readdir,symlink:P.cf.symlink},stream:{tf:P.df.tf}},file:{node:{Af:P.cf.Af,nf:P.cf.nf},stream:{tf:P.df.tf,read:P.df.read,write:P.df.write,fg:P.df.fg,Wf:P.df.Wf,Xf:P.df.Xf}},link:{node:{Af:P.cf.Af,nf:P.cf.nf,readlink:P.cf.readlink},stream:{}},lh:{node:{Af:P.cf.Af,nf:P.cf.nf},
+stream:O.$h}});c=O.createNode(a,b,c,d);O.kf(c.mode)?(c.cf=P.Df.dir.node,c.df=P.Df.dir.stream,c.bf={}):O.isFile(c.mode)?(c.cf=P.Df.file.node,c.df=P.Df.file.stream,c.gf=0,c.bf=null):O.Mf(c.mode)?(c.cf=P.Df.link.node,c.df=P.Df.link.stream):O.hg(c.mode)&&(c.cf=P.Df.lh.node,c.df=P.Df.lh.stream);c.timestamp=Date.now();a&&(a.bf[b]=c);return c},gj:function(a){if(a.bf&&a.bf.subarray){for(var b=[],c=0;c<a.gf;++c)b.push(a.bf[c]);return b}return a.bf},hj:function(a){return a.bf?a.bf.subarray?a.bf.subarray(0,
+a.gf):new Uint8Array(a.bf):new Uint8Array(0)},sh:function(a,b){var c=a.bf?a.bf.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.bf,a.bf=new Uint8Array(b),0<a.gf&&a.bf.set(c.subarray(0,a.gf),0))},Ji:function(a,b){if(a.gf!=b)if(0==b)a.bf=null,a.gf=0;else{if(!a.bf||a.bf.subarray){var c=a.bf;a.bf=new Uint8Array(b);c&&a.bf.set(c.subarray(0,Math.min(b,a.gf)))}else if(a.bf||(a.bf=[]),a.bf.length>b)a.bf.length=b;else for(;a.bf.length<b;)a.bf.push(0);a.gf=b}},cf:{Af:function(a){var b=
+{};b.dev=O.hg(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;O.kf(a.mode)?b.size=4096:O.isFile(a.mode)?b.size=a.gf:O.Mf(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Xh=4096;b.blocks=Math.ceil(b.size/b.Xh);return b},nf:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&P.Ji(a,b.size)},lookup:function(){throw O.Qg[44];},Ff:function(a,
+b,c,d){return P.createNode(a,b,c,d)},rename:function(a,b,c){if(O.kf(a.mode)){try{var d=O.Bf(b,c)}catch(g){}if(d)for(var e in d.bf)throw new O.af(55);}delete a.parent.bf[a.name];a.name=c;b.bf[c]=a;a.parent=b},unlink:function(a,b){delete a.bf[b]},rmdir:function(a,b){var c=O.Bf(a,b),d;for(d in c.bf)throw new O.af(55);delete a.bf[b]},readdir:function(a){var b=[".",".."],c;for(c in a.bf)a.bf.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=P.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!O.Mf(a.mode))throw new O.af(28);
+return a.link}},df:{read:function(a,b,c,d,e){var g=a.node.bf;if(e>=a.node.gf)return 0;a=Math.min(a.node.gf-e,d);if(8<a&&g.subarray)b.set(g.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=g[e+d];return a},write:function(a,b,c,d,e,g){if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.bf||a.bf.subarray)){if(g)return a.bf=b.subarray(c,c+d),a.gf=d;if(0===a.gf&&0===e)return a.bf=b.slice(c,c+d),a.gf=d;if(e+d<=a.gf)return a.bf.set(b.subarray(c,c+d),e),d}P.sh(a,e+d);if(a.bf.subarray&&b.subarray)a.bf.set(b.subarray(c,
+c+d),e);else for(g=0;g<d;g++)a.bf[e+g]=b[c+g];a.gf=Math.max(a.gf,e+d);return d},tf:function(a,b,c){1===c?b+=a.position:2===c&&O.isFile(a.node.mode)&&(b+=a.node.gf);if(0>b)throw new O.af(28);return b},fg:function(a,b,c){P.sh(a.node,b+c);a.node.gf=Math.max(a.node.gf,b+c)},Wf:function(a,b,c,d,e,g){assert(0===b);if(!O.isFile(a.node.mode))throw new O.af(43);a=a.node.bf;if(g&2||a.buffer!==oa){if(0<d||d+c<a.length)a.subarray?a=a.subarray(d,d+c):a=Array.prototype.slice.call(a,d,d+c);d=!0;g=16384*Math.ceil(c/
+16384);for(b=Ma(g);c<g;)y[b+c++]=0;c=b;if(!c)throw new O.af(48);y.set(a,c)}else d=!1,c=a.byteOffset;return{Hi:c,Jg:d}},Xf:function(a,b,c,d,e){if(!O.isFile(a.node.mode))throw new O.af(43);if(e&2)return 0;P.df.write(a,b,0,d,c,!1);return 0}}},O={root:null,mg:[],ph:{},streams:[],Ai:1,Cf:null,oh:"/",Tg:!1,Bh:!0,mf:{},Mh:{Gh:{Rh:1,Sh:2}},af:null,Qg:{},ii:null,Cg:0,kj:function(a){if(!(a instanceof O.af)){a:{var b=Error();if(!b.stack){try{throw Error();}catch(c){b=c}if(!b.stack){b="(no stack trace available)";
+break a}}b=b.stack.toString()}f.extraStackTrace&&(b+="\n"+f.extraStackTrace());b=ob(b);throw a+" : "+b;}return Eb(a.ef)},ff:function(a,b){a=Ub(O.cwd(),a);b=b||{};if(!a)return{path:"",node:null};var c={Og:!0,ah:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8<b.ah)throw new O.af(32);a=Ob(a.split("/").filter(function(k){return!!k}),!1);var e=O.root;c="/";for(d=0;d<a.length;d++){var g=d===a.length-1;if(g&&b.parent)break;e=O.Bf(e,a[d]);c=Sb(c,a[d]);O.Nf(e)&&(!g||g&&b.Og)&&(e=e.lg.root);if(!g||b.wf)for(g=
+0;O.Mf(e.mode);)if(e=O.readlink(c),c=Ub(Qb(c),e),e=O.ff(c,{ah:b.ah}).node,40<g++)throw new O.af(32);}return{path:c,node:e}},If:function(a){for(var b;;){if(O.wg(a))return a=a.jf.Eh,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},Sg:function(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%O.Cf.length},zh:function(a){var b=O.Sg(a.parent.id,a.name);a.Pf=O.Cf[b];O.Cf[b]=a},Ah:function(a){var b=O.Sg(a.parent.id,a.name);if(O.Cf[b]===a)O.Cf[b]=a.Pf;
+else for(b=O.Cf[b];b;){if(b.Pf===a){b.Pf=a.Pf;break}b=b.Pf}},Bf:function(a,b){var c=O.yi(a);if(c)throw new O.af(c,a);for(c=O.Cf[O.Sg(a.id,b)];c;c=c.Pf){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return O.lookup(a,b)},createNode:function(a,b,c,d){a=new O.Oh(a,b,c,d);O.zh(a);return a},Ng:function(a){O.Ah(a)},wg:function(a){return a===a.parent},Nf:function(a){return!!a.lg},isFile:function(a){return 32768===(a&61440)},kf:function(a){return 16384===(a&61440)},Mf:function(a){return 40960===(a&61440)},
+hg:function(a){return 8192===(a&61440)},si:function(a){return 24576===(a&61440)},isFIFO:function(a){return 4096===(a&61440)},isSocket:function(a){return 49152===(a&49152)},ji:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},Dh:function(a){var b=O.ji[a];if("undefined"===typeof b)throw Error("Unknown file open mode: "+a);return b},th:function(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Jf:function(a,b){if(O.Bh)return 0;
+if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0},yi:function(a){var b=O.Jf(a,"x");return b?b:a.cf.lookup?0:2},Yg:function(a,b){try{return O.Bf(a,b),20}catch(c){}return O.Jf(a,"wx")},xg:function(a,b,c){try{var d=O.Bf(a,b)}catch(e){return e.ef}if(a=O.Jf(a,"wx"))return a;if(c){if(!O.kf(d.mode))return 54;if(O.wg(d)||O.If(d)===O.cwd())return 10}else if(O.kf(d.mode))return 31;return 0},zi:function(a,b){return a?
+O.Mf(a.mode)?32:O.kf(a.mode)&&("r"!==O.th(b)||b&512)?31:O.Jf(a,O.th(b)):44},Qh:4096,Bi:function(a,b){b=b||O.Qh;for(a=a||0;a<=b;a++)if(!O.streams[a])return a;throw new O.af(33);},zf:function(a){return O.streams[a]},nh:function(a,b,c){O.Hg||(O.Hg=function(){},O.Hg.prototype={object:{get:function(){return this.node},set:function(g){this.node=g}}});var d=new O.Hg,e;for(e in a)d[e]=a[e];a=d;b=O.Bi(b,c);a.fd=b;return O.streams[b]=a},ai:function(a){O.streams[a]=null},$h:{open:function(a){a.df=O.ki(a.node.rdev).df;
+a.df.open&&a.df.open(a)},tf:function(){throw new O.af(70);}},Wg:function(a){return a>>8},oj:function(a){return a&255},Of:function(a,b){return a<<8|b},dh:function(a,b){O.ph[a]={df:b}},ki:function(a){return O.ph[a]},wh:function(a){var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,c.mg)}return b},Kh:function(a,b){function c(k){O.Cg--;return b(k)}function d(k){if(k){if(!d.gi)return d.gi=!0,c(k)}else++g>=e.length&&c(null)}"function"===typeof a&&(b=a,a=!1);O.Cg++;1<O.Cg&&u("warning: "+
+O.Cg+" FS.syncfs operations in flight at once, probably just doing extra work");var e=O.wh(O.root.jf),g=0;e.forEach(function(k){if(!k.type.Kh)return d(null);k.type.Kh(k,a,d)})},jf:function(a,b,c){var d="/"===c,e=!c;if(d&&O.root)throw new O.af(10);if(!d&&!e){var g=O.ff(c,{Og:!1});c=g.path;g=g.node;if(O.Nf(g))throw new O.af(10);if(!O.kf(g.mode))throw new O.af(54);}b={type:a,tj:b,Eh:c,mg:[]};a=a.jf(b);a.jf=b;b.root=a;d?O.root=a:g&&(g.lg=b,g.jf&&g.jf.mg.push(b));return a},zj:function(a){a=O.ff(a,{Og:!1});
+if(!O.Nf(a.node))throw new O.af(28);a=a.node;var b=a.lg,c=O.wh(b);Object.keys(O.Cf).forEach(function(d){for(d=O.Cf[d];d;){var e=d.Pf;-1!==c.indexOf(d.jf)&&O.Ng(d);d=e}});a.lg=null;a.jf.mg.splice(a.jf.mg.indexOf(b),1)},lookup:function(a,b){return a.cf.lookup(a,b)},Ff:function(a,b,c){var d=O.ff(a,{parent:!0}).node;a=Rb(a);if(!a||"."===a||".."===a)throw new O.af(28);var e=O.Yg(d,a);if(e)throw new O.af(e);if(!d.cf.Ff)throw new O.af(63);return d.cf.Ff(d,a,b,c)},create:function(a,b){return O.Ff(a,(void 0!==
+b?b:438)&4095|32768,0)},mkdir:function(a,b){return O.Ff(a,(void 0!==b?b:511)&1023|16384,0)},qj:function(a,b){a=a.split("/");for(var c="",d=0;d<a.length;++d)if(a[d]){c+="/"+a[d];try{O.mkdir(c,b)}catch(e){if(20!=e.ef)throw e;}}},yg:function(a,b,c){"undefined"===typeof c&&(c=b,b=438);return O.Ff(a,b|8192,c)},symlink:function(a,b){if(!Ub(a))throw new O.af(44);var c=O.ff(b,{parent:!0}).node;if(!c)throw new O.af(44);b=Rb(b);var d=O.Yg(c,b);if(d)throw new O.af(d);if(!c.cf.symlink)throw new O.af(63);return c.cf.symlink(c,
+b,a)},rename:function(a,b){var c=Qb(a),d=Qb(b),e=Rb(a),g=Rb(b);var k=O.ff(a,{parent:!0});var m=k.node;k=O.ff(b,{parent:!0});k=k.node;if(!m||!k)throw new O.af(44);if(m.jf!==k.jf)throw new O.af(75);var r=O.Bf(m,e);d=Vb(a,d);if("."!==d.charAt(0))throw new O.af(28);d=Vb(b,c);if("."!==d.charAt(0))throw new O.af(55);try{var q=O.Bf(k,g)}catch(t){}if(r!==q){c=O.kf(r.mode);if(e=O.xg(m,e,c))throw new O.af(e);if(e=q?O.xg(k,g,c):O.Yg(k,g))throw new O.af(e);if(!m.cf.rename)throw new O.af(63);if(O.Nf(r)||q&&O.Nf(q))throw new O.af(10);
+if(k!==m&&(e=O.Jf(m,"w")))throw new O.af(e);try{O.mf.willMovePath&&O.mf.willMovePath(a,b)}catch(t){u("FS.trackingDelegate['willMovePath']('"+a+"', '"+b+"') threw an exception: "+t.message)}O.Ah(r);try{m.cf.rename(r,k,g)}catch(t){throw t;}finally{O.zh(r)}try{if(O.mf.onMovePath)O.mf.onMovePath(a,b)}catch(t){u("FS.trackingDelegate['onMovePath']('"+a+"', '"+b+"') threw an exception: "+t.message)}}},rmdir:function(a){var b=O.ff(a,{parent:!0}).node,c=Rb(a),d=O.Bf(b,c),e=O.xg(b,c,!0);if(e)throw new O.af(e);
+if(!b.cf.rmdir)throw new O.af(63);if(O.Nf(d))throw new O.af(10);try{O.mf.willDeletePath&&O.mf.willDeletePath(a)}catch(g){u("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.cf.rmdir(b,c);O.Ng(d);try{if(O.mf.onDeletePath)O.mf.onDeletePath(a)}catch(g){u("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}},readdir:function(a){a=O.ff(a,{wf:!0}).node;if(!a.cf.readdir)throw new O.af(54);return a.cf.readdir(a)},unlink:function(a){var b=O.ff(a,
+{parent:!0}).node,c=Rb(a),d=O.Bf(b,c),e=O.xg(b,c,!1);if(e)throw new O.af(e);if(!b.cf.unlink)throw new O.af(63);if(O.Nf(d))throw new O.af(10);try{O.mf.willDeletePath&&O.mf.willDeletePath(a)}catch(g){u("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.cf.unlink(b,c);O.Ng(d);try{if(O.mf.onDeletePath)O.mf.onDeletePath(a)}catch(g){u("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}},readlink:function(a){a=O.ff(a).node;if(!a)throw new O.af(44);
+if(!a.cf.readlink)throw new O.af(28);return Ub(O.If(a.parent),a.cf.readlink(a))},stat:function(a,b){a=O.ff(a,{wf:!b}).node;if(!a)throw new O.af(44);if(!a.cf.Af)throw new O.af(63);return a.cf.Af(a)},lstat:function(a){return O.stat(a,!0)},chmod:function(a,b,c){var d;"string"===typeof a?d=O.ff(a,{wf:!c}).node:d=a;if(!d.cf.nf)throw new O.af(63);d.cf.nf(d,{mode:b&4095|d.mode&-4096,timestamp:Date.now()})},lchmod:function(a,b){O.chmod(a,b,!0)},fchmod:function(a,b){a=O.zf(a);if(!a)throw new O.af(8);O.chmod(a.node,
+b)},chown:function(a,b,c,d){var e;"string"===typeof a?e=O.ff(a,{wf:!d}).node:e=a;if(!e.cf.nf)throw new O.af(63);e.cf.nf(e,{timestamp:Date.now()})},lchown:function(a,b,c){O.chown(a,b,c,!0)},fchown:function(a,b,c){a=O.zf(a);if(!a)throw new O.af(8);O.chown(a.node,b,c)},truncate:function(a,b){if(0>b)throw new O.af(28);var c;"string"===typeof a?c=O.ff(a,{wf:!0}).node:c=a;if(!c.cf.nf)throw new O.af(63);if(O.kf(c.mode))throw new O.af(31);if(!O.isFile(c.mode))throw new O.af(28);if(a=O.Jf(c,"w"))throw new O.af(a);
+c.cf.nf(c,{size:b,timestamp:Date.now()})},fj:function(a,b){a=O.zf(a);if(!a)throw new O.af(8);if(0===(a.flags&2097155))throw new O.af(28);O.truncate(a.node,b)},Aj:function(a,b,c){a=O.ff(a,{wf:!0}).node;a.cf.nf(a,{timestamp:Math.max(b,c)})},open:function(a,b,c,d,e){if(""===a)throw new O.af(44);b="string"===typeof b?O.Dh(b):b;c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=Pb(a);try{g=O.ff(a,{wf:!(b&131072)}).node}catch(m){}}var k=!1;if(b&64)if(g){if(b&128)throw new O.af(20);
+}else g=O.Ff(a,c,0),k=!0;if(!g)throw new O.af(44);O.hg(g.mode)&&(b&=-513);if(b&65536&&!O.kf(g.mode))throw new O.af(54);if(!k&&(c=O.zi(g,b)))throw new O.af(c);b&512&&O.truncate(g,0);b&=-131713;d=O.nh({node:g,path:O.If(g),flags:b,seekable:!0,position:0,df:g.df,Wi:[],error:!1},d,e);d.df.open&&d.df.open(d);!f.logReadFiles||b&1||(O.$g||(O.$g={}),a in O.$g||(O.$g[a]=1,u("FS.trackingDelegate error on read file: "+a)));try{O.mf.onOpenFile&&(e=0,1!==(b&2097155)&&(e|=O.Mh.Gh.Rh),0!==(b&2097155)&&(e|=O.Mh.Gh.Sh),
+O.mf.onOpenFile(a,e))}catch(m){u("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+m.message)}return d},close:function(a){if(O.ig(a))throw new O.af(8);a.Lf&&(a.Lf=null);try{a.df.close&&a.df.close(a)}catch(b){throw b;}finally{O.ai(a.fd)}a.fd=null},ig:function(a){return null===a.fd},tf:function(a,b,c){if(O.ig(a))throw new O.af(8);if(!a.seekable||!a.df.tf)throw new O.af(70);if(0!=c&&1!=c&&2!=c)throw new O.af(28);a.position=a.df.tf(a,b,c);a.Wi=[];return a.position},read:function(a,
+b,c,d,e){if(0>d||0>e)throw new O.af(28);if(O.ig(a))throw new O.af(8);if(1===(a.flags&2097155))throw new O.af(8);if(O.kf(a.node.mode))throw new O.af(31);if(!a.df.read)throw new O.af(28);var g="undefined"!==typeof e;if(!g)e=a.position;else if(!a.seekable)throw new O.af(70);b=a.df.read(a,b,c,d,e);g||(a.position+=b);return b},write:function(a,b,c,d,e,g){if(0>d||0>e)throw new O.af(28);if(O.ig(a))throw new O.af(8);if(0===(a.flags&2097155))throw new O.af(8);if(O.kf(a.node.mode))throw new O.af(31);if(!a.df.write)throw new O.af(28);
+a.seekable&&a.flags&1024&&O.tf(a,0,2);var k="undefined"!==typeof e;if(!k)e=a.position;else if(!a.seekable)throw new O.af(70);b=a.df.write(a,b,c,d,e,g);k||(a.position+=b);try{if(a.path&&O.mf.onWriteToFile)O.mf.onWriteToFile(a.path)}catch(m){u("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+m.message)}return b},fg:function(a,b,c){if(O.ig(a))throw new O.af(8);if(0>b||0>=c)throw new O.af(28);if(0===(a.flags&2097155))throw new O.af(8);if(!O.isFile(a.node.mode)&&!O.kf(a.node.mode))throw new O.af(43);
+if(!a.df.fg)throw new O.af(138);a.df.fg(a,b,c)},Wf:function(a,b,c,d,e,g){if(0!==(e&2)&&0===(g&2)&&2!==(a.flags&2097155))throw new O.af(2);if(1===(a.flags&2097155))throw new O.af(2);if(!a.df.Wf)throw new O.af(43);return a.df.Wf(a,b,c,d,e,g)},Xf:function(a,b,c,d,e){return a&&a.df.Xf?a.df.Xf(a,b,c,d,e):0},sj:function(){return 0},Uf:function(a,b,c){if(!a.df.Uf)throw new O.af(59);return a.df.Uf(a,b,c)},readFile:function(a,b){b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&
+"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=O.open(a,b.flags);a=O.stat(a).size;var e=new Uint8Array(a);O.read(d,e,0,a,0);"utf8"===b.encoding?c=Ja(e,0):"binary"===b.encoding&&(c=e);O.close(d);return c},writeFile:function(a,b,c){c=c||{};c.flags=c.flags||"w";a=O.open(a,c.flags,c.mode);if("string"===typeof b){var d=new Uint8Array(Ka(b)+1);b=Ia(b,d,0,d.length);O.write(a,d,0,b,void 0,c.Zh)}else if(ArrayBuffer.isView(b))O.write(a,b,0,b.byteLength,void 0,c.Zh);else throw Error("Unsupported data type");
+O.close(a)},cwd:function(){return O.oh},chdir:function(a){a=O.ff(a,{wf:!0});if(null===a.node)throw new O.af(44);if(!O.kf(a.node.mode))throw new O.af(54);var b=O.Jf(a.node,"x");if(b)throw new O.af(b);O.oh=a.path},ci:function(){O.mkdir("/tmp");O.mkdir("/home");O.mkdir("/home/web_user")},bi:function(){O.mkdir("/dev");O.dh(O.Of(1,3),{read:function(){return 0},write:function(b,c,d,e){return e}});O.yg("/dev/null",O.Of(1,3));Xb(O.Of(5,0),$b);Xb(O.Of(6,0),dc);O.yg("/dev/tty",O.Of(5,0));O.yg("/dev/tty1",O.Of(6,
+0));var a=Tb();O.Hf("/dev","random",a);O.Hf("/dev","urandom",a);O.mkdir("/dev/shm");O.mkdir("/dev/shm/tmp")},ei:function(){O.mkdir("/proc");O.mkdir("/proc/self");O.mkdir("/proc/self/fd");O.jf({jf:function(){var a=O.createNode("/proc/self","fd",16895,73);a.cf={lookup:function(b,c){var d=O.zf(+c);if(!d)throw new O.af(8);b={parent:null,jf:{Eh:"fake"},cf:{readlink:function(){return d.path}}};return b.parent=b}};return a}},{},"/proc/self/fd")},fi:function(){f.stdin?O.Hf("/dev","stdin",f.stdin):O.symlink("/dev/tty",
+"/dev/stdin");f.stdout?O.Hf("/dev","stdout",null,f.stdout):O.symlink("/dev/tty","/dev/stdout");f.stderr?O.Hf("/dev","stderr",null,f.stderr):O.symlink("/dev/tty1","/dev/stderr");O.open("/dev/stdin","r");O.open("/dev/stdout","w");O.open("/dev/stderr","w")},rh:function(){O.af||(O.af=function(a,b){this.node=b;this.Ki=function(c){this.ef=c};this.Ki(a);this.message="FS error"},O.af.prototype=Error(),O.af.prototype.constructor=O.af,[44].forEach(function(a){O.Qg[a]=new O.af(a);O.Qg[a].stack="<generic error, no stack>"}))},
+Ni:function(){O.rh();O.Cf=Array(4096);O.jf(P,{},"/");O.ci();O.bi();O.ei();O.ii={MEMFS:P}},gg:function(a,b,c){O.gg.Tg=!0;O.rh();f.stdin=a||f.stdin;f.stdout=b||f.stdout;f.stderr=c||f.stderr;O.fi()},quit:function(){O.gg.Tg=!1;var a=f._fflush;a&&a(0);for(a=0;a<O.streams.length;a++){var b=O.streams[a];b&&O.close(b)}},Rg:function(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c},ej:function(a,b){a=O.Lg(a,b);if(a.exists)return a.object;Eb(a.error);return null},Lg:function(a,b){try{var c=O.ff(a,{wf:!b});a=c.path}catch(e){}var d=
+{wg:!1,exists:!1,error:0,name:null,path:null,object:null,Ci:!1,Ei:null,Di:null};try{c=O.ff(a,{parent:!0}),d.Ci=!0,d.Ei=c.path,d.Di=c.node,d.name=Rb(a),c=O.ff(a,{wf:!b}),d.exists=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.wg="/"===c.path}catch(e){d.error=e.ef}return d},cj:function(a,b){a="string"===typeof a?a:O.If(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=Sb(a,c);try{O.mkdir(d)}catch(e){}a=d}}return d},di:function(a,b,c,d,e){a=Sb("string"===typeof a?a:O.If(a),
+b);return O.create(a,O.Rg(d,e))},mh:function(a,b,c,d,e,g){a=b?Sb("string"===typeof a?a:O.If(a),b):a;d=O.Rg(d,e);e=O.create(a,d);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var k=c.length;b<k;++b)a[b]=c.charCodeAt(b);c=a}O.chmod(e,d|146);a=O.open(e,"w");O.write(a,c,0,c.length,0,g);O.close(a);O.chmod(e,d)}return e},Hf:function(a,b,c,d){a=Sb("string"===typeof a?a:O.If(a),b);b=O.Rg(!!c,!!d);O.Hf.Wg||(O.Hf.Wg=64);var e=O.Of(O.Hf.Wg++,0);O.dh(e,{open:function(g){g.seekable=!1},close:function(){d&&
+d.buffer&&d.buffer.length&&d(10)},read:function(g,k,m,r){for(var q=0,t=0;t<r;t++){try{var w=c()}catch(B){throw new O.af(29);}if(void 0===w&&0===q)throw new O.af(6);if(null===w||void 0===w)break;q++;k[m+t]=w}q&&(g.node.timestamp=Date.now());return q},write:function(g,k,m,r){for(var q=0;q<r;q++)try{d(k[m+q])}catch(t){throw new O.af(29);}r&&(g.node.timestamp=Date.now());return q}});return O.yg(a,b,e)},uh:function(a){if(a.Ug||a.ti||a.link||a.bf)return!0;var b=!0;if("undefined"!==typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
+if(ra)try{a.bf=Zb(ra(a.url),!0),a.gf=a.bf.length}catch(c){b=!1}else throw Error("Cannot load without read() or XMLHttpRequest.");b||Eb(29);return b},bj:function(a,b,c,d,e){function g(){this.Vg=!1;this.Sf=[]}g.prototype.get=function(q){if(!(q>this.length-1||0>q)){var t=q%this.chunkSize;return this.yh(q/this.chunkSize|0)[t]}};g.prototype.Wh=function(q){this.yh=q};g.prototype.kh=function(){var q=new XMLHttpRequest;q.open("HEAD",c,!1);q.send(null);if(!(200<=q.status&&300>q.status||304===q.status))throw Error("Couldn't load "+
+c+". Status: "+q.status);var t=Number(q.getResponseHeader("Content-length")),w,B=(w=q.getResponseHeader("Accept-Ranges"))&&"bytes"===w;q=(w=q.getResponseHeader("Content-Encoding"))&&"gzip"===w;var p=1048576;B||(p=t);var x=this;x.Wh(function(z){var I=z*p,W=(z+1)*p-1;W=Math.min(W,t-1);if("undefined"===typeof x.Sf[z]){var db=x.Sf;if(I>W)throw Error("invalid range ("+I+", "+W+") or no bytes requested!");if(W>t-1)throw Error("only "+t+" bytes available! programmer error!");var K=new XMLHttpRequest;K.open("GET",
+c,!1);t!==p&&K.setRequestHeader("Range","bytes="+I+"-"+W);"undefined"!=typeof Uint8Array&&(K.responseType="arraybuffer");K.overrideMimeType&&K.overrideMimeType("text/plain; charset=x-user-defined");K.send(null);if(!(200<=K.status&&300>K.status||304===K.status))throw Error("Couldn't load "+c+". Status: "+K.status);I=void 0!==K.response?new Uint8Array(K.response||[]):Zb(K.responseText||"",!0);db[z]=I}if("undefined"===typeof x.Sf[z])throw Error("doXHR failed!");return x.Sf[z]});if(q||!t)p=t=1,p=t=this.yh(0).length,
+ya("LazyFiles on gzip forces download of the whole file when length is accessed");this.Uh=t;this.Th=p;this.Vg=!0};if("undefined"!==typeof XMLHttpRequest){if(!la)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var k=new g;Object.defineProperties(k,{length:{get:function(){this.Vg||this.kh();return this.Uh}},chunkSize:{get:function(){this.Vg||this.kh();return this.Th}}});k={Ug:!1,bf:k}}else k={Ug:!1,url:c};var m=O.di(a,b,k,d,
+e);k.bf?m.bf=k.bf:k.url&&(m.bf=null,m.url=k.url);Object.defineProperties(m,{gf:{get:function(){return this.bf.length}}});var r={};Object.keys(m.df).forEach(function(q){var t=m.df[q];r[q]=function(){if(!O.uh(m))throw new O.af(29);return t.apply(null,arguments)}});r.read=function(q,t,w,B,p){if(!O.uh(m))throw new O.af(29);q=q.node.bf;if(p>=q.length)return 0;B=Math.min(q.length-p,B);if(q.slice)for(var x=0;x<B;x++)t[w+x]=q[p+x];else for(x=0;x<B;x++)t[w+x]=q.get(p+x);return B};m.df=r;return m},dj:function(a,
+b,c,d,e,g,k,m,r,q){function t(B){function p(z){q&&q();m||O.mh(a,b,z,d,e,r);g&&g();fb()}var x=!1;f.preloadPlugins.forEach(function(z){!x&&z.canHandle(w)&&(z.handle(B,w,p,function(){k&&k();fb()}),x=!0)});x||p(B)}ec.gg();var w=b?Ub(Sb(a,b)):a;eb();"string"==typeof c?ec.Xi(c,function(B){t(B)},k):t(c)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},gh:function(){return"EM_FS_"+window.location.pathname},hh:20,eg:"FILE_DATA",wj:function(a,b,
+c){b=b||function(){};c=c||function(){};var d=O.indexedDB();try{var e=d.open(O.gh(),O.hh)}catch(g){return c(g)}e.onupgradeneeded=function(){ya("creating db");e.result.createObjectStore(O.eg)};e.onsuccess=function(){var g=e.result.transaction([O.eg],"readwrite"),k=g.objectStore(O.eg),m=0,r=0,q=a.length;a.forEach(function(t){t=k.put(O.Lg(t).object.bf,t);t.onsuccess=function(){m++;m+r==q&&(0==r?b():c())};t.onerror=function(){r++;m+r==q&&(0==r?b():c())}});g.onerror=c};e.onerror=c},mj:function(a,b,c){b=
+b||function(){};c=c||function(){};var d=O.indexedDB();try{var e=d.open(O.gh(),O.hh)}catch(g){return c(g)}e.onupgradeneeded=c;e.onsuccess=function(){var g=e.result;try{var k=g.transaction([O.eg],"readonly")}catch(w){c(w);return}var m=k.objectStore(O.eg),r=0,q=0,t=a.length;a.forEach(function(w){var B=m.get(w);B.onsuccess=function(){O.Lg(w).exists&&O.unlink(w);O.mh(Qb(w),Rb(w),B.result,!0,!0,!0);r++;r+q==t&&(0==q?b():c())};B.onerror=function(){q++;r+q==t&&(0==q?b():c())}});k.onerror=c};e.onerror=c}},
+fc={};
+function hc(a,b,c){try{var d=a(b)}catch(e){if(e&&e.node&&Pb(b)!==Pb(O.If(e.node)))return-54;throw e;}E[c>>2]=d.dev;E[c+4>>2]=0;E[c+8>>2]=d.ino;E[c+12>>2]=d.mode;E[c+16>>2]=d.nlink;E[c+20>>2]=d.uid;E[c+24>>2]=d.gid;E[c+28>>2]=d.rdev;E[c+32>>2]=0;L=[d.size>>>0,(J=d.size,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[c+40>>2]=L[0];E[c+44>>2]=L[1];E[c+48>>2]=4096;E[c+52>>2]=d.blocks;E[c+56>>2]=d.atime.getTime()/1E3|0;E[c+60>>
+2]=0;E[c+64>>2]=d.mtime.getTime()/1E3|0;E[c+68>>2]=0;E[c+72>>2]=d.ctime.getTime()/1E3|0;E[c+76>>2]=0;L=[d.ino>>>0,(J=d.ino,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[c+80>>2]=L[0];E[c+84>>2]=L[1];return 0}var ic=void 0;function Q(){ic+=4;return E[ic-4>>2]}function jc(a){a=O.zf(a);if(!a)throw new O.af(8);return a}
+function kc(a,b,c,d,e){if(l)return N(3,1,a,b,c,d,e);try{e=0;for(var g=b?E[b>>2]:0,k=b?E[b+4>>2]:0,m=c?E[c>>2]:0,r=c?E[c+4>>2]:0,q=d?E[d>>2]:0,t=d?E[d+4>>2]:0,w=0,B=0,p=0,x=0,z=0,I=0,W=(b?E[b>>2]:0)|(c?E[c>>2]:0)|(d?E[d>>2]:0),db=(b?E[b+4>>2]:0)|(c?E[c+4>>2]:0)|(d?E[d+4>>2]:0),K=0;K<a;K++){var Y=1<<K%32;if(32>K?W&Y:db&Y){var ia=O.zf(K);if(!ia)throw new O.af(8);var na=5;ia.df.Zf&&(na=ia.df.Zf(ia));na&1&&(32>K?g&Y:k&Y)&&(32>K?w|=Y:B|=Y,e++);na&4&&(32>K?m&Y:r&Y)&&(32>K?p|=Y:x|=Y,e++);na&2&&(32>K?q&Y:
+t&Y)&&(32>K?z|=Y:I|=Y,e++)}}b&&(E[b>>2]=w,E[b+4>>2]=B);c&&(E[c>>2]=p,E[c+4>>2]=x);d&&(E[d>>2]=z,E[d+4>>2]=I);return e}catch(ua){return"undefined"!==typeof O&&ua instanceof O.af||n(ua),-ua.ef}}function lc(a,b){if(l)return N(4,1,a,b);try{a=C(a);if(b&-8)var c=-28;else{var d;(d=O.ff(a,{wf:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&O.Jf(d,a)?-2:0):c=-44}return c}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}
+function mc(a,b,c){if(l)return N(5,1,a,b,c);ic=c;try{var d=jc(a);switch(b){case 0:var e=Q();return 0>e?-28:O.open(d.path,d.flags,0,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=Q(),d.flags|=e,0;case 12:return e=Q(),Qa[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Eb(28),-1;default:return-28}}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function nc(a,b){if(l)return N(6,1,a,b);try{var c=jc(a);return hc(O.stat,c.path,b)}catch(d){return"undefined"!==typeof O&&d instanceof O.af||n(d),-d.ef}}
+function oc(a,b,c){if(l)return N(7,1,a,b,c);try{var d=jc(a);d.Lf||(d.Lf=O.readdir(d.path));a=0;for(var e=O.tf(d,0,1),g=Math.floor(e/280);g<d.Lf.length&&a+280<=c;){var k=d.Lf[g];if("."===k[0]){var m=1;var r=4}else{var q=O.Bf(d.node,k);m=q.id;r=O.hg(q.mode)?2:O.kf(q.mode)?4:O.Mf(q.mode)?10:8}L=[m>>>0,(J=m,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[b+a>>2]=L[0];E[b+a+4>>2]=L[1];L=[280*(g+1)>>>0,(J=280*(g+1),1<=+Math.abs(J)?
+0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[b+a+8>>2]=L[0];E[b+a+12>>2]=L[1];Qa[b+a+16>>1]=280;y[b+a+18>>0]=r;Ia(k,v,b+a+19,256);a+=280;g+=1}O.tf(d,280*g,0);return a}catch(t){return"undefined"!==typeof O&&t instanceof O.af||n(t),-t.ef}}function pc(a,b){if(l)return N(8,1,a,b);try{return qc(b,0,136),E[b>>2]=1,E[b+4>>2]=2,E[b+8>>2]=3,E[b+12>>2]=4,0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}
+function rc(a,b,c){if(l)return N(9,1,a,b,c);ic=c;try{var d=jc(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:if(!d.tty)return-59;var e=Q();return E[e>>2]=0;case 21520:return d.tty?-28:-59;case 21531:return e=Q(),O.Uf(d,b,e);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:n("bad ioctl syscall "+b)}}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function sc(a,b){if(l)return N(10,1,a,b);try{return a=C(a),hc(O.lstat,a,b)}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function tc(a,b){if(l)return N(11,1,a,b);try{return a=C(a),a=Pb(a),"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),O.mkdir(a,b,0),0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}
+function uc(a,b,c,d,e,g){if(l)return N(12,1,a,b,c,d,e,g);try{a:{g<<=12;var k=!1;if(0!==(d&16)&&0!==a%16384)var m=-28;else{if(0!==(d&32)){var r=vc(16384,b);if(!r){m=-48;break a}qc(r,0,b);k=!0}else{var q=O.zf(e);if(!q){m=-8;break a}var t=O.Wf(q,a,b,g,c,d);r=t.Hi;k=t.Jg}fc[r]={xi:r,ui:b,Jg:k,fd:e,Gi:c,flags:d,offset:g};m=r}}return m}catch(w){return"undefined"!==typeof O&&w instanceof O.af||n(w),-w.ef}}
+function wc(a,b){if(l)return N(13,1,a,b);try{if(-1===(a|0)||0===b)var c=-28;else{var d=fc[a];if(d&&b===d.ui){var e=O.zf(d.fd);if(d.Gi&2){var g=d.flags,k=d.offset,m=v.slice(a,a+b);O.Xf(e,m,k,b,g)}fc[a]=null;d.Jg&&zb(d.xi)}c=0}return c}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),-r.ef}}function xc(a,b,c){if(l)return N(14,1,a,b,c);ic=c;try{var d=C(a),e=Q();return O.open(d,b,e).fd}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function yc(a,b,c){if(l)return N(15,1,a,b,c);try{for(var d=c=0;d<b;d++){var e=a+8*d,g=Qa[e+4>>1],k=32,m=O.zf(E[e>>2]);m&&(k=5,m.df.Zf&&(k=m.df.Zf(m)));(k&=g|24)&&c++;Qa[e+6>>1]=k}return c}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),-r.ef}}function zc(a,b,c,d){if(l)return N(16,1,a,b,c,d);try{return d&&(E[d>>2]=-1,E[d+4>>2]=-1,E[d+8>>2]=-1,E[d+12>>2]=-1),0}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}
+function Ac(a,b,c){if(l)return N(17,1,a,b,c);try{var d=jc(a);return O.read(d,y,b,c)}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}function Bc(a,b){if(l)return N(18,1,a,b);try{return a=C(a),b=C(b),O.rename(a,b),0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function Cc(a){if(l)return N(19,1,a);try{return a=C(a),O.rmdir(a),0}catch(b){return"undefined"!==typeof O&&b instanceof O.af||n(b),-b.ef}}
+var R={jf:function(){f.websocket=f.websocket&&"object"===typeof f.websocket?f.websocket:{};f.websocket.Ig={};f.websocket.on=function(a,b){"function"===typeof b&&(this.Ig[a]=b);return this};f.websocket.emit=function(a,b){"function"===typeof this.Ig[a]&&this.Ig[a].call(this,b)};return O.createNode(null,"/",16895,0)},createSocket:function(a,b,c){b&=-526337;c&&assert(1==b==(6==c));a={family:a,type:b,protocol:c,lf:null,error:null,ng:{},pending:[],ag:[],pf:R.qf};b=R.zg();c=O.createNode(R.root,b,49152,0);
+c.bg=a;b=O.nh({path:b,node:c,flags:O.Dh("r+"),seekable:!1,df:R.df});a.stream=b;return a},mi:function(a){return(a=O.zf(a))&&O.isSocket(a.node.mode)?a.node.bg:null},df:{Zf:function(a){a=a.node.bg;return a.pf.Zf(a)},Uf:function(a,b,c){a=a.node.bg;return a.pf.Uf(a,b,c)},read:function(a,b,c,d){a=a.node.bg;d=a.pf.bh(a,d);if(!d)return 0;b.set(d.buffer,c);return d.buffer.length},write:function(a,b,c,d){a=a.node.bg;return a.pf.fh(a,b,c,d)},close:function(a){a=a.node.bg;a.pf.close(a)}},zg:function(){R.zg.current||
+(R.zg.current=0);return"socket["+R.zg.current++ +"]"},qf:{tg:function(a,b,c){if("object"===typeof b){var d=b;c=b=null}if(d)if(d._socket)b=d._socket.remoteAddress,c=d._socket.remotePort;else{c=/ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url);if(!c)throw Error("WebSocket URL must be in the format ws(s)://address:port");b=c[1];c=parseInt(c[2],10)}else try{var e=f.websocket&&"object"===typeof f.websocket,g="ws:#".replace("#","//");e&&"string"===typeof f.websocket.url&&(g=f.websocket.url);if("ws://"===g||"wss://"===
+g){var k=b.split("/");g=g+k[0]+":"+c+"/"+k.slice(1).join("/")}k="binary";e&&"string"===typeof f.websocket.subprotocol&&(k=f.websocket.subprotocol);var m=void 0;"null"!==k&&(k=k.replace(/^ +| +$/g,"").split(/ *, */),m=h?{protocol:k.toString()}:k);e&&null===f.websocket.subprotocol&&(m=void 0);d=new (h?require("ws"):WebSocket)(g,m);d.binaryType="arraybuffer"}catch(r){throw new O.af(23);}b={hf:b,port:c,socket:d,ug:[]};R.qf.jh(a,b);R.qf.ni(a,b);2===a.type&&"undefined"!==typeof a.Qf&&b.ug.push(new Uint8Array([255,
+255,255,255,112,111,114,116,(a.Qf&65280)>>8,a.Qf&255]));return b},vg:function(a,b,c){return a.ng[b+":"+c]},jh:function(a,b){a.ng[b.hf+":"+b.port]=b},Hh:function(a,b){delete a.ng[b.hf+":"+b.port]},ni:function(a,b){function c(){f.websocket.emit("open",a.stream.fd);try{for(var g=b.ug.shift();g;)b.socket.send(g),g=b.ug.shift()}catch(k){b.socket.close()}}function d(g){if("string"===typeof g)g=(new TextEncoder).encode(g);else{assert(void 0!==g.byteLength);if(0==g.byteLength)return;g=new Uint8Array(g)}var k=
+e;e=!1;k&&10===g.length&&255===g[0]&&255===g[1]&&255===g[2]&&255===g[3]&&112===g[4]&&111===g[5]&&114===g[6]&&116===g[7]?(g=g[8]<<8|g[9],R.qf.Hh(a,b),b.port=g,R.qf.jh(a,b)):(a.ag.push({hf:b.hf,port:b.port,data:g}),f.websocket.emit("message",a.stream.fd))}var e=!0;h?(b.socket.on("open",c),b.socket.on("message",function(g,k){k.Yi&&d((new Uint8Array(g)).buffer)}),b.socket.on("close",function(){f.websocket.emit("close",a.stream.fd)}),b.socket.on("error",function(){a.error=14;f.websocket.emit("error",[a.stream.fd,
+a.error,"ECONNREFUSED: Connection refused"])})):(b.socket.onopen=c,b.socket.onclose=function(){f.websocket.emit("close",a.stream.fd)},b.socket.onmessage=function(g){d(g.data)},b.socket.onerror=function(){a.error=14;f.websocket.emit("error",[a.stream.fd,a.error,"ECONNREFUSED: Connection refused"])})},Zf:function(a){if(1===a.type&&a.lf)return a.pending.length?65:0;var b=0,c=1===a.type?R.qf.vg(a,a.sf,a.vf):null;if(a.ag.length||!c||c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)b|=
+65;if(!c||c&&c.socket.readyState===c.socket.OPEN)b|=4;if(c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)b|=16;return b},Uf:function(a,b,c){switch(b){case 21531:return b=0,a.ag.length&&(b=a.ag[0].data.length),E[c>>2]=b,0;default:return 28}},close:function(a){if(a.lf){try{a.lf.close()}catch(e){}a.lf=null}for(var b=Object.keys(a.ng),c=0;c<b.length;c++){var d=a.ng[b[c]];try{d.socket.close()}catch(e){}R.qf.Hh(a,d)}return 0},bind:function(a,b,c){if("undefined"!==typeof a.Bg||
+"undefined"!==typeof a.Qf)throw new O.af(28);a.Bg=b;a.Qf=c;if(2===a.type){a.lf&&(a.lf.close(),a.lf=null);try{a.pf.listen(a,0)}catch(d){if(!(d instanceof O.af))throw d;if(138!==d.ef)throw d;}}},connect:function(a,b,c){if(a.lf)throw new O.af(138);if("undefined"!==typeof a.sf&&"undefined"!==typeof a.vf){var d=R.qf.vg(a,a.sf,a.vf);if(d){if(d.socket.readyState===d.socket.CONNECTING)throw new O.af(7);throw new O.af(30);}}b=R.qf.tg(a,b,c);a.sf=b.hf;a.vf=b.port;throw new O.af(26);},listen:function(a){if(!h)throw new O.af(138);
+if(a.lf)throw new O.af(28);var b=require("ws").Server;a.lf=new b({host:a.Bg,port:a.Qf});f.websocket.emit("listen",a.stream.fd);a.lf.on("connection",function(c){if(1===a.type){var d=R.createSocket(a.family,a.type,a.protocol);c=R.qf.tg(d,c);d.sf=c.hf;d.vf=c.port;a.pending.push(d);f.websocket.emit("connection",d.stream.fd)}else R.qf.tg(a,c),f.websocket.emit("connection",a.stream.fd)});a.lf.on("closed",function(){f.websocket.emit("close",a.stream.fd);a.lf=null});a.lf.on("error",function(){a.error=23;
+f.websocket.emit("error",[a.stream.fd,a.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(a){if(!a.lf)throw new O.af(28);var b=a.pending.shift();b.stream.flags=a.stream.flags;return b},ij:function(a,b){if(b){if(void 0===a.sf||void 0===a.vf)throw new O.af(53);b=a.sf;a=a.vf}else b=a.Bg||0,a=a.Qf||0;return{hf:b,port:a}},fh:function(a,b,c,d,e,g){if(2===a.type){if(void 0===e||void 0===g)e=a.sf,g=a.vf;if(void 0===e||void 0===g)throw new O.af(17);}else e=a.sf,g=a.vf;var k=R.qf.vg(a,e,g);if(1===
+a.type){if(!k||k.socket.readyState===k.socket.CLOSING||k.socket.readyState===k.socket.CLOSED)throw new O.af(53);if(k.socket.readyState===k.socket.CONNECTING)throw new O.af(6);}ArrayBuffer.isView(b)&&(c+=b.byteOffset,b=b.buffer);var m;b instanceof SharedArrayBuffer?m=(new Uint8Array(new Uint8Array(b.slice(c,c+d)))).buffer:m=b.slice(c,c+d);if(2===a.type&&(!k||k.socket.readyState!==k.socket.OPEN))return k&&k.socket.readyState!==k.socket.CLOSING&&k.socket.readyState!==k.socket.CLOSED||(k=R.qf.tg(a,e,
+g)),k.ug.push(m),d;try{return k.socket.send(m),d}catch(r){throw new O.af(28);}},bh:function(a,b){if(1===a.type&&a.lf)throw new O.af(53);var c=a.ag.shift();if(!c){if(1===a.type){if(a=R.qf.vg(a,a.sf,a.vf)){if(a.socket.readyState===a.socket.CLOSING||a.socket.readyState===a.socket.CLOSED)return null;throw new O.af(6);}throw new O.af(53);}throw new O.af(6);}var d=c.data.byteLength||c.data.length,e=c.data.byteOffset||0,g=c.data.buffer||c.data;b=Math.min(b,d);var k={buffer:new Uint8Array(g,e,b),hf:c.hf,
+port:c.port};1===a.type&&b<d&&(c.data=new Uint8Array(g,e+b,d-b),a.ag.unshift(c));return k}}};function Dc(a){a=a.split(".");for(var b=0;4>b;b++){var c=Number(a[b]);if(isNaN(c))return null;a[b]=c}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}
+function Ec(a){var b,c,d=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(a))return null;if("::"===a)return[0,0,0,0,0,0,0,0];a=0===a.indexOf("::")?a.replace("::","Z:"):a.replace("::",":Z:");0<a.indexOf(".")?(a=a.replace(/[.]/g,":"),a=a.split(":"),a[a.length-4]=parseInt(a[a.length-4])+256*parseInt(a[a.length-3]),a[a.length-3]=parseInt(a[a.length-2])+256*parseInt(a[a.length-
+1]),a=a.slice(0,a.length-2)):a=a.split(":");for(b=c=0;b<a.length;b++)if("string"===typeof a[b])if("Z"===a[b]){for(c=0;c<8-a.length+1;c++)d[b+c]=0;--c}else d[b+c]=Fc(parseInt(a[b],16));else d[b+c]=a[b];return[d[1]<<16|d[0],d[3]<<16|d[2],d[5]<<16|d[4],d[7]<<16|d[6]]}var Gc=1,Hc={},Ic={};
+function Jc(a){var b=Dc(a);if(null!==b)return a;b=Ec(a);if(null!==b)return a;Hc[a]?b=Hc[a]:(b=Gc++,assert(65535>b,"exceeded max address mappings of 65535"),b="172.29."+(b&255)+"."+(b&65280),Ic[b]=a,Hc[a]=b);return b}function Kc(a){return Ic[a]?Ic[a]:null}function Lc(a){return(a&255)+"."+(a>>8&255)+"."+(a>>16&255)+"."+(a>>24&255)}
+function Mc(a){var b="",c,d=0,e=0,g=0,k=0;a=[a[0]&65535,a[0]>>16,a[1]&65535,a[1]>>16,a[2]&65535,a[2]>>16,a[3]&65535,a[3]>>16];var m=!0;for(c=0;5>c;c++)if(0!==a[c]){m=!1;break}if(m){c=Lc(a[6]|a[7]<<16);if(-1===a[5])return"::ffff:"+c;if(0===a[5])return"0.0.0.0"===c&&(c=""),"0.0.0.1"===c&&(c="1"),"::"+c}for(c=0;8>c;c++)0===a[c]&&(1<c-e&&(k=0),e=c,k++),k>d&&(d=k,g=c-d+1);for(c=0;8>c;c++)1<d&&0===a[c]&&c>=g&&c<g+d?c===g&&(b+=":",0===g&&(b+=":")):(b+=Number(Nc(a[c]&65535)).toString(16),b+=7>c?":":"");return b}
+function Oc(a,b){var c=Qa[a>>1],d=Nc(Ra[a+2>>1]);switch(c){case 2:if(16!==b)return{ef:28};a=E[a+4>>2];a=Lc(a);break;case 10:if(28!==b)return{ef:28};a=[E[a+8>>2],E[a+12>>2],E[a+16>>2],E[a+20>>2]];a=Mc(a);break;default:return{ef:5}}return{family:c,hf:a,port:d}}
+function Pc(a,b,c,d){switch(b){case 2:c=Dc(c);Qa[a>>1]=b;E[a+4>>2]=c;Qa[a+2>>1]=Fc(d);break;case 10:c=Ec(c);E[a>>2]=b;E[a+8>>2]=c[0];E[a+12>>2]=c[1];E[a+16>>2]=c[2];E[a+20>>2]=c[3];Qa[a+2>>1]=Fc(d);E[a+4>>2]=0;E[a+24>>2]=0;break;default:return{ef:5}}return{}}
+function Qc(a,b){if(l)return N(20,1,a,b);try{ic=b;b=function(){var aa=R.mi(Q());if(!aa)throw new O.af(8);return aa};var c=function(aa){var pd=Q(),ge=Q();if(aa&&0===pd)return null;aa=Oc(pd,ge);if(aa.ef)throw new O.af(aa.ef);aa.hf=Kc(aa.hf)||aa.hf;return aa};switch(a){case 1:var d=Q(),e=Q(),g=Q(),k=R.createSocket(d,e,g);return k.stream.fd;case 2:k=b();var m=c();k.pf.bind(k,m.hf,m.port);return 0;case 3:return k=b(),m=c(),k.pf.connect(k,m.hf,m.port),0;case 4:k=b();var r=Q();k.pf.listen(k,r);return 0;
+case 5:k=b();var q=Q();Q();var t=k.pf.accept(k);q&&Pc(q,t.family,Jc(t.sf),t.vf);return t.stream.fd;case 6:return k=b(),q=Q(),Q(),Pc(q,k.family,Jc(k.Bg||"0.0.0.0"),k.Qf),0;case 7:k=b();q=Q();Q();if(!k.sf)return-53;Pc(q,k.family,Jc(k.sf),k.vf);return 0;case 11:k=b();var w=Q(),B=Q();Q();var p=c(!0);return p?k.pf.fh(k,y,w,B,p.hf,p.port):O.write(k.stream,y,w,B);case 12:k=b();var x=Q(),z=Q();Q();q=Q();Q();var I=k.pf.bh(k,z);if(!I)return 0;q&&Pc(q,k.family,Jc(I.hf),I.port);v.set(I.buffer,x);return I.buffer.byteLength;
+case 14:return-50;case 15:k=b();var W=Q(),db=Q(),K=Q(),Y=Q();return 1===W&&4===db?(E[K>>2]=k.error,E[Y>>2]=4,k.error=null,0):-50;case 16:k=b();w=Q();Q();var ia=E[w+8>>2],na=E[w+12>>2],ua=E[w>>2],he=E[w+4>>2];if(ua){m=Oc(ua,he);if(m.ef)return-m.ef;var ie=m.port;q=Kc(m.hf)||m.hf}for(var Oa=0,X=0;X<na;X++)Oa+=E[ia+(8*X+4)>>2];var qd=new Uint8Array(Oa);for(X=B=0;X<na;X++){var ac=E[ia+8*X>>2],bc=E[ia+(8*X+4)>>2];for(x=0;x<bc;x++)qd[B++]=y[ac+x>>0]}return k.pf.fh(k,qd,0,Oa,q,ie);case 17:k=b();w=Q();Q();
+ia=E[w+8>>2];na=E[w+12>>2];for(X=Oa=0;X<na;X++)Oa+=E[ia+(8*X+4)>>2];I=k.pf.bh(k,Oa);if(!I)return 0;(ua=E[w>>2])&&Pc(ua,k.family,Jc(I.hf),I.port);k=0;var cc=I.buffer.byteLength;for(X=0;0<cc&&X<na;X++)if(ac=E[ia+8*X>>2],bc=E[ia+(8*X+4)>>2])B=Math.min(bc,cc),x=I.buffer.subarray(k,k+B),v.set(x,ac+k),k+=B,cc-=B;return k;default:return-52}}catch(aa){return"undefined"!==typeof O&&aa instanceof O.af||n(aa),-aa.ef}}
+function Rc(a,b){if(l)return N(21,1,a,b);try{return a=C(a),hc(O.stat,a,b)}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function Sc(a){if(l)return N(22,1,a);try{return a=C(a),O.unlink(a),0}catch(b){return"undefined"!==typeof O&&b instanceof O.af||n(b),-b.ef}}function Tc(){void 0===Tc.start&&(Tc.start=Date.now());return 1E3*(Date.now()-Tc.start)|0}
+function Uc(){h||la||(za||(za={}),za["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]||(za["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]=1,u("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")))}
+function Vc(a,b,c){if(0>=a||a>y.length||a&1)return-28;if(ka){if(Atomics.load(E,a>>2)!=b)return-6;var d=performance.now();c=d+c;for(Atomics.exchange(E,M.Vf>>2,a);;){d=performance.now();if(d>c)return Atomics.exchange(E,M.Vf>>2,0),-73;d=Atomics.exchange(E,M.Vf>>2,0);if(0==d)break;Ab();if(Atomics.load(E,a>>2)!=b)return-6;Atomics.exchange(E,M.Vf>>2,a)}return 0}a=Atomics.wait(E,a>>2,b,c);if("timed-out"===a)return-73;if("not-equal"===a)return-6;if("ok"===a)return 0;throw"Atomics.wait returned an unexpected value "+
+a;}function Wc(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,g){b.drawArraysInstancedANGLE(c,d,e,g)},a.drawElementsInstanced=function(c,d,e,g,k){b.drawElementsInstancedANGLE(c,d,e,g,k)})}
+function Xc(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Yc(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}var Zc=1,$c=[],S=[],ad=[],bd=[],cd=[],T=[],dd=[],ed=[],fd=[],gd={},hd={},id=4;
+function U(a){jd||(jd=a)}function kd(a){for(var b=Zc++,c=a.length;c<b;c++)a[c]=null;return b}
+function ld(a){a||(a=md);if(!a.oi){a.oi=!0;var b=a.qg;Wc(b);Xc(b);Yc(b);b.uf=b.getExtension("EXT_disjoint_timer_query");b.rj=b.getExtension("WEBGL_multi_draw");var c="OES_texture_float OES_texture_half_float OES_standard_derivatives OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture OES_element_index_uint EXT_texture_filter_anisotropic EXT_frag_depth WEBGL_draw_buffers ANGLE_instanced_arrays OES_texture_float_linear OES_texture_half_float_linear EXT_blend_minmax EXT_shader_texture_lod EXT_texture_norm16 WEBGL_compressed_texture_pvrtc EXT_color_buffer_half_float WEBGL_color_buffer_float EXT_sRGB WEBGL_compressed_texture_etc1 EXT_disjoint_timer_query WEBGL_compressed_texture_etc WEBGL_compressed_texture_astc EXT_color_buffer_float WEBGL_compressed_texture_s3tc_srgb EXT_disjoint_timer_query_webgl2 WEBKIT_WEBGL_compressed_texture_pvrtc".split(" ");(b.getSupportedExtensions()||
+[]).forEach(function(d){-1!=c.indexOf(d)&&b.getExtension(d)})}}var jd,md,nd=[];function od(a,b,c,d){for(var e=0;e<a;e++){var g=V[c](),k=g&&kd(d);g?(g.name=k,d[k]=g):U(1282);E[b+4*e>>2]=k}}function rd(a,b,c,d,e,g,k,m){b=S[b];if(a=V[a](b,c))d=m&&Ia(a.name,v,m,d),e&&(E[e>>2]=d),g&&(E[g>>2]=a.size),k&&(E[k>>2]=a.type)}function sd(a,b){F[a>>2]=b;F[a+4>>2]=(b-F[a>>2])/4294967296}
+function td(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&U(1280);return;case 36345:d=0;break;case 34466:var e=V.getParameter(34467);d=e?e.length:0}if(void 0===d)switch(e=V.getParameter(a),typeof e){case "number":d=e;break;case "boolean":d=e?1:0;break;case "string":U(1280);return;case "object":if(null===e)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:d=0;break;default:U(1280);return}else{if(e instanceof Float32Array||
+e instanceof Uint32Array||e instanceof Int32Array||e instanceof Array){for(a=0;a<e.length;++a)switch(c){case 0:E[b+4*a>>2]=e[a];break;case 2:G[b+4*a>>2]=e[a];break;case 4:y[b+a>>0]=e[a]?1:0}return}try{d=e.name|0}catch(g){U(1280);u("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+g+")");return}}break;default:U(1280);u("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+e+" of type "+typeof e+"!");return}switch(c){case 1:sd(b,
+d);break;case 0:E[b>>2]=d;break;case 2:G[b>>2]=d;break;case 4:y[b>>0]=d?1:0}}else U(1281)}function ud(a){var b=Ka(a)+1,c=Ma(b);Ia(a,v,c,b);return c}function vd(a,b,c,d){if(c)if(a=V.getUniform(S[a],T[b]),"number"==typeof a||"boolean"==typeof a)switch(d){case 0:E[c>>2]=a;break;case 2:G[c>>2]=a}else for(b=0;b<a.length;b++)switch(d){case 0:E[c+4*b>>2]=a[b];break;case 2:G[c+4*b>>2]=a[b]}else U(1281)}
+function wd(a,b,c,d){if(c)if(a=V.getVertexAttrib(a,b),34975==b)E[c>>2]=a&&a.name;else if("number"==typeof a||"boolean"==typeof a)switch(d){case 0:E[c>>2]=a;break;case 2:G[c>>2]=a;break;case 5:E[c>>2]=Math.fround(a)}else for(b=0;b<a.length;b++)switch(d){case 0:E[c+4*b>>2]=a[b];break;case 2:G[c+4*b>>2]=a[b];break;case 5:E[c+4*b>>2]=Math.fround(a[b])}else U(1281)}
+function xd(a,b,c,d,e){a-=5120;a=1==a?v:4==a?E:6==a?G:5==a||28922==a?F:Ra;var g=31-Math.clz32(a.BYTES_PER_ELEMENT),k=id;return a.subarray(e>>g,e+d*(c*({5:3,6:4,8:2,29502:3,29504:4}[b-6402]||1)*(1<<g)+k-1&-k)>>g)}var yd=[],zd=[];function N(a,b){for(var c=arguments.length-2,d=A(),e=Ha(8*c),g=e>>3,k=0;k<c;k++)Sa[g+k]=arguments[2+k];c=Ad(a,c,e,b);D(d);return c}var Bd=[],Cd=[],Dd=[0,"undefined"!==typeof document?document:0,"undefined"!==typeof window?window:0];
+function Ed(a){a=2<a?C(a):a;return Dd[a]||("undefined"!==typeof document?document.querySelector(a):void 0)}
+function Fd(a,b,c){var d=Ed(a);if(!d)return-4;d.sg&&(E[d.sg>>2]=b,E[d.sg+4>>2]=c);if(d.Fh||!d.aj)d.Fh&&(d=d.Fh),a=!1,d.rg&&d.rg.qg&&(a=d.rg.qg.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===d.width&&a[3]===d.height),d.width=b,d.height=c,a&&d.rg.qg.viewport(0,0,b,c);else{if(d.sg){a=a?C(a):"";d=E[d.sg+8>>2];var e=A(),g=Ha(12),k=0;a&&(k=ud(a));E[g>>2]=k;E[g+4>>2]=b;E[g+8>>2]=c;Gd(0,d,657457152,0,k,g);D(e);return 1}return-4}return 0}function Hd(a,b,c){return l?N(23,1,a,b,c):Fd(a,b,c)}
+var Id=["default","low-power","high-performance"],Jd={};function Kd(){if(!Ld){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ha||"./this.program"},b;for(b in Jd)a[b]=Jd[b];var c=[];for(b in a)c.push(b+"="+a[b]);Ld=c}return Ld}var Ld;
+function Md(a){if(l)return N(24,1,a);try{var b=jc(a);O.close(b);return 0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),c.ef}}function Nd(a,b){if(l)return N(25,1,a,b);try{var c=jc(a);y[b>>0]=c.tty?2:O.kf(c.mode)?3:O.Mf(c.mode)?7:4;return 0}catch(d){return"undefined"!==typeof O&&d instanceof O.af||n(d),d.ef}}
+function Od(a,b,c,d){if(l)return N(26,1,a,b,c,d);try{a:{for(var e=jc(a),g=a=0;g<c;g++){var k=E[b+(8*g+4)>>2],m=O.read(e,y,E[b+8*g>>2],k,void 0);if(0>m){var r=-1;break a}a+=m;if(m<k)break}r=a}E[d>>2]=r;return 0}catch(q){return"undefined"!==typeof O&&q instanceof O.af||n(q),q.ef}}
+function Pd(a,b,c,d,e){if(l)return N(27,1,a,b,c,d,e);try{var g=jc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;O.tf(g,a,d);L=[g.position>>>0,(J=g.position,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[e>>2]=L[0];E[e+4>>2]=L[1];g.Lf&&0===a&&0===d&&(g.Lf=null);return 0}catch(k){return"undefined"!==typeof O&&k instanceof O.af||n(k),k.ef}}
+function Qd(a,b,c,d){if(l)return N(28,1,a,b,c,d);try{a:{for(var e=jc(a),g=a=0;g<c;g++){var k=O.write(e,y,E[b+8*g>>2],E[b+(8*g+4)>>2],void 0);if(0>k){var m=-1;break a}a+=k}m=a}E[d>>2]=m;return 0}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),r.ef}}var Rd={};
+function Sd(a){Sd.buffer||(Sd.buffer=Ma(256),Rd["0"]="Success",Rd["-1"]="Invalid value for 'ai_flags' field",Rd["-2"]="NAME or SERVICE is unknown",Rd["-3"]="Temporary failure in name resolution",Rd["-4"]="Non-recoverable failure in name res",Rd["-6"]="'ai_family' not supported",Rd["-7"]="'ai_socktype' not supported",Rd["-8"]="SERVICE not supported for 'ai_socktype'",Rd["-10"]="Memory allocation failure",Rd["-11"]="System error returned in 'errno'",Rd["-12"]="Argument buffer overflow");var b="Unknown error";
+a in Rd&&(255<Rd[a].length?b="Message too long":b=Rd[a]);Pa(b,Sd.buffer);return Sd.buffer}
+function Td(a,b,c,d){function e(w,B,p,x,z,I){var W=10===w?28:16;z=10===w?Mc(z):Lc(z);W=Ma(W);z=Pc(W,w,z,I);assert(!z.ef);z=Ma(32);E[z+4>>2]=w;E[z+8>>2]=B;E[z+12>>2]=p;E[z+24>>2]=x;E[z+20>>2]=W;E[z+16>>2]=10===w?28:16;E[z+28>>2]=0;return z}if(l)return N(29,1,a,b,c,d);var g=0,k=0,m=0,r=0,q=0,t=0;c&&(m=E[c>>2],r=E[c+4>>2],q=E[c+8>>2],t=E[c+12>>2]);q&&!t&&(t=2===q?17:6);!q&&t&&(q=17===t?2:1);0===t&&(t=6);0===q&&(q=1);if(!a&&!b)return-2;if(m&-1088||0!==c&&E[c>>2]&2&&!a)return-1;if(m&32)return-2;if(0!==
+q&&1!==q&&2!==q)return-7;if(0!==r&&2!==r&&10!==r)return-6;if(b&&(b=C(b),k=parseInt(b,10),isNaN(k)))return m&1024?-2:-8;if(!a)return 0===r&&(r=2),0===(m&1)&&(2===r?g=Ud(2130706433):g=[0,0,0,1]),a=e(r,q,t,null,g,k),E[d>>2]=a,0;a=C(a);g=Dc(a);if(null!==g)if(0===r||2===r)r=2;else if(10===r&&m&8)g=[0,0,Ud(65535),g],r=10;else return-2;else if(g=Ec(a),null!==g)if(0===r||10===r)r=10;else return-2;if(null!=g)return a=e(r,q,t,a,g,k),E[d>>2]=a,0;if(m&4)return-2;a=Jc(a);g=Dc(a);0===r?r=2:10===r&&(g=[0,0,Ud(65535),
+g]);a=e(r,q,t,null,g,k);E[d>>2]=a;return 0}
+function Bb(a){if(l)throw"Internal Error! spawnThread() can only ever be called from main application thread!";var b=M.li();if(void 0!==b.yf)throw"Internal error!";if(!a.$f)throw"Internal error, no pthread ptr!";M.Kf.push(b);for(var c=Ma(512),d=0;128>d;++d)E[c+4*d>>2]=0;var e=a.Rf+a.cg;d=M.Ef[a.$f]={worker:b,Rf:a.Rf,cg:a.cg,Kg:a.Kg,Lh:a.$f,threadInfoStruct:a.$f};var g=d.threadInfoStruct>>2;Atomics.store(F,g,0);Atomics.store(F,g+1,0);Atomics.store(F,g+2,0);Atomics.store(F,g+17,a.detached);Atomics.store(F,
+g+26,c);Atomics.store(F,g+12,0);Atomics.store(F,g+10,d.threadInfoStruct);Atomics.store(F,g+11,42);Atomics.store(F,g+27,a.cg);Atomics.store(F,g+21,a.cg);Atomics.store(F,g+20,e);Atomics.store(F,g+29,e);Atomics.store(F,g+30,a.detached);Atomics.store(F,g+32,a.Ih);Atomics.store(F,g+33,a.Jh);c=Vd()+40;Atomics.store(F,g+44,c);b.yf=d;var k={cmd:"run",start_routine:a.Mi,arg:a.Tf,threadInfoStruct:a.$f,selfThreadId:a.$f,parentThreadId:a.Fi,stackBase:a.Rf,stackSize:a.cg};b.og=function(){k.time=performance.now();
+b.postMessage(k,a.Vi)};b.loaded&&(b.og(),delete b.og)}function Wd(){return pb|0}f._pthread_self=Wd;
+function Xd(a,b){if(!a)return u("pthread_join attempted on a null thread pointer!"),71;if(l&&selfThreadId==a)return u("PThread "+a+" is attempting to join to itself!"),16;if(!l&&M.xf==a)return u("Main thread "+a+" is attempting to join to itself!"),16;if(E[a+12>>2]!==a)return u("pthread_join attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;if(Atomics.load(F,a+68>>2))return u("Attempted to join thread "+a+", which was already detached!"),28;for(Uc();;){var c=
+Atomics.load(F,a>>2);if(1==c)return c=Atomics.load(F,a+4>>2),b&&(E[b>>2]=c),Atomics.store(F,a+68>>2,1),l?postMessage({cmd:"cleanupThread",thread:a}):vb(a),0;if(l&&threadInfoStruct&&!Atomics.load(F,threadInfoStruct+60>>2)&&2==Atomics.load(F,threadInfoStruct+0>>2))throw"Canceled!";l||Ab();Vc(a,c,l?100:1)}}function Yd(a){return 0===a%4&&(0!==a%100||0===a%400)}function Zd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var $d=[31,29,31,30,31,30,31,31,30,31,30,31],ae=[31,28,31,30,31,30,31,31,30,31,30,31];
+function be(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(Yd(a.getFullYear())?$d:ae)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
+function ce(a){if(l)return N(30,1,a);switch(a){case 30:return 16384;case 85:return v.length/16384;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;
+case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;
+case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Eb(28);return-1}function de(a,b,c,d){a||(a=this);this.parent=a;this.jf=a.jf;this.lg=null;this.id=O.Ai++;this.name=b;this.mode=c;this.cf={};this.df={};this.rdev=d}
+Object.defineProperties(de.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},ti:{get:function(){return O.kf(this.mode)}},Ug:{get:function(){return O.hg(this.mode)}}});O.Oh=de;O.Ni();for(var ec,V,ee=0;32>ee;++ee)nd.push(Array(ee));var fe=new Float32Array(288);for(ee=0;288>ee;++ee)yd[ee]=fe.subarray(0,ee+1);var je=new Int32Array(288);
+for(ee=0;288>ee;++ee)zd[ee]=je.subarray(0,ee+1);var ke=[null,Hb,Jb,kc,lc,mc,nc,oc,pc,rc,sc,tc,uc,wc,xc,yc,zc,Ac,Bc,Cc,Qc,Rc,Sc,Hd,Md,Nd,Od,Pd,Qd,Td,ce];function Zb(a,b){var c=Array(Ka(a)+1);a=Ia(a,c,0,c.length);b&&(c.length=a);return c}l||Wa.push({vh:function(){le()}});
+var Fe={c:function(a,b,c,d){n("Assertion failed: "+C(a)+", at: "+[b?C(b):"unknown filename",c,d?C(d):"unknown function"])},K:function(a,b){a=me(a,b);if(!noExitRuntime)return postMessage({cmd:"exitProcess",returnCode:a}),a},W:function(a,b){return Gb(a,b)},aa:function(a,b){return Hb(a,b)},va:function(a,b){return Ib(a,b)},ua:function(a,b){return Nb(a,b)},Ma:kc,Ea:lc,u:mc,Na:nc,Ka:oc,Ha:pc,V:rc,Oa:sc,Pa:tc,ya:uc,Aa:function(){return 0},za:wc,Da:function(){return-63},Y:xc,La:yc,Ja:zc,Ca:Ac,wa:Bc,Ga:Cc,
+Ia:function(){return 0},t:Qc,X:Rc,Fa:function(a){try{if(!a)return-21;var b={__size__:390,sysname:0,nodename:65,release:130,version:195,machine:260,domainname:325};Pa("Emscripten",a+b.sysname);Pa("emscripten",a+b.nodename);Pa("1.0",a+b.release);Pa("#1",a+b.version);Pa("x86-JS",a+b.machine);return 0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}},Ba:Sc,pa:function(a,b){if(a==b)postMessage({cmd:"processQueuedMainThreadWork"});else if(l)postMessage({targetThread:a,cmd:"processThreadQueue"});
+else{a=(a=M.Ef[a])&&a.worker;if(!a)return;a.postMessage({cmd:"processThreadQueue"})}return 1},b:function(){n()},Qa:Tc,Ta:Gb,$:function(){n("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},Ua:function(){n("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},F:function(a,b,c){Cd.length=0;var d;for(c>>=2;d=v[b++];)(d=105>d)&&c&1&&c++,Cd.push(d?Sa[c++>>
+1]:E[c]),++c;return mb[a].apply(null,Cd)},qa:Uc,I:function(){},A:Vc,p:tb,z:Db,Ed:function(a){V.activeTexture(a)},Dd:function(a,b){V.attachShader(S[a],dd[b])},ea:function(a,b){V.uf.beginQueryEXT(a,fd[b])},Cd:function(a,b,c){V.bindAttribLocation(S[a],b,C(c))},Bd:function(a,b){V.bindBuffer(a,$c[b])},Ad:function(a,b){V.bindFramebuffer(a,ad[b])},zd:function(a,b){V.bindRenderbuffer(a,bd[b])},yd:function(a,b){V.bindTexture(a,cd[b])},Md:function(a){V.bindVertexArray(ed[a])},xd:function(a,b,c,d){V.blendColor(a,
+b,c,d)},wd:function(a){V.blendEquation(a)},vd:function(a,b){V.blendEquationSeparate(a,b)},ud:function(a,b){V.blendFunc(a,b)},td:function(a,b,c,d){V.blendFuncSeparate(a,b,c,d)},sd:function(a,b,c,d){V.bufferData(a,c?v.subarray(c,c+b):b,d)},rd:function(a,b,c,d){V.bufferSubData(a,b,v.subarray(d,d+c))},qd:function(a){return V.checkFramebufferStatus(a)},pd:function(a){V.clear(a)},od:function(a,b,c,d){V.clearColor(a,b,c,d)},nd:function(a){V.clearDepth(a)},md:function(a){V.clearStencil(a)},ld:function(a,
+b,c,d){V.colorMask(!!a,!!b,!!c,!!d)},kd:function(a){V.compileShader(dd[a])},jd:function(a,b,c,d,e,g,k,m){V.compressedTexImage2D(a,b,c,d,e,g,m?v.subarray(m,m+k):null)},id:function(a,b,c,d,e,g,k,m,r){V.compressedTexSubImage2D(a,b,c,d,e,g,k,r?v.subarray(r,r+m):null)},hd:function(a,b,c,d,e,g,k,m){V.copyTexImage2D(a,b,c,d,e,g,k,m)},gd:function(a,b,c,d,e,g,k,m){V.copyTexSubImage2D(a,b,c,d,e,g,k,m)},fd:function(){var a=kd(S),b=V.createProgram();b.name=a;S[a]=b;return a},ed:function(a){var b=kd(dd);dd[b]=
+V.createShader(a);return b},dd:function(a){V.cullFace(a)},cd:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=$c[d];e&&(V.deleteBuffer(e),e.name=0,$c[d]=null)}},bd:function(a,b){for(var c=0;c<a;++c){var d=E[b+4*c>>2],e=ad[d];e&&(V.deleteFramebuffer(e),e.name=0,ad[d]=null)}},ad:function(a){if(a){var b=S[a];b?(V.deleteProgram(b),b.name=0,S[a]=null,gd[a]=null):U(1281)}},ga:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=fd[d];e&&(V.uf.deleteQueryEXT(e),fd[d]=null)}},$c:function(a,b){for(var c=
+0;c<a;c++){var d=E[b+4*c>>2],e=bd[d];e&&(V.deleteRenderbuffer(e),e.name=0,bd[d]=null)}},_c:function(a){if(a){var b=dd[a];b?(V.deleteShader(b),dd[a]=null):U(1281)}},Zc:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=cd[d];e&&(V.deleteTexture(e),e.name=0,cd[d]=null)}},Ld:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2];V.deleteVertexArray(ed[d]);ed[d]=null}},Yc:function(a){V.depthFunc(a)},Xc:function(a){V.depthMask(!!a)},Wc:function(a,b){V.depthRange(a,b)},Vc:function(a,b){V.detachShader(S[a],
+dd[b])},Uc:function(a){V.disable(a)},Tc:function(a){V.disableVertexAttribArray(a)},Sc:function(a,b,c){V.drawArrays(a,b,c)},Hd:function(a,b,c,d){V.drawArraysInstanced(a,b,c,d)},Id:function(a,b){for(var c=nd[a],d=0;d<a;d++)c[d]=E[b+4*d>>2];V.drawBuffers(c)},Rc:function(a,b,c,d){V.drawElements(a,b,c,d)},Gd:function(a,b,c,d,e){V.drawElementsInstanced(a,b,c,d,e)},Qc:function(a){V.enable(a)},Pc:function(a){V.enableVertexAttribArray(a)},da:function(a){V.uf.endQueryEXT(a)},Oc:function(){V.finish()},Nc:function(){V.flush()},
+Mc:function(a,b,c,d){V.framebufferRenderbuffer(a,b,c,bd[d])},Lc:function(a,b,c,d,e){V.framebufferTexture2D(a,b,c,cd[d],e)},Kc:function(a){V.frontFace(a)},Jc:function(a,b){od(a,b,"createBuffer",$c)},Hc:function(a,b){od(a,b,"createFramebuffer",ad)},ha:function(a,b){for(var c=0;c<a;c++){var d=V.uf.createQueryEXT();if(!d){for(U(1282);c<a;)E[b+4*c++>>2]=0;break}var e=kd(fd);d.name=e;fd[e]=d;E[b+4*c>>2]=e}},Gc:function(a,b){od(a,b,"createRenderbuffer",bd)},Fc:function(a,b){od(a,b,"createTexture",cd)},Kd:function(a,
+b){od(a,b,"createVertexArray",ed)},Ic:function(a){V.generateMipmap(a)},Ec:function(a,b,c,d,e,g,k){rd("getActiveAttrib",a,b,c,d,e,g,k)},Dc:function(a,b,c,d,e,g,k){rd("getActiveUniform",a,b,c,d,e,g,k)},Cc:function(a,b,c,d){a=V.getAttachedShaders(S[a]);var e=a.length;e>b&&(e=b);E[c>>2]=e;for(b=0;b<e;++b)E[d+4*b>>2]=dd.indexOf(a[b])},Bc:function(a,b){return V.getAttribLocation(S[a],C(b))},Ac:function(a,b){td(a,b,4)},zc:function(a,b,c){c?E[c>>2]=V.getBufferParameter(a,b):U(1281)},yc:function(){var a=V.getError()||
+jd;jd=0;return a},xc:function(a,b){td(a,b,2)},wc:function(a,b,c,d){a=V.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;E[d>>2]=a},vc:function(a,b){td(a,b,0)},tc:function(a,b,c,d){a=V.getProgramInfoLog(S[a]);null===a&&(a="(unknown error)");b=0<b&&d?Ia(a,v,d,b):0;c&&(E[c>>2]=b)},uc:function(a,b,c){if(c)if(a>=Zc)U(1281);else{var d=gd[a];if(d)if(35716==b)a=V.getProgramInfoLog(S[a]),null===a&&(a="(unknown error)"),E[c>>2]=a.length+1;else if(35719==
+b)E[c>>2]=d.Xg;else if(35722==b){if(-1==d.jg){a=S[a];var e=V.getProgramParameter(a,35721);for(b=d.jg=0;b<e;++b)d.jg=Math.max(d.jg,V.getActiveAttrib(a,b).name.length+1)}E[c>>2]=d.jg}else if(35381==b){if(-1==d.kg)for(a=S[a],e=V.getProgramParameter(a,35382),b=d.kg=0;b<e;++b)d.kg=Math.max(d.kg,V.getActiveUniformBlockName(a,b).length+1);E[c>>2]=d.kg}else E[c>>2]=V.getProgramParameter(S[a],b);else U(1282)}else U(1281)},Od:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?
+d=a?1:0:d=a;sd(c,d)}else U(1281)},Qd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;E[c>>2]=d}else U(1281)},Nd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;sd(c,d)}else U(1281)},Pd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;E[c>>2]=d}else U(1281)},Rd:function(a,b,c){c?E[c>>2]=V.uf.getQueryEXT(a,b):U(1281)},sc:function(a,b,c){c?E[c>>2]=V.getRenderbufferParameter(a,
+b):U(1281)},qc:function(a,b,c,d){a=V.getShaderInfoLog(dd[a]);null===a&&(a="(unknown error)");b=0<b&&d?Ia(a,v,d,b):0;c&&(E[c>>2]=b)},pc:function(a,b,c,d){a=V.getShaderPrecisionFormat(a,b);E[c>>2]=a.rangeMin;E[c+4>>2]=a.rangeMax;E[d>>2]=a.precision},oc:function(a,b,c,d){if(a=V.getShaderSource(dd[a]))b=0<b&&d?Ia(a,v,d,b):0,c&&(E[c>>2]=b)},rc:function(a,b,c){c?35716==b?(a=V.getShaderInfoLog(dd[a]),null===a&&(a="(unknown error)"),E[c>>2]=a?a.length+1:0):35720==b?(a=V.getShaderSource(dd[a]),E[c>>2]=a?a.length+
+1:0):E[c>>2]=V.getShaderParameter(dd[a],b):U(1281)},nc:function(a){if(hd[a])return hd[a];switch(a){case 7939:var b=V.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=ud(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=V.getParameter(a))||U(1280);b=ud(b);break;case 7938:b=ud("OpenGL ES 2.0 ("+V.getParameter(7938)+")");break;case 35724:b=V.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),
+b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=ud(b);break;default:return U(1280),0}return hd[a]=b},mc:function(a,b,c){c?G[c>>2]=V.getTexParameter(a,b):U(1281)},lc:function(a,b,c){c?E[c>>2]=V.getTexParameter(a,b):U(1281)},ic:function(a,b){b=C(b);var c=0;if("]"==b[b.length-1]){var d=b.lastIndexOf("[");c="]"!=b[d+1]?parseInt(b.slice(d+1)):0;b=b.slice(0,d)}return(a=gd[a]&&gd[a].Nh[b])&&0<=c&&c<a[0]?a[1]+c:-1},kc:function(a,b,c){vd(a,b,c,2)},jc:function(a,b,c){vd(a,b,c,0)},fc:function(a,b,c){c?E[c>>2]=V.getVertexAttribOffset(a,
+b):U(1281)},hc:function(a,b,c){wd(a,b,c,2)},gc:function(a,b,c){wd(a,b,c,5)},ec:function(a,b){V.hint(a,b)},dc:function(a){return(a=$c[a])?V.isBuffer(a):0},cc:function(a){return V.isEnabled(a)},bc:function(a){return(a=ad[a])?V.isFramebuffer(a):0},ac:function(a){return(a=S[a])?V.isProgram(a):0},fa:function(a){return(a=fd[a])?V.uf.isQueryEXT(a):0},$b:function(a){return(a=bd[a])?V.isRenderbuffer(a):0},_b:function(a){return(a=dd[a])?V.isShader(a):0},Zb:function(a){return(a=cd[a])?V.isTexture(a):0},Jd:function(a){return(a=
+ed[a])?V.isVertexArray(a):0},Yb:function(a){V.lineWidth(a)},Xb:function(a){V.linkProgram(S[a]);var b=S[a];a=gd[a]={Nh:{},Xg:0,jg:-1,kg:-1};for(var c=a.Nh,d=V.getProgramParameter(b,35718),e=0;e<d;++e){var g=V.getActiveUniform(b,e),k=g.name;a.Xg=Math.max(a.Xg,k.length+1);"]"==k.slice(-1)&&(k=k.slice(0,k.lastIndexOf("[")));var m=V.getUniformLocation(b,k);if(m){var r=kd(T);c[k]=[g.size,r];T[r]=m;for(var q=1;q<g.size;++q)m=V.getUniformLocation(b,k+"["+q+"]"),r=kd(T),T[r]=m}}},Wb:function(a,b){3317==a&&
+(id=b);V.pixelStorei(a,b)},Vb:function(a,b){V.polygonOffset(a,b)},ca:function(a,b){V.uf.queryCounterEXT(fd[a],b)},Ub:function(a,b,c,d,e,g,k){(k=xd(g,e,c,d,k))?V.readPixels(a,b,c,d,e,g,k):U(1280)},Tb:function(){},Sb:function(a,b,c,d){V.renderbufferStorage(a,b,c,d)},Rb:function(a,b){V.sampleCoverage(a,!!b)},Qb:function(a,b,c,d){V.scissor(a,b,c,d)},Pb:function(){U(1280)},Ob:function(a,b,c,d){for(var e="",g=0;g<b;++g){var k=d?E[d+4*g>>2]:-1;e+=C(E[c+4*g>>2],0>k?void 0:k)}V.shaderSource(dd[a],e)},Nb:function(a,
+b,c){V.stencilFunc(a,b,c)},Mb:function(a,b,c,d){V.stencilFuncSeparate(a,b,c,d)},Lb:function(a){V.stencilMask(a)},Kb:function(a,b){V.stencilMaskSeparate(a,b)},Jb:function(a,b,c){V.stencilOp(a,b,c)},Ib:function(a,b,c,d){V.stencilOpSeparate(a,b,c,d)},Hb:function(a,b,c,d,e,g,k,m,r){V.texImage2D(a,b,c,d,e,g,k,m,r?xd(m,k,d,e,r):null)},Gb:function(a,b,c){V.texParameterf(a,b,c)},Fb:function(a,b,c){V.texParameterf(a,b,G[c>>2])},Eb:function(a,b,c){V.texParameteri(a,b,c)},Db:function(a,b,c){V.texParameteri(a,
+b,E[c>>2])},Cb:function(a,b,c,d,e,g,k,m,r){var q=null;r&&(q=xd(m,k,e,g,r));V.texSubImage2D(a,b,c,d,e,g,k,m,q)},Bb:function(a,b){V.uniform1f(T[a],b)},Ab:function(a,b,c){if(288>=b)for(var d=yd[b-1],e=0;e<b;++e)d[e]=G[c+4*e>>2];else d=G.subarray(c>>2,c+4*b>>2);V.uniform1fv(T[a],d)},zb:function(a,b){V.uniform1i(T[a],b)},yb:function(a,b,c){if(288>=b)for(var d=zd[b-1],e=0;e<b;++e)d[e]=E[c+4*e>>2];else d=E.subarray(c>>2,c+4*b>>2);V.uniform1iv(T[a],d)},xb:function(a,b,c){V.uniform2f(T[a],b,c)},wb:function(a,
+b,c){if(144>=b)for(var d=yd[2*b-1],e=0;e<2*b;e+=2)d[e]=G[c+4*e>>2],d[e+1]=G[c+(4*e+4)>>2];else d=G.subarray(c>>2,c+8*b>>2);V.uniform2fv(T[a],d)},vb:function(a,b,c){V.uniform2i(T[a],b,c)},ub:function(a,b,c){if(144>=b)for(var d=zd[2*b-1],e=0;e<2*b;e+=2)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2];else d=E.subarray(c>>2,c+8*b>>2);V.uniform2iv(T[a],d)},tb:function(a,b,c,d){V.uniform3f(T[a],b,c,d)},sb:function(a,b,c){if(96>=b)for(var d=yd[3*b-1],e=0;e<3*b;e+=3)d[e]=G[c+4*e>>2],d[e+1]=G[c+(4*e+4)>>2],d[e+2]=
+G[c+(4*e+8)>>2];else d=G.subarray(c>>2,c+12*b>>2);V.uniform3fv(T[a],d)},rb:function(a,b,c,d){V.uniform3i(T[a],b,c,d)},qb:function(a,b,c){if(96>=b)for(var d=zd[3*b-1],e=0;e<3*b;e+=3)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2],d[e+2]=E[c+(4*e+8)>>2];else d=E.subarray(c>>2,c+12*b>>2);V.uniform3iv(T[a],d)},pb:function(a,b,c,d,e){V.uniform4f(T[a],b,c,d,e)},ob:function(a,b,c){if(72>=b){var d=yd[4*b-1];c>>=2;for(var e=0;e<4*b;e+=4){var g=c+e;d[e]=G[g];d[e+1]=G[g+1];d[e+2]=G[g+2];d[e+3]=G[g+3]}}else d=G.subarray(c>>
+2,c+16*b>>2);V.uniform4fv(T[a],d)},nb:function(a,b,c,d,e){V.uniform4i(T[a],b,c,d,e)},mb:function(a,b,c){if(72>=b)for(var d=zd[4*b-1],e=0;e<4*b;e+=4)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2],d[e+2]=E[c+(4*e+8)>>2],d[e+3]=E[c+(4*e+12)>>2];else d=E.subarray(c>>2,c+16*b>>2);V.uniform4iv(T[a],d)},lb:function(a,b,c,d){if(72>=b)for(var e=yd[4*b-1],g=0;g<4*b;g+=4)e[g]=G[d+4*g>>2],e[g+1]=G[d+(4*g+4)>>2],e[g+2]=G[d+(4*g+8)>>2],e[g+3]=G[d+(4*g+12)>>2];else e=G.subarray(d>>2,d+16*b>>2);V.uniformMatrix2fv(T[a],
+!!c,e)},kb:function(a,b,c,d){if(32>=b)for(var e=yd[9*b-1],g=0;g<9*b;g+=9)e[g]=G[d+4*g>>2],e[g+1]=G[d+(4*g+4)>>2],e[g+2]=G[d+(4*g+8)>>2],e[g+3]=G[d+(4*g+12)>>2],e[g+4]=G[d+(4*g+16)>>2],e[g+5]=G[d+(4*g+20)>>2],e[g+6]=G[d+(4*g+24)>>2],e[g+7]=G[d+(4*g+28)>>2],e[g+8]=G[d+(4*g+32)>>2];else e=G.subarray(d>>2,d+36*b>>2);V.uniformMatrix3fv(T[a],!!c,e)},jb:function(a,b,c,d){if(18>=b){var e=yd[16*b-1];d>>=2;for(var g=0;g<16*b;g+=16){var k=d+g;e[g]=G[k];e[g+1]=G[k+1];e[g+2]=G[k+2];e[g+3]=G[k+3];e[g+4]=G[k+4];
+e[g+5]=G[k+5];e[g+6]=G[k+6];e[g+7]=G[k+7];e[g+8]=G[k+8];e[g+9]=G[k+9];e[g+10]=G[k+10];e[g+11]=G[k+11];e[g+12]=G[k+12];e[g+13]=G[k+13];e[g+14]=G[k+14];e[g+15]=G[k+15]}}else e=G.subarray(d>>2,d+64*b>>2);V.uniformMatrix4fv(T[a],!!c,e)},ib:function(a){V.useProgram(S[a])},hb:function(a){V.validateProgram(S[a])},gb:function(a,b){V.vertexAttrib1f(a,b)},fb:function(a,b){V.vertexAttrib1f(a,G[b>>2])},eb:function(a,b,c){V.vertexAttrib2f(a,b,c)},db:function(a,b){V.vertexAttrib2f(a,G[b>>2],G[b+4>>2])},cb:function(a,
+b,c,d){V.vertexAttrib3f(a,b,c,d)},bb:function(a,b){V.vertexAttrib3f(a,G[b>>2],G[b+4>>2],G[b+8>>2])},ab:function(a,b,c,d,e){V.vertexAttrib4f(a,b,c,d,e)},$a:function(a,b){V.vertexAttrib4f(a,G[b>>2],G[b+4>>2],G[b+8>>2],G[b+12>>2])},Fd:function(a,b){V.vertexAttribDivisor(a,b)},_a:function(a,b,c,d,e,g){V.vertexAttribPointer(a,b,c,!!d,e,g)},Za:function(a,b,c,d){V.viewport(a,b,c,d)},ka:function(){return"undefined"!==typeof SharedArrayBuffer},G:function(){return rb|0},R:function(){return qb|0},f:function(a,
+b){Z(a,b||1);throw"longjmp";},ja:function(a,b,c){v.copyWithin(a,b,b+c)},ma:function(a,b,c){Bd.length=b;c>>=3;for(var d=0;d<b;d++)Bd[d]=Sa[c+d];return(0>a?mb[-a-1]:ke[a]).apply(null,Bd)},ra:function(){n("OOM")},na:function(a,b,c){return Ed(a)?Fd(a,b,c):Hd(a,b,c)},Q:function(){},la:function(){},oa:function(a,b){var c={};b>>=2;c.alpha=!!E[b];c.depth=!!E[b+1];c.stencil=!!E[b+2];c.antialias=!!E[b+3];c.premultipliedAlpha=!!E[b+4];c.preserveDrawingBuffer=!!E[b+5];c.powerPreference=Id[E[b+6]];c.failIfMajorPerformanceCaveat=
+!!E[b+7];c.wi=E[b+8];c.pj=E[b+9];c.qh=E[b+10];c.hi=E[b+11];c.uj=E[b+12];c.vj=E[b+13];a=Ed(a);if(!a||c.hi)c=0;else if(a=a.getContext("webgl",c)){b=Ma(8);E[b+4>>2]=pb|0;var d={jj:b,attributes:c,version:c.wi,qg:a};a.canvas&&(a.canvas.rg=d);("undefined"===typeof c.qh||c.qh)&&ld(d);c=b}else c=0;return c},sa:function(a,b){var c=0;Kd().forEach(function(d,e){var g=b+c;E[a+4*e>>2]=g;Pa(d,g);c+=d.length+1});return 0},ta:function(a,b){var c=Kd();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});
+E[b>>2]=d;return 0},D:function(a){Cb(a)},H:Md,U:Nd,xa:Od,Va:Pd,M:Qd,B:Sd,d:function(){return Aa|0},y:Td,v:function(a,b,c,d,e,g,k){b=Oc(a,b);if(b.ef)return-6;a=b.port;var m=b.hf;b=!1;if(c&&d){var r;if(k&1||!(r=Kc(m))){if(k&8)return-2}else m=r;c=Ia(m,v,c,d);c+1>=d&&(b=!0)}e&&g&&(c=Ia(""+a,v,e,g),c+1>=g&&(b=!0));return b?-12:0},l:function(a){var b=Date.now();E[a>>2]=b/1E3|0;E[a+4>>2]=b%1E3*1E3|0;return 0},r:Ib,ia:function(){M.pi()},ba:ne,j:oe,h:pe,C:qe,P:re,_:se,O:te,Xa:ue,Wa:ve,k:we,w:xe,J:ye,g:ze,
+N:Ae,Sa:Be,Z:Ce,Ya:De,q:Nb,a:Ca||f.wasmMemory,T:function(a){Jb();var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),g=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),k=e.getTimezoneOffset(),m=Math.min(k,g);0>c?E[a+32>>2]=Number(g!=k&&m==d):0<c!=(m==d)&&(g=Math.max(k,g),b.setTime(b.getTime()+6E4*((0<c?m:g)-d)));E[a+24>>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;return b.getTime()/
+1E3|0},Ra:function(a){if(a===M.Ph)return u("Main thread (id="+a+") cannot be canceled!"),71;if(!a)return u("pthread_cancel attempted on a null thread pointer!"),71;if(E[a+12>>2]!==a)return u("pthread_cancel attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;Atomics.compareExchange(F,a>>2,0,2);l?postMessage({cmd:"cancelThread",thread:a}):ub(a);return 0},S:function(a){var b=M.Dg.pop();a&&b()},L:function(a,b){M.Dg.push(function(){H.get(a)(b)})},n:function(a,
+b,c,d){if("undefined"===typeof SharedArrayBuffer)return u("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!a)return u("pthread_create called with a null thread pointer!"),28;var e=[];if(l&&0===e.length)return Ee(687865856,a,b,c,d);var g=0,k=0,m=0,r=0;if(b){var q=E[b>>2];q+=81920;g=E[b+8>>2];k=0!==E[b+12>>2];if(0===E[b+16>>2]){var t=E[b+20>>2],w=E[b+24>>2];m=b+20;r=b+24;var B=M.Mg?M.Mg:pb|0;if(m||r)if(B)if(E[B+12>>2]!==B)u("pthread_getschedparam attempted on thread "+
+B+", which does not point to a valid thread, or does not exist anymore!");else{var p=Atomics.load(F,B+128>>2);B=Atomics.load(F,B+132>>2);m&&(E[m>>2]=p);r&&(E[r>>2]=B)}else u("pthread_getschedparam called with a null thread pointer!");m=E[b+20>>2];r=E[b+24>>2];E[b+20>>2]=t;E[b+24>>2]=w}else m=E[b+20>>2],r=E[b+24>>2]}else q=2097152;(b=0==g)?g=vc(16,q):(g-=q,assert(0<g));t=Ma(232);for(w=0;58>w;++w)F[(t>>2)+w]=0;E[a>>2]=t;E[t+12>>2]=t;a=t+156;E[a>>2]=a;c={Rf:g,cg:q,Kg:b,Ih:m,Jh:r,detached:k,Mi:c,$f:t,
+Fi:pb|0,Tf:d,Vi:e};l?(c.$i="spawnThread",postMessage(c,e)):Bb(c);return 0},o:function(a,b){return Xd(a,b)},i:Wd,e:function(a){Aa=a|0},E:function(){return 0},m:function(a,b,c,d){function e(p,x,z){for(p="number"===typeof p?p.toString():p||"";p.length<x;)p=z[0]+p;return p}function g(p,x){return e(p,x,"0")}function k(p,x){function z(W){return 0>W?-1:0<W?1:0}var I;0===(I=z(p.getFullYear()-x.getFullYear()))&&0===(I=z(p.getMonth()-x.getMonth()))&&(I=z(p.getDate()-x.getDate()));return I}function m(p){switch(p.getDay()){case 0:return new Date(p.getFullYear()-
+1,11,29);case 1:return p;case 2:return new Date(p.getFullYear(),0,3);case 3:return new Date(p.getFullYear(),0,2);case 4:return new Date(p.getFullYear(),0,1);case 5:return new Date(p.getFullYear()-1,11,31);case 6:return new Date(p.getFullYear()-1,11,30)}}function r(p){p=be(new Date(p.rf+1900,0,1),p.Gg);var x=new Date(p.getFullYear()+1,0,4),z=m(new Date(p.getFullYear(),0,4));x=m(x);return 0>=k(z,p)?0>=k(x,p)?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var q=E[d+40>>2];d={Ti:E[d>>2],Si:E[d+4>>
+2],Eg:E[d+8>>2],pg:E[d+12>>2],dg:E[d+16>>2],rf:E[d+20>>2],Fg:E[d+24>>2],Gg:E[d+28>>2],yj:E[d+32>>2],Ri:E[d+36>>2],Ui:q?C(q):""};c=C(c);q={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};
+for(var t in q)c=c.replace(new RegExp(t,"g"),q[t]);var w="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),B="January February March April May June July August September October November December".split(" ");q={"%a":function(p){return w[p.Fg].substring(0,3)},"%A":function(p){return w[p.Fg]},"%b":function(p){return B[p.dg].substring(0,3)},"%B":function(p){return B[p.dg]},"%C":function(p){return g((p.rf+1900)/100|0,2)},"%d":function(p){return g(p.pg,2)},"%e":function(p){return e(p.pg,
+2," ")},"%g":function(p){return r(p).toString().substring(2)},"%G":function(p){return r(p)},"%H":function(p){return g(p.Eg,2)},"%I":function(p){p=p.Eg;0==p?p=12:12<p&&(p-=12);return g(p,2)},"%j":function(p){return g(p.pg+Zd(Yd(p.rf+1900)?$d:ae,p.dg-1),3)},"%m":function(p){return g(p.dg+1,2)},"%M":function(p){return g(p.Si,2)},"%n":function(){return"\n"},"%p":function(p){return 0<=p.Eg&&12>p.Eg?"AM":"PM"},"%S":function(p){return g(p.Ti,2)},"%t":function(){return"\t"},"%u":function(p){return p.Fg||
+7},"%U":function(p){var x=new Date(p.rf+1900,0,1),z=0===x.getDay()?x:be(x,7-x.getDay());p=new Date(p.rf+1900,p.dg,p.pg);return 0>k(z,p)?g(Math.ceil((31-z.getDate()+(Zd(Yd(p.getFullYear())?$d:ae,p.getMonth()-1)-31)+p.getDate())/7),2):0===k(z,x)?"01":"00"},"%V":function(p){var x=new Date(p.rf+1901,0,4),z=m(new Date(p.rf+1900,0,4));x=m(x);var I=be(new Date(p.rf+1900,0,1),p.Gg);return 0>k(I,z)?"53":0>=k(x,I)?"01":g(Math.ceil((z.getFullYear()<p.rf+1900?p.Gg+32-z.getDate():p.Gg+1-z.getDate())/7),2)},"%w":function(p){return p.Fg},
+"%W":function(p){var x=new Date(p.rf,0,1),z=1===x.getDay()?x:be(x,0===x.getDay()?1:7-x.getDay()+1);p=new Date(p.rf+1900,p.dg,p.pg);return 0>k(z,p)?g(Math.ceil((31-z.getDate()+(Zd(Yd(p.getFullYear())?$d:ae,p.getMonth()-1)-31)+p.getDate())/7),2):0===k(z,x)?"01":"00"},"%y":function(p){return(p.rf+1900).toString().substring(2)},"%Y":function(p){return p.rf+1900},"%z":function(p){p=p.Ri;var x=0<=p;p=Math.abs(p)/60;return(x?"+":"-")+String("0000"+(p/60*100+p%60)).slice(-4)},"%Z":function(p){return p.Ui},
+"%%":function(){return"%"}};for(t in q)0<=c.indexOf(t)&&(c=c.replace(new RegExp(t,"g"),q[t](d)));t=Zb(c,!1);if(t.length>b)return 0;y.set(t,a);return t.length-1},x:ce,s:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}};
+(function(){function a(e,g){f.asm=e.exports;H=f.asm.Sd;Da=g;l||fb()}function b(e){a(e.instance,e.module)}function c(e){return kb().then(function(g){return WebAssembly.instantiate(g,d)}).then(e,function(g){u("failed to asynchronously prepare wasm: "+g);n(g)})}var d={a:Fe};l||eb();if(f.instantiateWasm)try{return f.instantiateWasm(d,a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return Ba||"function"!==typeof WebAssembly.instantiateStreaming||ib()||gb("file://")||
+"function"!==typeof fetch?c(b):fetch(hb,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){u("wasm streaming compile failed: "+g);u("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ca);return{}})();
+var le=f.___wasm_call_ctors=function(){return(le=f.___wasm_call_ctors=f.asm.Td).apply(null,arguments)},zb=f._free=function(){return(zb=f._free=f.asm.Ud).apply(null,arguments)},Ma=f._malloc=function(){return(Ma=f._malloc=f.asm.Vd).apply(null,arguments)},Fb=f.___errno_location=function(){return(Fb=f.___errno_location=f.asm.Wd).apply(null,arguments)},qc=f._memset=function(){return(qc=f._memset=f.asm.Xd).apply(null,arguments)};f._fflush=function(){return(f._fflush=f.asm.Yd).apply(null,arguments)};
+var vc=f._memalign=function(){return(vc=f._memalign=f.asm.Zd).apply(null,arguments)},Nc=f._ntohs=function(){return(Nc=f._ntohs=f.asm._d).apply(null,arguments)},Fc=f._htons=function(){return(Fc=f._htons=f.asm.$d).apply(null,arguments)},me=f._main=function(){return(me=f._main=f.asm.ae).apply(null,arguments)},Vd=f._emscripten_get_global_libc=function(){return(Vd=f._emscripten_get_global_libc=f.asm.be).apply(null,arguments)};
+f.___em_js__initPthreadsJS=function(){return(f.___em_js__initPthreadsJS=f.asm.ce).apply(null,arguments)};
+var Ud=f._htonl=function(){return(Ud=f._htonl=f.asm.de).apply(null,arguments)},Mb=f.__get_tzname=function(){return(Mb=f.__get_tzname=f.asm.ee).apply(null,arguments)},Lb=f.__get_daylight=function(){return(Lb=f.__get_daylight=f.asm.fe).apply(null,arguments)},Kb=f.__get_timezone=function(){return(Kb=f.__get_timezone=f.asm.ge).apply(null,arguments)},A=f.stackSave=function(){return(A=f.stackSave=f.asm.he).apply(null,arguments)},D=f.stackRestore=function(){return(D=f.stackRestore=f.asm.ie).apply(null,arguments)},
+Ha=f.stackAlloc=function(){return(Ha=f.stackAlloc=f.asm.je).apply(null,arguments)},Z=f._setThrew=function(){return(Z=f._setThrew=f.asm.ke).apply(null,arguments)};f._emscripten_main_browser_thread_id=function(){return(f._emscripten_main_browser_thread_id=f.asm.le).apply(null,arguments)};
+var yb=f.___pthread_tsd_run_dtors=function(){return(yb=f.___pthread_tsd_run_dtors=f.asm.me).apply(null,arguments)},Ab=f._emscripten_main_thread_process_queued_calls=function(){return(Ab=f._emscripten_main_thread_process_queued_calls=f.asm.ne).apply(null,arguments)};f._emscripten_current_thread_process_queued_calls=function(){return(f._emscripten_current_thread_process_queued_calls=f.asm.oe).apply(null,arguments)};
+var wb=f._emscripten_register_main_browser_thread_id=function(){return(wb=f._emscripten_register_main_browser_thread_id=f.asm.pe).apply(null,arguments)},lb=f._do_emscripten_dispatch_to_thread=function(){return(lb=f._do_emscripten_dispatch_to_thread=f.asm.qe).apply(null,arguments)};f._emscripten_async_run_in_main_thread=function(){return(f._emscripten_async_run_in_main_thread=f.asm.re).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread=function(){return(f._emscripten_sync_run_in_main_thread=f.asm.se).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_0=function(){return(f._emscripten_sync_run_in_main_thread_0=f.asm.te).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_1=function(){return(f._emscripten_sync_run_in_main_thread_1=f.asm.ue).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread_2=function(){return(f._emscripten_sync_run_in_main_thread_2=f.asm.ve).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_xprintf_varargs=function(){return(f._emscripten_sync_run_in_main_thread_xprintf_varargs=f.asm.we).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_3=function(){return(f._emscripten_sync_run_in_main_thread_3=f.asm.xe).apply(null,arguments)};
+var Ee=f._emscripten_sync_run_in_main_thread_4=function(){return(Ee=f._emscripten_sync_run_in_main_thread_4=f.asm.ye).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_5=function(){return(f._emscripten_sync_run_in_main_thread_5=f.asm.ze).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_6=function(){return(f._emscripten_sync_run_in_main_thread_6=f.asm.Ae).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread_7=function(){return(f._emscripten_sync_run_in_main_thread_7=f.asm.Be).apply(null,arguments)};var Ad=f._emscripten_run_in_main_runtime_thread_js=function(){return(Ad=f._emscripten_run_in_main_runtime_thread_js=f.asm.Ce).apply(null,arguments)},Gd=f.__emscripten_call_on_thread=function(){return(Gd=f.__emscripten_call_on_thread=f.asm.De).apply(null,arguments)};f._proxy_main=function(){return(f._proxy_main=f.asm.Ee).apply(null,arguments)};
+f._emscripten_tls_init=function(){return(f._emscripten_tls_init=f.asm.Fe).apply(null,arguments)};f.dynCall_ijiii=function(){return(f.dynCall_ijiii=f.asm.Ge).apply(null,arguments)};var Ge=f.dynCall_vijjjid=function(){return(Ge=f.dynCall_vijjjid=f.asm.He).apply(null,arguments)},He=f.dynCall_iiiijj=function(){return(He=f.dynCall_iiiijj=f.asm.Ie).apply(null,arguments)};f.dynCall_iiijiii=function(){return(f.dynCall_iiijiii=f.asm.Je).apply(null,arguments)};
+f.dynCall_jiiii=function(){return(f.dynCall_jiiii=f.asm.Ke).apply(null,arguments)};f.dynCall_jii=function(){return(f.dynCall_jii=f.asm.Le).apply(null,arguments)};var Ie=f.dynCall_iij=function(){return(Ie=f.dynCall_iij=f.asm.Me).apply(null,arguments)};f.dynCall_viiijj=function(){return(f.dynCall_viiijj=f.asm.Ne).apply(null,arguments)};f.dynCall_jij=function(){return(f.dynCall_jij=f.asm.Oe).apply(null,arguments)};f.dynCall_jiji=function(){return(f.dynCall_jiji=f.asm.Pe).apply(null,arguments)};
+f.dynCall_iiiji=function(){return(f.dynCall_iiiji=f.asm.Qe).apply(null,arguments)};f.dynCall_iiiiij=function(){return(f.dynCall_iiiiij=f.asm.Re).apply(null,arguments)};f.dynCall_jiiij=function(){return(f.dynCall_jiiij=f.asm.Se).apply(null,arguments)};f.dynCall_iiijjji=function(){return(f.dynCall_iiijjji=f.asm.Te).apply(null,arguments)};f.dynCall_iiiiiij=function(){return(f.dynCall_iiiiiij=f.asm.Ue).apply(null,arguments)};f.dynCall_jiiji=function(){return(f.dynCall_jiiji=f.asm.Ve).apply(null,arguments)};
+f.dynCall_viiiiijji=function(){return(f.dynCall_viiiiijji=f.asm.We).apply(null,arguments)};f.dynCall_viiiji=function(){return(f.dynCall_viiiji=f.asm.Xe).apply(null,arguments)};f.dynCall_viiiiji=function(){return(f.dynCall_viiiiji=f.asm.Ye).apply(null,arguments)};f.dynCall_jiiiii=function(){return(f.dynCall_jiiiii=f.asm.Ze).apply(null,arguments)};f.dynCall_jiii=function(){return(f.dynCall_jiii=f.asm._e).apply(null,arguments)};
+f.dynCall_jiiiiii=function(){return(f.dynCall_jiiiiii=f.asm.$e).apply(null,arguments)};f._ff_h264_cabac_tables=2115974;var xb=f._main_thread_futex=17195328;function pe(a,b,c){var d=A();try{return H.get(a)(b,c)}catch(e){D(d);if(e!==e+0&&"longjmp"!==e)throw e;Z(1,0)}}function we(a,b){var c=A();try{H.get(a)(b)}catch(d){D(c);if(d!==d+0&&"longjmp"!==d)throw d;Z(1,0)}}function ze(a,b,c,d,e){var g=A();try{H.get(a)(b,c,d,e)}catch(k){D(g);if(k!==k+0&&"longjmp"!==k)throw k;Z(1,0)}}
+function xe(a,b,c){var d=A();try{H.get(a)(b,c)}catch(e){D(d);if(e!==e+0&&"longjmp"!==e)throw e;Z(1,0)}}function oe(a,b){var c=A();try{return H.get(a)(b)}catch(d){D(c);if(d!==d+0&&"longjmp"!==d)throw d;Z(1,0)}}function re(a,b,c,d,e){var g=A();try{return H.get(a)(b,c,d,e)}catch(k){D(g);if(k!==k+0&&"longjmp"!==k)throw k;Z(1,0)}}function te(a,b,c,d,e,g,k,m,r){var q=A();try{return H.get(a)(b,c,d,e,g,k,m,r)}catch(t){D(q);if(t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}}
+function ye(a,b,c,d){var e=A();try{H.get(a)(b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}function ne(a){var b=A();try{return H.get(a)()}catch(c){D(b);if(c!==c+0&&"longjmp"!==c)throw c;Z(1,0)}}function Ae(a,b,c,d,e,g){var k=A();try{H.get(a)(b,c,d,e,g)}catch(m){D(k);if(m!==m+0&&"longjmp"!==m)throw m;Z(1,0)}}function qe(a,b,c,d){var e=A();try{return H.get(a)(b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}
+function se(a,b,c,d,e,g){var k=A();try{return H.get(a)(b,c,d,e,g)}catch(m){D(k);if(m!==m+0&&"longjmp"!==m)throw m;Z(1,0)}}function Ce(a,b,c,d,e,g,k,m,r){var q=A();try{H.get(a)(b,c,d,e,g,k,m,r)}catch(t){D(q);if(t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}}function Be(a,b,c,d,e,g,k){var m=A();try{H.get(a)(b,c,d,e,g,k)}catch(r){D(m);if(r!==r+0&&"longjmp"!==r)throw r;Z(1,0)}}function De(a,b,c,d,e,g,k,m,r,q){var t=A();try{Ge(a,b,c,d,e,g,k,m,r,q)}catch(w){D(t);if(w!==w+0&&"longjmp"!==w)throw w;Z(1,0)}}
+function ue(a,b,c,d,e,g,k,m){var r=A();try{return He(a,b,c,d,e,g,k,m)}catch(q){D(r);if(q!==q+0&&"longjmp"!==q)throw q;Z(1,0)}}function ve(a,b,c,d){var e=A();try{return Ie(a,b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}f.ccall=Ga;f.cwrap=function(a,b,c,d){c=c||[];var e=c.every(function(g){return"number"===g});return"string"!==b&&e&&!d?Fa(a):function(){return Ga(a,b,c,arguments,d)}};
+f.setValue=function(a,b,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":y[a>>0]=b;break;case "i8":y[a>>0]=b;break;case "i16":Qa[a>>1]=b;break;case "i32":E[a>>2]=b;break;case "i64":L=[b>>>0,(J=b,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[a>>2]=L[0];E[a+4>>2]=L[1];break;case "float":G[a>>2]=b;break;case "double":Sa[a>>3]=b;break;default:n("invalid type for setValue: "+c)}};f.writeAsciiToMemory=Pa;
+f.FS=O;f.PThread=M;f.PThread=M;f._pthread_self=Wd;f.wasmMemory=Ca;f.ExitStatus=wa;var Je;function wa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}cb=function Ke(){Je||Le();Je||(cb=Ke)};
+function Le(a){function b(){if(!Je&&(Je=!0,f.calledRun=!0,!Ea)){f.noFSInit||O.gg.Tg||O.gg();R.root=O.jf(R,{},null);nb(Wa);l||(O.Bh=!1,nb(Xa));ba(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(Me){var c=a;c=c||[];var d=c.length+1,e=Ha(4*(d+1));E[e>>2]=Na(ha);for(var g=1;g<d;g++)E[(e>>2)+g]=Na(c[g-1]);E[(e>>2)+d]=0;f._proxy_main(d,e)}if(!l){if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)c=f.postRun.shift(),Za.unshift(c);nb(Za)}}}a=a||fa;if(!(0<ab)){if(!l){if(f.preRun)for("function"==
+typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)$a();nb(Va)}0<ab||(f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("")},1);b()},1)):b())}}f.run=Le;function Cb(a,b){if(!b||!noExitRuntime||0!==a){if(!noExitRuntime){M.Oi();l||(nb(Ya),O.quit(),M.eh());if(f.onExit)f.onExit(a);Ea=!0}ja(a,new wa(a))}}if(f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);0<f.preInit.length;)f.preInit.pop()();var Me=!1;f.noInitialRun&&(Me=!1);
+l?M.ri():Le();f.exit=Cb;
+
+
+  return createFFmpegCore.ready
+}
+);
+})();
+if (typeof exports === 'object' && typeof module === 'object')
+      module.exports = createFFmpegCore;
+    else if (typeof define === 'function' && define['amd'])
+      define([], function() { return createFFmpegCore; });
+    else if (typeof exports === 'object')
+      exports["createFFmpegCore"] = createFFmpegCore;
+    

BIN
dist/static/cocoroboffmpeg/ffmpeg-core.wasm


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/cocoroboffmpeg/ffmpeg-core.worker.js


+ 13 - 0
dist/static/cocoroboffmpeg/index.html

@@ -0,0 +1,13 @@
+<!doctype html><html lang><head><meta charset="utf-8"><meta
+			http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport"
+			content="width=device-width,initial-scale=1"><meta
+			http-equiv="Cross-Origin-Opener-Policy" content="same-origin"><meta
+			http-equiv="Cross-Origin-Embedder-Policy" content="require-corp"><link
+			rel="icon" href="./favicon.ico"><base
+			target="_blank"><title>ffmpeg</title><script defer="defer"
+			src="./js/chunk-vendors.8366e8e5.js"></script><script defer="defer"
+			src="./js/app.5c23ccd0.js"></script><link href="./css/app.1d41ea99.css"
+			rel="stylesheet"></head><body><noscript><strong>We're sorry but vue2-project
+				doesn't work properly without JavaScript enabled. Please enable it to
+				continue.</strong></noscript><div
+			id="app"></div><script>document.domain = "cocorobo.cn";</script></body></html>

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/cocoroboffmpeg/js/app.5c23ccd0.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/cocoroboffmpeg/js/app.5c23ccd0.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/cocoroboffmpeg/js/chunk-vendors.8366e8e5.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/cocoroboffmpeg/js/chunk-vendors.8366e8e5.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.a7b2d655cbda7c7e4e23a0c209e1f8ba.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.a7b2d655cbda7c7e4e23a0c209e1f8ba.css.map


+ 253 - 0
dist/static/ffmpeg/ffmpeg-core.js

@@ -0,0 +1,253 @@
+
+var createFFmpegCore = (function() {
+  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
+  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
+  return (
+function(createFFmpegCore) {
+  createFFmpegCore = createFFmpegCore || {};
+
+
+var f;f||(f=typeof createFFmpegCore !== 'undefined' ? createFFmpegCore : {});var ba,ca;f.ready=new Promise(function(a,b){ba=a;ca=b});var da={},ea;for(ea in f)f.hasOwnProperty(ea)&&(da[ea]=f[ea]);var fa=[],ha="./this.program";function ja(a,b){throw b;}var ka=!1,la=!1,h=!1,ma=!1;ka="object"===typeof window;la="function"===typeof importScripts;h="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ma=!ka&&!h&&!la;var l=f.ENVIRONMENT_IS_PTHREAD||!1;
+l&&(oa=f.buffer);var pa="";function qa(a){return f.locateFile?f.locateFile(a,pa):pa+a}var ra,sa,ta,va;
+if(h){pa=la?require("path").dirname(pa)+"/":__dirname+"/";ra=function(a,b){ta||(ta=require("fs"));va||(va=require("path"));a=va.normalize(a);return ta.readFileSync(a,b?null:"utf8")};sa=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1<process.argv.length&&(ha=process.argv[1].replace(/\\/g,"/"));fa=process.argv.slice(2);process.on("uncaughtException",function(a){if(!(a instanceof wa))throw a;});process.on("unhandledRejection",n);ja=function(a){process.exit(a)};f.inspect=
+function(){return"[Emscripten Module object]"};var xa;try{xa=require("worker_threads")}catch(a){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),a;}global.Worker=xa.Worker}else if(ma)"undefined"!=typeof read&&(ra=function(a){return read(a)}),sa=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!=typeof scriptArgs?fa=scriptArgs:
+"undefined"!=typeof arguments&&(fa=arguments),"function"===typeof quit&&(ja=function(a){quit(a)}),"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ka||la)la?pa=self.location.href:"undefined"!==typeof document&&document.currentScript&&(pa=document.currentScript.src),_scriptDir&&(pa=_scriptDir),0!==pa.indexOf("blob:")?pa=pa.substr(0,pa.lastIndexOf("/")+1):pa="",h?(ra=function(a,
+b){ta||(ta=require("fs"));va||(va=require("path"));a=va.normalize(a);return ta.readFileSync(a,b?null:"utf8")},sa=function(a){a=ra(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a}):(ra=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},la&&(sa=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}));h&&"undefined"===typeof performance&&(global.performance=require("perf_hooks").performance);
+var ya=f.print||console.log.bind(console),u=f.printErr||console.warn.bind(console);for(ea in da)da.hasOwnProperty(ea)&&(f[ea]=da[ea]);da=null;f.arguments&&(fa=f.arguments);f.thisProgram&&(ha=f.thisProgram);f.quit&&(ja=f.quit);var za,Aa=0,Ba;f.wasmBinary&&(Ba=f.wasmBinary);var noExitRuntime;f.noExitRuntime&&(noExitRuntime=f.noExitRuntime);"object"!==typeof WebAssembly&&n("no native wasm support detected");var Ca,Da,threadInfoStruct=0,selfThreadId=0,Ea=!1;
+function assert(a,b){a||n("Assertion failed: "+b)}function Fa(a){var b=f["_"+a];assert(b,"Cannot call unknown function "+a+", make sure it is exported");return b}
+function Ga(a,b,c,d){var e={string:function(q){var t=0;if(null!==q&&void 0!==q&&0!==q){var w=(q.length<<2)+1;t=Ha(w);Ia(q,v,t,w)}return t},array:function(q){var t=Ha(q.length);y.set(q,t);return t}},g=Fa(a),k=[];a=0;if(d)for(var m=0;m<d.length;m++){var r=e[c[m]];r?(0===a&&(a=A()),k[m]=r(d[m])):k[m]=d[m]}c=g.apply(null,k);c="string"===b?C(c):"boolean"===b?!!c:c;0!==a&&D(a);return c}
+function Ja(a,b,c){c=b+c;for(var d="";!(b>=c);){var e=a[b++];if(!e)break;if(e&128){var g=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var k=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|k:(e&7)<<18|g<<12|k<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function C(a,b){return a?Ja(v,a,b):""}
+function Ia(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var m=a.charCodeAt(++g);k=65536+((k&1023)<<10)|m&1023}if(127>=k){if(c>=d)break;b[c++]=k}else{if(2047>=k){if(c+1>=d)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++]=224|k>>12}else{if(c+3>=d)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-e}
+function Ka(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function La(a){var b=Ka(a)+1,c=Ma(b);c&&Ia(a,y,c,b);return c}function Na(a){var b=Ka(a)+1,c=Ha(b);Ia(a,y,c,b);return c}function Pa(a,b,c){for(var d=0;d<a.length;++d)y[b++>>0]=a.charCodeAt(d);c||(y[b>>0]=0)}var oa,y,v,Qa,Ra,E,F,G,Sa,Ta=f.INITIAL_MEMORY||2146435072;
+if(l)Ca=f.wasmMemory,oa=f.buffer;else if(f.wasmMemory)Ca=f.wasmMemory;else if(Ca=new WebAssembly.Memory({initial:Ta/65536,maximum:Ta/65536,shared:!0}),!(Ca.buffer instanceof SharedArrayBuffer))throw u("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),h&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),
+Error("bad memory");Ca&&(oa=Ca.buffer);Ta=oa.byteLength;var Ua=oa;oa=Ua;f.HEAP8=y=new Int8Array(Ua);f.HEAP16=Qa=new Int16Array(Ua);f.HEAP32=E=new Int32Array(Ua);f.HEAPU8=v=new Uint8Array(Ua);f.HEAPU16=Ra=new Uint16Array(Ua);f.HEAPU32=F=new Uint32Array(Ua);f.HEAPF32=G=new Float32Array(Ua);f.HEAPF64=Sa=new Float64Array(Ua);var H,Va=[],Wa=[],Xa=[],Ya=[],Za=[];function $a(){var a=f.preRun.shift();Va.unshift(a)}var ab=0,bb=null,cb=null;
+function eb(){assert(!l,"addRunDependency cannot be used in a pthread worker");ab++;f.monitorRunDependencies&&f.monitorRunDependencies(ab)}function fb(){ab--;f.monitorRunDependencies&&f.monitorRunDependencies(ab);if(0==ab&&(null!==bb&&(clearInterval(bb),bb=null),cb)){var a=cb;cb=null;a()}}f.preloadedImages={};f.preloadedAudios={};
+function n(a){if(f.onAbort)f.onAbort(a);l&&console.error("Pthread aborting at "+Error().stack);u(a);Ea=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ca(a);throw a;}function gb(a){var b=hb;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function ib(){return gb("data:application/octet-stream;base64,")}var hb="ffmpeg-core.wasm";ib()||(hb=qa(hb));
+function jb(){try{if(Ba)return new Uint8Array(Ba);if(sa)return sa(hb);throw"both async and sync fetching of the wasm failed";}catch(a){n(a)}}function kb(){return Ba||!ka&&!la||"function"!==typeof fetch||gb("file://")?Promise.resolve().then(jb):fetch(hb,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+hb+"'";return a.arrayBuffer()}).catch(function(){return jb()})}
+var J,L,mb={5454720:function(){throw"Canceled!";},5454940:function(a,b){setTimeout(function(){lb(a,b)},0)},5455042:function(){return 5242880}};function nb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(f);else{var c=b.vh;"number"===typeof c?void 0===b.Tf?H.get(c)():H.get(c)(b.Tf):c(void 0===b.Tf?null:b.Tf)}}}function ob(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){return b===b?b:b+" ["+b+"]"})}
+f.dynCall=function(a,b,c){var d;-1!=a.indexOf("j")?d=c&&c.length?f["dynCall_"+a].apply(null,[b].concat(c)):f["dynCall_"+a].call(null,b):d=H.get(b).apply(null,c);return d};var pb=0,qb=0,rb=0;function sb(a,b,c){pb=a|0;rb=b|0;qb=c|0}f.registerPthreadPtr=sb;
+function tb(a,b){if(0>=a||a>y.length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=Atomics.load(E,M.Vf>>2),d=0;if(c==a&&Atomics.compareExchange(E,M.Vf>>2,c,0)==c&&(--b,d=1,0>=b))return 1;a=Atomics.notify(E,a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;}f._emscripten_futex_wake=tb;
+function ub(a){if(l)throw"Internal Error! cancelThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cancelThread!";M.Ef[a].worker.postMessage({cmd:"cancel"})}function vb(a){if(l)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cleanupThread!";E[a+12>>2]=0;(a=M.Ef[a])&&M.Ag(a.worker)}
+var M={Ph:1,nj:{Ih:0,Jh:0},Gf:[],Kf:[],lj:function(){},pi:function(){M.xf=Ma(232);for(var a=0;58>a;++a)F[M.xf/4+a]=0;E[M.xf+12>>2]=M.xf;a=M.xf+156;E[a>>2]=a;var b=Ma(512);for(a=0;128>a;++a)F[b/4+a]=0;Atomics.store(F,M.xf+104>>2,b);Atomics.store(F,M.xf+40>>2,M.xf);Atomics.store(F,M.xf+44>>2,42);M.Ch();sb(M.xf,!la,1);wb(M.xf)},ri:function(){M.Ch();ba(f);M.receiveObjectTransfer=M.Ii;M.setThreadStatus=M.Li;M.threadCancel=M.Pi;M.threadExit=M.Qi},Ch:function(){M.Vf=xb},Ef:{},Dg:[],Li:function(){},eh:function(){for(;0<
+M.Dg.length;)M.Dg.pop()();l&&threadInfoStruct&&yb()},Qi:function(a){var b=pb|0;b&&(Atomics.store(F,b+4>>2,a),Atomics.store(F,b+0>>2,1),Atomics.store(F,b+60>>2,1),Atomics.store(F,b+64>>2,0),M.eh(),tb(b+0,2147483647),sb(0,0,0),threadInfoStruct=0,l&&postMessage({cmd:"exit"}))},Pi:function(){M.eh();Atomics.store(F,threadInfoStruct+4>>2,-1);Atomics.store(F,threadInfoStruct+0>>2,1);tb(threadInfoStruct+0,2147483647);threadInfoStruct=selfThreadId=0;sb(0,0,0);postMessage({cmd:"cancelDone"})},Oi:function(){for(var a in M.Ef){var b=
+M.Ef[a];b&&b.worker&&M.Ag(b.worker)}M.Ef={};for(a=0;a<M.Gf.length;++a){var c=M.Gf[a];c.terminate()}M.Gf=[];for(a=0;a<M.Kf.length;++a)c=M.Kf[a],b=c.yf,M.Pg(b),c.terminate();M.Kf=[]},Pg:function(a){if(a){if(a.threadInfoStruct){var b=E[a.threadInfoStruct+104>>2];E[a.threadInfoStruct+104>>2]=0;zb(b);zb(a.threadInfoStruct)}a.threadInfoStruct=0;a.Kg&&a.Rf&&zb(a.Rf);a.Rf=0;a.worker&&(a.worker.yf=null)}},Ag:function(a){delete M.Ef[a.yf.Lh];M.Gf.push(a);M.Kf.splice(M.Kf.indexOf(a),1);M.Pg(a.yf);a.yf=void 0},
+Ii:function(){},vi:function(a,b){a.onmessage=function(c){var d=c.data,e=d.cmd;a.yf&&(M.Mg=a.yf.threadInfoStruct);if(d.targetThread&&d.targetThread!=(pb|0)){var g=M.Ef[d.xj];g?g.worker.postMessage(c.data,d.transferList):console.error('Internal error! Worker sent a message "'+e+'" to target pthread '+d.targetThread+", but that thread no longer exists!")}else if("processQueuedMainThreadWork"===e)Ab();else if("spawnThread"===e)Bb(c.data);else if("cleanupThread"===e)vb(d.thread);else if("killThread"===
+e){c=d.thread;if(l)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in killThread!";E[c+12>>2]=0;c=M.Ef[c];c.worker.terminate();M.Pg(c);M.Kf.splice(M.Kf.indexOf(c.worker),1);c.worker.yf=void 0}else if("cancelThread"===e)ub(d.thread);else if("loaded"===e)a.loaded=!0,b&&b(a),a.og&&(a.og(),delete a.og);else if("print"===e)ya("Thread "+d.threadId+": "+d.text);else if("printErr"===e)u("Thread "+d.threadId+": "+d.text);
+else if("alert"===e)alert("Thread "+d.threadId+": "+d.text);else if("exit"===e)a.yf&&Atomics.load(F,a.yf.Lh+68>>2)&&M.Ag(a);else if("exitProcess"===e){noExitRuntime=!1;try{Cb(d.returnCode)}catch(k){if(k instanceof wa)return;throw k;}}else"cancelDone"===e?M.Ag(a):"objectTransfer"!==e&&("setimmediate"===c.data.target?a.postMessage(c.data):u("worker sent an unknown command "+e));M.Mg=void 0};a.onerror=function(c){u("pthread sent an error! "+c.filename+":"+c.lineno+": "+c.message)};h&&(a.on("message",
+function(c){a.onmessage({data:c})}),a.on("error",function(c){a.onerror(c)}),a.on("exit",function(){}));a.postMessage({cmd:"load",urlOrBlob:f.mainScriptUrlOrBlob||_scriptDir,wasmMemory:Ca,wasmModule:Da})},Vh:function(){var a=qa("ffmpeg-core.worker.js");M.Gf.push(new Worker(a))},li:function(){0==M.Gf.length&&(M.Vh(),M.vi(M.Gf[0]));return 0<M.Gf.length?M.Gf.pop():null},Zi:function(a){for(a=performance.now()+a;performance.now()<a;);}};f.establishStackSpace=function(a){D(a)};f.getNoExitRuntime=function(){return noExitRuntime};
+var Db;h?Db=function(){var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:l?Db=function(){return performance.now()-f.__performance_now_clock_drift}:"undefined"!==typeof dateNow?Db=dateNow:Db=function(){return performance.now()};function Eb(a){return E[Fb()>>2]=a}function Gb(a,b){if(0===a)a=Date.now();else if(1===a||4===a)a=Db();else return Eb(28),-1;E[b>>2]=a/1E3|0;E[b+4>>2]=a%1E3*1E6|0;return 0}function Hb(a,b){if(l)return N(1,1,a,b);Ya.unshift({vh:a,Tf:b})}
+function Ib(a,b){a=new Date(1E3*E[a>>2]);E[b>>2]=a.getUTCSeconds();E[b+4>>2]=a.getUTCMinutes();E[b+8>>2]=a.getUTCHours();E[b+12>>2]=a.getUTCDate();E[b+16>>2]=a.getUTCMonth();E[b+20>>2]=a.getUTCFullYear()-1900;E[b+24>>2]=a.getUTCDay();E[b+36>>2]=0;E[b+32>>2]=0;E[b+28>>2]=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;Ib.ih||(Ib.ih=La("GMT"));E[b+40>>2]=Ib.ih;return b}
+function Jb(){function a(k){return(k=k.toTimeString().match(/\(([A-Za-z ]+)\)$/))?k[1]:"GMT"}if(l)return N(2,1);if(!Jb.Yh){Jb.Yh=!0;var b=(new Date).getFullYear(),c=new Date(b,0,1),d=new Date(b,6,1);b=c.getTimezoneOffset();var e=d.getTimezoneOffset(),g=Math.max(b,e);E[Kb()>>2]=60*g;E[Lb()>>2]=Number(b!=e);c=a(c);d=a(d);c=La(c);d=La(d);e<b?(E[Mb()>>2]=c,E[Mb()+4>>2]=d):(E[Mb()>>2]=d,E[Mb()+4>>2]=c)}}
+function Nb(a,b){Jb();a=new Date(1E3*E[a>>2]);E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;E[b+32>>2]=a;a=E[Mb()+(a?4:0)>>2];
+E[b+40>>2]=a;return b}function Ob(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function Pb(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ob(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}
+function Qb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Rb(a){if("/"===a)return"/";a=Pb(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Sb(a,b){return Pb(a+"/"+b)}
+function Tb(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(h)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){n("randomDevice")}}
+function Ub(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:O.cwd();if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ob(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}
+function Vb(a,b){function c(k){for(var m=0;m<k.length&&""===k[m];m++);for(var r=k.length-1;0<=r&&""===k[r];r--);return m>r?[]:k.slice(m,r-m+1)}a=Ub(a).substr(1);b=Ub(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),e=d,g=0;g<d;g++)if(a[g]!==b[g]){e=g;break}d=[];for(g=e;g<a.length;g++)d.push("..");d=d.concat(b.slice(e));return d.join("/")}var Wb=[];function Xb(a,b){Wb[a]={input:[],output:[],Yf:b};O.dh(a,Yb)}
+var Yb={open:function(a){var b=Wb[a.node.rdev];if(!b)throw new O.af(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Yf.flush(a.tty)},flush:function(a){a.tty.Yf.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Yf.xh)throw new O.af(60);for(var e=0,g=0;g<d;g++){try{var k=a.tty.Yf.xh(a.tty)}catch(m){throw new O.af(29);}if(void 0===k&&0===e)throw new O.af(6);if(null===k||void 0===k)break;e++;b[c+g]=k}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d){if(!a.tty||!a.tty.Yf.Zg)throw new O.af(60);
+try{for(var e=0;e<d;e++)a.tty.Yf.Zg(a.tty,b[c+e])}catch(g){throw new O.af(29);}d&&(a.node.timestamp=Date.now());return e}},$b={xh:function(a){if(!a.input.length){var b=null;if(h){var c=Buffer.Sf?Buffer.Sf(256):new Buffer(256),d=0;try{d=ta.readSync(process.stdin.fd,c,0,256,null)}catch(e){if(-1!=e.toString().indexOf("EOF"))d=0;else throw e;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==
+typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=Zb(b,!0)}return a.input.shift()},Zg:function(a,b){null===b||10===b?(ya(Ja(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(ya(Ja(a.output,0)),a.output=[])}},dc={Zg:function(a,b){null===b||10===b?(u(Ja(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(u(Ja(a.output,0)),a.output=[])}},P={Df:null,jf:function(){return P.createNode(null,
+"/",16895,0)},createNode:function(a,b,c,d){if(O.si(c)||O.isFIFO(c))throw new O.af(63);P.Df||(P.Df={dir:{node:{Af:P.cf.Af,nf:P.cf.nf,lookup:P.cf.lookup,Ff:P.cf.Ff,rename:P.cf.rename,unlink:P.cf.unlink,rmdir:P.cf.rmdir,readdir:P.cf.readdir,symlink:P.cf.symlink},stream:{tf:P.df.tf}},file:{node:{Af:P.cf.Af,nf:P.cf.nf},stream:{tf:P.df.tf,read:P.df.read,write:P.df.write,fg:P.df.fg,Wf:P.df.Wf,Xf:P.df.Xf}},link:{node:{Af:P.cf.Af,nf:P.cf.nf,readlink:P.cf.readlink},stream:{}},lh:{node:{Af:P.cf.Af,nf:P.cf.nf},
+stream:O.$h}});c=O.createNode(a,b,c,d);O.kf(c.mode)?(c.cf=P.Df.dir.node,c.df=P.Df.dir.stream,c.bf={}):O.isFile(c.mode)?(c.cf=P.Df.file.node,c.df=P.Df.file.stream,c.gf=0,c.bf=null):O.Mf(c.mode)?(c.cf=P.Df.link.node,c.df=P.Df.link.stream):O.hg(c.mode)&&(c.cf=P.Df.lh.node,c.df=P.Df.lh.stream);c.timestamp=Date.now();a&&(a.bf[b]=c);return c},gj:function(a){if(a.bf&&a.bf.subarray){for(var b=[],c=0;c<a.gf;++c)b.push(a.bf[c]);return b}return a.bf},hj:function(a){return a.bf?a.bf.subarray?a.bf.subarray(0,
+a.gf):new Uint8Array(a.bf):new Uint8Array(0)},sh:function(a,b){var c=a.bf?a.bf.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.bf,a.bf=new Uint8Array(b),0<a.gf&&a.bf.set(c.subarray(0,a.gf),0))},Ji:function(a,b){if(a.gf!=b)if(0==b)a.bf=null,a.gf=0;else{if(!a.bf||a.bf.subarray){var c=a.bf;a.bf=new Uint8Array(b);c&&a.bf.set(c.subarray(0,Math.min(b,a.gf)))}else if(a.bf||(a.bf=[]),a.bf.length>b)a.bf.length=b;else for(;a.bf.length<b;)a.bf.push(0);a.gf=b}},cf:{Af:function(a){var b=
+{};b.dev=O.hg(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;O.kf(a.mode)?b.size=4096:O.isFile(a.mode)?b.size=a.gf:O.Mf(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Xh=4096;b.blocks=Math.ceil(b.size/b.Xh);return b},nf:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&P.Ji(a,b.size)},lookup:function(){throw O.Qg[44];},Ff:function(a,
+b,c,d){return P.createNode(a,b,c,d)},rename:function(a,b,c){if(O.kf(a.mode)){try{var d=O.Bf(b,c)}catch(g){}if(d)for(var e in d.bf)throw new O.af(55);}delete a.parent.bf[a.name];a.name=c;b.bf[c]=a;a.parent=b},unlink:function(a,b){delete a.bf[b]},rmdir:function(a,b){var c=O.Bf(a,b),d;for(d in c.bf)throw new O.af(55);delete a.bf[b]},readdir:function(a){var b=[".",".."],c;for(c in a.bf)a.bf.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=P.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!O.Mf(a.mode))throw new O.af(28);
+return a.link}},df:{read:function(a,b,c,d,e){var g=a.node.bf;if(e>=a.node.gf)return 0;a=Math.min(a.node.gf-e,d);if(8<a&&g.subarray)b.set(g.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=g[e+d];return a},write:function(a,b,c,d,e,g){if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.bf||a.bf.subarray)){if(g)return a.bf=b.subarray(c,c+d),a.gf=d;if(0===a.gf&&0===e)return a.bf=b.slice(c,c+d),a.gf=d;if(e+d<=a.gf)return a.bf.set(b.subarray(c,c+d),e),d}P.sh(a,e+d);if(a.bf.subarray&&b.subarray)a.bf.set(b.subarray(c,
+c+d),e);else for(g=0;g<d;g++)a.bf[e+g]=b[c+g];a.gf=Math.max(a.gf,e+d);return d},tf:function(a,b,c){1===c?b+=a.position:2===c&&O.isFile(a.node.mode)&&(b+=a.node.gf);if(0>b)throw new O.af(28);return b},fg:function(a,b,c){P.sh(a.node,b+c);a.node.gf=Math.max(a.node.gf,b+c)},Wf:function(a,b,c,d,e,g){assert(0===b);if(!O.isFile(a.node.mode))throw new O.af(43);a=a.node.bf;if(g&2||a.buffer!==oa){if(0<d||d+c<a.length)a.subarray?a=a.subarray(d,d+c):a=Array.prototype.slice.call(a,d,d+c);d=!0;g=16384*Math.ceil(c/
+16384);for(b=Ma(g);c<g;)y[b+c++]=0;c=b;if(!c)throw new O.af(48);y.set(a,c)}else d=!1,c=a.byteOffset;return{Hi:c,Jg:d}},Xf:function(a,b,c,d,e){if(!O.isFile(a.node.mode))throw new O.af(43);if(e&2)return 0;P.df.write(a,b,0,d,c,!1);return 0}}},O={root:null,mg:[],ph:{},streams:[],Ai:1,Cf:null,oh:"/",Tg:!1,Bh:!0,mf:{},Mh:{Gh:{Rh:1,Sh:2}},af:null,Qg:{},ii:null,Cg:0,kj:function(a){if(!(a instanceof O.af)){a:{var b=Error();if(!b.stack){try{throw Error();}catch(c){b=c}if(!b.stack){b="(no stack trace available)";
+break a}}b=b.stack.toString()}f.extraStackTrace&&(b+="\n"+f.extraStackTrace());b=ob(b);throw a+" : "+b;}return Eb(a.ef)},ff:function(a,b){a=Ub(O.cwd(),a);b=b||{};if(!a)return{path:"",node:null};var c={Og:!0,ah:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8<b.ah)throw new O.af(32);a=Ob(a.split("/").filter(function(k){return!!k}),!1);var e=O.root;c="/";for(d=0;d<a.length;d++){var g=d===a.length-1;if(g&&b.parent)break;e=O.Bf(e,a[d]);c=Sb(c,a[d]);O.Nf(e)&&(!g||g&&b.Og)&&(e=e.lg.root);if(!g||b.wf)for(g=
+0;O.Mf(e.mode);)if(e=O.readlink(c),c=Ub(Qb(c),e),e=O.ff(c,{ah:b.ah}).node,40<g++)throw new O.af(32);}return{path:c,node:e}},If:function(a){for(var b;;){if(O.wg(a))return a=a.jf.Eh,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},Sg:function(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%O.Cf.length},zh:function(a){var b=O.Sg(a.parent.id,a.name);a.Pf=O.Cf[b];O.Cf[b]=a},Ah:function(a){var b=O.Sg(a.parent.id,a.name);if(O.Cf[b]===a)O.Cf[b]=a.Pf;
+else for(b=O.Cf[b];b;){if(b.Pf===a){b.Pf=a.Pf;break}b=b.Pf}},Bf:function(a,b){var c=O.yi(a);if(c)throw new O.af(c,a);for(c=O.Cf[O.Sg(a.id,b)];c;c=c.Pf){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return O.lookup(a,b)},createNode:function(a,b,c,d){a=new O.Oh(a,b,c,d);O.zh(a);return a},Ng:function(a){O.Ah(a)},wg:function(a){return a===a.parent},Nf:function(a){return!!a.lg},isFile:function(a){return 32768===(a&61440)},kf:function(a){return 16384===(a&61440)},Mf:function(a){return 40960===(a&61440)},
+hg:function(a){return 8192===(a&61440)},si:function(a){return 24576===(a&61440)},isFIFO:function(a){return 4096===(a&61440)},isSocket:function(a){return 49152===(a&49152)},ji:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},Dh:function(a){var b=O.ji[a];if("undefined"===typeof b)throw Error("Unknown file open mode: "+a);return b},th:function(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Jf:function(a,b){if(O.Bh)return 0;
+if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0},yi:function(a){var b=O.Jf(a,"x");return b?b:a.cf.lookup?0:2},Yg:function(a,b){try{return O.Bf(a,b),20}catch(c){}return O.Jf(a,"wx")},xg:function(a,b,c){try{var d=O.Bf(a,b)}catch(e){return e.ef}if(a=O.Jf(a,"wx"))return a;if(c){if(!O.kf(d.mode))return 54;if(O.wg(d)||O.If(d)===O.cwd())return 10}else if(O.kf(d.mode))return 31;return 0},zi:function(a,b){return a?
+O.Mf(a.mode)?32:O.kf(a.mode)&&("r"!==O.th(b)||b&512)?31:O.Jf(a,O.th(b)):44},Qh:4096,Bi:function(a,b){b=b||O.Qh;for(a=a||0;a<=b;a++)if(!O.streams[a])return a;throw new O.af(33);},zf:function(a){return O.streams[a]},nh:function(a,b,c){O.Hg||(O.Hg=function(){},O.Hg.prototype={object:{get:function(){return this.node},set:function(g){this.node=g}}});var d=new O.Hg,e;for(e in a)d[e]=a[e];a=d;b=O.Bi(b,c);a.fd=b;return O.streams[b]=a},ai:function(a){O.streams[a]=null},$h:{open:function(a){a.df=O.ki(a.node.rdev).df;
+a.df.open&&a.df.open(a)},tf:function(){throw new O.af(70);}},Wg:function(a){return a>>8},oj:function(a){return a&255},Of:function(a,b){return a<<8|b},dh:function(a,b){O.ph[a]={df:b}},ki:function(a){return O.ph[a]},wh:function(a){var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,c.mg)}return b},Kh:function(a,b){function c(k){O.Cg--;return b(k)}function d(k){if(k){if(!d.gi)return d.gi=!0,c(k)}else++g>=e.length&&c(null)}"function"===typeof a&&(b=a,a=!1);O.Cg++;1<O.Cg&&u("warning: "+
+O.Cg+" FS.syncfs operations in flight at once, probably just doing extra work");var e=O.wh(O.root.jf),g=0;e.forEach(function(k){if(!k.type.Kh)return d(null);k.type.Kh(k,a,d)})},jf:function(a,b,c){var d="/"===c,e=!c;if(d&&O.root)throw new O.af(10);if(!d&&!e){var g=O.ff(c,{Og:!1});c=g.path;g=g.node;if(O.Nf(g))throw new O.af(10);if(!O.kf(g.mode))throw new O.af(54);}b={type:a,tj:b,Eh:c,mg:[]};a=a.jf(b);a.jf=b;b.root=a;d?O.root=a:g&&(g.lg=b,g.jf&&g.jf.mg.push(b));return a},zj:function(a){a=O.ff(a,{Og:!1});
+if(!O.Nf(a.node))throw new O.af(28);a=a.node;var b=a.lg,c=O.wh(b);Object.keys(O.Cf).forEach(function(d){for(d=O.Cf[d];d;){var e=d.Pf;-1!==c.indexOf(d.jf)&&O.Ng(d);d=e}});a.lg=null;a.jf.mg.splice(a.jf.mg.indexOf(b),1)},lookup:function(a,b){return a.cf.lookup(a,b)},Ff:function(a,b,c){var d=O.ff(a,{parent:!0}).node;a=Rb(a);if(!a||"."===a||".."===a)throw new O.af(28);var e=O.Yg(d,a);if(e)throw new O.af(e);if(!d.cf.Ff)throw new O.af(63);return d.cf.Ff(d,a,b,c)},create:function(a,b){return O.Ff(a,(void 0!==
+b?b:438)&4095|32768,0)},mkdir:function(a,b){return O.Ff(a,(void 0!==b?b:511)&1023|16384,0)},qj:function(a,b){a=a.split("/");for(var c="",d=0;d<a.length;++d)if(a[d]){c+="/"+a[d];try{O.mkdir(c,b)}catch(e){if(20!=e.ef)throw e;}}},yg:function(a,b,c){"undefined"===typeof c&&(c=b,b=438);return O.Ff(a,b|8192,c)},symlink:function(a,b){if(!Ub(a))throw new O.af(44);var c=O.ff(b,{parent:!0}).node;if(!c)throw new O.af(44);b=Rb(b);var d=O.Yg(c,b);if(d)throw new O.af(d);if(!c.cf.symlink)throw new O.af(63);return c.cf.symlink(c,
+b,a)},rename:function(a,b){var c=Qb(a),d=Qb(b),e=Rb(a),g=Rb(b);var k=O.ff(a,{parent:!0});var m=k.node;k=O.ff(b,{parent:!0});k=k.node;if(!m||!k)throw new O.af(44);if(m.jf!==k.jf)throw new O.af(75);var r=O.Bf(m,e);d=Vb(a,d);if("."!==d.charAt(0))throw new O.af(28);d=Vb(b,c);if("."!==d.charAt(0))throw new O.af(55);try{var q=O.Bf(k,g)}catch(t){}if(r!==q){c=O.kf(r.mode);if(e=O.xg(m,e,c))throw new O.af(e);if(e=q?O.xg(k,g,c):O.Yg(k,g))throw new O.af(e);if(!m.cf.rename)throw new O.af(63);if(O.Nf(r)||q&&O.Nf(q))throw new O.af(10);
+if(k!==m&&(e=O.Jf(m,"w")))throw new O.af(e);try{O.mf.willMovePath&&O.mf.willMovePath(a,b)}catch(t){u("FS.trackingDelegate['willMovePath']('"+a+"', '"+b+"') threw an exception: "+t.message)}O.Ah(r);try{m.cf.rename(r,k,g)}catch(t){throw t;}finally{O.zh(r)}try{if(O.mf.onMovePath)O.mf.onMovePath(a,b)}catch(t){u("FS.trackingDelegate['onMovePath']('"+a+"', '"+b+"') threw an exception: "+t.message)}}},rmdir:function(a){var b=O.ff(a,{parent:!0}).node,c=Rb(a),d=O.Bf(b,c),e=O.xg(b,c,!0);if(e)throw new O.af(e);
+if(!b.cf.rmdir)throw new O.af(63);if(O.Nf(d))throw new O.af(10);try{O.mf.willDeletePath&&O.mf.willDeletePath(a)}catch(g){u("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.cf.rmdir(b,c);O.Ng(d);try{if(O.mf.onDeletePath)O.mf.onDeletePath(a)}catch(g){u("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}},readdir:function(a){a=O.ff(a,{wf:!0}).node;if(!a.cf.readdir)throw new O.af(54);return a.cf.readdir(a)},unlink:function(a){var b=O.ff(a,
+{parent:!0}).node,c=Rb(a),d=O.Bf(b,c),e=O.xg(b,c,!1);if(e)throw new O.af(e);if(!b.cf.unlink)throw new O.af(63);if(O.Nf(d))throw new O.af(10);try{O.mf.willDeletePath&&O.mf.willDeletePath(a)}catch(g){u("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.cf.unlink(b,c);O.Ng(d);try{if(O.mf.onDeletePath)O.mf.onDeletePath(a)}catch(g){u("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+g.message)}},readlink:function(a){a=O.ff(a).node;if(!a)throw new O.af(44);
+if(!a.cf.readlink)throw new O.af(28);return Ub(O.If(a.parent),a.cf.readlink(a))},stat:function(a,b){a=O.ff(a,{wf:!b}).node;if(!a)throw new O.af(44);if(!a.cf.Af)throw new O.af(63);return a.cf.Af(a)},lstat:function(a){return O.stat(a,!0)},chmod:function(a,b,c){var d;"string"===typeof a?d=O.ff(a,{wf:!c}).node:d=a;if(!d.cf.nf)throw new O.af(63);d.cf.nf(d,{mode:b&4095|d.mode&-4096,timestamp:Date.now()})},lchmod:function(a,b){O.chmod(a,b,!0)},fchmod:function(a,b){a=O.zf(a);if(!a)throw new O.af(8);O.chmod(a.node,
+b)},chown:function(a,b,c,d){var e;"string"===typeof a?e=O.ff(a,{wf:!d}).node:e=a;if(!e.cf.nf)throw new O.af(63);e.cf.nf(e,{timestamp:Date.now()})},lchown:function(a,b,c){O.chown(a,b,c,!0)},fchown:function(a,b,c){a=O.zf(a);if(!a)throw new O.af(8);O.chown(a.node,b,c)},truncate:function(a,b){if(0>b)throw new O.af(28);var c;"string"===typeof a?c=O.ff(a,{wf:!0}).node:c=a;if(!c.cf.nf)throw new O.af(63);if(O.kf(c.mode))throw new O.af(31);if(!O.isFile(c.mode))throw new O.af(28);if(a=O.Jf(c,"w"))throw new O.af(a);
+c.cf.nf(c,{size:b,timestamp:Date.now()})},fj:function(a,b){a=O.zf(a);if(!a)throw new O.af(8);if(0===(a.flags&2097155))throw new O.af(28);O.truncate(a.node,b)},Aj:function(a,b,c){a=O.ff(a,{wf:!0}).node;a.cf.nf(a,{timestamp:Math.max(b,c)})},open:function(a,b,c,d,e){if(""===a)throw new O.af(44);b="string"===typeof b?O.Dh(b):b;c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var g=a;else{a=Pb(a);try{g=O.ff(a,{wf:!(b&131072)}).node}catch(m){}}var k=!1;if(b&64)if(g){if(b&128)throw new O.af(20);
+}else g=O.Ff(a,c,0),k=!0;if(!g)throw new O.af(44);O.hg(g.mode)&&(b&=-513);if(b&65536&&!O.kf(g.mode))throw new O.af(54);if(!k&&(c=O.zi(g,b)))throw new O.af(c);b&512&&O.truncate(g,0);b&=-131713;d=O.nh({node:g,path:O.If(g),flags:b,seekable:!0,position:0,df:g.df,Wi:[],error:!1},d,e);d.df.open&&d.df.open(d);!f.logReadFiles||b&1||(O.$g||(O.$g={}),a in O.$g||(O.$g[a]=1,u("FS.trackingDelegate error on read file: "+a)));try{O.mf.onOpenFile&&(e=0,1!==(b&2097155)&&(e|=O.Mh.Gh.Rh),0!==(b&2097155)&&(e|=O.Mh.Gh.Sh),
+O.mf.onOpenFile(a,e))}catch(m){u("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+m.message)}return d},close:function(a){if(O.ig(a))throw new O.af(8);a.Lf&&(a.Lf=null);try{a.df.close&&a.df.close(a)}catch(b){throw b;}finally{O.ai(a.fd)}a.fd=null},ig:function(a){return null===a.fd},tf:function(a,b,c){if(O.ig(a))throw new O.af(8);if(!a.seekable||!a.df.tf)throw new O.af(70);if(0!=c&&1!=c&&2!=c)throw new O.af(28);a.position=a.df.tf(a,b,c);a.Wi=[];return a.position},read:function(a,
+b,c,d,e){if(0>d||0>e)throw new O.af(28);if(O.ig(a))throw new O.af(8);if(1===(a.flags&2097155))throw new O.af(8);if(O.kf(a.node.mode))throw new O.af(31);if(!a.df.read)throw new O.af(28);var g="undefined"!==typeof e;if(!g)e=a.position;else if(!a.seekable)throw new O.af(70);b=a.df.read(a,b,c,d,e);g||(a.position+=b);return b},write:function(a,b,c,d,e,g){if(0>d||0>e)throw new O.af(28);if(O.ig(a))throw new O.af(8);if(0===(a.flags&2097155))throw new O.af(8);if(O.kf(a.node.mode))throw new O.af(31);if(!a.df.write)throw new O.af(28);
+a.seekable&&a.flags&1024&&O.tf(a,0,2);var k="undefined"!==typeof e;if(!k)e=a.position;else if(!a.seekable)throw new O.af(70);b=a.df.write(a,b,c,d,e,g);k||(a.position+=b);try{if(a.path&&O.mf.onWriteToFile)O.mf.onWriteToFile(a.path)}catch(m){u("FS.trackingDelegate['onWriteToFile']('"+a.path+"') threw an exception: "+m.message)}return b},fg:function(a,b,c){if(O.ig(a))throw new O.af(8);if(0>b||0>=c)throw new O.af(28);if(0===(a.flags&2097155))throw new O.af(8);if(!O.isFile(a.node.mode)&&!O.kf(a.node.mode))throw new O.af(43);
+if(!a.df.fg)throw new O.af(138);a.df.fg(a,b,c)},Wf:function(a,b,c,d,e,g){if(0!==(e&2)&&0===(g&2)&&2!==(a.flags&2097155))throw new O.af(2);if(1===(a.flags&2097155))throw new O.af(2);if(!a.df.Wf)throw new O.af(43);return a.df.Wf(a,b,c,d,e,g)},Xf:function(a,b,c,d,e){return a&&a.df.Xf?a.df.Xf(a,b,c,d,e):0},sj:function(){return 0},Uf:function(a,b,c){if(!a.df.Uf)throw new O.af(59);return a.df.Uf(a,b,c)},readFile:function(a,b){b=b||{};b.flags=b.flags||"r";b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&
+"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=O.open(a,b.flags);a=O.stat(a).size;var e=new Uint8Array(a);O.read(d,e,0,a,0);"utf8"===b.encoding?c=Ja(e,0):"binary"===b.encoding&&(c=e);O.close(d);return c},writeFile:function(a,b,c){c=c||{};c.flags=c.flags||"w";a=O.open(a,c.flags,c.mode);if("string"===typeof b){var d=new Uint8Array(Ka(b)+1);b=Ia(b,d,0,d.length);O.write(a,d,0,b,void 0,c.Zh)}else if(ArrayBuffer.isView(b))O.write(a,b,0,b.byteLength,void 0,c.Zh);else throw Error("Unsupported data type");
+O.close(a)},cwd:function(){return O.oh},chdir:function(a){a=O.ff(a,{wf:!0});if(null===a.node)throw new O.af(44);if(!O.kf(a.node.mode))throw new O.af(54);var b=O.Jf(a.node,"x");if(b)throw new O.af(b);O.oh=a.path},ci:function(){O.mkdir("/tmp");O.mkdir("/home");O.mkdir("/home/web_user")},bi:function(){O.mkdir("/dev");O.dh(O.Of(1,3),{read:function(){return 0},write:function(b,c,d,e){return e}});O.yg("/dev/null",O.Of(1,3));Xb(O.Of(5,0),$b);Xb(O.Of(6,0),dc);O.yg("/dev/tty",O.Of(5,0));O.yg("/dev/tty1",O.Of(6,
+0));var a=Tb();O.Hf("/dev","random",a);O.Hf("/dev","urandom",a);O.mkdir("/dev/shm");O.mkdir("/dev/shm/tmp")},ei:function(){O.mkdir("/proc");O.mkdir("/proc/self");O.mkdir("/proc/self/fd");O.jf({jf:function(){var a=O.createNode("/proc/self","fd",16895,73);a.cf={lookup:function(b,c){var d=O.zf(+c);if(!d)throw new O.af(8);b={parent:null,jf:{Eh:"fake"},cf:{readlink:function(){return d.path}}};return b.parent=b}};return a}},{},"/proc/self/fd")},fi:function(){f.stdin?O.Hf("/dev","stdin",f.stdin):O.symlink("/dev/tty",
+"/dev/stdin");f.stdout?O.Hf("/dev","stdout",null,f.stdout):O.symlink("/dev/tty","/dev/stdout");f.stderr?O.Hf("/dev","stderr",null,f.stderr):O.symlink("/dev/tty1","/dev/stderr");O.open("/dev/stdin","r");O.open("/dev/stdout","w");O.open("/dev/stderr","w")},rh:function(){O.af||(O.af=function(a,b){this.node=b;this.Ki=function(c){this.ef=c};this.Ki(a);this.message="FS error"},O.af.prototype=Error(),O.af.prototype.constructor=O.af,[44].forEach(function(a){O.Qg[a]=new O.af(a);O.Qg[a].stack="<generic error, no stack>"}))},
+Ni:function(){O.rh();O.Cf=Array(4096);O.jf(P,{},"/");O.ci();O.bi();O.ei();O.ii={MEMFS:P}},gg:function(a,b,c){O.gg.Tg=!0;O.rh();f.stdin=a||f.stdin;f.stdout=b||f.stdout;f.stderr=c||f.stderr;O.fi()},quit:function(){O.gg.Tg=!1;var a=f._fflush;a&&a(0);for(a=0;a<O.streams.length;a++){var b=O.streams[a];b&&O.close(b)}},Rg:function(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c},ej:function(a,b){a=O.Lg(a,b);if(a.exists)return a.object;Eb(a.error);return null},Lg:function(a,b){try{var c=O.ff(a,{wf:!b});a=c.path}catch(e){}var d=
+{wg:!1,exists:!1,error:0,name:null,path:null,object:null,Ci:!1,Ei:null,Di:null};try{c=O.ff(a,{parent:!0}),d.Ci=!0,d.Ei=c.path,d.Di=c.node,d.name=Rb(a),c=O.ff(a,{wf:!b}),d.exists=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.wg="/"===c.path}catch(e){d.error=e.ef}return d},cj:function(a,b){a="string"===typeof a?a:O.If(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=Sb(a,c);try{O.mkdir(d)}catch(e){}a=d}}return d},di:function(a,b,c,d,e){a=Sb("string"===typeof a?a:O.If(a),
+b);return O.create(a,O.Rg(d,e))},mh:function(a,b,c,d,e,g){a=b?Sb("string"===typeof a?a:O.If(a),b):a;d=O.Rg(d,e);e=O.create(a,d);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var k=c.length;b<k;++b)a[b]=c.charCodeAt(b);c=a}O.chmod(e,d|146);a=O.open(e,"w");O.write(a,c,0,c.length,0,g);O.close(a);O.chmod(e,d)}return e},Hf:function(a,b,c,d){a=Sb("string"===typeof a?a:O.If(a),b);b=O.Rg(!!c,!!d);O.Hf.Wg||(O.Hf.Wg=64);var e=O.Of(O.Hf.Wg++,0);O.dh(e,{open:function(g){g.seekable=!1},close:function(){d&&
+d.buffer&&d.buffer.length&&d(10)},read:function(g,k,m,r){for(var q=0,t=0;t<r;t++){try{var w=c()}catch(B){throw new O.af(29);}if(void 0===w&&0===q)throw new O.af(6);if(null===w||void 0===w)break;q++;k[m+t]=w}q&&(g.node.timestamp=Date.now());return q},write:function(g,k,m,r){for(var q=0;q<r;q++)try{d(k[m+q])}catch(t){throw new O.af(29);}r&&(g.node.timestamp=Date.now());return q}});return O.yg(a,b,e)},uh:function(a){if(a.Ug||a.ti||a.link||a.bf)return!0;var b=!0;if("undefined"!==typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
+if(ra)try{a.bf=Zb(ra(a.url),!0),a.gf=a.bf.length}catch(c){b=!1}else throw Error("Cannot load without read() or XMLHttpRequest.");b||Eb(29);return b},bj:function(a,b,c,d,e){function g(){this.Vg=!1;this.Sf=[]}g.prototype.get=function(q){if(!(q>this.length-1||0>q)){var t=q%this.chunkSize;return this.yh(q/this.chunkSize|0)[t]}};g.prototype.Wh=function(q){this.yh=q};g.prototype.kh=function(){var q=new XMLHttpRequest;q.open("HEAD",c,!1);q.send(null);if(!(200<=q.status&&300>q.status||304===q.status))throw Error("Couldn't load "+
+c+". Status: "+q.status);var t=Number(q.getResponseHeader("Content-length")),w,B=(w=q.getResponseHeader("Accept-Ranges"))&&"bytes"===w;q=(w=q.getResponseHeader("Content-Encoding"))&&"gzip"===w;var p=1048576;B||(p=t);var x=this;x.Wh(function(z){var I=z*p,W=(z+1)*p-1;W=Math.min(W,t-1);if("undefined"===typeof x.Sf[z]){var db=x.Sf;if(I>W)throw Error("invalid range ("+I+", "+W+") or no bytes requested!");if(W>t-1)throw Error("only "+t+" bytes available! programmer error!");var K=new XMLHttpRequest;K.open("GET",
+c,!1);t!==p&&K.setRequestHeader("Range","bytes="+I+"-"+W);"undefined"!=typeof Uint8Array&&(K.responseType="arraybuffer");K.overrideMimeType&&K.overrideMimeType("text/plain; charset=x-user-defined");K.send(null);if(!(200<=K.status&&300>K.status||304===K.status))throw Error("Couldn't load "+c+". Status: "+K.status);I=void 0!==K.response?new Uint8Array(K.response||[]):Zb(K.responseText||"",!0);db[z]=I}if("undefined"===typeof x.Sf[z])throw Error("doXHR failed!");return x.Sf[z]});if(q||!t)p=t=1,p=t=this.yh(0).length,
+ya("LazyFiles on gzip forces download of the whole file when length is accessed");this.Uh=t;this.Th=p;this.Vg=!0};if("undefined"!==typeof XMLHttpRequest){if(!la)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var k=new g;Object.defineProperties(k,{length:{get:function(){this.Vg||this.kh();return this.Uh}},chunkSize:{get:function(){this.Vg||this.kh();return this.Th}}});k={Ug:!1,bf:k}}else k={Ug:!1,url:c};var m=O.di(a,b,k,d,
+e);k.bf?m.bf=k.bf:k.url&&(m.bf=null,m.url=k.url);Object.defineProperties(m,{gf:{get:function(){return this.bf.length}}});var r={};Object.keys(m.df).forEach(function(q){var t=m.df[q];r[q]=function(){if(!O.uh(m))throw new O.af(29);return t.apply(null,arguments)}});r.read=function(q,t,w,B,p){if(!O.uh(m))throw new O.af(29);q=q.node.bf;if(p>=q.length)return 0;B=Math.min(q.length-p,B);if(q.slice)for(var x=0;x<B;x++)t[w+x]=q[p+x];else for(x=0;x<B;x++)t[w+x]=q.get(p+x);return B};m.df=r;return m},dj:function(a,
+b,c,d,e,g,k,m,r,q){function t(B){function p(z){q&&q();m||O.mh(a,b,z,d,e,r);g&&g();fb()}var x=!1;f.preloadPlugins.forEach(function(z){!x&&z.canHandle(w)&&(z.handle(B,w,p,function(){k&&k();fb()}),x=!0)});x||p(B)}ec.gg();var w=b?Ub(Sb(a,b)):a;eb();"string"==typeof c?ec.Xi(c,function(B){t(B)},k):t(c)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},gh:function(){return"EM_FS_"+window.location.pathname},hh:20,eg:"FILE_DATA",wj:function(a,b,
+c){b=b||function(){};c=c||function(){};var d=O.indexedDB();try{var e=d.open(O.gh(),O.hh)}catch(g){return c(g)}e.onupgradeneeded=function(){ya("creating db");e.result.createObjectStore(O.eg)};e.onsuccess=function(){var g=e.result.transaction([O.eg],"readwrite"),k=g.objectStore(O.eg),m=0,r=0,q=a.length;a.forEach(function(t){t=k.put(O.Lg(t).object.bf,t);t.onsuccess=function(){m++;m+r==q&&(0==r?b():c())};t.onerror=function(){r++;m+r==q&&(0==r?b():c())}});g.onerror=c};e.onerror=c},mj:function(a,b,c){b=
+b||function(){};c=c||function(){};var d=O.indexedDB();try{var e=d.open(O.gh(),O.hh)}catch(g){return c(g)}e.onupgradeneeded=c;e.onsuccess=function(){var g=e.result;try{var k=g.transaction([O.eg],"readonly")}catch(w){c(w);return}var m=k.objectStore(O.eg),r=0,q=0,t=a.length;a.forEach(function(w){var B=m.get(w);B.onsuccess=function(){O.Lg(w).exists&&O.unlink(w);O.mh(Qb(w),Rb(w),B.result,!0,!0,!0);r++;r+q==t&&(0==q?b():c())};B.onerror=function(){q++;r+q==t&&(0==q?b():c())}});k.onerror=c};e.onerror=c}},
+fc={};
+function hc(a,b,c){try{var d=a(b)}catch(e){if(e&&e.node&&Pb(b)!==Pb(O.If(e.node)))return-54;throw e;}E[c>>2]=d.dev;E[c+4>>2]=0;E[c+8>>2]=d.ino;E[c+12>>2]=d.mode;E[c+16>>2]=d.nlink;E[c+20>>2]=d.uid;E[c+24>>2]=d.gid;E[c+28>>2]=d.rdev;E[c+32>>2]=0;L=[d.size>>>0,(J=d.size,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[c+40>>2]=L[0];E[c+44>>2]=L[1];E[c+48>>2]=4096;E[c+52>>2]=d.blocks;E[c+56>>2]=d.atime.getTime()/1E3|0;E[c+60>>
+2]=0;E[c+64>>2]=d.mtime.getTime()/1E3|0;E[c+68>>2]=0;E[c+72>>2]=d.ctime.getTime()/1E3|0;E[c+76>>2]=0;L=[d.ino>>>0,(J=d.ino,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[c+80>>2]=L[0];E[c+84>>2]=L[1];return 0}var ic=void 0;function Q(){ic+=4;return E[ic-4>>2]}function jc(a){a=O.zf(a);if(!a)throw new O.af(8);return a}
+function kc(a,b,c,d,e){if(l)return N(3,1,a,b,c,d,e);try{e=0;for(var g=b?E[b>>2]:0,k=b?E[b+4>>2]:0,m=c?E[c>>2]:0,r=c?E[c+4>>2]:0,q=d?E[d>>2]:0,t=d?E[d+4>>2]:0,w=0,B=0,p=0,x=0,z=0,I=0,W=(b?E[b>>2]:0)|(c?E[c>>2]:0)|(d?E[d>>2]:0),db=(b?E[b+4>>2]:0)|(c?E[c+4>>2]:0)|(d?E[d+4>>2]:0),K=0;K<a;K++){var Y=1<<K%32;if(32>K?W&Y:db&Y){var ia=O.zf(K);if(!ia)throw new O.af(8);var na=5;ia.df.Zf&&(na=ia.df.Zf(ia));na&1&&(32>K?g&Y:k&Y)&&(32>K?w|=Y:B|=Y,e++);na&4&&(32>K?m&Y:r&Y)&&(32>K?p|=Y:x|=Y,e++);na&2&&(32>K?q&Y:
+t&Y)&&(32>K?z|=Y:I|=Y,e++)}}b&&(E[b>>2]=w,E[b+4>>2]=B);c&&(E[c>>2]=p,E[c+4>>2]=x);d&&(E[d>>2]=z,E[d+4>>2]=I);return e}catch(ua){return"undefined"!==typeof O&&ua instanceof O.af||n(ua),-ua.ef}}function lc(a,b){if(l)return N(4,1,a,b);try{a=C(a);if(b&-8)var c=-28;else{var d;(d=O.ff(a,{wf:!0}).node)?(a="",b&4&&(a+="r"),b&2&&(a+="w"),b&1&&(a+="x"),c=a&&O.Jf(d,a)?-2:0):c=-44}return c}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}
+function mc(a,b,c){if(l)return N(5,1,a,b,c);ic=c;try{var d=jc(a);switch(b){case 0:var e=Q();return 0>e?-28:O.open(d.path,d.flags,0,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=Q(),d.flags|=e,0;case 12:return e=Q(),Qa[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Eb(28),-1;default:return-28}}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function nc(a,b){if(l)return N(6,1,a,b);try{var c=jc(a);return hc(O.stat,c.path,b)}catch(d){return"undefined"!==typeof O&&d instanceof O.af||n(d),-d.ef}}
+function oc(a,b,c){if(l)return N(7,1,a,b,c);try{var d=jc(a);d.Lf||(d.Lf=O.readdir(d.path));a=0;for(var e=O.tf(d,0,1),g=Math.floor(e/280);g<d.Lf.length&&a+280<=c;){var k=d.Lf[g];if("."===k[0]){var m=1;var r=4}else{var q=O.Bf(d.node,k);m=q.id;r=O.hg(q.mode)?2:O.kf(q.mode)?4:O.Mf(q.mode)?10:8}L=[m>>>0,(J=m,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[b+a>>2]=L[0];E[b+a+4>>2]=L[1];L=[280*(g+1)>>>0,(J=280*(g+1),1<=+Math.abs(J)?
+0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[b+a+8>>2]=L[0];E[b+a+12>>2]=L[1];Qa[b+a+16>>1]=280;y[b+a+18>>0]=r;Ia(k,v,b+a+19,256);a+=280;g+=1}O.tf(d,280*g,0);return a}catch(t){return"undefined"!==typeof O&&t instanceof O.af||n(t),-t.ef}}function pc(a,b){if(l)return N(8,1,a,b);try{return qc(b,0,136),E[b>>2]=1,E[b+4>>2]=2,E[b+8>>2]=3,E[b+12>>2]=4,0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}
+function rc(a,b,c){if(l)return N(9,1,a,b,c);ic=c;try{var d=jc(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:if(!d.tty)return-59;var e=Q();return E[e>>2]=0;case 21520:return d.tty?-28:-59;case 21531:return e=Q(),O.Uf(d,b,e);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:n("bad ioctl syscall "+b)}}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function sc(a,b){if(l)return N(10,1,a,b);try{return a=C(a),hc(O.lstat,a,b)}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function tc(a,b){if(l)return N(11,1,a,b);try{return a=C(a),a=Pb(a),"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),O.mkdir(a,b,0),0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}
+function uc(a,b,c,d,e,g){if(l)return N(12,1,a,b,c,d,e,g);try{a:{g<<=12;var k=!1;if(0!==(d&16)&&0!==a%16384)var m=-28;else{if(0!==(d&32)){var r=vc(16384,b);if(!r){m=-48;break a}qc(r,0,b);k=!0}else{var q=O.zf(e);if(!q){m=-8;break a}var t=O.Wf(q,a,b,g,c,d);r=t.Hi;k=t.Jg}fc[r]={xi:r,ui:b,Jg:k,fd:e,Gi:c,flags:d,offset:g};m=r}}return m}catch(w){return"undefined"!==typeof O&&w instanceof O.af||n(w),-w.ef}}
+function wc(a,b){if(l)return N(13,1,a,b);try{if(-1===(a|0)||0===b)var c=-28;else{var d=fc[a];if(d&&b===d.ui){var e=O.zf(d.fd);if(d.Gi&2){var g=d.flags,k=d.offset,m=v.slice(a,a+b);O.Xf(e,m,k,b,g)}fc[a]=null;d.Jg&&zb(d.xi)}c=0}return c}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),-r.ef}}function xc(a,b,c){if(l)return N(14,1,a,b,c);ic=c;try{var d=C(a),e=Q();return O.open(d,b,e).fd}catch(g){return"undefined"!==typeof O&&g instanceof O.af||n(g),-g.ef}}
+function yc(a,b,c){if(l)return N(15,1,a,b,c);try{for(var d=c=0;d<b;d++){var e=a+8*d,g=Qa[e+4>>1],k=32,m=O.zf(E[e>>2]);m&&(k=5,m.df.Zf&&(k=m.df.Zf(m)));(k&=g|24)&&c++;Qa[e+6>>1]=k}return c}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),-r.ef}}function zc(a,b,c,d){if(l)return N(16,1,a,b,c,d);try{return d&&(E[d>>2]=-1,E[d+4>>2]=-1,E[d+8>>2]=-1,E[d+12>>2]=-1),0}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}
+function Ac(a,b,c){if(l)return N(17,1,a,b,c);try{var d=jc(a);return O.read(d,y,b,c)}catch(e){return"undefined"!==typeof O&&e instanceof O.af||n(e),-e.ef}}function Bc(a,b){if(l)return N(18,1,a,b);try{return a=C(a),b=C(b),O.rename(a,b),0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function Cc(a){if(l)return N(19,1,a);try{return a=C(a),O.rmdir(a),0}catch(b){return"undefined"!==typeof O&&b instanceof O.af||n(b),-b.ef}}
+var R={jf:function(){f.websocket=f.websocket&&"object"===typeof f.websocket?f.websocket:{};f.websocket.Ig={};f.websocket.on=function(a,b){"function"===typeof b&&(this.Ig[a]=b);return this};f.websocket.emit=function(a,b){"function"===typeof this.Ig[a]&&this.Ig[a].call(this,b)};return O.createNode(null,"/",16895,0)},createSocket:function(a,b,c){b&=-526337;c&&assert(1==b==(6==c));a={family:a,type:b,protocol:c,lf:null,error:null,ng:{},pending:[],ag:[],pf:R.qf};b=R.zg();c=O.createNode(R.root,b,49152,0);
+c.bg=a;b=O.nh({path:b,node:c,flags:O.Dh("r+"),seekable:!1,df:R.df});a.stream=b;return a},mi:function(a){return(a=O.zf(a))&&O.isSocket(a.node.mode)?a.node.bg:null},df:{Zf:function(a){a=a.node.bg;return a.pf.Zf(a)},Uf:function(a,b,c){a=a.node.bg;return a.pf.Uf(a,b,c)},read:function(a,b,c,d){a=a.node.bg;d=a.pf.bh(a,d);if(!d)return 0;b.set(d.buffer,c);return d.buffer.length},write:function(a,b,c,d){a=a.node.bg;return a.pf.fh(a,b,c,d)},close:function(a){a=a.node.bg;a.pf.close(a)}},zg:function(){R.zg.current||
+(R.zg.current=0);return"socket["+R.zg.current++ +"]"},qf:{tg:function(a,b,c){if("object"===typeof b){var d=b;c=b=null}if(d)if(d._socket)b=d._socket.remoteAddress,c=d._socket.remotePort;else{c=/ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url);if(!c)throw Error("WebSocket URL must be in the format ws(s)://address:port");b=c[1];c=parseInt(c[2],10)}else try{var e=f.websocket&&"object"===typeof f.websocket,g="ws:#".replace("#","//");e&&"string"===typeof f.websocket.url&&(g=f.websocket.url);if("ws://"===g||"wss://"===
+g){var k=b.split("/");g=g+k[0]+":"+c+"/"+k.slice(1).join("/")}k="binary";e&&"string"===typeof f.websocket.subprotocol&&(k=f.websocket.subprotocol);var m=void 0;"null"!==k&&(k=k.replace(/^ +| +$/g,"").split(/ *, */),m=h?{protocol:k.toString()}:k);e&&null===f.websocket.subprotocol&&(m=void 0);d=new (h?require("ws"):WebSocket)(g,m);d.binaryType="arraybuffer"}catch(r){throw new O.af(23);}b={hf:b,port:c,socket:d,ug:[]};R.qf.jh(a,b);R.qf.ni(a,b);2===a.type&&"undefined"!==typeof a.Qf&&b.ug.push(new Uint8Array([255,
+255,255,255,112,111,114,116,(a.Qf&65280)>>8,a.Qf&255]));return b},vg:function(a,b,c){return a.ng[b+":"+c]},jh:function(a,b){a.ng[b.hf+":"+b.port]=b},Hh:function(a,b){delete a.ng[b.hf+":"+b.port]},ni:function(a,b){function c(){f.websocket.emit("open",a.stream.fd);try{for(var g=b.ug.shift();g;)b.socket.send(g),g=b.ug.shift()}catch(k){b.socket.close()}}function d(g){if("string"===typeof g)g=(new TextEncoder).encode(g);else{assert(void 0!==g.byteLength);if(0==g.byteLength)return;g=new Uint8Array(g)}var k=
+e;e=!1;k&&10===g.length&&255===g[0]&&255===g[1]&&255===g[2]&&255===g[3]&&112===g[4]&&111===g[5]&&114===g[6]&&116===g[7]?(g=g[8]<<8|g[9],R.qf.Hh(a,b),b.port=g,R.qf.jh(a,b)):(a.ag.push({hf:b.hf,port:b.port,data:g}),f.websocket.emit("message",a.stream.fd))}var e=!0;h?(b.socket.on("open",c),b.socket.on("message",function(g,k){k.Yi&&d((new Uint8Array(g)).buffer)}),b.socket.on("close",function(){f.websocket.emit("close",a.stream.fd)}),b.socket.on("error",function(){a.error=14;f.websocket.emit("error",[a.stream.fd,
+a.error,"ECONNREFUSED: Connection refused"])})):(b.socket.onopen=c,b.socket.onclose=function(){f.websocket.emit("close",a.stream.fd)},b.socket.onmessage=function(g){d(g.data)},b.socket.onerror=function(){a.error=14;f.websocket.emit("error",[a.stream.fd,a.error,"ECONNREFUSED: Connection refused"])})},Zf:function(a){if(1===a.type&&a.lf)return a.pending.length?65:0;var b=0,c=1===a.type?R.qf.vg(a,a.sf,a.vf):null;if(a.ag.length||!c||c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)b|=
+65;if(!c||c&&c.socket.readyState===c.socket.OPEN)b|=4;if(c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)b|=16;return b},Uf:function(a,b,c){switch(b){case 21531:return b=0,a.ag.length&&(b=a.ag[0].data.length),E[c>>2]=b,0;default:return 28}},close:function(a){if(a.lf){try{a.lf.close()}catch(e){}a.lf=null}for(var b=Object.keys(a.ng),c=0;c<b.length;c++){var d=a.ng[b[c]];try{d.socket.close()}catch(e){}R.qf.Hh(a,d)}return 0},bind:function(a,b,c){if("undefined"!==typeof a.Bg||
+"undefined"!==typeof a.Qf)throw new O.af(28);a.Bg=b;a.Qf=c;if(2===a.type){a.lf&&(a.lf.close(),a.lf=null);try{a.pf.listen(a,0)}catch(d){if(!(d instanceof O.af))throw d;if(138!==d.ef)throw d;}}},connect:function(a,b,c){if(a.lf)throw new O.af(138);if("undefined"!==typeof a.sf&&"undefined"!==typeof a.vf){var d=R.qf.vg(a,a.sf,a.vf);if(d){if(d.socket.readyState===d.socket.CONNECTING)throw new O.af(7);throw new O.af(30);}}b=R.qf.tg(a,b,c);a.sf=b.hf;a.vf=b.port;throw new O.af(26);},listen:function(a){if(!h)throw new O.af(138);
+if(a.lf)throw new O.af(28);var b=require("ws").Server;a.lf=new b({host:a.Bg,port:a.Qf});f.websocket.emit("listen",a.stream.fd);a.lf.on("connection",function(c){if(1===a.type){var d=R.createSocket(a.family,a.type,a.protocol);c=R.qf.tg(d,c);d.sf=c.hf;d.vf=c.port;a.pending.push(d);f.websocket.emit("connection",d.stream.fd)}else R.qf.tg(a,c),f.websocket.emit("connection",a.stream.fd)});a.lf.on("closed",function(){f.websocket.emit("close",a.stream.fd);a.lf=null});a.lf.on("error",function(){a.error=23;
+f.websocket.emit("error",[a.stream.fd,a.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(a){if(!a.lf)throw new O.af(28);var b=a.pending.shift();b.stream.flags=a.stream.flags;return b},ij:function(a,b){if(b){if(void 0===a.sf||void 0===a.vf)throw new O.af(53);b=a.sf;a=a.vf}else b=a.Bg||0,a=a.Qf||0;return{hf:b,port:a}},fh:function(a,b,c,d,e,g){if(2===a.type){if(void 0===e||void 0===g)e=a.sf,g=a.vf;if(void 0===e||void 0===g)throw new O.af(17);}else e=a.sf,g=a.vf;var k=R.qf.vg(a,e,g);if(1===
+a.type){if(!k||k.socket.readyState===k.socket.CLOSING||k.socket.readyState===k.socket.CLOSED)throw new O.af(53);if(k.socket.readyState===k.socket.CONNECTING)throw new O.af(6);}ArrayBuffer.isView(b)&&(c+=b.byteOffset,b=b.buffer);var m;b instanceof SharedArrayBuffer?m=(new Uint8Array(new Uint8Array(b.slice(c,c+d)))).buffer:m=b.slice(c,c+d);if(2===a.type&&(!k||k.socket.readyState!==k.socket.OPEN))return k&&k.socket.readyState!==k.socket.CLOSING&&k.socket.readyState!==k.socket.CLOSED||(k=R.qf.tg(a,e,
+g)),k.ug.push(m),d;try{return k.socket.send(m),d}catch(r){throw new O.af(28);}},bh:function(a,b){if(1===a.type&&a.lf)throw new O.af(53);var c=a.ag.shift();if(!c){if(1===a.type){if(a=R.qf.vg(a,a.sf,a.vf)){if(a.socket.readyState===a.socket.CLOSING||a.socket.readyState===a.socket.CLOSED)return null;throw new O.af(6);}throw new O.af(53);}throw new O.af(6);}var d=c.data.byteLength||c.data.length,e=c.data.byteOffset||0,g=c.data.buffer||c.data;b=Math.min(b,d);var k={buffer:new Uint8Array(g,e,b),hf:c.hf,
+port:c.port};1===a.type&&b<d&&(c.data=new Uint8Array(g,e+b,d-b),a.ag.unshift(c));return k}}};function Dc(a){a=a.split(".");for(var b=0;4>b;b++){var c=Number(a[b]);if(isNaN(c))return null;a[b]=c}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}
+function Ec(a){var b,c,d=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(a))return null;if("::"===a)return[0,0,0,0,0,0,0,0];a=0===a.indexOf("::")?a.replace("::","Z:"):a.replace("::",":Z:");0<a.indexOf(".")?(a=a.replace(/[.]/g,":"),a=a.split(":"),a[a.length-4]=parseInt(a[a.length-4])+256*parseInt(a[a.length-3]),a[a.length-3]=parseInt(a[a.length-2])+256*parseInt(a[a.length-
+1]),a=a.slice(0,a.length-2)):a=a.split(":");for(b=c=0;b<a.length;b++)if("string"===typeof a[b])if("Z"===a[b]){for(c=0;c<8-a.length+1;c++)d[b+c]=0;--c}else d[b+c]=Fc(parseInt(a[b],16));else d[b+c]=a[b];return[d[1]<<16|d[0],d[3]<<16|d[2],d[5]<<16|d[4],d[7]<<16|d[6]]}var Gc=1,Hc={},Ic={};
+function Jc(a){var b=Dc(a);if(null!==b)return a;b=Ec(a);if(null!==b)return a;Hc[a]?b=Hc[a]:(b=Gc++,assert(65535>b,"exceeded max address mappings of 65535"),b="172.29."+(b&255)+"."+(b&65280),Ic[b]=a,Hc[a]=b);return b}function Kc(a){return Ic[a]?Ic[a]:null}function Lc(a){return(a&255)+"."+(a>>8&255)+"."+(a>>16&255)+"."+(a>>24&255)}
+function Mc(a){var b="",c,d=0,e=0,g=0,k=0;a=[a[0]&65535,a[0]>>16,a[1]&65535,a[1]>>16,a[2]&65535,a[2]>>16,a[3]&65535,a[3]>>16];var m=!0;for(c=0;5>c;c++)if(0!==a[c]){m=!1;break}if(m){c=Lc(a[6]|a[7]<<16);if(-1===a[5])return"::ffff:"+c;if(0===a[5])return"0.0.0.0"===c&&(c=""),"0.0.0.1"===c&&(c="1"),"::"+c}for(c=0;8>c;c++)0===a[c]&&(1<c-e&&(k=0),e=c,k++),k>d&&(d=k,g=c-d+1);for(c=0;8>c;c++)1<d&&0===a[c]&&c>=g&&c<g+d?c===g&&(b+=":",0===g&&(b+=":")):(b+=Number(Nc(a[c]&65535)).toString(16),b+=7>c?":":"");return b}
+function Oc(a,b){var c=Qa[a>>1],d=Nc(Ra[a+2>>1]);switch(c){case 2:if(16!==b)return{ef:28};a=E[a+4>>2];a=Lc(a);break;case 10:if(28!==b)return{ef:28};a=[E[a+8>>2],E[a+12>>2],E[a+16>>2],E[a+20>>2]];a=Mc(a);break;default:return{ef:5}}return{family:c,hf:a,port:d}}
+function Pc(a,b,c,d){switch(b){case 2:c=Dc(c);Qa[a>>1]=b;E[a+4>>2]=c;Qa[a+2>>1]=Fc(d);break;case 10:c=Ec(c);E[a>>2]=b;E[a+8>>2]=c[0];E[a+12>>2]=c[1];E[a+16>>2]=c[2];E[a+20>>2]=c[3];Qa[a+2>>1]=Fc(d);E[a+4>>2]=0;E[a+24>>2]=0;break;default:return{ef:5}}return{}}
+function Qc(a,b){if(l)return N(20,1,a,b);try{ic=b;b=function(){var aa=R.mi(Q());if(!aa)throw new O.af(8);return aa};var c=function(aa){var pd=Q(),ge=Q();if(aa&&0===pd)return null;aa=Oc(pd,ge);if(aa.ef)throw new O.af(aa.ef);aa.hf=Kc(aa.hf)||aa.hf;return aa};switch(a){case 1:var d=Q(),e=Q(),g=Q(),k=R.createSocket(d,e,g);return k.stream.fd;case 2:k=b();var m=c();k.pf.bind(k,m.hf,m.port);return 0;case 3:return k=b(),m=c(),k.pf.connect(k,m.hf,m.port),0;case 4:k=b();var r=Q();k.pf.listen(k,r);return 0;
+case 5:k=b();var q=Q();Q();var t=k.pf.accept(k);q&&Pc(q,t.family,Jc(t.sf),t.vf);return t.stream.fd;case 6:return k=b(),q=Q(),Q(),Pc(q,k.family,Jc(k.Bg||"0.0.0.0"),k.Qf),0;case 7:k=b();q=Q();Q();if(!k.sf)return-53;Pc(q,k.family,Jc(k.sf),k.vf);return 0;case 11:k=b();var w=Q(),B=Q();Q();var p=c(!0);return p?k.pf.fh(k,y,w,B,p.hf,p.port):O.write(k.stream,y,w,B);case 12:k=b();var x=Q(),z=Q();Q();q=Q();Q();var I=k.pf.bh(k,z);if(!I)return 0;q&&Pc(q,k.family,Jc(I.hf),I.port);v.set(I.buffer,x);return I.buffer.byteLength;
+case 14:return-50;case 15:k=b();var W=Q(),db=Q(),K=Q(),Y=Q();return 1===W&&4===db?(E[K>>2]=k.error,E[Y>>2]=4,k.error=null,0):-50;case 16:k=b();w=Q();Q();var ia=E[w+8>>2],na=E[w+12>>2],ua=E[w>>2],he=E[w+4>>2];if(ua){m=Oc(ua,he);if(m.ef)return-m.ef;var ie=m.port;q=Kc(m.hf)||m.hf}for(var Oa=0,X=0;X<na;X++)Oa+=E[ia+(8*X+4)>>2];var qd=new Uint8Array(Oa);for(X=B=0;X<na;X++){var ac=E[ia+8*X>>2],bc=E[ia+(8*X+4)>>2];for(x=0;x<bc;x++)qd[B++]=y[ac+x>>0]}return k.pf.fh(k,qd,0,Oa,q,ie);case 17:k=b();w=Q();Q();
+ia=E[w+8>>2];na=E[w+12>>2];for(X=Oa=0;X<na;X++)Oa+=E[ia+(8*X+4)>>2];I=k.pf.bh(k,Oa);if(!I)return 0;(ua=E[w>>2])&&Pc(ua,k.family,Jc(I.hf),I.port);k=0;var cc=I.buffer.byteLength;for(X=0;0<cc&&X<na;X++)if(ac=E[ia+8*X>>2],bc=E[ia+(8*X+4)>>2])B=Math.min(bc,cc),x=I.buffer.subarray(k,k+B),v.set(x,ac+k),k+=B,cc-=B;return k;default:return-52}}catch(aa){return"undefined"!==typeof O&&aa instanceof O.af||n(aa),-aa.ef}}
+function Rc(a,b){if(l)return N(21,1,a,b);try{return a=C(a),hc(O.stat,a,b)}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}}function Sc(a){if(l)return N(22,1,a);try{return a=C(a),O.unlink(a),0}catch(b){return"undefined"!==typeof O&&b instanceof O.af||n(b),-b.ef}}function Tc(){void 0===Tc.start&&(Tc.start=Date.now());return 1E3*(Date.now()-Tc.start)|0}
+function Uc(){h||la||(za||(za={}),za["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]||(za["Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"]=1,u("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")))}
+function Vc(a,b,c){if(0>=a||a>y.length||a&1)return-28;if(ka){if(Atomics.load(E,a>>2)!=b)return-6;var d=performance.now();c=d+c;for(Atomics.exchange(E,M.Vf>>2,a);;){d=performance.now();if(d>c)return Atomics.exchange(E,M.Vf>>2,0),-73;d=Atomics.exchange(E,M.Vf>>2,0);if(0==d)break;Ab();if(Atomics.load(E,a>>2)!=b)return-6;Atomics.exchange(E,M.Vf>>2,a)}return 0}a=Atomics.wait(E,a>>2,b,c);if("timed-out"===a)return-73;if("not-equal"===a)return-6;if("ok"===a)return 0;throw"Atomics.wait returned an unexpected value "+
+a;}function Wc(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,g){b.drawArraysInstancedANGLE(c,d,e,g)},a.drawElementsInstanced=function(c,d,e,g,k){b.drawElementsInstancedANGLE(c,d,e,g,k)})}
+function Xc(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Yc(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}var Zc=1,$c=[],S=[],ad=[],bd=[],cd=[],T=[],dd=[],ed=[],fd=[],gd={},hd={},id=4;
+function U(a){jd||(jd=a)}function kd(a){for(var b=Zc++,c=a.length;c<b;c++)a[c]=null;return b}
+function ld(a){a||(a=md);if(!a.oi){a.oi=!0;var b=a.qg;Wc(b);Xc(b);Yc(b);b.uf=b.getExtension("EXT_disjoint_timer_query");b.rj=b.getExtension("WEBGL_multi_draw");var c="OES_texture_float OES_texture_half_float OES_standard_derivatives OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture OES_element_index_uint EXT_texture_filter_anisotropic EXT_frag_depth WEBGL_draw_buffers ANGLE_instanced_arrays OES_texture_float_linear OES_texture_half_float_linear EXT_blend_minmax EXT_shader_texture_lod EXT_texture_norm16 WEBGL_compressed_texture_pvrtc EXT_color_buffer_half_float WEBGL_color_buffer_float EXT_sRGB WEBGL_compressed_texture_etc1 EXT_disjoint_timer_query WEBGL_compressed_texture_etc WEBGL_compressed_texture_astc EXT_color_buffer_float WEBGL_compressed_texture_s3tc_srgb EXT_disjoint_timer_query_webgl2 WEBKIT_WEBGL_compressed_texture_pvrtc".split(" ");(b.getSupportedExtensions()||
+[]).forEach(function(d){-1!=c.indexOf(d)&&b.getExtension(d)})}}var jd,md,nd=[];function od(a,b,c,d){for(var e=0;e<a;e++){var g=V[c](),k=g&&kd(d);g?(g.name=k,d[k]=g):U(1282);E[b+4*e>>2]=k}}function rd(a,b,c,d,e,g,k,m){b=S[b];if(a=V[a](b,c))d=m&&Ia(a.name,v,m,d),e&&(E[e>>2]=d),g&&(E[g>>2]=a.size),k&&(E[k>>2]=a.type)}function sd(a,b){F[a>>2]=b;F[a+4>>2]=(b-F[a>>2])/4294967296}
+function td(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&U(1280);return;case 36345:d=0;break;case 34466:var e=V.getParameter(34467);d=e?e.length:0}if(void 0===d)switch(e=V.getParameter(a),typeof e){case "number":d=e;break;case "boolean":d=e?1:0;break;case "string":U(1280);return;case "object":if(null===e)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:d=0;break;default:U(1280);return}else{if(e instanceof Float32Array||
+e instanceof Uint32Array||e instanceof Int32Array||e instanceof Array){for(a=0;a<e.length;++a)switch(c){case 0:E[b+4*a>>2]=e[a];break;case 2:G[b+4*a>>2]=e[a];break;case 4:y[b+a>>0]=e[a]?1:0}return}try{d=e.name|0}catch(g){U(1280);u("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+g+")");return}}break;default:U(1280);u("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+e+" of type "+typeof e+"!");return}switch(c){case 1:sd(b,
+d);break;case 0:E[b>>2]=d;break;case 2:G[b>>2]=d;break;case 4:y[b>>0]=d?1:0}}else U(1281)}function ud(a){var b=Ka(a)+1,c=Ma(b);Ia(a,v,c,b);return c}function vd(a,b,c,d){if(c)if(a=V.getUniform(S[a],T[b]),"number"==typeof a||"boolean"==typeof a)switch(d){case 0:E[c>>2]=a;break;case 2:G[c>>2]=a}else for(b=0;b<a.length;b++)switch(d){case 0:E[c+4*b>>2]=a[b];break;case 2:G[c+4*b>>2]=a[b]}else U(1281)}
+function wd(a,b,c,d){if(c)if(a=V.getVertexAttrib(a,b),34975==b)E[c>>2]=a&&a.name;else if("number"==typeof a||"boolean"==typeof a)switch(d){case 0:E[c>>2]=a;break;case 2:G[c>>2]=a;break;case 5:E[c>>2]=Math.fround(a)}else for(b=0;b<a.length;b++)switch(d){case 0:E[c+4*b>>2]=a[b];break;case 2:G[c+4*b>>2]=a[b];break;case 5:E[c+4*b>>2]=Math.fround(a[b])}else U(1281)}
+function xd(a,b,c,d,e){a-=5120;a=1==a?v:4==a?E:6==a?G:5==a||28922==a?F:Ra;var g=31-Math.clz32(a.BYTES_PER_ELEMENT),k=id;return a.subarray(e>>g,e+d*(c*({5:3,6:4,8:2,29502:3,29504:4}[b-6402]||1)*(1<<g)+k-1&-k)>>g)}var yd=[],zd=[];function N(a,b){for(var c=arguments.length-2,d=A(),e=Ha(8*c),g=e>>3,k=0;k<c;k++)Sa[g+k]=arguments[2+k];c=Ad(a,c,e,b);D(d);return c}var Bd=[],Cd=[],Dd=[0,"undefined"!==typeof document?document:0,"undefined"!==typeof window?window:0];
+function Ed(a){a=2<a?C(a):a;return Dd[a]||("undefined"!==typeof document?document.querySelector(a):void 0)}
+function Fd(a,b,c){var d=Ed(a);if(!d)return-4;d.sg&&(E[d.sg>>2]=b,E[d.sg+4>>2]=c);if(d.Fh||!d.aj)d.Fh&&(d=d.Fh),a=!1,d.rg&&d.rg.qg&&(a=d.rg.qg.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===d.width&&a[3]===d.height),d.width=b,d.height=c,a&&d.rg.qg.viewport(0,0,b,c);else{if(d.sg){a=a?C(a):"";d=E[d.sg+8>>2];var e=A(),g=Ha(12),k=0;a&&(k=ud(a));E[g>>2]=k;E[g+4>>2]=b;E[g+8>>2]=c;Gd(0,d,657457152,0,k,g);D(e);return 1}return-4}return 0}function Hd(a,b,c){return l?N(23,1,a,b,c):Fd(a,b,c)}
+var Id=["default","low-power","high-performance"],Jd={};function Kd(){if(!Ld){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ha||"./this.program"},b;for(b in Jd)a[b]=Jd[b];var c=[];for(b in a)c.push(b+"="+a[b]);Ld=c}return Ld}var Ld;
+function Md(a){if(l)return N(24,1,a);try{var b=jc(a);O.close(b);return 0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),c.ef}}function Nd(a,b){if(l)return N(25,1,a,b);try{var c=jc(a);y[b>>0]=c.tty?2:O.kf(c.mode)?3:O.Mf(c.mode)?7:4;return 0}catch(d){return"undefined"!==typeof O&&d instanceof O.af||n(d),d.ef}}
+function Od(a,b,c,d){if(l)return N(26,1,a,b,c,d);try{a:{for(var e=jc(a),g=a=0;g<c;g++){var k=E[b+(8*g+4)>>2],m=O.read(e,y,E[b+8*g>>2],k,void 0);if(0>m){var r=-1;break a}a+=m;if(m<k)break}r=a}E[d>>2]=r;return 0}catch(q){return"undefined"!==typeof O&&q instanceof O.af||n(q),q.ef}}
+function Pd(a,b,c,d,e){if(l)return N(27,1,a,b,c,d,e);try{var g=jc(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;O.tf(g,a,d);L=[g.position>>>0,(J=g.position,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[e>>2]=L[0];E[e+4>>2]=L[1];g.Lf&&0===a&&0===d&&(g.Lf=null);return 0}catch(k){return"undefined"!==typeof O&&k instanceof O.af||n(k),k.ef}}
+function Qd(a,b,c,d){if(l)return N(28,1,a,b,c,d);try{a:{for(var e=jc(a),g=a=0;g<c;g++){var k=O.write(e,y,E[b+8*g>>2],E[b+(8*g+4)>>2],void 0);if(0>k){var m=-1;break a}a+=k}m=a}E[d>>2]=m;return 0}catch(r){return"undefined"!==typeof O&&r instanceof O.af||n(r),r.ef}}var Rd={};
+function Sd(a){Sd.buffer||(Sd.buffer=Ma(256),Rd["0"]="Success",Rd["-1"]="Invalid value for 'ai_flags' field",Rd["-2"]="NAME or SERVICE is unknown",Rd["-3"]="Temporary failure in name resolution",Rd["-4"]="Non-recoverable failure in name res",Rd["-6"]="'ai_family' not supported",Rd["-7"]="'ai_socktype' not supported",Rd["-8"]="SERVICE not supported for 'ai_socktype'",Rd["-10"]="Memory allocation failure",Rd["-11"]="System error returned in 'errno'",Rd["-12"]="Argument buffer overflow");var b="Unknown error";
+a in Rd&&(255<Rd[a].length?b="Message too long":b=Rd[a]);Pa(b,Sd.buffer);return Sd.buffer}
+function Td(a,b,c,d){function e(w,B,p,x,z,I){var W=10===w?28:16;z=10===w?Mc(z):Lc(z);W=Ma(W);z=Pc(W,w,z,I);assert(!z.ef);z=Ma(32);E[z+4>>2]=w;E[z+8>>2]=B;E[z+12>>2]=p;E[z+24>>2]=x;E[z+20>>2]=W;E[z+16>>2]=10===w?28:16;E[z+28>>2]=0;return z}if(l)return N(29,1,a,b,c,d);var g=0,k=0,m=0,r=0,q=0,t=0;c&&(m=E[c>>2],r=E[c+4>>2],q=E[c+8>>2],t=E[c+12>>2]);q&&!t&&(t=2===q?17:6);!q&&t&&(q=17===t?2:1);0===t&&(t=6);0===q&&(q=1);if(!a&&!b)return-2;if(m&-1088||0!==c&&E[c>>2]&2&&!a)return-1;if(m&32)return-2;if(0!==
+q&&1!==q&&2!==q)return-7;if(0!==r&&2!==r&&10!==r)return-6;if(b&&(b=C(b),k=parseInt(b,10),isNaN(k)))return m&1024?-2:-8;if(!a)return 0===r&&(r=2),0===(m&1)&&(2===r?g=Ud(2130706433):g=[0,0,0,1]),a=e(r,q,t,null,g,k),E[d>>2]=a,0;a=C(a);g=Dc(a);if(null!==g)if(0===r||2===r)r=2;else if(10===r&&m&8)g=[0,0,Ud(65535),g],r=10;else return-2;else if(g=Ec(a),null!==g)if(0===r||10===r)r=10;else return-2;if(null!=g)return a=e(r,q,t,a,g,k),E[d>>2]=a,0;if(m&4)return-2;a=Jc(a);g=Dc(a);0===r?r=2:10===r&&(g=[0,0,Ud(65535),
+g]);a=e(r,q,t,null,g,k);E[d>>2]=a;return 0}
+function Bb(a){if(l)throw"Internal Error! spawnThread() can only ever be called from main application thread!";var b=M.li();if(void 0!==b.yf)throw"Internal error!";if(!a.$f)throw"Internal error, no pthread ptr!";M.Kf.push(b);for(var c=Ma(512),d=0;128>d;++d)E[c+4*d>>2]=0;var e=a.Rf+a.cg;d=M.Ef[a.$f]={worker:b,Rf:a.Rf,cg:a.cg,Kg:a.Kg,Lh:a.$f,threadInfoStruct:a.$f};var g=d.threadInfoStruct>>2;Atomics.store(F,g,0);Atomics.store(F,g+1,0);Atomics.store(F,g+2,0);Atomics.store(F,g+17,a.detached);Atomics.store(F,
+g+26,c);Atomics.store(F,g+12,0);Atomics.store(F,g+10,d.threadInfoStruct);Atomics.store(F,g+11,42);Atomics.store(F,g+27,a.cg);Atomics.store(F,g+21,a.cg);Atomics.store(F,g+20,e);Atomics.store(F,g+29,e);Atomics.store(F,g+30,a.detached);Atomics.store(F,g+32,a.Ih);Atomics.store(F,g+33,a.Jh);c=Vd()+40;Atomics.store(F,g+44,c);b.yf=d;var k={cmd:"run",start_routine:a.Mi,arg:a.Tf,threadInfoStruct:a.$f,selfThreadId:a.$f,parentThreadId:a.Fi,stackBase:a.Rf,stackSize:a.cg};b.og=function(){k.time=performance.now();
+b.postMessage(k,a.Vi)};b.loaded&&(b.og(),delete b.og)}function Wd(){return pb|0}f._pthread_self=Wd;
+function Xd(a,b){if(!a)return u("pthread_join attempted on a null thread pointer!"),71;if(l&&selfThreadId==a)return u("PThread "+a+" is attempting to join to itself!"),16;if(!l&&M.xf==a)return u("Main thread "+a+" is attempting to join to itself!"),16;if(E[a+12>>2]!==a)return u("pthread_join attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;if(Atomics.load(F,a+68>>2))return u("Attempted to join thread "+a+", which was already detached!"),28;for(Uc();;){var c=
+Atomics.load(F,a>>2);if(1==c)return c=Atomics.load(F,a+4>>2),b&&(E[b>>2]=c),Atomics.store(F,a+68>>2,1),l?postMessage({cmd:"cleanupThread",thread:a}):vb(a),0;if(l&&threadInfoStruct&&!Atomics.load(F,threadInfoStruct+60>>2)&&2==Atomics.load(F,threadInfoStruct+0>>2))throw"Canceled!";l||Ab();Vc(a,c,l?100:1)}}function Yd(a){return 0===a%4&&(0!==a%100||0===a%400)}function Zd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var $d=[31,29,31,30,31,30,31,31,30,31,30,31],ae=[31,28,31,30,31,30,31,31,30,31,30,31];
+function be(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(Yd(a.getFullYear())?$d:ae)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
+function ce(a){if(l)return N(30,1,a);switch(a){case 30:return 16384;case 85:return v.length/16384;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;
+case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;
+case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}Eb(28);return-1}function de(a,b,c,d){a||(a=this);this.parent=a;this.jf=a.jf;this.lg=null;this.id=O.Ai++;this.name=b;this.mode=c;this.cf={};this.df={};this.rdev=d}
+Object.defineProperties(de.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},ti:{get:function(){return O.kf(this.mode)}},Ug:{get:function(){return O.hg(this.mode)}}});O.Oh=de;O.Ni();for(var ec,V,ee=0;32>ee;++ee)nd.push(Array(ee));var fe=new Float32Array(288);for(ee=0;288>ee;++ee)yd[ee]=fe.subarray(0,ee+1);var je=new Int32Array(288);
+for(ee=0;288>ee;++ee)zd[ee]=je.subarray(0,ee+1);var ke=[null,Hb,Jb,kc,lc,mc,nc,oc,pc,rc,sc,tc,uc,wc,xc,yc,zc,Ac,Bc,Cc,Qc,Rc,Sc,Hd,Md,Nd,Od,Pd,Qd,Td,ce];function Zb(a,b){var c=Array(Ka(a)+1);a=Ia(a,c,0,c.length);b&&(c.length=a);return c}l||Wa.push({vh:function(){le()}});
+var Fe={c:function(a,b,c,d){n("Assertion failed: "+C(a)+", at: "+[b?C(b):"unknown filename",c,d?C(d):"unknown function"])},K:function(a,b){a=me(a,b);if(!noExitRuntime)return postMessage({cmd:"exitProcess",returnCode:a}),a},W:function(a,b){return Gb(a,b)},aa:function(a,b){return Hb(a,b)},va:function(a,b){return Ib(a,b)},ua:function(a,b){return Nb(a,b)},Ma:kc,Ea:lc,u:mc,Na:nc,Ka:oc,Ha:pc,V:rc,Oa:sc,Pa:tc,ya:uc,Aa:function(){return 0},za:wc,Da:function(){return-63},Y:xc,La:yc,Ja:zc,Ca:Ac,wa:Bc,Ga:Cc,
+Ia:function(){return 0},t:Qc,X:Rc,Fa:function(a){try{if(!a)return-21;var b={__size__:390,sysname:0,nodename:65,release:130,version:195,machine:260,domainname:325};Pa("Emscripten",a+b.sysname);Pa("emscripten",a+b.nodename);Pa("1.0",a+b.release);Pa("#1",a+b.version);Pa("x86-JS",a+b.machine);return 0}catch(c){return"undefined"!==typeof O&&c instanceof O.af||n(c),-c.ef}},Ba:Sc,pa:function(a,b){if(a==b)postMessage({cmd:"processQueuedMainThreadWork"});else if(l)postMessage({targetThread:a,cmd:"processThreadQueue"});
+else{a=(a=M.Ef[a])&&a.worker;if(!a)return;a.postMessage({cmd:"processThreadQueue"})}return 1},b:function(){n()},Qa:Tc,Ta:Gb,$:function(){n("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},Ua:function(){n("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},F:function(a,b,c){Cd.length=0;var d;for(c>>=2;d=v[b++];)(d=105>d)&&c&1&&c++,Cd.push(d?Sa[c++>>
+1]:E[c]),++c;return mb[a].apply(null,Cd)},qa:Uc,I:function(){},A:Vc,p:tb,z:Db,Ed:function(a){V.activeTexture(a)},Dd:function(a,b){V.attachShader(S[a],dd[b])},ea:function(a,b){V.uf.beginQueryEXT(a,fd[b])},Cd:function(a,b,c){V.bindAttribLocation(S[a],b,C(c))},Bd:function(a,b){V.bindBuffer(a,$c[b])},Ad:function(a,b){V.bindFramebuffer(a,ad[b])},zd:function(a,b){V.bindRenderbuffer(a,bd[b])},yd:function(a,b){V.bindTexture(a,cd[b])},Md:function(a){V.bindVertexArray(ed[a])},xd:function(a,b,c,d){V.blendColor(a,
+b,c,d)},wd:function(a){V.blendEquation(a)},vd:function(a,b){V.blendEquationSeparate(a,b)},ud:function(a,b){V.blendFunc(a,b)},td:function(a,b,c,d){V.blendFuncSeparate(a,b,c,d)},sd:function(a,b,c,d){V.bufferData(a,c?v.subarray(c,c+b):b,d)},rd:function(a,b,c,d){V.bufferSubData(a,b,v.subarray(d,d+c))},qd:function(a){return V.checkFramebufferStatus(a)},pd:function(a){V.clear(a)},od:function(a,b,c,d){V.clearColor(a,b,c,d)},nd:function(a){V.clearDepth(a)},md:function(a){V.clearStencil(a)},ld:function(a,
+b,c,d){V.colorMask(!!a,!!b,!!c,!!d)},kd:function(a){V.compileShader(dd[a])},jd:function(a,b,c,d,e,g,k,m){V.compressedTexImage2D(a,b,c,d,e,g,m?v.subarray(m,m+k):null)},id:function(a,b,c,d,e,g,k,m,r){V.compressedTexSubImage2D(a,b,c,d,e,g,k,r?v.subarray(r,r+m):null)},hd:function(a,b,c,d,e,g,k,m){V.copyTexImage2D(a,b,c,d,e,g,k,m)},gd:function(a,b,c,d,e,g,k,m){V.copyTexSubImage2D(a,b,c,d,e,g,k,m)},fd:function(){var a=kd(S),b=V.createProgram();b.name=a;S[a]=b;return a},ed:function(a){var b=kd(dd);dd[b]=
+V.createShader(a);return b},dd:function(a){V.cullFace(a)},cd:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=$c[d];e&&(V.deleteBuffer(e),e.name=0,$c[d]=null)}},bd:function(a,b){for(var c=0;c<a;++c){var d=E[b+4*c>>2],e=ad[d];e&&(V.deleteFramebuffer(e),e.name=0,ad[d]=null)}},ad:function(a){if(a){var b=S[a];b?(V.deleteProgram(b),b.name=0,S[a]=null,gd[a]=null):U(1281)}},ga:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=fd[d];e&&(V.uf.deleteQueryEXT(e),fd[d]=null)}},$c:function(a,b){for(var c=
+0;c<a;c++){var d=E[b+4*c>>2],e=bd[d];e&&(V.deleteRenderbuffer(e),e.name=0,bd[d]=null)}},_c:function(a){if(a){var b=dd[a];b?(V.deleteShader(b),dd[a]=null):U(1281)}},Zc:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2],e=cd[d];e&&(V.deleteTexture(e),e.name=0,cd[d]=null)}},Ld:function(a,b){for(var c=0;c<a;c++){var d=E[b+4*c>>2];V.deleteVertexArray(ed[d]);ed[d]=null}},Yc:function(a){V.depthFunc(a)},Xc:function(a){V.depthMask(!!a)},Wc:function(a,b){V.depthRange(a,b)},Vc:function(a,b){V.detachShader(S[a],
+dd[b])},Uc:function(a){V.disable(a)},Tc:function(a){V.disableVertexAttribArray(a)},Sc:function(a,b,c){V.drawArrays(a,b,c)},Hd:function(a,b,c,d){V.drawArraysInstanced(a,b,c,d)},Id:function(a,b){for(var c=nd[a],d=0;d<a;d++)c[d]=E[b+4*d>>2];V.drawBuffers(c)},Rc:function(a,b,c,d){V.drawElements(a,b,c,d)},Gd:function(a,b,c,d,e){V.drawElementsInstanced(a,b,c,d,e)},Qc:function(a){V.enable(a)},Pc:function(a){V.enableVertexAttribArray(a)},da:function(a){V.uf.endQueryEXT(a)},Oc:function(){V.finish()},Nc:function(){V.flush()},
+Mc:function(a,b,c,d){V.framebufferRenderbuffer(a,b,c,bd[d])},Lc:function(a,b,c,d,e){V.framebufferTexture2D(a,b,c,cd[d],e)},Kc:function(a){V.frontFace(a)},Jc:function(a,b){od(a,b,"createBuffer",$c)},Hc:function(a,b){od(a,b,"createFramebuffer",ad)},ha:function(a,b){for(var c=0;c<a;c++){var d=V.uf.createQueryEXT();if(!d){for(U(1282);c<a;)E[b+4*c++>>2]=0;break}var e=kd(fd);d.name=e;fd[e]=d;E[b+4*c>>2]=e}},Gc:function(a,b){od(a,b,"createRenderbuffer",bd)},Fc:function(a,b){od(a,b,"createTexture",cd)},Kd:function(a,
+b){od(a,b,"createVertexArray",ed)},Ic:function(a){V.generateMipmap(a)},Ec:function(a,b,c,d,e,g,k){rd("getActiveAttrib",a,b,c,d,e,g,k)},Dc:function(a,b,c,d,e,g,k){rd("getActiveUniform",a,b,c,d,e,g,k)},Cc:function(a,b,c,d){a=V.getAttachedShaders(S[a]);var e=a.length;e>b&&(e=b);E[c>>2]=e;for(b=0;b<e;++b)E[d+4*b>>2]=dd.indexOf(a[b])},Bc:function(a,b){return V.getAttribLocation(S[a],C(b))},Ac:function(a,b){td(a,b,4)},zc:function(a,b,c){c?E[c>>2]=V.getBufferParameter(a,b):U(1281)},yc:function(){var a=V.getError()||
+jd;jd=0;return a},xc:function(a,b){td(a,b,2)},wc:function(a,b,c,d){a=V.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;E[d>>2]=a},vc:function(a,b){td(a,b,0)},tc:function(a,b,c,d){a=V.getProgramInfoLog(S[a]);null===a&&(a="(unknown error)");b=0<b&&d?Ia(a,v,d,b):0;c&&(E[c>>2]=b)},uc:function(a,b,c){if(c)if(a>=Zc)U(1281);else{var d=gd[a];if(d)if(35716==b)a=V.getProgramInfoLog(S[a]),null===a&&(a="(unknown error)"),E[c>>2]=a.length+1;else if(35719==
+b)E[c>>2]=d.Xg;else if(35722==b){if(-1==d.jg){a=S[a];var e=V.getProgramParameter(a,35721);for(b=d.jg=0;b<e;++b)d.jg=Math.max(d.jg,V.getActiveAttrib(a,b).name.length+1)}E[c>>2]=d.jg}else if(35381==b){if(-1==d.kg)for(a=S[a],e=V.getProgramParameter(a,35382),b=d.kg=0;b<e;++b)d.kg=Math.max(d.kg,V.getActiveUniformBlockName(a,b).length+1);E[c>>2]=d.kg}else E[c>>2]=V.getProgramParameter(S[a],b);else U(1282)}else U(1281)},Od:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?
+d=a?1:0:d=a;sd(c,d)}else U(1281)},Qd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;E[c>>2]=d}else U(1281)},Nd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;sd(c,d)}else U(1281)},Pd:function(a,b,c){if(c){a=V.uf.getQueryObjectEXT(fd[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;E[c>>2]=d}else U(1281)},Rd:function(a,b,c){c?E[c>>2]=V.uf.getQueryEXT(a,b):U(1281)},sc:function(a,b,c){c?E[c>>2]=V.getRenderbufferParameter(a,
+b):U(1281)},qc:function(a,b,c,d){a=V.getShaderInfoLog(dd[a]);null===a&&(a="(unknown error)");b=0<b&&d?Ia(a,v,d,b):0;c&&(E[c>>2]=b)},pc:function(a,b,c,d){a=V.getShaderPrecisionFormat(a,b);E[c>>2]=a.rangeMin;E[c+4>>2]=a.rangeMax;E[d>>2]=a.precision},oc:function(a,b,c,d){if(a=V.getShaderSource(dd[a]))b=0<b&&d?Ia(a,v,d,b):0,c&&(E[c>>2]=b)},rc:function(a,b,c){c?35716==b?(a=V.getShaderInfoLog(dd[a]),null===a&&(a="(unknown error)"),E[c>>2]=a?a.length+1:0):35720==b?(a=V.getShaderSource(dd[a]),E[c>>2]=a?a.length+
+1:0):E[c>>2]=V.getShaderParameter(dd[a],b):U(1281)},nc:function(a){if(hd[a])return hd[a];switch(a){case 7939:var b=V.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=ud(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=V.getParameter(a))||U(1280);b=ud(b);break;case 7938:b=ud("OpenGL ES 2.0 ("+V.getParameter(7938)+")");break;case 35724:b=V.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),
+b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=ud(b);break;default:return U(1280),0}return hd[a]=b},mc:function(a,b,c){c?G[c>>2]=V.getTexParameter(a,b):U(1281)},lc:function(a,b,c){c?E[c>>2]=V.getTexParameter(a,b):U(1281)},ic:function(a,b){b=C(b);var c=0;if("]"==b[b.length-1]){var d=b.lastIndexOf("[");c="]"!=b[d+1]?parseInt(b.slice(d+1)):0;b=b.slice(0,d)}return(a=gd[a]&&gd[a].Nh[b])&&0<=c&&c<a[0]?a[1]+c:-1},kc:function(a,b,c){vd(a,b,c,2)},jc:function(a,b,c){vd(a,b,c,0)},fc:function(a,b,c){c?E[c>>2]=V.getVertexAttribOffset(a,
+b):U(1281)},hc:function(a,b,c){wd(a,b,c,2)},gc:function(a,b,c){wd(a,b,c,5)},ec:function(a,b){V.hint(a,b)},dc:function(a){return(a=$c[a])?V.isBuffer(a):0},cc:function(a){return V.isEnabled(a)},bc:function(a){return(a=ad[a])?V.isFramebuffer(a):0},ac:function(a){return(a=S[a])?V.isProgram(a):0},fa:function(a){return(a=fd[a])?V.uf.isQueryEXT(a):0},$b:function(a){return(a=bd[a])?V.isRenderbuffer(a):0},_b:function(a){return(a=dd[a])?V.isShader(a):0},Zb:function(a){return(a=cd[a])?V.isTexture(a):0},Jd:function(a){return(a=
+ed[a])?V.isVertexArray(a):0},Yb:function(a){V.lineWidth(a)},Xb:function(a){V.linkProgram(S[a]);var b=S[a];a=gd[a]={Nh:{},Xg:0,jg:-1,kg:-1};for(var c=a.Nh,d=V.getProgramParameter(b,35718),e=0;e<d;++e){var g=V.getActiveUniform(b,e),k=g.name;a.Xg=Math.max(a.Xg,k.length+1);"]"==k.slice(-1)&&(k=k.slice(0,k.lastIndexOf("[")));var m=V.getUniformLocation(b,k);if(m){var r=kd(T);c[k]=[g.size,r];T[r]=m;for(var q=1;q<g.size;++q)m=V.getUniformLocation(b,k+"["+q+"]"),r=kd(T),T[r]=m}}},Wb:function(a,b){3317==a&&
+(id=b);V.pixelStorei(a,b)},Vb:function(a,b){V.polygonOffset(a,b)},ca:function(a,b){V.uf.queryCounterEXT(fd[a],b)},Ub:function(a,b,c,d,e,g,k){(k=xd(g,e,c,d,k))?V.readPixels(a,b,c,d,e,g,k):U(1280)},Tb:function(){},Sb:function(a,b,c,d){V.renderbufferStorage(a,b,c,d)},Rb:function(a,b){V.sampleCoverage(a,!!b)},Qb:function(a,b,c,d){V.scissor(a,b,c,d)},Pb:function(){U(1280)},Ob:function(a,b,c,d){for(var e="",g=0;g<b;++g){var k=d?E[d+4*g>>2]:-1;e+=C(E[c+4*g>>2],0>k?void 0:k)}V.shaderSource(dd[a],e)},Nb:function(a,
+b,c){V.stencilFunc(a,b,c)},Mb:function(a,b,c,d){V.stencilFuncSeparate(a,b,c,d)},Lb:function(a){V.stencilMask(a)},Kb:function(a,b){V.stencilMaskSeparate(a,b)},Jb:function(a,b,c){V.stencilOp(a,b,c)},Ib:function(a,b,c,d){V.stencilOpSeparate(a,b,c,d)},Hb:function(a,b,c,d,e,g,k,m,r){V.texImage2D(a,b,c,d,e,g,k,m,r?xd(m,k,d,e,r):null)},Gb:function(a,b,c){V.texParameterf(a,b,c)},Fb:function(a,b,c){V.texParameterf(a,b,G[c>>2])},Eb:function(a,b,c){V.texParameteri(a,b,c)},Db:function(a,b,c){V.texParameteri(a,
+b,E[c>>2])},Cb:function(a,b,c,d,e,g,k,m,r){var q=null;r&&(q=xd(m,k,e,g,r));V.texSubImage2D(a,b,c,d,e,g,k,m,q)},Bb:function(a,b){V.uniform1f(T[a],b)},Ab:function(a,b,c){if(288>=b)for(var d=yd[b-1],e=0;e<b;++e)d[e]=G[c+4*e>>2];else d=G.subarray(c>>2,c+4*b>>2);V.uniform1fv(T[a],d)},zb:function(a,b){V.uniform1i(T[a],b)},yb:function(a,b,c){if(288>=b)for(var d=zd[b-1],e=0;e<b;++e)d[e]=E[c+4*e>>2];else d=E.subarray(c>>2,c+4*b>>2);V.uniform1iv(T[a],d)},xb:function(a,b,c){V.uniform2f(T[a],b,c)},wb:function(a,
+b,c){if(144>=b)for(var d=yd[2*b-1],e=0;e<2*b;e+=2)d[e]=G[c+4*e>>2],d[e+1]=G[c+(4*e+4)>>2];else d=G.subarray(c>>2,c+8*b>>2);V.uniform2fv(T[a],d)},vb:function(a,b,c){V.uniform2i(T[a],b,c)},ub:function(a,b,c){if(144>=b)for(var d=zd[2*b-1],e=0;e<2*b;e+=2)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2];else d=E.subarray(c>>2,c+8*b>>2);V.uniform2iv(T[a],d)},tb:function(a,b,c,d){V.uniform3f(T[a],b,c,d)},sb:function(a,b,c){if(96>=b)for(var d=yd[3*b-1],e=0;e<3*b;e+=3)d[e]=G[c+4*e>>2],d[e+1]=G[c+(4*e+4)>>2],d[e+2]=
+G[c+(4*e+8)>>2];else d=G.subarray(c>>2,c+12*b>>2);V.uniform3fv(T[a],d)},rb:function(a,b,c,d){V.uniform3i(T[a],b,c,d)},qb:function(a,b,c){if(96>=b)for(var d=zd[3*b-1],e=0;e<3*b;e+=3)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2],d[e+2]=E[c+(4*e+8)>>2];else d=E.subarray(c>>2,c+12*b>>2);V.uniform3iv(T[a],d)},pb:function(a,b,c,d,e){V.uniform4f(T[a],b,c,d,e)},ob:function(a,b,c){if(72>=b){var d=yd[4*b-1];c>>=2;for(var e=0;e<4*b;e+=4){var g=c+e;d[e]=G[g];d[e+1]=G[g+1];d[e+2]=G[g+2];d[e+3]=G[g+3]}}else d=G.subarray(c>>
+2,c+16*b>>2);V.uniform4fv(T[a],d)},nb:function(a,b,c,d,e){V.uniform4i(T[a],b,c,d,e)},mb:function(a,b,c){if(72>=b)for(var d=zd[4*b-1],e=0;e<4*b;e+=4)d[e]=E[c+4*e>>2],d[e+1]=E[c+(4*e+4)>>2],d[e+2]=E[c+(4*e+8)>>2],d[e+3]=E[c+(4*e+12)>>2];else d=E.subarray(c>>2,c+16*b>>2);V.uniform4iv(T[a],d)},lb:function(a,b,c,d){if(72>=b)for(var e=yd[4*b-1],g=0;g<4*b;g+=4)e[g]=G[d+4*g>>2],e[g+1]=G[d+(4*g+4)>>2],e[g+2]=G[d+(4*g+8)>>2],e[g+3]=G[d+(4*g+12)>>2];else e=G.subarray(d>>2,d+16*b>>2);V.uniformMatrix2fv(T[a],
+!!c,e)},kb:function(a,b,c,d){if(32>=b)for(var e=yd[9*b-1],g=0;g<9*b;g+=9)e[g]=G[d+4*g>>2],e[g+1]=G[d+(4*g+4)>>2],e[g+2]=G[d+(4*g+8)>>2],e[g+3]=G[d+(4*g+12)>>2],e[g+4]=G[d+(4*g+16)>>2],e[g+5]=G[d+(4*g+20)>>2],e[g+6]=G[d+(4*g+24)>>2],e[g+7]=G[d+(4*g+28)>>2],e[g+8]=G[d+(4*g+32)>>2];else e=G.subarray(d>>2,d+36*b>>2);V.uniformMatrix3fv(T[a],!!c,e)},jb:function(a,b,c,d){if(18>=b){var e=yd[16*b-1];d>>=2;for(var g=0;g<16*b;g+=16){var k=d+g;e[g]=G[k];e[g+1]=G[k+1];e[g+2]=G[k+2];e[g+3]=G[k+3];e[g+4]=G[k+4];
+e[g+5]=G[k+5];e[g+6]=G[k+6];e[g+7]=G[k+7];e[g+8]=G[k+8];e[g+9]=G[k+9];e[g+10]=G[k+10];e[g+11]=G[k+11];e[g+12]=G[k+12];e[g+13]=G[k+13];e[g+14]=G[k+14];e[g+15]=G[k+15]}}else e=G.subarray(d>>2,d+64*b>>2);V.uniformMatrix4fv(T[a],!!c,e)},ib:function(a){V.useProgram(S[a])},hb:function(a){V.validateProgram(S[a])},gb:function(a,b){V.vertexAttrib1f(a,b)},fb:function(a,b){V.vertexAttrib1f(a,G[b>>2])},eb:function(a,b,c){V.vertexAttrib2f(a,b,c)},db:function(a,b){V.vertexAttrib2f(a,G[b>>2],G[b+4>>2])},cb:function(a,
+b,c,d){V.vertexAttrib3f(a,b,c,d)},bb:function(a,b){V.vertexAttrib3f(a,G[b>>2],G[b+4>>2],G[b+8>>2])},ab:function(a,b,c,d,e){V.vertexAttrib4f(a,b,c,d,e)},$a:function(a,b){V.vertexAttrib4f(a,G[b>>2],G[b+4>>2],G[b+8>>2],G[b+12>>2])},Fd:function(a,b){V.vertexAttribDivisor(a,b)},_a:function(a,b,c,d,e,g){V.vertexAttribPointer(a,b,c,!!d,e,g)},Za:function(a,b,c,d){V.viewport(a,b,c,d)},ka:function(){return"undefined"!==typeof SharedArrayBuffer},G:function(){return rb|0},R:function(){return qb|0},f:function(a,
+b){Z(a,b||1);throw"longjmp";},ja:function(a,b,c){v.copyWithin(a,b,b+c)},ma:function(a,b,c){Bd.length=b;c>>=3;for(var d=0;d<b;d++)Bd[d]=Sa[c+d];return(0>a?mb[-a-1]:ke[a]).apply(null,Bd)},ra:function(){n("OOM")},na:function(a,b,c){return Ed(a)?Fd(a,b,c):Hd(a,b,c)},Q:function(){},la:function(){},oa:function(a,b){var c={};b>>=2;c.alpha=!!E[b];c.depth=!!E[b+1];c.stencil=!!E[b+2];c.antialias=!!E[b+3];c.premultipliedAlpha=!!E[b+4];c.preserveDrawingBuffer=!!E[b+5];c.powerPreference=Id[E[b+6]];c.failIfMajorPerformanceCaveat=
+!!E[b+7];c.wi=E[b+8];c.pj=E[b+9];c.qh=E[b+10];c.hi=E[b+11];c.uj=E[b+12];c.vj=E[b+13];a=Ed(a);if(!a||c.hi)c=0;else if(a=a.getContext("webgl",c)){b=Ma(8);E[b+4>>2]=pb|0;var d={jj:b,attributes:c,version:c.wi,qg:a};a.canvas&&(a.canvas.rg=d);("undefined"===typeof c.qh||c.qh)&&ld(d);c=b}else c=0;return c},sa:function(a,b){var c=0;Kd().forEach(function(d,e){var g=b+c;E[a+4*e>>2]=g;Pa(d,g);c+=d.length+1});return 0},ta:function(a,b){var c=Kd();E[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});
+E[b>>2]=d;return 0},D:function(a){Cb(a)},H:Md,U:Nd,xa:Od,Va:Pd,M:Qd,B:Sd,d:function(){return Aa|0},y:Td,v:function(a,b,c,d,e,g,k){b=Oc(a,b);if(b.ef)return-6;a=b.port;var m=b.hf;b=!1;if(c&&d){var r;if(k&1||!(r=Kc(m))){if(k&8)return-2}else m=r;c=Ia(m,v,c,d);c+1>=d&&(b=!0)}e&&g&&(c=Ia(""+a,v,e,g),c+1>=g&&(b=!0));return b?-12:0},l:function(a){var b=Date.now();E[a>>2]=b/1E3|0;E[a+4>>2]=b%1E3*1E3|0;return 0},r:Ib,ia:function(){M.pi()},ba:ne,j:oe,h:pe,C:qe,P:re,_:se,O:te,Xa:ue,Wa:ve,k:we,w:xe,J:ye,g:ze,
+N:Ae,Sa:Be,Z:Ce,Ya:De,q:Nb,a:Ca||f.wasmMemory,T:function(a){Jb();var b=new Date(E[a+20>>2]+1900,E[a+16>>2],E[a+12>>2],E[a+8>>2],E[a+4>>2],E[a>>2],0),c=E[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),g=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),k=e.getTimezoneOffset(),m=Math.min(k,g);0>c?E[a+32>>2]=Number(g!=k&&m==d):0<c!=(m==d)&&(g=Math.max(k,g),b.setTime(b.getTime()+6E4*((0<c?m:g)-d)));E[a+24>>2]=b.getDay();E[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;return b.getTime()/
+1E3|0},Ra:function(a){if(a===M.Ph)return u("Main thread (id="+a+") cannot be canceled!"),71;if(!a)return u("pthread_cancel attempted on a null thread pointer!"),71;if(E[a+12>>2]!==a)return u("pthread_cancel attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;Atomics.compareExchange(F,a>>2,0,2);l?postMessage({cmd:"cancelThread",thread:a}):ub(a);return 0},S:function(a){var b=M.Dg.pop();a&&b()},L:function(a,b){M.Dg.push(function(){H.get(a)(b)})},n:function(a,
+b,c,d){if("undefined"===typeof SharedArrayBuffer)return u("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!a)return u("pthread_create called with a null thread pointer!"),28;var e=[];if(l&&0===e.length)return Ee(687865856,a,b,c,d);var g=0,k=0,m=0,r=0;if(b){var q=E[b>>2];q+=81920;g=E[b+8>>2];k=0!==E[b+12>>2];if(0===E[b+16>>2]){var t=E[b+20>>2],w=E[b+24>>2];m=b+20;r=b+24;var B=M.Mg?M.Mg:pb|0;if(m||r)if(B)if(E[B+12>>2]!==B)u("pthread_getschedparam attempted on thread "+
+B+", which does not point to a valid thread, or does not exist anymore!");else{var p=Atomics.load(F,B+128>>2);B=Atomics.load(F,B+132>>2);m&&(E[m>>2]=p);r&&(E[r>>2]=B)}else u("pthread_getschedparam called with a null thread pointer!");m=E[b+20>>2];r=E[b+24>>2];E[b+20>>2]=t;E[b+24>>2]=w}else m=E[b+20>>2],r=E[b+24>>2]}else q=2097152;(b=0==g)?g=vc(16,q):(g-=q,assert(0<g));t=Ma(232);for(w=0;58>w;++w)F[(t>>2)+w]=0;E[a>>2]=t;E[t+12>>2]=t;a=t+156;E[a>>2]=a;c={Rf:g,cg:q,Kg:b,Ih:m,Jh:r,detached:k,Mi:c,$f:t,
+Fi:pb|0,Tf:d,Vi:e};l?(c.$i="spawnThread",postMessage(c,e)):Bb(c);return 0},o:function(a,b){return Xd(a,b)},i:Wd,e:function(a){Aa=a|0},E:function(){return 0},m:function(a,b,c,d){function e(p,x,z){for(p="number"===typeof p?p.toString():p||"";p.length<x;)p=z[0]+p;return p}function g(p,x){return e(p,x,"0")}function k(p,x){function z(W){return 0>W?-1:0<W?1:0}var I;0===(I=z(p.getFullYear()-x.getFullYear()))&&0===(I=z(p.getMonth()-x.getMonth()))&&(I=z(p.getDate()-x.getDate()));return I}function m(p){switch(p.getDay()){case 0:return new Date(p.getFullYear()-
+1,11,29);case 1:return p;case 2:return new Date(p.getFullYear(),0,3);case 3:return new Date(p.getFullYear(),0,2);case 4:return new Date(p.getFullYear(),0,1);case 5:return new Date(p.getFullYear()-1,11,31);case 6:return new Date(p.getFullYear()-1,11,30)}}function r(p){p=be(new Date(p.rf+1900,0,1),p.Gg);var x=new Date(p.getFullYear()+1,0,4),z=m(new Date(p.getFullYear(),0,4));x=m(x);return 0>=k(z,p)?0>=k(x,p)?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var q=E[d+40>>2];d={Ti:E[d>>2],Si:E[d+4>>
+2],Eg:E[d+8>>2],pg:E[d+12>>2],dg:E[d+16>>2],rf:E[d+20>>2],Fg:E[d+24>>2],Gg:E[d+28>>2],yj:E[d+32>>2],Ri:E[d+36>>2],Ui:q?C(q):""};c=C(c);q={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};
+for(var t in q)c=c.replace(new RegExp(t,"g"),q[t]);var w="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),B="January February March April May June July August September October November December".split(" ");q={"%a":function(p){return w[p.Fg].substring(0,3)},"%A":function(p){return w[p.Fg]},"%b":function(p){return B[p.dg].substring(0,3)},"%B":function(p){return B[p.dg]},"%C":function(p){return g((p.rf+1900)/100|0,2)},"%d":function(p){return g(p.pg,2)},"%e":function(p){return e(p.pg,
+2," ")},"%g":function(p){return r(p).toString().substring(2)},"%G":function(p){return r(p)},"%H":function(p){return g(p.Eg,2)},"%I":function(p){p=p.Eg;0==p?p=12:12<p&&(p-=12);return g(p,2)},"%j":function(p){return g(p.pg+Zd(Yd(p.rf+1900)?$d:ae,p.dg-1),3)},"%m":function(p){return g(p.dg+1,2)},"%M":function(p){return g(p.Si,2)},"%n":function(){return"\n"},"%p":function(p){return 0<=p.Eg&&12>p.Eg?"AM":"PM"},"%S":function(p){return g(p.Ti,2)},"%t":function(){return"\t"},"%u":function(p){return p.Fg||
+7},"%U":function(p){var x=new Date(p.rf+1900,0,1),z=0===x.getDay()?x:be(x,7-x.getDay());p=new Date(p.rf+1900,p.dg,p.pg);return 0>k(z,p)?g(Math.ceil((31-z.getDate()+(Zd(Yd(p.getFullYear())?$d:ae,p.getMonth()-1)-31)+p.getDate())/7),2):0===k(z,x)?"01":"00"},"%V":function(p){var x=new Date(p.rf+1901,0,4),z=m(new Date(p.rf+1900,0,4));x=m(x);var I=be(new Date(p.rf+1900,0,1),p.Gg);return 0>k(I,z)?"53":0>=k(x,I)?"01":g(Math.ceil((z.getFullYear()<p.rf+1900?p.Gg+32-z.getDate():p.Gg+1-z.getDate())/7),2)},"%w":function(p){return p.Fg},
+"%W":function(p){var x=new Date(p.rf,0,1),z=1===x.getDay()?x:be(x,0===x.getDay()?1:7-x.getDay()+1);p=new Date(p.rf+1900,p.dg,p.pg);return 0>k(z,p)?g(Math.ceil((31-z.getDate()+(Zd(Yd(p.getFullYear())?$d:ae,p.getMonth()-1)-31)+p.getDate())/7),2):0===k(z,x)?"01":"00"},"%y":function(p){return(p.rf+1900).toString().substring(2)},"%Y":function(p){return p.rf+1900},"%z":function(p){p=p.Ri;var x=0<=p;p=Math.abs(p)/60;return(x?"+":"-")+String("0000"+(p/60*100+p%60)).slice(-4)},"%Z":function(p){return p.Ui},
+"%%":function(){return"%"}};for(t in q)0<=c.indexOf(t)&&(c=c.replace(new RegExp(t,"g"),q[t](d)));t=Zb(c,!1);if(t.length>b)return 0;y.set(t,a);return t.length-1},x:ce,s:function(a){var b=Date.now()/1E3|0;a&&(E[a>>2]=b);return b}};
+(function(){function a(e,g){f.asm=e.exports;H=f.asm.Sd;Da=g;l||fb()}function b(e){a(e.instance,e.module)}function c(e){return kb().then(function(g){return WebAssembly.instantiate(g,d)}).then(e,function(g){u("failed to asynchronously prepare wasm: "+g);n(g)})}var d={a:Fe};l||eb();if(f.instantiateWasm)try{return f.instantiateWasm(d,a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return Ba||"function"!==typeof WebAssembly.instantiateStreaming||ib()||gb("file://")||
+"function"!==typeof fetch?c(b):fetch(hb,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){u("wasm streaming compile failed: "+g);u("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ca);return{}})();
+var le=f.___wasm_call_ctors=function(){return(le=f.___wasm_call_ctors=f.asm.Td).apply(null,arguments)},zb=f._free=function(){return(zb=f._free=f.asm.Ud).apply(null,arguments)},Ma=f._malloc=function(){return(Ma=f._malloc=f.asm.Vd).apply(null,arguments)},Fb=f.___errno_location=function(){return(Fb=f.___errno_location=f.asm.Wd).apply(null,arguments)},qc=f._memset=function(){return(qc=f._memset=f.asm.Xd).apply(null,arguments)};f._fflush=function(){return(f._fflush=f.asm.Yd).apply(null,arguments)};
+var vc=f._memalign=function(){return(vc=f._memalign=f.asm.Zd).apply(null,arguments)},Nc=f._ntohs=function(){return(Nc=f._ntohs=f.asm._d).apply(null,arguments)},Fc=f._htons=function(){return(Fc=f._htons=f.asm.$d).apply(null,arguments)},me=f._main=function(){return(me=f._main=f.asm.ae).apply(null,arguments)},Vd=f._emscripten_get_global_libc=function(){return(Vd=f._emscripten_get_global_libc=f.asm.be).apply(null,arguments)};
+f.___em_js__initPthreadsJS=function(){return(f.___em_js__initPthreadsJS=f.asm.ce).apply(null,arguments)};
+var Ud=f._htonl=function(){return(Ud=f._htonl=f.asm.de).apply(null,arguments)},Mb=f.__get_tzname=function(){return(Mb=f.__get_tzname=f.asm.ee).apply(null,arguments)},Lb=f.__get_daylight=function(){return(Lb=f.__get_daylight=f.asm.fe).apply(null,arguments)},Kb=f.__get_timezone=function(){return(Kb=f.__get_timezone=f.asm.ge).apply(null,arguments)},A=f.stackSave=function(){return(A=f.stackSave=f.asm.he).apply(null,arguments)},D=f.stackRestore=function(){return(D=f.stackRestore=f.asm.ie).apply(null,arguments)},
+Ha=f.stackAlloc=function(){return(Ha=f.stackAlloc=f.asm.je).apply(null,arguments)},Z=f._setThrew=function(){return(Z=f._setThrew=f.asm.ke).apply(null,arguments)};f._emscripten_main_browser_thread_id=function(){return(f._emscripten_main_browser_thread_id=f.asm.le).apply(null,arguments)};
+var yb=f.___pthread_tsd_run_dtors=function(){return(yb=f.___pthread_tsd_run_dtors=f.asm.me).apply(null,arguments)},Ab=f._emscripten_main_thread_process_queued_calls=function(){return(Ab=f._emscripten_main_thread_process_queued_calls=f.asm.ne).apply(null,arguments)};f._emscripten_current_thread_process_queued_calls=function(){return(f._emscripten_current_thread_process_queued_calls=f.asm.oe).apply(null,arguments)};
+var wb=f._emscripten_register_main_browser_thread_id=function(){return(wb=f._emscripten_register_main_browser_thread_id=f.asm.pe).apply(null,arguments)},lb=f._do_emscripten_dispatch_to_thread=function(){return(lb=f._do_emscripten_dispatch_to_thread=f.asm.qe).apply(null,arguments)};f._emscripten_async_run_in_main_thread=function(){return(f._emscripten_async_run_in_main_thread=f.asm.re).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread=function(){return(f._emscripten_sync_run_in_main_thread=f.asm.se).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_0=function(){return(f._emscripten_sync_run_in_main_thread_0=f.asm.te).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_1=function(){return(f._emscripten_sync_run_in_main_thread_1=f.asm.ue).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread_2=function(){return(f._emscripten_sync_run_in_main_thread_2=f.asm.ve).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_xprintf_varargs=function(){return(f._emscripten_sync_run_in_main_thread_xprintf_varargs=f.asm.we).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_3=function(){return(f._emscripten_sync_run_in_main_thread_3=f.asm.xe).apply(null,arguments)};
+var Ee=f._emscripten_sync_run_in_main_thread_4=function(){return(Ee=f._emscripten_sync_run_in_main_thread_4=f.asm.ye).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_5=function(){return(f._emscripten_sync_run_in_main_thread_5=f.asm.ze).apply(null,arguments)};f._emscripten_sync_run_in_main_thread_6=function(){return(f._emscripten_sync_run_in_main_thread_6=f.asm.Ae).apply(null,arguments)};
+f._emscripten_sync_run_in_main_thread_7=function(){return(f._emscripten_sync_run_in_main_thread_7=f.asm.Be).apply(null,arguments)};var Ad=f._emscripten_run_in_main_runtime_thread_js=function(){return(Ad=f._emscripten_run_in_main_runtime_thread_js=f.asm.Ce).apply(null,arguments)},Gd=f.__emscripten_call_on_thread=function(){return(Gd=f.__emscripten_call_on_thread=f.asm.De).apply(null,arguments)};f._proxy_main=function(){return(f._proxy_main=f.asm.Ee).apply(null,arguments)};
+f._emscripten_tls_init=function(){return(f._emscripten_tls_init=f.asm.Fe).apply(null,arguments)};f.dynCall_ijiii=function(){return(f.dynCall_ijiii=f.asm.Ge).apply(null,arguments)};var Ge=f.dynCall_vijjjid=function(){return(Ge=f.dynCall_vijjjid=f.asm.He).apply(null,arguments)},He=f.dynCall_iiiijj=function(){return(He=f.dynCall_iiiijj=f.asm.Ie).apply(null,arguments)};f.dynCall_iiijiii=function(){return(f.dynCall_iiijiii=f.asm.Je).apply(null,arguments)};
+f.dynCall_jiiii=function(){return(f.dynCall_jiiii=f.asm.Ke).apply(null,arguments)};f.dynCall_jii=function(){return(f.dynCall_jii=f.asm.Le).apply(null,arguments)};var Ie=f.dynCall_iij=function(){return(Ie=f.dynCall_iij=f.asm.Me).apply(null,arguments)};f.dynCall_viiijj=function(){return(f.dynCall_viiijj=f.asm.Ne).apply(null,arguments)};f.dynCall_jij=function(){return(f.dynCall_jij=f.asm.Oe).apply(null,arguments)};f.dynCall_jiji=function(){return(f.dynCall_jiji=f.asm.Pe).apply(null,arguments)};
+f.dynCall_iiiji=function(){return(f.dynCall_iiiji=f.asm.Qe).apply(null,arguments)};f.dynCall_iiiiij=function(){return(f.dynCall_iiiiij=f.asm.Re).apply(null,arguments)};f.dynCall_jiiij=function(){return(f.dynCall_jiiij=f.asm.Se).apply(null,arguments)};f.dynCall_iiijjji=function(){return(f.dynCall_iiijjji=f.asm.Te).apply(null,arguments)};f.dynCall_iiiiiij=function(){return(f.dynCall_iiiiiij=f.asm.Ue).apply(null,arguments)};f.dynCall_jiiji=function(){return(f.dynCall_jiiji=f.asm.Ve).apply(null,arguments)};
+f.dynCall_viiiiijji=function(){return(f.dynCall_viiiiijji=f.asm.We).apply(null,arguments)};f.dynCall_viiiji=function(){return(f.dynCall_viiiji=f.asm.Xe).apply(null,arguments)};f.dynCall_viiiiji=function(){return(f.dynCall_viiiiji=f.asm.Ye).apply(null,arguments)};f.dynCall_jiiiii=function(){return(f.dynCall_jiiiii=f.asm.Ze).apply(null,arguments)};f.dynCall_jiii=function(){return(f.dynCall_jiii=f.asm._e).apply(null,arguments)};
+f.dynCall_jiiiiii=function(){return(f.dynCall_jiiiiii=f.asm.$e).apply(null,arguments)};f._ff_h264_cabac_tables=2115974;var xb=f._main_thread_futex=17195328;function pe(a,b,c){var d=A();try{return H.get(a)(b,c)}catch(e){D(d);if(e!==e+0&&"longjmp"!==e)throw e;Z(1,0)}}function we(a,b){var c=A();try{H.get(a)(b)}catch(d){D(c);if(d!==d+0&&"longjmp"!==d)throw d;Z(1,0)}}function ze(a,b,c,d,e){var g=A();try{H.get(a)(b,c,d,e)}catch(k){D(g);if(k!==k+0&&"longjmp"!==k)throw k;Z(1,0)}}
+function xe(a,b,c){var d=A();try{H.get(a)(b,c)}catch(e){D(d);if(e!==e+0&&"longjmp"!==e)throw e;Z(1,0)}}function oe(a,b){var c=A();try{return H.get(a)(b)}catch(d){D(c);if(d!==d+0&&"longjmp"!==d)throw d;Z(1,0)}}function re(a,b,c,d,e){var g=A();try{return H.get(a)(b,c,d,e)}catch(k){D(g);if(k!==k+0&&"longjmp"!==k)throw k;Z(1,0)}}function te(a,b,c,d,e,g,k,m,r){var q=A();try{return H.get(a)(b,c,d,e,g,k,m,r)}catch(t){D(q);if(t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}}
+function ye(a,b,c,d){var e=A();try{H.get(a)(b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}function ne(a){var b=A();try{return H.get(a)()}catch(c){D(b);if(c!==c+0&&"longjmp"!==c)throw c;Z(1,0)}}function Ae(a,b,c,d,e,g){var k=A();try{H.get(a)(b,c,d,e,g)}catch(m){D(k);if(m!==m+0&&"longjmp"!==m)throw m;Z(1,0)}}function qe(a,b,c,d){var e=A();try{return H.get(a)(b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}
+function se(a,b,c,d,e,g){var k=A();try{return H.get(a)(b,c,d,e,g)}catch(m){D(k);if(m!==m+0&&"longjmp"!==m)throw m;Z(1,0)}}function Ce(a,b,c,d,e,g,k,m,r){var q=A();try{H.get(a)(b,c,d,e,g,k,m,r)}catch(t){D(q);if(t!==t+0&&"longjmp"!==t)throw t;Z(1,0)}}function Be(a,b,c,d,e,g,k){var m=A();try{H.get(a)(b,c,d,e,g,k)}catch(r){D(m);if(r!==r+0&&"longjmp"!==r)throw r;Z(1,0)}}function De(a,b,c,d,e,g,k,m,r,q){var t=A();try{Ge(a,b,c,d,e,g,k,m,r,q)}catch(w){D(t);if(w!==w+0&&"longjmp"!==w)throw w;Z(1,0)}}
+function ue(a,b,c,d,e,g,k,m){var r=A();try{return He(a,b,c,d,e,g,k,m)}catch(q){D(r);if(q!==q+0&&"longjmp"!==q)throw q;Z(1,0)}}function ve(a,b,c,d){var e=A();try{return Ie(a,b,c,d)}catch(g){D(e);if(g!==g+0&&"longjmp"!==g)throw g;Z(1,0)}}f.ccall=Ga;f.cwrap=function(a,b,c,d){c=c||[];var e=c.every(function(g){return"number"===g});return"string"!==b&&e&&!d?Fa(a):function(){return Ga(a,b,c,arguments,d)}};
+f.setValue=function(a,b,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":y[a>>0]=b;break;case "i8":y[a>>0]=b;break;case "i16":Qa[a>>1]=b;break;case "i32":E[a>>2]=b;break;case "i64":L=[b>>>0,(J=b,1<=+Math.abs(J)?0<J?(Math.min(+Math.floor(J/4294967296),4294967295)|0)>>>0:~~+Math.ceil((J-+(~~J>>>0))/4294967296)>>>0:0)];E[a>>2]=L[0];E[a+4>>2]=L[1];break;case "float":G[a>>2]=b;break;case "double":Sa[a>>3]=b;break;default:n("invalid type for setValue: "+c)}};f.writeAsciiToMemory=Pa;
+f.FS=O;f.PThread=M;f.PThread=M;f._pthread_self=Wd;f.wasmMemory=Ca;f.ExitStatus=wa;var Je;function wa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}cb=function Ke(){Je||Le();Je||(cb=Ke)};
+function Le(a){function b(){if(!Je&&(Je=!0,f.calledRun=!0,!Ea)){f.noFSInit||O.gg.Tg||O.gg();R.root=O.jf(R,{},null);nb(Wa);l||(O.Bh=!1,nb(Xa));ba(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(Me){var c=a;c=c||[];var d=c.length+1,e=Ha(4*(d+1));E[e>>2]=Na(ha);for(var g=1;g<d;g++)E[(e>>2)+g]=Na(c[g-1]);E[(e>>2)+d]=0;f._proxy_main(d,e)}if(!l){if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)c=f.postRun.shift(),Za.unshift(c);nb(Za)}}}a=a||fa;if(!(0<ab)){if(!l){if(f.preRun)for("function"==
+typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)$a();nb(Va)}0<ab||(f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("")},1);b()},1)):b())}}f.run=Le;function Cb(a,b){if(!b||!noExitRuntime||0!==a){if(!noExitRuntime){M.Oi();l||(nb(Ya),O.quit(),M.eh());if(f.onExit)f.onExit(a);Ea=!0}ja(a,new wa(a))}}if(f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);0<f.preInit.length;)f.preInit.pop()();var Me=!1;f.noInitialRun&&(Me=!1);
+l?M.ri():Le();f.exit=Cb;
+
+
+  return createFFmpegCore.ready
+}
+);
+})();
+if (typeof exports === 'object' && typeof module === 'object')
+      module.exports = createFFmpegCore;
+    else if (typeof define === 'function' && define['amd'])
+      define([], function() { return createFFmpegCore; });
+    else if (typeof exports === 'object')
+      exports["createFFmpegCore"] = createFFmpegCore;
+    

BIN
dist/static/ffmpeg/ffmpeg-core.wasm


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/ffmpeg/ffmpeg-core.worker.js


BIN
dist/static/fonts/element-icons.535877f.woff


BIN
dist/static/fonts/element-icons.732389d.ttf


BIN
dist/static/img/addStage.b6a9d67.png


BIN
dist/static/img/bz_icon_data.1882026.png


BIN
dist/static/img/bz_icon_data_active.6254a5a.png


BIN
dist/static/img/hx_icon_data.be59b10.png


BIN
dist/static/img/hx_icon_data_active.3816a5e.png


BIN
dist/static/img/icon_add.0f4f852.png


BIN
dist/static/img/icon_last.834d3b3.png


BIN
dist/static/img/icon_next.9c51962.png


BIN
dist/static/img/icon_return2.cf697fa.png


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.771e7c5cadeec4456ad3.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.771e7c5cadeec4456ad3.js.map


+ 2 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js

@@ -0,0 +1,2 @@
+!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="./",t.oe=function(r){throw console.error(r),r}}([]);
+//# sourceMappingURL=manifest.3ad1d5771e9b13dbdad2.js.map

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/vendor.114c70b69d26bbdf9624.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/vendor.114c70b69d26bbdf9624.js.map


BIN
dist/static/logo.ico


+ 3 - 3
src/components/pages/knowledge/folder.vue

@@ -365,9 +365,9 @@ export default {
           tagLoadings[type - 1] = false;
           this[`tagData${type}`] = res.data[0];
           const checkKey = `check${type}`;
-          this[checkKey] = this[checkKey].filter(tag =>
-            this[`tagData${type}`].some(item => item.id === tag)
-          );
+          // this[checkKey] = this[checkKey].filter(tag =>
+          //   this[`tagData${type}`].some(item => item.id === tag)
+          // );
         })
         .catch(err => {
           tagLoadings[type - 1] = false;

+ 17 - 0
src/components/pages/knowledge/folderFileBox.vue

@@ -289,7 +289,11 @@ export default {
       const allowedExtensions = [
         "csv","xls","xlsx","md","pdf","txt","ppt","pptx","docx"
       ];
+      //     let uuid = uuidv4();
+      // let res = window.uploadFile({ file: event.target.files[0], uuid, userid:this.userid, folderid:this.folderid, moFolderid: this.moFolderid })
+      // console.log(res);
       
+      // return
       const uploadFiles = async (files) => {
         for (let cfindex = 0; cfindex < files.length; cfindex++) {
           file = files[cfindex];
@@ -451,6 +455,19 @@ export default {
   },
   mounted() {
     // this.getData();
+    
+    //  const script = document.createElement('script');
+    // script.src = 'https://beta.cloud.cocorobo.cn/js/Common/uploadR2R.js';
+    // script.type = 'text/javascript';
+    // script.defer = true;  // 或者 async,根据需要
+    // script.onload = () => {
+    //   console.log('上传脚本加载成功');
+    //   // 你可以在这里使用上传文件的功能了
+    // };
+    // script.onerror = () => {
+    //   console.error('上传脚本加载失败');
+    // };
+    // document.head.appendChild(script);
   },
 };
 </script>

+ 472 - 0
src/components/pages/test/add/addTest.vue

@@ -0,0 +1,472 @@
+<template>
+    <div class="pb_content" style="background: #F0F2F5;" v-loading="loading">
+        <div class="pb_content_body" style="position: relative; margin: 0">
+            <div class="right">
+                <div class="courseTop">
+                    <div class="stepsNav">
+                        <el-breadcrumb separator-class="el-icon-arrow-right">
+                            <el-breadcrumb-item :to="{
+                                path:
+                                    '/test?userid=' +
+                                    userid +
+                                    '&oid=' +
+                                    oid +
+                                    '&org=' +
+                                    org +
+                                    '&role=' +
+                                    role,
+                            }">表单管理</el-breadcrumb-item>
+                            <el-breadcrumb-item>
+                                <span style="color: rgb(15, 126, 255)">新建表单</span>
+                            </el-breadcrumb-item>
+                        </el-breadcrumb>
+                    </div>
+                    <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
+                </div>
+                <div class="step_box" :style="{ width: steps == 2 && '100%' }">
+                    <editInfo v-if="steps == 2 && !loading" :oid="oid" :org="org" :steps.sync="steps" :fileData.sync="fileData"
+                        :title.sync="title" :brief.sync="brief" :cJson.sync="cJson" @save="save" @publish="publish">
+                    </editInfo>
+                </div>
+            </div>
+        </div>
+        <el-dialog title="发布表单" :visible.sync="dialogVisible" width="550px" @close="dialogVisible = false" class="eld">
+            <setInfo :oid="oid" :org="org" :steps.sync="steps" :title.sync="title" :testType.sync="testType"
+                :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid" :brief.sync="brief" :juri.sync="juri"
+                :overDate.sync="overDate" :juriList.sync="juriList" :typeInfo.sync="typeInfo" :origin="origin">
+            </setInfo>
+            <span slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="updateWork(3)">发 布 </el-button>
+            </span>
+        </el-dialog>
+
+
+
+    </div>
+</template>
+
+<script>
+import setInfo from './setInfo/index.vue'
+import editInfo from './edit/index.vue'
+export default {
+    components: {
+        setInfo, editInfo
+    },
+    data() {
+        return {
+            userid: this.$route.query.userid,
+            oid: this.$route.query.oid,
+            org: this.$route.query.org,
+            role: this.$route.query.role,
+            cid: this.$route.query.cid,
+            steps: 2,
+            title: "",
+            testType: [],
+            see: false,
+            cJson: [],
+            loading: false,
+            look: "",
+            typeid: "",
+            brief: "",
+            juri: '0',
+            overDate: "",
+            juriList: [],
+            typeInfo: [],
+            dialogVisible: false,
+            origin: "",
+						fileData:null,
+        }
+    },
+    watch: {
+        cid(newValue, oldValue){
+            let url = "https://beta.cloud.cocorobo.cn/#/testDetail?testid=" + newValue
+            this.origin = url
+        },
+        steps(newValue, oldValue) {
+            if (!this.title) {
+                this.$message.error("请补充填写课程名称");
+                this.steps = 1
+                return;
+            }
+            // else if(!this.juriList.length){
+            //     this.$message.error("请选择权限")
+            //     this.steps = 1
+            //     return
+            // } 
+            if (this.cid) {
+                this.updateWork(this.look)
+            } else {
+                this.addWork();
+            }
+        }
+    },
+    methods: {
+        retrunCourse() {
+            this
+                .$confirm("是否保存已编辑内容?", "提示", {
+                    confirmButtonText: "保存",
+                    cancelButtonText: "不保存",
+                    distinguishCancelAndClose: true,
+                    type: "warning",
+                })
+                .then(() => {
+                    if (this.cid == "" || this.cid == undefined) {
+                        if (this.title == "") {
+                            this.$message.error("请补充填写课程名称");
+                            return;
+                        } else {
+                            this.addWork(5);
+                        }
+                        // else if(!this.juriList.length){
+                        //     this.$message.error("请选择权限")
+                        //     return
+                        // }
+                    } else {
+                        if (this.title == "") {
+                            this.$message.error("请补充填写课程名称");
+                            return;
+                        } else {
+                            this.updateWork(5);
+                        }
+                        // else if(!this.juriList.length){
+                        //     this.$message.error("请选择权限")
+                        //     return
+                        // }
+                    }
+                })
+                .catch((v) => {
+                    console.log(v)
+                    if (v == "cancel") {
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                });
+        },
+        goTo(path) {
+            this.$router.push(path);
+        },
+        addWork(look, callback) {
+            let j3 = []
+            if (this.typeInfo.length) {
+                this.typeInfo.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [
+                {
+                    uid: this.userid,
+                    title: this.title,
+                    brief: this.brief,
+                    cover: JSON.stringify(this.fileData),
+                    evaId: "",
+                    astudent: this.juri,
+                    see: this.see == true ? 1 : 0,
+                    chapters: JSON.stringify(this.cJson),
+                    template: "",
+                    courseType: JSON.stringify(this.testType),
+                    ateacher: "",
+                    inviteCode: "",
+                    typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : '',
+                    j3: j3.length ? j3.join(",") : '',
+                },
+            ];
+            this.ajax
+                .post(this.$store.state.api + "addTestCourse3", params)
+                .then((res) => {
+                    this.cid = res.data.courseId;
+                    if (look == 5) {
+                        this.$message.success("保存成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                    // setTimeout(() => {
+                    //     this.getData(2);
+                    // }, 1000);
+                    callback ? callback() : ''
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        formatTime(timestamp) {
+            const date = new Date(timestamp);
+            const year = date.getFullYear();
+            const month = String(date.getMonth() + 1).padStart(2, '0');
+            const day = String(date.getDate()).padStart(2, '0');
+
+            return `${year}-${month}-${day}`;
+        },
+        updateWork(look) {
+            let j3 = []
+            if (this.typeInfo.length) {
+                this.typeInfo.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [
+                {
+                    cid: this.cid,
+                    title: this.title,
+                    brief: this.brief,
+                    cover: JSON.stringify(this.fileData),
+                    evaId: "",
+                    astudent: this.juri,
+                    see: this.see == true ? 1 : 0,
+                    chapters: JSON.stringify(this.cJson),
+                    uid: this.userid,
+                    courseType: JSON.stringify(this.testType),
+                    ateacher: "",
+                    inviteCode: "",
+                    look: look == 3 ? 2 : look == 4 ? this.look : look == 5 ? this.look : look,
+                    typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : '',
+                    j3: j3.length ? j3.join(",") : '',
+                },
+            ];
+            this.ajax
+                .post(this.$store.state.api + "updateTestCourse3", params)
+                .then((res) => {
+                    if (look == 3) {
+                        this.$message.success("发布成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    } else if (look == 4) {
+                        this.$message.success("保存成功")
+                    } else if (look == 1 || look == 2) {
+                        // this.$message.success("保存成功")
+                    } else if (look == 5) {
+                        this.$message.success("保存成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                    setTimeout(() => {
+                        this.getData(2);
+                    }, 1000);
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        getData(type) {
+            if (this.cid == "" || this.cid == undefined) {
+                console.log("这是新增课程");
+            } else {
+                if (type != 2) {
+                    this.loading = true
+                }
+                let params = {
+                    cid: this.cid,
+                };
+                this.ajax
+                    .get(this.$store.state.api + "getTestCourseDetail", params)
+                    .then((res) => {
+                        this.cJson = JSON.parse(res.data[0][0].chapters);
+                        this.title = res.data[0][0].title;
+                        this.juri = res.data[0][0].juri ? res.data[0][0].juri : '0';
+                        this.overDate = res.data[0][0].overTime ? res.data[0][0].overTime : '';
+                        this.juriList = res.data[0][0].juri2 ? res.data[0][0].juri2.split(',') : [];
+                        let juri3 = res.data[0][0].juri3 ? res.data[0][0].juri3.split(',') : [];
+                        if (juri3.length > 0) {
+                            this.typeInfo.forEach(e => {
+                                let array2 = []
+                                for (var i = 0; i < e.child.length; i++) {
+                                    array2.push(e.child[i].id)
+                                }
+                                e.value = this.arrayToArray(juri3, array2)[0]
+                            })
+                        }
+                        this.see = res.data[0][0].open == 1 ? true : false;
+
+                        this.typeid = res.data[0][0].typeid;
+                        this.brief = res.data[0][0].brief;
+												this.fileData = res.data[0][0].cover?JSON.parse(res.data[0][0].cover):null;
+                        this.testType = [];
+                        for (var i = 0; i < res.data[1].length; i++) {
+                            this.testType.push(res.data[1][i].typeid);
+                        }
+                        console.log(this.testType);
+                        this.look = res.data[0][0].look
+                        this.$forceUpdate()
+                        if (type != 2) {
+                            this.loading = false
+                        }
+                    })
+                    .catch((err) => {
+                        console.error(err);
+                    });
+            }
+        },
+        save(look) {
+            if (!this.title) {
+                this.$message.error("请补充填写课程名称");
+                return;
+            }
+            if (this.cid) {
+                this.updateWork(look == 4 ? look : this.look)
+            } else {
+                this.addWork();
+            }
+            // this.updateWork(5)
+        },
+        publish() {
+            if (!this.title) {
+                this.$message.error("请补充填写课程名称");
+                return;
+            }
+            if (this.cid) {
+                this.dialogVisible = true
+            } else {
+                this.addWork(this.look, ()=>{
+                    this.dialogVisible = true
+                });
+            }
+            // this.updateWork(3)
+        },
+        //获取分类类名
+        getTypeInfo() {
+            this.loading = true
+            let params = {
+                oid: this.oid
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectPerInfoAllTea", params)
+                .then((res) => {
+                    this.typeInfo = res.data[0];
+                    let typeInfo = res.data[1];
+                    this.typeInfo.forEach((e) => {
+                        e.child = [];
+                        e.value = '';
+                        typeInfo.forEach((i) => {
+                            if (e.id == i.parentid) {
+                                e.child.push({ id: i.id, name: i.name })
+                            }
+                        })
+                    })
+                    this.loading = false
+                    console.log(this.typeInfo, "typeInfo");
+                    this.getData();
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        arrayToArray(arrayo, arrayt) {
+            let array1 = arrayo;
+            let array2 = arrayt;
+
+            let commonElements = [];
+
+            for (let i = 0; i < array1.length; i++) {
+                for (let j = 0; j < array2.length; j++) {
+                    if (array1[i] === array2[j]) {
+                        commonElements.push(array1[i]);
+                    }
+                }
+            }
+            return commonElements;
+        },
+    },
+    mounted() {
+        if(this.cid){
+            let url = "https://beta.cloud.cocorobo.cn/#/testDetail?testid=" + this.cid
+            this.origin = url
+        }
+        this.getTypeInfo();
+    },
+}
+</script>
+
+<style scoped>
+.pb_content {
+    height: 100% !important;
+    /* margin: 0 20px 0 20px; */
+}
+
+.pb_content_body {
+    width: 100% !important;
+    height: 100%;
+}
+
+.right {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    overflow: hidden;
+    flex-direction: column;
+}
+
+.basic_box {
+    margin: 0 auto;
+    position: relative;
+    padding: 0 20px 0 20px;
+}
+
+.courseTop {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    width: calc(100% - 40px);
+    margin: 0 auto;
+    padding: 10px 0;
+}
+
+.stepsNav {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+}
+
+.step_box {
+    width: calc(100% - 40px);
+    margin: 0 auto;
+    height: calc(100% - 38px);
+}
+
+.eld >>> .el-dialog__header{
+    border-bottom: 1px solid #E7E7E7;
+}
+
+.eld >>> .el-dialog__body {
+    padding: 0 20px;
+    color: unset;
+}
+</style>

+ 421 - 0
src/components/pages/test/add/addTestJ.vue

@@ -0,0 +1,421 @@
+<template>
+    <div class="pb_content" style="background: #F0F2F5;" v-loading="loading">
+        <div class="pb_content_body" style="position: relative; margin: 0">
+            <div class="right">
+                <div class="courseTop">
+                    <div class="stepsNav">
+                        <el-breadcrumb separator-class="el-icon-arrow-right">
+                            <el-breadcrumb-item :to="{
+                                path:
+                                    '/test?userid=' +
+                                    userid +
+                                    '&oid=' +
+                                    oid +
+                                    '&org=' +
+                                    org +
+                                    '&role=' +
+                                    role,
+                            }">表单管理</el-breadcrumb-item>
+                            <el-breadcrumb-item>
+                                <span style="color: rgb(15, 126, 255)">新建表单</span>
+                            </el-breadcrumb-item>
+                        </el-breadcrumb>
+                    </div>
+                    <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
+                </div>
+                <div class="step_box" :style="{ width: steps == 2 && '100%' }">
+                    <setInfo v-if="steps == 1 && !loading" :oid="oid" :org="org" :steps.sync="steps" :title.sync="title"
+                        :testType.sync="testType" :see.sync="see" :cJson.sync="cJson" :typeid.sync="typeid"
+                        :brief.sync="brief" :juri.sync="juri" :overDate.sync="overDate" :juriList.sync="juriList" :typeInfo.sync="typeInfo">
+                    </setInfo>
+                    <editInfo v-if="steps == 2 && !loading" :oid="oid" :org="org" :steps.sync="steps"
+                        :title.sync="title" :cJson.sync="cJson" @save="save" @publish="publish"></editInfo>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import setInfo from './setInfo/index.vue'
+import editInfo from './edit/index.vue'
+export default {
+    components: {
+        setInfo, editInfo
+    },
+    data() {
+        return {
+            userid: this.$route.query.userid,
+            oid: this.$route.query.oid,
+            org: this.$route.query.org,
+            role: this.$route.query.role,
+            cid: this.$route.query.cid,
+            steps: 1,
+            title: "",
+            testType: [],
+            see: false,
+            cJson: [],
+            loading: false,
+            look: "",
+            typeid: "",
+            brief: "",
+            juri: '0',
+            overDate: "",
+            juriList: [],
+            typeInfo: [],
+        }
+    },
+    watch: {
+        steps(newValue, oldValue) {
+            if (!this.title) {
+                this.$message.error("请补充填写课程名称");
+                this.steps = 1
+                return;
+            }
+            // else if(!this.juriList.length){
+            //     this.$message.error("请选择权限")
+            //     this.steps = 1
+            //     return
+            // } 
+            if (this.cid) {
+                this.updateWork(this.look)
+            } else {
+                this.addWork();
+            }
+        }
+    },
+    methods: {
+        retrunCourse() {
+            this
+                .$confirm("是否保存已编辑内容?", "提示", {
+                    confirmButtonText: "保存",
+                    cancelButtonText: "不保存",
+                    distinguishCancelAndClose: true,
+                    type: "warning",
+                })
+                .then(() => {
+                    if (this.cid == "" || this.cid == undefined) {
+                        if (this.title == "") {
+                            this.$message.error("请补充填写课程名称");
+                            return;
+                        } else {
+                            this.addWork(5);
+                        }
+                        // else if(!this.juriList.length){
+                        //     this.$message.error("请选择权限")
+                        //     return
+                        // }
+                    } else {
+                        if (this.title == "") {
+                            this.$message.error("请补充填写课程名称");
+                            return;
+                        } else {
+                            this.updateWork(5);
+                        }
+                        // else if(!this.juriList.length){
+                        //     this.$message.error("请选择权限")
+                        //     return
+                        // }
+                    }
+                })
+                .catch((v) => {
+                    console.log(v)
+                    if (v == "cancel") {
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                });
+        },
+        goTo(path) {
+            this.$router.push(path);
+        },
+        addWork(look) {
+            let j3 = []
+            if(this.typeInfo.length){
+                this.typeInfo.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [
+                {
+                    uid: this.userid,
+                    title: this.title,
+                    brief: this.brief,
+                    cover: "",
+                    evaId: "",
+                    astudent: this.juri,
+                    see: this.see == true ? 1 : 0,
+                    chapters: JSON.stringify(this.cJson),
+                    template: "",
+                    courseType: JSON.stringify(this.testType),
+                    ateacher: "",
+                    inviteCode: "",
+                    typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : '',
+                    j3: j3.length ? j3.join(",") : '',
+                },
+            ];
+            this.ajax
+                .post(this.$store.state.api + "addTestCourse3", params)
+                .then((res) => {
+                    this.cid = res.data.courseId;
+                    if (look == 5) {
+                        this.$message.success("保存成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                    setTimeout(() => {
+                        this.getData(2);
+                    }, 1000);
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        formatTime(timestamp) {
+            const date = new Date(timestamp);
+            const year = date.getFullYear();
+            const month = String(date.getMonth() + 1).padStart(2, '0');
+            const day = String(date.getDate()).padStart(2, '0');
+
+            return `${year}-${month}-${day}`;
+        },
+        updateWork(look) {
+            let j3 = []
+            if(this.typeInfo.length){
+                this.typeInfo.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [
+                {
+                    cid: this.cid,
+                    title: this.title,
+                    brief: this.brief,
+                    cover: "",
+                    evaId: "",
+                    astudent: this.juri,
+                    see: this.see == true ? 1 : 0,
+                    chapters: JSON.stringify(this.cJson),
+                    uid: this.userid,
+                    courseType: JSON.stringify(this.testType),
+                    ateacher: "",
+                    inviteCode: "",
+                    look: look == 3 ? 2 : look == 4 ? this.look : look == 5 ? this.look : look,
+                    typeid: this.typeid ? this.typeid : '',
+                    overtime: this.overDate ? this.formatTime(this.overDate) : '',
+                    j2: this.juriList.length ? this.juriList.join(",") : '',
+                    j3: j3.length ? j3.join(",") : '',
+                },
+            ];
+            this.ajax
+                .post(this.$store.state.api + "updateTestCourse3", params)
+                .then((res) => {
+                    if (look == 3) {
+                        this.$message.success("发布成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    } else if (look == 4) {
+                        this.$message.success("保存成功")
+                    } else if (look == 1 || look == 2) {
+                        // this.$message.success("保存成功")
+                    } else if (look == 5) {
+                        this.$message.success("保存成功")
+                        this.goTo(
+                            "/test?userid=" +
+                            this.userid +
+                            "&oid=" +
+                            this.oid +
+                            "&org=" +
+                            this.org +
+                            "&role=" +
+                            this.role
+                        );
+                    }
+                    setTimeout(() => {
+                        this.getData(2);
+                    }, 1000);
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        getData(type) {
+            if (this.cid == "" || this.cid == undefined) {
+                console.log("这是新增课程");
+            } else {
+                if (type != 2) {
+                    this.loading = true
+                }
+                let params = {
+                    cid: this.cid,
+                };
+                this.ajax
+                    .get(this.$store.state.api + "getTestCourseDetail", params)
+                    .then((res) => {
+                        this.cJson = JSON.parse(res.data[0][0].chapters);
+                        this.title = res.data[0][0].title;
+                        this.juri = res.data[0][0].juri ? res.data[0][0].juri : '0';
+                        this.overDate = res.data[0][0].overTime ? res.data[0][0].overTime : '';
+                        this.juriList = res.data[0][0].juri2 ? res.data[0][0].juri2.split(',') : [];
+                        let juri3 = res.data[0][0].juri3 ? res.data[0][0].juri3.split(',') : [];
+                        if(juri3.length > 0){
+                            this.typeInfo.forEach(e =>{
+                                let array2 = []
+                                for (var i = 0; i < e.child.length; i++) {
+                                    array2.push(e.child[i].id)
+                                }
+                                e.value = this.arrayToArray(juri3, array2)[0]
+                            })
+                        }
+                        this.see = res.data[0][0].open == 1 ? true : false;
+
+                        this.typeid = res.data[0][0].typeid;
+                        this.brief = res.data[0][0].brief;
+                        this.testType = [];
+                        for (var i = 0; i < res.data[1].length; i++) {
+                            this.testType.push(res.data[1][i].typeid);
+                        }
+                        console.log(this.testType);
+                        this.look = res.data[0][0].look
+                        this.$forceUpdate()
+                        if (type != 2) {
+                            this.loading = false
+                        }
+                    })
+                    .catch((err) => {
+                        console.error(err);
+                    });
+            }
+        },
+        save(look) {
+            this.updateWork(look == 4 ? look : this.look)
+        },
+        publish() {
+            this.updateWork(3)
+        },
+        //获取分类类名
+        getTypeInfo() {
+            this.loading = true
+            let params = {
+                oid: this.oid
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectPerInfoAllTea", params)
+                .then((res) => {
+                    this.typeInfo = res.data[0];
+                    let typeInfo = res.data[1];
+                    this.typeInfo.forEach((e) => {
+                        e.child = [];
+                        e.value = '';
+                        typeInfo.forEach((i) => {
+                            if (e.id == i.parentid) {
+                                e.child.push({ id: i.id, name: i.name })
+                            }
+                        })
+                    })
+                    this.loading = false
+                    console.log(this.typeInfo, "typeInfo");
+                    this.getData();
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        arrayToArray(arrayo, arrayt) {
+            let array1 = arrayo;
+            let array2 = arrayt;
+
+            let commonElements = [];
+
+            for (let i = 0; i < array1.length; i++) {
+                for (let j = 0; j < array2.length; j++) {
+                if (array1[i] === array2[j]) {
+                    commonElements.push(array1[i]);
+                }
+                }
+            }
+            return commonElements;
+        },
+    },
+    mounted() {
+        this.getTypeInfo();
+    },
+}
+</script>
+
+<style scoped>
+.pb_content {
+    height: 100% !important;
+    /* margin: 0 20px 0 20px; */
+}
+
+.pb_content_body {
+    width: 100% !important;
+    height: 100%;
+}
+
+.right {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    overflow: hidden;
+    flex-direction: column;
+}
+
+.basic_box {
+    margin: 0 auto;
+    position: relative;
+    padding: 0 20px 0 20px;
+}
+
+.courseTop {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    width: calc(100% - 40px);
+    margin: 0 auto;
+    padding: 10px 0;
+}
+
+.stepsNav {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+}
+
+.step_box {
+    width: calc(100% - 40px);
+    margin: 0 auto;
+    height: calc(100% - 38px);
+}
+</style>

+ 219 - 0
src/components/pages/test/add/components/GapFilling/gap.vue

@@ -0,0 +1,219 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-show="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="set_box" v-if="!cJson">填写者回答区</div>
+
+    <div v-else class="choice_box">
+      <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
+      <div class="title">
+        <div style="display: flex;">
+          <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+            `(${option[cJson.type].name})`
+          }}</span> -->
+          <span v-if="!updateList.title" @click.stop="updateTitle()">{{
+            cJson.title ? cJson.title : "输入问题"
+          }}</span>
+					<!-- <span v-if="!cJson.title && !updateList.title" class="t_empty" @click.stop="updateTitle()">请填写标题</span> -->
+          <input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+          <span style="min-width: fit-content;color: #efa030;">{{
+            cJson.score ? "(分值:" + cJson.score + "分)" : ""
+          }}</span>
+        </div>
+
+        <span
+          style="color: #efa030;display: flex;margin-top: 5px;line-height: 18px;"
+        >
+          <!-- <span
+            style="min-width: fit-content;"
+            @click.stop="updateAnswer()"
+            v-if="!cJson.answer && !updateList.answer"
+            >暂无参考答案</span
+          >
+          <span style="min-width: fit-content;display: flex;" v-else>
+            <span style="min-width: fit-content;" @click.stop="updateAnswer()"
+              >参考答案:</span
+            >
+            <span v-if="!updateList.answer" @click.stop="updateAnswer()">{{
+              cJson.answer
+            }}</span>
+          </span> -->
+
+          <input
+            v-if="updateList.answer"
+            ref="answerRef"
+            class="editInput answerInput"
+            v-model="checkJson.answer"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="请填写参考答案"
+          />
+        </span>
+        <!-- </div><div v-html="cJson.title"></div> -->
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			  <input
+          v-if="updateList.detail"
+          ref="detailRef"
+          class="editInput"
+          v-model="checkJson.detail"
+          @blur="save"
+          style="margin-top: 10px;color: rgb(136, 139, 146);"
+          @keyup.enter="save"
+          placeholder="请填写描述说明"
+        />
+      <div class="choices">
+        <textarea
+          readonly
+          rows="2"
+          class="binfo_input binfo_textarea"
+          cols
+          placeholder="填写者回答区"
+        ></textarea>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+    cJson2: {
+      type: Object
+    },
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "问答题" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      updateList: {
+        title: false,
+        detail:false,
+        brief: false,
+        answer: false
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        // console.log("测试测试保存",newVal)
+        this.$emit("setJson", newVal, this.index);
+        console.log("gapW", this.cJson);
+      },
+      deep: true
+    },
+    isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    numberPan() {
+      if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+        this.$message.error("请输入大于0的数字");
+        this.checkJson.score = "";
+      }
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateDetail(){
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["detailRef"].focus();
+      });
+    },
+    updateAnswer() {
+      this.updateList.answer = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["answerRef"].focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    }
+  },
+  mounted() {
+
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #cad1dc;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #cad1dc;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: "Microsoft YaHei";
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681fc !important;
+}
+</style>

+ 209 - 0
src/components/pages/test/add/components/GapFilling/index.vue

@@ -0,0 +1,209 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置问答题</div> -->
+        <div class="box">
+            <div class="set_type" style="margin-top: 0;">
+                <span>题目类型:</span>
+                <el-select v-model="checkJson.type" @change="changeAnswer">
+                    <el-option v-for="item in options" :key="item.type" :label="item.name" :value="item.type">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="set_type">
+                <span>题目分数:</span><el-input v-model="checkJson.score" class="input" placeholder="请输入分数" style="width: 120px"  @change="numberPan"></el-input>
+            </div>
+            <div class="set_title">
+                <span>表单问题:</span>
+                <!-- <el-input v-model="checkJson.title" class="input" placeholder="请输入标题"></el-input> -->
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+                <!-- <editor-bar v-model="checkJson.title" @change="change"></editor-bar> -->
+            </div>
+            <div class="set_title">
+                <span>设置答案:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.answer"
+                    placeholder="请输入答案"></textarea>
+            </div>
+            <!-- <div class="set_options">
+                <div class="title">问答题答案:</div>
+                <div class="xuan_body">
+                    <el-input v-model="checkJson.answer" class="input" placeholder="请输入答案"></el-input>
+                </div>
+            </div> -->
+        </div>
+    </div>
+</template>
+
+<script>
+import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        EditorBar,
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '问答题' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {}
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+                console.log('gapW', this.cJson);
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                type: 1,
+                answer: ""
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+        console.log('gap', this.cJson);
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+</style>

+ 203 - 0
src/components/pages/test/add/components/addCheckPopover.vue

@@ -0,0 +1,203 @@
+<template>
+  <div>
+    <el-popover
+      placement="bottom-start"
+      width="400"
+      trigger="click"
+      v-model="show"
+    >
+      <div class="addBox">
+        <div class="ab_base">
+          <div class="ab_title">基础题型</div>
+          <div class="ab_list">
+            <div
+              class="ab_l_item"
+              v-for="(item, index) in options"
+              :key="`base_${index}`"
+            >
+              <button
+                class="pub_test_btn"
+                @click="addCheckBase(item, index)"
+                :class="{
+                  pub_test_btn_text: item.value == 3,
+                  pub_test_btn_choose: item.value == 1 || item.value == 10,
+                  pub_test_btn_file: item.value == 5,
+                  pub_test_btn_course: item.value == 6,
+                  pub_test_btn_eva: item.value == 7,
+                  pub_test_btn_time: item.value == 8,
+                  pub_test_btn_choose2: item.value == 9,
+									pub_test_btn_sweep: item.value == 12,
+                  pub_test_btn_number:item.value == 13
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+
+        <div class="ab_module">
+          <div class="ab_title">平台组件</div>
+          <div class="ab_list">
+            <div
+              class="ab_l_item"
+              v-for="(item, index) in optionsPin"
+              :key="`module_${index}`"
+            >
+              <button
+                class="pub_test_btn"
+                @click="addCheckModule(item, index)"
+                :class="{
+                  pub_test_btn_course: item.value == 6 || item.value == 11
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+
+        <div class="ab_addModule">
+          <div class="ab_title">添加组件</div>
+          <div class="ab_list">
+            <div
+              class="ab_l_item"
+              v-for="(item, index) in buttonOptions"
+              :key="`addModule_${index}`"
+            >
+              <button
+                class="pub_test_btn"
+                @click="addCheckAddModule(item, index)"
+                :class="{
+                  pub_test_btn_group: item.type == 1,
+                  pub_test_btn_page: item.type == 2
+                }"
+              >
+                {{ item.name }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="addBtn" slot="reference">
+        <svg
+          width="16"
+          height="16"
+          viewBox="0 0 16 16"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            d="M7.11133 2.66675H8.88911V13.3334H7.11133V2.66675Z"
+            fill="black"
+            fill-opacity="0.6"
+          />
+          <path
+            d="M13.3332 7.11108V8.88886H2.6665V7.11108H13.3332Z"
+            fill="black"
+            fill-opacity="0.6"
+          />
+        </svg>
+        插入题目
+      </div>
+      <!-- <el-button type="primary" size="small" slot="reference"
+        >添加题目</el-button
+      > -->
+    </el-popover>
+  </div>
+</template>
+
+<script>
+import minxinVue from "../minxins/minxin";
+export default {
+  mixins: [minxinVue],
+  data() {
+    return {
+      show: false
+    };
+  },
+  methods: {
+    addCheckBase(item, index) {
+      this.$emit("addCheck", item.value);
+      this.show = false;
+    },
+    addCheckModule(item, index) {
+      this.$emit("addCheck", item.value);
+      this.show = false;
+    },
+    addCheckAddModule(item, index) {
+      this.$emit("addQtype", item.type);
+      this.show = false;
+    }
+  }
+};
+</script>
+
+<style scoped>
+.addBox {
+  width: 400px;
+  height: auto;
+  box-sizing: border-box;
+  padding: 20px;
+}
+
+.addBox > div {
+  width: 100%;
+  height: auto;
+  margin-bottom: 20px;
+}
+
+.ab_title {
+  width: 100%;
+  margin-bottom: 5px;
+  position: relative;
+  margin-left: 10px;
+  font-size: 18px;
+  font-weight: bold;
+  /* margin */
+}
+
+.ab_title::before {
+  content: "";
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  background-color: #3681fc;
+  position: absolute;
+  left: -15px;
+  top: 50%;
+  transform: translateY(-50%);
+}
+
+.ab_list {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.ab_l_item {
+  margin-bottom: 10px;
+}
+
+.addBtn{
+	width: 95px;
+	padding: 12px 0px;
+	display: flex;
+	align-items: center;
+	background-color: #F0F2F5;
+	border-radius: 5px;
+	color: #00000099;
+	font-size: 14px;
+	cursor: pointer;
+	transition: all 0.2s;
+	font-weight: bold;
+	justify-content: center;
+}
+
+.addBtn:hover{
+	background-color: #e0e0e0;
+}
+
+.addBtn>svg{
+	margin-right: 5px;
+}
+</style>

+ 1011 - 0
src/components/pages/test/add/components/checkOrder.vue

@@ -0,0 +1,1011 @@
+<template>
+    <div class="co_box">
+        <div v-for="(item1, index1) in this.checkJson" :key="index1" class="mc_ti_1" :draggable="isdrag == `${index1}`"
+            :class="{
+								active: checkC === `x${index1}`,
+								showCheckBox: checkC === `x${index1}` && etype==='edit',
+                dragOverTop: newIndex === index1 && typeIndex == 'drag-' + index1 && (oldIndex > index1 && (!(newIndex2 || newIndex2 === 0) || !(newIndex3 || newIndex3 === 0))),
+                dragOverBottom: newIndex === index1 && typeIndex == 'drag-' + index1 && (oldIndex < index1 || !(!(newIndex2 || newIndex2 === 0) || !(newIndex3 || newIndex3 === 0))),
+            }" @click.stop="checkTitle(`${index1}`, 1, item1)" @dragstart="dragStart(item1, index1, `${index1}`)"
+            @dragover.prevent="dragOver(index1)" @dragend="dragEnd()">
+            <div class="title" :style="{ fontSize: etype == 'order' && '16px' }"  :ref="`x${index1}`">
+                <div class="drag" @mousedown="setDrag(`${index1}`)" @mouseup="isdrag = ''"></div>
+                <span class="content" v-html="selectType(item1, index1)" v-if="etype == 'edit' || item1.ttype != 1"></span>
+                <el-tooltip :content="selectType2(item1, index1)" placement="top" effect="dark" v-else>
+                    <span class="content" v-html="selectType(item1, index1)"></span>
+                </el-tooltip>
+
+                <!-- {{ selectType(item1, index1) }} -->
+                <div class="btnBox">
+                    <!-- <div class="edit" @click.stop="editCheck(`${index1}`,item1)" v-if="item1.ttype == 1 && canEdit.indexOf(item1.type) !== -1 && etype == 'edit'"></div> -->
+                    <div class="edit" @click.stop="editGroupName(`${index1}`)" v-if="item1.ttype == 2 && etype == 'edit'"></div>
+                    <div :class="{ deleteX: etype != 'edit', delete: etype == 'edit' }"
+                        @click.stop="deleteCheck(`${index1}`)">
+                    </div>
+                    <div class="open" v-if="item1.array && item1.array.length" :class="{ isopen: item1.isopen }"
+                        @click.stop="openPan(index1)"></div>
+                </div>
+            </div>
+            <div v-if="item1.array && item1.array.length && item1.isopen" class="mc_ti_1_xia">
+                <div v-for="(item2, index2) in item1.array" :key="`${index1}-${index2}`" class="mc_ti_2"
+                    :draggable="isdrag == `${index1}-${index2}`" :class="{
+                        active: checkC === `x${index1}-${index2}`,
+												showCheckBox: checkC === `x${index1}-${index2}` && etype==='edit',
+                        dragOverTop: newIndex === index1 && newIndex2 === index2 && typeIndex == 'drag2-' + index1 + '-' + index2 && (oldIndex2 > index2  && ( !(newIndex3 || newIndex3 === 0))),
+                        dragOverBottom: newIndex === index1 && newIndex2 === index2 && typeIndex == 'drag2-' + index1 + '-' + index2 && (oldIndex2 < index2 || !( !(newIndex3 || newIndex3 === 0))),
+                    }" @click.stop="checkTitle(`${index1}-${index2}`, 2, item2)"
+                    @dragstart="dragStart2(item2, index1, index2, `${index1}-${index2}`)"
+                    @dragover.prevent="dragOver2(index1, index2)" @dragend="dragEnd2()">
+                    <div class="title" :style="{ fontSize: etype == 'order' && '16px' }" :ref="`x${index1}-${index2}`">
+                        <div class="drag" @mousedown="setDrag(`${index1}-${index2}`)" @mouseup="isdrag = ''"></div>
+                        <span class="content" v-html="selectType(item2, index2)"
+                            v-if="etype == 'edit' || item2.ttype != 1"></span>
+                        <el-tooltip :content="selectType2(item2, index2)" placement="top" effect="dark" v-else>
+                            <span class="content" v-html="selectType(item2, index2)"></span>
+                        </el-tooltip>
+                        <div class="btnBox">
+                            <!-- <div class="edit" @click.stop="editCheck(`${index1}-${index2}`,item2)" v-if="item2.ttype == 1 && canEdit.indexOf(item2.type) !== -1 && etype == 'edit'"></div> -->
+                            <div class="edit" @click.stop="editGroupName(`${index1}-${index2}`)" v-if="item2.ttype == 2 && etype == 'edit'"></div>
+                            <div :class="{ deleteX: etype != 'edit', delete: etype == 'edit' }"
+                                @click.stop="deleteCheck(`${index1}-${index2}`)"></div>
+                            <div class="open" v-if="item2.array && item2.array.length" :class="{ isopen: item2.isopen }"
+                                @click.stop="openPan(index1, index2)"></div>
+                        </div>
+                    </div>
+                    <div v-if="item2.array && item2.array.length && item2.isopen" class="mc_ti_2_xia">
+                        <div v-for="(item3, index3) in item2.array" :key="`${index1}-${index2}-${index3}`" class="mc_ti_3"
+                            :draggable="isdrag == `${index1}-${index2}-${index3}`" :class="{
+                                active: checkC === `x${index1}-${index2}-${index3}`,
+                                showCheckBox: checkC === `x${index1}-${index2}-${index3}` && etype==='edit',
+                                dragOverTop: newIndex === index1 && newIndex2 === index2 && newIndex3 === index3 && typeIndex == 'drag3-' + index1 + '-' + index2 + '-' + index3 && oldIndex3 > index3,
+                                dragOverBottom: newIndex === index1 && newIndex2 === index2 && newIndex3 === index3 && typeIndex == 'drag3-' + index1 + '-' + index2 + '-' + index3 && oldIndex3 < index3,
+                            }" @click.stop="checkTitle(`${index1}-${index2}-${index3}`, 3, item3)"
+                            @dragstart="dragStart3(item3, index1, index2, index3, `${index1}-${index2}-${index3}`)"
+                            @dragover.prevent="dragOver3(index1, index2, index3)" @dragend="dragEnd3()">
+                            <div class="title" :style="{ fontSize: etype == 'order' && '16px' }" :ref="`x${index1}-${index2}-${index3}`">
+                                <div class="drag" @mousedown="setDrag(`${index1}-${index2}-${index3}`)"
+                                    @mouseup="isdrag = ''"></div>
+                                <span class="content" v-html="selectType(item3, index3)"
+                                    v-if="etype == 'edit' || item3.ttype != 1"></span>
+                                <el-tooltip :content="selectType2(item3, index3)" placement="top" effect="dark" v-else>
+                                    <span class="content" v-html="selectType(item3, index3)"></span>
+                                </el-tooltip>
+                                <div class="btnBox">
+                                    <!-- <div class="edit" @click.stop="editCheck(`${index1}-${index2}-${index3}`,item3)" v-if="item3.ttype == 1 && canEdit.indexOf(item3.type) !== -1 && etype == 'edit'"></div> -->
+                                    <div :class="{ deleteX: etype != 'edit', delete: etype == 'edit' }"
+                                        @click.stop="deleteCheck(`${index1}-${index2}-${index3}`)"></div>
+                                </div>
+                            </div>
+                            <div v-if="item3.ttype == 1 && canEdit.indexOf(item3.type) !== -1 && etype == 'edit'"
+                                class="edit_box">
+                                <div v-if="item3.type == 1">
+                                    <choiceX :cJson="item3.json" :cJson2="cJson" @setJson="setJson"  :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 1 && checkC === `x${index1}-${index2}-${index3}`"></choiceX>
+                                    <!-- <choiceDialog v-if="item3.type == 1 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </choiceDialog> -->
+                                </div>
+                                <div v-if="item3.type == 3">
+                                    <gapX :cJson="item3.json" :cJson2="cJson" @setJson="setJson"  :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 3 && checkC === `x${index1}-${index2}-${index3}`"></gapX>
+                                    <!-- <gapDialog v-if="item3.type == 3 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </gapDialog> -->
+                                </div>
+                                <div v-if="item3.type == 5">
+                                    <fileX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 5 && checkC === `x${index1}-${index2}-${index3}`"></fileX>
+                                    <!-- <fileDialog v-if="item3.type == 5 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </fileDialog> -->
+                                </div>
+                                <div v-if="item3.type == 6">
+                                    <courseX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"></courseX>
+                                    <!-- <courseDialog v-if="item3.type == 6 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </courseDialog> -->
+                                </div>
+                                <div v-if="item3.type == 7">
+                                    <evaX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"></evaX>
+                                    <!-- <evaDialog v-if="item3.type == 7 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </evaDialog> -->
+                                </div>
+                                <div v-if="item3.type == 8">
+                                    <timeX :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 8 && checkC === `x${index1}-${index2}-${index3}`"></timeX>
+                                    <!-- <timeDialog v-if="item3.type == 8 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </timeDialog> -->
+                                </div>
+                                <div v-if="item3.type == 11">
+                                    <courseX2 :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 11 && checkC === `x${index1}-${index2}-${index3}`"></courseX2>
+                                    <!-- <courseDialog2 v-if="item3.type == 11 && checkC === `x${index1}-${index2}-${index3}`"
+                                        :cJson="cJson" @setJson="setJson">
+                                    </courseDialog2>-->
+                                </div>
+																<div v-if="item3.type == 12">
+																	<sweep :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 12 && checkC === `x${index1}-${index2}-${index3}`"/>
+																</div>
+                                <div v-if="item3.type == 13">
+																	<number :cJson="item3.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}-${index3}`" :isOpen="item3.type == 13 && checkC === `x${index1}-${index2}-${index3}`"/>
+																</div>
+                            </div>
+														<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}-${index3}` && etype==='edit'" @click.stop="">
+															<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
+														</div>
+                        </div>
+                    </div>
+                    <div v-else-if="item2.ttype == 1 && canEdit.indexOf(item2.type) !== -1 && etype == 'edit'"
+                        class="edit_box">
+                        <div v-if="item2.type == 1">
+                            <choiceX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 1 && checkC === `x${index1}-${index2}`"></choiceX>
+                            <!-- <choiceDialog v-if="item2.type == 1 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></choiceDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 3">
+                            <gapX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 3 && checkC === `x${index1}-${index2}`"></gapX>
+                            <!-- <gapDialog v-if="item2.type == 3 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></gapDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 5">
+                            <fileX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 5 && checkC === `x${index1}-${index2}`"></fileX>
+                            <!-- <fileDialog v-if="item2.type == 5 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></fileDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 6">
+                            <courseX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 6 && checkC === `x${index1}-${index2}`"></courseX>
+                            <!-- <courseDialog v-if="item2.type == 6 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></courseDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 7">
+                            <evaX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 7 && checkC === `x${index1}-${index2}`"></evaX>
+                            <!-- <evaDialog v-if="item2.type == 7 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></evaDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 8">
+                            <timeX :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 8 && checkC === `x${index1}-${index2}`"></timeX>
+                            <!-- <timeDialog v-if="item2.type == 8 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></timeDialog> -->
+                        </div>
+                        <div v-else-if="item2.type == 11">
+                            <courseX2 :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 11 && checkC === `x${index1}-${index2}`"></courseX2>
+                            <!-- <courseDialog2 v-if="item2.type == 11 && checkC === `x${index1}-${index2}`" :cJson="cJson"
+                                @setJson="setJson"></courseDialog2> -->
+                        </div>
+												<div v-else-if="item2.type == 12">
+													<sweep :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 12 && checkC === `x${index1}-${index2}`"/>
+												</div>
+                        <div v-else-if="item2.type == 13">
+													<number :cJson="item2.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}-${index2}`" :isOpen="item2.type == 13 && checkC === `x${index1}-${index2}`"/>
+												</div>
+                    </div>
+										<div class="addCheckBox" v-if="checkC === `x${index1}-${index2}` && etype==='edit'" @click.stop="">
+											<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
+										</div>
+                </div>
+            </div>
+            <div v-else-if="item1.ttype == 1 && canEdit.indexOf(item1.type) !== -1 && etype == 'edit'" class="edit_box">
+                <div v-if="item1.type == 1">
+                    <choiceX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 1 && checkC === `x${index1}`"></choiceX>
+
+                    <!-- <choiceDialog v-if="item1.type == 1 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </choiceDialog> -->
+                </div>
+                <div v-else-if="item1.type == 3">
+                    <gapX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 3 && checkC === `x${index1}`"></gapX>
+                    <!-- <gapDialog v-if="item1.type == 3 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </gapDialog> -->
+                </div>
+                <div v-else-if="item1.type == 5">
+                    <fileX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 5 && checkC === `x${index1}`"></fileX>
+                    <!-- <fileDialog v-if="item1.type == 5 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </fileDialog> -->
+                </div>
+                <div v-else-if="item1.type == 6">
+                    <courseX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 6 && checkC === `x${index1}`"></courseX>
+                    <!-- <courseDialog v-if="item1.type == 6 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </courseDialog> -->
+                </div>
+                <div v-else-if="item1.type == 7">
+                    <evaX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 7 && checkC === `x${index1}`"></evaX>
+                    <!-- <evaDialog v-if="item1.type == 7 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </evaDialog> -->
+                </div>
+                <div v-else-if="item1.type == 8">
+                    <timeX :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 8 && checkC === `x${index1}`"></timeX>
+                    <!-- <timeDialog v-if="item1.type == 8 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </timeDialog> -->
+                </div>
+                <div v-else-if="item1.type == 11">
+                    <courseX2 :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 11 && checkC === `x${index1}`"></courseX2>
+                    <!-- <courseDialog2 v-if="item1.type == 11 && checkC === `x${index1}`" :cJson="cJson" @setJson="setJson">
+                    </courseDialog2> -->
+                </div>
+								<div v-else-if="item1.type == 12">
+									<sweep :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 12 && checkC === `x${index1}`"/>
+								</div>
+                <div v-else-if="item1.type == 13">
+									<number :cJson="item1.json" :cJson2="cJson" @setJson="setJson" :index="`x${index1}`" :isOpen="item1.type == 13 && checkC === `x${index1}`"/>
+								</div>
+            </div>
+						<div class="addCheckBox" v-if="checkC === `x${index1}` && etype==='edit'" @click.stop="">
+							<addCheckPopover @addCheck="addCheck" @addQtype="addQtype"/>
+						</div>
+					</div>
+        <el-dialog title="修改名称" :visible.sync="groupDaliog" :append-to-body="true" width="500px"
+            :before-close="handleClose" class="dialog_diy">
+            <div style="
+                width: 100%;
+                display: flex;
+                flex-direction: row;
+                flex-wrap: nowrap;
+                align-items: center;
+                justify-content: center;
+                ">
+                <div style="min-width: fit-content;">分组名称:</div>
+                <el-input v-model="groupName" placeholder="请输入要修改的名称"></el-input>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="groupDaliog = false">取 消</el-button>
+                <el-button type="primary" @click="updateGroupName">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import minxinVue from '../minxins/minxin';
+import choiceDialog from './choice/index.vue'
+import choiceX from './choice/choice.vue'
+import gapDialog from './GapFilling/index.vue'
+import gapX from './GapFilling/gap.vue'
+import fileDialog from './file/index.vue'
+import fileX from './file/file.vue'
+import courseDialog from './course/index.vue'
+import courseX from './course/course.vue'
+import evaDialog from './evaBox/index.vue'
+import evaX from './evaBox/eva.vue'
+import timeDialog from './timeBox/index.vue'
+import timeX from './timeBox/time.vue'
+import courseDialog2 from './course2/index.vue'
+import courseX2 from './course2/course.vue'
+import addCheckPopover from './addCheckPopover.vue'
+import sweep from './sweep/index'
+import number from './number/index.vue'
+export default {
+    mixins: [minxinVue],
+    components: {
+        choiceDialog,
+        choiceX,
+        gapDialog,
+        gapX,
+        fileDialog,
+        fileX,
+        courseDialog,
+        courseX,
+        evaDialog,
+        evaX,
+        timeDialog,
+        timeX,
+        courseDialog2,
+        courseX2,
+				addCheckPopover,
+				sweep,
+        number
+    },
+    props: {
+        checkJson: {
+            type: Array,
+        },
+        checkC: {
+            type: String
+        },
+        etype: {
+            type: String,
+            default: ""
+        },
+        cJson: {
+            type: Object,
+        }
+    },
+    data() {
+        return {
+            manualJson: [],
+            isdrag: "",
+            canEdit: [1, 3, 5, 6, 7, 8, 11,12,13],
+            ctype: "",
+            dragType: "",
+            oldIndex: "",
+            newIndex: "",
+            oldIndex2: "",
+            newIndex2: "",
+            oldIndex3: "",
+            newIndex3: "",
+            oldData: "",
+            groupDaliog: false,
+            groupName: '',
+            groupIndex: ''
+            // cJson: {}
+        }
+    },
+    computed: {
+        selectType() {
+            return function (item, index) {
+                if (item.ttype == 1) {
+                    let className = "test_icon"
+                    if (item.type == 1 && (item.json && item.json.type == 2 || !item.json)) {
+                        className += " test_icon_check"
+                    } else if (item.type == 1 && item.json && item.json.type == 1) {
+                        className += " test_icon_checkO"
+                    } else if (item.type == 3) {
+                        className += " test_icon_gap"
+                    } else if (item.type == 5) {
+                        className += " test_icon_file"
+                    } else if (item.type == 6 || item.type == 11) {
+                        className += " test_course_file"
+                    } else if (item.type == 7) {
+                        className += " test_eva_file"
+                    } else if (item.type == 8) {
+                        className += " test_icon_time"
+                    }else if (item.type == 12){
+												className += " test_icon_sweep"
+										}else if(item.type==13){
+                        className += ' test_icon_number'
+                    }
+										let itemType = item.type;
+										if(itemType===1){
+											if(item.json.type===1){
+												itemType = 9;
+											}else if(item.json.type==2){
+												itemType = 10;
+											}
+										}
+                    return `${this.etype=='edit'?'<span class="test_index">'+(index+1)+'</span>':index+1+'、'}` + "" + (item.json && this.etype != 'edit' ? `<span class='${className}'></span>` : `<span class='${className}'></span>` + this.options2[itemType]) + (item.json && this.etype != 'edit' ? `${item.json.title}` : "");
+                } else if (item.ttype == 2) {
+                    return `${item.name ? item.name : `第${index + 1}组`}(共${item.array.length}题)`;
+                } else if (item.ttype == 3) {
+                    return `分页${index + 1}`;
+                }
+            };
+        },
+        selectType2() {
+            return function (item, index) {
+                if (item.ttype == 1) {
+                    return (item.json && this.etype != 'edit' ? '' : this.options2[item.type]) + (item.json && this.etype != 'edit' ? `${item.json.title}` : "");
+                } else if (item.ttype == 2) {
+                    return `${item.name ? item.name : `第${index + 1}组`} (共${item.array.length}题)`;
+                } else if (item.ttype == 3) {
+                    return `分页${index + 1}`;
+                }
+            };
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.manualJson = this.depthCopy(newVal)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        handleClose(done) {
+            done();
+        },
+        setDrag(index) {
+            console.log(index);
+            this.isdrag = index
+        },
+        openPan(index1, index2) {
+            console.log(this.manualJson);
+            if (index2 === 0 || index2) {
+                this.manualJson[index1].array[index2].isopen = !this.manualJson[index1].array[index2].isopen
+            } else {
+                this.manualJson[index1].isopen = !this.manualJson[index1].isopen
+            }
+            this.$forceUpdate();
+            this.$emit("changeJson", this.manualJson);
+        },
+        checkTitle(index, type, item) {
+            let _index = index.split("-");
+            let cJson = {}
+            if (type == 1 && item.ttype == 1) {
+                cJson = this.manualJson[_index[0]].json ? JSON.parse(JSON.stringify(this.manualJson[_index[0]].json)) : '';
+            } else if (type == 2 && item.ttype == 1) {
+                cJson = this.manualJson[_index[0]].array[_index[1]].json ? JSON.parse(JSON.stringify(this.manualJson[_index[0]].array[_index[1]].json)) : '';
+            } else if (type == 3 && item.ttype == 1) {
+                cJson = this.manualJson[_index[0]].array[_index[1]].array[_index[2]].json ? JSON.parse(JSON.stringify(this.manualJson[_index[0]].array[_index[1]].array[_index[2]].json)) : '';
+            }
+            // this.cJson = {type: type, index: _index, item: item}
+            // this.cJson = item.json;
+            this.$forceUpdate();
+            this.ctype = type
+            if (this.checkC === "x" + index) {
+                this.$emit("update:checkC", "")
+            } else {
+                this.$emit("update:checkC", 'x' + index)
+								if(this.etype==='order'){
+									this.$emit("scrollPage",'x' + index)
+								}
+							}
+            this.$forceUpdate();
+            // console.log(this.cJson);
+            this.$emit("update:cJson", cJson)
+        },
+        setJson(json,index) {
+						let checkC = ""
+						if(index){
+							checkC = index
+						}else{
+							checkC = this.checkC
+						}
+						if(!checkC)return;
+            let _index = checkC.replace("x", "").split("-");
+            this.$emit("update:cJson", json)
+            if (this.ctype == 1) {
+                this.manualJson[_index[0]].json = json
+            } else if (this.ctype == 2) {
+                this.manualJson[_index[0]].array[_index[1]].json = json
+            } else if (this.ctype == 3) {
+                this.manualJson[_index[0]].array[_index[1]].array[_index[2]].json = json
+            }
+            this.$forceUpdate();
+            this.$emit("changeJson", this.manualJson);
+        },
+        deleteCheck(index) {
+            let _check = index.split("-")
+            let string = ""
+            if (_check.length == 1) {
+                if (this.manualJson[_check[0]].ttype == 1) {
+                    string = "确定删除该题目吗?"
+                } else if (this.manualJson[_check[0]].ttype == 2) {
+                    string = "删除该分组将会同步删除该分组下所有内容,是否继续操作?"
+                } else if (this.manualJson[_check[0]].ttype == 3) {
+                    string = "删除该分页将会同步删除该分页下所有内容,是否继续操作?"
+                }
+            } else if (_check.length == 2) {
+                if (this.manualJson[_check[0]].array[_check[1]].ttype == 1) {
+                    string = "确定删除该题目吗?"
+                } else if (this.manualJson[_check[0]].array[_check[1]].ttype == 2) {
+                    string = "删除该分组将会同步删除该分组下所有内容,是否继续操作?"
+                }
+            } else if (_check.length == 3) {
+                string = "确定删除该题目吗?"
+            }
+            this.$confirm(string, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            })
+                .then(() => {
+                    if (_check.length == 1) {
+                        this.manualJson.splice(_check[0], 1)
+                    } else if (_check.length == 2) {
+                        this.manualJson[_check[0]].array.splice(_check[1], 1)
+                    } else if (_check.length == 3) {
+                        this.manualJson[_check[0]].array[_check[1]].array.splice(_check[2], 1)
+                    }
+                    this.$emit("update:checkC", "")
+                    this.$emit("changeJson", this.manualJson);
+                    this.$forceUpdate()
+                })
+                .catch(() => { });
+        },
+        editGroupName(index){
+            let _check = index.split("-")
+            let name  = ''
+            if (_check.length == 1) {
+                name = this.manualJson[_check[0]].name ? this.manualJson[_check[0]].name : ''
+            } else if (_check.length == 2) {
+                name = this.manualJson[_check[0]].array[_check[1]].name ? this.manualJson[_check[0]].array[_check[1]].name : ''
+            }
+            this.groupName = name
+            this.groupDaliog = true
+            this.groupIndex = index
+        },
+        updateGroupName(){
+            let _check = this.groupIndex.split("-")
+            let name  = this.groupName
+            if(!name){
+                this.$message.error("请输入分组名称");
+                return;
+            }
+            if (_check.length == 1) {
+                this.manualJson[_check[0]].name = name
+            } else if (_check.length == 2) {
+                this.manualJson[_check[0]].array[_check[1]].name = name
+            }
+            this.$forceUpdate();
+            this.$emit("changeJson", this.manualJson);
+            this.groupDaliog = false
+        },
+        editCheck(index, item) {
+
+        },
+        setJsonCheck(newItems){
+            let _index = this.checkC.replace("x", "").split("-");
+            let cJson = {}
+            if (this.ctype == 1) {
+                cJson = newItems[_index[0]].json ? JSON.parse(JSON.stringify(newItems[_index[0]].json)) : '';
+            } else if (this.ctype == 2) {
+                cJson = newItems[_index[0]].array[_index[1]].json ? JSON.parse(JSON.stringify(newItems[_index[0]].array[_index[1]].json)) : '';
+            } else if (this.ctype == 3) {
+                cJson = newItems[_index[0]].array[_index[1]].array[_index[2]].json ? JSON.parse(JSON.stringify(newItems[_index[0]].array[_index[1]].array[_index[2]].json)) : '';
+            }
+            this.$emit("update:cJson", cJson)
+            this.$forceUpdate()
+        },
+        dragStart(val, i, index) {
+            if (this.isdrag != index) {
+                return
+            }
+            this.dragType = 'drag'
+            this.oldIndex = i;
+            this.oldData = val;
+        },
+        dragOver(i) {
+            // if(this.dragType != 'drag'){
+            //     return
+            // }
+            this.typeIndex = "drag-" + i
+            this.newIndex = i;
+        },
+        dragEnd() {
+            if (this.dragType != 'drag') {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            if (this.oldIndex == this.newIndex) {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            let newItems = [...this.manualJson];
+            // 删除老的节点
+            newItems.splice(this.oldIndex, 1);
+            // 在列表中目标位置增加新的节点
+            newItems.splice(this.newIndex, 0, this.oldData);
+            console.log('................',...newItems);
+            /* 修改选中的并且切换的题目 */
+            this.setJsonCheck(newItems)
+
+            this.$emit("changeJson", [...newItems]);
+
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.dragType = "";
+            this.isdrag = "";
+            this.$forceUpdate()
+        },
+        dragStart2(val, i, j, index) {
+            if (this.isdrag != index) {
+                return
+            }
+            this.dragType = 'drag2'
+            this.oldIndex = i;
+            this.oldIndex2 = j;
+            this.oldData = val;
+        },
+        dragOver2(i, j) {
+            // if(this.dragType != 'drag2'){
+            //     return
+            // }
+            this.typeIndex = "drag2-" + i + '-' + j
+            this.newIndex = i;
+            this.newIndex2 = j;
+            // console.log(i, j);
+        },
+        dragEnd2() {
+            if (this.dragType != 'drag2') {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.newIndex2 = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            if (this.oldIndex == this.newIndex && this.oldIndex2 == this.newIndex2) {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.newIndex2 = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            let newItems = [...this.manualJson];
+            // 删除老的节点
+            newItems[this.oldIndex].array.splice(this.oldIndex2, 1);
+            // 在列表中目标位置增加新的节点
+            if ((this.newIndex3 || this.newIndex3 === 0) && newItems[this.newIndex].array[this.newIndex2] && newItems[this.newIndex].array[this.newIndex2].array && this.oldData.ttype == 1) {
+                newItems[this.newIndex].array[this.newIndex2].array.splice(this.newIndex3, 0, this.oldData);
+            } else if (newItems[this.newIndex].array[this.newIndex2] && newItems[this.newIndex].array[this.newIndex2].array && this.oldData.ttype == 1) {
+                newItems[this.newIndex].array[this.newIndex2].array.push(this.oldData)
+            } else if (newItems[this.newIndex].array && newItems[this.newIndex].array.length && newItems[this.newIndex].array[0].ttype == 1 && this.oldData.ttype == 2) {
+                this.oldData.array = [...this.oldData.array, ...newItems[this.newIndex].array]
+                newItems[this.newIndex].array[0] = this.oldData
+            } else {
+                newItems[this.newIndex].array.splice(this.newIndex2, 0, this.oldData);
+            }
+
+            /* 修改选中的并且切换的题目 */
+            this.setJsonCheck(newItems)
+
+
+            this.$emit("changeJson", [...newItems]);
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.newIndex2 = "";
+            this.dragType = "";
+            this.isdrag = "";
+            this.$forceUpdate()
+        },
+        dragStart3(val, i, j, k, index) {
+            if (this.isdrag != index) {
+                return
+            }
+            this.dragType = 'drag3'
+            this.oldIndex = i;
+            this.oldIndex2 = j;
+            this.oldIndex3 = k;
+            this.oldData = val;
+        },
+        dragOver3(i, j, k) {
+            // if(this.dragType != 'drag3'){
+            //     return
+            // }
+            this.typeIndex = "drag3-" + i + '-' + j + '-' + k
+            this.newIndex = i;
+            this.newIndex2 = j;
+            this.newIndex3 = k;
+            console.log(i, j, k);
+        },
+        dragEnd3() {
+            if (this.dragType != 'drag3') {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.newIndex2 = "";
+                this.newIndex3 = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            if (this.oldIndex == this.newIndex && this.oldIndex2 == this.newIndex2 && this.oldIndex3 == this.newIndex3) {
+                this.typeIndex = "";
+                this.newIndex = "";
+                this.newIndex2 = "";
+                this.newIndex3 = "";
+                this.dragType = "";
+                this.isdrag = "";
+                return;
+            }
+
+            let newItems = [...this.manualJson];
+            // 删除老的节点
+            newItems[this.oldIndex].array[this.oldIndex2].array.splice(this.oldIndex3, 1);
+            if (newItems[this.newIndex].array[this.newIndex2] && newItems[this.newIndex].array[this.newIndex2].array) {
+                // 在列表中目标位置增加新的节点
+                newItems[this.newIndex].array[this.newIndex2].array.splice(this.newIndex3, 0, this.oldData);
+            } else if (newItems[this.newIndex].array[0] && newItems[this.newIndex].array[0].ttype == 2 && this.oldData.ttype == 1) {
+                // 在列表中目标位置增加新的节点
+                newItems[this.newIndex].array[0].array.push(this.oldData)
+            } else {
+                newItems[this.newIndex].array.splice(this.newIndex2, 0, this.oldData);
+            }
+
+            /* 修改选中的并且切换的题目 */
+            this.setJsonCheck(newItems)
+
+
+            this.$emit("changeJson", [...newItems]);
+            this.typeIndex = "";
+            this.newIndex = "";
+            this.newIndex2 = "";
+            this.newIndex3 = "";
+            this.dragType = "";
+            this.isdrag = "";
+            this.$forceUpdate()
+        },
+				addCheck(value){
+					this.$emit('addCheck',value)
+				},
+				addQtype(type){
+					this.$emit('addQtype',type)
+				},
+				scrollPage(index){
+					let scrollEl = this.$parent.$refs['eContentRef']
+					let moveEl = this.$refs[index]
+					if(scrollEl && moveEl){
+						scrollEl.scrollTo({
+							top:moveEl[0].offsetTop - 100,
+							behavior:"smooth"
+						})
+					}
+				}
+    },
+    mounted() {
+        this.manualJson = this.depthCopy(this.checkJson);
+    },
+}
+</script>
+
+<style scoped>
+.co_box {
+    width: 100%;
+}
+
+.mc_ti_1 {
+    width: 100%;
+    min-height: 40px;
+    /* border: 1px solid #bcbcbc00; */
+    padding: 10px 0 0;
+    box-sizing: border-box;
+    margin-bottom: 10px;
+    overflow: hidden;
+}
+
+
+
+.mc_ti_1+.mc_ti_1 {
+    margin-top: 10px;
+}
+
+.mc_ti_1>.title {
+    font-size: 16px;
+    cursor: pointer;
+    display: flex;
+    align-items: center;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
+}
+
+.mc_ti_1_xia,
+.mc_ti_2_xia {
+    padding: 10px;
+    width: 100%;
+    box-sizing: border-box;
+}
+
+.mc_ti_2 {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10px 0 0;
+    /* border: 1px solid #bcbcbc00; */
+    overflow: hidden;
+}
+
+.mc_ti_2+.mc_ti_2 {
+    margin-top: 10px;
+}
+
+.mc_ti_2>.title {
+    cursor: pointer;
+    font-size: 16px;
+    display: flex;
+    align-items: center;
+    word-break: break-all;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
+}
+
+.mc_ti_3 {
+    padding: 10px 0 0;
+    width: 100%;
+    box-sizing: border-box;
+    /* border: 1px solid #bcbcbc00; */
+    overflow: hidden;
+}
+
+.mc_ti_3+.mc_ti_3 {
+    margin-top: 10px;
+}
+
+.mc_ti_3>.title {
+    cursor: pointer;
+    display: flex;
+    align-items: center;
+    width: calc(100% - 20px);
+    margin: 0 auto 10px;
+}
+
+.mc_ti_1>.title>.drag,
+.mc_ti_2>.title>.drag,
+.mc_ti_3>.title>.drag {
+    display: block;
+    background-image: url('../../../../../assets/icon/test/drag_icon.png');
+    background-size: 100% 100%;
+    min-width: 16px;
+    min-height: 16px;
+    margin-right: 10px;
+    cursor: pointer;
+}
+
+.mc_ti_1>.title>.btnBox,
+.mc_ti_2>.title>.btnBox,
+.mc_ti_3>.title>.btnBox {
+    margin-left: auto;
+    display: flex;
+    align-items: center;
+}
+
+.mc_ti_1>.title>.btnBox .open,
+.mc_ti_2>.title>.btnBox .open {
+    display: block;
+    background-image: url('../../../../../assets/icon/new/u_arrow.png');
+    background-size: 100% 100%;
+    width: 15px;
+    height: 15px;
+    cursor: pointer;
+    transition: all .5s;
+    transform: rotate(-90deg);
+}
+
+.mc_ti_1>.title>.btnBox .delete,
+.mc_ti_2>.title>.btnBox .delete,
+.mc_ti_3>.title>.btnBox .delete {
+    display: block;
+    background-image: url('../../../../../assets/icon/new/delete_u.png');
+    /* background-image: url('../../../../../assets/icon/test/delete_test_icon2.png'); */
+    background-size: 100% 100%;
+    width: 18px;
+    height: 18px;
+    cursor: pointer;
+    margin-right: 10px;
+}
+
+.mc_ti_1>.title>.btnBox .deleteX,
+.mc_ti_2>.title>.btnBox .deleteX,
+.mc_ti_3>.title>.btnBox .deleteX {
+    display: block;
+    /* background-image: url('../../../../../assets/icon/new/delete_u.png'); */
+    background-image: url('../../../../../assets/icon/test/delete_test_icon2.png');
+    background-size: 100% 100%;
+    width: 18px;
+    height: 18px;
+    cursor: pointer;
+    margin-right: 10px;
+}
+
+
+.mc_ti_1>.title>.btnBox .edit,
+.mc_ti_2>.title>.btnBox .edit,
+.mc_ti_3>.title>.btnBox .edit {
+    display: block;
+    background-image: url('../../../../../assets/icon/new/edit_u.png');
+    background-size: 100% 100%;
+    width: 18px;
+    height: 18px;
+    cursor: pointer;
+    margin-right: 10px;
+}
+
+.mc_ti_1>.title>.btnBox .isopen,
+.mc_ti_2>.title>.btnBox .isopen {
+    transform: rotate(0deg);
+}
+
+.mc_ti_1.active,
+.mc_ti_2.active,
+.mc_ti_3.active {
+    /* border: 1px solid #0062ff; */
+    /* background: rgb(239, 240, 241); */
+		/* background-color: #fff;
+		border-radius: 5px;
+		border: 1px solid #E0EAFB;
+		box-shadow: 0 0 2px 0px #cdddf8; */
+		background-color: #fff;
+}
+
+.mc_ti_1.active,
+.mc_ti_2.active,
+.mc_ti_3.active{
+	background-color: #fff;
+	box-shadow: 1px 1px 20px 4px rgba(29, 57, 131, 0.05), 0px 4px 10px 0px rgba(29, 57, 131, 0.08);
+	border:solid 1px #3681FC !important;
+	border-radius: 6px;
+}
+
+.mc_ti_1,
+.mc_ti_2,
+.mc_ti_3{
+	border: solid 1px #fff;
+	/* padding-bottom: 10px; */
+}
+
+.mc_ti_1:hover,
+.mc_ti_2:hover,
+.mc_ti_3:hover {
+	background-color: #fff;
+	box-shadow: 1px 1px 20px 4px rgba(29, 57, 131, 0.05), 0px 4px 10px 0px rgba(29, 57, 131, 0.08);
+	border: 1px solid #E0EAFB;
+	border-radius: 6px;
+}
+
+
+
+.mc_ti_1.active>.title>.drag,
+.mc_ti_2.active>.title>.drag,
+.mc_ti_3.active>.title>.drag {
+    background-image: url('../../../../../assets/icon/test/drag_icon_active.png');
+}
+
+.mc_ti_1>.title>.content,
+.mc_ti_2>.title>.content,
+.mc_ti_3>.title>.content {
+    word-break: break-all;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.edit_box {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10px 0 0;
+}
+
+
+.dragOverTop {
+    border-top: 2px solid #0061FF !important;
+    border-radius: 0 !important;
+    margin-top: 10px;
+}
+
+.dragOverBottom {
+    border-bottom: 2px solid #0061FF !important;
+    border-radius: 0 !important;
+    margin-top: 10px;
+}
+
+
+.dialog_diy>>>.el-dialog__header {
+  background: #3d67bc !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.content>>>.test_index{
+	margin-right: 20px;
+	font-size: 28px;
+	font-weight: bold;
+
+	color: #AECCFE;
+}
+
+.active>>>.test_index{
+	color: #3681FC;
+}
+
+.showCheckBox{
+	position: relative;
+	margin-bottom: 60px;
+	overflow: visible;
+}
+
+.addCheckBox{
+	position: absolute;
+	bottom: -50px;
+
+}
+</style>

+ 469 - 0
src/components/pages/test/add/components/choice/choice.vue

@@ -0,0 +1,469 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="set_box" v-if="!cJson">请设置题目</div>
+    <div v-else class="choice_box">
+      <div class="title">
+        <div style="display: flex;">
+          <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+            `(${option[cJson.type].name})`
+          }}</span
+          > -->
+					<span @click.stop="updateTitle()" v-if="!updateList.title">{{
+            cJson.title ? cJson.title : "输入问题"
+          }}</span>
+          <input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+        </div>
+        <span style="color: #efa030;" v-if="cJson.score"
+          >({{ "分值:" + cJson.score + "分" }})</span
+        >
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			  <input
+          v-if="updateList.detail"
+          ref="detailRef"
+          class="editInput"
+          v-model="checkJson.detail"
+          @blur="save"
+          style="margin-top: 10px;color: rgb(136, 139, 146);"
+          @keyup.enter="save"
+          placeholder="请填写描述说明"
+        />
+      <div class="choices">
+        <div class="choice" :class="{dragTop:(dragIndex!=index&&dragNewIndex==index&&dragIndex>index),dragBottom:(dragIndex!=index&&dragNewIndex==index&&dragIndex<index)}" v-for="(item, index) in cJson.array" :key="index" :draggable="dragIndex==index" @dragStart="dragStart(index)" @dragover.prevent="dragOver(index)"  @dragend="dragEnd()">
+          <span class="dragIcon"  @mousedown="setDrag(index)" @mouseup="clearDrag()">
+            <img v-if="dragIndex===index" src="../../../../../../assets/icon/test/drag_icon.png">
+            <img v-else src="../../../../../../assets/icon/test/drag_icon_active.png">
+          </span>
+          <div
+            class="choice_c"
+            v-if="cJson.type == 2"
+             @click.stop="updateLabel(index)"
+          >
+            <el-checkbox
+              class="choiceInput"
+              v-model="cJson.answer"
+              disabled
+              :label="index"
+            ></el-checkbox
+            ><span
+              v-if="!updateList.answer || updateList.answerIndex != index"
+              :class="{ right: cJson.answer.indexOf(index) != -1 }"
+
+              >{{ item.option ? item.option : "空选项" }}</span
+            >
+            <input
+              v-if="updateList.answer && updateList.answerIndex == index"
+              style="background: none;color: #000;"
+              class="editInput answerInput"
+              :ref="`answerRef${index}`"
+              v-model="checkJson.array[index].option"
+              @blur="save"
+              @keyup.enter="save"
+              placeholder="请输入选项标题"
+            />
+
+            <!-- <div class="changeIndex">
+              <span  @click.stop="changeIndex(index,0)">
+                <svg t="1737082063936" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4412" width="200" height="200"><path d="M908.8 787.2 512 396.8l-396.8 396.8c-25.6 25.6-70.4 25.6-96 0s-25.6-70.4 0-96l441.6-441.6C480 236.8 492.8 230.4 512 230.4s32 6.4 51.2 19.2l441.6 441.6c25.6 25.6 25.6 70.4 0 96C979.2 819.2 934.4 819.2 908.8 787.2z" p-id="4413"></path></svg>
+                </span>
+              <span  @click.stop="changeIndex(index,1)">
+                <svg style="transform: rotate(180deg);" t="1737082063936" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4412" width="200" height="200"><path d="M908.8 787.2 512 396.8l-396.8 396.8c-25.6 25.6-70.4 25.6-96 0s-25.6-70.4 0-96l441.6-441.6C480 236.8 492.8 230.4 512 230.4s32 6.4 51.2 19.2l441.6 441.6c25.6 25.6 25.6 70.4 0 96C979.2 819.2 934.4 819.2 908.8 787.2z" p-id="4413"></path></svg></span>
+            </div> -->
+
+            <span
+              @click.stop="deleteChoice(index)"
+              class="deleteChoice"
+              v-if="cJson.array.length>2"
+              >×</span
+            >
+
+          </div>
+          <div
+            class="choice_c"
+            v-if="cJson.type == 1"
+            @click.stop="updateLabel(index)"
+          >
+            <el-radio
+              class="choiceInput"
+              v-model="cJson.answer[0]"
+              disabled
+              :label="index"
+            ></el-radio
+            ><span
+              v-if="!updateList.answer || updateList.answerIndex != index"
+              :class="{ right: cJson.answer.indexOf(index) != -1 }"
+
+              >{{ item.option ? item.option : "空选项" }}</span
+            >
+            <input
+              v-if="updateList.answer && updateList.answerIndex == index"
+              style="background: none;color: #000;"
+              :ref="`answerRef${index}`"
+              class="editInput answerInput"
+              v-model="checkJson.array[index].option"
+              @blur="save"
+              @keyup.enter="save"
+              placeholder="请输入选项标题"
+            />
+<!--
+            <div class="changeIndex">
+              <span  @click.stop="changeIndex(index,0)">
+                <svg t="1737082063936" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4412" width="200" height="200"><path d="M908.8 787.2 512 396.8l-396.8 396.8c-25.6 25.6-70.4 25.6-96 0s-25.6-70.4 0-96l441.6-441.6C480 236.8 492.8 230.4 512 230.4s32 6.4 51.2 19.2l441.6 441.6c25.6 25.6 25.6 70.4 0 96C979.2 819.2 934.4 819.2 908.8 787.2z" p-id="4413"></path></svg>
+                </span>
+              <span  @click.stop="changeIndex(index,1)">
+                <svg style="transform: rotate(180deg);" t="1737082063936" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4412" width="200" height="200"><path d="M908.8 787.2 512 396.8l-396.8 396.8c-25.6 25.6-70.4 25.6-96 0s-25.6-70.4 0-96l441.6-441.6C480 236.8 492.8 230.4 512 230.4s32 6.4 51.2 19.2l441.6 441.6c25.6 25.6 25.6 70.4 0 96C979.2 819.2 934.4 819.2 908.8 787.2z" p-id="4413"></path></svg></span>
+            </div> -->
+
+            <span
+              @click.stop="deleteChoice(index)"
+                v-if="cJson.array.length>2"
+              class="deleteChoice"
+              >×</span
+            >
+
+          </div>
+        </div>
+      </div>
+
+      <div class="choiceBottom">
+				<el-button type="primary" size="mini" @click.stop="addChoice">添加选项</el-button>
+			</div>
+    </div>
+  </div>
+</template>
+
+<script>
+import draggable from 'vuedraggable';
+
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+		cJson2:{
+			type:Object
+		},
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "单选题" },
+        2: { name: "多选题" }
+      },
+      checkJson: {},
+      updateList: {
+        title: false,
+        answer: false,
+        detail:false,
+        answerIndex: 0
+      },
+      dragIndex:null,
+      dragNewIndex:null,
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.$emit("setJson", newVal, this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    updateTitle() {
+      this.updateList.title = true;
+       if(this.cJson.title=="标题")this.checkJson.title = ""
+      this.$nextTick(() => {
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateLabel(index) {
+      this.updateList.answerIndex = index;
+      this.updateList.answer = true;
+      this.$nextTick(() => {
+        console.log(this.$refs[`answerRef${index}`]);
+        this.$refs[`answerRef${index}`][0].focus();
+      });
+    },
+    updateDetail(){
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        this.$refs[`detailRef`].focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        if (typeof this.updateList[key] === "boolean") {
+          this.updateList[key] = false;
+        }
+      }
+    },
+    updateAnswer(index) {
+			return;
+      if (this.cJson.type == 1) {
+        if (this.checkJson.answer.indexOf(index) == -1) {
+          this.checkJson.answer = [index];
+        }
+      } else if (this.cJson.type == 2) {
+        if (!this.checkJson.answer) {
+          this.checkJson.answer = [];
+        }
+        if (!this.checkJson.answer.includes(index)) {
+          this.checkJson.answer.push(index);
+        } else {
+          this.checkJson.answer.splice(this.checkJson.answer.indexOf(index), 1);
+        }
+      }
+    },
+    deleteChoice(index) {
+      this.checkJson.array.splice(index, 1);
+      if (this.checkJson.answer.indexOf(index) != -1) {
+        this.checkJson.answer.splice(this.checkJson.answer.indexOf(index), 1);
+      }
+    },
+		addChoice(){
+			this.checkJson.array.push({ option: "选项" + (this.checkJson.array.length + 1), img: "" })
+		},
+    changeIndex(index,type){
+      if (type == 0 && index != 0) { // 上移
+        const item = this.checkJson.array.splice(index, 1)[0];
+        this.checkJson.array.splice(index - 1, 0, item);
+        // this.$message.info("上移");
+      } else if (type == 1 && index != this.checkJson.array.length - 1) { // 下移
+        const item = this.checkJson.array.splice(index, 1)[0];
+        this.checkJson.array.splice(index + 1, 0, item);
+        // this.$message.info("下移");
+      }
+    },
+    setDrag(index){
+      this.dragIndex = index;
+    },
+    clearDrag(){
+      this.dragIndex = null;
+    },
+    dragStart(index){
+
+    },
+    dragOver(index){
+      this.dragNewIndex = index;
+    },
+    dragEnd(){
+      if(this.dragIndex == this.dragNewIndex){
+        this.dragIndex = null;
+        this.dragNewIndex = null;
+        return;
+      }else{
+        const item = this.checkJson.array.splice(this.dragIndex, 1)[0];
+        this.checkJson.array.splice(this.dragNewIndex, 0, item);
+
+        // if(this.dragIndex > this.dragNewIndex){
+        //   console.log("上面")
+        // }else if(this.dragIndex < this.dragNewIndex){
+        //   console.log("下面")
+        // }
+        this.dragIndex = null;
+        this.dragNewIndex = null;
+      }
+    }
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     type: 1,
+    //     array: [
+    //       { option: "选项1", img: "" },
+    //       { option: "选项2", img: "" }
+    //     ],
+    //     answer: ""
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .choices > .choice {
+  word-break: break-all;
+  position: relative;
+}
+.choice_box > .choices > .choice + .choice {
+  margin-top: 5px;
+}
+.choice_box > .choices > .choice > .choice_c {
+  display: flex;
+  padding: 10px 0 15px 10px;
+  border: solid 1px #3681fc;
+  background-color: rgba(224, 234, 251, 0.4);
+  border-radius: 50px;
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  position: relative;
+  width: calc(100% - 50px - 50px - 25px);
+  margin-left: 25px;
+}
+.choice_box > .choices > .choice > .choice_c > span {
+  /* padding-right: 50px; */
+  /* margin-left: 10px; */
+}
+.choice_box > .choices > .choice > .choice_c > .el-checkbox {
+  margin-top: 4px;
+  margin-right: 10px;
+}
+.choice_box > .choices > .choice > .choice_c > .el-radio {
+  margin-top: 4px;
+  margin-right: 10px;
+}
+.choice_c >>> .el-checkbox__label {
+  display: none;
+}
+
+.choice_c >>> .el-radio__label {
+  display: none;
+}
+
+.choice_c .right {
+  color: #efa030;
+}
+/* .choice_c .right::after {
+  content: "(正确答案)";
+} */
+
+/* .choice:hover > .choice_c > .deleteChoice {
+  display: flex;
+} */
+
+.deleteChoice {
+  max-width: 25px;
+  max-height: 25px;
+  min-width: 25px;
+  min-height: 25px;
+  position: absolute;
+  right: -30px;
+  transform: translateY(2px);
+  border-radius: 5px;
+  color: #646a73 !important;
+  background-color: #fff;
+  cursor: pointer;
+  font-weight: bold;
+  font-size: 16px;
+  display: flex;
+  padding-right: 0 !important;
+  align-items: center;
+  justify-content: center;
+  transition: 0.3s;
+  box-sizing: border-box;
+}
+
+.deleteChoice:hover {
+  background-color: #e8e9e9;
+}
+
+.changeIndex{
+  width: 16px;
+  height: 45px;
+  position: absolute;
+  right: -25px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  transform: translateY(2px);
+  /* background-color: red; */
+}
+
+.changeIndex>span{
+  width: 20px;
+  height: 18px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 4px;
+  cursor: pointer;
+  border-radius: 4px;
+  background-color: #fff;
+  /* background-color: yellow; */
+}
+
+.changeIndex>span:hover{
+  background-color: #e8e9e9;
+}
+
+.changeIndex>span>svg{
+  width: 100%;
+  height: 100%;
+}
+
+.dragIcon{
+  position: absolute;
+  left: 0;
+  top: 50%;
+  transform: translate(0,-60%);
+  width: 20px;
+  height: 20px;
+  cursor: pointer;
+  display: block;
+}
+
+.dragIcon>img{
+  width: 100%;
+  height: 100%;
+}
+
+.dragTop::after{
+  content: '';
+  width: 100%;
+  height: 2px;
+  position: absolute;
+  top: -6px;
+  background-color: #409EFF;
+}
+
+.dragBottom::after{
+  content: '';
+  width: 100%;
+  height: 2px;
+  position: absolute;
+  bottom: -6px;
+  background-color: #409EFF;
+}
+</style>

+ 296 - 0
src/components/pages/test/add/components/choice/index.vue

@@ -0,0 +1,296 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置选择题</div> -->
+        <div class="box">
+            <!-- <div class="set_type" style="margin-top: 0;">
+                <span>题目类型:</span>
+                <el-select v-model="checkJson.type" @change="changeAnswer">
+                    <el-option v-for="item in options" :key="item.type" :label="item.name" :value="item.type">
+                    </el-option>
+                </el-select>
+            </div> -->
+            <div class="set_title" style="align-items: flex-start;">
+                <span>表单问题:</span><textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder="请输入标题"></textarea>
+                    <!-- <el-input v-model="checkJson.title" class="input" placeholder="请输入标题"></el-input> -->
+            </div>
+            <div class="set_title">
+                <span>题目分数:</span><el-input v-model="checkJson.score" class="input" placeholder="请输入分数" style="width: 120px" @change="numberPan"></el-input>
+            </div>
+            <div class="set_options">
+                <div class="title">选项内容:</div>
+                <div class="xuan_body">
+                    <div class="xuan_title">
+                        <span class="xuan_1">选项文字</span>
+                        <!-- <span class="xuan_2">图片</span> -->
+                        <span class="xuan_3">正确答案</span>
+                        <!-- <span class="xuan_4">上移下移</span> -->
+                    </div>
+                    <div v-for="(item, index) in checkJson.array" :key="index" class="xuan_box">
+                        <div class="xuan_1">
+                            <el-input v-model="item.option" placeholder="请输入选项" size="normal"></el-input>
+                            <el-button type="primary" size="mini" @click="addOption2(index)"
+                                style="margin-left: 10px;">+</el-button>
+                            <el-button type="primary" size="mini" @click="deleteOption(index)">-</el-button>
+                        </div>
+                        <!-- <div class="xuan_2"><span></span></div> -->
+                        <div class="xuan_3"><el-checkbox v-model="checkJson.answer" :label="index"
+                                @change="checkChange(index)"></el-checkbox></div>
+                        <!-- <div class="xuan_4">
+                            <div><span></span><span></span></div>
+                        </div> -->
+                    </div>
+                </div>
+                <div class="btn">
+                    <el-button type="primary" size="mini" @click="addOption">添加选项</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '单选题' },
+                { type: 2, name: '多选题' }
+            ],
+            checkJson: {}
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+                console.log('checkW',this.cJson);
+            },
+            deep: true
+        },
+        cJson: {
+            handler(newVal) {
+                console.log(newVal);
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        checkChange(val) {
+            if (this.checkJson.type == 1) {
+                this.checkJson.answer = [val]
+            }
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        addOption() {
+            this.checkJson.array.push({ option: "选项" + (this.checkJson.array.length + 1), img: "" })
+        },
+        addOption2(index) {
+            this.checkJson.array.splice(index+1, 0, { option: "选项", img: "" })
+        },
+        deleteOption(index) {
+            this.checkJson.array.splice(index, 1)
+            if (this.checkJson.answer.indexOf(index) != -1) {
+                this.checkJson.answer.splice(this.checkJson.answer.indexOf(index), 1)
+            }
+        }
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                type: 1,
+                array: [
+                    { option: "选项1", img: "" },
+                    { option: "选项2", img: "" }
+                ],
+                answer: ""
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+        console.log('check',this.cJson);
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.xuan_body>.xuan_title {
+    display: flex;
+    align-items: center;
+    background: #e1e1e1;
+    height: 40px;
+    padding: 0 10px;
+    box-sizing: border-box;
+    justify-content: space-between;
+}
+
+.xuan_body>.xuan_box {
+    display: flex;
+    align-items: center;
+    min-height: 40px;
+    padding: 0 10px;
+    box-sizing: border-box;
+    justify-content: space-between;
+    margin-top: 10px;
+}
+
+.xuan_1 {
+    display: flex;
+    /* width: calc(100% - 340px); */
+    width: calc(100% - 100px);
+    align-items: center;
+}
+
+.xuan_2 {
+    width: 100px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.xuan_3 {
+    width: 100px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.xuan_3>>>.el-checkbox__label {
+    display: none;
+}
+
+.xuan_4 {
+    width: 100px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.set_options>.btn {
+    margin-top: 10px;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+</style>

+ 287 - 0
src/components/pages/test/add/components/course/course.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span v-if="!updateList.title" @click.stop="updateTitle()">{{
+          cJson.title ? cJson.title : "输入问题"
+        }}</span>
+        <input
+          v-if="updateList.title"
+          ref="titleRef"
+          class="editInput"
+          v-model="checkJson.title"
+          @blur="save"
+          @keyup.enter="save"
+          placeholder="输入问题"
+        />
+      </div>
+      <div
+        class="detail"
+        v-if="!updateList.detail"
+        @click.stop="updateDetail()"
+      >{{ cJson.detail ? cJson.detail : "暂无描述" }}
+      </div>
+      <input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述说明"
+      />
+
+      <div class="course">
+        <el-button type="primary" size="mini" @click="openCourse"
+          >添加课程</el-button
+        >
+        <div class="set_title_list" v-loading="loading">
+          <div
+            v-for="(item, index) in courses"
+            class="set_title_list_item"
+            :key="index"
+            v-if="coursesList.find(i => i.courseId == item)"
+          >
+            <!-- {{ `课程名称:${item.title}     创建人:${item.username}`}} -->
+            <div
+              class="set_title_list_itemBtn el-icon-remove-outline"
+              @click.stop="delCourse(item)"
+            ></div>
+            <div class="set_title_list_itemLabel">
+              <span
+                >课程名称:{{
+                  coursesList.find(i => i.courseId == item) &&
+                    coursesList.find(i => i.courseId == item).title
+                }}</span
+              >
+              <span
+                >创建人:{{
+                  coursesList.find(i => i.courseId == item) &&
+                    coursesList.find(i => i.courseId == item).username
+                }}</span
+              >
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <courseDilogVue
+      :dialogVisibleCourse.sync="dialogVisibleCourse"
+      :courses="courses"
+      @setCourse="setCourse"
+    >
+    </courseDilogVue>
+  </div>
+</template>
+
+<script>
+import courseDilogVue from "./courseDilog.vue";
+export default {
+  components: {
+    courseDilogVue
+  },
+  props: {
+    cJson: {
+      type: Object
+    },
+		cJson2:{
+			type:Object
+		},
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      loading: false,
+      dialogVisibleCourse: false,
+      coursesList: [],
+      courses: [],
+      updateList: {
+        title: false,
+        detail: false
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+				console.log("修改")
+        this.$emit("setJson", newVal,this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    },
+    async courses(newValue) {
+      this.loading = true;
+      let result = [];
+      let params = {
+        cid: this.courses.join(",")
+      };
+      let data = await this.ajax.get(
+        this.$store.state.api + "getCourseInfoTestAll",
+        params
+      );
+      result = data.data[0];
+      this.coursesList = result;
+      this.loading = false;
+    },
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateDetail() {
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        this.$refs["detailRef"].focus();
+      });
+    },
+    openCourse() {
+      this.dialogVisibleCourse = true;
+    },
+    setCourse(courses) {
+      this.checkJson.courses = courses;
+      this.courses = courses;
+      this.$forceUpdate();
+    }
+  },
+  mounted() {
+    if (Object.keys(this.cJson).length != 0) {
+			if( this.cJson.courses && this.cJson.courses.length != 0){
+				this.courses = this.cJson.courses;
+			}
+    }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .detail {
+  width: 100%;
+  word-break: break-all;
+  color: rgb(136, 139, 146);
+  margin: 10px 0 0;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+
+.course {
+  width: 100%;
+  margin-top: 10px;
+  height: auto;
+}
+
+
+.set_title_list_item {
+    display: flex;
+    align-items: center;
+    width: auto;
+    height: 40px;
+    margin: 10px 0;
+    border-radius: 10px;
+    padding: 0 20px;
+    transition: all 0.3s;
+}
+
+.set_title_list_item:hover {
+    background-color: #d4dde1;
+}
+
+.set_title_list_item:hover>.set_title_list_itemBtn {
+    opacity: 1;
+}
+
+.set_title_list_itemBtn {
+    font-size: 18px;
+    margin-right: 20px;
+    cursor: pointer;
+    opacity: 0;
+}
+
+.set_title_list_itemLabel {
+    display: flex;
+    align-items: center;
+}
+
+.set_title_list_itemLabel>span {
+    margin-right: 20px;
+}
+
+.set_title_list {
+    min-width: 100%;
+    /* min-height: 200px; */
+}
+</style>

+ 112 - 0
src/components/pages/test/add/components/course/courseDilog.vue

@@ -0,0 +1,112 @@
+<template>
+    <el-dialog title="课程选择" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="95%"
+        :before-close="handleClose" class="dialog_diy">
+        <div style="height: 100%;overflow: auto;">
+            <courseIndexVue :courseArray="courseArray" @updateCourseArray="updateCourseArray"></courseIndexVue>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="close()">关 闭</el-button>
+            <el-button @click="submit()" type="primary">确 定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import courseIndexVue from './courseIndex.vue';
+export default {
+    components: {
+        courseIndexVue,
+    },
+    props: {
+        dialogVisibleCourse: {
+            type: Boolean,
+            default: false
+        },
+        courses:{
+            type: Array,
+            default: () => []
+        }
+    },
+    data() {
+        return {
+            courseArray: []
+        };
+    },
+    watch: {
+        courses: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.courseArray = JSON.parse(JSON.stringify(this.courses));
+                this.$forceUpdate()
+            }
+        }
+    },
+    mounted () {
+        this.courseArray = JSON.parse(JSON.stringify(this.courses));
+        this.$forceUpdate()
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        updateCourseArray(newValue) {
+            let index = this.courseArray.findIndex(i => i === newValue)
+            if (index != -1) {
+                this.courseArray.splice(index, 1)
+            } else {
+                // 给courseArray添加课程id
+                this.courseArray.push(newValue)
+
+            }
+        },
+        close() {
+            this.$emit("update:dialogVisibleCourse", false);
+        },
+				submit(){
+					this.$emit("setCourse", this.courseArray);
+					this.close()
+				}
+    }
+};
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    height: 100%;
+    margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 124px);
+    box-sizing: border-box;
+    padding: 0px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fff;
+}
+</style>

+ 2010 - 0
src/components/pages/test/add/components/course/courseIndex.vue

@@ -0,0 +1,2010 @@
+<template>
+    <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
+      <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
+        <!-- <div class="pb_head top">
+          <div style="
+      display: flex;
+      align-items: center;
+  ">
+            <span class="sub_head">课程管理</span>
+            <span class="subClick" @click="
+              goTo(
+                '/works?userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org=' +
+                org +
+                '&role=' +
+                role
+              )
+              ">评价管理</span>
+          </div>
+          <div class="student_button">
+            <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button>
+            <button class="r_pub_button_course" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
+              <span>创建课程</span>
+              <div v-show="btnDisplay" class="buttonBox">
+                <div type="primary" @click="goToCourse3()">极简式课程</div>
+                <div type="primary" @click="goToCourse2()">任务式课程</div>
+                <div type="primary" @click="goToCourse()">阶段式课程</div>
+              </div>
+            </button>
+          </div>
+        </div> -->
+        <div class="reBox">
+          <div class="reTop">
+            <!-- <div>分类筛选</div> -->
+            <div class="reTopCh">
+              <!-- <el-select v-model="groupA" @change="search" v-if="role == '1'">
+                <el-option value="4" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+              <el-select v-model="groupA" @change="search" v-else>
+                <el-option value="0" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+              </el-select> -->
+              <div class="searchI">
+                <!-- @click="getCourse" -->
+                <div class="search">
+                  <img src="../../../../../../assets/icon/search.png" alt="" />
+                </div>
+                <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
+              </div>
+              <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
+          </div>
+          <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
+            <span><span>类型</span></span>
+            <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
+              <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
+                <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
+              </div>
+            </el-radio-group>
+          </div>
+          <div class="choose">
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+              :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
+              <span v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                "><span>{{ item.name }}</span></span>
+              <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                ">
+                <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
+                  :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
+                  全部
+                </div>
+                <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
+                  @click="getCourse2(item.name, item.id, item1.id, 2)">
+                  <div class="cName" :class="typea == item1.id || typeb == item1.id || typed == item1.id
+                    ? 'isCType'
+                    : ''
+                    ">
+                    {{ item1.name }}
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!-- <div class="all_choose" v-if="role == '1'">
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+                <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
+                  他人课程
+                </div>
+              </div>
+            </div>
+            <div class="all_choose" v-else>
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+              </div>
+            </div> -->
+						<div class="chooseAll">
+							<el-checkbox v-model="checkedAll" style="display: flex;">全选</el-checkbox>
+						</div>
+          </div>
+        </div>
+      </div>
+      <div class="line"></div>
+      <div class="pb_content_body" style="height: 100%;width: 100%;background: #e6eaf0;margin: 0 auto;">
+        <div class="student_head" v-if="false">
+          <div class="choose">
+            <div class="student_search">
+              <span>课程筛选</span>
+              <el-select v-model="groupA" @change="search">
+                <el-option value="0" label="我的课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+            </div>
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
+              <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
+              <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
+                @change="getTypeName">
+                <el-option label="全部" value="1">全部</el-option>
+                <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
+                </el-option>
+              </el-select>
+            </div>
+            <div @click="clear" class="clear">重置</div>
+          </div>
+  
+          <div class="student_right">
+            <div class="head_left">
+              <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
+              <el-button class="course_button" @click="searchCourse">查询</el-button>
+            </div>
+          </div>
+        </div>
+        <div class="student_table">
+          <div class="course_box">
+            <div :class="['out_box',courseArray.includes(item.courseId)?'out_boxActive':'']" v-for="(item, index) in course" :key="index" @click.stop="$emit('updateCourseArray',item.courseId)">
+              <!-- <div class="myCourse" v-if="item.isCourseType == 1 && groupA == 0">
+                我的课程
+              </div>
+              <div class="myCourse" v-else-if="groupA == 1">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <!-- <div class="myCourse" v-if="item.userid == userid">我的课程</div>
+              <div class="myCourse" style="background: #4187f0" v-else-if="!item.course_teacher ||
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) == -1)
+                ">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <div class="tup">
+                <img :src="item.cover != null && item.cover != ''
+                  ? JSON.parse(item.cover).length > 0
+                    ? JSON.parse(item.cover)[0].url
+                    : mr
+                  : mr
+                  " alt />
+              </div>
+              <!-- <div class="bottom_box">
+                <div>{{ item.title }}</div>
+                <div class="kc_t" v-if="groupA == '1'">
+                  创建老师:{{ item.uname }}
+                </div>
+                <div class="kc_time">{{ item.time }}</div>
+              </div> -->
+              <div class="bottom_box">
+                <div>
+                  <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                    <span>{{ item.title }}</span>
+                  </el-tooltip>
+                </div>
+                <!-- v-if="item.isCourseType == 2 || groupA == 1" -->
+                <div class="kc_t">
+                  <span>{{ item.uname }}</span>
+                  <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">修改日期:</span>{{ item.utime }}
+                </div>
+              </div>
+              <!-- <div class="three_bottom"> -->
+                <!-- v-if="role == '1'" -->
+                <!-- <div @click="get(item)">预览</div> -->
+                <!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
+                <!-- <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 1
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 2
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 3
+                  " @click="goToCourse3(item.courseId)">
+                  修改
+                </div> -->
+                <!-- <div v-if="groupA == '0'" @click="
+                  goTo(
+                    '/works?cid=' +
+                    item.courseId +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role
+                  )
+                  ">
+                  评价
+                </div> -->
+                <!-- <div @click="copyCourse(item.courseId)">
+                  复制
+                </div>
+                <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
+                  删除
+                </div> -->
+                <!-- <div class="more">
+                  <span style="font-size: 18px; font-weight: 700">...</span>
+                  <div>
+                    <span @click="copyCourse(item.courseId)">复制</span>
+                    <span @click="jump(item.courseId)" v-if="role == '1'">评课</span>
+                    <span @click="get(item.courseId)" v-else>预览</span>
+                    <span @click="getNT(item.courseId)">无终端</span>
+                  </div>
+                </div> -->
+              <!-- </div> -->
+            </div>
+            <div class="course_empty" v-if="course.length == 0">暂无数据</div>
+          </div>
+        </div>
+      </div>
+      <div class="student_page">
+        <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
+          v-if="page && course.length" style="padding-bottom: 20px" @current-change="handleCurrentChange"></el-pagination>
+      </div>
+      <el-dialog :visible.sync="dialogVisible1" size="tiny">
+        <img width="100%" :src="dialogImageUrl" alt />
+      </el-dialog>
+      <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px" :before-close="handleClose"
+        class="dialog_diy">
+        <div>
+          <div class="a_addBox">
+            <CourseProblem :problemCourse="problemCourse"></CourseProblem>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="查看协同课程" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
+        :before-close="handleClose" class="dialog_diy">
+        <div class="ct_box">
+          <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
+            <div class="tup">
+              <img :src="item.cover != null && item.cover != ''
+                ? JSON.parse(item.cover).length > 0
+                  ? JSON.parse(item.cover)[0].url
+                  : mr
+                : mr
+                " alt />
+            </div>
+            <div class="bottom_box">
+              <div>{{ item.title }}</div>
+              <div class="kc_t">创建老师:{{ item.uname }}</div>
+              <div class="kc_time">{{ item.time }}</div>
+            </div>
+            <div class="three_bottom">
+              <div @click="jump(item.courseId)">查看内容</div>
+              <div @click="
+                goTo(
+                  '/course/addCourse?cid=' +
+                  item.courseId +
+                  '&userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org
+                )
+                ">
+                编辑
+              </div>
+            </div>
+          </div>
+          <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </template>
+  
+  <script>
+  import "../../../../../../common/aws-sdk-2.235.1.min";
+  import EditorBar from "../../../../../../components/tools/wangEnduit";
+  import CourseProblem from "../../../../components/courseProblem";
+  export default {
+    components: { EditorBar, CourseProblem },
+		props:{
+			courseArray:{
+				type:Array,
+				default:()=>[]
+			}
+		},
+		emit:['updateCourseArray'],
+    data() {
+      return {
+        itemCount: 1,
+        courseTitle: "",
+        courseText: "",
+        courseTime: "",
+        isLoading: false,
+        fileList: [],
+        fileList1: [],
+        homeworkList: [{ name: "" }],
+        formLabelWidth: "100px",
+        dialogVisible: false,
+        dialogVisible1: false,
+        dialogVisibleCourse: false,
+        dialogImageUrl: "",
+        group: "",
+        userid: this.$route.query.userid,
+        oid: this.$route.query.oid,
+        org: this.$route.query.org,
+        role: this.$route.query.role,
+        Juri: "",
+        groupList: [],
+        JuriList: [],
+        page: 1,
+        total: 0,
+        pageSize: 20,
+        tableData: [],
+        now: "",
+        courseDetail: {},
+        addCourse: {},
+        groupA: "0",
+        classX: "",
+        course: [],
+        courseName: "",
+        mr: require("../../../../../../assets/icon/kc1.png"),
+        CourseType: [],
+        CourseType2: [],
+        CourseTypeJson: {},
+        courseTypeId: {},
+        courseTypeSon: [],
+        isChoose: 0,
+        problemCourse: null, //查看提问的课程
+        courseTeam: [],
+        typeE: [],
+        typea: "",
+        typeb: "",
+        typed: "",
+        pTypeCheck: [],
+        pTypeCheckName: [],
+        btnDisplay: false,
+      };
+    },
+		computed:{
+			checkedAll:{
+				get(){
+					return this.course.every(i=>this.courseArray.includes(i.courseId));
+				},
+				set(newValue){
+					if(newValue){//获取当前页的所有
+						this.course.forEach(i=>{
+							if(!this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}else{//删除当前页的所有
+						this.course.forEach(i=>{
+							if(this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}
+				}
+			}
+		},
+    methods: {
+      change(val) {
+        console.log(val);
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      addHomeworkBox() {
+        this.homeworkList.push({ name: "" });
+        this.itemCount++;
+      },
+      reduceHomeworkBox() {
+        var a = this.homeworkList;
+        a.splice(a.length - 1);
+        this.itemCount--;
+      },
+      goTo(path) {
+        this.$router.push(path);
+      },
+      CourseType2Change(val) {
+        this.pTypeCheck = [];
+        for (var i = 0; i < this.CourseType2.length; i++) {
+          let typeA = this.CourseType2[i];
+          if (val.indexOf(typeA.name) != -1) {
+            this.pTypeCheck.push(...typeA.id);
+          }
+        }
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      CourseType2Click(val) {
+        this.pTypeCheck = [];
+        this.typeE = [];
+        if (val === this.pTypeCheckName) {
+          this.pTypeCheckName = "";
+        } else {
+          this.pTypeCheckName = val;
+          for (var i = 0; i < this.CourseType2.length; i++) {
+            let typeA = this.CourseType2[i];
+            if (val.indexOf(typeA.name) != -1) {
+              this.pTypeCheck.push(...typeA.id);
+              this.typeE = [...typeA.id];
+            }
+          }
+        }
+  
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      goToCourse(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourse?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourse?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+        // this.$router.push(path);
+      },
+      reset() {
+        this.typeE = []
+        this.typea = ''
+        this.typeb = ''
+        this.typed = ''
+        this.courseName = ''
+        if (this.role == "1") {
+          this.groupA = "4";
+        } else {
+          this.groupA = "0";
+        }
+        this.getCourse();
+      },
+      goToCourse2(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseT?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseT?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      goToCourse3(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseE?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseE?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+          return "even_row";
+        } else {
+          return "";
+        }
+      },
+      jump(cid) {
+        // window.open(
+        //   "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
+        //     cid +
+        //     "&userid=" +
+        //     this.userid
+        // );
+        top.postMessage({ cid: cid, screenType: "2" }, "*");
+      },
+      get(item) {
+        top.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+      },
+      getNT(cid) {
+        top.postMessage({ cid: cid, screenType: "3NT" }, "*");
+      },
+      handle_remove(file, fileList) {
+        var _tmp = this.fileList;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList = _tmp;
+        }
+      },
+      handle_remove1(file, fileList) {
+        var _tmp = this.fileList1;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList1 = _tmp;
+        }
+      },
+      handleCurrentChange(val) {
+        // console.log(`当前页: ${val}`);
+        this.page = val;
+        this.getCourse();
+      },
+      init() { },
+      handleClose(done) {
+        done();
+      },
+      handleRemove(file, fileList) {
+        console.log(file, fileList);
+      },
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        this.dialogVisible1 = true;
+      },
+      onExceed() {
+        this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
+      },
+      //uuid生成
+      guid() {
+        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
+          /[xy]/g,
+          function (c) {
+            var r = (Math.random() * 16) | 0,
+              v = c == "x" ? r : (r & 0x3) | 0x8;
+            return v.toString(16);
+          }
+        );
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      searchCourse() {
+        this.page = 1;
+        this.getCourse();
+      },
+      clear() {
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
+        this.getCourse();
+      },
+      getCourse2(typeName, ftypeId, typeid, type) {
+        this.page = 1;
+        if (typeid == "34628934-d02f-11ec-8c78-005056b86db5" || ftypeId == '34628934-d02f-11ec-8c78-005056b86db5' || typeid == "34628934-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34628934-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typea != "") {
+                this.typea = "";
+              }
+            }
+          } else {
+            if (this.typea == typeid) {
+              this.typea = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typea = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "专栏") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "栏目") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629bcc-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629bcc-d02f-11ec-8c78-005056b86db5') {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "学院") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629907-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629907-d02f-11ec-8c78-005056b86db5' || typeid == "34629907-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34629907-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typed != "") {
+                this.typed = "";
+              }
+            }
+          } else {
+            if (this.typed == typeid) {
+              this.typed = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typed = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        }
+        // this.loading = true;
+        this.getCourse();
+      },
+      getCourse() {
+        if (!this.loading) {
+          this.loading = this.openLoading(
+            document.querySelector(".student_table")
+          );
+        }
+        // var typeE = [];
+        // var typea, typeb, typec, typed;
+        // if (this.isChoose == 1) {
+        //   for (var i = 0; i < this.CourseType[0].length; i++) {
+        //     if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
+        //       typeE.push(this.CourseType[0][i].id);
+        //     } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
+        //       if (this.CourseType[0][i].name == "年级") {
+        //         typea = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "专栏") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "栏目") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学院") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "主题") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "新技能") {
+        //         typec = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学科") {
+        //         typed = this.courseTypeId[this.CourseType[0][i].id];
+        //       }
+        //       this.courseTypeSon.push(
+        //         this.courseTypeId[this.CourseType[0][i].id]
+        //       );
+        //     }
+        //   }
+        // }
+        console.log("typea", this.typea);
+        this.isLoading = true;
+        let params = {
+          // type: this.groupA,
+					type: "4",
+          uid: this.userid,
+          oid: this.oid,
+          org: this.org,
+          typea: this.typea != undefined ? this.typea : "",
+          typeb: this.typeb != undefined ? this.typeb : "",
+          typec: "",
+          typed: this.typed != undefined ? this.typed : "",
+          typeE: this.typeE.join(","),
+          cu: "",
+          cn: this.courseName,
+          page: this.page,
+          pageSize: this.pageSize,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseNew2", params)
+          .then((res) => {
+            this.loading.close();
+            this.loading = "";
+            this.isLoading = false;
+            this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+            this.course = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      getTypeName() {
+        this.$forceUpdate();
+        this.page = 1;
+        this.isChoose = 1;
+        this.getCourse();
+      },
+      // searchCourse() {
+      //   this.isLoading = true;
+      //   let params = {
+      //     cu: "",
+      //     cn: this.courseName,
+      //     page: this.page,
+      //   };
+      //   this.ajax
+      //     .get(this.$store.state.api + "searchCourse", params)
+      //     .then((res) => {
+      //       this.isLoading = false;
+      //       this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+      //       this.course = res.data[0];
+      //     })
+      //     .catch((err) => {
+      //       this.isLoading = false;
+      //       console.error(err);
+      //     });
+      // },
+      deleteCourse(cid) {
+        // if (this.time()) {
+        this.$confirm("确定删除此课程吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            const loading = this.openLoading(
+              document.querySelector(".student_table")
+            );
+            this.isLoading = true;
+            let params = {
+              cid: cid,
+            };
+            this.ajax
+              .get(this.$store.state.api + "deleteCourse", params)
+              .then((res) => {
+                loading.close();
+                this.isLoading = false;
+                this.$message.success("删除成功");
+                this.getCourse();
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          })
+          .catch(() => {
+            loading.close();
+            this.isLoading = false;
+            return;
+          });
+        // }
+      },
+      selectAllType() {
+        let params = {
+        org: this.org && this.org != "" ? this.org : "",
+        oid: this.oid && this.oid != "" ? this.oid : "",
+        stand: "cn"
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectAllTypeStand", params)
+          .then((res) => {
+            if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              res.data[0] = [...res.data[0], ...res.data[4]]
+            }
+            this.CourseType = res.data;
+            this.CourseType2 = [
+              { name: "智见课程", id: [] },
+              { name: "智行课程", id: [] },
+              { name: "智创课程", id: [] },
+            ];
+  
+            for (var cti = 0; cti < res.data[0].length; cti++) {
+              if (
+                res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
+              ) {
+                this.CourseType2[0].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                this.CourseType2[1].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                this.CourseType2[2].id.push(res.data[0][cti].id);
+              }
+              if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "年级";
+              } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "学科";
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                res.data[0][cti].name = "主题";
+              }
+            }
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = [];
+              }
+              if (!this.CourseTypeJson[res.data[0][i].id]) {
+                this.CourseTypeJson[res.data[0][i].id] = [];
+              }
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                if (res.data[0][i].name == "栏目") {
+                  this.CourseType[0][i].name = "主题";
+                }
+              }
+              if (res.data[2].length == 0 && res.data[3].length == 0) {
+                for (var j = 0; j < res.data[1].length; j++) {
+                  if (res.data[0][i].id == res.data[1][j].pid) {
+                    this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                  }
+                }
+              } else {
+                if (res.data[2].length > 0) {
+                  for (var j = 0; j < res.data[2].length; j++) {
+                    if (res.data[0][i].id == res.data[2][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                    }
+                  }
+                }
+                if (res.data[3].length > 0) {
+                  for (var j = 0; j < res.data[3].length; j++) {
+                    if (res.data[0][i].id == res.data[3][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                    }
+                  }
+                }
+              }
+            }
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectType() {
+        this.ajax
+          .get(this.$store.state.api + "selectType")
+          .then((res) => {
+            this.CourseType = res.data;
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = "";
+              }
+              // if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              //   if (res.data[0][i].name == "栏目") {
+              //     this.CourseType[0][i].name = "主题";
+              //   }
+              // }
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
+                }
+              }
+            }
+            this.selectTypeByOid();
+            this.selectTypeByOrg();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOid() {
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOid", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOrg() {
+        let params = {
+          oid: this.org,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOrg", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      openCourse() {
+        this.dialogVisibleCourse = true;
+        this.getTeamCourse();
+      },
+      getTeamCourse() {
+        let params = {
+          uid: this.userid,
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseTeam", params)
+          .then((res) => {
+            this.courseTeam = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      search() {
+        this.page = 1;
+        this.getCourse();
+      },
+      checkProblem(res) {
+        this.problemCourse = res;
+        this.dialogVisible = true;
+      },
+      copyCourse(cid) {
+        let params = [
+          {
+            cid: cid,
+            uid: this.userid,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "copyCourse", params)
+          .then((res) => {
+            this.page = 1;
+            if (this.role == "1") {
+              this.groupA = "4";
+            } else {
+              this.groupA = "0";
+            }
+            this.$message.success("复制成功")
+            this.clear();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+    },
+    created() {
+      if (this.role == "1") {
+        this.groupA = "4";
+      }
+      this.page = 1;
+      // this.selectType();
+      this.selectAllType();
+      this.getCourse();
+      let _this = this
+      window.goToCourse3 = function(){
+        _this.goToCourse3()
+      }
+  
+      window.goToCourse = function(){
+        _this.goToCourse()
+      }
+    },
+  };
+  </script>
+  
+  <style scoped>
+  @media screen and (max-width: 1380px) {
+    .out_box {
+      width: calc(100% / 4 - (15px * 3) / 4) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  @media screen and (max-width: 1080px) {
+    .out_box {
+      width: calc(100% / 3 - (15px * 2) / 3) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(3n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  .dialog_diy>>>.el-dialog__header {
+    background: #3d67bc !important;
+    padding: 15px 20px;
+  }
+  
+  .dialog_diy>>>.el-dialog__title {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+  }
+  
+  .student_head>>>.el-button--primary {
+    background-color: #2268bc;
+  }
+  
+  .xls_button {
+    font-size: 14px;
+    cursor: pointer;
+    text-decoration: underline;
+    color: rgb(34, 104, 188);
+  }
+  
+  .student_head {
+    display: flex;
+    justify-content: space-between;
+    align-items: baseline;
+    flex-direction: row;
+    flex-wrap: wrap;
+  }
+  
+  .top {
+    display: flex;
+    justify-content: space-between;
+    width: 100% !important;
+    box-sizing: border-box;
+    margin: 0px auto;
+    padding: 10px 5px;
+    height: 54px;
+  }
+  
+  .bgColor {
+    background: #0061FF;
+  }
+  
+  .student_search {
+    display: flex;
+    align-items: center;
+    width: calc(100% / 3);
+  }
+  
+  .student_search span {
+    margin: 0 10px 0 0;
+    min-width: 65px;
+  }
+  
+  .student_button {
+    display: flex;
+    /* overflow: hidden; */
+    height: 40px;
+  }
+  
+  .upload-demo {
+    display: flex;
+    flex-direction: column;
+    align-items: end;
+    /* position: relative; */
+    width: 100px;
+    overflow: hidden;
+  }
+  
+  .student_table {
+    /* padding: 20px 0; */
+    height: 100%;
+    /* overflow: auto; */
+    min-height: 360px;
+  }
+  
+  .student_empty {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  
+  .el-table>>>.even_row {
+    background-color: #f1f1f1;
+  }
+  
+  .time {
+    font-size: 13px;
+    color: #999;
+  }
+  
+  .course_button {
+    padding: 10px 20px;
+  }
+  
+  .course_button_box {
+    display: flex;
+    margin-top: 5px;
+    justify-content: space-between;
+  }
+  
+  .course_rate {
+    margin-top: 5px;
+  }
+  
+  .course_view {
+    display: flex;
+    align-items: center;
+    margin: 5px 0 0 0;
+  }
+  
+  .course_view i {
+    background-image: url("../../../../../../assets/liulan.png");
+    width: 25px;
+    height: 25px;
+    background-size: 100% 100%;
+    /* margin-top: 1px; */
+    line-height: 25px;
+    vertical-align: text-top;
+    background-repeat: no-repeat;
+  }
+  
+  .image {
+    width: 100%;
+    height: 150px;
+    display: block;
+  }
+  
+  .course_box {
+    display: flex;
+    flex-wrap: wrap;
+		background-color: white;
+  }
+  
+  .student_page {
+    width: 100%;
+    margin: 0 auto;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .course_create_box {
+    font-size: 18px;
+  }
+  
+  .course_name {
+    margin-top: 10px;
+  }
+  
+  .course_name span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .homework_box {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+  
+  .course_homework {
+    width: 130px;
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    align-items: center;
+    margin: 0 10px 10px 0;
+  }
+  
+  .course_type {
+    margin-top: 10px;
+    display: flex;
+  }
+  
+  .course_type1 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_type2 {
+    margin-left: 20px;
+  }
+  
+  .course_type2 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_empty {
+    color: rgb(110, 110, 110);
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  
+  .el_cards>>>.el-card__body {
+    height: 100%;
+  }
+  
+  .courseBtnBox {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: calc(100% - 170px);
+    padding: 10px;
+  }
+  
+  .wordUpload {
+    display: flex;
+  }
+  
+  .wordUpload>.buttonUp {
+    margin-right: 5px;
+  }
+  
+  .out_box {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: calc(100% / 5 - (15px * 4) / 5);
+    /* width: 280px; */
+    background: #fff;
+		/* background-color: white; */
+    margin-right: 15px;
+    /* border: 1px solid #ccc; */
+    height: fit-content;
+    box-sizing: border-box;
+    border-radius: 0px 0px 5px 5px;
+    /* overflow: hidden; */
+    margin-bottom: 15px;
+    position: relative;
+    border-radius: 8px;
+    box-sizing: border-box;
+    overflow: hidden;
+    border: 1px solid #3682fc00;
+		cursor: pointer;
+		border: 1px solid #6a9ff5;
+  }
+
+	.out_boxActive{
+		box-sizing: border-box;
+		border: 3px solid #3681FC !important;
+
+	}
+  
+  .out_box:hover {
+    border: 1px solid #3681FC;
+  }
+  
+  .out_box:nth-child(5n) {
+    margin-right: 0;
+  }
+  
+  .bottom_box {
+    display: flex;
+    padding: 10px;
+    flex-direction: column;
+    box-sizing: border-box;
+    height: 121px;
+    flex-wrap: nowrap;
+    justify-content: space-evenly;
+  }
+  
+  .bottom_box>div:nth-child(1) {
+    width: 100%;
+    /* overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold; */
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .tup {
+    width: 100%;
+    height: 180px;
+    margin: 0 auto;
+    overflow: hidden;
+    display: flex;
+    align-items: center;
+    padding: 10px;
+    box-sizing: border-box;
+  }
+  
+  .tup>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+  }
+  
+  .kc_time {
+    margin-top: 8px;
+    font-size: 14px;
+    color: #717C8D;
+  }
+  
+  .kc_time+.kc_time {
+    margin-top: 0;
+  }
+  
+  .kc_t {
+    margin-top: 5px;
+    width: 100%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  .kc_t>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .kc_t>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .three_bottom {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+    height: 45px;
+    align-items: center;
+    background: #fff;
+    font-size: 14px;
+    border-top: 1px solid #ddd;
+    box-sizing: border-box;
+  }
+  
+  .three_bottom>div {
+    cursor: pointer;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .three_bottom>div+div {
+    border-left: 1px solid #ddd;
+  }
+  
+  .three_bottom>div:hover {
+    color: #3681FC;
+    font-weight: bold;
+  }
+  
+  .three_bottom .deleteB {
+    color: #E96E6E;
+  }
+  
+  .three_bottom .deleteB:hover {
+    color: #E96E6E;
+    font-weight: bold;
+  }
+  
+  .head_left {
+    display: flex;
+  }
+  
+  .student_input>>>.el-input__inner {
+    height: 40px;
+    width: 190px;
+    font-size: 13px;
+    padding: 0 10px;
+  }
+  
+  .course_button {
+    color: #fff;
+    background: #2268bc;
+    width: 75px;
+    height: 40px;
+    padding: 0 !important;
+    font-size: 12px;
+    line-height: 40px;
+  }
+  
+  /* .all_choose {
+    margin: 15px 0 10px;
+    height: 20%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    max-width: calc(100% / 3);
+  }
+  
+  .all_choose > span {
+    width: 50px;
+    display: block;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    align-content: space-between;
+    height: 100%;
+    justify-content: flex-start;
+    width: 60%;
+    min-width: 868px;
+    align-items: center;
+  } */
+  
+  /* .choose > div:nth-child(2) {
+    margin-left: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(4) {
+    margin-right: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(5) {
+    margin: 5px 0 0 1%;
+  }
+  
+  .choose > div:nth-child(4) > span {
+    width: 74px !important;
+    min-width: 74px;
+  }
+  
+  .choose > div:nth-child(4) >>> .el-select {
+    width: 217.5px;
+    min-width: 215.06px;
+  } */
+  
+  .clear {
+    width: 70px;
+    height: 35px;
+    background: #0061FF;
+    color: #fff;
+    text-align: center;
+    border-radius: 5px;
+    line-height: 35px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+  
+  .ct_box {
+    height: 500px;
+    overflow: auto;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .myCourse {
+    position: absolute;
+    background: #3c3c3c;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .xtCourse {
+    position: absolute;
+    background: #0061FF;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .sub_head {
+    position: relative;
+  }
+  
+  .sub_head::after {
+    content: "";
+    width: 100%;
+    background: #5a9cea;
+    height: 2px;
+    position: absolute;
+    left: 0;
+    bottom: -10px;
+  }
+  
+  .subClick {
+    /* font-size: 16px; */
+    font-size: 26px;
+    cursor: pointer;
+    margin-left: 17.5px;
+    /* color: #ab582f; */
+    /* color: #409eff; */
+    color: #999;
+  }
+  
+  .subClick:hover {
+    color: #000;
+  }
+  
+  .more {
+    position: relative;
+  }
+  
+  .more:hover div {
+    display: block;
+    color: #000;
+  }
+  
+  .more div {
+    position: absolute;
+    bottom: 0px;
+    transform: translate(-50%, 100%);
+    background: #f5f4f4;
+    padding: 10px 20px;
+    z-index: 99;
+    width: 50px;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 3px #80808020;
+    display: none;
+  }
+  
+  .more div>span+span {
+    margin-top: 10px;
+  }
+  
+  .more div>span {
+    display: block;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .more div>span:hover {
+    color: #79a2ff;
+  }
+  
+  .line {
+    width: 100%;
+    height: 15px;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .reBox {
+    width: 100%;
+    /* padding-left: 20px; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    overflow: hidden;
+    padding: 10px 15px 0;
+  }
+  
+  .reTop {
+    padding: 0 0 5px;
+    /* padding: 20px 0 0 0; */
+    /* border-bottom: 1px solid #eee; */
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .reTop>div:nth-child(1) {
+    font-weight: bold;
+    /* width: 40px; */
+    /* border-bottom: 1px solid #205cc6; */
+    /* padding-bottom: 20px; */
+    color: #205cc6;
+    /* font-size: 20px; */
+  }
+  
+  .reTop .reTopCh {
+    display: flex;
+  }
+  
+  .reTop .searchI {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border: 1px solid #ccced3;
+    width: 250px;
+    border-radius: 8px;
+    padding: 5px 0;
+    /* margin-bottom: 10px; */
+    background: #fafafa;
+    margin: 0 0 0 10px;
+  }
+  
+  .search {
+    width: 20px;
+    padding: 0 5px;
+    display: flex;
+    align-items: center;
+  }
+  
+  .search>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .sInput {
+    border: none;
+    width: 85%;
+    background: #fafafa;
+  }
+  
+  .sInput:focus-visible {
+    outline: none;
+  }
+  
+  .typeCss {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+    padding: 10px 0;
+  }
+  
+  .all_choose {
+    display: flex;
+    flex-direction: row;
+    align-items: baseline;
+    margin: 2px 0;
+    width: 100%;
+  }
+  
+  .all_choose>span {
+    display: flex;
+    margin-right: 5px;
+  }
+  
+  .all_choose>span>span {
+    min-width: 65px;
+    max-width: 65px;
+    display: block;
+    text-align-last: justify;
+  }
+  
+  .all_choose>span::after {
+    content: ':';
+  }
+  
+  .all_choose>span:nth-child(1) {
+    font-weight: bold;
+  }
+  
+  .all_choose>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 820px;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+  }
+  
+  .all_choose>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+  }
+  
+  .cName {
+    cursor: pointer;
+    margin: 0 10px 5px 0;
+    color: #b9b6b9;
+    min-width: 80px;
+    width: 80px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  
+  .isCType {
+    color: #6282c2;
+  }
+  
+  .pType_box {
+    margin-top: 0;
+  }
+  
+  .pType_box>>>.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
+    -webkit-box-shadow: none !important;
+    box-shadow: none !important;
+  }
+  
+  .buttonBox {
+    position: absolute;
+    bottom: -0;
+    transform: translateY(100%);
+    background: #fff;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 1px #e3e3e3;
+    width: 100%;
+  }
+  
+  .buttonBox>div {
+    height: 40px;
+    line-height: 40px;
+    width: 100%;
+    text-align: center;
+    color: #000;
+    box-sizing: border-box;
+  }
+  
+  .buttonBox>div+div {
+    border-top: 1px solid #e0e0e0;
+  }
+  
+  .buttonBox>div:hover {
+    background: #f6f8ff;
+  }
+
+	.checkedAll >>> .el-checkbox{
+		display: flex !important;
+		align-items: center !important;
+
+	}
+	</style>
+  

+ 323 - 0
src/components/pages/test/add/components/course/index.vue

@@ -0,0 +1,323 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题</span>
+                <el-input v-autoHeight="35" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></el-input>
+            </div>
+            <div class="set_title">
+                <span>问题描述</span>
+                <el-input v-autoHeight="35" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></el-input>
+            </div>
+            <div class="set_title" style="flex-direction: column;">
+                <div class="title_setting">
+                    <span>选择课程</span>
+                    <div @click="openCourse" class="setting el-icon-plus">
+											<span>添加课程</span>
+										</div>
+                </div>
+                <!-- {{courses}} -->
+                <div class="set_title_list" v-loading="loading">
+                    <div v-for="(item, index) in courses" class="set_title_list_item" :key="index"
+                        v-if="coursesList.find(i => i.courseId == item)">
+                        <!-- {{ `课程名称:${item.title}     创建人:${item.username}`}} -->
+                        <div class="set_title_list_itemBtn el-icon-remove-outline" @click.stop="delCourse(item)"></div>
+                        <div class="set_title_list_itemLabel">
+                            <span>课程名称:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).title }}</span>
+                            <span>创建人:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).username }}</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <courseDilogVue :dialogVisibleCourse.sync="dialogVisibleCourse" :courses="courses" @setCourse="setCourse">
+        </courseDilogVue>
+    </div>
+</template>
+
+<script>
+import courseDilogVue from './courseDilog.vue'
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+        courseDilogVue
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            loading: false,
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {},
+            dialogVisibleCourse: false,
+            courses: [],
+            coursesList: [],
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        },
+        async courses(newValue) {
+            this.loading = true;
+            let result = [];
+            let params = {
+                cid: this.courses.join(',')
+            }
+            let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll', params);
+            result = data.data[0]
+            this.coursesList = result;
+            this.loading = false;
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+        openCourse() {
+            this.dialogVisibleCourse = true
+        },
+        setCourse(courses) {
+            this.checkJson.courses = courses
+            this.courses = courses
+            this.$forceUpdate()
+        },
+        // 删除课程
+        delCourse(cid) {
+            let index = this.courses.findIndex(i => i == cid);
+            this.courses.splice(index, 1)
+        }
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: "",
+                courses: []
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+            this.courses = this.checkJson.courses
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+		line-height: 35px;
+		margin-right: 30px;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    /* padding: 12px 14px; */
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 20px;
+    /* background: #fff; */
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    /* min-height: 48px; */
+    /* border: 1px solid #3682fc00; */
+    /* border: 1px solid #CAD1DC; */
+}
+
+.binfo_textarea {
+    /* border: 1px solid #CAD1DC; */
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+
+.title_setting{
+		width: 100%;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: flex-start;
+}
+
+.title_setting>span{
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.setting {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    /* justify-content: flex-end; */
+    width: 100%;
+		color:#3681FC;
+		margin-left: 30px;
+}
+
+.setting>span{
+	margin-left: 5px;
+}
+/* 
+.setting::before {
+    content: '';
+    display: block;
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../../assets/icon/test/test_setting_icon.png');
+    background-size: 100% 100%;
+    margin-right: 5px;
+} */
+
+.set_title_list_item {
+    display: flex;
+    align-items: center;
+    width: auto;
+    height: 40px;
+    margin-bottom: 20px;
+    border-radius: 10px;
+    padding: 0 20px
+}
+
+.set_title_list_item:hover {
+    background-color: #d4dde1;
+}
+
+.set_title_list_item:hover>.set_title_list_itemBtn {
+    opacity: 1;
+}
+
+.set_title_list_itemBtn {
+    font-size: 18px;
+    margin-right: 20px;
+    cursor: pointer;
+    opacity: 0;
+}
+
+.set_title_list_itemLabel {
+    display: flex;
+    align-items: center;
+}
+
+.set_title_list_itemLabel>span {
+    margin-right: 20px;
+}
+
+.set_title_list {
+    min-width: 100%;
+    /* min-height: 200px; */
+}
+</style>

+ 166 - 0
src/components/pages/test/add/components/course2/course.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span v-if="!updateList.title" @click.stop="updateTitle()">{{ cJson.title?cJson.title:"输入问题" }}</span>
+				<input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			<input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述说明"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+		cJson2:{
+			type:Object
+		},
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+			updateList: {
+        title: false,
+        detail: false,
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.$emit("setJson", newVal,this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+		save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+		updateTitle(){
+			this.updateList.title = true;
+			this.$nextTick(()=>{
+				this.$refs["titleRef"].focus();
+			})
+		},
+		updateDetail(){
+			this.updateList.detail = true;
+			this.$nextTick(()=>{
+				this.$refs["detailRef"].focus();
+			})
+		}
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     detail: ""
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    //   this.courses = this.checkJson.courses;
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .detail {
+  width: 100%;
+  word-break: break-all;
+  color: rgb(136, 139, 146);
+  margin: 10px 0 0;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+</style>

+ 112 - 0
src/components/pages/test/add/components/course2/courseDilog.vue

@@ -0,0 +1,112 @@
+<template>
+    <el-dialog title="课程选择" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="95%"
+        :before-close="handleClose" class="dialog_diy">
+        <div style="height: 100%;overflow: auto;">
+            <courseIndexVue :courseArray="courseArray" @updateCourseArray="updateCourseArray"></courseIndexVue>
+        </div>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="close()">关 闭</el-button>
+            <el-button @click="submit()" type="primary">确 定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import courseIndexVue from './courseIndex.vue';
+export default {
+    components: {
+        courseIndexVue,
+    },
+    props: {
+        dialogVisibleCourse: {
+            type: Boolean,
+            default: false
+        },
+        courses:{
+            type: Array,
+            default: () => []
+        }
+    },
+    data() {
+        return {
+            courseArray: []
+        };
+    },
+    watch: {
+        courses: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.courseArray = JSON.parse(JSON.stringify(this.courses));
+                this.$forceUpdate()
+            }
+        }
+    },
+    mounted () {
+        this.courseArray = JSON.parse(JSON.stringify(this.courses));
+        this.$forceUpdate()
+    },
+    methods: {
+        handleClose(done) {
+            this.close();
+            done();
+        },
+        updateCourseArray(newValue) {
+            let index = this.courseArray.findIndex(i => i === newValue)
+            if (index != -1) {
+                this.courseArray.splice(index, 1)
+            } else {
+                // 给courseArray添加课程id
+                this.courseArray.push(newValue)
+
+            }
+        },
+        close() {
+            this.$emit("update:dialogVisibleCourse", false);
+        },
+				submit(){
+					this.$emit("setCourse", this.courseArray);
+					this.close()
+				}
+    }
+};
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+    height: 100%;
+    margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    height: calc(100% - 124px);
+    box-sizing: border-box;
+    padding: 0px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    background: #fff;
+}
+</style>

+ 2011 - 0
src/components/pages/test/add/components/course2/courseIndex.vue

@@ -0,0 +1,2011 @@
+<template>
+    <div class="pb_content" style="height: auto; width: 94%; margin: 10px auto;background: unset;">
+      <div style="width:100%;padding:0 21px;background:#fff;border-radius: 5px;box-sizing: border-box;">
+        <!-- <div class="pb_head top">
+          <div style="
+      display: flex;
+      align-items: center;
+  ">
+            <span class="sub_head">课程管理</span>
+            <span class="subClick" @click="
+              goTo(
+                '/works?userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org=' +
+                org +
+                '&role=' +
+                role
+              )
+              ">评价管理</span>
+          </div>
+          <div class="student_button">
+            <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse3()">创建极简式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse2()">创建任务式课程</el-button>
+            <el-button type="primary" class="bgColor" @click="goToCourse()">创建阶段式课程</el-button>
+            <button class="r_pub_button_course" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
+              <span>创建课程</span>
+              <div v-show="btnDisplay" class="buttonBox">
+                <div type="primary" @click="goToCourse3()">极简式课程</div>
+                <div type="primary" @click="goToCourse2()">任务式课程</div>
+                <div type="primary" @click="goToCourse()">阶段式课程</div>
+              </div>
+            </button>
+          </div>
+        </div> -->
+        <div class="reBox">
+          <div class="reTop">
+            <!-- <div>分类筛选</div> -->
+            <div class="reTopCh">
+              <!-- <el-select v-model="groupA" @change="search" v-if="role == '1'">
+                <el-option value="4" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+              <el-select v-model="groupA" @change="search" v-else>
+                <el-option value="0" label="全部"></el-option>
+                <el-option value="2" label="我的课程"></el-option>
+                <el-option value="3" label="协同课程"></el-option>
+              </el-select> -->
+              <div class="searchI">
+                <!-- @click="getCourse" -->
+                <div class="search">
+                  <img src="../../../../../../assets/icon/search.png" alt="" />
+                </div>
+                <input class="sInput" type="text" placeholder="请输入关键字" v-model="courseName" @input="getCourse()" />
+              </div>
+              <el-button type="primary" class="bgColor" style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
+          </div>
+          <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
+            <span><span>类型</span></span>
+            <el-radio-group v-model="pTypeCheckName" style="display: flex; align-items: center">
+              <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2" :key="index">
+                <el-radio :label="item.name" @click.native.prevent="CourseType2Click(item.name)">{{ item.name }}</el-radio>
+              </div>
+            </el-radio-group>
+          </div>
+          <div class="choose">
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+              :style="{ margin: !CourseTypeJson[item.id].length && 0 }">
+              <span v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                "><span>{{ item.name }}</span></span>
+              <div class="typeCss" v-if="CourseTypeJson[item.id].length &&
+                (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
+                  ? pTypeCheck.indexOf(item.id) != -1
+                  : true)
+                ">
+                <div class="cName" @click="getCourse2(item.name, '', item.id, 1)"
+                  :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''">
+                  全部
+                </div>
+                <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
+                  @click="getCourse2(item.name, item.id, item1.id, 2)">
+                  <div class="cName" :class="typea == item1.id || typeb == item1.id || typed == item1.id
+                    ? 'isCType'
+                    : ''
+                    ">
+                    {{ item1.name }}
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="all_choose">
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '0' ? 'isCType' : ''" @click="groupA = '0'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+              </div>
+            </div> 
+            <!-- <div class="all_choose" v-if="role == '1'">
+              <span><span>所有者</span></span>
+              <div class="typeCss">
+                <div class="cName" :class="groupA == '4' ? 'isCType' : ''" @click="groupA = '4'; search();">
+                  全部
+                </div>
+                <div class="cName" :class="groupA == '2' ? 'isCType' : ''" @click="groupA = '2'; search();">
+                  我的课程
+                </div>
+                <div class="cName" :class="groupA == '3' ? 'isCType' : ''" @click="groupA = '3'; search();">
+                  协同课程
+                </div>
+                <div class="cName" :class="groupA == '1' ? 'isCType' : ''" @click="groupA = '1'; search();">
+                  他人课程
+                </div>
+              </div>
+            </div>
+          -->
+						<div class="chooseAll">
+							<el-checkbox v-model="checkedAll" style="display: flex;">全选</el-checkbox>
+						</div>
+          </div>
+        </div>
+      </div>
+      <div class="line"></div>
+      <div class="pb_content_body" style="height: 100%;width: 100%;background: #e6eaf0;margin: 0 auto;">
+        <div class="student_head" v-if="false">
+          <div class="choose">
+            <div class="student_search">
+              <span>课程筛选</span>
+              <el-select v-model="groupA" @change="search">
+                <el-option value="0" label="我的课程"></el-option>
+                <el-option value="1" label="他人课程"></el-option>
+              </el-select>
+            </div>
+            <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
+              <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
+              <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择"
+                @change="getTypeName">
+                <el-option label="全部" value="1">全部</el-option>
+                <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
+                </el-option>
+              </el-select>
+            </div>
+            <div @click="clear" class="clear">重置</div>
+          </div>
+  
+          <div class="student_right">
+            <div class="head_left">
+              <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
+              <el-button class="course_button" @click="searchCourse">查询</el-button>
+            </div>
+          </div>
+        </div>
+        <div class="student_table">
+          <div class="course_box">
+            <div :class="['out_box',courseArray.includes(item.courseId)?'out_boxActive':'']" v-for="(item, index) in course" :key="index" @click.stop="$emit('updateCourseArray',item.courseId)">
+              <!-- <div class="myCourse" v-if="item.isCourseType == 1 && groupA == 0">
+                我的课程
+              </div>
+              <div class="myCourse" v-else-if="groupA == 1">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <!-- <div class="myCourse" v-if="item.userid == userid">我的课程</div>
+              <div class="myCourse" style="background: #4187f0" v-else-if="!item.course_teacher ||
+                (item.course_teacher &&
+                  item.course_teacher.indexOf(userid) == -1)
+                ">
+                他人课程
+              </div>
+              <div class="xtCourse" v-else>协同课程</div> -->
+              <div class="tup">
+                <img :src="item.cover != null && item.cover != ''
+                  ? JSON.parse(item.cover).length > 0
+                    ? JSON.parse(item.cover)[0].url
+                    : mr
+                  : mr
+                  " alt />
+              </div>
+              <!-- <div class="bottom_box">
+                <div>{{ item.title }}</div>
+                <div class="kc_t" v-if="groupA == '1'">
+                  创建老师:{{ item.uname }}
+                </div>
+                <div class="kc_time">{{ item.time }}</div>
+              </div> -->
+              <div class="bottom_box">
+                <div>
+                  <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
+                    <span>{{ item.title }}</span>
+                  </el-tooltip>
+                </div>
+                <!-- v-if="item.isCourseType == 2 || groupA == 1" -->
+                <div class="kc_t">
+                  <span>{{ item.uname }}</span>
+                  <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">创建日期:</span>{{ item.time }}
+                </div>
+                <div class="kc_time">
+                  <span style="color: #717C8D">修改日期:</span>{{ item.utime }}
+                </div>
+              </div>
+              <!-- <div class="three_bottom"> -->
+                <!-- v-if="role == '1'" -->
+                <!-- <div @click="get(item)">预览</div> -->
+                <!-- <div @click="jump(item.courseId)" v-else>评课</div> -->
+                <!-- <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 1
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 2
+                  " @click="goToCourse(item.courseId)">
+                  修改
+                </div>
+                <div v-if="((item.userid == userid) ||
+                  (item.course_teacher &&
+                    item.course_teacher.indexOf(userid) !== -1) || role == '1') &&
+                  item.state == 3
+                  " @click="goToCourse3(item.courseId)">
+                  修改
+                </div> -->
+                <!-- <div v-if="groupA == '0'" @click="
+                  goTo(
+                    '/works?cid=' +
+                    item.courseId +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role
+                  )
+                  ">
+                  评价
+                </div> -->
+                <!-- <div @click="copyCourse(item.courseId)">
+                  复制
+                </div>
+                <div v-if="item.isCourseType == 1 || role == '1'" @click="deleteCourse(item.courseId)">
+                  删除
+                </div> -->
+                <!-- <div class="more">
+                  <span style="font-size: 18px; font-weight: 700">...</span>
+                  <div>
+                    <span @click="copyCourse(item.courseId)">复制</span>
+                    <span @click="jump(item.courseId)" v-if="role == '1'">评课</span>
+                    <span @click="get(item.courseId)" v-else>预览</span>
+                    <span @click="getNT(item.courseId)">无终端</span>
+                  </div>
+                </div> -->
+              <!-- </div> -->
+            </div>
+            <div class="course_empty" v-if="course.length == 0">暂无数据</div>
+          </div>
+        </div>
+      </div>
+      <div class="student_page">
+        <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
+          v-if="page && course.length" style="padding-bottom: 20px" @current-change="handleCurrentChange"></el-pagination>
+      </div>
+      <el-dialog :visible.sync="dialogVisible1" size="tiny">
+        <img width="100%" :src="dialogImageUrl" alt />
+      </el-dialog>
+      <el-dialog title="查看提问" :visible.sync="dialogVisible" :append-to-body="true" width="750px" :before-close="handleClose"
+        class="dialog_diy">
+        <div>
+          <div class="a_addBox">
+            <CourseProblem :problemCourse="problemCourse"></CourseProblem>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="查看协同课程" :visible.sync="dialogVisibleCourse" :append-to-body="true" width="850px"
+        :before-close="handleClose" class="dialog_diy">
+        <div class="ct_box">
+          <div class="out_box" v-for="(item, index) in courseTeam" :key="index" style="margin-left: 15px">
+            <div class="tup">
+              <img :src="item.cover != null && item.cover != ''
+                ? JSON.parse(item.cover).length > 0
+                  ? JSON.parse(item.cover)[0].url
+                  : mr
+                : mr
+                " alt />
+            </div>
+            <div class="bottom_box">
+              <div>{{ item.title }}</div>
+              <div class="kc_t">创建老师:{{ item.uname }}</div>
+              <div class="kc_time">{{ item.time }}</div>
+            </div>
+            <div class="three_bottom">
+              <div @click="jump(item.courseId)">查看内容</div>
+              <div @click="
+                goTo(
+                  '/course/addCourse?cid=' +
+                  item.courseId +
+                  '&userid=' +
+                  userid +
+                  '&oid=' +
+                  oid +
+                  '&org=' +
+                  org
+                )
+                ">
+                编辑
+              </div>
+            </div>
+          </div>
+          <div class="course_empty" v-if="courseTeam.length == 0">暂无数据</div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisibleCourse = false">关 闭</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </template>
+  
+  <script>
+  import "../../../../../../common/aws-sdk-2.235.1.min";
+  import EditorBar from "../../../../../../components/tools/wangEnduit";
+  import CourseProblem from "../../../../components/courseProblem";
+  export default {
+    components: { EditorBar, CourseProblem },
+		props:{
+			courseArray:{
+				type:Array,
+				default:()=>[]
+			}
+		},
+		emit:['updateCourseArray'],
+    data() {
+      return {
+        itemCount: 1,
+        courseTitle: "",
+        courseText: "",
+        courseTime: "",
+        isLoading: false,
+        fileList: [],
+        fileList1: [],
+        homeworkList: [{ name: "" }],
+        formLabelWidth: "100px",
+        dialogVisible: false,
+        dialogVisible1: false,
+        dialogVisibleCourse: false,
+        dialogImageUrl: "",
+        group: "",
+        userid: this.$route.query.userid,
+        oid: this.$route.query.oid,
+        org: this.$route.query.org,
+        role: 0,
+        Juri: "",
+        groupList: [],
+        JuriList: [],
+        page: 1,
+        total: 0,
+        pageSize: 20,
+        tableData: [],
+        now: "",
+        courseDetail: {},
+        addCourse: {},
+        groupA: "0",
+        classX: "",
+        course: [],
+        courseName: "",
+        mr: require("../../../../../../assets/icon/kc1.png"),
+        CourseType: [],
+        CourseType2: [],
+        CourseTypeJson: {},
+        courseTypeId: {},
+        courseTypeSon: [],
+        isChoose: 0,
+        problemCourse: null, //查看提问的课程
+        courseTeam: [],
+        typeE: [],
+        typea: "",
+        typeb: "",
+        typed: "",
+        pTypeCheck: [],
+        pTypeCheckName: [],
+        btnDisplay: false,
+      };
+    },
+		computed:{
+			checkedAll:{
+				get(){
+					return this.course.every(i=>this.courseArray.includes(i.courseId));
+				},
+				set(newValue){
+					if(newValue){//获取当前页的所有
+						this.course.forEach(i=>{
+							if(!this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}else{//删除当前页的所有
+						this.course.forEach(i=>{
+							if(this.courseArray.includes(i.courseId)){
+								this.$emit('updateCourseArray',i.courseId)
+							}
+						})
+					}
+				}
+			}
+		},
+    methods: {
+      change(val) {
+        console.log(val);
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      addHomeworkBox() {
+        this.homeworkList.push({ name: "" });
+        this.itemCount++;
+      },
+      reduceHomeworkBox() {
+        var a = this.homeworkList;
+        a.splice(a.length - 1);
+        this.itemCount--;
+      },
+      goTo(path) {
+        this.$router.push(path);
+      },
+      CourseType2Change(val) {
+        this.pTypeCheck = [];
+        for (var i = 0; i < this.CourseType2.length; i++) {
+          let typeA = this.CourseType2[i];
+          if (val.indexOf(typeA.name) != -1) {
+            this.pTypeCheck.push(...typeA.id);
+          }
+        }
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      CourseType2Click(val) {
+        this.pTypeCheck = [];
+        this.typeE = [];
+        if (val === this.pTypeCheckName) {
+          this.pTypeCheckName = "";
+        } else {
+          this.pTypeCheckName = val;
+          for (var i = 0; i < this.CourseType2.length; i++) {
+            let typeA = this.CourseType2[i];
+            if (val.indexOf(typeA.name) != -1) {
+              this.pTypeCheck.push(...typeA.id);
+              this.typeE = [...typeA.id];
+            }
+          }
+        }
+  
+        this.typea = "";
+        this.typeb = "";
+        this.typed = "";
+        this.getCourse();
+      },
+      goToCourse(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourse?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourse?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+        // this.$router.push(path);
+      },
+      reset() {
+        this.typeE = []
+        this.typea = ''
+        this.typeb = ''
+        this.typed = ''
+        this.courseName = ''
+        if (this.role == "1") {
+          this.groupA = "4";
+        } else {
+          this.groupA = "0";
+        }
+        this.getCourse();
+      },
+      goToCourse2(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseT?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseT?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      goToCourse3(courseId) {
+        if (courseId) {
+          this.$router.push(
+            "/course/addCourseE?cid=" +
+            courseId +
+            "&userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        } else {
+          this.$router.push(
+            "/course/addCourseE?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        }
+      },
+      tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+          return "even_row";
+        } else {
+          return "";
+        }
+      },
+      jump(cid) {
+        // window.open(
+        //   "//pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?courseId=" +
+        //     cid +
+        //     "&userid=" +
+        //     this.userid
+        // );
+        top.postMessage({ cid: cid, screenType: "2" }, "*");
+      },
+      get(item) {
+        top.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+      },
+      getNT(cid) {
+        top.postMessage({ cid: cid, screenType: "3NT" }, "*");
+      },
+      handle_remove(file, fileList) {
+        var _tmp = this.fileList;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList = _tmp;
+        }
+      },
+      handle_remove1(file, fileList) {
+        var _tmp = this.fileList1;
+        for (var i = 0, len = _tmp.length; i < len; i++) {
+          if (_tmp[i].uid == file.uid) {
+            _tmp.splice(i, 1);
+            break;
+          }
+          this.fileList1 = _tmp;
+        }
+      },
+      handleCurrentChange(val) {
+        // console.log(`当前页: ${val}`);
+        this.page = val;
+        this.getCourse();
+      },
+      init() { },
+      handleClose(done) {
+        done();
+      },
+      handleRemove(file, fileList) {
+        console.log(file, fileList);
+      },
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        this.dialogVisible1 = true;
+      },
+      onExceed() {
+        this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
+      },
+      //uuid生成
+      guid() {
+        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
+          /[xy]/g,
+          function (c) {
+            var r = (Math.random() * 16) | 0,
+              v = c == "x" ? r : (r & 0x3) | 0x8;
+            return v.toString(16);
+          }
+        );
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      searchCourse() {
+        this.page = 1;
+        this.getCourse();
+      },
+      clear() {
+        for (var i = 0; i < this.CourseType[0].length; i++) {
+          this.courseTypeId[this.CourseType[0][i].id] = "";
+        }
+        this.getCourse();
+      },
+      getCourse2(typeName, ftypeId, typeid, type) {
+        this.page = 1;
+        if (typeid == "34628934-d02f-11ec-8c78-005056b86db5" || ftypeId == '34628934-d02f-11ec-8c78-005056b86db5' || typeid == "34628934-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34628934-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typea != "") {
+                this.typea = "";
+              }
+            }
+          } else {
+            if (this.typea == typeid) {
+              this.typea = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typea = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "专栏") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "栏目") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629bcc-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629bcc-d02f-11ec-8c78-005056b86db5') {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeName == "学院") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typeb != "") {
+                this.typeb = "";
+              }
+            }
+          } else {
+            if (this.typeb == typeid) {
+              this.typeb = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typeb = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        } else if (typeid == "34629907-d02f-11ec-8c78-005056b86db5" || ftypeId == '34629907-d02f-11ec-8c78-005056b86db5' || typeid == "34629907-d02f-11ec-8c78-005056b86ac5" || ftypeId == "34629907-d02f-11ec-8c78-005056b86ac5") {
+          if (type == 1) {
+            if (this.typeE.indexOf(typeid) != -1) {
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                return;
+              } else {
+                this.typeE.splice(this.typeE.indexOf(typeid), 1);
+              }
+            } else {
+              this.typeE.push(typeid);
+              if (this.typed != "") {
+                this.typed = "";
+              }
+            }
+          } else {
+            if (this.typed == typeid) {
+              this.typed = "";
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                this.typeE.push(ftypeId);
+              }
+            } else {
+              this.typed = typeid;
+              if (this.typeE.indexOf(ftypeId) != -1) {
+                this.typeE.splice(this.typeE.indexOf(ftypeId), 1);
+              }
+            }
+          }
+        }
+        // this.loading = true;
+        this.getCourse();
+      },
+      getCourse() {
+        if (!this.loading) {
+          this.loading = this.openLoading(
+            document.querySelector(".student_table")
+          );
+        }
+        // var typeE = [];
+        // var typea, typeb, typec, typed;
+        // if (this.isChoose == 1) {
+        //   for (var i = 0; i < this.CourseType[0].length; i++) {
+        //     if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
+        //       typeE.push(this.CourseType[0][i].id);
+        //     } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
+        //       if (this.CourseType[0][i].name == "年级") {
+        //         typea = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "专栏") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "栏目") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学院") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "主题") {
+        //         typeb = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "新技能") {
+        //         typec = this.courseTypeId[this.CourseType[0][i].id];
+        //       } else if (this.CourseType[0][i].name == "学科") {
+        //         typed = this.courseTypeId[this.CourseType[0][i].id];
+        //       }
+        //       this.courseTypeSon.push(
+        //         this.courseTypeId[this.CourseType[0][i].id]
+        //       );
+        //     }
+        //   }
+        // }
+        console.log("typea", this.typea);
+        this.isLoading = true;
+        let params = {
+          type: this.groupA,
+					// type: "0",
+          uid: this.userid,
+          oid: this.oid,
+          org: this.org,
+          typea: this.typea != undefined ? this.typea : "",
+          typeb: this.typeb != undefined ? this.typeb : "",
+          typec: "",
+          typed: this.typed != undefined ? this.typed : "",
+          typeE: this.typeE.join(","),
+          cu: "",
+          cn: this.courseName,
+          page: this.page,
+          pageSize: this.pageSize,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseNew2", params)
+          .then((res) => {
+            this.loading.close();
+            this.loading = "";
+            this.isLoading = false;
+            this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+            this.course = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      getTypeName() {
+        this.$forceUpdate();
+        this.page = 1;
+        this.isChoose = 1;
+        this.getCourse();
+      },
+      // searchCourse() {
+      //   this.isLoading = true;
+      //   let params = {
+      //     cu: "",
+      //     cn: this.courseName,
+      //     page: this.page,
+      //   };
+      //   this.ajax
+      //     .get(this.$store.state.api + "searchCourse", params)
+      //     .then((res) => {
+      //       this.isLoading = false;
+      //       this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+      //       this.course = res.data[0];
+      //     })
+      //     .catch((err) => {
+      //       this.isLoading = false;
+      //       console.error(err);
+      //     });
+      // },
+      deleteCourse(cid) {
+        // if (this.time()) {
+        this.$confirm("确定删除此课程吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            const loading = this.openLoading(
+              document.querySelector(".student_table")
+            );
+            this.isLoading = true;
+            let params = {
+              cid: cid,
+            };
+            this.ajax
+              .get(this.$store.state.api + "deleteCourse", params)
+              .then((res) => {
+                loading.close();
+                this.isLoading = false;
+                this.$message.success("删除成功");
+                this.getCourse();
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          })
+          .catch(() => {
+            loading.close();
+            this.isLoading = false;
+            return;
+          });
+        // }
+      },
+      selectAllType() {
+        let params = {
+          org: this.org && this.org != "" ? this.org : "",
+          oid: this.oid && this.oid != "" ? this.oid : "",
+          stand: "cn"
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectAllTypeStand", params)
+          .then((res) => {
+            if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              res.data[0] = [...res.data[0], ...res.data[4]]
+            }
+            this.CourseType = res.data;
+            this.CourseType2 = [
+              { name: "智见课程", id: [] },
+              { name: "智行课程", id: [] },
+              { name: "智创课程", id: [] },
+            ];
+  
+            for (var cti = 0; cti < res.data[0].length; cti++) {
+              if (
+                res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
+              ) {
+                this.CourseType2[0].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
+                res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                this.CourseType2[1].id.push(res.data[0][cti].id);
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                this.CourseType2[2].id.push(res.data[0][cti].id);
+              }
+              if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "年级";
+              } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                res.data[0][cti].name = "学科";
+              } else if (res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5") {
+                res.data[0][cti].name = "主题";
+              }
+            }
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = [];
+              }
+              if (!this.CourseTypeJson[res.data[0][i].id]) {
+                this.CourseTypeJson[res.data[0][i].id] = [];
+              }
+              if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+                if (res.data[0][i].name == "栏目") {
+                  this.CourseType[0][i].name = "主题";
+                }
+              }
+              if (res.data[2].length == 0 && res.data[3].length == 0) {
+                for (var j = 0; j < res.data[1].length; j++) {
+                  if (res.data[0][i].id == res.data[1][j].pid) {
+                    this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                  }
+                }
+              } else {
+                if (res.data[2].length > 0) {
+                  for (var j = 0; j < res.data[2].length; j++) {
+                    if (res.data[0][i].id == res.data[2][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                    }
+                  }
+                }
+                if (res.data[3].length > 0) {
+                  for (var j = 0; j < res.data[3].length; j++) {
+                    if (res.data[0][i].id == res.data[3][j].pid) {
+                      this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                    }
+                  }
+                }
+              }
+            }
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectType() {
+        this.ajax
+          .get(this.$store.state.api + "selectType")
+          .then((res) => {
+            this.CourseType = res.data;
+            for (var i = 0; i < res.data[0].length; i++) {
+              if (!this.cid) {
+                this.courseTypeId[res.data[0][i].id] = "";
+              }
+              // if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
+              //   if (res.data[0][i].name == "栏目") {
+              //     this.CourseType[0][i].name = "主题";
+              //   }
+              // }
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); //去除公共分类
+                }
+              }
+            }
+            this.selectTypeByOid();
+            this.selectTypeByOrg();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOid() {
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOid", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      selectTypeByOrg() {
+        let params = {
+          oid: this.org,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTypeByOrg", params)
+          .then((res) => {
+            for (var i = 0; i < res.data[0].length; i++) {
+              for (var j = 0; j < res.data[1].length; j++) {
+                if (res.data[0][i].id == res.data[1][j].pid) {
+                  if (!this.CourseTypeJson[res.data[0][i].id]) {
+                    this.CourseTypeJson[res.data[0][i].id] = [];
+                  }
+                  this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
+                }
+              }
+            }
+            this.$forceUpdate();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      openCourse() {
+        this.dialogVisibleCourse = true;
+        this.getTeamCourse();
+      },
+      getTeamCourse() {
+        let params = {
+          uid: this.userid,
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectCourseTeam", params)
+          .then((res) => {
+            this.courseTeam = res.data[0];
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      search() {
+        this.page = 1;
+        this.getCourse();
+      },
+      checkProblem(res) {
+        this.problemCourse = res;
+        this.dialogVisible = true;
+      },
+      copyCourse(cid) {
+        let params = [
+          {
+            cid: cid,
+            uid: this.userid,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "copyCourse", params)
+          .then((res) => {
+            this.page = 1;
+            if (this.role == "1") {
+              this.groupA = "4";
+            } else {
+              this.groupA = "0";
+            }
+            this.$message.success("复制成功")
+            this.clear();
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+    },
+    created() {
+      if (this.role == "1") {
+        this.groupA = "4";
+      }
+      this.page = 1;
+      // this.selectType();
+      this.selectAllType();
+      this.getCourse();
+      let _this = this
+      window.goToCourse3 = function(){
+        _this.goToCourse3()
+      }
+  
+      window.goToCourse = function(){
+        _this.goToCourse()
+      }
+    },
+  };
+  </script>
+  
+  <style scoped>
+  @media screen and (max-width: 1380px) {
+    .out_box {
+      width: calc(100% / 4 - (15px * 3) / 4) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  @media screen and (max-width: 1080px) {
+    .out_box {
+      width: calc(100% / 3 - (15px * 2) / 3) !important;
+    }
+  
+    .out_box:nth-child(5n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(4n) {
+      margin-right: 15px !important;
+    }
+  
+    .out_box:nth-child(3n) {
+      margin-right: 0 !important;
+    }
+  }
+  
+  .dialog_diy>>>.el-dialog__header {
+    background: #3d67bc !important;
+    padding: 15px 20px;
+  }
+  
+  .dialog_diy>>>.el-dialog__title {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+  }
+  
+  .student_head>>>.el-button--primary {
+    background-color: #2268bc;
+  }
+  
+  .xls_button {
+    font-size: 14px;
+    cursor: pointer;
+    text-decoration: underline;
+    color: rgb(34, 104, 188);
+  }
+  
+  .student_head {
+    display: flex;
+    justify-content: space-between;
+    align-items: baseline;
+    flex-direction: row;
+    flex-wrap: wrap;
+  }
+  
+  .top {
+    display: flex;
+    justify-content: space-between;
+    width: 100% !important;
+    box-sizing: border-box;
+    margin: 0px auto;
+    padding: 10px 5px;
+    height: 54px;
+  }
+  
+  .bgColor {
+    background: #0061FF;
+  }
+  
+  .student_search {
+    display: flex;
+    align-items: center;
+    width: calc(100% / 3);
+  }
+  
+  .student_search span {
+    margin: 0 10px 0 0;
+    min-width: 65px;
+  }
+  
+  .student_button {
+    display: flex;
+    /* overflow: hidden; */
+    height: 40px;
+  }
+  
+  .upload-demo {
+    display: flex;
+    flex-direction: column;
+    align-items: end;
+    /* position: relative; */
+    width: 100px;
+    overflow: hidden;
+  }
+  
+  .student_table {
+    /* padding: 20px 0; */
+    height: 100%;
+    /* overflow: auto; */
+    min-height: 360px;
+  }
+  
+  .student_empty {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  
+  .el-table>>>.even_row {
+    background-color: #f1f1f1;
+  }
+  
+  .time {
+    font-size: 13px;
+    color: #999;
+  }
+  
+  .course_button {
+    padding: 10px 20px;
+  }
+  
+  .course_button_box {
+    display: flex;
+    margin-top: 5px;
+    justify-content: space-between;
+  }
+  
+  .course_rate {
+    margin-top: 5px;
+  }
+  
+  .course_view {
+    display: flex;
+    align-items: center;
+    margin: 5px 0 0 0;
+  }
+  
+  .course_view i {
+    background-image: url("../../../../../../assets/liulan.png");
+    width: 25px;
+    height: 25px;
+    background-size: 100% 100%;
+    /* margin-top: 1px; */
+    line-height: 25px;
+    vertical-align: text-top;
+    background-repeat: no-repeat;
+  }
+  
+  .image {
+    width: 100%;
+    height: 150px;
+    display: block;
+  }
+  
+  .course_box {
+    display: flex;
+    flex-wrap: wrap;
+		background-color: white;
+  }
+  
+  .student_page {
+    width: 100%;
+    margin: 0 auto;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .course_create_box {
+    font-size: 18px;
+  }
+  
+  .course_name {
+    margin-top: 10px;
+  }
+  
+  .course_name span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .homework_box {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+  
+  .course_homework {
+    width: 130px;
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    align-items: center;
+    margin: 0 10px 10px 0;
+  }
+  
+  .course_type {
+    margin-top: 10px;
+    display: flex;
+  }
+  
+  .course_type1 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_type2 {
+    margin-left: 20px;
+  }
+  
+  .course_type2 span {
+    margin-bottom: 10px;
+    display: block;
+  }
+  
+  .course_empty {
+    color: rgb(110, 110, 110);
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  
+  .el_cards>>>.el-card__body {
+    height: 100%;
+  }
+  
+  .courseBtnBox {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: calc(100% - 170px);
+    padding: 10px;
+  }
+  
+  .wordUpload {
+    display: flex;
+  }
+  
+  .wordUpload>.buttonUp {
+    margin-right: 5px;
+  }
+  
+  .out_box {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: calc(100% / 5 - (15px * 4) / 5);
+    /* width: 280px; */
+    background: #fff;
+		/* background-color: white; */
+    margin-right: 15px;
+    /* border: 1px solid #ccc; */
+    height: fit-content;
+    box-sizing: border-box;
+    border-radius: 0px 0px 5px 5px;
+    /* overflow: hidden; */
+    margin-bottom: 15px;
+    position: relative;
+    border-radius: 8px;
+    box-sizing: border-box;
+    overflow: hidden;
+    border: 1px solid #3682fc00;
+		cursor: pointer;
+		border: 1px solid #6a9ff5;
+  }
+
+	.out_boxActive{
+		box-sizing: border-box;
+		border: 3px solid #3681FC !important;
+
+	}
+  
+  .out_box:hover {
+    border: 1px solid #3681FC;
+  }
+  
+  .out_box:nth-child(5n) {
+    margin-right: 0;
+  }
+  
+  .bottom_box {
+    display: flex;
+    padding: 10px;
+    flex-direction: column;
+    box-sizing: border-box;
+    height: 121px;
+    flex-wrap: nowrap;
+    justify-content: space-evenly;
+  }
+  
+  .bottom_box>div:nth-child(1) {
+    width: 100%;
+    /* overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold; */
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold;
+  }
+  
+  .bottom_box>div:nth-child(1)>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .tup {
+    width: 100%;
+    height: 180px;
+    margin: 0 auto;
+    overflow: hidden;
+    display: flex;
+    align-items: center;
+    padding: 10px;
+    box-sizing: border-box;
+  }
+  
+  .tup>img {
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+  }
+  
+  .kc_time {
+    margin-top: 8px;
+    font-size: 14px;
+    color: #717C8D;
+  }
+  
+  .kc_time+.kc_time {
+    margin-top: 0;
+  }
+  
+  .kc_t {
+    margin-top: 5px;
+    width: 100%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+  .kc_t>span:nth-child(1) {
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .kc_t>span:nth-child(2) {
+    min-width: fit-content;
+    font-size: 14px;
+    color: #8c8c8c;
+  }
+  
+  .three_bottom {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+    height: 45px;
+    align-items: center;
+    background: #fff;
+    font-size: 14px;
+    border-top: 1px solid #ddd;
+    box-sizing: border-box;
+  }
+  
+  .three_bottom>div {
+    cursor: pointer;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .three_bottom>div+div {
+    border-left: 1px solid #ddd;
+  }
+  
+  .three_bottom>div:hover {
+    color: #3681FC;
+    font-weight: bold;
+  }
+  
+  .three_bottom .deleteB {
+    color: #E96E6E;
+  }
+  
+  .three_bottom .deleteB:hover {
+    color: #E96E6E;
+    font-weight: bold;
+  }
+  
+  .head_left {
+    display: flex;
+  }
+  
+  .student_input>>>.el-input__inner {
+    height: 40px;
+    width: 190px;
+    font-size: 13px;
+    padding: 0 10px;
+  }
+  
+  .course_button {
+    color: #fff;
+    background: #2268bc;
+    width: 75px;
+    height: 40px;
+    padding: 0 !important;
+    font-size: 12px;
+    line-height: 40px;
+  }
+  
+  /* .all_choose {
+    margin: 15px 0 10px;
+    height: 20%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    max-width: calc(100% / 3);
+  }
+  
+  .all_choose > span {
+    width: 50px;
+    display: block;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    align-content: space-between;
+    height: 100%;
+    justify-content: flex-start;
+    width: 60%;
+    min-width: 868px;
+    align-items: center;
+  } */
+  
+  /* .choose > div:nth-child(2) {
+    margin-left: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(4) {
+    margin-right: 1%;
+    width: 32.33333%;
+  }
+  
+  .choose > div:nth-child(5) {
+    margin: 5px 0 0 1%;
+  }
+  
+  .choose > div:nth-child(4) > span {
+    width: 74px !important;
+    min-width: 74px;
+  }
+  
+  .choose > div:nth-child(4) >>> .el-select {
+    width: 217.5px;
+    min-width: 215.06px;
+  } */
+  
+  .clear {
+    width: 70px;
+    height: 35px;
+    background: #0061FF;
+    color: #fff;
+    text-align: center;
+    border-radius: 5px;
+    line-height: 35px;
+    cursor: pointer;
+    margin-left: 20px;
+  }
+  
+  .ct_box {
+    height: 500px;
+    overflow: auto;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .myCourse {
+    position: absolute;
+    background: #3c3c3c;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .xtCourse {
+    position: absolute;
+    background: #0061FF;
+    width: 70px;
+    height: 30px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 14px;
+    text-align: center;
+    line-height: 30px;
+    top: 5px;
+    left: 5px;
+  }
+  
+  .sub_head {
+    position: relative;
+  }
+  
+  .sub_head::after {
+    content: "";
+    width: 100%;
+    background: #5a9cea;
+    height: 2px;
+    position: absolute;
+    left: 0;
+    bottom: -10px;
+  }
+  
+  .subClick {
+    /* font-size: 16px; */
+    font-size: 26px;
+    cursor: pointer;
+    margin-left: 17.5px;
+    /* color: #ab582f; */
+    /* color: #409eff; */
+    color: #999;
+  }
+  
+  .subClick:hover {
+    color: #000;
+  }
+  
+  .more {
+    position: relative;
+  }
+  
+  .more:hover div {
+    display: block;
+    color: #000;
+  }
+  
+  .more div {
+    position: absolute;
+    bottom: 0px;
+    transform: translate(-50%, 100%);
+    background: #f5f4f4;
+    padding: 10px 20px;
+    z-index: 99;
+    width: 50px;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 3px #80808020;
+    display: none;
+  }
+  
+  .more div>span+span {
+    margin-top: 10px;
+  }
+  
+  .more div>span {
+    display: block;
+    width: 100%;
+    text-align: center;
+  }
+  
+  .more div>span:hover {
+    color: #79a2ff;
+  }
+  
+  .line {
+    width: 100%;
+    height: 15px;
+    /* background: #e6eaf0; */
+		background-color: white;
+  }
+  
+  .reBox {
+    width: 100%;
+    /* padding-left: 20px; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    overflow: hidden;
+    padding: 10px 15px 0;
+  }
+  
+  .reTop {
+    padding: 0 0 5px;
+    /* padding: 20px 0 0 0; */
+    /* border-bottom: 1px solid #eee; */
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    align-items: center;
+    justify-content: space-between;
+  }
+  
+  .reTop>div:nth-child(1) {
+    font-weight: bold;
+    /* width: 40px; */
+    /* border-bottom: 1px solid #205cc6; */
+    /* padding-bottom: 20px; */
+    color: #205cc6;
+    /* font-size: 20px; */
+  }
+  
+  .reTop .reTopCh {
+    display: flex;
+  }
+  
+  .reTop .searchI {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border: 1px solid #ccced3;
+    width: 250px;
+    border-radius: 8px;
+    padding: 5px 0;
+    /* margin-bottom: 10px; */
+    background: #fafafa;
+    margin: 0 0 0 10px;
+  }
+  
+  .search {
+    width: 20px;
+    padding: 0 5px;
+    display: flex;
+    align-items: center;
+  }
+  
+  .search>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .sInput {
+    border: none;
+    width: 85%;
+    background: #fafafa;
+  }
+  
+  .sInput:focus-visible {
+    outline: none;
+  }
+  
+  .typeCss {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  
+  .choose {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+    padding: 10px 0;
+  }
+  
+  .all_choose {
+    display: flex;
+    flex-direction: row;
+    align-items: baseline;
+    margin: 2px 0;
+    width: 100%;
+  }
+  
+  .all_choose>span {
+    display: flex;
+    margin-right: 5px;
+  }
+  
+  .all_choose>span>span {
+    min-width: 65px;
+    max-width: 65px;
+    display: block;
+    text-align-last: justify;
+  }
+  
+  .all_choose>span::after {
+    content: ':';
+  }
+  
+  .all_choose>span:nth-child(1) {
+    font-weight: bold;
+  }
+  
+  .all_choose>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 820px;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+  }
+  
+  .all_choose>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+  }
+  
+  .cName {
+    cursor: pointer;
+    margin: 0 10px 5px 0;
+    color: #b9b6b9;
+    min-width: 80px;
+    width: 80px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  
+  .isCType {
+    color: #6282c2;
+  }
+  
+  .pType_box {
+    margin-top: 0;
+  }
+  
+  .pType_box>>>.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
+    -webkit-box-shadow: none !important;
+    box-shadow: none !important;
+  }
+  
+  .buttonBox {
+    position: absolute;
+    bottom: -0;
+    transform: translateY(100%);
+    background: #fff;
+    border-radius: 5px;
+    box-shadow: 0 0 3px 1px #e3e3e3;
+    width: 100%;
+  }
+  
+  .buttonBox>div {
+    height: 40px;
+    line-height: 40px;
+    width: 100%;
+    text-align: center;
+    color: #000;
+    box-sizing: border-box;
+  }
+  
+  .buttonBox>div+div {
+    border-top: 1px solid #e0e0e0;
+  }
+  
+  .buttonBox>div:hover {
+    background: #f6f8ff;
+  }
+
+	.checkedAll >>> .el-checkbox{
+		display: flex !important;
+		align-items: center !important;
+
+	}
+	</style>
+  

+ 320 - 0
src/components/pages/test/add/components/course2/index.vue

@@ -0,0 +1,320 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题</span>
+                <el-input v-autoHeight="35" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></el-input>
+            </div>
+            <div class="set_title">
+                <span>问题描述</span>
+                <el-input v-autoHeight="35" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></el-input>
+            </div>
+            <!-- <div class="set_title" style="flex-direction: column;" v-if="false">
+                <div class="title_setting">
+                    <span>选择课程</span>
+                    <div @click="openCourse" class="setting el-icon-plus">
+											<span>添加课程</span>
+										</div>
+                </div>
+                <div class="set_title_list" v-loading="loading">
+                    <div v-for="(item, index) in courses" class="set_title_list_item" :key="index"
+                        v-if="coursesList.find(i => i.courseId == item)">
+                        <div class="set_title_list_itemBtn el-icon-remove-outline" @click.stop="delCourse(item)"></div>
+                        <div class="set_title_list_itemLabel">
+                            <span>课程名称:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).title }}</span>
+                            <span>创建人:{{ coursesList.find(i => i.courseId == item) &&
+        coursesList.find(i => i.courseId == item).username }}</span>
+                        </div>
+                    </div>
+                </div>
+            </div> -->
+        </div>
+        <!-- <courseDilogVue :dialogVisibleCourse.sync="dialogVisibleCourse" :courses="courses" @setCourse="setCourse">
+        </courseDilogVue> -->
+    </div>
+</template>
+
+<script>
+import courseDilogVue from './courseDilog.vue'
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+        courseDilogVue
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            loading: false,
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {},
+            dialogVisibleCourse: false,
+            courses: [],
+            coursesList: [],
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        },
+        async courses(newValue) {
+            this.loading = true;
+            let result = [];
+            let params = {
+                cid: this.courses.join(',')
+            }
+            let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll', params);
+            result = data.data[0]
+            this.coursesList = result;
+            this.loading = false;
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+        openCourse() {
+            this.dialogVisibleCourse = true
+        },
+        setCourse(courses) {
+            this.checkJson.courses = courses
+            this.courses = courses
+            this.$forceUpdate()
+        },
+        // 删除课程
+        delCourse(cid) {
+            let index = this.courses.findIndex(i => i == cid);
+            this.courses.splice(index, 1)
+        }
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: ""
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+            this.courses = this.checkJson.courses
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+		line-height: 35px;
+		margin-right: 30px;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    /* padding: 12px 14px; */
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 20px;
+    /* background: #fff; */
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    /* min-height: 48px; */
+    /* border: 1px solid #3682fc00; */
+    /* border: 1px solid #CAD1DC; */
+}
+
+.binfo_textarea {
+    /* border: 1px solid #CAD1DC; */
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+
+.title_setting{
+		width: 100%;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: flex-start;
+}
+
+.title_setting>span{
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.setting {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    /* justify-content: flex-end; */
+    width: 100%;
+		color:#3681FC;
+		margin-left: 30px;
+}
+
+.setting>span{
+	margin-left: 5px;
+}
+/* 
+.setting::before {
+    content: '';
+    display: block;
+    width: 20px;
+    height: 20px;
+    background-image: url('../../../../../../assets/icon/test/test_setting_icon.png');
+    background-size: 100% 100%;
+    margin-right: 5px;
+} */
+
+.set_title_list_item {
+    display: flex;
+    align-items: center;
+    width: auto;
+    height: 40px;
+    margin-bottom: 20px;
+    border-radius: 10px;
+    padding: 0 20px
+}
+
+.set_title_list_item:hover {
+    background-color: #d4dde1;
+}
+
+.set_title_list_item:hover>.set_title_list_itemBtn {
+    opacity: 1;
+}
+
+.set_title_list_itemBtn {
+    font-size: 18px;
+    margin-right: 20px;
+    cursor: pointer;
+    opacity: 0;
+}
+
+.set_title_list_itemLabel {
+    display: flex;
+    align-items: center;
+}
+
+.set_title_list_itemLabel>span {
+    margin-right: 20px;
+}
+
+.set_title_list {
+    min-width: 100%;
+    /* min-height: 200px; */
+}
+</style>

+ 262 - 0
src/components/pages/test/add/components/evaBox/eva.vue

@@ -0,0 +1,262 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span @click.stop="updateTitle()" v-if="!updateList.title">{{
+          cJson.title ? cJson.title : "输入问题"
+        }}</span>
+        <input
+          v-if="updateList.title"
+          ref="titleRef"
+          class="editInput"
+          v-model="checkJson.title"
+          @blur="save"
+          @keyup.enter="save"
+          placeholder="输入问题"
+        />
+      </div>
+      <div
+        class="detail"
+        v-if="!updateList.detail"
+        @click.stop="updateDetail()"
+      >{{cJson.detail ? cJson.detail : "暂无描述"}}</div>
+      <input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述说明"
+      />
+      <div class="scoreList">
+        <div
+          class="scoreItem"
+          v-for="item in Array.from({length:checkJson.big+1},(_,i)=>i)"
+					v-if="item>=checkJson.small"
+          :key="item"
+        >{{item}}</div>
+      </div>
+      <div class="setScore_box">
+        <input
+          @click.stop=""
+          class="binfo_input"
+          type="value"
+          v-model.number="checkJson.small"
+          @change="numberPan"
+        />
+        <div>
+          <span>~</span>
+        </div>
+        <input
+          @click.stop=""
+          class="binfo_input"
+          type="value"
+          @blur="save"
+          @keyup.enter="save"
+          v-model.number="checkJson.big"
+          @change="numberPan2"
+        />
+      </div>
+
+      <!-- <div class="detail" v-if="cJson.detail">{{ cJson.detail }}</div> -->
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+		cJson2:{
+			type:Object
+		},
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+		index:{
+			type:String,
+			default:""
+		}
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      updateList: {
+        title: false,
+        detail: false
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.$emit("setJson", newVal,this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        this.$refs.titleRef.focus();
+      });
+    },
+    updateDetail() {
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        this.$refs.detailRef.focus();
+      });
+    },
+    numberPan() {
+      this.checkJson.small = Number(this.checkJson.small);
+      if (/[^\d]/.test(this.checkJson.small) || this.checkJson.small < 0) {
+        this.$message.error("请输入大于0的数字");
+        this.checkJson.small = 0;
+      } else if (this.checkJson.small === "") {
+        this.checkJson.small = 0;
+      } else if (this.checkJson.big <= this.checkJson.small) {
+        this.$message.error("请输入小于" + this.checkJson.big + "的数字");
+        this.checkJson.small = this.checkJson.big - 1;
+      }
+    },
+    numberPan2() {
+      this.checkJson.big = Number(this.checkJson.big);
+      if (/[^\d]/.test(this.checkJson.big) || this.checkJson.big < 0) {
+        this.$message.error("请输入大于0的数字");
+        this.checkJson.big = this.checkJson.small + 1;
+      } else if (this.checkJson.big === "") {
+        this.checkJson.big = this.checkJson.small + 1;
+      } else if (this.checkJson.big <= this.checkJson.small) {
+        this.$message.error("请输入大于" + this.checkJson.small + "的数字");
+        this.checkJson.big = this.checkJson.small + 1;
+      }
+    }
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     detail: "",
+    //     small: 0,
+    //     big: 10
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1px solid #cad1dc;
+}
+
+.binfo_input:focus-visible {
+  border: 1px solid #3681fc !important;
+}
+
+.setScore_box {
+  width: 100%;
+  height: 50px;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+}
+
+.setScore_box > div {
+  margin: auto 20px;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  font-size: 20px;
+  font-weight: bold;
+  text-align: center;
+}
+
+.setScore_box > div > span {
+  position: relative;
+  top: 10px;
+}
+
+.setScore_box > input {
+  width: 100px;
+  height: 40px;
+}
+
+.scoreList {
+  width: 100%;
+  height: auto;
+  display: flex;
+  flex-wrap: wrap;
+	margin-top: 20px;
+}
+
+.scoreItem{
+	width: 35px;
+	height: 35px;
+	background-color: #DEE0E3;
+	color: white;
+	border-radius: 8px;
+	display: flex;
+  justify-content: center;
+  align-items: center;
+	margin-right: 15px;
+	font-size: 18px;
+	margin-bottom: 15px;
+}
+</style>

+ 224 - 0
src/components/pages/test/add/components/evaBox/index.vue

@@ -0,0 +1,224 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+            </div>
+            <div class="set_title">
+                <span>问题描述:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></textarea>
+            </div>
+            <div class="set_title">
+                <span>分值:</span>
+                <div class="number">
+                    <input class="binfo_input" type="value" v-model="checkJson.small" @change="numberPan"/>
+                    <span>~</span>
+                    <input class="binfo_input" type="value" v-model="checkJson.big" @change="numberPan2"/>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {}
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.small) || this.checkJson.small < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.small = 0
+            }else if(this.checkJson.small === ''){
+                this.checkJson.small = 0
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入小于'+this.checkJson.big+'的数字')
+                this.checkJson.small = this.checkJson.big - 1
+            }
+        },
+        numberPan2() {
+            if (/[^\d]/.test(this.checkJson.big) || this.checkJson.big < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big === ''){
+                this.checkJson.big = this.checkJson.small + 1
+            }else if(this.checkJson.big <= this.checkJson.small){
+                this.$message.error('请输入大于'+this.checkJson.small+'的数字')
+                this.checkJson.big = this.checkJson.small + 1
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: "",
+                small: 0,
+                big: 10,
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+
+.set_title > .number{
+    display: flex;
+    align-items: center;
+}
+
+.set_title > .number > span{
+    margin: 0 10px;
+}
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+</style>

+ 528 - 0
src/components/pages/test/add/components/file/file.vue

@@ -0,0 +1,528 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choices" v-if="!cJson">
+      <div class="binfo_input">
+        <div><span>填写者上传区</span></div>
+      </div>
+    </div>
+    <div v-else class="choice_box">
+      <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
+      <div class="title" style="display: flex;">
+        <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+          `(${option[cJson.type].name})`
+        }}</span> -->
+        <span @click.stop="updateTitle()" v-if="!updateList.title">{{
+          cJson.title ? cJson.title : "输入问题"
+        }}</span>
+        <input
+          v-if="updateList.title"
+          ref="titleRef"
+          class="editInput"
+          v-model="checkJson.title"
+          @blur="save"
+          @keyup.enter="save"
+          placeholder="输入问题"
+        />
+        <span style="color: #efa030;min-width:fit-content" v-if="cJson.score"
+          >({{ cJson.score ? "分值:" + cJson.score + "分" : "" }})</span
+        >
+        <!-- </div><div v-html="cJson.title"></div> -->
+      </div>
+      <div
+        class="detail"
+        v-if="!updateList.detail"
+        @click.stop="updateDetail()"
+      >{{ cJson.detail ? cJson.detail : "暂无描述" }}</div>
+      <input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述说明"
+      />
+      <div class="uploadFileBox">
+        <div v-loading="proVisible">
+          <el-button @click.stop="addFile()" type="primary" size="mini"
+            >上传模板</el-button
+          >
+        </div>
+        <div
+          class="file_box"
+          v-if="checkJson.mobanFile && checkJson.mobanFile.length"
+          v-loading="loading"
+        >
+          <div
+            class="file_item"
+            v-for="(item, index) in checkJson.mobanFile"
+            :key="index"
+            @click.stop=""
+          >
+            <div class="file_name">{{ item.name }}</div>
+            <div class="file_btns">
+              <div class="file_btn" @click.stop="downloadFile(index)">下载</div>
+              <div class="file_btn" @click.stop="delFile(index)">删除</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="choices">
+        <div class="binfo_input">
+          <div><span>填写者上传区</span></div>
+        </div>
+        <!-- <textarea readonly rows="2" class="binfo_input binfo_textarea" cols
+                    placeholder=""></textarea> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+const getFile = url => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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"
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name
+    };
+    s3.getObject(params, function(err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        resolve({ data: data.Body });
+        console.log(data);
+      }
+    });
+  });
+};
+
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    },
+		cJson2:{
+			type:Object
+		},
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      updateList: {
+        title: false,
+        detail: false
+      },
+      checkJson: {},
+      proVisible: false,
+      loading: false
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        // console.log("测试测试保存",newVal)
+        this.$emit("setJson", newVal, this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        this.$refs.titleRef.focus();
+      });
+    },
+    updateDetail() {
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        this.$refs.detailRef.focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+    addFile() {
+      let input = document.createElement("input");
+      input.type = "file";
+      // input.accept = ".wav";
+      // input.accept = "audio/*, .txt, .pdf, .xlsx";
+      input.accept = ".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf";
+      input.multiple = true;
+      input.click();
+      input.onchange = async () => {
+        let files = input.files;
+        let file = "";
+        let cfindex2 = 0;
+        for (var cfindex = 0; cfindex < files.length; cfindex++) {
+          file = files[cfindex];
+          if (!/\.(docx|doc|xls|xlsx|ppt|pptx|pdf)$/i.test(file.name)) {
+            return this.$message.error(
+              "请上传.docx,.doc,.xls,.xlsx,.ppt,.pptx,.pdf格式的文件"
+            );
+          }
+          var credentials = {
+            accessKeyId: "AKIATLPEDU37QV5CHLMH",
+            secretAccessKey: "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"
+          }; //秘钥形式的登录上传
+          window.AWS.config.update(credentials);
+          window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+          var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+          var _this = this;
+
+          // _this.progress = 0;
+          _this.proVisible = true;
+          // _this.isFinishSize = 0;
+          // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+          let _name = file.name;
+          let size = file.size;
+          _this.$forceUpdate();
+          if (file) {
+            var params = {
+              Key:
+                file.name.split(".")[0] +
+                new Date().getTime() +
+                "." +
+                file.name.split(".")[file.name.split(".").length - 1],
+              ContentType: file.type,
+              Body: file,
+              "Access-Control-Allow-Credentials": "*",
+              ACL: "public-read"
+            }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+            var options = {
+              partSize: 2048 * 1024 * 1024,
+              queueSize: 2,
+              leavePartsOnError: true
+            };
+            bucket
+              .upload(params, options)
+              .on("httpUploadProgress", function(evt) {
+                //这里可以写进度条
+                // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+                // _this.progress = parseInt((evt.loaded / evt.total) * 100);
+                // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+                // _this.$forceUpdate();
+              })
+              .send(function(err, data) {
+                cfindex2++;
+
+                // _this.progress = 100;
+                // _this.isFinishSize = _this.isAllSize;
+                // _this.$forceUpdate();
+                // setTimeout(() => {
+                //     _this.proVisible = false;
+                //     _this.$forceUpdate();
+                // }, 1000);
+                setTimeout(() => {
+                  if (cfindex2 == files.length || cfindex2 > files.length) {
+                    _this.proVisible = false;
+                  }
+                }, 1000);
+                // loading.close();
+                if (err) {
+                  _this.$message.error("上传失败");
+                } else {
+                  let _type = 2;
+                  var imgA = [
+                    "png",
+                    "jpg",
+                    "jpeg",
+                    "bmp",
+                    "gif",
+                    "webp",
+                    "psd",
+                    "svg",
+                    "tiff"
+                  ];
+                  var fileA = [
+                    "DOC",
+                    "DOCX",
+                    "DOCM",
+                    "DOTM",
+                    "DOTX",
+                    "PPTX",
+                    "PPSX",
+                    "PPT",
+                    "PPS",
+                    "PPTM",
+                    "POTM",
+                    "PPAM",
+                    "POTX",
+                    "PPSM",
+                    "XLSX",
+                    "XLS"
+                  ];
+                  var videoA = [
+                    "AVI",
+                    "NAVI",
+                    "MPEG",
+                    "ASF",
+                    "MOV",
+                    "WMV",
+                    "3GP",
+                    "RM",
+                    "RMVB",
+                    "FLV",
+                    "F4V",
+                    "H.264",
+                    "H.265",
+                    "REAL VIDEO",
+                    "MKV",
+                    "WebM",
+                    "HDDVD",
+                    "MP4",
+                    "MPG",
+                    "M4V",
+                    "MGV",
+                    "OGV",
+                    "QTM",
+                    "STR",
+                    "AMC",
+                    "DVX",
+                    "EVO",
+                    "DAT",
+                    "OGG",
+                    "OGM"
+                  ];
+                  if (
+                    fileA.indexOf(
+                      data.Location.split(".")[
+                        data.Location.split(".").length - 1
+                      ].toLocaleUpperCase()
+                    ) != -1
+                  ) {
+                    _type = 1; //word 文件
+                  } else if (
+                    videoA.indexOf(
+                      data.Location.split(".")[
+                        data.Location.split(".").length - 1
+                      ].toLocaleUpperCase()
+                    ) != -1
+                  ) {
+                    _type = 2; //视频
+                  } else if (
+                    imgA.indexOf(
+                      data.Location.split(".")[
+                        data.Location.split(".").length - 1
+                      ].toLocaleLowerCase()
+                    ) != -1
+                  ) {
+                    _type = 3; //图片
+                  } else if (
+                    "pdf".indexOf(
+                      data.Location.split(".")[
+                        data.Location.split(".").length - 1
+                      ].toLocaleLowerCase()
+                    ) != -1
+                  ) {
+                    _type = 4; //pdf
+                  } else {
+                    _type = 5; //文件
+                  }
+                  if (_this.checkJson.mobanFile) {
+                    _this.checkJson.mobanFile.push({
+                      name: _name,
+                      url: data.Location,
+                      type: _type
+                    });
+                    _this.$forceUpdate();
+                  } else {
+                    _this.checkJson.mobanFile = [];
+                    _this.checkJson.mobanFile.push({
+                      name: _name,
+                      url: data.Location,
+                      type: _type
+                    });
+                    _this.$forceUpdate();
+                  }
+                  _this.$forceUpdate();
+                  _this.$emit("setJson", _this.checkJson, _this.index);
+                  console.log(data.Location);
+                }
+              });
+          }
+        }
+      };
+    },
+    delFile(index) {
+      this.checkJson.mobanFile.splice(index, 1);
+      this.$forceUpdate();
+      this.$emit("setJson", this.checkJson, this.index);
+    },
+    downloadFile(index) {
+      this.loading = true;
+      let file = this.checkJson.mobanFile[index];
+      getFile(file.url).then(data => {
+        this.loading = false;
+        if (data.data != 1) {
+          // 下载文件, 并存成ArrayBuffer对象
+          const file_name = file.name; // 获取文件名
+          const file_data = data.data; // 获取文件数据
+          let url = window.URL.createObjectURL(new Blob([file_data]));
+          let a = document.createElement("a");
+          a.name = file_name;
+          a.href = url;
+          a.download = file_name;
+          a.click();
+          console.log(data);
+          this.$message.success("下载成功");
+        } else {
+          this.$message.error("下载失败");
+        }
+      });
+    }
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     type: 1,
+    //     detail: ""
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+
+.uploadFileBox {
+  margin-top: 10px;
+}
+
+.file_box {
+  width: 100%;
+  box-sizing: border-box;
+  margin: 10px 0;
+}
+
+.file_item {
+  display: flex;
+  width: 100%;
+  padding: 5px;
+  box-sizing: border-box;
+  border-radius: 5px;
+  transition: 0.2s;
+}
+
+.file_item + .file_item {
+  margin-top: 10px;
+}
+
+.file_name {
+  color: #747474;
+}
+
+.file_item:hover {
+  background: #f0f2f5;
+}
+
+.file_btns {
+  margin-left: auto;
+  display: flex;
+  align-items: center;
+}
+
+.file_btn + .file_btn {
+  margin-left: 10px;
+}
+
+.file_btn {
+  color: #3681fc;
+  cursor: pointer;
+}
+</style>

+ 536 - 0
src/components/pages/test/add/components/file/index.vue

@@ -0,0 +1,536 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_type" style="margin-top: 0;">
+                <span>附件类型:</span>
+                <el-select v-model="checkJson.type" @change="changeAnswer">
+                    <el-option v-for="item in options" :key="item.type" :label="item.name" :value="item.type">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="set_type">
+                <span>题目分数:</span><el-input v-model="checkJson.score" class="input" placeholder="请输入分数"
+                    style="width: 120px" @change="numberPan"></el-input>
+            </div>
+            <div class="set_file">
+                <div class="set_type">
+                    <span>模板上传:</span>
+                    <div class="btn" @click.stop="addImg($event)" v-loading="proVisible">
+                        <el-button type="primary" size="mini">上传模板</el-button>
+                        <input type="file" accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf" style="display: none" multiple="multiple"
+                            @change="beforeUpload($event)" />
+                    </div>
+                </div>
+                <div class="file_box" v-if="checkJson.mobanFile && checkJson.mobanFile.length" v-loading="loading">
+                    <div class="file_item" v-for="(item, index) in checkJson.mobanFile" :key="index">
+                        <div class="file_name">{{ item.name }}</div>
+                        <div class="file_btns">
+                            <div class="file_btn" @click="downloadFile(index)">下载</div>
+                            <div class="file_btn" @click="delFile(index)">删除</div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="set_title">
+                <span>表单问题:</span>
+                <!-- <el-input v-model="checkJson.title" class="input" placeholder="请输入标题"></el-input> -->
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+                <!-- <editor-bar v-model="checkJson.title" @change="change"></editor-bar> -->
+            </div>
+            <div class="set_title">
+                <span>问题描述:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></textarea>
+            </div>
+            <!-- <div class="set_options">
+                <div class="title">附件答案:</div>
+                <div class="xuan_body">
+                    <el-input v-model="checkJson.answer" class="input" placeholder="请输入答案"></el-input>
+                </div>
+            </div> -->
+        </div>
+    </div>
+</template>
+
+<script>
+
+const getFile = (url) => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+      let url2 = url;
+      let _url2 = "";
+      if (
+        url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+      ) {
+        _url2 = url2.split(
+          "https://view.officeapps.live.com/op/view.aspx?src="
+        )[1];
+      } else {
+        _url2 = url2;
+      }
+      var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+      let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
+      var params = {
+        Bucket: "ccrb",
+        Key: name
+      };
+      s3.getObject(params, function (err, data) {
+        if (err) {
+          console.log(err, err.stack)
+          resolve({ data: 1 });
+        }else {
+          resolve({ data: data.Body });
+          console.log(data); 
+        }
+      });
+  });
+};
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {},
+            proVisible: false,
+            loading: false
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        numberPan() {
+            if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+                this.$message.error('请输入大于0的数字')
+                this.checkJson.score = ''
+            }
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+        addImg(e) {
+            var el = e.currentTarget;
+            el.getElementsByTagName("input")[0].click();
+            e.target.value = "";
+        },
+        delFile(index){
+            this.checkJson.mobanFile.splice(index, 1);
+            this.$forceUpdate();
+            this.$emit("setJson", this.checkJson)
+        },
+        downloadFile(index){
+            this.loading = true;
+            let file = this.checkJson.mobanFile[index]
+            getFile(file.url).then((data) => {
+                this.loading = false;
+                if (data.data != 1) {
+                    // 下载文件, 并存成ArrayBuffer对象
+                    const file_name =file.name; // 获取文件名
+                    const file_data = data.data; // 获取文件数据
+                    let url = window.URL.createObjectURL(new Blob([file_data]));
+                    let a = document.createElement("a");
+                    a.name = file_name;
+                    a.href = url;
+                    a.download = file_name;
+                    a.click();
+                    console.log(data); 
+                    this.$message.success("下载成功");
+                }else {
+                    this.$message.error("下载失败");
+                }
+            });
+
+        },
+        beforeUpload(event) {
+            let file = "";
+            let cfindex2 = 0;
+            for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
+                file = event.target.files[cfindex];
+
+                var credentials = {
+                    accessKeyId: "AKIATLPEDU37QV5CHLMH",
+                    secretAccessKey: "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"
+                }; //秘钥形式的登录上传
+                window.AWS.config.update(credentials);
+                window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+                var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+                var _this = this;
+
+                // _this.progress = 0;
+                _this.proVisible = true;
+                // _this.isFinishSize = 0;
+                // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+                let _name = file.name;
+                let size = file.size;
+                _this.$forceUpdate();
+                if (file) {
+                    var params = {
+                        Key:
+                            file.name.split(".")[0] +
+                            new Date().getTime() +
+                            "." +
+                            file.name.split(".")[file.name.split(".").length - 1],
+                        ContentType: file.type,
+                        Body: file,
+                        "Access-Control-Allow-Credentials": "*",
+                        ACL: "public-read"
+                    }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+                    var options = {
+                        partSize: 2048 * 1024 * 1024,
+                        queueSize: 2,
+                        leavePartsOnError: true
+                    };
+                    bucket
+                        .upload(params, options)
+                        .on("httpUploadProgress", function (evt) {
+                            //这里可以写进度条
+                            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+                            // _this.progress = parseInt((evt.loaded / evt.total) * 100);
+                            // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+                            // _this.$forceUpdate();
+                        })
+                        .send(function (err, data) {
+                            cfindex2++;
+
+                            // _this.progress = 100;
+                            // _this.isFinishSize = _this.isAllSize;
+                            // _this.$forceUpdate();
+                            // setTimeout(() => {
+                            //     _this.proVisible = false;
+                            //     _this.$forceUpdate();
+                            // }, 1000);
+                            setTimeout(() => {
+                                if (
+                                    cfindex2 == event.target.files.length ||
+                                    cfindex2 > event.target.files.length
+                                ) {
+                                    _this.proVisible = false;
+                                }
+                            }, 1000);
+                            // loading.close();
+                            if (err) {
+                                _this.$message.error("上传失败");
+                            } else {
+                                let _type = 2;
+                                var imgA = [
+                                    "png",
+                                    "jpg",
+                                    "jpeg",
+                                    "bmp",
+                                    "gif",
+                                    "webp",
+                                    "psd",
+                                    "svg",
+                                    "tiff"
+                                ];
+                                var fileA = [
+                                    "DOC",
+                                    "DOCX",
+                                    "DOCM",
+                                    "DOTM",
+                                    "DOTX",
+                                    "PPTX",
+                                    "PPSX",
+                                    "PPT",
+                                    "PPS",
+                                    "PPTM",
+                                    "POTM",
+                                    "PPAM",
+                                    "POTX",
+                                    "PPSM",
+                                    "XLSX",
+                                    "XLS"
+                                ];
+                                var videoA = [
+                                    "AVI",
+                                    "NAVI",
+                                    "MPEG",
+                                    "ASF",
+                                    "MOV",
+                                    "WMV",
+                                    "3GP",
+                                    "RM",
+                                    "RMVB",
+                                    "FLV",
+                                    "F4V",
+                                    "H.264",
+                                    "H.265",
+                                    "REAL VIDEO",
+                                    "MKV",
+                                    "WebM",
+                                    "HDDVD",
+                                    "MP4",
+                                    "MPG",
+                                    "M4V",
+                                    "MGV",
+                                    "OGV",
+                                    "QTM",
+                                    "STR",
+                                    "AMC",
+                                    "DVX",
+                                    "EVO",
+                                    "DAT",
+                                    "OGG",
+                                    "OGM"
+                                ];
+                                if (
+                                    fileA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 1; //word 文件
+                                } else if (
+                                    videoA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleUpperCase()
+                                    ) != -1
+                                ) {
+                                    _type = 2; //视频
+                                } else if (
+                                    imgA.indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 3; //图片
+                                } else if (
+                                    "pdf".indexOf(
+                                        data.Location.split(".")[
+                                            data.Location.split(".").length - 1
+                                        ].toLocaleLowerCase()
+                                    ) != -1
+                                ) {
+                                    _type = 4; //pdf
+                                } else {
+                                    _type = 5; //文件
+                                }
+                                if (_this.checkJson.mobanFile) {
+                                    _this.checkJson.mobanFile.push({
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type
+                                    });
+                                    _this.$forceUpdate();
+                                } else {
+                                    _this.checkJson.mobanFile = [];
+                                    _this.checkJson.mobanFile.push({
+                                        name: _name,
+                                        url: data.Location,
+                                        type: _type
+                                    });
+                                    _this.$forceUpdate();
+                                }
+                                _this.$forceUpdate();
+
+                                console.log(_this.checkJson);
+                                _this.$emit("setJson", _this.checkJson)
+                                console.log(data.Location);
+                            }
+                        });
+                }
+            }
+        },
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                type: 1,
+                detail: ""
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+
+
+.file_box {
+   
+    width: 100%;
+    box-sizing: border-box;
+    margin: 10px 0;
+}
+
+.file_item {
+    display: flex;
+    width: 100%;
+    padding: 5px;
+    box-sizing: border-box;
+    border-radius: 5px;
+}
+
+.file_item+.file_item {
+    margin-top: 10px;
+}
+
+.file_name {
+    color: #747474;
+}
+
+.file_item:hover{
+  background: #fff;
+}
+
+.file_btns {
+    margin-left: auto;
+    display: flex;
+    align-items: center;
+}
+
+.file_btn+.file_btn {
+    margin-left: 10px;
+}
+
+.file_btn {
+    color: #3681fc;
+    cursor: pointer;
+}
+</style>

+ 213 - 0
src/components/pages/test/add/components/number/index.vue

@@ -0,0 +1,213 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-show="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <!-- <div class="set_box" v-if="!cJson">填写者回答区</div> -->
+
+    <div class="choice_box">
+      <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
+      <div class="title">
+        <div style="display: flex;">
+          <!-- <span @click.stop="updateTitle()" style="min-width:fit-content">{{
+            `(${option[cJson.type].name})`
+          }}</span> -->
+          <span v-if="!updateList.title" @click.stop="updateTitle()">{{
+            cJson.title ? cJson.title : "输入问题"
+          }}</span>
+					<!-- <span v-if="!cJson.title && !updateList.title" class="t_empty" @click.stop="updateTitle()">请填写标题</span> -->
+          <input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+
+        </div>
+        <!-- </div><div v-html="cJson.title"></div> -->
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			  <input
+          v-if="updateList.detail"
+          ref="detailRef"
+          class="editInput"
+          v-model="checkJson.detail"
+          @blur="save"
+          style="margin-top: 10px;color: rgb(136, 139, 146);"
+          @keyup.enter="save"
+          placeholder="请填写描述说明"
+        />
+      <div class="choices">
+        <el-select v-model="checkJson.type" placeholder="请选择数字类型">
+        <el-option
+          v-for="item in numberTypeList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+        <!-- <el-input-number v-model="num" :precision="numberType" ></el-input-number> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+    cJson2: {
+      type: Object
+    },
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "问答题" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      number:"",
+      updateList: {
+        title: false,
+        detail:false,
+        brief: false,
+        answer: false
+      },
+      numberTypeList:[
+        {value:"1",label:"整数"},
+        {value:"2",label:"保留一位小数"},
+        {value:"3",label:"保留两位小数"},
+        {value:"4",label:"百分比"}
+      ],
+    };
+  },
+  computed:{
+    numberType(){
+      let _result = 0;
+      if(this.checkJson.type=='1'){//整数
+        _result = 0;
+      }else if(this.checkJson.type=='2'){//保留一位小数
+        _result = 1;
+      }else if(this.checkJson.type=='3'){//保留两位小数
+        _result = 2;
+      }else if(this.checkJson.type=='4'){//百分比
+        _result = 0;
+      }
+
+      return _result;
+    }
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        // console.log("测试测试保存",newVal)
+        this.$emit("setJson", newVal, this.index);
+        console.log("gapW", this.cJson);
+      },
+      deep: true
+    },
+    isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    numberPan() {
+      if (/[^\d]/.test(this.checkJson.score) || this.checkJson.score < 0) {
+        this.$message.error("请输入大于0的数字");
+        this.checkJson.score = "";
+      }
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateDetail(){
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["detailRef"].focus();
+      });
+    },
+    updateAnswer() {
+      this.updateList.answer = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["answerRef"].focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    }
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.cJson)
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #cad1dc;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #cad1dc;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: "Microsoft YaHei";
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681fc !important;
+}
+</style>

+ 166 - 0
src/components/pages/test/add/components/sweep/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span v-if="!updateList.title" @click.stop="updateTitle()">{{ cJson.title?cJson.title:"输入问题" }}</span>
+				<input
+            v-if="updateList.title"
+            ref="titleRef"
+            class="editInput"
+            v-model="checkJson.title"
+            @blur="save"
+            @keyup.enter="save"
+            placeholder="输入问题"
+          />
+      </div>
+      <div class="detail" v-if="!updateList.detail" @click.stop="updateDetail()">{{ cJson.detail?cJson.detail:"暂无描述" }}</div>
+			<input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述说明"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+		cJson2:{
+			type:Object
+		},
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+			updateList: {
+        title: false,
+        detail: false,
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.$emit("setJson", newVal,this.index);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+		save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    },
+		updateTitle(){
+			this.updateList.title = true;
+			this.$nextTick(()=>{
+				this.$refs["titleRef"].focus();
+			})
+		},
+		updateDetail(){
+			this.updateList.detail = true;
+			this.$nextTick(()=>{
+				this.$refs["detailRef"].focus();
+			})
+		}
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     detail: ""
+    //   };
+    // } else {
+    //   this.checkJson = this.depthCopy(this.cJson2);
+    //   this.courses = this.checkJson.courses;
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+
+.choice_box > .detail {
+  width: 100%;
+  word-break: break-all;
+  color: rgb(136, 139, 146);
+  margin: 10px 0 0;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+</style>

+ 192 - 0
src/components/pages/test/add/components/timeBox/index.vue

@@ -0,0 +1,192 @@
+<template>
+    <div class="choice_box jiao" @click.stop="">
+        <!-- <div class="title">设置附件</div> -->
+        <div class="box">
+            <div class="set_title">
+                <span>表单问题:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.title"
+                    placeholder=""></textarea>
+            </div>
+            <div class="set_title">
+                <span>问题描述:</span>
+                <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="checkJson.detail"
+                    placeholder="请输入描述"></textarea>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+// import EditorBar from "../../../../../tools/wangEnduit";
+export default {
+    components: {
+        // EditorBar,
+    },
+    props: {
+        cJson: {
+            type: Object,
+        },
+    },
+    data() {
+        return {
+            ctype: 1,
+            options: [
+                { type: 1, name: '附件' },
+                // { type: 2, name: '多选题' }
+            ],
+            checkJson: {}
+        }
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        checkJson: {
+            handler(newVal) {
+                this.$emit("setJson", newVal)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        changeAnswer() {
+            this.checkJson.answer = []
+        },
+        change(val) {
+            this.checkJson.title = val
+            this.$forceUpdate();
+            console.log(val);
+        },
+
+    },
+    mounted() {
+        console.log(1);
+        // console.log(this.cJson);
+        if (!this.cJson) {
+            this.checkJson = {
+                title: "标题",
+                detail: "",
+            };
+        } else {
+            this.checkJson = this.depthCopy(this.cJson);
+        }
+
+    },
+}
+</script>
+
+<style scoped>
+.choice_box {
+    margin-top: 10px;
+    width: 100%;
+    background: #f5f6f7;
+    padding: 10px 10px 10px 36px;
+    box-sizing: border-box;
+    position: relative;
+}
+
+.choice_box>.box {}
+
+.set_type {
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.set_title {
+    margin-top: 10px;
+    display: flex;
+    align-items: flex-start;
+    /* flex-direction: column; */
+}
+
+.set_type>span,
+.set_title>span {
+    min-width: fit-content;
+    font-size: 15px;
+    min-width: 90px;
+    text-align: right;
+}
+
+.set_options {
+    margin-top: 10px;
+}
+
+.set_options>.title {
+    font-size: 15px;
+}
+
+.xuan_body {
+    margin-top: 10px;
+    font-size: 14px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+
+
+.set_title > .number{
+    display: flex;
+    align-items: center;
+}
+
+.set_title > .number > span{
+    margin: 0 10px;
+}
+/* .jiao::before{
+    content: '';
+    position: absolute;
+    width: 0px;
+    height: 0px;
+    top: -20px;
+    left: 15px;
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 10px solid #f6f6f6;
+    border-top: 10px solid transparent;
+} */
+</style>

+ 170 - 0
src/components/pages/test/add/components/timeBox/time.vue

@@ -0,0 +1,170 @@
+<template>
+  <div class="c_box">
+    <div class="mask" v-if="!isOpen"></div>
+    <div class="choice_box">
+      <div class="title" style="display: flex;">
+        <span @click.stop="updateTitle()" v-if="!updateList.title">{{
+          cJson.title
+        }}</span>
+        <input
+          v-if="updateList.title"
+          ref="titleRef"
+          class="editInput"
+          v-model="checkJson.title"
+          @blur="save"
+          @keyup.enter="save"
+          placeholder="请填写标题"
+        />
+      </div>
+      <div
+        class="detail"
+        v-if="!updateList.detail"
+        @click.stop="updateDetail()"
+      >
+        {{ cJson.detail ? cJson.detail : "暂无描述" }}
+      </div>
+      <input
+        v-if="updateList.detail"
+        ref="detailRef"
+        class="editInput"
+        v-model="checkJson.detail"
+        @blur="save"
+        style="margin-top: 10px;color: rgb(136, 139, 146);"
+        @keyup.enter="save"
+        placeholder="请填写描述"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    cJson: {
+      type: Object
+    },
+    cJson2: {
+      type: Object
+    },
+    isOpen: {
+      type: Boolean,
+      default: false
+    },
+    index: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+        // 2: { name: '多选题' }
+      },
+      checkJson: {},
+      updateList: {
+        title: false,
+        detail: false
+      }
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        // console.log("测试测试保存",newVal)
+        this.$emit("setJson", newVal, this.index);
+        console.log("gapW", this.cJson);
+      },
+      deep: true
+    },
+		isOpen(newValue) {
+      if (newValue) {
+        if (!this.cJson2 || Object.keys(this.cJson2).length == 0) {
+          this.checkJson = {
+            title: "标题",
+            type: 1,
+            answer: ""
+          };
+        } else {
+          this.checkJson = this.depthCopy(this.cJson2);
+        }
+      }
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    updateTitle() {
+      this.updateList.title = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["titleRef"].focus();
+      });
+    },
+    updateDetail() {
+      this.updateList.detail = true;
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["detailRef"].focus();
+      });
+    },
+    save() {
+      for (let key in this.updateList) {
+        this.updateList[key] = false;
+      }
+    }
+  },
+  mounted() {
+    // if (!this.cJson || Object.keys(this.cJson).length == 0) {
+    //   this.checkJson = {
+    //     title: "标题",
+    //     detail: ""
+    //   };
+    // } else {
+    //   this.$nextTick(() => {
+    //     this.checkJson = this.depthCopy(this.cJson2);
+    //   });
+    // }
+  }
+};
+</script>
+
+<style scoped>
+@import "../../global_styles.css";
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 5px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+}
+
+.binfo_input > div {
+  border: 1.5px dashed #dfdfdf;
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(249, 250, 251);
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+}
+</style>

+ 40 - 0
src/components/pages/test/add/edit/check/checkGlobal_style.css

@@ -0,0 +1,40 @@
+.c_box{
+	padding-left: 45px;
+}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}

+ 219 - 0
src/components/pages/test/add/edit/check/choice.vue

@@ -0,0 +1,219 @@
+<template>
+    <div class="c_box">
+        <!-- <div class="mask"></div> -->
+        <!-- <div v-if="!cJson">暂未设置题目</div> -->
+        <!-- <div v-if="!cJson">暂未设置题目</div> -->
+        <div class="set_box" v-if="!cJson">请设置题目</div>
+        <div v-else class="choice_box">
+            <div class="title" style="display: flex;align-items: center;">
+                <!-- + `(${option[checkJson.type].name})` -->
+                <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1 }}</span>
+                <span>{{ checkJson.title }}</span>
+                <!-- {{ tindex + 1 + "、" + `(${option[checkJson.type].name})` + checkJson.title }} -->
+                <span style="min-width: fit-content;" v-if="checkJson.type == 2">{{ `(${option[checkJson.type].name})` }}</span>
+                <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score + '分' }})</span></div>
+            <div class="choices">
+                <div class="choice" v-for="(item, index) in checkJson.array" :key="index">
+                    <div class="choice_c" v-if="checkJson.type == 2"  @click="check(checkJson.type, index)"><el-checkbox v-model="checkJson.answer2" :label="index"
+                            :disabled="checktype == 2"></el-checkbox><span
+                            :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
+                           >{{ item.option }}</span></div>
+                    <div class="choice_c" v-if="checkJson.type == 1"  @click="check(checkJson.type, index)"><el-radio v-model="checkJson.answer2[0]" :label="index"
+                            :disabled="checktype == 2"></el-radio><span
+                            :class="{ right: see && cJson.answer.indexOf(index) != -1 }"
+                           >{{ item.option }}</span></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex:{
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '单选题' },
+                2: { name: '多选题' }
+            },
+            checkJson: undefined
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        }
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        check(type, index) {
+            if (this.checktype == 2) {
+                return;
+            }
+            if (type == 2) {
+                if (this.checkJson.answer2.indexOf(index) == -1) {
+                    this.checkJson.answer2.push(index)
+                } else {
+                    this.checkJson.answer2.splice(this.checkJson.answer2.indexOf(index), 1)
+                }
+            } else if (type == 1) {
+                this.checkJson.answer2[0] = index
+            }
+            this.$forceUpdate()
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+		padding-left: 45px;
+}
+
+/* @import '../../global_styles.css'; */
+
+
+
+
+.choice_box>.choices {
+    margin-top: 10px;
+    padding: 0 10px;
+}
+
+.choice_box>.choices>.choice {
+    word-break: break-all;
+}
+
+.choice_box>.choices>.choice+.choice {
+    margin-top: 5px;
+}
+
+.choice_box>.choices>.choice>.choice_c {
+    display: flex;
+}
+
+.choice_box>.choices>.choice>.choice_c>span {
+    /* margin-left: 10px; */
+    cursor: pointer;
+}
+
+.choice_box>.choices>.choice>.choice_c>.el-checkbox {
+    margin-top: 4px;
+    margin-right: 10px;
+}
+
+.choice_box>.choices>.choice>.choice_c>.el-radio {
+    margin-top: 4px;
+    margin-right: 10px;
+}
+
+.choice_c>>>.el-checkbox__label {
+    display: none;
+}
+
+.choice_c>>>.el-radio__label {
+    display: none;
+}
+
+.choice_c .right {
+    color: #efa030;
+}
+
+.choice_c .right::after {
+    content: '(正确答案)';
+}
+
+.choice_box>.choices>.choice>>>.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
+    border-color: #fff !important;
+}
+
+.choice_box>.choices>.choice>>>.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+    background-color: #409EFF !important;
+    border-color: #409EFF !important;
+}
+
+.choice_box>.choices>.choice>>>.el-radio__input.is-disabled.is-checked .el-radio__inner {
+    background-color: #409EFF !important;
+    border-color: #409EFF !important;
+}
+
+.choice_box>.choices>.choice>>>.el-radio__input.is-disabled.is-checked .el-radio__inner::after {
+    background-color: #fff !important;
+}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+
+.choice_c{
+	width: calc(100% - 45px);
+	height: auto;
+	padding: 12px 10px;
+	background-color: #F3F7FD;
+	border: solid 1px #3681FC;
+	border-radius: 30px;
+	display: flex;
+	align-items: center;
+	cursor: pointer;
+	margin-bottom: 10px;
+}
+</style>

+ 243 - 0
src/components/pages/test/add/edit/check/course.vue

@@ -0,0 +1,243 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box" v-loading="isloading">
+            <div class="title" style="display: flex; align-items: center;">
+                <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1 }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000066;margin-top: 5px;">
+            </div>
+            <div class="choices" v-if="checkJson.courses.length">
+                <div class="course" @click="openCourse()">
+                    <div class="banner">
+                        <img :src="courseDetail.cover" alt="">
+                    </div>    
+                    <div class="content">
+                        <div class="c_c">
+                            <span>课程名字:</span>
+                            <span>{{ courseDetail.title }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>课程类型:</span>
+                            <span>{{ courseDetail.name ? courseDetail.name : '暂无' }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>创建人:</span>
+                            <span>{{ courseDetail.username }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>协作者:</span>
+                            <span>{{ courseDetail.xieName ? courseDetail.xieName : '暂无' }}</span>
+                        </div>
+                    </div>    
+                </div>
+                <div class="page" v-if="checktype == '1'">
+                    <el-button type="primary" size="mini" :disabled="page == 0" @click="setPage('-1')">上一个</el-button>
+                    <div class="p_page"><span>{{ page + 1 }}</span><span>/</span><span>{{ checkJson.courses.length }}</span>
+                    </div>
+                    <el-button type="primary" size="mini" :disabled="page == (checkJson.courses.length - 1)"
+                        @click="setPage('1')">下一个</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false,
+            page: 0,
+            isloading: false,
+            courseDetail:{}
+        }
+    },
+    computed: {
+
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        setPage(index) {
+            if (index == '1') {
+                this.page++
+            } else if (index == '-1') {
+                this.page--
+            }
+            this.checkJson.answer2 = this.checkJson.courses[this.page]
+            this.getCourse(this.checkJson.answer2)
+        },
+        openCourse(){
+            top.postMessage({ cid: this.checkJson.answer2, screenType: "3" }, "*");
+        },
+        getCourse(id) {
+            this.isloading = true
+            let params = {
+                cid: id,
+            };
+            this.ajax
+                .get(this.$store.state.api + "getCourseInfoTest", params)
+                .then((res) => {
+                    this.isloading = false
+                    this.courseDetail = res.data[0][0]
+                    this.courseDetail.cover = JSON.parse(this.courseDetail.cover)[0].url
+                })
+                .catch((err) => {
+                    this.isloading = false
+                    console.error(err);
+                });
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+        if(this.checkJson.courses.length){
+            this.page = this.checkJson.courses.indexOf(this.checkJson.answer2)
+            this.getCourse(this.checkJson.answer2)
+        }
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+		padding-left: 45px;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+.choices > .page{
+    margin-top: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.p_page{
+    margin: 0 10px;
+}
+
+.course {
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+.course > .banner {
+    width: 200px;
+    height: 120px;
+    border-radius: 5px;
+    overflow: hidden;
+    border: 1px solid #3896fc;
+    box-sizing: border-box;
+    padding: 5px;
+    margin-right: 15px;
+}
+.course > .banner > img{
+    width: 100%;
+    height: 100%;
+    object-fit: cover;
+}
+.course > .content {}
+.course > .content > .c_c {}
+.course > .content > .c_c + .c_c{
+    margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1){}
+.course > .content > .c_c span:nth-child(2){}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+</style>

+ 377 - 0
src/components/pages/test/add/edit/check/course2.vue

@@ -0,0 +1,377 @@
+<template>
+  <div class="c_box">
+    <div class="choice_box" v-loading="isloading">
+      <div class="title" style="display: flex;align-items: center;">
+        <span class="g_t_index" style="min-width: fit-content;">{{
+          tindex + 1
+        }}</span>
+        <span>{{ checkJson.title }}</span>
+      </div>
+      <div
+        class="detail"
+        v-if="checkJson.detail"
+        v-html="checkJson.detail"
+        style="color: #00000066;margin-top: 5px;"
+      ></div>
+      <!-- <div class="choices">
+                <el-button type="primary" size="small" @click="openCourseD">选择课程</el-button>
+            </div> -->
+      <div class="choices">
+        <div class="c_list">
+          <div
+            class="c_l_add1"
+            v-if="courseDetail.length == 0"
+            @click="openCourseD"
+          >
+            点击选择课程
+          </div>
+          <div
+            class="c_l_item"
+            @click="openCourse(course.courseId)"
+            v-for="(course, index) in courseDetail"
+						 v-if="courseDetail.length!==0"
+            :key="index"
+          >
+            <img :src="course.cover" alt="" />
+            <div>
+              <div>{{ course.title }}</div>
+              <div>{{ course.name ? course.name : "暂无" }}</div>
+              <div>创建人:{{ course.username }}</div>
+              <div>协作者:{{ course.xieName ? course.xieName : "暂无" }}</div>
+            </div>
+          </div>
+
+					<div class="c_l_add2"  @click="openCourseD" v-if="courseDetail.length!==0">点击选择课程</div>
+        </div>
+        <!-- <div class="course" @click="openCourse(course.courseId)" v-for="(course, index) in courseDetail" :key="index">
+                    <div class="banner">
+                        <img :src="course.cover" alt="">
+                    </div>    
+                    <div class="content">
+                        <div class="c_c">
+                            <span>课程名字:</span>
+                            <span>{{ course.title }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>课程类型:</span>
+                            <span>{{ course.name ? course.name : '暂无' }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>创建人:</span>
+                            <span>{{ course.username }}</span>
+                        </div>
+                        <div class="c_c">
+                            <span>协作者:</span>
+                            <span>{{ course.xieName ? course.xieName : '暂无' }}</span>
+                        </div>
+                    </div>    
+                </div> -->
+        <!-- <div class="page" v-if="checktype == '1'">
+                    <el-button type="primary" size="mini" :disabled="page == 0" @click="setPage('-1')">上一个</el-button>
+                    <div class="p_page"><span>{{ page + 1 }}</span><span>/</span><span>{{ checkJson.courses.length }}</span>
+                    </div>
+                    <el-button type="primary" size="mini" :disabled="page == (checkJson.courses.length - 1)"
+                        @click="setPage('1')">下一个</el-button>
+                </div> -->
+      </div>
+    </div>
+    <courseDilogVue
+      :dialogVisibleCourse.sync="dialogVisibleCourse"
+      :courses="checkJson.answer2"
+      @setCourse="setCourse"
+    >
+    </courseDilogVue>
+  </div>
+</template>
+
+<script>
+import courseDilogVue from "../../../add/components/course2/courseDilog.vue";
+export default {
+  components: {
+    courseDilogVue
+  },
+  props: {
+    tindex: {
+      type: Number
+    },
+    cJson: {
+      type: Object
+    },
+    checktype: {
+      type: Number,
+      default: 1
+    },
+    see: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+      },
+      userid: this.$route.query.userid,
+      checkJson: undefined,
+      progress: 0,
+      isFinishSize: 0,
+      proVisible: false,
+      isAllSize: 0,
+      wurl: "",
+      isTong: false,
+      page: 0,
+      isloading: false,
+      courseDetail: [],
+      dialogVisibleCourse: false
+    };
+  },
+  computed: {},
+  watch: {
+    checkJson: {
+      handler(newValue) {
+        this.$emit("update:cJson", newValue);
+      },
+      deep: true
+    }
+  },
+  methods: {
+    setCourse(courses) {
+      this.checkJson.answer2 = courses;
+      this.getCourse(this.checkJson.answer2);
+      this.$forceUpdate();
+    },
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    openFileBox() {
+      this.dialogVisiblefile = true;
+    },
+    setPage(index) {
+      if (index == "1") {
+        this.page++;
+      } else if (index == "-1") {
+        this.page--;
+      }
+      this.checkJson.answer2 = this.checkJson.courses[this.page];
+      this.getCourse(this.checkJson.answer2);
+    },
+    openCourse(cid) {
+      top.postMessage({ cid: cid, screenType: "3" }, "*");
+    },
+    getCourse(id) {
+      this.isloading = true;
+      let params = {
+        cid: id.join(",")
+      };
+      this.ajax
+        .get(this.$store.state.api + "getCourseInfoTestAll", params)
+        .then(res => {
+          this.isloading = false;
+          this.courseDetail = res.data[0];
+          this.courseDetail.forEach(element => {
+            element.cover = JSON.parse(element.cover)[0].url;
+          });
+        })
+        .catch(err => {
+          this.isloading = false;
+          console.error(err);
+        });
+    },
+    openCourseD() {
+      this.dialogVisibleCourse = true;
+    }
+  },
+  mounted() {
+    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
+    if (this.checkJson.answer2.length) {
+      // this.page = this.checkJson.courses.indexOf(this.checkJson.answer2)
+      this.getCourse(this.checkJson.answer2);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+  padding-left: 45px;
+  overflow: visible;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box > .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.choices > .page {
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+}
+
+.p_page {
+  margin: 0 10px;
+}
+
+.course {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.course + .course {
+  margin-top: 10px;
+}
+
+.course > .banner {
+  width: 200px;
+  height: 120px;
+  border-radius: 5px;
+  overflow: hidden;
+  border: 1px solid #3896fc;
+  box-sizing: border-box;
+  padding: 5px;
+  margin-right: 15px;
+}
+.course > .banner > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.course > .content {
+}
+.course > .content > .c_c {
+}
+.course > .content > .c_c + .c_c {
+  margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1) {
+}
+.course > .content > .c_c span:nth-child(2) {
+}
+
+.g_t_index {
+  color: #3681fc;
+  font-size: 28px;
+  font-weight: bold;
+  position: relative;
+  margin-right: 30px;
+  margin-left: -40px;
+}
+
+.g_t_index + span {
+  font-weight: bold;
+  font-size: 18px;
+}
+
+.g_t_index::after {
+  content: "";
+  width: 18px;
+  height: 2px;
+  position: absolute;
+  right: -18px;
+  top: 50%;
+  transform: translateY(-50%);
+  background: #3681fc;
+}
+
+.g_t_index::before {
+  content: "";
+  width: 6px;
+  height: 6px;
+  border-right: 2px solid #3681fc;
+  border-top: 2px solid #3681fc;
+  position: absolute;
+  right: -15px;
+  top: 50%;
+  transform: rotate(45deg) translateY(-5px);
+}
+
+.c_list {
+  width: calc(100% - 10px);
+  min-height: 200px;
+  height: auto;
+  border: 1px solid #e7e7e7;
+  border-radius: 5px;
+  box-sizing: border-box;
+  padding: 10px;
+  display: flex;
+  flex-wrap: wrap;
+  /* overflow: auto; */
+}
+
+.c_l_add1 {
+  width: 100%;
+  height: 200px;
+  background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_add2{
+	width: 230px;
+  height: 200px;
+	background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_item {
+  width: 230px;
+  height: 200px;
+  margin-right: 10px;
+  box-sizing: border-box;
+  border: solid 1px #3896FC;
+  border-radius: 5px;
+	cursor: pointer;
+	box-sizing: border-box;
+	padding: 5px;
+}
+
+.c_l_item > img {
+  width: 100%;
+  height: 110px;
+  object-fit: cover;
+	margin-bottom: 5px;
+}
+
+.c_l_item > div {
+  width: 210px;
+  display: block;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 14px; /* 设置字体大小 */
+  color: #333; /* 设置字体颜色 */
+	box-sizing: border-box;
+}
+</style>

+ 170 - 0
src/components/pages/test/add/edit/check/eva.vue

@@ -0,0 +1,170 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;align-items: center;">
+                <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1}}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color:#00000066;margin-top: 5px;">
+            </div>
+            <div class="choices">
+                <div class="score" :class="{active: (checkJson.answer2 || checkJson.answer2 === 0) && (checkJson.answer2 > index || checkJson.answer2 === index)}" @click="score(index)" v-for="(item, index) in (parseInt(checkJson.big) - parseInt(checkJson.small) + 1)" :key="index">{{ parseInt(checkJson.small) + index }}</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+        openFileBox() {
+            this.dialogVisiblefile = true
+        },
+        score(index){
+            if(this.checktype == '2'){
+                return
+            }
+            this.checkJson.answer2 = index
+        }
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+		padding-left: 45px;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+    white-space: pre-line;
+}
+
+.choice_box>.title {
+    font-weight: bold;
+    width: 100%;
+    word-break: break-all;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 90%;
+    margin: 10px auto 0;
+}
+
+.choices > .score{
+    width: 40px;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 0 20px 10px 0;
+    border-radius: 5px;
+    background: #dee0e3;
+    font-size: 18px;
+    font-weight: bold;
+    color: #fff;
+    cursor: pointer;
+}
+
+.choices > .score.active{
+    background: #65b1ff;
+}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+
+</style>

+ 1157 - 0
src/components/pages/test/add/edit/check/file.vue

@@ -0,0 +1,1157 @@
+<template>
+  <div class="c_box">
+    <!-- <div class="mask"></div> -->
+    <!-- <div v-if="!checkJson">暂未设置题目</div> -->
+    <!-- <div v-if="!cJson">暂未设置题目</div> -->
+    <div class="choices" v-if="!cJson">
+      <div class="binfo_input">
+        <div><span>填写者上传区</span></div>
+      </div>
+    </div>
+    <div v-else class="choice_box">
+      <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
+      <div class="title" style="display: flex;align-items: center;">
+        <!-- + `(${option[checkJson.type].name})` -->
+        <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1}}</span>
+        <span>{{ checkJson.title }}</span>
+        <span
+          style="color: #efa030;min-width: fit-content;"
+          v-if="checkJson.score"
+          >({{ "分值:" + checkJson.score + "分" }})</span	
+        >
+				
+        <!-- </div><div v-html="checkJson.title"></div> -->
+      </div>
+      <div
+        class="detail"
+        v-if="checkJson.detail"
+        v-html="checkJson.detail"
+        style="color: #00000066;margin-top: 5px;"
+      ></div>
+      <div class="choices">
+        <div class="file_box" v-if="checkJson.mobanFile && checkJson.mobanFile.length" v-loading="loading">
+            <div class="file_item" v-for="(item, index) in checkJson.mobanFile" :key="index">
+                <div class="file_name">{{ item.name }}</div>
+                <div class="file_btns">
+                    <div class="file_btn" @click="downloadMobanFile(index)">下载</div>
+                </div>
+            </div>
+        </div>
+      </div>
+      <div class="choices">
+        <div class="uploadBtn" v-if="checktype == 1">
+          <div class="btn" @click.stop="addImg($event)">
+            <span>添加本地文件</span>
+            <input
+              type="file"
+              accept="*"
+              style="display: none"
+              multiple="multiple"
+              @change="beforeUpload($event)"
+            />
+          </div>
+          <div class="btn" @click="openFileBox()">
+            <span>从资源库添加</span>
+          </div>
+          <div class="switch">
+            <el-switch active-color="#3681fc" v-model="isTong"> </el-switch>
+            <span @click="isTong = !isTong">同步至资源库</span>
+          </div>
+        </div>
+        <div class="binfo_input">
+          <div class="fileBox" v-if="(checkJson.file && checkJson.file.length) || uploadList.length">
+            <div class="fileC">
+              <div
+                class="file"
+                v-for="(item, index) in checkJson.file"
+                :key="index"
+                @click.stop="checkFile(item)"
+              >
+                <img
+                  class="del"
+                  src="../../../../../../assets/icon/fileIcon/deleteworks.png"
+                  @click.stop="delFile(index)"
+                />
+                <img
+                  class="download"
+                  src="../../../../../../assets/icon/fileIcon/download.png"
+                  @click.stop="downloadFile(item)"
+                  :style="{ right: checktype != 1 ? '10px' : '45px' }"
+                />
+                <img class="img" :src="wordIcon" alt="" v-if="item.type == 1" />
+                <img
+                  class="img"
+                  :src="videoIcon"
+                  alt=""
+                  v-if="item.type == 2"
+                />
+                <img class="img" :src="item.url" alt="" v-if="item.type == 3" />
+                <img class="img" :src="wordIcon" alt="" v-if="item.type == 4" />
+                <img class="img" :src="fileIcon" alt="" v-if="item.type == 5" />
+                <div class="name">
+                  <el-tooltip
+                    :content="item.name"
+                    placement="top"
+                    effect="dark"
+                  >
+                    <span>{{ item.name }}</span>
+                  </el-tooltip>
+                </div>
+              </div>
+
+							<div
+                class="file"
+                v-for="(item, index) in uploadList"
+                :key="item.index"
+              >
+								<img
+                  class="del"
+                  src="../../../../../../assets/icon/fileIcon/delFile.svg"
+                  @click.stop="delUploadFile(item)"
+                />
+                <img class="img" :src="wordIcon" alt="" v-if="item.type == 1" />
+                <img
+                  class="img"
+                  :src="videoIcon"
+                  alt=""
+                  v-if="item.type == 2"
+                />
+								<img class="img" :src="fileIcon" alt="" v-if="item.type == 3" />
+                <img class="img" :src="wordIcon" alt="" v-if="item.type == 4" />
+                <img class="img" :src="fileIcon" alt="" v-if="item.type == 5" />
+								<div class="uploadProgress">
+									<div>{{ item.progress.value }}%</div>
+									<span>上传中...</span>
+								</div>
+                <div class="name">
+                  <el-tooltip
+                    :content="item.name"
+                    placement="top"
+                    effect="dark"
+                  >
+                    <span>{{ item.name }}</span>
+                  </el-tooltip>
+                </div>
+								<!-- {{ item }} -->
+              </div>
+            </div>
+            <!-- @click.stop="addImg($event)" -->
+            <!-- <div class="btn" @click.stop="openFileBox()">
+                            <span>点击添加文件</span>
+                            <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload($event)" />
+                        </div> -->
+          </div>
+          <!-- @click.stop="addImg($event)"  @click.stop="addImg($event)" -->
+          <div class="uploadQ" v-else>
+            <span>待填写者上传</span>
+            <!-- <input type="file" accept="*" style="display: none" multiple="multiple" @change="beforeUpload($event)" /> -->
+          </div>
+          <div v-if="proVisible" class="mask">
+            <div class="progressBox">
+              <div class="lbox">
+                <img src="../../../../../../assets/loading.gif" />上传中,请稍后
+              </div>
+              <!-- <div style="margin-bottom: 10px">
+                                <span>{{
+                                    isFinishSize
+                                }}M</span>
+                                /
+                                <span>{{
+                                    isAllSize
+                                }}M</span>
+                            </div> -->
+              <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
+                                ? progress
+                                : 0
+                                " style="width: 80%"></el-progress> -->
+            </div>
+          </div>
+        </div>
+        <!-- <textarea  :readonly="checktype == 2" rows="2" v-autoHeight="68" class="binfo_input binfo_textarea" cols v-model="checkJson.answer2"
+                    placeholder=""></textarea> -->
+      </div>
+    </div>
+    <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
+    <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
+    <wOffice
+      :dialogVisibleOffice.sync="dialogVisibleOffice"
+      :url="wurl"
+    ></wOffice>
+    <checkfile
+      :dialogVisiblefile.sync="dialogVisiblefile"
+      @setCheckJson="setCheckJson"
+    ></checkfile>
+		<uploadFile
+      v-for="(item, index) in uploadList"
+      :ref="`uploadFileRef${item.index}`"
+      :key="item.index"
+      :index="item.index"
+      @progressUpdate="progressUpdate"
+      @success="uploadSuccess"
+    />
+  </div>
+</template>
+
+<script>
+import "../../../../../../common/aws-sdk-2.235.1.min.js";
+
+import videoIcon from "../../../../../../assets/icon/fileIcon/isVideo.png";
+import wordIcon from "../../../../../../assets/icon/fileIcon/isWord.png";
+import fileIcon from "../../../../../../assets/icon/fileIcon/word2.png";
+
+import wVideo from "../../../file/wVideo.vue";
+import wpdf from "../../../file/wPdf2.vue";
+import wOffice from "../../../file/wOffice.vue";
+import checkfile from "../../../file/checkfile.vue";
+
+import uploadFile from "./uploadFile.vue";
+import { v4 as uuidv4 } from "uuid";
+
+const getFile = (url) => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+      let url2 = url;
+      let _url2 = "";
+      if (
+        url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+      ) {
+        _url2 = url2.split(
+          "https://view.officeapps.live.com/op/view.aspx?src="
+        )[1];
+      } else {
+        _url2 = url2;
+      }
+      var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+      let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
+      var params = {
+        Bucket: "ccrb",
+        Key: name
+      };
+      s3.getObject(params, function (err, data) {
+        if (err) {
+          console.log(err, err.stack)
+          resolve({ data: 1 });
+        }else {
+          resolve({ data: data.Body });
+          console.log(data); 
+        }
+      });
+  });
+};
+
+
+export default {
+  components: {
+    wpdf,
+    wVideo,
+    wOffice,
+    checkfile,
+		uploadFile
+  },
+  props: {
+    tindex: {
+      type: Number
+    },
+    cJson: {
+      type: Object
+    },
+    checktype: {
+      type: Number,
+      default: 1
+    },
+    see: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+      },
+      userid: this.$route.query.userid,
+      checkJson: undefined,
+      progress: 0,
+      isFinishSize: 0,
+      proVisible: false,
+      isAllSize: 0,
+      videoIcon: videoIcon,
+      wordIcon: wordIcon,
+      fileIcon: fileIcon,
+      dialogVisiblePdf: false,
+      dialogVisibleVideo: false,
+      dialogVisibleOffice: false,
+      dialogVisiblefile: false,
+      wurl: "",
+      isTong: false,
+			uploadList:[],
+      loading: false
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newValue) {
+        this.$emit("update:cJson", newValue);
+      },
+      deep: true
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    openFileBox() {
+      this.dialogVisiblefile = true;
+    },
+    addImg(e) {
+      var el = e.currentTarget;
+      el.getElementsByTagName("input")[0].click();
+      e.target.value = "";
+    },
+    beforeUpload(event, type) {
+      // const loading = this.openLoading();
+      let file = "";
+      let cfindex2 = 0;
+      for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
+        file = event.target.files[cfindex];
+        let _type = 2;
+        var imgA = [
+          "png",
+          "jpg",
+          "jpeg",
+          "bmp",
+          "gif",
+          "webp",
+          "psd",
+          "svg",
+          "tiff"
+        ];
+        var fileA = [
+          "DOC",
+          "DOCX",
+          "DOCM",
+          "DOTM",
+          "DOTX",
+          "PPTX",
+          "PPSX",
+          "PPT",
+          "PPS",
+          "PPTM",
+          "POTM",
+          "PPAM",
+          "POTX",
+          "PPSM",
+          "XLSX",
+          "XLS"
+        ];
+        var videoA = [
+          "AVI",
+          "NAVI",
+          "MPEG",
+          "ASF",
+          "MOV",
+          "WMV",
+          "3GP",
+          "RM",
+          "RMVB",
+          "FLV",
+          "F4V",
+          "H.264",
+          "H.265",
+          "REAL VIDEO",
+          "MKV",
+          "WebM",
+          "HDDVD",
+          "MP4",
+          "MPG",
+          "M4V",
+          "MGV",
+          "OGV",
+          "QTM",
+          "STR",
+          "AMC",
+          "DVX",
+          "EVO",
+          "DAT",
+          "OGG",
+          "OGM"
+        ];
+        if (
+          fileA.indexOf(
+            file.name.split(".")[
+						file.name.split(".").length - 1
+            ].toLocaleUpperCase()
+          ) != -1
+        ) {
+          _type = 1; //word 文件
+        } else if (
+          videoA.indexOf(
+            file.name.split(".")[
+						file.name.split(".").length - 1
+            ].toLocaleUpperCase()
+          ) != -1
+        ) {
+          _type = 2; //视频
+        } else if (
+          imgA.indexOf(
+            file.name.split(".")[
+						file.name.split(".").length - 1
+            ].toLocaleLowerCase()
+          ) != -1
+        ) {
+          _type = 3; //图片
+        } else if (
+          "pdf".indexOf(
+            file.name.split(".")[
+						file.name.split(".").length - 1
+            ].toLocaleLowerCase()
+          ) != -1
+        ) {
+          _type = 4; //pdf
+        } else {
+          _type = 5; //文件
+        }
+        this.uploadList.push({
+          index: uuidv4(),
+          file: file,
+					name:file.name,
+					type:_type,
+          progress: { status: "", value: 0,key:"",uploadid:"" }
+        });
+      }
+      this.$nextTick(() => {
+        this.uploadList.forEach(i => {
+          this.$refs[`uploadFileRef${i.index}`][0].awsupload({ file: i.file });
+        });
+      });
+        // var credentials = {
+        //   accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        //   secretAccessKey: "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"
+        // }; //秘钥形式的登录上传
+        // window.AWS.config.update(credentials);
+        // window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+        // var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+        // var _this = this;
+
+        // // _this.progress = 0;
+        // _this.proVisible = true;
+        // // _this.isFinishSize = 0;
+        // // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
+        // let _name = file.name;
+        // let size = file.size;
+        // _this.$forceUpdate();
+        // if (file) {
+        //   var params = {
+        //     Key:
+        //       file.name.split(".")[0] +
+        //       new Date().getTime() +
+        //       "." +
+        //       file.name.split(".")[file.name.split(".").length - 1],
+        //     ContentType: file.type,
+        //     Body: file,
+        //     "Access-Control-Allow-Credentials": "*",
+        //     ACL: "public-read"
+        //   }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        //   var options = {
+        //     partSize: 2048 * 1024 * 1024,
+        //     queueSize: 2,
+        //     leavePartsOnError: true
+        //   };
+        //   bucket
+        //     .upload(params, options)
+        //     .on("httpUploadProgress", function(evt) {
+        //       //这里可以写进度条
+        //       // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+        //       // _this.progress = parseInt((evt.loaded / evt.total) * 100);
+        //       // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
+        //       // _this.$forceUpdate();
+        //     })
+        //     .send(function(err, data) {
+        //       cfindex2++;
+
+        //       // _this.progress = 100;
+        //       // _this.isFinishSize = _this.isAllSize;
+        //       // _this.$forceUpdate();
+        //       // setTimeout(() => {
+        //       //     _this.proVisible = false;
+        //       //     _this.$forceUpdate();
+        //       // }, 1000);
+        //       setTimeout(() => {
+        //         if (
+        //           cfindex2 == event.target.files.length ||
+        //           cfindex2 > event.target.files.length
+        //         ) {
+        //           _this.proVisible = false;
+        //         }
+        //       }, 1000);
+        //       // loading.close();
+        //       if (err) {
+        //         _this.$message.error("上传失败");
+        //       } else {
+        //         let _type = 2;
+        //         var imgA = [
+        //           "png",
+        //           "jpg",
+        //           "jpeg",
+        //           "bmp",
+        //           "gif",
+        //           "webp",
+        //           "psd",
+        //           "svg",
+        //           "tiff"
+        //         ];
+        //         var fileA = [
+        //           "DOC",
+        //           "DOCX",
+        //           "DOCM",
+        //           "DOTM",
+        //           "DOTX",
+        //           "PPTX",
+        //           "PPSX",
+        //           "PPT",
+        //           "PPS",
+        //           "PPTM",
+        //           "POTM",
+        //           "PPAM",
+        //           "POTX",
+        //           "PPSM",
+        //           "XLSX",
+        //           "XLS"
+        //         ];
+        //         var videoA = [
+        //           "AVI",
+        //           "NAVI",
+        //           "MPEG",
+        //           "ASF",
+        //           "MOV",
+        //           "WMV",
+        //           "3GP",
+        //           "RM",
+        //           "RMVB",
+        //           "FLV",
+        //           "F4V",
+        //           "H.264",
+        //           "H.265",
+        //           "REAL VIDEO",
+        //           "MKV",
+        //           "WebM",
+        //           "HDDVD",
+        //           "MP4",
+        //           "MPG",
+        //           "M4V",
+        //           "MGV",
+        //           "OGV",
+        //           "QTM",
+        //           "STR",
+        //           "AMC",
+        //           "DVX",
+        //           "EVO",
+        //           "DAT",
+        //           "OGG",
+        //           "OGM"
+        //         ];
+        //         if (
+        //           fileA.indexOf(
+        //             data.Location.split(".")[
+        //               data.Location.split(".").length - 1
+        //             ].toLocaleUpperCase()
+        //           ) != -1
+        //         ) {
+        //           _type = 1; //word 文件
+        //         } else if (
+        //           videoA.indexOf(
+        //             data.Location.split(".")[
+        //               data.Location.split(".").length - 1
+        //             ].toLocaleUpperCase()
+        //           ) != -1
+        //         ) {
+        //           _type = 2; //视频
+        //         } else if (
+        //           imgA.indexOf(
+        //             data.Location.split(".")[
+        //               data.Location.split(".").length - 1
+        //             ].toLocaleLowerCase()
+        //           ) != -1
+        //         ) {
+        //           _type = 3; //图片
+        //         } else if (
+        //           "pdf".indexOf(
+        //             data.Location.split(".")[
+        //               data.Location.split(".").length - 1
+        //             ].toLocaleLowerCase()
+        //           ) != -1
+        //         ) {
+        //           _type = 4; //pdf
+        //         } else {
+        //           _type = 5; //文件
+        //         }
+        //         if (_this.checkJson.file) {
+        //           _this.checkJson.file.push({
+        //             name: _name,
+        //             url: data.Location,
+        //             type: _type
+        //           });
+        //         } else {
+        //           _this.checkJson.file = [];
+        //           _this.checkJson.file.push({
+        //             name: _name,
+        //             url: data.Location,
+        //             type: _type
+        //           });
+        //         }
+        //         if (_this.isTong) {
+        //           let _file = {
+        //             name: _name,
+        //             url: data.Location,
+        //             type: _type,
+        //             size: _this.formatFileSize(size)
+        //           };
+        //           _this.addSource(_file);
+        //         }
+        //         _this.$forceUpdate();
+
+        //         console.log(_this.checkJson);
+        //         console.log(data.Location);
+        //       }
+        //     });
+        // }
+      // }
+    },
+    delUploadFile(item) {
+      this.$refs[`uploadFileRef${item.index}`][0].stopUpload();
+      this.$refs[`uploadFileRef${item.index}`][0].abortMultipartUpload(
+        item.progress.key,
+        item.progress.uploadid
+      );
+      this.uploadList = this.uploadList.filter(i => i.index != item.index);
+    },
+    // 上传文件进度条
+    progressUpdate(res) {
+      this.uploadList.find(i => i.index == res.index).progress.status =
+        res.status;
+      this.uploadList.find(i => i.index == res.index).progress.value =
+        res.percent;
+      this.uploadList.find(i => i.index == res.index).progress.key = res.key;
+      this.uploadList.find(i => i.index == res.index).progress.uploadid =
+        res.uploadid;
+    },
+    //上传文件成功
+    uploadSuccess(res) {
+      let data = res.data;
+      let _name = this.uploadList.find(i => i.index == res.index).file.name;
+      let size = this.uploadList.find(i => i.index == res.index).file.size;
+      let _type = this.uploadList.find(i => i.index == res.index).type;
+      if (this.checkJson.file) {
+        this.checkJson.file.push({
+          name: _name,
+          url: data.Location,
+          type: _type
+        });
+      } else {
+        this.checkJson.file = [];
+        this.checkJson.file.push({
+          name: _name,
+          url: data.Location,
+          type: _type
+        });
+      }
+      if (this.isTong) {
+        let _file = {
+          name: _name,
+          url: data.Location,
+          type: _type,
+          size: this.formatFileSize(size)
+        };
+        this.addSource(_file);
+      }
+      this.$forceUpdate();
+
+      this.$emit("update:cJson", this.checkJson);
+      this.uploadList = this.uploadList.filter(i => i.index != res.index);
+      console.log(this.checkJson);
+      console.log(data.Location);
+    },
+    addSource(file) {
+      let params = [
+        {
+          n: file.name,
+          file: file.url,
+          type: file.type,
+          pid: "0",
+          uid: this.userid,
+          size: file.size
+        }
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addSourceFile", params)
+        .then(res => {
+          // if (_ctype == 2) {
+          //     this.$message.success('上传成功');
+          // }
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    formatFileSize(bytes) {
+      if (bytes < 1024) {
+        return bytes + "B";
+      } else if (bytes < 1048576) {
+        return (bytes / 1024).toFixed(2) + "KB";
+      } else if (bytes < 1073741824) {
+        return (bytes / 1048576).toFixed(2) + "MB";
+      } else {
+        return (bytes / 1073741824).toFixed(2) + "GB";
+      }
+    },
+    setCheckJson(name, url, type) {
+      if (this.checkJson.file) {
+        this.checkJson.file.push({
+          name: name,
+          url: url,
+          type: type
+        });
+      } else {
+        this.checkJson.file = [];
+        this.checkJson.file.push({
+          name: name,
+          url: url,
+          type: type
+        });
+      }
+      this.$forceUpdate();
+    },
+    checkFile(item) {
+      if (item.type == 3) {
+        this.$hevueImgPreview(item.url);
+      } else if (item.type == 5) {
+        this.downloadFile(item);
+      } else if (item.type == 1) {
+        this.dialogVisibleOffice = true;
+        this.wurl = item.url;
+      } else if (item.type == 2) {
+        this.dialogVisibleVideo = true;
+        this.wurl = item.url;
+      } else if (item.type == 4) {
+        this.dialogVisiblePdf = true;
+        this.wurl = item.url;
+      }
+    },
+    downloadMobanFile(index){
+        this.loading = true;
+        let file = this.checkJson.mobanFile[index]
+        getFile(file.url).then((data) => {
+            this.loading = false;
+            if (data.data != 1) {
+                // 下载文件, 并存成ArrayBuffer对象
+                const file_name =file.name; // 获取文件名
+                const file_data = data.data; // 获取文件数据
+                let url = window.URL.createObjectURL(new Blob([file_data]));
+                let a = document.createElement("a");
+                a.name = file_name;
+                a.href = url;
+                a.download = file_name;
+                a.click();
+                console.log(data); 
+                this.$message.success("下载成功");
+            }else {
+                this.$message.error("下载失败");
+            }
+        });
+
+    },
+    downloadFile(f) {
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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"
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+      let url2 = f.url;
+      let _url2 = "";
+      if (
+        url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+      ) {
+        _url2 = url2.split(
+          "https://view.officeapps.live.com/op/view.aspx?src="
+        )[1];
+      } else {
+        _url2 = url2;
+      }
+      let _this = this;
+
+      _this.downLoading = _url2;
+      var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+      let name = decodeURIComponent(
+        _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1].replace(/\+/g, ' ')
+      );
+      var params = {
+        Bucket: "ccrb",
+        Key: name
+      };
+      s3.getObject(params, function(err, data) {
+        _this.downLoading = "";
+        if (err) console.log(err, err.stack);
+        // an error occurred
+        else {
+          let url = window.URL.createObjectURL(new Blob([data.Body]));
+          let a = document.createElement("a");
+          a.name = f.name;
+          a.href = url;
+          a.download = f.name;
+          a.click();
+          console.log(data);
+        } // sxuccessful response
+      });
+    },
+    delFile(index) {
+      this.checkJson.file.splice(index, 1);
+      this.$forceUpdate();
+    }
+  },
+  mounted() {
+    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
+  }
+};
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+	padding-left: 45px;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box > .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 10px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 8px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 120px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #e0e0e0;
+  border-style: dashed;
+  position: relative;
+}
+
+.binfo_input > .uploadQ {
+  /* border: 1.5px dashed #dfdfdf; */
+  height: 120px;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  /* background: #f9fafb; */
+	background-color: #fff;
+	font-size: 22px;
+  color: rgb(124, 124, 124);
+  border-radius: 5px;
+  cursor: pointer;
+}
+
+.mask {
+  background-color: rgb(0 0 0 / 30%);
+  /* position: fixed; */
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 90;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.progressBox {
+  width: 300px;
+  height: 150px;
+  background: #fff;
+  border-radius: 10px;
+  box-shadow: 0 0 6px 1px #bfbfbf;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  position: relative;
+  color: #6c6c6c;
+}
+
+.progressBox >>> .el-progress-bar__outer {
+  background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+  height: 50px;
+  font-size: 19px;
+  display: flex;
+  align-items: center;
+  color: #747474;
+}
+
+.progressBox .lbox img {
+  width: 40px;
+  margin-right: 20px;
+}
+
+.closeCss {
+  position: absolute;
+  top: 8px;
+  right: 8px;
+  cursor: pointer;
+  width: 20px;
+  height: 20px;
+}
+
+.closeCss > img {
+  width: 100%;
+  height: 100%;
+}
+
+.binfo_input > .fileBox {
+}
+
+.binfo_input > .fileBox .fileC {
+  display: flex;
+  flex-wrap: wrap;
+  width: 100%;
+  cursor: pointer;
+}
+
+.binfo_input > .fileBox .fileC > .file {
+  width: 200px;
+  height: 140px;
+  margin: 10px 10px 10px 0px;
+  border-radius: 15px;
+  box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
+  overflow: hidden;
+  margin-right: 15px;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+}
+
+.binfo_input > .fileBox .fileC > .file > .img {
+  width: 100%;
+  height: calc(100% - 35px);
+  object-fit: cover;
+}
+
+.binfo_input > .fileBox .fileC > .file > .del {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 10px;
+  cursor: pointer;
+	z-index: 10;
+}
+
+.binfo_input > .fileBox .fileC > .file > .download {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 35px;
+  cursor: pointer;
+  opacity: 0.8;
+}
+
+.binfo_input > .fileBox .fileC > .file > .name {
+  height: 35px;
+  width: 100%;
+  background: #f9f9f9;
+  display: flex;
+  align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+}
+
+.binfo_input > .fileBox .fileC > .file > .name > span {
+  display: block;
+  text-overflow: ellipsis;
+  max-width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.binfo_input > .fileBox .btn {
+  width: 100%;
+  height: 40px;
+  background: #007bff;
+  color: #fff;
+  border-radius: 15px;
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+}
+
+.uploadBtn {
+  display: flex;
+  margin-bottom: 10px;
+  align-items: center;
+  width: 100%;
+  justify-content: flex-end;
+}
+
+.uploadBtn .btn {
+  display: flex;
+  cursor: pointer;
+  align-items: center;
+  height: 30px;
+  padding: 0 8px;
+  background: #fff;
+  color: #3681fc;
+  border: 1px solid #3681fc;
+  box-sizing: border-box;
+  border-radius: 4px;
+  font-size: 14px;
+  align-items: center;
+  margin-right: 10px;
+}
+
+.uploadBtn .switch {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+.uploadBtn .switch > span {
+  margin-left: 5px;
+}
+
+.uploadProgress{
+	position: absolute;
+	width: 100%;
+	height: calc(100% - 35px);
+	background-color: #0000008a;
+	display: flex;
+	top: 0;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	color: #fff;
+}
+
+.uploadProgress>div{
+	font-size: 20px;
+	font-weight: bold;
+	margin-bottom: 10px;
+}
+
+
+.file_box {
+    /* padding: 0 0 0 15px; */
+    width: 100%;
+    box-sizing: border-box;
+    margin: 10px 0;
+}
+
+.file_item {
+    display: flex;
+    width: 100%;
+    padding: 5px;
+    box-sizing: border-box;
+    border-radius: 5px;
+}
+
+.file_item+.file_item {
+    margin-top: 10px;
+}
+
+.file_name {
+    color: #747474;
+}
+
+.file_item:hover{
+    background: #eee;
+}
+
+.file_btns {
+    margin-left: auto;
+    display: flex;
+    align-items: center;
+}
+
+.file_btn+.file_btn {
+    margin-left: 10px;
+}
+
+.file_btn {
+    color: #3681fc;
+    cursor: pointer;
+}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+</style>

+ 192 - 0
src/components/pages/test/add/edit/check/gap.vue

@@ -0,0 +1,192 @@
+<template>
+    <div class="c_box">
+        <!-- <div class="mask"></div> -->
+        <!-- <div v-if="!cJson">暂未设置题目</div> -->
+        <div class="set_box" v-if="!cJson">填写者回答区</div>
+        <div v-else class="choice_box">
+            <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
+            <div class="title">
+                <div  style="display: flex;align-items: center;">
+                    <!--  + `(${option[checkJson.type].name})` -->
+                    <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1 }}</span>
+                    <span>{{ checkJson.title }}</span>
+                    <span style="min-width: fit-content;color: #efa030;">{{ checkJson.score ? '(分值:'+checkJson.score+'分)' : '' }}</span>
+                </div>
+                <span style="color: #efa030;display: flex;margin-top: 5px;line-height: 18px;">
+                    <span style="min-width: fit-content;" v-if="!checkJson.answer && see">暂无参考答案</span>
+                    <span style="min-width: fit-content;display: flex;" v-else-if="see">
+                        <span style="min-width: fit-content;">参考答案:</span> 
+                        <span>{{ checkJson.answer }}</span>
+                    </span> 
+                    <!-- <span style="min-width: fit-content;margin-left: 10px;">{{ checkJson.score ? '分值:'+checkJson.score+'分' : '' }}</span> -->
+                </span>
+                
+                <!-- <span v-if="see" style="color: #efa030; display: flex;">
+                    
+                    {{ checkJson.answer ? '参考答案:'+checkJson.answer : '暂无参考答案' }} <span style="min-width: fit-content;">{{ cJson.score ? '分值:'+cJson.score+'分' : '' }}</span>
+                </span>
+                <span style="color: #efa030;" v-if="checkJson.score && !see">({{ '分值:'+checkJson.score+'分' }})</span> -->
+                <!-- </div><div v-html="checkJson.title"></div> -->
+            </div>
+            <div class="choices">
+                <textarea :readonly="checktype == 2" rows="2" v-autoHeight="80" class="binfo_input binfo_textarea" cols v-model="checkJson.answer2"
+                    placeholder="请输入内容"></textarea>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: {
+        tindex:{
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see:{
+            type:Boolean,
+            default:false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '问答题' },
+            },
+            checkJson: undefined
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+        if(this.checkJson && this.checkJson.answer2){
+            setTimeout(() => {
+                this.checkJson.answer2 += "*0*%*";
+                setTimeout(() => {
+                    this.checkJson.answer2 = this.checkJson.answer2.replaceAll("*0*%*", "");
+                }, 0);
+            }, 100);
+        }
+    }
+}
+</script>
+
+<style scoped>
+
+.c_box {
+    width: 100%;
+    position: relative;
+		padding-left: 45px;
+}
+
+.choice_box>.choices {
+    margin-top: 10px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1.5px solid #3681FC !important;
+}
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+
+.choices>textarea{
+	border-color: #E7E7E7;
+	border-radius: 8px;
+}
+</style>

+ 346 - 0
src/components/pages/test/add/edit/check/index.vue

@@ -0,0 +1,346 @@
+<template>
+  <div class="c_box">
+    <div class="c_box_title">{{ title }}</div>
+    <div class="c_box_score">总分:{{ score }}</div>
+    <div class="c_body" v-if="isloading">
+      <div v-if="type == 3">
+        <div v-for="(item, index) in checkArray[page].array" :key="index" class="check_box">
+          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
+          <div v-if="item.ttype == 1" class="answerBox">
+            <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
+            <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
+            <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
+            <timeV :tindex="index" :cJson.sync="item.json" v-if="item.type == 8"></timeV>
+            <courseV2 :tindex="index" :cJson.sync="item.json" v-if="item.type == 11"></courseV2>
+						<sweep :tindex="index" :cJson.sync="item.json" v-if="item.type == 12"/>
+            <number :tindex="index" :cJson.sync="item.json" v-if="item.type == 13"/>
+            <!-- <span v-else>暂未设置题目</span> -->
+          </div>
+          <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
+            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
+            <div v-if="item2.ttype == 1" class="answerBox">
+              <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
+              <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
+              <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
+              <timeV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 8"></timeV>
+              <courseV2 :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 11"></courseV2>
+							<sweep :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 12"></sweep>
+              <number :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 13"></number>
+              <!-- <span v-else>暂未设置题目</span> -->
+            </div>
+          </div>
+        </div>
+      </div>
+      <div v-else>
+        <div v-for="(item, index) in checkArray" :key="index" class="check_box">
+          <div class="title" v-if="item.ttype != 1 || (!item.json && item.ttype == 1)" :style="{fontSize:item.ttype == 1 && '16px'}">{{ selectType(item, index) }}</div>
+          <div v-if="item.ttype == 1" class="answerBox">
+            <choiceV :tindex="index" :cJson.sync="item.json" v-if="item.type == 1"></choiceV>
+            <gapV :tindex="index" :cJson.sync="item.json" v-if="item.type == 3"></gapV>
+            <fileV :tindex="index" :cJson.sync="item.json" v-if="item.type == 5"></fileV>
+            <courseV :tindex="index" :cJson.sync="item.json" v-if="item.type == 6"></courseV>
+            <evaV :tindex="index" :cJson.sync="item.json" v-if="item.type == 7"></evaV>
+            <timeV :tindex="index" :cJson.sync="item.json" v-if="item.type == 8"></timeV>
+            <courseV2 :tindex="index" :cJson.sync="item.json" v-if="item.type == 11"></courseV2>
+						<sweep :tindex="index" :cJson.sync="item.json" v-if="item.type == 12"></sweep>
+            <number :tindex="index" :cJson.sync="item.json" v-if="item.type == 13"></number>
+            <!-- <span v-else>暂未设置题目</span> -->
+          </div>
+          <div v-for="(item2, index2) in item.array" :key="`${index}-${index2}`" class="check_box_xia">
+            <div class="title" v-if="item2.ttype != 1 || (!item2.json && item2.ttype == 1)" :style="{fontSize:item2.ttype == 1 && '16px'}">{{ selectType(item2, index2) }}</div>
+            <div v-if="item2.ttype == 1" class="answerBox">
+              <choiceV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 1"></choiceV>
+              <gapV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 3"></gapV>
+              <fileV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 5"></fileV>
+              <courseV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 6"></courseV>
+              <evaV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 7"></evaV>
+              <timeV :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 8"></timeV>
+              <courseV2 :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 11"></courseV2>
+							<sweep :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 12"></sweep>
+              <number :tindex="index2" :cJson.sync="item2.json" v-if="item2.type == 13"></number>
+              <!-- <span v-else>暂未设置题目</span> -->
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <div v-if="checkArray.length > 1 && type == 3" class="page">
+        <el-button type="primary" size="mini" :disabled="page == 0" @click="setPage('-1')">上一页</el-button>
+        <div class="p_page"><span>{{ page + 1 }}</span><span>/</span><span>{{ checkArray.length }}</span></div>
+        <el-button type="primary" size="mini" :disabled="page == (checkArray.length - 1)" @click="setPage('1')">下一页</el-button>
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import choiceV from './choice.vue';
+import gapV from './gap.vue';
+import fileV from './file.vue';
+import courseV from './course.vue';
+import evaV from './eva.vue';
+import timeV from './time.vue';
+import courseV2 from './course2.vue';
+import sweep from './sweep.vue'
+import number from './number.vue';
+export default {
+  props: {
+    cJson: {
+      type: Array,
+    },
+    title: {
+      type: String,
+    }
+  },
+  components: {
+    choiceV,
+    gapV,
+    fileV,
+    courseV,
+    evaV,
+    timeV,
+    courseV2,
+		sweep,
+    number
+  },
+  data() {
+    return {
+      checkArray: [],
+      type: 1,
+      page: 0,
+      options2: {
+        1: "选择题",
+        // 2: "问答题",
+        3: "问答题",
+        4: "添加文档",
+        5: "附件",
+        6: "课程",
+        7: "评分",
+      },
+      isloading:true,
+    }
+  },
+  computed: {
+    selectType() {
+      return function (item, index) {
+        if (item.ttype == 1) {
+          return index + 1 + "、" + this.options2[item.type];
+        } else if (item.ttype == 2) {
+          return `${item.name ? item.name : `第${index + 1}组`}(共${item.array.length}题)`;
+        } else if (item.ttype == 3) {
+          return `分页${index + 1}`;
+        }
+      };
+    },
+    score() {
+      let score = 0
+      this.cJson.forEach(el => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach(item => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach(item2 => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0
+                }
+              })
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0
+            }
+          })
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0
+        }
+      })
+      return score > 0 ? score + '分' : '未设置分数'
+    }
+  },
+  watch: {
+    cJson: {
+      handler(newVal, oldVal) {
+        console.log(newVal);
+        console.log(oldVal);
+        this.checkArray = this.setJson(this.depthCopy(newVal))
+      },
+      deep: true
+    },
+
+  },
+  methods: {
+    setPage(index){
+      this.isloading = false
+      if(index == '1'){
+        this.page++
+      }else if(index == '-1'){
+        this.page--
+      }
+      setTimeout(()=>{
+        this.isloading = true
+      }, 50)
+      this.$forceUpdate()
+    },
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+    setJson(json) {
+      if (json.length > 0) {
+        let _json = this.depthCopy(json)
+        this.type = _json[0].ttype
+        let checkArray = _json.filter(item => {
+          if (item.array) {
+            item.array = item.array.filter((item2) => {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
+                item2.json.answer2 = [];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
+                item2.json.answer2 = item2.json.courses[0];
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 7) {
+                item2.json.answer2 = '';
+              } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 8) {
+                item2.json.answer2 = '';
+              }else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 12) {
+                item2.json.answer2 = '';
+              }
+              if (item2.array) {
+                item2.array = item2.array.filter((item3) => {
+                  if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8 && item3.type != 12) {
+                    item3.json.answer2 = [];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 6) {
+                    item3.json.answer2 = item3.json.courses[0];
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 7) {
+                    item3.json.answer2 = '';
+                  } else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 8) {
+                    item3.json.answer2 = '';
+                  }else if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type == 12) {
+                    item3.json.answer2 = '';
+                  }
+                  return item3;
+                });
+              }
+              return (
+                (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
+              );
+            });
+          }
+          if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 7 && item.type != 8 && item.type != 12) {
+            item.json.answer2 = [];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 6) {
+            item.json.answer2 = item.json.courses[0];
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 7) {
+            item.json.answer2 = '';
+          } else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 8) {
+            item.json.answer2 = '';
+          }else if (item.ttype == 1 && item.json && !item.json.answer2 && item.type == 12) {
+            item.json.answer2 = '';
+          }
+          console.log(item.array);
+          return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
+        })
+        console.log(checkArray);
+        return checkArray
+      } else {
+        return []
+      }
+    }
+  },
+  mounted() {
+    this.checkArray = this.setJson(this.depthCopy(this.cJson))
+  },
+}
+</script>
+
+<style scoped>
+.c_box {
+  padding: 10px 0;
+  box-sizing: border-box;
+  width: 100%;
+  margin: 0 auto 0;
+  background: #fff;
+  height: calc(100% - 0px);
+  overflow: auto;
+}
+
+.c_box_title {
+  width: 90%;
+  text-align: center;
+  font-size: 24px;
+  font-weight: bold;
+  word-break: break-all;
+  margin: 10px auto;
+}
+
+.c_box_score {
+  width: 90%;
+  text-align: center;
+  word-break: break-all;
+  margin: 0 auto 20px;
+  font-size: 16px;
+  color: #373737;
+}
+
+.c_body {
+  width: 90%;
+  margin: 0 auto;
+}
+
+.check_box {
+
+}
+
+.check_box+.check_box {
+  margin-top: 10px;
+  padding-top: 10px;
+  /* border-top: 1px solid #eee; */
+}
+
+.check_box>.title {
+  font-size: 24px;
+  word-break: break-all;
+  font-weight: bold;
+	margin-left: 45px;
+}
+
+.check_box>.answerBox {
+  margin-top: 10px;
+
+}
+
+.check_box>.noanswerBox {
+  margin-top: 10px;
+}
+
+.check_box_xia {
+  padding: 15px 0;
+}
+
+.check_box_xia + .check_box_xia {
+  /* border-top: 1px solid #eee; */
+}
+
+.check_box_xia>.title {
+  font-size: 22px;
+  font-weight: bold;
+	margin-left: 45px;
+}
+
+.check_box_xia>.answerBox {
+  margin-top: 10px;
+}
+
+.check_box_xia>.noanswerBox {
+  margin-top: 10px;
+}
+
+.page {
+  margin: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.p_page {
+  margin: 0 10px;
+}</style>

+ 258 - 0
src/components/pages/test/add/edit/check/number.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="c_box">
+      <!-- <div class="mask"></div> -->
+      <div v-if="!checkJson">暂未设置题目</div>
+      <div v-else class="choice_box">
+          <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
+          <div class="c_title">
+              <div class="title">
+                  <div  style="display: flex;align-items: center;">
+                      <!-- + `(${option[checkJson.type].name})` -->
+                  <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1}}</span>
+                  <span>{{ checkJson.title }}</span>
+                  <!-- <span style="min-width: fit-content;color: #efa030;">{{ checkJson.score ? '(分值:'+checkJson.score+'分)' : '' }}</span> -->
+              </div>
+              <!-- <span style="color: #efa030;display: flex;margin-top: 5px;line-height: 18px;">
+                  <span style="min-width: fit-content;" v-if="!checkJson.answer && see">暂无参考答案</span>
+                  <span style="min-width: fit-content;display: flex;" v-else-if="see">
+                      <span style="min-width: fit-content;">参考答案:</span>
+                      <span>{{ checkJson.answer }}</span>
+                  </span>
+              </span> -->
+                  <!-- </div><div v-html="checkJson.title"></div> -->
+              </div>
+              <!-- <div class="p_box" v-if="isTeacher == 1 && checkJson.score">
+                  <el-input v-model="checkJson.score2" class="c_input" @change="numberPan" placeholder="请输入得分"></el-input><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+              </div>
+              <div class="p_box" v-if="isTeacher == 2 && checkJson.score2">
+                  <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score }}分</span>
+              </div> -->
+          </div>
+          <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+              style="color: #00000066;margin-top: 5px;"></div>
+          <div class="choices">
+            <el-input-number :controls="false" v-model="checkJson.answer2" :precision="numberTypePrecision" :placeholder="numberTypePlaceholder[checkJson.type]"></el-input-number>
+            <span v-if="checkJson.type=='4'">%</span>
+              <!-- <textarea  :readonly="checktype == 2" rows="2" v-autoHeight="68" class="binfo_input binfo_textarea" cols v-model="checkJson.answer"
+                  placeholder=""></textarea> -->
+          </div>
+      </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+      tindex:{
+          type: Number
+      },
+      cJson: {
+          type: Object,
+      },
+      checktype: {
+          type: Number,
+          default: 1
+      },
+      see:{
+          type:Boolean,
+          default:false
+      },
+      isTeacher: {
+          type: Number,
+          default: 2
+      }
+  },
+  data() {
+      return {
+          option: {
+              1: { name: '字数' },
+          },
+          userid:this.$route.query.userid,
+          checkJson: undefined,
+          numberTypePlaceholder:{
+            "1":"请输入整数",
+            "2":"请输入数字并保留一位小数",
+            "3":"请输入数字并保留两位小数",
+            "4":"请输入百分比"
+          },
+      }
+  },
+  watch: {
+      checkJson: {
+          handler(newValue) {
+              this.$emit('update:cJson', newValue)
+          },
+          deep: true
+      },
+      cJson: {
+          handler(newValue) {
+              if(newValue.answer2 !== this.checkJson.answer2){
+                  this.checkJson = this.depthCopy(newValue)
+                  this.$forceUpdate()
+              }
+          },
+          deep: true
+      },
+  },
+  computed:{
+    numberTypePrecision(){
+      let _result = 0;
+      if(this.checkJson.type=='1'){
+        _result = 0
+      }else if(this.checkJson.type=='2'){
+        _result = 1
+      }else if(this.checkJson.type=='3'){
+        _result = 2
+      }else if(this.checkJson.type=='4'){
+        _result = 0
+      }
+
+      return _result
+    }
+  },
+  methods: {
+      depthCopy(s) {
+          return JSON.parse(JSON.stringify(s));
+      },
+  },
+  mounted() {
+      this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+      if(this.checkJson.answer2){
+          setTimeout(() => {
+              this.checkJson.answer2 += "*0*%*";
+              setTimeout(() => {
+                  this.checkJson.answer2 = this.checkJson.answer2.replaceAll("*0*%*", "");
+              }, 0);
+          }, 100);
+      }
+  }
+}
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+  padding-left: 45px;
+}
+
+.mask {
+  position: absolute;
+  height: 100%;
+  width: 100%;
+  z-index: 2;
+}
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box> .c_title .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box> .c_title {
+  display: flex;
+  justify-content: space-between;
+}
+
+.choice_box> .c_title .p_box{
+  margin-left: 5px;
+  min-width: fit-content;
+  display: flex;
+  align-items: center;
+}
+
+.choice_box>.choices {
+  margin-top: 10px;
+}
+
+.choices>span{
+  font-size: 20px;
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 16px;
+  resize: none;
+  font-family: 'Microsoft YaHei';
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #CAD1DC;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #CAD1DC;
+  font-size: 16px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681FC !important;
+}
+
+.c_input {
+  width: 90px;
+}
+
+.c_input >>> .el-input__inner{
+  padding: 0 5px;
+  text-align: right;
+}
+
+.g_t_index{
+color: #3681FC;
+font-size: 28px;
+font-weight: bold;
+position: relative;
+margin-right: 30px;
+margin-left: -40px;
+}
+
+.g_t_index+span{
+font-weight: bold;
+font-size: 18px;
+}
+
+.g_t_index::after{
+content: "";
+width: 18px;
+height: 2px;
+position: absolute;
+right: -18px;
+top: 50%;
+transform: translateY(-50%);
+background: #3681FC;
+}
+
+.g_t_index::before{
+content: "";
+width: 6px;
+height: 6px;
+border-right: 2px solid #3681FC;
+border-top: 2px solid #3681FC;
+position: absolute;
+right: -15px;
+top: 50%;
+transform: rotate(45deg) translateY(-5px);
+}
+
+.choices>textarea{
+border-color: #E7E7E7;
+border-radius: 8px;
+}
+</style>

+ 261 - 0
src/components/pages/test/add/edit/check/sweep.vue

@@ -0,0 +1,261 @@
+<template>
+  <div class="c_box">
+    <div class="choice_box">
+      <div class="title" style="display: flex;align-items: center;">
+        <span class="g_t_index" style="min-width: fit-content;">{{
+          tindex + 1
+        }}</span>
+        <span>{{ checkJson.title }}</span>
+      </div>
+      <div
+        class="detail"
+        v-if="checkJson.detail"
+        v-html="checkJson.detail"
+        style="color: #00000066;margin-top: 5px;"
+      ></div>
+			<div
+        class="detail"
+         v-if="checkJson.answer2 && typeof checkJson.answer2=='string'"
+        v-html="checkJson.answer2"
+        style="color: #000000;margin-top: 5px;"
+      ></div>
+			<el-button style="margin-top: 10px;" type="primary" size="mini" @click="sweepBtn">扫一扫</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    tindex: {
+      type: Number
+    },
+    cJson: {
+      type: Object
+    },
+    checktype: {
+      type: Number,
+      default: 1
+    },
+    see: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      option: {
+        1: { name: "附件" }
+      },
+      userid: this.$route.query.userid,
+      checkJson: undefined,
+      courseDetail: [],
+    };
+  },
+  computed: {},
+  watch: {
+    checkJson: {
+      handler(newValue) {
+        this.$emit("update:cJson", newValue);
+      },
+      deep: true
+    }
+  },
+  methods: {
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+		sweepBtn(){
+			this.$message.error("请到手机端内扫码")
+		}
+  },
+  mounted() {
+    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
+  }
+};
+</script>
+
+<style scoped>
+.c_box {
+  width: 100%;
+  position: relative;
+  padding-left: 45px;
+  overflow: visible;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.choice_box {
+  white-space: pre-line;
+}
+
+.choice_box > .title {
+  font-weight: bold;
+  width: 100%;
+  word-break: break-all;
+}
+
+.choice_box > .choices {
+  margin-top: 10px;
+}
+
+.choices > .page {
+  margin-top: 10px;
+  display: flex;
+  align-items: center;
+}
+
+.p_page {
+  margin: 0 10px;
+}
+
+.course {
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
+
+.course + .course {
+  margin-top: 10px;
+}
+
+.course > .banner {
+  width: 200px;
+  height: 120px;
+  border-radius: 5px;
+  overflow: hidden;
+  border: 1px solid #3896fc;
+  box-sizing: border-box;
+  padding: 5px;
+  margin-right: 15px;
+}
+.course > .banner > img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+.course > .content {
+}
+.course > .content > .c_c {
+}
+.course > .content > .c_c + .c_c {
+  margin-top: 5px;
+}
+.course > .content > .c_c span:nth-child(1) {
+}
+.course > .content > .c_c span:nth-child(2) {
+}
+
+.g_t_index {
+  color: #3681fc;
+  font-size: 28px;
+  font-weight: bold;
+  position: relative;
+  margin-right: 30px;
+  margin-left: -40px;
+}
+
+.g_t_index + span {
+  font-weight: bold;
+  font-size: 18px;
+}
+
+.g_t_index::after {
+  content: "";
+  width: 18px;
+  height: 2px;
+  position: absolute;
+  right: -18px;
+  top: 50%;
+  transform: translateY(-50%);
+  background: #3681fc;
+}
+
+.g_t_index::before {
+  content: "";
+  width: 6px;
+  height: 6px;
+  border-right: 2px solid #3681fc;
+  border-top: 2px solid #3681fc;
+  position: absolute;
+  right: -15px;
+  top: 50%;
+  transform: rotate(45deg) translateY(-5px);
+}
+
+.c_list {
+  width: calc(100% - 10px);
+  min-height: 200px;
+  height: auto;
+  border: 1px solid #e7e7e7;
+  border-radius: 5px;
+  box-sizing: border-box;
+  padding: 10px;
+  display: flex;
+  flex-wrap: wrap;
+  /* overflow: auto; */
+}
+
+.c_l_add1 {
+  width: 100%;
+  height: 200px;
+  background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_add2{
+	width: 230px;
+  height: 200px;
+	background-color: #F9FAFB;
+	border: 1.5px dashed #dfdfdf;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #00000066;
+  border-radius: 5px;
+  font-size: 18px;
+  cursor: pointer;
+}
+
+.c_l_item {
+  width: 230px;
+  height: 200px;
+  margin-right: 10px;
+  box-sizing: border-box;
+  border: solid 1px #3896FC;
+  border-radius: 5px;
+	cursor: pointer;
+	box-sizing: border-box;
+	padding: 5px;
+}
+
+.c_l_item > img {
+  width: 100%;
+  height: 110px;
+  object-fit: cover;
+	margin-bottom: 5px;
+}
+
+.c_l_item > div {
+  width: 210px;
+  display: block;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 14px; /* 设置字体大小 */
+  color: #333; /* 设置字体颜色 */
+	box-sizing: border-box;
+}
+</style>

+ 142 - 0
src/components/pages/test/add/edit/check/time.vue

@@ -0,0 +1,142 @@
+<template>
+    <div class="c_box">
+        <div class="choice_box">
+            <div class="title" style="display: flex;align-items: center;">
+                <span class="g_t_index" style="min-width: fit-content;">{{ tindex + 1 }}</span>
+                <span>{{ checkJson.title }}</span>
+            </div>
+            <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail"
+                style="color: #00000066;margin-top: 5px;">
+            </div>
+            <div style="margin-top: 10px;" class="datePicker">
+                <el-date-picker
+                    v-model="checkJson.answer2"
+                    type="date"
+                    format="yyyy 年 MM 月 dd 日"
+                    value-format="yyyy年MM月dd日"
+                    placeholder="年/月/日 (请选择日期)">
+                </el-date-picker>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    props: {
+        tindex: {
+            type: Number
+        },
+        cJson: {
+            type: Object,
+        },
+        checktype: {
+            type: Number,
+            default: 1
+        },
+        see: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            option: {
+                1: { name: '附件' },
+            },
+            userid: this.$route.query.userid,
+            checkJson: undefined,
+            progress: 0,
+            isFinishSize: 0,
+            proVisible: false,
+            isAllSize: 0,
+            wurl: "",
+            isTong: false
+        }
+    },
+    watch: {
+        checkJson: {
+            handler(newValue) {
+                this.$emit('update:cJson', newValue)
+            },
+            deep: true
+        },
+    },
+    methods: {
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s));
+        },
+
+    },
+    mounted() {
+        this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
+
+    }
+}
+</script>
+
+<style scoped>
+.c_box {
+    width: 100%;
+    position: relative;
+		padding-left: 45px;
+}
+
+/* .mask {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 2;
+} */
+
+.g_t_index{
+	color: #3681FC;
+	font-size: 28px;
+	font-weight: bold;
+	position: relative;
+	margin-right: 30px;
+	margin-left: -40px;
+}
+
+.g_t_index+span{
+	font-weight: bold;
+	font-size: 18px;
+}
+
+.g_t_index::after{
+	content: "";
+	width: 18px;
+	height: 2px;
+	position: absolute;
+	right: -18px;
+	top: 50%;
+	transform: translateY(-50%);
+	background: #3681FC;
+}
+
+.g_t_index::before{
+	content: "";
+	width: 6px;
+	height: 6px;
+	border-right: 2px solid #3681FC;
+	border-top: 2px solid #3681FC;
+	position: absolute;
+	right: -15px;
+	top: 50%;
+	transform: rotate(45deg) translateY(-5px);
+}
+
+.datePicker>>>.el-date-editor{
+	width: 100%;
+}
+
+.datePicker>>>.el-input__inner{
+	border: none;
+	outline: none;
+	font-size: 16px;
+	border-bottom: solid 1px #E7E7E7;
+}
+
+
+</style>

+ 332 - 0
src/components/pages/test/add/edit/check/uploadFile.vue

@@ -0,0 +1,332 @@
+<template>
+	<div class="uploadBox"></div>
+</template>
+
+<script>
+import "../../../../../../common/aws-sdk-2.235.1.min.js";
+export default {
+	props:{
+		index:{
+			type:String,
+			default:"0"
+		},
+	},
+	data() {
+		return {
+			bucket: "", //aws上传接口
+			bucketname: "ccrb", //桶
+			uploadid: "",
+			partsize: 10 * 1024 * 1024, //10MB  分片
+			filestate: {
+				status: "", //有 error(直接报错) 和 fail(上传的时候报错) 和 success(上传成功) 和 processing(上传中)
+				percent: "", //(0-100的进度)
+			},
+			file: null,
+			flag:true,
+		};
+	},
+	watch: {
+		filestate: {
+			handler(newValue) {
+				this.$emit("progressUpdate", {index:this.index,...newValue});
+			},
+			immediate: true,
+			deep: true,
+		},
+	},
+	methods: {
+		//--------------------------分断上传保证稳定性
+		//初始化上传
+		// async init(){
+		// 	const credentials = {
+		// 	    accessKeyId: "AKIATLPEDU37QV5CHLMH",
+		// 	    secretAccessKey: "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",
+		// 	}; //秘钥形式的登录上传
+		// 	window.AWS.config.update(credentials);
+		// 	window.AWS.config.region = "cn-northwest-1"; //设置区域
+		// 	//桶的设置
+		// 	bucket = new window.AWS.S3({
+		// 	    params: {
+		// 	        Bucket: this.bucketname
+		// 	    }
+		// 	});
+		// 	return bucket;
+		// },
+		// 初始化上传入口
+		async initMultipartUpload(key, file) {
+			console.log(file)
+			const params = {
+				Bucket: this.bucketname,
+				Key: key,
+				ContentType: file.type,
+				ACL: "public-read",
+			};
+			//创建一个续传通道
+			const data = await this.bucket.createMultipartUpload(params).promise();
+			return data.UploadId;
+		},
+		// 上传文件的某一部分
+		async uploadPart(file, keyname, uploadid, pn, start, end) {
+			//key可以设置为桶的相对路径,Body为文件, ACL最好要设置
+			if(!this.flag)return;
+			var params = {
+				Bucket: this.bucketname,
+				Key: keyname,
+				// ContentType: file.type,
+				PartNumber: pn,
+				UploadId: uploadid,
+				Body: file.slice(start, end),
+				// "Access-Control-Allow-Credentials": "*",
+				// ACL: "public-read",
+			};
+			const result = await this.bucket.uploadPart(params).promise();
+			return { ETag: result.ETag, PartNumber: pn };
+		},
+		//完成分块上传
+		async completeMultipartUpload(parts, keyname, uploadid) {
+			if(!this.flag)return;
+			const params = {
+				Bucket: this.bucketname,
+				Key: keyname,
+				MultipartUpload: { Parts: parts },
+				UploadId: uploadid,
+			};
+			return await this.bucket.completeMultipartUpload(params).promise();
+		},
+		async abortMultipartUpload(key, uploadid) {
+			const params = {
+				Bucket: this.bucketname,
+				Key: key,
+				UploadId: uploadid,
+			};
+			let data = await this.bucket.abortMultipartUpload(params).promise();
+			this.$emit("delUpload",{index:this.index})
+			
+		},
+		//--------------------------------下面支持断点续传
+
+		//初始化亚马逊参数
+		async init() {
+			//秘钥形式的登录上传
+			const credentials = {
+				accessKeyId: "AKIATLPEDU37QV5CHLMH",
+				secretAccessKey: "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",
+				region: "cn-northwest-1",
+			};
+			window.AWS.config.update(credentials);
+			// window.AWS.config.region = "cn-northwest-1"; //设置区域
+			//桶的设置
+			this.bucket = new window.AWS.S3({
+				params: {
+					Bucket: this.bucketname,
+				},
+			});
+			return this.bucket;
+		},
+
+		//获取当前文件是否有已上传断点信息
+		async getawscheckpoint(key) {
+			let partsinfo;
+			try {
+				const result = await this.bucket
+					.listMultipartUploads({ Bucket: this.bucketname, Prefix: key })
+					.promise();
+				//获取具体分片信息
+				if (result.Uploads.length) {
+					this.uploadid = result.Uploads[result.Uploads.length - 1].UploadId;
+					partsinfo = await this.bucket
+						.listParts({
+							Bucket: this.bucketname,
+							Key: key,
+							UploadId: this.uploadid,
+						})
+						.promise();
+				}
+			} catch (err) {
+				console.log(err);
+			}
+			return { uploadid: this.uploadid, partsinfo };
+		},
+
+		//分段上传
+		async awsuploadpart(filestate, file, uploadid, parts, key) {
+			var partarr = []; //已完成的数组
+			//已完成的分片,转化成提交格式
+			const completeparts = parts.map((_) => {
+				partarr.push(_.PartNumber);
+				return { PartNumber: _.PartNumber, ETag: _.ETag };
+			});
+			// 分块上传文件
+			// parts = [];
+			let uploadpart;
+			let start = 0;
+			let end = 0;
+			let len = Math.ceil(file.size / this.partsize); //循环的长度
+			if (partarr.length) {
+				this.filestate.status = "processing";
+				this.filestate.percent = parseInt((completeparts.length * 100) / len);
+			}
+			//循环上传
+			for (let i = 0; i < len; i++) {
+				if(!this.flag)break;
+				start = i * this.partsize;
+				end = (i + 1) * this.partsize;
+				if (!partarr.includes(i+1)) {
+
+					uploadpart = await this.uploadPart(
+						file,
+						key,
+						uploadid,
+						i + 1,
+						start,
+						end
+					);
+					if (uploadpart.ETag != null) {
+						completeparts.push(uploadpart);
+						partarr.push(uploadpart.PartNumber);
+						this.filestate.status = "processing";
+						this.filestate.percent = parseInt(
+							(completeparts.length * 100) / len
+						);
+					} else {
+						this.filestate.status = "fail";
+						this.stopUpload();
+						return;
+					}
+				}
+			}
+			//提交上传成功信息
+			if(this.flag){
+					let data = await this.completeMultipartUpload(
+					completeparts,
+					key,
+					uploadid
+				);
+				this.filestate.status = "success";
+				return data;
+			}
+		},
+
+		//上传的接口
+		async awsupload({ file = this.file, keyName, folderName }) {
+			console.log('successsuccesssuccesssuccesssuccesssuccesssuccesssuccesssuccesssuccesssuccess')
+			if (!file) return this.$message.error("请上传文件");
+			this.init(); //初始化桶
+			// const key = (folderid || uuidv4()) + "/" + file.name; //需要上传的文件名
+			let key = "";
+			if (keyName) {
+				key = keyName;
+			} else {
+				if (folderName) {
+					key = `${folderName}/${file.name}`;
+				} else {
+					key = `default/${file.name.split(".")[0] +
+							new Date().getTime() +
+							"." +
+							file.name.split(".")[file.name.split(".").length - 1]}`;
+				}
+			}
+			console.log(key);
+			// key = key.replace(/\s/g, "");
+			// key = encodeURIComponent(key);
+			this.filestate = {
+				percent: 0,
+				status: "start",
+			};
+			this.filestate.percent = 0;
+			this.filestate.status = "start";
+			this.file = file;
+			//上传的参数
+			var params = {
+				Bucket: this.bucketname,
+				Key: key,
+			};
+			this.flag = true;
+			//设置桶上传文件
+			try {
+				//检查文件是否已上传
+				this.bucket.headObject(params, async (err, data) => {
+					// 没有上传成功,head方法会返回失败
+					if (err) {
+						//检查是否部分上传
+						const { uploadid, partsinfo } = await this.getawscheckpoint(
+							key,
+							this.bucket
+						);
+						//如果已经部分存在,那么直接在节点续传
+						if (uploadid) {
+							//断点续传
+							this.$emit("startUpload", { index:this.index,key, uploadid });
+							this.filestate.key = key;
+							this.filestate.uploadid = uploadid;
+							this.flag = true;
+							let data = await this.awsuploadpart(
+								this.filestate,
+								file,
+								uploadid,
+								partsinfo.Parts,
+								key
+							);
+							if(this.flag || this.filestate.percent==100)return this.$emit("success", {index:this.index, data, key, uploadid });
+							// return {data,key,uploadid}
+						}
+						//不存在,上传新的
+						else {
+							const uploadid = await this.initMultipartUpload(key, file); //初始化文件上传
+							this.$emit("startUpload", { index:this.index,key, uploadid });
+							this.filestate.key = key;
+							this.filestate.uploadid = uploadid;
+							this.flag = true;
+							let data = await this.awsuploadpart(
+								this.filestate,
+								file,
+								uploadid,
+								[],
+								key
+							);
+							if(this.flag || this.filestate.percent==100)return this.$emit("success", {index:this.index, data, key, uploadid });
+							// return {data,key,uploadid}
+						}
+					}
+					//如果已经上传成功了,那么直接返回状态百分百
+					else if (data) {
+						//data存在,上传成功
+						this.filestate.percent = 100;
+						this.filestate.status = "success";
+						let url = `https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/${key}`
+						this.file = null;
+						if(this.flag)return this.$emit("success", { index:this.index,data:{
+							Key:key,
+							Location:url,
+							ETag:data.ETag,
+							size:data.ContentLength,
+							ServerSideEncryption:data.ServerSideEncryption,
+							Bucket:this.bucketname
+							} });
+						// return {data,key,uploadid}
+					}
+				});
+			} catch (err) {
+				this.filestate.status = "error";
+				this.stopUpload();
+				console.log(err);
+			}
+		},
+		// 停止上传
+		stopUpload(){
+			this.filestate.status = "stop";
+			this.flag = false;
+		}
+	},
+	mounted() {
+		this.bucket = "";
+		this.file = null;
+	},
+};
+</script>
+
+<style scoped>
+.uploadBox {
+	display: none;
+}
+</style>

+ 940 - 0
src/components/pages/test/add/edit/edit/index.vue

@@ -0,0 +1,940 @@
+<template>
+  <div class="edit_box">
+    <div class="e_add" v-show="showLeftMenu" v-if="false">
+      <div class="title" style="margin-bottom: 20px">题目添加</div>
+      <span
+        class="e_a_foldIcon"
+        style="right: 0;"
+        @click="showLeftMenu = false"
+      >
+        <svg
+          t="1728443188732"
+          class="icon"
+          viewBox="0 0 1024 1024"
+          version="1.1"
+          xmlns="http://www.w3.org/2000/svg"
+          p-id="5721"
+          width="200"
+          height="200"
+        >
+          <path
+            d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
+            p-id="5722"
+          ></path>
+        </svg>
+      </span>
+      <div class="e_add_box">
+        <div class="title">基础题型</div>
+        <div class="e_add_ci">
+          <!-- <div class="title">基础题型</div> -->
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in options"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <!-- <el-button type="primary"
+                                size="mini">{{ item.label }}</el-button> -->
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_text: item.value == 3,
+                  pub_test_btn_choose: item.value == 1 || item.value == 10,
+                  pub_test_btn_file: item.value == 5,
+                  pub_test_btn_course: item.value == 6,
+                  pub_test_btn_eva: item.value == 7,
+                  pub_test_btn_time: item.value == 8,
+                  pub_test_btn_choose2: item.value == 9,
+                  pub_test_btn_sweep: item.value == 12
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="e_add_box">
+        <div class="title">平台组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in optionsPin"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_course: item.value == 6 || item.value == 11
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="e_add_box">
+        <div class="title">添加组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in buttonOptions"
+              :key="item.name"
+              @click="addQtype(item.type)"
+            >
+              <!-- <el-button type="primary"
+                                size="mini">{{ item.name }}</el-button> -->
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_group: item.type == 1,
+                  pub_test_btn_page: item.type == 2
+                }"
+              >
+                {{ item.name }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div
+      class="e_viewFile"
+      v-show="viewFile"
+      :style="
+        `margin-right:${!showLeftMenu ? '20px' : 0};margin-left:${
+          showLeftMenu ? '20px' : '0'
+        }`
+      "
+    >
+      <iframe
+        ref="viframe"
+        v-if="fileData && fileData.url"
+        style="width: 100%; height: 100%; border: none"
+        :src="
+          'https://view.officeapps.live.com/op/view.aspx?src=' +
+            encodeURIComponent(fileData.url)
+        "
+      ></iframe>
+    </div>
+
+    <div
+      class="e_content"
+      :style="
+        `margin-right:${showRightMenu ? '20px' : '0'};margin-left:${
+          showLeftMenu ? '20px' : '0'
+        };`
+      "
+			ref="eContentRef"
+    >
+      <div v-if="!isEditing" class="title" @click="editTitle">
+        {{ title ? title : "请填写表单标题" }}
+      </div>
+      <input
+        v-if="isEditing"
+        class="titleInput"
+        ref="title"
+        v-model="titleValue"
+        @blur="save"
+        @keyup.enter="save"
+        placeholder="请填写表单标题"
+      />
+      <div v-if="!isEditing2" class="detail" @click="editBref">
+        {{ brief ? brief : "请填写表单说明" }}
+      </div>
+      <input
+        v-if="isEditing2"
+        class="briefInput"
+        ref="detail"
+        v-model="briefValue"
+        @blur="save2"
+        @keyup.enter="save2"
+        placeholder="请填写表单说明"
+      />
+      <div class="e_order_box">
+        <checkOrder
+					ref="checkOrderEditRef"
+          :checkC.sync="checkC"
+          :checkJson="manualJson"
+          @changeJson="changeJson"
+          etype="edit"
+          :cJson.sync="cJson"
+          @addCheck="addCheck"
+          @addQtype="addQtype"
+        >
+        </checkOrder>
+        <addCheckPopover
+          v-if="manualJson.length == 0 || checkC == ''"
+          @addCheck="addCheck"
+          @addQtype="addQtype"
+        />
+      </div>
+    </div>
+    <div class="e_order" v-show="showRightMenu">
+      <div class="title">
+        大纲
+        <span style="font-size: 14px; color: #373737">总分:{{ score }}分</span>
+      </div>
+      <span
+        class="e_a_foldIcon"
+        style="left: 0;transform: rotate(180deg);"
+        @click="showRightMenu = false"
+      >
+        <svg
+          t="1728443188732"
+          class="icon"
+          viewBox="0 0 1024 1024"
+          version="1.1"
+          xmlns="http://www.w3.org/2000/svg"
+          p-id="5721"
+          width="200"
+          height="200"
+        >
+          <path
+            d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
+            p-id="5722"
+          ></path>
+        </svg>
+      </span>
+      <div class="e_order_box" style="margin-top: 20px">
+        <checkOrder
+          :checkC.sync="checkC"
+          :checkJson="manualJson"
+          @changeJson="changeJson"
+          etype="order"
+					@scrollPage="scrollPage"
+          :cJson.sync="cJson"
+        >
+        </checkOrder>
+      </div>
+    </div>
+
+    <span
+      class="e_outside_foldIcon"
+      v-if="!showLeftMenu && false"
+      style="left: 0;transform: rotate(180deg);"
+      @click="showLeftMenu = true"
+    >
+      <svg
+        t="1728443188732"
+        class="icon"
+        viewBox="0 0 1024 1024"
+        version="1.1"
+        xmlns="http://www.w3.org/2000/svg"
+        p-id="5721"
+        width="200"
+        height="200"
+      >
+        <path
+          d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
+          p-id="5722"
+        ></path>
+      </svg>
+    </span>
+
+    <span
+      class="e_outside_foldIcon"
+      v-if="!showRightMenu"
+      style="right: 0;"
+      @click="showRightMenu = true"
+    >
+      <svg
+        t="1728443188732"
+        class="icon"
+        viewBox="0 0 1024 1024"
+        version="1.1"
+        xmlns="http://www.w3.org/2000/svg"
+        p-id="5721"
+        width="200"
+        height="200"
+      >
+        <path
+          d="M110.9 128.34a32 32 0 0 1 32-32h773a32 32 0 0 1 0 64h-773a32 32 0 0 1-32-32z m4.58 402.15L260 651.38c15.62 13.07 39.4 2 39.4-18.41V391.19c0-20.37-23.78-31.48-39.4-18.41L115.48 493.67a24 24 0 0 0 0 36.82z m800.41-50.41H405.54a32 32 0 1 0 0 64h510.35a32 32 0 0 0 0-64z m0 383.58h-773a32 32 0 1 0 0 64h773a32 32 0 0 0 0-64z"
+          p-id="5722"
+        ></path>
+      </svg>
+    </span>
+  </div>
+</template>
+
+<script>
+import checkOrder from "../../components/checkOrder.vue";
+import minxinVue from "../../minxins/minxin";
+import addCheckPopover from "../../../add/components/addCheckPopover.vue";
+export default {
+  components: {
+    checkOrder,
+    addCheckPopover
+  },
+  mixins: [minxinVue],
+  props: {
+    checkJson: {
+      type: Array
+    },
+    title: {
+      type: String
+    },
+    brief: {
+      type: String
+    },
+    viewFile: {
+      type: Boolean,
+      default: false
+    },
+    fileData: {
+      type: Object,
+      default: () => ({ fileName: "", url: "" })
+    }
+  },
+  data() {
+    return {
+      manualJson: [],
+      checkC: "",
+      cJson: {},
+      isEditing: false,
+      titleValue: "",
+      isEditing2: false,
+      briefValue: "",
+      showLeftMenu: false,
+      showRightMenu: true
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.manualJson = this.depthCopy(newVal);
+      },
+      deep: true
+    }
+  },
+  computed: {
+    score() {
+      let score = 0;
+      this.manualJson.forEach(el => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach(item => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach(item2 => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0;
+                }
+              });
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0;
+            }
+          });
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0;
+        }
+      });
+      return score > 0 ? score : "未设置分数";
+    }
+  },
+  methods: {
+    editTitle() {
+      this.isEditing = true;
+      this.titleValue = this.title
+        ? JSON.parse(JSON.stringify(this.title))
+        : "";
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["title"].focus();
+      });
+    },
+    save() {
+      this.isEditing = false;
+      this.$emit("updateTitle", this.titleValue);
+    },
+    editBref() {
+      this.isEditing2 = true;
+      this.briefValue = this.brief
+        ? JSON.parse(JSON.stringify(this.brief))
+        : "";
+      this.$nextTick(() => {
+        // 聚焦到输入框
+        this.$refs["brief"].focus();
+      });
+    },
+    save2() {
+      this.isEditing2 = false;
+      this.$emit("updateBrief", this.briefValue);
+    },
+    changeJson(json) {
+      this.manualJson = json;
+      this.$emit("changeJson", json);
+    },
+    addCheck(topicType) {
+      let type = 1;
+      // if(this.manualJson.filter(i=>i.type==6).length>=1){
+      // 	return this.$message.error("一个表单只能添加一个课程组件");
+      // }
+      function checkType(obj) {
+        if (obj.filter(i => i.array).length > 0) {
+          let bol = false;
+          obj.forEach(i => {
+            console.log(i.array);
+            if (bol) return;
+            bol = checkType(i.array);
+          });
+          return bol;
+        } else if (obj.filter(i => i.type == 6).length >= 1) {
+          return true;
+        } else {
+          return false;
+        }
+      }
+      if (topicType == 6 && checkType(this.manualJson)) {
+        return this.$message.error("一个表单只能添加一个课程组件");
+      }
+      if (this.manualJson.length > 0) {
+        for (var i = 0; i < this.manualJson.length; i++) {
+          if (this.manualJson[i].ttype == 2) {
+            type = 2;
+          } else if (this.manualJson[i].ttype == 3) {
+            type = 3;
+          }
+        }
+      }
+
+      if (this.checkC) {
+        let _check = this.checkC.replace("x", "").split("-");
+        let _json = this.manualJson[_check[0]];
+        let _topicType = "";
+        if (topicType == 9 || topicType == 10) {
+          _topicType = 1;
+        } else {
+          _topicType = topicType;
+        }
+        let json = {
+          ttype: 1,
+          type: _topicType
+        };
+        if (topicType == 1) {
+          json.json = {
+            title: "",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" }
+            ],
+            answer: ""
+          };
+        } else if (topicType == 3) {
+          json.json = {
+            title: "",
+            type: 1,
+            answer: ""
+          };
+        } else if (topicType == 5) {
+          json.json = {
+            title: "",
+            type: 1,
+            detail: ""
+          };
+        } else if (topicType == 6) {
+          json.json = {
+            title: "",
+            detail: "",
+            courses: []
+          };
+        } else if (topicType == 7) {
+          json.json = {
+            title: "",
+            detail: "",
+            small: 0,
+            big: 10
+          };
+        } else if (topicType == 8) {
+          json.json = {
+            title: "",
+            detail: ""
+          };
+        } else if (topicType == 9) {
+          json.json = {
+            title: "",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" }
+            ],
+            answer: ""
+          };
+        } else if (topicType == 10) {
+          json.json = {
+            title: "",
+            type: 2,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" }
+            ],
+            answer: ""
+          };
+        } else if (topicType == 11) {
+          json.json = {
+            title: "",
+            detail: ""
+          };
+        } else if (topicType == 12) {
+          json.json = {
+            title: "",
+            detail: ""
+          };
+        }else if (topicType == 13) {
+          json.json = {
+            title: "",
+            detail: "",
+            type:'1'
+          };
+        }
+        if (_json.array) {
+          if (type == 3 && _check.length == 2) {
+            if (this.manualJson[_check[0]].array[_check[1]].array) {
+              this.manualJson[_check[0]].array[_check[1]].array.push(json);
+            } else {
+              this.manualJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            }
+          } else if (type == 3 && _check.length == 3) {
+            this.manualJson[_check[0]].array[_check[1]].array.splice(
+              parseInt(_check[2]) + 1,
+              0,
+              json
+            );
+          } else if (type == 2 && _check.length == 2) {
+            this.manualJson[_check[0]].array.splice(
+              parseInt(_check[1]) + 1,
+              0,
+              json
+            );
+          } else if (type == 2 && _check.length == 1) {
+            this.manualJson[_check[0]].array.push(json);
+          } else if (type == 3 && _check.length == 1) {
+            if (
+              this.manualJson[_check[0]].array[0] &&
+              this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array[0].array.push(json);
+            } else {
+              this.manualJson[_check[0]].array.push(json);
+            }
+          }
+        } else {
+          this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+        }
+      } else {
+        if (type == 1) {
+          let _topicType = "";
+          if (topicType == 9 || topicType == 10) {
+            _topicType = 1;
+          } else {
+            _topicType = topicType;
+          }
+          let json1 = {
+            ttype: 1,
+            type: _topicType
+          };
+					console.log("👉",topicType)
+
+          if (topicType == 1) {
+            json1.json = {
+              title: "",
+              type: 1,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" }
+              ],
+              answer: ""
+            };
+          } else if (topicType == 3) {
+            json1.json = {
+              title: "",
+              type: 1,
+              answer: ""
+            };
+          } else if (topicType == 5) {
+            json1.json = {
+              title: "",
+              type: 1,
+              detail: ""
+            };
+          } else if (topicType == 6) {
+            json1.json = {
+              title: "",
+              detail: "",
+              courses: []
+            };
+          } else if (topicType == 7) {
+            json1.json = {
+              title: "",
+              detail: "",
+              small: 0,
+              big: 10
+            };
+          } else if (topicType == 8) {
+            json1.json = {
+              title: "",
+              detail: ""
+            };
+          } else if (topicType == 9) {
+            json1.json = {
+              title: "",
+              type: 1,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" }
+              ],
+              answer: ""
+            };
+          } else if (topicType == 10) {
+            json1.json = {
+              title: "",
+              type: 2,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" }
+              ],
+              answer: ""
+            };
+          } else if (topicType == 11) {
+            json1.json = {
+              title: "",
+              detail: ""
+            };
+          } else if (topicType == 12) {
+            json1.json = {
+              title: "",
+              detail: ""
+            };
+          } else if (topicType == 13) {
+            json1.json = {
+              title: "",
+              detail: "",
+              answer:'',
+              type:"1",//1:整数、2:保留一位小数、3:保留两位小数 4:百分数
+            };
+          }
+          this.manualJson.push(json1);
+          this.$forceUpdate();
+        } else if (type == 3 || type == 2) {
+          this.$message.error("请选中分页或者分组添加题目");
+          return;
+        }
+      }
+      topicType = "";
+      this.$forceUpdate();
+      this.$emit("changeJson", this.manualJson);
+    },
+    addQtype(type) {
+      if (type == 1) {
+        let type = 1;
+        if (this.manualJson.length > 0) {
+          for (var i = 0; i < this.manualJson.length; i++) {
+            if (this.manualJson[i].ttype == 1) {
+              type = 2;
+            } else if (this.manualJson[i].ttype == 3) {
+              type = 3;
+            }
+          }
+        }
+        let json = {
+          ttype: 2,
+          array: [],
+          isopen: true
+        };
+        if (type == 1) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+            this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.manualJson.push(json);
+          }
+        } else if (type == 2) {
+          this.manualJson = [
+            {
+              ttype: 2,
+              array: this.depthCopy(this.manualJson),
+              isopen: true
+            }
+          ];
+        } else if (type == 3) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            if (
+              _check.length > 1 &&
+              this.manualJson[_check[0]].array[0] &&
+              this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            } else if (
+              this.manualJson[_check[0]].array[0] &&
+              !this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array = [
+                {
+                  ttype: 2,
+                  array: this.depthCopy(this.manualJson[_check[0]].array),
+                  isopen: true
+                }
+              ];
+            } else {
+              this.manualJson[_check[0]].array.push(json);
+            }
+          } else {
+            this.$message.error("请选中分页添加分组");
+            return;
+          }
+        }
+      } else if (type == 2) {
+        let type = 1;
+        if (this.manualJson.length > 0) {
+          for (var i = 0; i < this.manualJson.length; i++) {
+            if (
+              this.manualJson[i].ttype == 1 ||
+              this.manualJson[i].ttype == 2
+            ) {
+              type = 2;
+            }
+          }
+        }
+        if (type == 1) {
+          let json = {
+            ttype: 3,
+            array: [],
+            isopen: true
+          };
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.manualJson.push(json);
+          }
+        } else {
+          this.manualJson = [
+            {
+              ttype: 3,
+              array: this.depthCopy(this.manualJson),
+              isopen: true
+            }
+          ];
+        }
+      }
+      this.$emit("changeJson", this.manualJson);
+    },
+		scrollPage(index){
+			this.$refs.checkOrderEditRef.scrollPage(index)
+		}
+  },
+  mounted() {
+    this.manualJson = this.depthCopy(this.checkJson);
+  }
+};
+</script>
+
+<style scoped>
+.edit_box {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 0 0;
+  box-sizing: border-box;
+  position: relative;
+}
+
+.e_add {
+  height: 100%;
+  width: 300px;
+  background: #fff;
+  overflow: auto;
+  padding: 20px 10px;
+  box-sizing: border-box;
+  /* border-right: 1px solid #e5e5e5; */
+  border-radius: 5px;
+  position: relative;
+}
+
+.e_content {
+  height: 100%;
+  flex: 1;
+  /* margin: 0 20px; */
+  /* width: calc(100% - 640px); */
+  background: #fff;
+  overflow: auto;
+  padding: 20px;
+  box-sizing: border-box;
+  border-radius: 5px;
+}
+
+.e_content > .title {
+  font-size: 24px;
+  font-weight: bold;
+  text-align: center;
+  width: 100%;
+  margin-bottom: 10px;
+  word-break: break-all;
+}
+
+.titleInput {
+  font-size: 24px;
+  font-weight: bold;
+  text-align: center;
+  width: 100%;
+  margin-bottom: 10px;
+  border: none;
+  outline: none;
+}
+
+.briefInput {
+  font-size: 14px;
+  text-align: center;
+  width: 100%;
+  margin-bottom: 10px;
+  border: none;
+  outline: none;
+  width: 100%;
+}
+
+.e_content > .detail {
+  font-size: 14px;
+  text-align: center;
+  width: 100%;
+  margin-bottom: 10px;
+  word-break: break-all;
+  color: #00000066;
+}
+
+.e_order {
+  height: 100%;
+  width: 300px;
+  background: #fff;
+  overflow: auto;
+  padding: 20px 10px;
+  box-sizing: border-box;
+  border-radius: 5px;
+  position: relative;
+}
+
+.e_add > .title,
+.e_order > .title {
+  /* text-align: center; */
+	text-indent: 1.1em;
+  font-size: 20px;
+}
+
+.e_add_box {
+  width: 100%;
+  /* border: 1px solid #dcdcdc; */
+  margin-top: 10px;
+  border-radius: 3px;
+  /* background: #f4f4f4; */
+  box-sizing: border-box;
+  padding: 0 20px 0;
+}
+
+.e_add_box > .title {
+  margin-bottom: 10px;
+  font-size: 15px;
+  font-weight: 700;
+  display: flex;
+  align-items: center;
+}
+
+.e_add_box > .title::before {
+  content: "";
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  background: rgb(54, 129, 252);
+  margin-right: 10px;
+  display: block;
+}
+
+.e_add_box > .e_add_ci {
+  margin-top: 10px;
+}
+
+.e_add_box > .e_add_ci > .title {
+  font-size: 14px;
+  margin-bottom: 10px;
+}
+
+.e_add_box > .e_add_ci > .box {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.e_add_box > .e_add_ci > .box > .btn {
+  margin-bottom: 10px;
+  width: 50%;
+}
+
+.e_a_foldIcon {
+  width: 30px;
+  height: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: absolute;
+  top: 15px;
+  border-radius: 5px 0 0 5px;
+  background-color: #409eff;
+  cursor: pointer;
+}
+
+.e_a_foldIcon > svg {
+  width: 20px;
+  height: 20px;
+  fill: #fff;
+}
+
+.e_outside_foldIcon {
+  width: 40px;
+  height: 40px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: absolute;
+  top: 15px;
+  border-radius: 5px 0 0 5px;
+  background-color: #409eff;
+  cursor: pointer;
+}
+
+.e_outside_foldIcon > svg {
+  width: 20px;
+  height: 20px;
+  fill: #fff;
+}
+
+.e_viewFile {
+  height: 100%;
+  flex: 1;
+  margin-left: 0px;
+  background-color: #ffffff;
+  border-radius: 5px;
+  box-sizing: border-box;
+  overflow-y: hidden;
+}
+
+.e_addBox {
+  width: 400px;
+  height: 300px;
+  background-color: red;
+}
+</style>

+ 625 - 0
src/components/pages/test/add/edit/edit/indexJ.vue

@@ -0,0 +1,625 @@
+<template>
+  <div class="edit_box">
+    <div class="e_add">
+      <div class="title" style="margin-bottom: 20px">题目添加</div>
+      <div class="e_add_box">
+        <div class="title">基础题型</div>
+        <div class="e_add_ci">
+          <!-- <div class="title">基础题型</div> -->
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in options"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <!-- <el-button type="primary"
+                                size="mini">{{ item.label }}</el-button> -->
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_text: item.value == 3,
+                  pub_test_btn_choose: item.value == 1 || item.value == 10,
+                  pub_test_btn_file: item.value == 5,
+                  pub_test_btn_course: item.value == 6,
+                  pub_test_btn_eva: item.value == 7,
+                  pub_test_btn_time: item.value == 8,
+                  pub_test_btn_choose2: item.value == 9,
+									pub_test_btn_sweep:item.value==12
+                }"
+              >
+                {{ item.label }} 
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="e_add_box">
+        <div class="title">平台组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in optionsPin"
+              :key="item.label"
+              @click="addCheck(item.value)"
+            >
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_course: item.value == 6 || item.value == 11,
+                }"
+              >
+                {{ item.label }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="e_add_box">
+        <div class="title">添加组件</div>
+        <div class="e_add_ci">
+          <div class="box">
+            <div
+              class="btn"
+              v-for="item in buttonOptions"
+              :key="item.name"
+              @click="addQtype(item.type)"
+            >
+              <!-- <el-button type="primary"
+                                size="mini">{{ item.name }}</el-button> -->
+              <button
+                class="pub_test_btn"
+                :class="{
+                  pub_test_btn_group: item.type == 1,
+                  pub_test_btn_page: item.type == 2,
+                }"
+              >
+                {{ item.name }}
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="e_content">
+      <div class="title">{{ title }}</div>
+      <div class="e_order_box">
+        <checkOrder
+          :checkC.sync="checkC"
+          :checkJson="manualJson"
+          @changeJson="changeJson"
+          etype="edit"
+          :cJson.sync="cJson"
+        >
+        </checkOrder>
+      </div>
+    </div>
+    <div class="e_order">
+      <div class="title">
+        题目排序
+        <span style="font-size: 14px; color: #373737">总分:{{ score }}分</span>
+      </div>
+      <div class="e_order_box" style="margin-top: 20px">
+        <checkOrder
+          :checkC.sync="checkC"
+          :checkJson="manualJson"
+          @changeJson="changeJson"
+          etype="order"
+          :cJson.sync="cJson"
+        >
+        </checkOrder>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import checkOrder from "../../components/checkOrder.vue";
+import minxinVue from "../../minxins/minxin";
+export default {
+  components: {
+    checkOrder,
+  },
+  mixins: [minxinVue],
+  props: {
+    checkJson: {
+      type: Array,
+    },
+    title: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      manualJson: [],
+      checkC: "",
+      cJson: {},
+    };
+  },
+  watch: {
+    checkJson: {
+      handler(newVal) {
+        this.manualJson = this.depthCopy(newVal);
+      },
+      deep: true,
+    },
+  },
+  computed: {
+    score() {
+      let score = 0;
+      this.manualJson.forEach((el) => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach((item) => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach((item2) => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0;
+                }
+              });
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0;
+            }
+          });
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0;
+        }
+      });
+      return score > 0 ? score : "未设置分数";
+    },
+  },
+  methods: {
+    changeJson(json) {
+      this.manualJson = json;
+      this.$emit("changeJson", json);
+    },
+    addCheck(topicType) {
+      let type = 1;
+			// if(this.manualJson.filter(i=>i.type==6).length>=1){
+			// 	return this.$message.error("一个表单只能添加一个课程组件");
+			// }
+			function checkType(obj){
+				if(obj.filter(i=>i.array).length>0){
+					let bol = false;
+					obj.forEach(i=>{
+						console.log(i.array)
+						if(bol)return;
+						bol = checkType(i.array);
+					})
+					return bol;
+				}else if(obj.filter(i=>i.type==6).length>=1){
+					return true;
+				}else{
+					return false;
+				}
+			}
+			if(topicType == 6 && checkType(this.manualJson)){
+				return this.$message.error("一个表单只能添加一个课程组件");
+			}
+      if (this.manualJson.length > 0) {
+        for (var i = 0; i < this.manualJson.length; i++) {
+          if (this.manualJson[i].ttype == 2) {
+            type = 2;
+          } else if (this.manualJson[i].ttype == 3) {
+            type = 3;
+          }
+        }
+      }
+
+      if (this.checkC) {
+        let _check = this.checkC.replace("x", "").split("-");
+        let _json = this.manualJson[_check[0]];
+        let _topicType = ''
+        if(topicType == 9 || topicType == 10){
+          _topicType = 1 
+        }else {
+          _topicType = topicType
+        }
+        let json = {
+          ttype: 1,
+          type: _topicType,
+        };
+        if (topicType == 1) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        } else if (topicType == 3) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            answer: "",
+          };
+        } else if (topicType == 5) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            detail: "",
+          };
+        } else if (topicType == 6) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            courses:[]
+          };
+        } else if (topicType == 7) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            small: 0,
+            big: 10,
+          };
+        } else if (topicType == 8) {
+          json.json = {
+            title: "标题",
+            detail: "",
+          };
+        }else if (topicType == 9) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        }else if (topicType == 10) {
+          json.json = {
+            title: "标题",
+            type: 2,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        } else if (topicType == 11) {
+          json.json = {
+            title: "标题",
+            detail: ""
+          };
+        }
+        if (_json.array) {
+          if (type == 3 && _check.length == 2) {
+            if (this.manualJson[_check[0]].array[_check[1]].array) {
+              this.manualJson[_check[0]].array[_check[1]].array.push(json);
+            } else {
+              this.manualJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            }
+          } else if (type == 3 && _check.length == 3) {
+            this.manualJson[_check[0]].array[_check[1]].array.splice(
+              parseInt(_check[2]) + 1,
+              0,
+              json
+            );
+          } else if (type == 2 && _check.length == 2) {
+            this.manualJson[_check[0]].array.splice(
+              parseInt(_check[1]) + 1,
+              0,
+              json
+            );
+          } else if (type == 2 && _check.length == 1) {
+            this.manualJson[_check[0]].array.push(json);
+          } else if (type == 3 && _check.length == 1) {
+            if (
+              this.manualJson[_check[0]].array[0] &&
+              this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array[0].array.push(json);
+            } else {
+              this.manualJson[_check[0]].array.push(json);
+            }
+          }
+        } else {
+          this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+        }
+      } else {
+        if (type == 1) {
+          let _topicType = ''
+          if(topicType == 9 || topicType == 10){
+            _topicType = 1 
+          }else {
+            _topicType = topicType
+          }
+          let json1 = {
+            ttype: 1,
+            type: _topicType,
+          };
+
+          if (topicType == 1) {
+            json1.json = {
+              title: "标题",
+              type: 1,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" },
+              ],
+              answer: "",
+            };
+          } else if (topicType == 3) {
+            json1.json = {
+              title: "标题",
+              type: 1,
+              answer: "",
+            };
+          } else if (topicType == 5) {
+            json1.json = {
+              title: "标题",
+              type: 1,
+              detail: "",
+            };
+          } else if (topicType == 6) {
+            json1.json = {
+              title: "标题",
+              detail: "",
+              courses:[]
+            };
+          } else if (topicType == 7) {
+            json1.json = {
+              title: "标题",
+              detail: "",
+              small: 0,
+              big: 10,
+            };
+          } else if (topicType == 8) {
+            json1.json = {
+              title: "标题",
+              detail: "",
+            };
+          } else if (topicType == 9) {
+            json1.json = {
+              title: "标题",
+              type: 1,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" },
+              ],
+              answer: "",
+            };
+          } else if (topicType == 10) {
+            json1.json = {
+              title: "标题",
+              type: 2,
+              array: [
+                { option: "选项1", img: "" },
+                { option: "选项2", img: "" },
+              ],
+              answer: "",
+            };
+          } else if (topicType == 11) {
+            json1.json = {
+              title: "标题",
+              detail: ""
+            };
+          }
+          this.manualJson.push(json1);
+          this.$forceUpdate()
+        } else if (type == 3 || type == 2) {
+          this.$message.error("请选中分页或者分组添加题目");
+          return;
+        }
+      }
+      topicType = "";
+      this.$forceUpdate()
+      this.$emit("changeJson", this.manualJson);
+    },
+    addQtype(type) {
+      if (type == 1) {
+        let type = 1;
+        if (this.manualJson.length > 0) {
+          for (var i = 0; i < this.manualJson.length; i++) {
+            if (this.manualJson[i].ttype == 1) {
+              type = 2;
+            } else if (this.manualJson[i].ttype == 3) {
+              type = 3;
+            }
+          }
+        }
+        let json = {
+          ttype: 2,
+          array: [],
+          isopen: true,
+        };
+        if (type == 1) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+            this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.manualJson.push(json);
+          }
+        } else if (type == 2) {
+          this.manualJson = [
+            {
+              ttype: 2,
+              array: this.depthCopy(this.manualJson),
+              isopen: true,
+            },
+          ];
+        } else if (type == 3) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            if (
+              _check.length > 1 &&
+              this.manualJson[_check[0]].array[0] &&
+              this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            } else if (
+              this.manualJson[_check[0]].array[0] &&
+              !this.manualJson[_check[0]].array[0].array
+            ) {
+              this.manualJson[_check[0]].array = [
+                {
+                  ttype: 2,
+                  array: this.depthCopy(this.manualJson[_check[0]].array),
+                  isopen: true,
+                },
+              ];
+            } else {
+              this.manualJson[_check[0]].array.push(json);
+            }
+          } else {
+            this.$message.error("请选中分页添加分组");
+            return;
+          }
+        }
+      } else if (type == 2) {
+        let type = 1;
+        if (this.manualJson.length > 0) {
+          for (var i = 0; i < this.manualJson.length; i++) {
+            if (
+              this.manualJson[i].ttype == 1 ||
+              this.manualJson[i].ttype == 2
+            ) {
+              type = 2;
+            }
+          }
+        }
+        if (type == 1) {
+          let json = {
+            ttype: 3,
+            array: [],
+            isopen: true,
+          };
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            this.manualJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.manualJson.push(json);
+          }
+        } else {
+          this.manualJson = [
+            {
+              ttype: 3,
+              array: this.depthCopy(this.manualJson),
+              isopen: true,
+            },
+          ];
+        }
+      }
+      this.$emit("changeJson", this.manualJson);
+    },
+  },
+  mounted() {
+    this.manualJson = this.depthCopy(this.checkJson);
+  },
+};
+</script>
+
+<style scoped>
+.edit_box {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: flex;
+  justify-content: space-between;
+  padding: 0 0 0;
+  box-sizing: border-box;
+}
+
+.e_add {
+  height: 100%;
+  width: 300px;
+  background: #fff;
+  overflow: auto;
+  padding: 20px 10px;
+  box-sizing: border-box;
+  border-right: 1px solid #e5e5e5;
+}
+
+.e_content {
+  height: 100%;
+  width: calc(100% - 600px);
+  background: #fff;
+  overflow: auto;
+  padding: 20px 0;
+  box-sizing: border-box;
+}
+
+.e_content > .title {
+  font-size: 24px;
+  font-weight: bold;
+  text-align: center;
+  width: 100%;
+  margin-bottom: 10px;
+  word-break: break-all;
+}
+
+.e_order {
+  height: 100%;
+  width: 300px;
+  background: #fff;
+  overflow: auto;
+  padding: 20px 10px;
+  box-sizing: border-box;
+}
+
+.e_add > .title,
+.e_order > .title {
+  text-align: center;
+  font-size: 20px;
+}
+
+.e_add_box {
+  width: 100%;
+  /* border: 1px solid #dcdcdc; */
+  margin-top: 10px;
+  border-radius: 3px;
+  /* background: #f4f4f4; */
+  box-sizing: border-box;
+  padding: 0 20px 0;
+}
+
+.e_add_box > .title {
+  margin-bottom: 10px;
+  font-size: 15px;
+  font-weight: 700;
+  display: flex;
+  align-items: center;
+}
+
+.e_add_box > .title::before {
+  content: "";
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  background: rgb(54, 129, 252);
+  margin-right: 10px;
+  display: block;
+}
+
+.e_add_box > .e_add_ci {
+  margin-top: 10px;
+}
+
+.e_add_box > .e_add_ci > .title {
+  font-size: 14px;
+  margin-bottom: 10px;
+}
+
+.e_add_box > .e_add_ci > .box {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.e_add_box > .e_add_ci > .box > .btn {
+  margin-bottom: 10px;
+  width: 50%;
+}
+</style>

+ 531 - 0
src/components/pages/test/add/edit/index.vue

@@ -0,0 +1,531 @@
+<template>
+  <div class="rightBox" v-loading="loading">
+    <!-- <div class="title">
+      <div class="c_info_title">创建表单内容</div>
+    </div> -->
+    <div class="edit_top">
+      <div class="e_t_left">
+        <el-button type="primary" size="small" @click="useAiBtn()"
+          >按文档创建</el-button
+        >
+
+				<!-- <el-button :type="viewFile?'primary':''" size="small" v-if="fileData" @click="viewUploadFile()"
+          >预览</el-button
+        > -->
+      </div>
+      <div class="edit_btn">
+        <span class="edit" :class="{ active: type == 1 }" @click="type = 1"
+          >编辑</span
+        >
+        <span class="check" :class="{ active: type == 2 }" @click="type = 2"
+          >预览</span
+        >
+        <!-- <span :class="{ active: type == 3 }" @click="type = 3">回答</span>
+        <span :class="{ active: type == 4 }" @click="type = 4">统计</span> -->
+      </div>
+      <div class="op_btn">
+        <!-- <el-button type="primary" size="small" @click="lastSteps">上一步</el-button> -->
+        <el-button type="primary" size="small" @click="save">保存</el-button>
+        <el-button type="primary" size="small" @click="publish">发布</el-button>
+      </div>
+    </div>
+    <div class="e_box">
+      <editBox
+        v-if="type == 1"
+        :checkJson="checkJson"
+        @changeJson="changeJson"
+        :title="title"
+        :brief="brief"
+				:fileData="fileData"
+				:viewFile="viewFile"
+        @updateTitle="updateTitle"
+        @updateBrief="updateBrief"
+      ></editBox>
+      <checkBox v-if="type == 2" :cJson="checkJson" :title="title"></checkBox>
+    </div>
+		<div class="ajaxCancel" v-if="loading">
+				<img src="../../../../../assets/KekeLoading.gif">
+				<span>小可正在努力生成中...</span>
+			 <el-button type="primary" @click.stop="cancelAjax" size="small" v-if="ajaxCancelToken">停止生成</el-button>
+		</div>
+  </div>
+</template>
+
+<script>
+import editBox from "./edit/index.vue";
+import checkBox from "./check/index.vue";
+import { v4 as uuidv4 } from "uuid";
+import ConvertApi from 'convertapi-js'
+let convertApi = ConvertApi.auth('secret_8jZzewWvAJluEjTR')
+export default {
+  components: {
+    editBox,
+    checkBox
+  },
+  props: {
+    title: {
+      type: String
+    },
+    brief: {
+      type: String
+    },
+    testType: {
+      type: Array
+    },
+    see: {
+      type: Boolean
+    },
+    steps: {
+      type: Number
+    },
+    cJson: {
+      type: Array
+    },
+		fileData: {
+      type: Object
+    }
+  },
+  data() {
+    return {
+      type: 1,
+      checkJson: [],
+      loading: false,
+			userId: this.$route.query.userid,
+			viewFile:false,
+			ajaxCancelToken:null,
+    };
+  },
+  watch: {
+    cJson: {
+      handler: function(newVal, oldVal) {
+        this.checkJson = this.depthCopy(newVal);
+      },
+      deep: true
+    },
+  },
+  methods: {
+    updateTitle(value) {
+      console.log(value);
+      this.$emit("update:title", value);
+    },
+    updateBrief(value) {
+      this.$emit("update:brief", value);
+    },
+		updateFileData(value){
+			this.$emit("update:fileData",value)
+		},
+    lastSteps() {
+      this.$emit("update:steps", this.steps - 1);
+    },
+    save() {
+      this.$emit("save", 4);
+    },
+    publish() {
+      this.$emit("publish");
+    },
+    depthCopy(s) {
+      return s ? JSON.parse(JSON.stringify(s)) : "";
+    },
+    changeJson(json) {
+      console.log(json);
+      this.$emit("update:cJson", json);
+    },
+    async useAiBtn(type = 0) {
+      if (type == 0 && this.checkJson.length > 0) {
+        return this.$confirm(
+          "使用智能检索功能会覆盖已有表单,确定使用吗?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.useAiBtn(1);
+          })
+          .catch(() => {
+            console.log("不使用");
+          });
+      }
+      let input = document.createElement("input");
+      input.type = "file";
+      // input.accept = ".wav";
+      // input.accept = "audio/*, .txt, .pdf, .xlsx";
+      input.accept = ".docx,.doc";
+      input.click();
+      input.onchange = async () => {
+        this.loading = true;
+        let file = input.files[0];
+				// if(/\.(doc)$/i.test(file.name)){
+				// 	let params = convertApi.createParams()
+        //   params.add('file', file)
+				// 	let result = await convertApi.convert('doc', 'docx', params)
+        //   // Get result file URL
+        //   file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
+        //     return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
+        //   });
+				// }
+				console.log("file",file)
+        if (!/\.(docx|doc)$/i.test(file.name)) {
+          this.loading = false;
+          return this.$message.error("请上传.docx或.doc格式的文件");
+        }
+
+				
+        let uploadData = await this.uploadFile(file);
+        if (uploadData == 1) {
+          this.loading = false;
+          return this.$message.error("文件上传失败");
+        }
+        let _fileData = {
+          fileName: uploadData.Key,
+          url: uploadData.Location,
+          fileId: await this.fileGetFileId(uploadData.Location)
+        };
+        if (_fileData.fileId == 1) {
+          this.loading = false;
+          return this.$message.error("文件获取fileId失败");
+        }
+
+				let testData = await this.getCheckJSon(_fileData.fileId);
+				if(testData==2){
+					this.loading = false;
+					return;
+				}
+				if (testData == 1) {
+          this.loading = false;
+          return this.$message.error("生成题目失败");
+        }
+				let _titleData = testData.find(i=>(i.formName || i.illustrate))
+				testData = testData.filter(i=>!(i.formName || i.illustrate))
+				this.fileData = _fileData;
+				this.updateFileData(_fileData);
+				if(_titleData){
+					this.updateTitle(_titleData.formName)
+					this.updateBrief(_titleData.illustrate)
+				}
+				this.changeJson(testData)
+				this.viewFile = true;
+        console.log(_fileData);
+				console.log(_titleData)
+				console.log(testData)
+        this.loading = false;
+        // this.uploadWavFileAndGetText(file);
+      };
+    },
+    uploadFile(file) {
+      return new Promise(resolve => {
+        var credentials = {
+          accessKeyId: "AKIATLPEDU37QV5CHLMH",
+          secretAccessKey: "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"
+        }; //秘钥形式的登录上传
+        window.AWS.config.update(credentials);
+        window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+        var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+        var _this = this;
+        if (file) {
+          var params = {
+            Key:
+              file.name.split(".")[0] +
+              new Date().getTime() +
+              "." +
+              file.name.split(".")[file.name.split(".").length - 1],
+            ContentType: file.type,
+            Body: file,
+            "Access-Control-Allow-Credentials": "*",
+            ACL: "public-read"
+          }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+          var options = {
+            partSize: 2048 * 1024 * 1024,
+            queueSize: 2,
+            leavePartsOnError: true
+          };
+          bucket
+            .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) {
+              if (err) {
+                resolve(1);
+              } else {
+                resolve(data);
+              }
+            });
+        }
+      });
+    },
+    fileGetFileId(url) {
+      return new Promise(resolve => {
+        this.ajax
+          .put("https://gpt4.cocorobo.cn/upload_file_knowledge", { url: url })
+          .then(res => {
+            let _data = res.data.FunctionResponse;
+            if (_data.result && _data.result.id) {
+              resolve(_data.result.id);
+            } else {
+              resolve(1);
+            }
+          })
+          .catch(e => {
+            console.log(e);
+            resolve(1);
+          });
+      });
+    },
+    getCheckJSon(fileId) {
+      return new Promise(resolve => {
+        let _msg = `Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content
+
+#Context
+##角色描述
+你是一位行政文员,你需要提取文档中需要收集的信息,梳理出需要收集的信息表格,确定信息收表的题目内容与题目类型。
+##任务描述
+你的任务是阅读上传文档中的内容,提取并输出文档中需要填写的信息,并输出收集信息表单,输出格式为## Format example。你的任务分为三步:
+第一步:提取文档中需要收集的信息内容。信息内容使用文件中的原文,并直接“## Format example”的形式罗列出需要收集的信息清单,不需要二次的分类和总结。通常提取文档中表格中的内容,其他描述性的文字、项目背景、审核意见等内容不应该出现在需要收集的表单内。
+第二步:判断这些需要需要收集的信息以什么题目类型的进行收集,除“年 月 日/日期”等内容使用日期外,其他题目都默认使用文本。
+第三步:输出信息收集表单,你仅仅只需要输出一份## Format example格式的数据,不需要增加任何描述性文字。
+##信息补充
+表单的题目类型包含问答、单选、多选
+文本:需要收集的信息为文本格式的内容,例如“姓名、年级、项目经历、获奖等文本内容”
+单选:需要收集的信息提供了选项,例如文档的表格中出现“性别 男 女” 。或文档中某项收集信息中提供了“是 否”或其他具有选择符号的内容,需要关联上下文判断。
+日期:文档中单独出现需要收集的信息中设计到“年 月 日”“日期”“时间”等,与日期相关的内容。如果文档中出现多个日期相关的题目,只保留一个日期题目类型即可。
+标题:文档中的总标题
+说明:文档中的总标题下的说明性文字
+
+##题目格式
+文本:{"ttype":1,"type":3,"json":{"title":"标题","type":1,"answer":""}}
+单选:{"ttype":1,"type":1,"json":{"title":"标题","type":1,"array":[{"option":"选项1","img":""}, {"option":"选项2","img":""}],"answer":""}}
+多选:{"ttype":1,"type":1,"json":{"title":"标题","type":2,"array":[{"option":"选项1","img":""},{"option":"选项2","img":""}],"answer":""}}
+
+标题和说明:{"formName":"标题","illustrate":"说明"}
+
+## Format example
+[{"formName":"标题","illustrate":"说明"},{"ttype":1,"type":3,"json":{"title":"标题","type":1,"answer":""}},{"ttype":1,"type":1,"json":{"title":"标题","type":1,"array":[{"option":"选项1","img":""},{"option":"选项2","img":""}],"answer":""}},{"ttype":1,"type":1,"json":{"title":"标题","type":2,"array":[{"option":"选项1","img":""},{"option":"选项2","img":""}],"answer":""}}]
+`;
+// 日期:{"ttype":1,"type":8,"json":{"title":"标题","detail":""}}
+
+        let params = {
+          assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
+          message: [{ type: "text", text: _msg }],
+          session_name: uuidv4(),
+          userId: this.userId,
+          file_ids: [fileId],
+          model: "gpt-4o-2024-11-20"
+          // model: "gpt-4o-2024-11-20"
+        };
+				console.log(params)
+				this.ajaxCancelToken = this.ajax.setCancelSource()
+        this.ajax
+          // .post("https://gpt4.cocorobo.cn/chat", params)
+          // .post("https://claude3.cocorobo.cn/chat", params)
+          .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params,this.ajaxCancelToken)
+          .then(res => {
+            let _data = res.data.FunctionResponse.message;
+            _data = _data.replaceAll("```json", "").replaceAll("```", "");
+            // const match = _data.match(/\[\s*\{[\s\S]*?\}\s*\]/);
+						// console.log("👇")
+						// console.log(match[0])
+            let _result = JSON.parse(_data) || [];
+            if (_result.length > 0) {
+              resolve(_result);
+            } else {
+              resolve(1);
+            }
+						this.ajaxCancelToken = null;
+          })
+          .catch(e => {
+            console.log(e);
+						this.ajaxCancelToken = null;
+            resolve(2);
+          });
+      });
+    },
+		viewUploadFile(){
+			this.viewFile = !this.viewFile;
+		},
+		cancelAjax(){
+			if(this.ajaxCancelToken){
+				this.ajaxCancelToken.cancel('Request canceled by the user.');
+				this.ajaxCancelToken = null;
+				this.$message.info("已停止文档生成");
+				this.loading = false;
+			}
+		}
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.cJson);
+		if(this.fileData){
+			this.viewFile = true;
+		}
+  }
+};
+</script>
+
+<style scoped>
+.c_info_title {
+  padding: 15px 0 15px 0;
+  font-size: 16px;
+  font-weight: bold;
+  margin: 0 0 0 0;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  line-height: 20px;
+}
+
+.c_info_title::before {
+  content: "";
+  display: block;
+  width: 3px;
+  height: 20px;
+  background: #0061ff;
+  border-radius: 3px;
+  margin: 0 5px 0 0;
+}
+
+.rightBox {
+  width: calc(100%);
+  /* background: #F0F2F5; */
+  /* background: #fff; */
+  overflow: auto;
+  height: calc(100%);
+  margin: 0 auto;
+  position: relative;
+  box-sizing: border-box;
+}
+
+.rightBox > .title {
+  background: #fff;
+  width: 100%;
+  padding: 0 20px 0;
+  box-sizing: border-box;
+}
+
+.edit_top {
+  height: 50px;
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+}
+
+.edit_top > .edit_btn {
+  display: flex;
+  height: 40px;
+  align-items: center;
+  border: 1px solid #e5e5e5;
+  box-sizing: border-box;
+  padding: 4px;
+  border-radius: 4px;
+}
+
+.edit_top > .edit_btn > span {
+  cursor: pointer;
+  padding-bottom: 5px;
+  display: block;
+  width: 90px;
+  padding: 0 15px;
+  height: 100%;
+  font-size: 14px;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 4px;
+}
+
+.edit_top > .edit_btn > .active {
+  color: #3e88f4;
+  /* border-bottom: 2px solid #2f80f3; */
+  background: rgb(224, 234, 251);
+}
+
+.edit_top > .edit_btn > span + span {
+  margin-left: 10px;
+}
+
+.edit_top > .edit_btn > span::before {
+  content: "";
+  display: block;
+  background-size: 100% 100%;
+  margin-right: 8px;
+}
+
+.edit_top > .edit_btn > .check::before {
+  width: 15px;
+  height: 15px;
+  background-image: url(../../../../../assets/icon/test/add_check_icon.png);
+}
+
+.edit_top > .edit_btn > .edit::before {
+  width: 15px;
+  height: 16px;
+  background-image: url(../../../../../assets/icon/test/add_edit_icon.png);
+}
+
+.edit_top > .edit_btn > .active.check::before {
+  background-image: url(../../../../../assets/icon/test/add_check_icon_active.png);
+}
+
+.edit_top > .edit_btn > .active.edit::before {
+  background-image: url(../../../../../assets/icon/test/add_edit_icon_active.png);
+}
+
+.edit_top > .op_btn {
+  position: absolute;
+  right: 30px;
+}
+
+.e_box {
+  height: calc(100% - 90px);
+  width: calc(100% - 40px);
+  overflow: hidden;
+  /* background: rgb(196, 226, 241); */
+  /* background: #fff; */
+  /* border: 1px solid #E5E5E5; */
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  margin: 20px auto 0;
+  border-radius: 5px;
+}
+
+.e_t_left {
+  position: absolute;
+  left: 30px;
+}
+
+.ajaxCancel{
+	position: fixed;
+	top: calc(50vh + 20px);
+	left: 50vw;
+	transform: translate(-50%,-50%);
+	z-index: 9999;
+	width: 150px;
+	height: 80px;
+	border-radius: 5px;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+}
+
+.ajaxCancel>span{
+	margin-bottom: 10px;
+	color: #3681FC;
+	white-space: nowrap;
+}
+
+.ajaxCancel>img{
+	width: 200px;
+	height: 200px;
+	margin-bottom: -50px;
+}
+</style>

+ 220 - 0
src/components/pages/test/add/edit/indexJ.vue

@@ -0,0 +1,220 @@
+<template>
+  <div class="rightBox">
+    <div class="title">
+      <div class="c_info_title">创建表单内容</div>
+    </div>
+    <div class="edit_top">
+      <div class="edit_btn">
+        <span class="edit" :class="{ active: type == 1 }" @click="type = 1">编辑</span>
+        <span class="check" :class="{ active: type == 2 }" @click="type = 2">预览</span>
+        <!-- <span :class="{ active: type == 3 }" @click="type = 3">回答</span>
+        <span :class="{ active: type == 4 }" @click="type = 4">统计</span> -->
+      </div>
+      <div class="op_btn">
+        <!-- <el-button type="primary" size="small" @click="lastSteps">上一步</el-button> -->
+        <el-button type="primary" size="small" @click="save">保存</el-button>
+        <el-button type="primary" size="small" @click="publish">发布</el-button>
+
+      </div>
+    </div>
+    <div class="e_box">
+      <editBox v-if="type == 1" :checkJson="checkJson" @changeJson="changeJson" :title="title"></editBox>
+      <checkBox v-if="type == 2" :cJson="checkJson" :title="title"></checkBox>
+    </div>
+  </div>
+</template>
+
+<script>
+import editBox from './edit/index.vue'
+import checkBox from './check/index.vue'
+
+export default {
+  components: {
+    editBox,
+    checkBox
+  },
+  props: {
+    title: {
+      type: String
+    },
+    testType: {
+      type: Array
+    },
+    see: {
+      type: Boolean
+    },
+    steps: {
+      type: Number
+    },
+    cJson: {
+      type: Array
+    }
+  },
+  data() {
+    return {
+      type: 1,
+      checkJson: [],
+    }
+  },
+  watch: {
+    cJson: {
+      handler: function (newVal, oldVal) {
+        this.checkJson = this.depthCopy(newVal);
+      },
+      deep: true,
+    },
+  },
+  methods: {
+    lastSteps() {
+      this.$emit('update:steps', this.steps - 1)
+    },
+    save() {
+      this.$emit("save", 4)
+    },
+    publish() {
+      this.$emit("publish")
+    },
+    depthCopy(s) {
+      return s ? JSON.parse(JSON.stringify(s)) : ''
+    },
+    changeJson(json) {
+      console.log(json);
+      this.$emit("update:cJson", json);
+    }
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.cJson);
+  },
+}
+</script>
+
+<style scoped>
+.c_info_title {
+  padding: 15px 0 15px 0;
+  font-size: 16px;
+  font-weight: bold;
+  margin: 0 0 0 0;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  line-height: 20px;
+}
+
+.c_info_title::before {
+  content: '';
+  display: block;
+  width: 3px;
+  height: 20px;
+  background: #0061FF;
+  border-radius: 3px;
+  margin: 0 5px 0 0;
+}
+
+.rightBox {
+  width: calc(100%);
+  /* background: #F0F2F5; */
+  background: #fff;
+  overflow: auto;
+  height: calc(100%);
+  margin: 0 auto;
+  position: relative;
+  box-sizing: border-box;
+}
+
+.rightBox>.title {
+  background: #fff;
+  width: 100%;
+  padding: 0 20px 0;
+  box-sizing: border-box;
+}
+
+.edit_top {
+  height: 50px;
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+}
+
+.edit_top>.edit_btn {
+  display: flex;
+  height: 40px;
+  align-items: center;
+  border: 1px solid #E5E5E5;
+  box-sizing: border-box;
+  padding: 4px;
+  border-radius: 4px;
+}
+
+.edit_top>.edit_btn>span {
+  cursor: pointer;
+  padding-bottom: 5px;
+  display: block;
+  width: 90px;
+  padding: 0 15px;
+  height: 100%;
+  font-size: 14px;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 4px;
+}
+
+.edit_top>.edit_btn>.active {
+  color: #3e88f4;
+  /* border-bottom: 2px solid #2f80f3; */
+  background: rgb(224, 234, 251);
+}
+
+.edit_top>.edit_btn>span+span {
+  margin-left: 10px;
+}
+
+
+.edit_top>.edit_btn>span::before {
+  content: '';
+  display: block;
+  background-size: 100% 100%;
+  margin-right: 8px;
+}
+
+.edit_top>.edit_btn>.check::before {
+  width: 15px;
+  height: 15px;
+  background-image: url(../../../../../assets/icon/test/add_check_icon.png);
+}
+
+.edit_top>.edit_btn>.edit::before {
+  width: 15px;
+  height: 16px;
+  background-image: url(../../../../../assets/icon/test/add_edit_icon.png);
+}
+
+.edit_top>.edit_btn>.active.check::before {
+  background-image: url(../../../../../assets/icon/test/add_check_icon_active.png);
+}
+
+.edit_top>.edit_btn>.active.edit::before {
+  background-image: url(../../../../../assets/icon/test/add_edit_icon_active.png);
+}
+
+
+.edit_top>.op_btn {
+  position: absolute;
+  right: 30px;
+}
+
+.e_box {
+  height: calc(100% - 135px);
+  width: calc(100% - 40px);
+  overflow: hidden;
+  /* background: rgb(196, 226, 241); */
+  background: #fff;
+  border: 1px solid #E5E5E5;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  margin: 15px auto 0;
+  border-radius: 5px;
+}</style>

+ 106 - 0
src/components/pages/test/add/global_styles.css

@@ -0,0 +1,106 @@
+.c_box {
+	width: calc(100% - 20px);
+	position: relative;
+	margin: 0 auto;
+	padding-left: 26px;
+	box-sizing: border-box;
+	padding-bottom: 10px;
+}
+
+.mask {
+	position: absolute;
+	height: 100%;
+	width: 100%;
+	z-index: 2;
+}
+
+.choice_box {
+	white-space: pre-line;
+}
+
+.choice_box>.title {
+	font-weight: bold;
+	width: 100%;
+	word-break: break-all;
+}
+
+.choice_box>.choices {
+	margin-top:10px;
+}
+
+.choice_box > .detail {
+  width: 100%;
+  word-break: break-all;
+  color: rgb(136, 139, 146);
+  margin: 10px 0 0;
+}
+
+.set_box{
+	border: 1px solid #CAD1DC;
+	padding: 8px;
+	border-radius: 5px;
+	box-sizing: border-box;
+	width: 100%;
+	color: #828282;
+}
+
+.isOpen_box{
+	z-index: 3;
+	width: 100%;
+	
+}
+
+.isOpen_scoreInput{
+	max-width: 120px;
+}
+
+.editInput {
+  font-size: 16px;
+  font-weight: bold;
+  text-align: left;
+  width: 100%;
+  border: none;
+  outline: none;
+	font-weight: bold;
+}
+
+.editInput::placeholder{
+	font-size: 15px !important;
+	font-weight: bold;
+	text-align: left;
+	line-height: normal;
+  vertical-align: middle;
+}
+
+.answerInput{
+	color: #efa030;
+	font-size: 16px;
+}
+
+.choiceInput>>> .el-checkbox__inner{
+	background-color: #fff !important;
+	border: 1px solid #DCDFE6;
+	cursor: pointer !important;
+}
+
+.choiceInput>>> .is-checked>.el-checkbox__inner{
+	background-color: #409EFF !important;
+	border: 1px solid #409EFF !important;
+	color: #fff !important;
+}
+
+.choiceInput>>> .el-radio__inner{
+	background-color: #fff !important;
+	border: 1px solid #DCDFE6;
+	cursor: pointer !important;
+}
+
+.choiceInput>>> .is-checked>.el-radio__inner{
+	background-color: #409EFF !important;
+	border: 1px solid #409EFF !important;
+	color: #fff !important;
+}
+
+.t_empty{
+	color: #757575;
+}

+ 101 - 0
src/components/pages/test/add/minxins/minxin.js

@@ -0,0 +1,101 @@
+
+var OpenCC = require("opencc-js");
+let converter = OpenCC.Converter({
+		from:'hk',
+		to:'cn'
+})
+
+const minxin = {
+  data() {
+    return {
+      options: JSON.parse(converter(JSON.stringify([
+        // {
+        //   value: 1,
+        //   label: "选择题"
+        // },
+        // {
+        //   value: 2,
+        //   label: "问答题"
+        // },
+        {
+          value: 3,
+          label: "文本"
+        },
+        // {
+        //   value: 4,
+        //   label: "添加文档"
+        // }
+        {
+          value: 5,
+          label: "附件"
+        },
+        // {
+        //   value: 6,
+        //   label: "课程"
+        // },
+        {
+          value: 7,
+          label: "评分"
+        },
+        {
+          value: 8,
+          label: "日期"
+        },
+        {
+          value: 9,
+          label: "单选"
+        },
+        {
+          value: 10,
+          label: "多选"
+        },
+				{
+					value:12,
+					label:"扫一扫"
+				},{
+          value:13,
+          label:"数字"
+        }
+      ]))),
+      optionsPin:JSON.parse(converter(JSON.stringify([
+       {
+          value: 6,
+          label: "课程"
+        },
+        {
+          value: 11,
+          label: "课程2"
+        },
+      ]))),
+      options2: JSON.parse(converter(JSON.stringify({
+        1: "选择题",
+        // 2: "问答题",
+        3: "文本",
+        4: "添加文档",
+        5: "附件",
+        6: "课程",
+        7: "评分",
+        8: "日期",
+        9: "单选",
+        10: "多选",
+        11: "课程",
+				12:"扫一扫",
+        13:"数字"
+      }))),
+      buttonOptions: JSON.parse(converter(JSON.stringify([
+        { name: "分组", type: 1 },
+        { name: "分页", type: 2 }
+      ])))
+    };
+  },
+  computed: {},
+  mounted() {},
+  activated() {},
+  methods: {
+    depthCopy(s) {
+      return s ? JSON.parse(JSON.stringify(s)) : '';
+    }
+  }
+};
+
+export default minxin;

+ 323 - 0
src/components/pages/test/add/setInfo/aiCreate.vue

@@ -0,0 +1,323 @@
+<template>
+  <div>
+    <el-dialog title="智能创建" :visible.sync="aiDialogVisible" :append-to-body="true" width="600px"
+      :before-close="handleClose" class="pub_dialog_diy" v-loading="loading">
+      <div>
+        <div class="ex_box">
+          <span>例子:</span>
+          <el-button type="primary" size="mini" @click="checkExample('1')">选择题</el-button>
+          <el-button type="primary" size="mini" @click="checkExample('2')">问答题</el-button>
+        </div>
+        <div class="ac_box">
+          <el-input v-model="text" placeholder="请在这里输入要发送的消息" size="normal" type="textarea" resize="none"
+            :rows="3"></el-input>
+          <el-button type="primary" size="mini" @click="generate" style="margin-left:10px">生成</el-button>
+        </div>
+        <div class="ac_content" v-if="aiCreate.length">
+          <div class="title">生成内容:</div>
+          <div class="box" v-if="aiType == 1">
+            <div v-for="(item, index) in aiCreate" :key="index" class="choice">
+              <div class="title">{{ `${index + 1}:${item.title}` }}</div>
+              <div class="options">
+                <span v-for="(option, oIndex) in item.options" :key="`${index}-${oIndex}`">{{ option }}</span>
+              </div>
+              <div class="answer">{{ `答案:${item.answer}` }}</div>
+            </div>
+          </div>
+          <div class="box" v-if="aiType == 3">
+            <div v-for="(item, index) in aiCreate" :key="index" class="choice">
+              <div class="title">{{ `${index + 1}:${item.title}` }}</div>
+              <div class="answer">{{ `答案:${item.answer}` }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div slot="footer">
+        <el-button @click="close">取消</el-button>
+        <el-button type="primary" @click="exportT">导入</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+
+export default {
+  props: {
+    aiJson: {
+      type: Array,
+    },
+    aiDialogVisible: {
+      type: Boolean,
+    }
+  },
+  data() {
+    return {
+      example: {
+        '1':{
+          'title':'请你以富文本的形式给我出三个关于小学数学单位换算的选择题,每个选择题选项不少于4个,需要答案,但不需要解释,符号请使用中文的'
+        },
+        '2':{
+          'title':'请你以富文本的形式给我出三个关于三年级语文知识问答的问答题,需要答案,但不需要解释'
+        }
+      },
+      text: "",
+      aiCreate: [],
+      aiType: "",
+      loading: false
+    }
+  },
+  methods: {
+    handleClose(done) {
+      this.close()
+      done()
+    },
+    close() {
+      this.$emit('update:aiDialogVisible', false)
+    },
+    checkExample(type){
+      this.text = this.example[type].title
+    },
+    guid() {
+      var _num,
+        i,
+        _guid = "";
+      for (i = 0; i < 32; i++) {
+        _guid += Math.floor(Math.random() * 16).toString(16); //随机0  - 16 的数字 转变为16进制的字符串
+        _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
+        if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
+          //会使guid中间加 "-"   形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+          _guid += "-";
+        }
+      }
+      return _guid;
+    },
+    generate() {
+      if (this.text == "") {
+        this.$message.error("请输入要发送的消息")
+        return
+      }
+      // else if (this.text.indexOf("添加文档") !== -1) {
+      //   this.aiType = 4
+      // }
+      if (this.text.indexOf("选择题") !== -1) {
+        this.aiType = 1
+      } else if (this.text.indexOf("问答题") !== -1) {
+        this.aiType = 3
+      }else {
+        this.$message.error("生成的文字中要包含选择题或者问答题才能生成题目哦,请重新编辑下吧")
+        return
+      }
+      this.loading = true
+      let param = {
+        model: "gpt-3.5-turbo",
+        temperature: 0,
+        max_tokens: 2048,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [
+          {
+            role: "user",
+            content: this.text,
+          },
+        ],
+        uid: this.guid(),
+        stream: false,
+      };
+      this.ajax.post("https://gpt.cocorobo.cn/chat", param).then(
+        (res) => {
+          if (
+            res.data.FunctionResponse &&
+            res.data.FunctionResponse.result &&
+            res.data.FunctionResponse.result == "无效请求,请重新发起对话"
+          ) {
+            this.$message.error("你的内容太长,无法使用Ai创建!");
+            this.loading = false
+            return;
+          }
+          let aiReturn = res.data.FunctionResponse.choices[0].message.content;
+          aiReturn = aiReturn.split("\n")
+          aiReturn = aiReturn.filter(e => e != "")
+          this.loading = false
+          this.generate2(aiReturn)
+        },
+        (err) => {
+          console.log(err);
+          this.loading = false
+        }
+      );
+    },
+    generate2(aiReturn) {
+      this.loading = true
+      let content = ''
+      if(this.aiType == 1){
+        content = `${JSON.stringify(aiReturn)},要求返回格式是Array [{"title":"",options:[],answer:[]}]`
+      }else if(this.aiType == 3) {
+        content = `${JSON.stringify(aiReturn)},要求返回格式是Array [{title: "",answer: ""}]`
+      }
+      let param = {
+        model: "gpt-3.5-turbo",
+        temperature: 0,
+        max_tokens: 2048,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [
+          {
+            role: "user",
+            content: content
+          },
+        ],
+        uid: this.guid(),
+        stream: false,
+      };
+      this.ajax.post("https://gpt.cocorobo.cn/chat", param).then(
+        (res) => {
+          if (
+            res.data.FunctionResponse &&
+            res.data.FunctionResponse.result &&
+            res.data.FunctionResponse.result == "无效请求,请重新发起对话"
+          ) {
+            this.$message.error("你的内容太长,无法使用Ai创建!");
+            this.loading = false
+            return;
+          }
+          let aiCreate = res.data.FunctionResponse.choices[0].message.content;
+          try {
+            aiCreate = JSON.parse(aiCreate)
+          } catch (error) {
+            this.generate2(aiReturn) 
+          }
+          console.log(aiCreate)
+          this.aiCreate = aiCreate;
+          this.loading = false
+        },
+        (err) => {
+          console.log(err);
+          this.loading = false
+        }
+      );
+    },
+    exportT() {
+      if (!this.aiCreate.length) {
+        this.$message.error("请先创建Ai内容!");
+        return;
+      }
+      if(this.aiType !== 1 && this.aiType !== 3){
+        this.$message.error("目前只支持选择题/问答题的创建!输入内容必须包含选择题/问答题!");
+        return;
+      }
+      var json = JSON.parse(JSON.stringify(this.aiJson))
+      let array = []
+      let englishIndex = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
+      if(this.aiType === 1){
+        for (var i = 0; i < this.aiCreate.length; i++) {
+          let answer = []
+          let type = 1
+          if (this.aiCreate[i].answer) {
+            if (this.aiCreate[i].answer.length > 1) {
+              type = 2
+              for (var j = 0; j < this.aiCreate[i].answer.length; j++) {
+                answer.push(englishIndex.indexOf(this.aiCreate[i].answer[j].toLocaleUpperCase()))
+              }
+            } else {
+              answer = [englishIndex.indexOf(this.aiCreate[i].answer[0].toLocaleUpperCase())]
+            }
+          }
+
+          let options = []
+          for (var j = 0; j < this.aiCreate[i].options.length; j++) {
+            options.push({
+              img: "",
+              option: this.aiCreate[i].options[j]
+            })
+          }
+          array.push(
+            {
+              json: {
+                answer: answer,
+                array: options,
+                title: this.aiCreate[i].title,
+                type: type
+              },
+              ttype: 1,
+              type: 1
+            }
+          )
+        }
+      }else if(this.aiType === 3){
+        for (var i = 0; i < this.aiCreate.length; i++) {
+          array.push(
+            {
+              json: {
+                answer: this.aiCreate[i].answer,
+                title: this.aiCreate[i].title,
+                type: 1
+              },
+              ttype: 1,
+              type: 3
+            }
+          )
+        }
+      }
+      if (!json.length || json[0].ttype == 1) {
+        json = [...json, ...array]
+      } else if((json[0].ttype == 2 || json[0].ttype == 3) && !json[0].array.length){
+        json[0].array = array
+      } else if(json[0].ttype == 2 && json[0].array.length){
+        json[0].array = [...json[0].array, ...array]
+      } else if(json[0].ttype == 3 && json[0].array.length){
+        if(json[0].array[0].ttype == 2){
+          json[0].array[0].array = [...json[0].array[0].array, ...array]
+        }else {
+          json[0].array = [...json[0].array, ...array]
+        }
+      }
+      this.$emit("update:aiJson", json)
+      this.close()
+    }
+  },
+}
+</script>
+
+<style scoped>
+.ac_box {
+  display: flex;
+  width: 100%;
+  align-items: flex-end;
+  margin-bottom: 10px;
+}
+
+.ex_box {
+  margin-bottom: 10px;
+  color: #909090;
+}
+
+.ac_content {}
+
+.ac_content>.title {
+  margin-bottom: 10px;
+}
+
+.ac_content>.box {}
+
+.ac_content>.box>.choice+.choice {
+  margin-top: 10px;
+}
+
+.ac_content>.box>.choice>div+div {
+  margin-top: 10px;
+}
+
+.ac_content>.box>.choice>.options {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.ac_content>.box>.choice>.options>span {
+  margin-right: 10px;
+  margin-bottom: 5px;
+}
+</style>

+ 363 - 0
src/components/pages/test/add/setInfo/aiCreate2.vue

@@ -0,0 +1,363 @@
+<template>
+  <div v-loading="loading" style="width: 100%;">
+    <div>
+      <div class="ex_box">
+        <span>例子:</span>
+        <el-button type="primary" size="mini" @click="checkExample('1')">选择题</el-button>
+        <el-button type="primary" size="mini" @click="checkExample('2')">问答题</el-button>
+      </div>
+      <div class="ac_box">
+        <!-- <el-input v-autoHeight="75" v-model="text" placeholder="请在这里输入要发送的消息" size="normal" type="textarea" resize="none"
+          :rows="3"></el-input> -->
+          <textarea v-autoHeight="75" rows="3" class="binfo_input binfo_textarea" cols v-model="text" placeholder="请在这里输入要发送的消息"></textarea>
+          <el-button type="primary" size="mini" @click="generate" style="margin-left:10px">生成</el-button>
+      </div>
+      <div class="ac_content" v-if="aiCreate.length">
+        <div class="title">生成内容:</div>
+        <div class="box" v-if="aiType == 1">
+          <div v-for="(item, index) in aiCreate" :key="index" class="choice">
+            <div class="title">{{ `${index + 1}:${item.title}` }}</div>
+            <div class="options">
+              <span v-for="(option, oIndex) in item.options" :key="`${index}-${oIndex}`">{{ option }}</span>
+            </div>
+            <div class="answer">{{ `答案:${item.answer}` }}</div>
+          </div>
+        </div>
+        <div class="box" v-if="aiType == 3">
+          <div v-for="(item, index) in aiCreate" :key="index" class="choice">
+            <div class="title">{{ `${index + 1}:${item.title}` }}</div>
+            <div class="answer">{{ `答案:${item.answer}` }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-button type="primary" @click="exportT" size="mini">导入</el-button>
+  </div>
+</template>
+
+<script>
+
+export default {
+  props: {
+    aiJson: {
+      type: Array,
+    },
+  },
+  directives: {
+    autoHeight: {
+      update(el, binding) {
+        const { value } = binding
+        if (value && typeof value === 'number') {
+          el.style.height = `${value}px`
+        } else {
+          el.style.height = 'auto'
+        }
+      },
+      componentUpdated(el) {
+        el.style.height = `${el.scrollHeight + 5}px`
+      },
+    },
+  },
+  data() {
+    return {
+      example: {
+        '1': {
+          'title': '请你以富文本的形式给我出三个关于小学数学单位换算的选择题,每个选择题选项不少于4个,需要答案,但不需要解释,符号请使用中文的'
+        },
+        '2': {
+          'title': '请你以富文本的形式给我出三个关于三年级语文知识问答的问答题,需要答案,但不需要解释'
+        }
+      },
+      text: "",
+      aiCreate: [],
+      aiType: "",
+      loading: false
+    }
+  },
+  methods: {
+    checkExample(type) {
+      this.text += this.example[type].title
+    },
+    guid() {
+      var _num,
+        i,
+        _guid = "";
+      for (i = 0; i < 32; i++) {
+        _guid += Math.floor(Math.random() * 16).toString(16); //随机0  - 16 的数字 转变为16进制的字符串
+        _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
+        if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
+          //会使guid中间加 "-"   形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+          _guid += "-";
+        }
+      }
+      return _guid;
+    },
+    generate() {
+      if (this.text == "") {
+        this.$message.error("请输入要发送的消息")
+        return
+      }
+      // else if (this.text.indexOf("添加文档") !== -1) {
+      //   this.aiType = 4
+      // }
+      if (this.text.indexOf("选择题") !== -1) {
+        this.aiType = 1
+      } else if (this.text.indexOf("问答题") !== -1) {
+        this.aiType = 3
+      } else {
+        this.$message.error("生成的文字中要包含选择题或者问答题才能生成题目哦,请重新编辑下吧")
+        return
+      }
+
+      if(this.text.indexOf("选择题") !== -1 && this.text.indexOf("问答题") !== -1){
+        this.$message.error("目前暂不支持问答题和选择题一起创建")
+        return
+      }
+      this.loading = true
+      let param = {
+        model: "gpt-3.5-turbo",
+        temperature: 0,
+        max_tokens: 2048,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [
+          {
+            role: "user",
+            content: this.text,
+          },
+        ],
+        uid: this.guid(),
+        stream: false,
+      };
+      this.ajax.post("https://gpt.cocorobo.cn/chat", param).then(
+        (res) => {
+          if (
+            res.data.FunctionResponse &&
+            res.data.FunctionResponse.result &&
+            res.data.FunctionResponse.result == "无效请求,请重新发起对话"
+          ) {
+            this.$message.error("你的内容太长,无法使用Ai创建!");
+            this.loading = false
+            return;
+          }
+          let aiReturn = res.data.FunctionResponse.choices[0].message.content;
+          aiReturn = aiReturn.split("\n")
+          aiReturn = aiReturn.filter(e => e != "")
+          this.loading = false
+          this.generate2(aiReturn)
+        },
+        (err) => {
+          console.log(err);
+          this.loading = false
+        }
+      );
+    },
+    generate2(aiReturn) {
+      this.loading = true
+      let content = ''
+      if (this.aiType == 1) {
+        content = `${JSON.stringify(aiReturn)},要求返回格式是Array [{"title":"",options:[],answer:[]}]`
+      } else if (this.aiType == 3) {
+        content = `${JSON.stringify(aiReturn)},要求返回格式是Array [{title: "",answer: ""}]`
+      }
+      let param = {
+        model: "gpt-3.5-turbo",
+        temperature: 0,
+        max_tokens: 2048,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [
+          {
+            role: "user",
+            content: content
+          },
+        ],
+        uid: this.guid(),
+        stream: false,
+      };
+      this.ajax.post("https://gpt.cocorobo.cn/chat", param).then(
+        (res) => {
+          if (
+            res.data.FunctionResponse &&
+            res.data.FunctionResponse.result &&
+            res.data.FunctionResponse.result == "无效请求,请重新发起对话"
+          ) {
+            this.$message.error("你的内容太长,无法使用Ai创建!");
+            this.loading = false
+            return;
+          }
+          let aiCreate = res.data.FunctionResponse.choices[0].message.content;
+          try {
+            aiCreate = JSON.parse(aiCreate)
+          } catch (error) {
+            this.generate2(aiReturn)
+          }
+          console.log(aiCreate)
+          this.aiCreate = aiCreate;
+          this.loading = false
+        },
+        (err) => {
+          console.log(err);
+          this.loading = false
+        }
+      );
+    },
+    exportT() {
+      if (!this.aiCreate.length) {
+        this.$message.error("请先创建Ai内容!");
+        return;
+      }
+      if (this.aiType !== 1 && this.aiType !== 3) {
+        this.$message.error("目前只支持选择题/问答题的创建!输入内容必须包含选择题/问答题!");
+        return;
+      }
+      var json = JSON.parse(JSON.stringify(this.aiJson))
+      let array = []
+      let englishIndex = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
+      if (this.aiType === 1) {
+        for (var i = 0; i < this.aiCreate.length; i++) {
+          let answer = []
+          let type = 1
+          if (this.aiCreate[i].answer) {
+            if (this.aiCreate[i].answer.length > 1) {
+              type = 2
+              for (var j = 0; j < this.aiCreate[i].answer.length; j++) {
+                answer.push(englishIndex.indexOf(this.aiCreate[i].answer[j].toLocaleUpperCase()))
+              }
+            } else {
+              answer = [englishIndex.indexOf(this.aiCreate[i].answer[0].toLocaleUpperCase())]
+            }
+          }
+
+          let options = []
+          for (var j = 0; j < this.aiCreate[i].options.length; j++) {
+            options.push({
+              img: "",
+              option: this.aiCreate[i].options[j]
+            })
+          }
+          array.push(
+            {
+              json: {
+                answer: answer,
+                array: options,
+                title: this.aiCreate[i].title,
+                type: type
+              },
+              ttype: 1,
+              type: 1
+            }
+          )
+        }
+      } else if (this.aiType === 3) {
+        for (var i = 0; i < this.aiCreate.length; i++) {
+          array.push(
+            {
+              json: {
+                answer: this.aiCreate[i].answer,
+                title: this.aiCreate[i].title,
+                type: 1
+              },
+              ttype: 1,
+              type: 3
+            }
+          )
+        }
+      }
+      if (!json.length || json[0].ttype == 1) {
+        json = [...json, ...array]
+      } else if ((json[0].ttype == 2 || json[0].ttype == 3) && !json[0].array.length) {
+        json[0].array = array
+      } else if (json[0].ttype == 2 && json[0].array.length) {
+        json[0].array = [...json[0].array, ...array]
+      } else if (json[0].ttype == 3 && json[0].array.length) {
+        if (json[0].array[0].ttype == 2) {
+          json[0].array[0].array = [...json[0].array[0].array, ...array]
+        } else {
+          json[0].array = [...json[0].array, ...array]
+        }
+      }
+      this.$emit("changeJson", json)
+      this.aiCreate = []
+    }
+  },
+}
+</script>
+
+<style scoped>
+.ac_box {
+  display: flex;
+  width: 100%;
+  align-items: flex-end;
+  margin-bottom: 10px;
+}
+
+.ex_box {
+  margin-bottom: 10px;
+  color: #909090;
+  font-size: 14px;
+}
+
+.ac_content {
+  margin-bottom: 10px;
+  font-size: 14px;
+}
+
+.ac_content>.title {
+  margin-bottom: 10px;
+}
+
+.ac_content>.box {}
+
+.ac_content>.box>.choice+.choice {
+  margin-top: 10px;
+}
+
+.ac_content>.box>.choice>div+div {
+  margin-top: 10px;
+}
+
+.ac_content>.box>.choice>.options {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.ac_content>.box>.choice>.options>span {
+  margin-right: 10px;
+  margin-bottom: 5px;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 14px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    /* border: 1px solid #3682fc00; */
+    border: 1px solid #CAD1DC;
+}
+
+.binfo_textarea {
+    border: 1px solid #CAD1DC;
+    font-size: 14px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+.binfo_input:focus-visible {
+    border: 1px solid #3681FC !important;
+}
+</style>

+ 951 - 0
src/components/pages/test/add/setInfo/index.vue

@@ -0,0 +1,951 @@
+<template>
+    <div class="rightBox">
+        <div class="whiteBg" style="background:unset;padding: 0;">
+            <div>
+                <div class="basic_box" style="padding: 0;">
+                    <div class="big_box">
+                        <div class="left_first">
+                            <!-- <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置基础信息</div> -->
+                            <!-- <div>
+                                <div style="width: 100%;">
+                                    <div class="course_input_box">
+                                        <div class="bb_courseIcon"><img
+                                                src="../../../../../assets/icon/new/course.png" />
+                                        </div>
+                                        <input @input="titleChange" type="text" placeholder="请输入表单名称"
+                                            class="binfo_input" v-model="courseName"
+                                            style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" />
+                                        <el-switch v-model="isTeacherSee" active-text="允许回答后查看正确答案"
+                                            style="justify-content: center;" @change="seeChange"></el-switch>
+                                    </div>
+                                </div>
+                            </div> -->
+                            <!-- <div class="typeBox">
+                                <span>权限:</span>
+                                <el-select v-model="sJuri" placeholder="权限" @change="juriChange">
+                                    <el-option label="所有人" value="0"></el-option>
+                                    <el-option label="老师" value="1"></el-option>
+                                    <el-option label="学生" value="2"></el-option>
+                                </el-select>
+                            </div> -->
+                            <!-- <div class="typeBox" style="display: flex;align-items: center;">
+                                <span>教研室权限:</span>
+                                <div class="checkJuri" @click="checkJuri">
+                                    <span v-if="!getCName(checkList)" style="color: #c0c4d6;">所有人</span>
+                                    <span>{{ getCName(checkList) }}</span>
+                                </div>
+                            </div> -->
+                            <div class="typeBox" v-if="typeArray.length" style="display: flex;flex-direction: column;">
+                                <span style="margin-bottom: 10px;">表单类型:</span>
+                                <el-select v-model="typeCheck" placeholder="选择类型" clearable @change="typeChange2">
+                                    <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name"
+                                        :value="item.id"></el-option>
+                                </el-select>
+                            </div>
+                            <div class="typeBox" style="display: flex;flex-direction: column;">
+                                <span style="margin-bottom: 10px;">截止日期:</span>
+                                <el-date-picker v-model="selectedDate" type="date" :picker-options="pickerOptions"
+                                    @change="DateChange" format="yyyy-MM-dd" clearable=""
+                                    placeholder="选择截止日期" style="width: 100%;"></el-date-picker>
+                            </div>
+                            <div class="both">
+                                <div class="choose">
+                                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+                                        @change="typeChange">
+                                        <span v-if="CourseTypeJson[item.id].length > 0">{{ item.name }}:</span>
+                                        <el-checkbox-group v-model="courseTypeId"
+                                            v-if="CourseTypeJson[item.id].length > 0">
+                                            <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
+                                                :label="item1.id">{{
+                                                    item1.name }}</el-checkbox>
+                                        </el-checkbox-group>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="whiteBg" style="border-radius: 0; margin-top: 0px;margin-bottom: 10px;" v-if="teaType.length">
+                                <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置填写范围
+                                    <span style="font-weight: 500; color: #7F7979E5;">(符合以下所有条件的教师)</span>
+                                    <span style="margin-left: auto; cursor: pointer;" @click="checkTeacher">已选:{{ teacherArray.length }}人</span>
+                                </div>
+                                <div class="typeBox" v-for="item in teaType" :key="item.id" style="margin: 0 0 10px">
+                                    <span>{{ item.name + ":" }}</span>
+                                    <el-select v-model="item.value" :placeholder="'请选择' + item.name"
+                                        @change="Ochange" clearable>
+                                        <el-option v-for="i in item.child" :key="i.id" :label="i.name" :value="i.id">
+                                        </el-option>
+                                    </el-select>
+                                </div>
+                            </div>
+
+                            <div class="url_box">
+                                <div class="title">
+                                    分享方式
+                                </div>
+                                <div class="url">
+                                    <el-tooltip :content="origin" placement="top" effect="dark">
+                                        <!-- content to trigger tooltip here -->
+                                        <span>{{ origin }}</span>
+                                    </el-tooltip>
+                                    <span @click="copy" :data-clipboard-text="copyText" class="tag-read">复制链接</span>
+                                </div>
+                            </div>
+                            <div class="qrcode_box">
+                                <div class="qrcode">
+                                    <span class="qrcodeUrl" ref="qrCodeUrl"></span>
+                                    <span @click="downQr">下载二维码</span>
+                                </div>
+                            </div>
+                            <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 0px">
+                                <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">表单描述</div>
+                                <div style="width: 100%;box-sizing: border-box;">
+                                    <div style="width: calc((100%))">
+                                        <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
+                                            v-model="courseText" placeholder="表单描述" @change="briefChange"></textarea>
+                                    </div>
+                                </div>
+                            </div> -->
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <el-dialog title="选择权限" :visible.sync="juriDialog" :append-to-body="true" :before-close="handleClose"
+            class="dialog_diy" width="500px">
+            <van-divider>
+                <div class="people_name">
+                    <el-checkbox v-model="checkAll" @change="checkAllChange">全选</el-checkbox>
+                    <el-checkbox v-model="ischeckAll" @change="ischeckAllChange">所有人</el-checkbox>
+                </div>
+                <div style="max-height: 300px;overflow: auto;">
+                    <el-checkbox-group v-model="checkList2" class="people_name" @change="pChange">
+                        <el-checkbox v-for="item in classJuri" :key="item.id" :label="item.id">
+                            {{ item.name }}
+                        </el-checkbox>
+                    </el-checkbox-group>
+                </div>
+            </van-divider>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="juriDialog = false">取 消</el-button>
+                <el-button type="primary" @click="confirmCheck">确 定
+                </el-button>
+            </span>
+        </el-dialog>
+        <el-dialog title="填写返回已选教师" :visible.sync="dialogTeacher" :append-to-body="true" :before-close="handleClose"
+            class="dialog_diy" width="500px">
+            <van-divider>
+                <div style="display: flex;flex-wrap: wrap;line-height: 20px;">
+                    <span style="color: #00000099;">已选教师名单:</span>
+                    <span style="word-break: break-word;" v-for="(item, index) in teacherArray" :key="item.userid">
+                        {{ item.username }}{{ index == teacherArray.length - 1 ? '' : '、' }}
+                    </span>
+                </div>
+            </van-divider>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import manualCreate from './manualCreated.vue';
+import aiCreate from './aiCreate.vue';
+import Clipboard from "clipboard";
+import QRCode from "qrcodejs2";
+export default {
+    components: {
+        manualCreate,
+        aiCreate
+    },
+    props: {
+        oid: {
+            type: String
+        },
+        org: {
+            type: String
+        },
+        title: {
+            type: String
+        },
+        testType: {
+            type: Array
+        },
+        see: {
+            type: Boolean
+        },
+        steps: {
+            type: Number
+        },
+        cJson: {
+            type: Array
+        },
+        typeid: {
+            type: String
+        },
+        brief: {
+            type: String
+        },
+        juri: {
+            type: String
+        },
+        overDate: {
+            type: String
+        },
+        juriList: {
+            type: Array
+        },
+        typeInfo: {
+            type: Array
+        },
+        origin: {
+            type: String
+        }
+    },
+    data() {
+        return {
+            CourseType: [],
+            courseTypeId: [],
+            CourseTypeJson: {},
+            courseName: "",
+            isTeacherSee: false,
+            type: 2,
+            manualJson: [],
+            aiDialogVisible: false,
+            typeArray: [],
+            typeCheck: '',
+            sJuri: '',
+            courseText: '',
+            selectedDate: '',
+            pickerOptions: {
+                disabledDate(time) {
+                    return time.getTime() < Date.now(); // 只能选择大于今天的日期
+                },
+            },
+            classJuri: [],
+            checkList: [],
+            checkList2: [],
+            juriDialog: false,
+            checkAll: false,
+            ischeckAll: false,
+            teaType: [],
+            teacherArray:[],
+            dialogTeacher: false,
+            copyText: "",
+        }
+    },
+    computed: {
+        getCName() {
+            return function (clist) {
+                let _people = [];
+                let _people2 = [];
+                let _people3 = [];
+                if (this.classJuri.length) {
+                    for (var i = 0; i < this.classJuri.length; i++) {
+                        _people2.push(this.classJuri[i].id);
+                    }
+                    for (var i = 0; i < clist.length; i++) {
+                        if (_people2.indexOf(clist[i]) !== -1) {
+                            _people3.push(clist[i]);
+                        }
+                    }
+                    for (var i = 0; i < this.classJuri.length; i++) {
+                        if (_people3.indexOf(this.classJuri[i].id) !== -1) {
+                            _people.push(this.classJuri[i].name);
+                        }
+                    }
+                }
+                return this.classJuri.length ? _people.join(',') : "所有人";
+            };
+        },
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        teaType: {
+            immediate: true,
+            deep: true,
+            async handler(newValue, oldValue) {
+                if(newValue.length){
+                    await this.getTestWorkTeacherCount()
+                }
+            },
+        },
+        origin(){
+            this.setQr()
+        }
+    },
+    methods: {
+        async getTestWorkTeacherCount(){
+            let j3 = []
+            if(this.teaType.length){
+                this.teaType.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [{
+                juri: j3.length ? j3.join(',') : "",
+                userid: this.$route.query.userid
+            }]
+
+            try {
+                let res = await this.ajax.post(this.$store.state.api + "getTestWorkTeacherCount", params)
+                this.teacherArray = res.data[0]
+            }catch (err) {
+                this.$message.error("网络不佳");
+                console.error(err);
+            }
+            console.log('11111111111')
+        },
+        Ochange() {
+            this.$forceUpdate()
+            this.$emit("update:typeInfo", this.teaType)
+        },
+        handleClose(done) {
+            done();
+        },
+        selectAllType() {
+            let params = {
+                org: this.org && this.org != "" ? this.org : "",
+                oid: this.oid && this.oid != "" ? this.oid : "",
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectAllTypeT", params)
+                .then((res) => {
+                    this.CourseType = res.data;
+                    for (var cti = 0; cti < res.data[0].length; cti++) {
+                        if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+                            res.data[0][cti].name = "年级";
+                        } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                            res.data[0][cti].name = "学科";
+                        }
+                    }
+                    let _courseTypeId = [];
+                    for (var i = 0; i < res.data[0].length; i++) {
+                        if (!this.cid) {
+                            this.courseTypeId[res.data[0][i].id] = [];
+                        }
+                        // if (!this.CourseTypeJson[res.data[0][i].id]) {
+                        // }
+                        this.CourseTypeJson[res.data[0][i].id] = [];
+
+                        if (res.data[2].length == 0 && res.data[3].length == 0) {
+                            for (var j = 0; j < res.data[1].length; j++) {
+                                if (
+                                    this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
+                                    _courseTypeId.indexOf(res.data[1][j].id) == -1
+                                ) {
+                                    _courseTypeId.push(res.data[1][j].id);
+                                }
+                                if (res.data[0][i].id == res.data[1][j].pid) {
+                                    this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                                }
+                            }
+                        } else {
+                            if (res.data[2].length > 0) {
+                                for (var j = 0; j < res.data[2].length; j++) {
+                                    if (
+                                        this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
+                                        _courseTypeId.indexOf(res.data[2][j].id) == -1
+                                    ) {
+                                        _courseTypeId.push(res.data[2][j].id);
+                                    }
+                                    if (res.data[0][i].id == res.data[2][j].pid) {
+                                        this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                                    }
+                                }
+                            }
+                            if (res.data[3].length > 0) {
+                                for (var j = 0; j < res.data[3].length; j++) {
+                                    if (
+                                        this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
+                                        _courseTypeId.indexOf(res.data[3][j].id) == -1
+                                    ) {
+                                        _courseTypeId.push(res.data[3][j].id);
+                                    }
+                                    if (res.data[0][i].id == res.data[3][j].pid) {
+                                        this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    this.courseTypeId = _courseTypeId;
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        titleChange() {
+            this.$emit("update:title", this.courseName)
+        },
+        typeChange() {
+            this.$emit("update:testType", this.courseTypeId)
+        },
+        seeChange() {
+            this.$emit("update:see", this.isTeacherSee)
+        },
+        typeChange2() {
+            this.$emit("update:typeid", this.typeCheck)
+        },
+        juriChange() {
+            this.$emit("update:juri", this.sJuri)
+        },
+        DateChange() {
+            this.$emit("update:overDate", this.selectedDate)
+        },
+        briefChange() {
+            this.$emit("update:brief", this.courseText)
+        },
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s))
+        },
+        openAiCreate() {
+            this.aiDialogVisible = true
+        },
+        nextSteps() {
+            if (this.type == 2) {
+                this.$emit("update:cJson", this.manualJson)
+            }
+            this.$emit('update:steps', this.steps + 1)
+            console.log(this.cJson);
+            console.log(this.manualJson);
+        },
+        selectType() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTestType", params)
+                .then((res) => {
+                    this.typeArray = res.data[0];
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        //获取教研室列表
+        getClass2() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+                .then((res) => {
+                    this.classJuri = res.data[0].filter((item) => { return item.parentid == '6' });
+                })
+                .catch((err) => {
+                    this.isLoading = false;
+                    console.error(err);
+                });
+        },
+        checkJuri() {
+            let clist = []
+            let clist2 = []
+            for (var i = 0; i < this.classJuri.length; i++) {
+                clist2.push(this.classJuri[i].id)
+            }
+            for (var i = 0; i < this.checkList.length; i++) {
+                if (clist2.indexOf(this.checkList[i]) !== -1) {
+                    clist.push(this.checkList[i])
+                }
+            }
+            this.checkList2 = JSON.parse(JSON.stringify(clist));
+            this.checkAll = this.checkList2.length == this.classJuri.length;
+            this.ischeckAll = !this.checkList2.length;
+            this.juriDialog = true
+        },
+        checkAllChange() {
+            if (this.checkAll) {
+                this.checkList2 = []
+                for (var i = 0; i < this.classJuri.length; i++) {
+                    this.checkList2.push(this.classJuri[i].id)
+                }
+                this.ischeckAll = false
+            } else {
+                this.checkList2 = []
+                this.ischeckAll = true
+            }
+        },
+        ischeckAllChange() {
+            if (this.ischeckAll) {
+                this.checkAll = false
+                this.checkList2 = []
+            } else {
+            }
+            this.ischeckAll = !this.checkList2.length;
+
+        },
+        pChange(val) {
+            if (val.length == this.classJuri.length) {
+                this.checkAll = true
+            } else {
+                this.checkAll = false
+            }
+            this.ischeckAll = !this.checkList2.length;
+        },
+        confirmCheck() {
+            this.checkList = JSON.parse(JSON.stringify(this.checkList2));
+            this.$emit("update:juriList", this.checkList)
+            this.juriDialog = false
+        },
+        checkTeacher(){
+            this.dialogTeacher = true
+        },
+        setQr() {
+            setTimeout(() => {
+                this.$refs.qrCodeUrl.innerHTML = "";
+                var qrcode = new QRCode(this.$refs.qrCodeUrl, {
+                    text: this.origin, // 需要转换为二维码的内容
+                    width: 100,
+                    height: 100,
+                    colorDark: "#000000",
+                    colorLight: "#ffffff",
+                    correctLevel: QRCode.CorrectLevel.H,
+                });
+            }, 500);
+        },
+        downQr() {
+
+            // 创建一个虚拟链接,并将 canvas 转换为图片文件
+            const link = document.createElement('a');
+            link.href = this.$refs.qrCodeUrl.querySelector('img').src;
+            link.download = 'qrcode.png';
+
+            // 模拟点击链接进行下载
+            link.click();
+        },
+        copy() {
+            this.copyText = this.origin;
+            var clipboard = new Clipboard(".tag-read");
+            clipboard.on("success", (e) => {
+                this.$message.success("复制成功");
+                console.log("复制成功");
+                clipboard.destroy(); // 释放内存
+            });
+            clipboard.on("error", (e) => {
+                console.log("不支持复制,该浏览器不支持自动复制");
+                clipboard.destroy(); // 释放内存
+            });
+        },
+    },
+    async mounted() {
+        this.courseTypeId = this.depthCopy(this.testType)
+        this.courseName = this.depthCopy(this.title)
+        this.isTeacherSee = this.depthCopy(this.see)
+        this.manualJson = this.depthCopy(this.cJson)
+        this.typeCheck = this.depthCopy(this.typeid)
+        this.courseText = this.depthCopy(this.brief)
+        this.sJuri = this.depthCopy(this.juri)
+        this.selectedDate = this.depthCopy(this.overDate)
+        this.checkList = this.depthCopy(this.juriList)
+        this.teaType = this.depthCopy(this.typeInfo)
+        this.$forceUpdate()
+        // this.selectAllType();
+        this.selectType();
+        this.getClass2();
+        await this.getTestWorkTeacherCount()
+        console.log('getTestWorkTeacherCount')
+        this.setQr();
+    }
+}
+</script>
+
+<style scoped>
+.rightBox {
+    width: calc(100%);
+    background: #F0F2F5;
+    overflow: auto;
+    height: calc(100%);
+    margin: 0 auto;
+    position: relative;
+    box-sizing: border-box;
+    overflow: hidden;
+}
+
+.whiteBg {
+    /* background: #fff; */
+    border-radius: 10px;
+}
+
+.basic_box {
+    margin: 0 auto;
+    position: relative;
+    padding: 0 20px 0 20px;
+}
+
+.big_box {
+    /* margin-top: 20px; */
+    display: flex;
+    justify-content: space-between;
+    /* border-bottom: 1px solid #E0E2ED; */
+}
+
+.left_first {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: calc(100%);
+    padding: 0;
+    box-sizing: border-box;
+    background: #fff;
+    border-radius: 5px;
+}
+
+.course_input_box {
+    display: flex;
+    margin-right: 20px;
+    width: 100%;
+    align-items: center;
+    position: relative;
+}
+
+.course_input_box>.binfo_input {
+    width: calc(100% - 290px);
+    margin: 0 10px;
+}
+
+.bb_courseIcon {
+    width: 57px;
+    height: 45px;
+    background: #F0F4FA;
+    border-radius: 5px 0px 0px 5px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-right: 1.5px solid rgb(202, 209, 220);
+    box-sizing: border-box;
+    position: absolute;
+    left: 1.5px
+}
+
+.bb_courseIcon>img {
+    width: 25px;
+    height: auto
+}
+
+.all_choose {
+    display: flex;
+    flex-direction: row;
+    align-items: flex-start;
+    width: 100%;
+}
+
+.all_choose+.all_choose {
+    /* margin-top: 10px */
+}
+
+.all_choose>span {
+    min-width: fit-content;
+    display: block;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    margin-right: 20px;
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.all_choose>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+}
+
+.all_choose>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-right: 10px;
+}
+
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+}
+
+.choose>div:nth-child(3)>span {
+    /* letter-spacing: 0 !important; */
+}
+
+.choose {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+}
+
+.both {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    width: 100%;
+    align-items: center;
+    justify-content: flex-start;
+    margin: 15px 0;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    border: 1.5px solid #CAD1DC;
+}
+
+.c_info_title {
+    padding: 15px 0 15px 0;
+    font-size: 14px;
+    font-weight: bold;
+    margin: 0 0 0 20px;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    line-height: 20px;
+}
+
+/* .c_info_title::before {
+    content: '';
+    display: block;
+    width: 3px;
+    height: 20px;
+    background: #0061FF;
+    border-radius: 3px;
+    margin: 0 5px 0 0;
+} */
+
+.c_info_box {
+    width: 100%;
+}
+
+.c_info_tab {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.c_info_tab>span {
+    cursor: pointer;
+    padding-bottom: 10px;
+    font-weight: bold;
+}
+
+.c_info_tab>span+span {
+    margin-left: 20px;
+}
+
+.c_info_tab>.active {
+    color: #3e88f4;
+    border-bottom: 2px solid #2f80f3;
+}
+
+
+.c_info_tab_box {
+    overflow: hidden;
+}
+
+.skip_btn {
+    position: absolute;
+    right: 20px;
+}
+
+.typeBox {
+    margin-top: 20px;
+}
+
+.typeBox>span {
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+
+.checkJuri {
+    width: 220px;
+    height: 40px;
+    border: 1px solid #DCDFE6;
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+    box-sizing: border-box;
+    margin-left: 5px;
+    border-radius: 4px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
+    font-size: 14px;
+    color: #464646;
+}
+
+
+.dialog_diy>>>.el-dialog {
+    /* height: 100%; */
+    /* margin: 15vh auto !important; */
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    /* height: calc(100% - 54px); */
+    box-sizing: border-box;
+    /* padding: 0px; */
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    /* background: #e8ebf1; */
+    overflow: hidden;
+}
+
+.people_name>>>.el-checkbox {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+}
+
+.people_name>>>.el-checkbox__label {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    width: calc(100%);
+}
+
+.people_name2>>>.el-checkbox__label {
+    width: calc(100% - 130px);
+}
+
+
+.url_box {
+    margin-bottom: 20px;
+}
+
+.qrcode_box {
+    margin-bottom: 20px;
+}
+
+.url_box>.url {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    border: 1px solid #e7e7e7;
+    border-radius: 4px;
+    height: 35px;
+    padding: 0 7px;
+    box-sizing: border-box;
+}
+
+.url_box>.url>span {
+    font-size: 16px;
+    color: #000000;
+}
+
+.url_box>.url>span:nth-child(1) {
+    width: 100%;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+.url_box>.url>span:nth-child(2) {
+    margin-left: auto;
+    border-left: 1px solid #e7e7e7;
+    padding-left: 7px;
+    cursor: pointer;
+    min-width: fit-content;
+}
+
+.url_box>.title,
+.qrcode_box>.title {
+    font-weight: bold;
+    font-size: 14px;
+    margin-bottom: 10px;
+    color:#000;
+}
+
+.qrcode_box>.qrcode {
+    padding: 7px;
+    border: 1px solid #e7e7e7;
+    width: fit-content;
+    border-radius: 4px;
+    display: flex;
+    align-items: flex-end;
+}
+
+.qrcode_box>.qrcode>span:nth-child(1) {
+    width: 100px;
+    display: block;
+    height: 100px;
+}
+
+.qrcode_box>.qrcode>span:nth-child(2) {
+    background: #f0f2f5;
+    padding: 7px 15px;
+    font-size: 16px;
+    border-radius: 4px;
+    cursor: pointer;
+    color: #000;
+    margin-left: 7px;
+}
+</style>

+ 835 - 0
src/components/pages/test/add/setInfo/indexJ.vue

@@ -0,0 +1,835 @@
+<template>
+    <div class="rightBox">
+        <div class="whiteBg" style="background:unset;padding: 0;">
+            <div>
+                <div class="basic_box" style="padding: 0;">
+                    <div class="big_box">
+                        <div class="left_first">
+                            <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置基础信息</div>
+                            <div>
+                                <div style="width: 100%;">
+                                    <div class="course_input_box">
+                                        <div class="bb_courseIcon"><img
+                                                src="../../../../../assets/icon/new/course.png" />
+                                        </div>
+                                        <input @input="titleChange" type="text" placeholder="请输入表单名称"
+                                            class="binfo_input" v-model="courseName"
+                                            style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" />
+                                        <el-switch v-model="isTeacherSee" active-text="允许回答后查看正确答案"
+                                            style="justify-content: center;" @change="seeChange"></el-switch>
+                                    </div>
+                                </div>
+                            </div>
+                            <!-- <div class="typeBox">
+                                <span>权限:</span>
+                                <el-select v-model="sJuri" placeholder="权限" @change="juriChange">
+                                    <el-option label="所有人" value="0"></el-option>
+                                    <el-option label="老师" value="1"></el-option>
+                                    <el-option label="学生" value="2"></el-option>
+                                </el-select>
+                            </div> -->
+                            <div class="typeBox" style="display: flex;align-items: center;">
+                                <span>教研室权限:</span>
+                                <div class="checkJuri" @click="checkJuri">
+                                    <span v-if="!getCName(checkList)" style="color: #c0c4d6;">所有人</span>
+                                    <span>{{ getCName(checkList) }}</span>
+                                </div>
+                            </div>
+                            <div class="typeBox">
+                                <span>截止日期:</span>
+                                <el-date-picker v-model="selectedDate" type="date" :picker-options="pickerOptions"
+                                    @change="DateChange" format="yyyy-MM-dd" clearable=""
+                                    placeholder="选择截止日期"></el-date-picker>
+                            </div>
+                            <div class="typeBox" v-if="typeArray.length">
+                                <span>类型:</span>
+                                <el-select v-model="typeCheck" placeholder="选择类型" clearable @change="typeChange2">
+                                    <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name"
+                                        :value="item.id"></el-option>
+                                </el-select>
+                            </div>
+                            <div class="both">
+                                <div class="choose">
+                                    <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
+                                        @change="typeChange">
+                                        <span v-if="CourseTypeJson[item.id].length > 0">{{ item.name }}:</span>
+                                        <el-checkbox-group v-model="courseTypeId"
+                                            v-if="CourseTypeJson[item.id].length > 0">
+                                            <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
+                                                :label="item1.id">{{
+                                                    item1.name }}</el-checkbox>
+                                        </el-checkbox-group>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="whiteBg" style="border-radius: 0; margin-top: 0px;margin-bottom: 10px;" v-if="teaType.length">
+                                <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置填写范围
+                                    <span style="font-weight: 500; color: #7F7979E5;">(符合以下所有条件的教师)</span>
+                                    <span style="font-weight: 500; margin-left: 10px; cursor: pointer;" @click="checkTeacher">已选:{{ teacherArray.length }}人</span>
+                                </div>
+                                <div class="typeBox" v-for="item in teaType" :key="item.id" style="margin: 0 0 10px">
+                                    <span>{{ item.name + ":" }}</span>
+                                    <el-select v-model="item.value" :placeholder="'请选择' + item.name"
+                                        @change="Ochange" clearable>
+                                        <el-option v-for="i in item.child" :key="i.id" :label="i.name" :value="i.id">
+                                        </el-option>
+                                    </el-select>
+                                </div>
+                            </div>
+                            <div class="whiteBg" style="border-radius: 0; margin-top: 0px">
+                                <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">表单描述</div>
+                                <div style="width: 100%;box-sizing: border-box;">
+                                    <div style="width: calc((100%))">
+                                        <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
+                                            v-model="courseText" placeholder="表单描述" @change="briefChange"></textarea>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="e_btn" style="display: flex;justify-content: center;margin-top: 10px;"
+            v-show="oid == 'd67940a5-510c-40ea-9c9a-2631ab03013a'">
+            <el-button type="primary" size="mini" @click="nextSteps()">下一步</el-button>
+        </div>
+        <div class="whiteBg" style="background:#fff;margin: 10px 0;min-height: 300px;"
+            v-show="oid != 'd67940a5-510c-40ea-9c9a-2631ab03013a'">
+            <div class="whiteBg" style="border-radius: 0">
+                <div class="c_info_title">创建表单内容</div>
+                <div class="c_info_box">
+                    <div class="c_info_tab">
+                        <!-- <span :class="{ active: type == 1 }" @click="type = 1">智能创建</span> -->
+                        <span :class="{ active: type == 2 }" @click="type = 2">手动创建</span>
+                        <!-- <span :class="{ active: type == 3 }" @click="type = 3">题库导入</span> -->
+                        <div class="skip_btn">
+                            <!-- <el-button type="primary" size="mini" @click="openAiCreate">智能创建</el-button> -->
+                            <!-- <el-button type="primary" size="mini" @click="nextSteps">跳过</el-button> -->
+                        </div>
+
+                    </div>
+                    <div class="c_info_tab_box">
+                        <manualCreate v-if="type == 2" :manualJson.sync="manualJson" @nextSteps="nextSteps">
+                        </manualCreate>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <aiCreate :aiJson.sync="manualJson" :aiDialogVisible.sync="aiDialogVisible" v-if="aiDialogVisible"></aiCreate>
+        <el-dialog title="选择权限" :visible.sync="juriDialog" :append-to-body="true" :before-close="handleClose"
+            class="dialog_diy" width="500px">
+            <van-divider>
+                <div class="people_name">
+                    <el-checkbox v-model="checkAll" @change="checkAllChange">全选</el-checkbox>
+                    <el-checkbox v-model="ischeckAll" @change="ischeckAllChange">所有人</el-checkbox>
+                </div>
+                <div style="max-height: 300px;overflow: auto;">
+                    <el-checkbox-group v-model="checkList2" class="people_name" @change="pChange">
+                        <el-checkbox v-for="item in classJuri" :key="item.id" :label="item.id">
+                            {{ item.name }}
+                        </el-checkbox>
+                    </el-checkbox-group>
+                </div>
+            </van-divider>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="juriDialog = false">取 消</el-button>
+                <el-button type="primary" @click="confirmCheck">确 定
+                </el-button>
+            </span>
+        </el-dialog>
+        <el-dialog title="填写返回已选教师" :visible.sync="dialogTeacher" :append-to-body="true" :before-close="handleClose"
+            class="dialog_diy" width="500px">
+            <van-divider>
+                <div style="display: flex;flex-wrap: wrap;line-height: 20px;">
+                    <span style="color: #00000099;">已选教师名单:</span>
+                    <span style="word-break: break-word;" v-for="(item, index) in teacherArray" :key="item.userid">
+                        {{ item.username }}{{ index == teacherArray.length - 1 ? '' : '、' }}
+                    </span>
+                </div>
+            </van-divider>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import manualCreate from './manualCreated.vue';
+import aiCreate from './aiCreate.vue';
+export default {
+    components: {
+        manualCreate,
+        aiCreate
+    },
+    props: {
+        oid: {
+            type: String
+        },
+        org: {
+            type: String
+        },
+        title: {
+            type: String
+        },
+        testType: {
+            type: Array
+        },
+        see: {
+            type: Boolean
+        },
+        steps: {
+            type: Number
+        },
+        cJson: {
+            type: Array
+        },
+        typeid: {
+            type: String
+        },
+        brief: {
+            type: String
+        },
+        juri: {
+            type: String
+        },
+        overDate: {
+            type: String
+        },
+        juriList: {
+            type: Array
+        },
+        typeInfo: {
+            type: Array
+        }
+    },
+    data() {
+        return {
+            CourseType: [],
+            courseTypeId: [],
+            CourseTypeJson: {},
+            courseName: "",
+            isTeacherSee: false,
+            type: 2,
+            manualJson: [],
+            aiDialogVisible: false,
+            typeArray: [],
+            typeCheck: '',
+            sJuri: '',
+            courseText: '',
+            selectedDate: '',
+            pickerOptions: {
+                disabledDate(time) {
+                    return time.getTime() < Date.now(); // 只能选择大于今天的日期
+                },
+            },
+            classJuri: [],
+            checkList: [],
+            checkList2: [],
+            juriDialog: false,
+            checkAll: false,
+            ischeckAll: false,
+            teaType: [],
+            teacherArray:[],
+            dialogTeacher: false,
+        }
+    },
+    computed: {
+        getCName() {
+            return function (clist) {
+                let _people = [];
+                let _people2 = [];
+                let _people3 = [];
+                if (this.classJuri.length) {
+                    for (var i = 0; i < this.classJuri.length; i++) {
+                        _people2.push(this.classJuri[i].id);
+                    }
+                    for (var i = 0; i < clist.length; i++) {
+                        if (_people2.indexOf(clist[i]) !== -1) {
+                            _people3.push(clist[i]);
+                        }
+                    }
+                    for (var i = 0; i < this.classJuri.length; i++) {
+                        if (_people3.indexOf(this.classJuri[i].id) !== -1) {
+                            _people.push(this.classJuri[i].name);
+                        }
+                    }
+                }
+                return this.classJuri.length ? _people.join(',') : "所有人";
+            };
+        },
+    },
+    directives: {
+        autoHeight: {
+            update(el, binding) {
+                const { value } = binding
+                if (value && typeof value === 'number') {
+                    el.style.height = `${value}px`
+                } else {
+                    el.style.height = 'auto'
+                }
+            },
+            componentUpdated(el) {
+                el.style.height = `${el.scrollHeight + 5}px`
+            },
+        },
+    },
+    watch: {
+        teaType: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.getTestWorkTeacherCount()
+            },
+        },
+    },
+    methods: {
+        getTestWorkTeacherCount(){
+            let j3 = []
+            if(this.teaType.length){
+                this.teaType.forEach(e => {
+                    j3.push(e.value)
+                })
+            }
+            let params = [{
+                juri: j3.length ? j3.join(',') : "",
+                userid: this.$route.query.userid
+            }]
+            this.ajax
+                .post(this.$store.state.api + "getTestWorkTeacherCount", params)
+                .then((res) => {
+                    this.teacherArray = res.data[0]
+                })
+                .catch((err) => {
+                    this.$message.error("网络不佳");
+                    console.error(err);
+                });
+        },
+        Ochange() {
+            this.$forceUpdate()
+            this.$emit("update:typeInfo", this.teaType)
+        },
+        handleClose(done) {
+            done();
+        },
+        selectAllType() {
+            let params = {
+                org: this.org && this.org != "" ? this.org : "",
+                oid: this.oid && this.oid != "" ? this.oid : "",
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectAllTypeT", params)
+                .then((res) => {
+                    this.CourseType = res.data;
+                    for (var cti = 0; cti < res.data[0].length; cti++) {
+                        if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
+                            res.data[0][cti].name = "年级";
+                        } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
+                            res.data[0][cti].name = "学科";
+                        }
+                    }
+                    let _courseTypeId = [];
+                    for (var i = 0; i < res.data[0].length; i++) {
+                        if (!this.cid) {
+                            this.courseTypeId[res.data[0][i].id] = [];
+                        }
+                        // if (!this.CourseTypeJson[res.data[0][i].id]) {
+                        // }
+                        this.CourseTypeJson[res.data[0][i].id] = [];
+
+                        if (res.data[2].length == 0 && res.data[3].length == 0) {
+                            for (var j = 0; j < res.data[1].length; j++) {
+                                if (
+                                    this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
+                                    _courseTypeId.indexOf(res.data[1][j].id) == -1
+                                ) {
+                                    _courseTypeId.push(res.data[1][j].id);
+                                }
+                                if (res.data[0][i].id == res.data[1][j].pid) {
+                                    this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
+                                }
+                            }
+                        } else {
+                            if (res.data[2].length > 0) {
+                                for (var j = 0; j < res.data[2].length; j++) {
+                                    if (
+                                        this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
+                                        _courseTypeId.indexOf(res.data[2][j].id) == -1
+                                    ) {
+                                        _courseTypeId.push(res.data[2][j].id);
+                                    }
+                                    if (res.data[0][i].id == res.data[2][j].pid) {
+                                        this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
+                                    }
+                                }
+                            }
+                            if (res.data[3].length > 0) {
+                                for (var j = 0; j < res.data[3].length; j++) {
+                                    if (
+                                        this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
+                                        _courseTypeId.indexOf(res.data[3][j].id) == -1
+                                    ) {
+                                        _courseTypeId.push(res.data[3][j].id);
+                                    }
+                                    if (res.data[0][i].id == res.data[3][j].pid) {
+                                        this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    this.courseTypeId = _courseTypeId;
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        titleChange() {
+            this.$emit("update:title", this.courseName)
+        },
+        typeChange() {
+            this.$emit("update:testType", this.courseTypeId)
+        },
+        seeChange() {
+            this.$emit("update:see", this.isTeacherSee)
+        },
+        typeChange2() {
+            this.$emit("update:typeid", this.typeCheck)
+        },
+        juriChange() {
+            this.$emit("update:juri", this.sJuri)
+        },
+        DateChange() {
+            this.$emit("update:overDate", this.selectedDate)
+        },
+        briefChange() {
+            this.$emit("update:brief", this.courseText)
+        },
+        depthCopy(s) {
+            return JSON.parse(JSON.stringify(s))
+        },
+        openAiCreate() {
+            this.aiDialogVisible = true
+        },
+        nextSteps() {
+            if (this.type == 2) {
+                this.$emit("update:cJson", this.manualJson)
+            }
+            this.$emit('update:steps', this.steps + 1)
+            console.log(this.cJson);
+            console.log(this.manualJson);
+        },
+        selectType() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTestType", params)
+                .then((res) => {
+                    this.typeArray = res.data[0];
+                })
+                .catch((err) => {
+                    console.error(err);
+                });
+        },
+        //获取教研室列表
+        getClass2() {
+            let params = {
+                oid: this.oid,
+            };
+            this.ajax
+                .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+                .then((res) => {
+                    this.classJuri = res.data[0].filter((item) => { return item.parentid == '6' });
+                })
+                .catch((err) => {
+                    this.isLoading = false;
+                    console.error(err);
+                });
+        },
+        checkJuri() {
+            let clist = []
+            let clist2 = []
+            for (var i = 0; i < this.classJuri.length; i++) {
+                clist2.push(this.classJuri[i].id)
+            }
+            for (var i = 0; i < this.checkList.length; i++) {
+                if (clist2.indexOf(this.checkList[i]) !== -1) {
+                    clist.push(this.checkList[i])
+                }
+            }
+            this.checkList2 = JSON.parse(JSON.stringify(clist));
+            this.checkAll = this.checkList2.length == this.classJuri.length;
+            this.ischeckAll = !this.checkList2.length;
+            this.juriDialog = true
+        },
+        checkAllChange() {
+            if (this.checkAll) {
+                this.checkList2 = []
+                for (var i = 0; i < this.classJuri.length; i++) {
+                    this.checkList2.push(this.classJuri[i].id)
+                }
+                this.ischeckAll = false
+            } else {
+                this.checkList2 = []
+                this.ischeckAll = true
+            }
+        },
+        ischeckAllChange() {
+            if (this.ischeckAll) {
+                this.checkAll = false
+                this.checkList2 = []
+            } else {
+            }
+            this.ischeckAll = !this.checkList2.length;
+
+        },
+        pChange(val) {
+            if (val.length == this.classJuri.length) {
+                this.checkAll = true
+            } else {
+                this.checkAll = false
+            }
+            this.ischeckAll = !this.checkList2.length;
+        },
+        confirmCheck() {
+            this.checkList = JSON.parse(JSON.stringify(this.checkList2));
+            this.$emit("update:juriList", this.checkList)
+            this.juriDialog = false
+        },
+        checkTeacher(){
+            this.dialogTeacher = true
+        }
+    },
+    mounted() {
+        this.courseTypeId = this.depthCopy(this.testType)
+        this.courseName = this.depthCopy(this.title)
+        this.isTeacherSee = this.depthCopy(this.see)
+        this.manualJson = this.depthCopy(this.cJson)
+        this.typeCheck = this.depthCopy(this.typeid)
+        this.courseText = this.depthCopy(this.brief)
+        this.sJuri = this.depthCopy(this.juri)
+        this.selectedDate = this.depthCopy(this.overDate)
+        this.checkList = this.depthCopy(this.juriList)
+        this.teaType = this.depthCopy(this.typeInfo)
+        this.$forceUpdate()
+        // this.selectAllType();
+        this.selectType();
+        this.getClass2();
+    }
+}
+</script>
+
+<style scoped>
+.rightBox {
+    width: calc(100%);
+    background: #F0F2F5;
+    overflow: auto;
+    height: calc(100%);
+    margin: 0 auto;
+    position: relative;
+    box-sizing: border-box;
+}
+
+.whiteBg {
+    /* background: #fff; */
+    border-radius: 10px;
+}
+
+.basic_box {
+    margin: 0 auto;
+    position: relative;
+    padding: 0 20px 0 20px;
+}
+
+.big_box {
+    /* margin-top: 20px; */
+    display: flex;
+    justify-content: space-between;
+    /* border-bottom: 1px solid #E0E2ED; */
+}
+
+.left_first {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    width: calc(100%);
+    padding: 20px;
+    box-sizing: border-box;
+    background: #fff;
+    border-radius: 5px;
+}
+
+.course_input_box {
+    display: flex;
+    margin-right: 20px;
+    width: 100%;
+    align-items: center;
+    position: relative;
+}
+
+.course_input_box>.binfo_input {
+    width: calc(100% - 290px);
+    margin: 0 10px;
+}
+
+.bb_courseIcon {
+    width: 57px;
+    height: 45px;
+    background: #F0F4FA;
+    border-radius: 5px 0px 0px 5px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-right: 1.5px solid rgb(202, 209, 220);
+    box-sizing: border-box;
+    position: absolute;
+    left: 1.5px
+}
+
+.bb_courseIcon>img {
+    width: 25px;
+    height: auto
+}
+
+.all_choose {
+    display: flex;
+    flex-direction: row;
+    align-items: flex-start;
+    width: 100%;
+}
+
+.all_choose+.all_choose {
+    /* margin-top: 10px */
+}
+
+.all_choose>span {
+    min-width: fit-content;
+    display: block;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    margin-right: 20px;
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.all_choose>>>.el-checkbox-group {
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: flex-start;
+    align-items: center;
+    margin-top: 3px;
+}
+
+.all_choose>.el-checkbox-group>>>.el-checkbox {
+    margin-bottom: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-right: 10px;
+}
+
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
+    min-width: 80px;
+    overflow: hidden;
+    width: 80px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
+    width: auto;
+}
+
+.choose>div:nth-child(3)>span {
+    /* letter-spacing: 0 !important; */
+}
+
+.choose {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: 100%;
+    justify-content: space-evenly;
+    align-items: flex-start;
+}
+
+.both {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    width: 100%;
+    align-items: center;
+    justify-content: flex-start;
+    margin: 15px 0;
+}
+
+.binfo_input {
+    width: 100%;
+    margin: 0;
+    padding: 12px 14px;
+    display: block;
+    min-width: 0;
+    outline: none;
+    box-sizing: border-box;
+    background: none;
+    border: none;
+    border-radius: 4px;
+    background: #fff;
+    font-size: 16px;
+    resize: none;
+    font-family: 'Microsoft YaHei';
+    min-height: 48px;
+    border: 1.5px solid #CAD1DC;
+}
+
+.c_info_title {
+    padding: 15px 0 15px 0;
+    font-size: 16px;
+    font-weight: bold;
+    margin: 0 0 0 20px;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    line-height: 20px;
+}
+
+.c_info_title::before {
+    content: '';
+    display: block;
+    width: 3px;
+    height: 20px;
+    background: #0061FF;
+    border-radius: 3px;
+    margin: 0 5px 0 0;
+}
+
+.c_info_box {
+    width: 100%;
+}
+
+.c_info_tab {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.c_info_tab>span {
+    cursor: pointer;
+    padding-bottom: 10px;
+    font-weight: bold;
+}
+
+.c_info_tab>span+span {
+    margin-left: 20px;
+}
+
+.c_info_tab>.active {
+    color: #3e88f4;
+    border-bottom: 2px solid #2f80f3;
+}
+
+
+.c_info_tab_box {
+    overflow: hidden;
+}
+
+.skip_btn {
+    position: absolute;
+    right: 20px;
+}
+
+.typeBox {
+    margin-top: 20px;
+}
+
+.typeBox>span {
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.binfo_textarea {
+    border: 1.5px solid #CAD1DC;
+    font-size: 16px;
+    resize: none;
+    /* background: #f6f6f6; */
+    font-family: 'Microsoft YaHei';
+}
+
+
+.checkJuri {
+    width: 220px;
+    height: 40px;
+    border: 1px solid #DCDFE6;
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+    box-sizing: border-box;
+    margin-left: 5px;
+    border-radius: 4px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
+    font-size: 14px;
+    color: #464646;
+}
+
+
+.dialog_diy>>>.el-dialog {
+    /* height: 100%; */
+    /* margin: 15vh auto !important; */
+}
+
+.dialog_diy>>>.el-dialog__header {
+    background: #454545 !important;
+    padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+    /* height: calc(100% - 54px); */
+    box-sizing: border-box;
+    /* padding: 0px; */
+}
+
+.dialog_diy>>>.el-dialog__title {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+    /* background: #e8ebf1; */
+    overflow: hidden;
+}
+
+.people_name>>>.el-checkbox {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+}
+
+.people_name>>>.el-checkbox__label {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    width: calc(100%);
+}
+
+.people_name2>>>.el-checkbox__label {
+    width: calc(100% - 130px);
+}
+</style>

+ 591 - 0
src/components/pages/test/add/setInfo/manualCreated.vue

@@ -0,0 +1,591 @@
+<template>
+  <div class="mc_box">
+    <div class="mc_addBox">
+      <div class="mc_addBox_add">
+        <div class="title">请添加题目类型与数量</div>
+        <div class="select">
+          <el-select
+            v-model="topicType"
+            placeholder="题目类型"
+            clearable
+            class="e-select"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            v-model="number"
+            placeholder="请输入题目数量"
+            size="normal"
+            clearable
+            @change="numberPan"
+            class="e-input"
+          ></el-input>
+          <img
+            src="@/assets/icon/new/addStage.png"
+            class="e-img"
+            @click="addCheck"
+          />
+        </div>
+      </div>
+      <div class="mc_addBox_add">
+        <div class="title">请添加试卷组件</div>
+        <div class="btnBox">
+          <!-- <el-button type="primary" size="mini" v-for="item in buttonOptions" :key="item.type" class="e-button"
+                        @click="addQtype(item.type)">{{ item.name }}</el-button> -->
+          <button
+            v-for="item in buttonOptions"
+            :key="item.type"
+            class="pub_test_btn"
+            :class="{
+              pub_test_btn_group: item.type == 1,
+              pub_test_btn_page: item.type == 2,
+            }"
+            @click="addQtype(item.type)"
+          >
+            {{ item.name }}
+          </button>
+        </div>
+      </div>
+      <div class="mc_addBox_add">
+        <div class="title">智能创建</div>
+        <div class="btnBox">
+          <aiCreate2 :aiJson="manualJson" @changeJson="changeJson"></aiCreate2>
+        </div>
+      </div>
+    </div>
+    <div class="mc_checkBox">
+      <checkOrder
+        :checkC.sync="checkC"
+        :checkJson="checkJson"
+        @changeJson="changeJson"
+      ></checkOrder>
+      <div class="e_btn">
+        <el-button type="primary" size="mini" @click="nextSteps()"
+          >下一步</el-button
+        >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import checkOrder from "../components/checkOrder.vue";
+import aiCreate2 from "./aiCreate2.vue";
+import minxinVue from "../minxins/minxin";
+
+export default {
+  mixins: [minxinVue],
+  components: {
+    checkOrder,
+    aiCreate2,
+  },
+  props: {
+    manualJson: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      topicType: "",
+      number: "",
+      checkJson: [
+        // {
+        //     ttype: 1, //题目分类 1普通题目 2分组 3分页
+        //     type: 1, //题型分类 1选择题,  3问答题 4添加文档
+        //     array:[] //题目
+        // }
+      ],
+      checkC: "",
+    };
+  },
+  watch: {
+    manualJson: {
+      handler: function (newVal, oldVal) {
+        this.checkJson = this.depthCopy(newVal);
+      },
+      deep: true,
+    },
+  },
+  methods: {
+    numberPan() {
+      if (/[^\d]/.test(this.number)) {
+        this.$message.error("请填写数字");
+        this.number = "";
+      }
+			if(this.topicType==6){
+				this.number = 1;
+			}
+    },
+    changeJson(json) {
+      this.checkJson = json;
+      this.$emit("update:manualJson", json);
+    },
+    addCheck() {
+      if (!this.topicType) {
+        this.$message.error("请选择题目类型");
+        return;
+      }
+      if (!this.number) {
+        this.$message.error("请填写题目数量");
+        return;
+      }
+      let type = 1;
+			// if(this.checkJson.filter(i=>i.type==6).length>=1){
+			// 	return this.$message.error("一个表单只能添加一个课程组件");
+			// }
+			function checkType(obj){
+				if(obj.filter(i=>i.array).length>0){
+					let bol = false;
+					obj.forEach(i=>{
+						console.log(i.array)
+						if(bol)return;
+						bol = checkType(i.array);
+					})
+					return bol;
+				}else if(obj.filter(i=>i.type==6).length>=1){
+					return true;
+				}else{
+					return false;
+				}
+			}
+			if(this.topicType == 6 && checkType(this.checkJson)){
+				return this.$message.error("一个表单只能添加一个课程组件");
+			}
+      if (this.checkJson.length > 0) {
+        for (var i = 0; i < this.checkJson.length; i++) {
+          if (this.checkJson[i].ttype == 2) {
+            type = 2;
+          } else if (this.checkJson[i].ttype == 3) {
+            type = 3;
+          }
+        }
+      }
+      if (this.checkC) {
+        let _check = this.checkC.replace("x", "").split("-");
+        let _json = this.checkJson[_check[0]];
+        let topicType = ''
+        if(this.topicType == 9 || this.topicType == 10){
+          topicType = 1 
+        }else {
+          topicType = this.topicType
+        }
+        let json = {
+          ttype: 1,
+          type: topicType,
+        };
+        if (this.topicType == 1) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        } else if (this.topicType == 3) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            answer: "",
+          };
+        } else if (this.topicType == 5) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            detail: "",
+          };
+        } else if (this.topicType == 6) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            courses:[]
+          };
+        } else if (this.topicType == 7) {
+          json.json = {
+            title: "标题",
+            detail: "",
+            small: 0,
+            big: 10,
+          };
+        } else if (this.topicType == 8) {
+          json.json = {
+            title: "标题",
+            detail: "",
+          };
+        }else if (this.topicType == 9) {
+          json.json = {
+            title: "标题",
+            type: 1,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        }else if (this.topicType == 10) {
+          json.json = {
+            title: "标题",
+            type: 2,
+            array: [
+              { option: "选项1", img: "" },
+              { option: "选项2", img: "" },
+            ],
+            answer: "",
+          };
+        } else if (this.topicType == 11) {
+          json.json = {
+            title: "标题",
+            detail: ""
+          };
+        }
+        if (_json.array) {
+          if (type == 3 && _check.length == 2) {
+            if (this.checkJson[_check[0]].array[_check[1]].array) {
+              for (var i = 0; i < this.number; i++) {
+                this.checkJson[_check[0]].array[_check[1]].array.push(json);
+              }
+            } else {
+              for (var i = 0; i < this.number; i++) {
+                this.checkJson[_check[0]].array.splice(
+                  parseInt(_check[1]) + 1,
+                  0,
+                  json
+                );
+              }
+            }
+          } else if (type == 3 && _check.length == 3) {
+            for (var i = 0; i < this.number; i++) {
+              this.checkJson[_check[0]].array[_check[1]].array.splice(
+                parseInt(_check[2]) + 1,
+                0,
+                json
+              );
+            }
+          } else if (type == 2 && _check.length == 2) {
+            for (var i = 0; i < this.number; i++) {
+              this.checkJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            }
+          } else if (type == 2 && _check.length == 1) {
+            for (var i = 0; i < this.number; i++) {
+              this.checkJson[_check[0]].array.push(json);
+            }
+          } else if (type == 3 && _check.length == 1) {
+            if (
+              this.checkJson[_check[0]].array[0] &&
+              this.checkJson[_check[0]].array[0].array
+            ) {
+              for (var i = 0; i < this.number; i++) {
+                this.checkJson[_check[0]].array[0].array.push(json);
+              }
+            } else {
+              for (var i = 0; i < this.number; i++) {
+                this.checkJson[_check[0]].array.push(json);
+              }
+            }
+          }
+        } else {
+          for (var i = 0; i < this.number; i++) {
+            this.checkJson.splice(parseInt(_check[0]) + 1, 0, json);
+          }
+        }
+      } else {
+        if (type == 1) {
+          for (var i = 0; i < this.number; i++) {
+            let topicType = ''
+            if(this.topicType == 9 || this.topicType == 10){
+              topicType = 1 
+            }else {
+              topicType = this.topicType
+            }
+            let json1 = {
+              ttype: 1,
+              type: topicType,
+            };
+            if (this.topicType == 1) {
+              json1.json = {
+                title: "标题",
+                type: 1,
+                array: [
+                  { option: "选项1", img: "" },
+                  { option: "选项2", img: "" },
+                ],
+                answer: "",
+              };
+            } else if (this.topicType == 3) {
+              json1.json = {
+                title: "标题",
+                type: 1,
+                answer: "",
+              };
+            } else if (this.topicType == 5) {
+              json1.json = {
+                title: "标题",
+                type: 1,
+                detail: "",
+              };
+            } else if (this.topicType == 6) {
+              json1.json = {
+                title: "标题",
+                detail: "",
+                courses:[]
+              };
+            } else if (this.topicType == 7) {
+              json1.json = {
+                title: "标题",
+                detail: "",
+                small: 0,
+                big: 10,
+              };
+            } else if (this.topicType == 8) {
+              json1.json = {
+                title: "标题",
+                detail: "",
+              };
+            }else if (this.topicType == 9) {
+              json1.json = {
+                title: "标题",
+                type: 1,
+                array: [
+                  { option: "选项1", img: "" },
+                  { option: "选项2", img: "" },
+                ],
+                answer: "",
+              };
+            }else if (this.topicType == 10) {
+              json1.json = {
+                title: "标题",
+                type: 2,
+                array: [
+                  { option: "选项1", img: "" },
+                  { option: "选项2", img: "" },
+                ],
+                answer: "",
+              };
+            } else if (this.topicType == 11) {
+              json1.json = {
+                title: "标题",
+                detail: ""
+              };
+            }
+            this.checkJson.push(json1);
+          }
+        } else if (type == 3 || type == 2) {
+          this.$message.error("请选中分页或者分组添加题目");
+          return;
+        }
+      }
+      this.topicType = "";
+      this.number = "";
+      this.$emit("update:manualJson", this.checkJson);
+    },
+    addQtype(type) {
+      if (type == 1) {
+        let type = 1;
+        if (this.checkJson.length > 0) {
+          for (var i = 0; i < this.checkJson.length; i++) {
+            if (this.checkJson[i].ttype == 1) {
+              type = 2;
+            } else if (this.checkJson[i].ttype == 3) {
+              type = 3;
+            }
+          }
+        }
+        let json = {
+          ttype: 2,
+          array: [],
+          isopen: true,
+        };
+        if (type == 1) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+            this.checkJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.checkJson.push(json);
+          }
+        } else if (type == 2) {
+          this.checkJson = [
+            {
+              ttype: 2,
+              array: this.depthCopy(this.checkJson),
+              isopen: true,
+            },
+          ];
+        } else if (type == 3) {
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            if (
+              _check.length > 1 &&
+              this.checkJson[_check[0]].array[0] &&
+              this.checkJson[_check[0]].array[0].array
+            ) {
+              this.checkJson[_check[0]].array.splice(
+                parseInt(_check[1]) + 1,
+                0,
+                json
+              );
+            } else if (
+              this.checkJson[_check[0]].array[0] &&
+              !this.checkJson[_check[0]].array[0].array
+            ) {
+              this.checkJson[_check[0]].array = [
+                {
+                  ttype: 2,
+                  array: this.depthCopy(this.checkJson[_check[0]].array),
+                  isopen: true,
+                },
+              ];
+            } else {
+              this.checkJson[_check[0]].array.push(json);
+            }
+          } else {
+            this.$message.error("请选中分页添加分组");
+            return;
+          }
+        }
+      } else if (type == 2) {
+        let type = 1;
+        if (this.checkJson.length > 0) {
+          for (var i = 0; i < this.checkJson.length; i++) {
+            if (this.checkJson[i].ttype == 1 || this.checkJson[i].ttype == 2) {
+              type = 2;
+            }
+          }
+        }
+        if (type == 1) {
+          let json = {
+            ttype: 3,
+            array: [],
+            isopen: true,
+          };
+          if (this.checkC) {
+            let _check = this.checkC.replace("x", "").split("-");
+
+            this.checkJson.splice(parseInt(_check[0]) + 1, 0, json);
+          } else {
+            this.checkJson.push(json);
+          }
+        } else {
+          this.checkJson = [
+            {
+              ttype: 3,
+              array: this.depthCopy(this.checkJson),
+              isopen: true,
+            },
+          ];
+        }
+      }
+      this.$emit("update:manualJson", this.checkJson);
+    },
+    depthCopy(s) {
+      return JSON.parse(JSON.stringify(s));
+    },
+
+    nextSteps() {
+      this.$emit("nextSteps");
+    },
+  },
+  mounted() {
+    this.checkJson = this.depthCopy(this.manualJson);
+    this.$forceUpdate();
+  },
+};
+</script>
+
+<style scoped>
+.mc_box {
+  width: 90%;
+  margin: 10px auto;
+  display: flex;
+}
+
+.mc_addBox {
+  width: 400px;
+  border: 1px solid #898989;
+  border-radius: 8px;
+  padding: 20px 20px;
+  box-sizing: border-box;
+  min-height: 350px;
+  height: fit-content;
+}
+
+.mc_addBox_add {
+}
+
+.mc_addBox_add + .mc_addBox_add {
+  margin-top: 10px;
+}
+
+.mc_addBox_add .title {
+  margin-bottom: 10px;
+  font-size: 15px;
+  font-weight: 700;
+  display: flex;
+  align-items: center;
+}
+
+.mc_addBox_add .title::before {
+  content: "";
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  background: rgb(54, 129, 252);
+  margin-right: 10px;
+  display: block;
+}
+
+.mc_addBox_add .select {
+  display: flex;
+  align-items: center;
+}
+
+.mc_addBox_add .btnBox {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.mc_addBox_add .select .e-select {
+}
+
+.mc_addBox_add .select .e-input {
+  margin-left: 10px;
+}
+
+.mc_addBox_add .select .e-img {
+  cursor: pointer;
+  width: 20px;
+  margin-left: 10px;
+}
+
+.mc_addBox_add .btnBox .e-button {
+}
+
+.mc_checkBox {
+  width: calc(100% - 420px);
+  margin-left: 20px;
+  border: 1px solid #898989;
+  border-radius: 8px;
+  padding: 20px;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+}
+
+.e_btn {
+  width: 100%;
+  margin-top: auto;
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 324 - 0
src/components/pages/test/aggregate/index.vue

@@ -0,0 +1,324 @@
+<template>
+  <div class="aggregate">
+    <el-table
+      :data="tableData"
+      border
+      max-height="750px"
+      v-loading="tabLoading"
+    >
+      <el-table-column
+        fixed
+        align="center"
+        label="序号"
+        type="index"
+        width="50"
+      >
+      </el-table-column>
+
+      <el-table-column
+        align="center"
+        prop="username"
+        label="教师姓名"
+        fixed
+        width="150"
+      >
+      </el-table-column>
+      <el-table-column
+        :filters="TeachingOptions"
+        :filter-method="filterTea"
+        align="center"
+        prop="tea"
+        fixed
+        label="教研室"
+        width="130"
+      >
+        <template slot-scope="scope">
+          <div class="TabBtn" v-if="!scope.row.tea">/</div>
+          <div class="TabBtn" v-else>{{ scope.row.tea }}</div>
+        </template>
+      </el-table-column>
+
+      <div v-for="item in titList" :key="item.id">
+        <el-table-column align="center" :label="item.name">
+          <div v-for="e in allFrom" :key="e.courseId">
+            <el-table-column
+              v-if="e.typeid == item.id"
+              align="center"
+              :prop="e.courseId"
+              :label="e.title"
+              show-overflow-tooltip
+              width="130"
+              :resizable="false"
+            >
+              <template slot="header" slot-scope="{ column, $index }">
+                <el-tooltip
+                  class="item"
+                  effect="dark"
+                  :content="e.title"
+                  placement="top"
+                >
+                  <div class="tooltipTit" @click="goFrom2(column)">
+                    {{ e.title }}
+                  </div>
+                </el-tooltip>
+              </template>
+              <template slot-scope="scope">
+                <div
+                  v-if="
+                    e.juri2 &&
+                      arrayToArray(
+                        scope.row.teaId ? scope.row.teaId.split(',') : [],
+                        e.juri2 ? e.juri2.split(',') : []
+                      ).length &&
+                      scope.row.works.indexOf(e.courseId) !== -1
+                  "
+                  class="yuan blacky"
+                  @click="gotoFrom(e.courseId, scope.row.userid)"
+                ></div>
+                <div
+                  v-else-if="scope.row.works.indexOf(e.courseId) !== -1"
+                  class="yuan blacky"
+                  @click="gotoFrom(e.courseId, scope.row.userid)"
+                ></div>
+                <div
+                  v-else-if="
+                    e.juri2 &&
+                      arrayToArray(
+                        scope.row.teaId ? scope.row.teaId.split(',') : [],
+                        e.juri2 ? e.juri2.split(',') : []
+                      ).length == 0
+                  "
+                  class="yuan greyy"
+                ></div>
+                <div v-else class="yuan"></div>
+              </template>
+            </el-table-column>
+          </div>
+        </el-table-column>
+      </div>
+    </el-table>
+
+    <!-- 查看数据来源 -->
+    <el-dialog
+      title=""
+      :visible.sync="diaIframe"
+      :append-to-body="true"
+      width="95%"
+      :before-close="handleClose2"
+      class="dialog_diy"
+    >
+      <div style="height: 100%;">
+        <iframe
+          ref="viframe"
+          style="width: 100%; height: 99%; border: none"
+          :src="ifmUrl"
+        ></iframe>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      tableData: [],
+      titList: [],
+      allFrom: [],
+      tabLoading: false,
+      TeachingOptions: [],
+      diaIframe: false,
+      ifmUrl: ""
+    };
+  },
+
+  mounted() {
+    this.getData();
+    this.getTeaList();
+  },
+
+  methods: {
+    // 处理数据
+    arrayToArray(arrayo, arrayt) {
+      let array1 = arrayo;
+      let array2 = arrayt;
+
+      let commonElements = [];
+
+      for (let i = 0; i < array1.length; i++) {
+        for (let j = 0; j < array2.length; j++) {
+          if (array1[i] === array2[j]) {
+            commonElements.push(array1[i]);
+          }
+        }
+      }
+      return commonElements;
+    },
+    gotoFrom(val, uid) {
+      // return console.log(val, uid);
+      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${uid}`;
+      // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
+      this.diaIframe = true;
+    },
+    // 教研室筛选
+    filterTea(value, row, column) {
+      // console.log(value, row, column);
+      const property = column["property"];
+      return row[property].includes(value);
+    },
+    // 获取教研室
+    getTeaList() {
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then(res => {
+          // return console.log("this.TeachingOptions", res.data[0]);
+          let data = res.data[0];
+          let dataCopy = [];
+
+          data.forEach(e => {
+            if(e.parentid == '6'){
+              let a = {};
+              a.value = e.name;
+              a.text = e.name;
+              dataCopy.push(a);
+            }
+          });
+
+          this.TeachingOptions = dataCopy;
+          // console.log("this.TeachingOptions", this.TeachingOptions);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    getData() {
+      this.tabLoading = true;
+
+      let params = {
+        oid: this.oid,
+        org: this.org
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestWorksAggregate", params)
+        .then(res => {
+          let data = res.data[0]; //所有老师
+          this.titList = res.data[1]; // 所有分类
+          this.allFrom = res.data[2]; //所有表单
+          let data3 = res.data[3]; //所有老师填写表单
+          data.forEach(e => {
+            e.works = [];
+            data3.forEach(k => {
+              if (e.userid == k.userid) {
+                e.works.push(k.courseid);
+              }
+            });
+          });
+          data.forEach(e => {
+            if (!e.tea) {
+              e.tea = "";
+            }
+          });
+          this.tableData = data;
+          this.tabLoading = false;
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
+    // 数据来源关闭弹框
+    handleClose2(done) {
+      done();
+    },
+    goFrom2(column) {
+      this.$router.push(
+        "/checkToTest?cid=" +
+          column.property +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=" +
+          2 +
+          "&role=" +
+          this.role
+      );
+    }
+  }
+};
+</script>
+
+<style scoped>
+.yuan {
+  width: 13px;
+  height: 13px;
+  border: 1px solid #000;
+  border-radius: 100%;
+  box-sizing: border-box;
+  margin: 0 auto;
+}
+
+.blacky {
+  background-color: #000;
+  cursor: pointer;
+}
+
+.greyy {
+  background-color: #eee;
+  border: 1px solid #eee;
+}
+.dialog_diy >>> .el-dialog {
+  height: 95%;
+  margin: 0 auto !important;
+  margin-top: 20px !important;
+  overflow: hidden;
+  min-width: 800px !important;
+}
+
+.dialog_diy >>> .el-dialog__header {
+  background: #454545 !important;
+  padding: 25px 20px;
+}
+
+.dialog_diy >>> .el-dialog__body {
+  height: calc(100% - 50px);
+  box-sizing: border-box;
+  padding: 0px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
+
+.tooltipTit {
+  -webkit-line-clamp: 2;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  height: 50px !important;
+}
+
+</style>

+ 2242 - 0
src/components/pages/test/check/aiBoxRight.vue

@@ -0,0 +1,2242 @@
+<template>
+  <div class="ai_body" v-loading="loading">
+    <div class="ai_body_dialog" ref="chatDialog">
+      <div class="dialog_content" v-for="item in array" :key="item.uid">
+        <div v-if="item.content" style="margin-left: auto;">
+          <div class="content content2" v-html="item.content"></div>
+          <div class="role">
+            <img src="../../../../assets/icon/new/role2.png" />
+          </div>
+        </div>
+        <div
+          style="margin-top:20px;margin-bottom:20px ; margin-right: auto;"
+          v-if="item.aiContent || item.loading"
+        >
+          <div class="role">
+            <img
+              :src="
+                item.fileid
+                  ? item.fileid
+                  : require('../../../../assets/icon/new/role1.png')
+              "
+            />
+          </div>
+          <div
+            element-loading-background="#f6f9ff"
+            :style="{
+              minHeight: item.loading ? '50px' : 'unset',
+              minWidth: item.loading ? '50px' : 'unset'
+            }"
+            class="content"
+            v-loading="item.loading"
+          >
+            <span class="vditor-reset" v-html="item.aiContent"></span>
+            <span class="createTime" v-text="item.createtime"></span>
+          </div>
+          <div
+            class="ai_btn_box"
+            v-if="!pan(item.aiContent).length && !item.loading"
+          >
+            <img
+              src="../../../../assets/icon/course/pasete.png"
+              @click="onCopy(item.aiContent)"
+            />
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="ai_body_select" v-if="false">
+      <div class="checkBox" v-if="checkBool">
+        <div class="task">
+          <div class="title">选择需要优化的任务:</div>
+          <div class="content">
+            <div class="span" @click="addAllTask()">
+              <div class="check">
+                <img
+                  :src="checkImg"
+                  alt=""
+                  v-if="checkArray.length !== course.length"
+                />
+                <img :src="checkIsImg" alt="" v-else />
+              </div>
+              <span>全选</span>
+            </div>
+            <div
+              class="span"
+              v-for="(item, index) in course"
+              :key="index"
+              @click="addTask(index)"
+            >
+              <div class="check">
+                <img
+                  :src="checkImg"
+                  alt=""
+                  v-if="checkArray.indexOf(index) === -1"
+                />
+                <img :src="checkIsImg" alt="" v-else />
+              </div>
+              <span>任务{{ index + 1 }}</span>
+            </div>
+          </div>
+        </div>
+        <div class="part">
+          <div class="title">选择优化的部分:</div>
+          <div class="content">
+            <div
+              class="span"
+              v-for="(item, index) in partArray"
+              :key="index"
+              :class="{ active: part == item.name }"
+              @click="checkPart(item.name)"
+            >
+              {{ item.name }}
+            </div>
+          </div>
+        </div>
+      </div>
+      <span
+        class="check"
+        :class="{ isCheck: checkBool }"
+        v-if="!checkArray.length && !part"
+        @click="checkBool = !checkBool"
+        >选择优化内容</span
+      >
+      <span
+        class="check"
+        :class="{ isCheck: checkBool }"
+        @click="checkBool = !checkBool"
+        v-else
+      >
+        <el-tooltip :content="taskName" placement="top" effect="dark">
+          <!-- content to trigger tooltip here -->
+          <span>{{ taskName }}</span>
+        </el-tooltip>
+      </span>
+    </div>
+    <div class="ai_body_input">
+      <div class="ai_b_i_btnArea">
+        <span class="clear" @click.stop="clear()">
+          <svg
+            width="20"
+            height="20"
+            viewBox="0 0 20 20"
+            fill="none"
+            xmlns="http://www.w3.org/2000/svg"
+          >
+            <path
+              fill-rule="evenodd"
+              clip-rule="evenodd"
+              d="M2.5 3.125C2.5 2.77982 2.77982 2.5 3.125 2.5H16.875C17.2202 2.5 17.5 2.77982 17.5 3.125V8.02715C17.5 8.37233 17.2202 8.65215 16.875 8.65215C16.5298 8.65215 16.25 8.37233 16.25 8.02715V3.75H3.75V16.25H8.125C8.47018 16.25 8.75 16.5298 8.75 16.875C8.75 17.2202 8.47018 17.5 8.125 17.5H3.125C2.77982 17.5 2.5 17.2202 2.5 16.875V3.125Z"
+            />
+            <path
+              fill-rule="evenodd"
+              clip-rule="evenodd"
+              d="M5.625 6.1521C5.625 5.80692 5.90482 5.5271 6.25 5.5271H13.125C13.4702 5.5271 13.75 5.80692 13.75 6.1521C13.75 6.49728 13.4702 6.7771 13.125 6.7771H6.25C5.90482 6.7771 5.625 6.49728 5.625 6.1521Z"
+            />
+            <path
+              fill-rule="evenodd"
+              clip-rule="evenodd"
+              d="M5.625 9.2771C5.625 8.93192 5.90482 8.6521 6.25 8.6521H9.37496C9.72014 8.6521 9.99996 8.93192 9.99996 9.2771C9.99996 9.62228 9.72014 9.9021 9.37496 9.9021H6.25C5.90482 9.9021 5.625 9.62228 5.625 9.2771Z"
+            />
+            <path
+              fill-rule="evenodd"
+              clip-rule="evenodd"
+              d="M12.465 11.507L15.9141 14.9048C16.1279 14.5365 16.25 14.1088 16.25 13.6521C16.25 12.2714 15.1307 11.1521 13.75 11.1521C13.2799 11.1521 12.8406 11.2815 12.465 11.507ZM15.0374 15.7957L11.5873 12.397C11.3726 12.7659 11.25 13.1944 11.25 13.6521C11.25 15.0328 12.3693 16.1521 13.75 16.1521C14.2211 16.1521 14.6613 16.0222 15.0374 15.7957ZM11.0797 11.0192C11.759 10.3303 12.7051 9.9021 13.75 9.9021C15.8211 9.9021 17.5 11.581 17.5 13.6521C17.5 14.6767 17.0882 15.6064 16.4226 16.2827C15.7431 16.9729 14.7961 17.4021 13.75 17.4021C11.6789 17.4021 10 15.7232 10 13.6521C10 12.6263 10.4127 11.6957 11.0797 11.0192Z"
+            />
+          </svg>
+          <span>清屏</span>
+        </span>
+        <span
+          class="clear"
+          @click.stop="showjList = !showjList"
+          v-if="jArray.length"
+        >
+          <span>查看</span>
+        </span>
+        <!-- <div style="margin-left: auto;">
+          <el-switch v-model="continuous"></el-switch>
+          <span @click.stop="continuous = !continuous">连续对话</span>
+        </div> -->
+      </div>
+
+      <div
+        class="ai_b_i_roleListBox"
+        ref="roleListRef"
+        v-if="showRoleList && choseRoleList.length > 0"
+      >
+        <div
+          :class="[
+            'ai_b_i_rlb_item',
+            index == choseRoleItem ? 'ai_b_i_rlb_itemActive' : ''
+          ]"
+          :ref="`roleItem${index}Ref`"
+          v-for="(item, index) in choseRoleList"
+          :key="item.id"
+          @mouseover="choseRoleItem = index"
+          @click.stop="choseRole(item)"
+        >
+          <div class="ai_b_i_rlb_itemTop">
+            <img
+              :src="
+                item.headUrl
+                  ? item.headUrl
+                  : require('../../../../assets/icon/new/role1.png')
+              "
+              alt=""
+            />
+            <div class="ai_b_i_rlb_i_name">
+              <span>{{ item.assistantName }}</span>
+              <span>作者:{{ item.username }}</span>
+            </div>
+          </div>
+          <div class="ai_b_i_rlb_itemBottom">
+            {{ item.prologue }}
+          </div>
+        </div>
+      </div>
+      <!-- <div class="ai_b_i_textListBox">
+				<div class="ai_b_i_tlb_left"></div>
+				<div class="ai_b_i_tlb_right"></div>
+			</div> -->
+      <!-- @input="inputChange" -->
+
+      <textarea
+        @input="inputChange"
+        class="ai_body_input_textarea"
+        @keydown="textareaKeydown"
+        :disabled="isVoice"
+        ref="textareaRef"
+        v-model.trim="courseText"
+        :placeholder="
+          isVoice
+            ? isTalk
+              ? ''
+              : '点击按钮开始录音'
+            : '在此输入您想了解的内容'
+        "
+      ></textarea>
+
+      <span
+        class="c_voiceBtn"
+        v-if="!courseText && !isVoice"
+        @click.stop="changeVoice(true)"
+      >
+        <svg
+          width="22"
+          height="22"
+          viewBox="0 0 22 22"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            fill-rule="evenodd"
+            clip-rule="evenodd"
+            d="M11.4583 14.0308C13.8381 14.0308 15.7551 12.0651 15.7551 9.62496V6.23588C15.7551 3.79574 13.8381 1.83008 11.4583 1.83008C9.07845 1.83008 7.16138 3.79574 7.16138 6.23588V9.62496C7.16138 12.0651 9.07845 14.0308 11.4583 14.0308ZM8.4835 6.23588C8.4835 4.54134 9.80561 3.18571 11.4583 3.18571C13.1109 3.18571 14.433 4.54134 14.433 6.23588V9.62496C14.433 11.3195 13.1109 12.6751 11.4583 12.6751C9.80561 12.6751 8.4835 11.3195 8.4835 9.62496V6.23588ZM18.3333 10.6405C18.3333 10.2677 18.0358 9.96264 17.6722 9.96264C17.3417 9.96264 17.0442 10.2338 17.0111 10.5727C16.5484 13.3178 14.2347 15.3852 11.4583 15.3852C8.68181 15.3852 6.36811 13.3178 5.90537 10.5727C5.87231 10.2338 5.57484 9.96264 5.24431 9.96264C4.88073 9.96264 4.58325 10.2677 4.58325 10.6405V10.7421C5.1121 13.9279 7.65717 16.4019 10.7972 16.7069V19.635H7.93254C7.54315 19.635 7.22748 19.9587 7.22748 20.358C7.22748 20.7572 7.54315 21.0809 7.93254 21.0809H14.9832C15.3726 21.0809 15.6883 20.7572 15.6883 20.358C15.6883 19.9587 15.3726 19.635 14.9832 19.635H12.1193V16.7069C15.2593 16.4019 17.8044 13.9279 18.3002 10.776C18.3002 10.7591 18.3085 10.7337 18.3167 10.7082L18.3167 10.7082L18.3167 10.7082C18.325 10.6828 18.3333 10.6574 18.3333 10.6405Z"
+            fill="black"
+            fill-opacity="0.9"
+          />
+        </svg>
+      </span>
+
+      <span
+        class="c_voiceBtn"
+        style="right: 70px;"
+        v-if="!courseText && isVoice && !isTalk"
+        @click.stop="changeVoice(false)"
+      >
+        <svg
+          width="22"
+          height="22"
+          viewBox="0 0 22 22"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            fill-rule="evenodd"
+            clip-rule="evenodd"
+            d="M2.75 3.4375C2.75 3.0578 3.0578 2.75 3.4375 2.75H18.5625C18.9422 2.75 19.25 3.0578 19.25 3.4375V18.5625C19.25 18.9422 18.9422 19.25 18.5625 19.25H3.4375C3.0578 19.25 2.75 18.9422 2.75 18.5625V3.4375ZM4.125 4.125V17.875H17.875V4.125H4.125Z"
+            fill="black"
+            fill-opacity="0.9"
+          />
+          <path
+            fill-rule="evenodd"
+            clip-rule="evenodd"
+            d="M6.875 6.875C6.875 6.4953 7.1828 6.1875 7.5625 6.1875H14.4375C14.8172 6.1875 15.125 6.4953 15.125 6.875V8.25C15.125 8.6297 14.8172 8.9375 14.4375 8.9375C14.0578 8.9375 13.75 8.6297 13.75 8.25V7.5625H11.6875V14.4375H12.375C12.7547 14.4375 13.0625 14.7453 13.0625 15.125C13.0625 15.5047 12.7547 15.8125 12.375 15.8125H9.625C9.2453 15.8125 8.9375 15.5047 8.9375 15.125C8.9375 14.7453 9.2453 14.4375 9.625 14.4375H10.3125V7.5625H8.25V8.25C8.25 8.6297 7.9422 8.9375 7.5625 8.9375C7.1828 8.9375 6.875 8.6297 6.875 8.25V6.875Z"
+            fill="black"
+            fill-opacity="0.9"
+          />
+        </svg>
+      </span>
+
+      <div
+        :class="[
+          'c_pub_button_confirm',
+          courseText ? '' : 'c_pub_button_confirmDisabled'
+        ]"
+        v-if="!faloading && !isVoice"
+        @click="addContent"
+      >
+        发送
+      </div>
+
+      <div
+        :class="['c_pub_button_confirmVoice']"
+        v-if="!faloading && isVoice && !isTalk"
+        @click="startVoice"
+      >
+        <svg
+          width="22"
+          height="22"
+          viewBox="0 0 22 22"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            fill-rule="evenodd"
+            clip-rule="evenodd"
+            d="M11.4583 14.0308C13.8381 14.0308 15.7551 12.0651 15.7551 9.62496V6.23588C15.7551 3.79574 13.8381 1.83008 11.4583 1.83008C9.07845 1.83008 7.16138 3.79574 7.16138 6.23588V9.62496C7.16138 12.0651 9.07845 14.0308 11.4583 14.0308ZM8.4835 6.23588C8.4835 4.54134 9.80561 3.18571 11.4583 3.18571C13.1109 3.18571 14.433 4.54134 14.433 6.23588V9.62496C14.433 11.3195 13.1109 12.6751 11.4583 12.6751C9.80561 12.6751 8.4835 11.3195 8.4835 9.62496V6.23588ZM18.3333 10.6405C18.3333 10.2677 18.0358 9.96264 17.6722 9.96264C17.3417 9.96264 17.0442 10.2338 17.0111 10.5727C16.5484 13.3178 14.2347 15.3852 11.4583 15.3852C8.68181 15.3852 6.36811 13.3178 5.90537 10.5727C5.87231 10.2338 5.57484 9.96264 5.24431 9.96264C4.88073 9.96264 4.58325 10.2677 4.58325 10.6405V10.7421C5.1121 13.9279 7.65717 16.4019 10.7972 16.7069V19.635H7.93254C7.54315 19.635 7.22748 19.9587 7.22748 20.358C7.22748 20.7572 7.54315 21.0809 7.93254 21.0809H14.9832C15.3726 21.0809 15.6883 20.7572 15.6883 20.358C15.6883 19.9587 15.3726 19.635 14.9832 19.635H12.1193V16.7069C15.2593 16.4019 17.8044 13.9279 18.3002 10.776C18.3002 10.7591 18.3085 10.7337 18.3167 10.7082L18.3167 10.7082L18.3167 10.7082C18.325 10.6828 18.3333 10.6574 18.3333 10.6405Z"
+            fill-opacity="0.9"
+          />
+        </svg>
+      </div>
+
+      <div
+        :class="['c_pub_button_StopConfirmVoice']"
+        v-if="!faloading && isVoice && isTalk"
+        @click="stopVoice"
+      >
+        <svg
+          width="22"
+          height="22"
+          viewBox="0 0 22 22"
+          fill="none"
+          xmlns="http://www.w3.org/2000/svg"
+        >
+          <path
+            d="M11 19.25C6.4625 19.25 2.75 15.5375 2.75 11C2.75 6.4625 6.4625 2.75 11 2.75C15.5375 2.75 19.25 6.4625 19.25 11C19.25 15.5375 15.5375 19.25 11 19.25ZM11 17.1875C14.4031 17.1875 17.1875 14.4031 17.1875 11C17.1875 7.59687 14.4031 4.8125 11 4.8125C7.59687 4.8125 4.8125 7.59687 4.8125 11C4.8125 14.4031 7.59687 17.1875 11 17.1875Z"
+            fill="#EE3E3E"
+          />
+          <path
+            d="M12.75 8.25H9.25C8.69772 8.25 8.25 8.69772 8.25 9.25V12.75C8.25 13.3023 8.69772 13.75 9.25 13.75H12.75C13.3023 13.75 13.75 13.3023 13.75 12.75V9.25C13.75 8.69772 13.3023 8.25 12.75 8.25Z"
+            fill="#EE3E3E"
+          />
+        </svg>
+      </div>
+
+      <div v-if="!faloading && isVoice"></div>
+      <div class="c_pub_button_confirm" v-if="faloading && stopTalkToken" @click="stopSend">
+        终止
+      </div>
+    </div>
+    <iframe
+      allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+      src="https://beta.cloud.cocorobo.cn/browser/public/index.html"
+      ref="iiframe"
+      v-show="false"
+    ></iframe>
+    <!-- <div class="ai_body_input">
+      <textarea
+        style="padding-right: 85px;"
+        rows="3"
+        @keyup.enter="addContent"
+        class="binfo_input binfo_textarea"
+        cols
+        v-model.trim="courseText"
+        placeholder="在此输入您想了解的内容"
+      ></textarea>
+      <div
+        class="c_pub_button_confirm"
+        v-if="!loading && courseText"
+        @click="addContent"
+      >
+        发送
+      </div>
+      <div class="c_pub_button_confirm" @click="promptTit" v-else>发送</div>
+    </div> -->
+  </div>
+</template>
+
+<script>
+import checkImg from "../../../../assets/icon/sourceFile/check.png";
+import checkIsImg from "../../../../assets/icon/sourceFile/check_is.png";
+import { v4 as uuidv4 } from "uuid";
+import MarkdownIt from "markdown-it";
+import TurndownService from "turndown";
+
+const OpenCC = require("opencc-js");
+let converter = OpenCC.Converter({
+  from: "cn",
+  to: "hk"
+});
+
+export default {
+  props: {
+    courseId: {
+      type: String,
+      default: ""
+    },
+    worksArray: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      array: [],
+      jArray: [],
+      courseText: "",
+      checkImg: checkImg,
+      checkIsImg: checkIsImg,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      checkArray: [],
+      course: [{ title: "任务1" }, { title: "任务2" }, { title: "任务3" }],
+      partArray: [
+        { name: "全部内容" },
+        { name: "任务设计" },
+        { name: "评价设计" }
+      ],
+      part: "全部内容",
+      checkBool: false,
+      loading: false,
+      textareaHeight: 50,
+      publicRoleList: [],
+      roleList: [],
+      textList: [
+        {
+          title: "项目式学习",
+          dataList: [
+            "请给我一些学生开展项目式学习可以使用的主题或问题参考,请说出学生将要解决的问题,以及学生要经历怎样的学习活动。",
+            "请将一个关于生态保护项目的项目式学习展开描述,你需要描述学生如何解决这个问题,你需要至少写出四个活动,这些活动需要按照前后逻辑关系排列。",
+            "请对驱动问题为“如何为学校建造一个富有特色的花坛?”的项目式学习进行子问题拆解,至少拆解为5个子问题,并根据子问题对应写出各环节的主要活动。"
+          ]
+        },
+        {
+          title: "教学评价",
+          dataList: [
+            "如果需要给学生的社区服务进行评价,给出评价维度和至少3个等级的表现描述。",
+            "为6年级学生设计一份关于梧桐山研究报告的评估任务表,并给出参考的报告流程,至少包含8个步骤,并包括地图、图片和至少300个词。",
+            "创建一个给5年级学生使用的课堂小测试,包含5道多选题,评价学生对于太阳能这个概念的理解。你需要给出题目和正确答案。"
+          ]
+        },
+        {
+          title: "教学设计",
+          dataList: [
+            "如果需要5年级学生感受“移步换景”的景观写作手法,你有什么合适的阅读材料推荐?你需要给出材料名称,以及材料的哪部分内容。",
+            "设计一个针对8年级学生且关于人类迁徙主题的地理课,并在课程中设计至少1项小组活动。",
+            "设计一个针对5年级学生的课程,课程综合科学和信息技术领域,解决生物与环境领域的生活问题,你需要给出完整的课程框架和活动。",
+            "如果3年级的学生不能理解光合作用的实现过程,需要你帮我设计一个支持他们理解的教学活动,需要包含活动的形式、实施材料和清单。",
+            "请基于贝叶斯定理为8年级学生出三道题目。",
+            "如果需要八年级学生了解尼罗河流域的文化发展史,你有哪些推荐的网站或参考书籍?"
+          ]
+        },
+        {
+          title: "班级管理",
+          dataList: [
+            "创建一组给一年级学生使用的班级口号,要求大家注意卫生、保护环境,口号需要对仗工整,符合一年级学生的理解水平。",
+            " 设计一套用于6年级学生的班级管理规章制度,内容需要包括学习、纪律、卫生、思想品德方面。"
+          ]
+        },
+        {
+          title: "课堂组织",
+          dataList: [
+            "请为“制作垃圾分类宣传单”的小组活动设计小组分工表,每个小组的成员为4-6人。",
+            "请给5年级“校园植物图鉴”社团课程设计一份小组合作公约,需包含小组成员信息、小组项目目标、填写日期,总长度不超过300字,并且提供至少3处学生自行填写的部分。",
+            "请用苏格拉底提问的方式,引导5年级学生拆解驱动问题:如何解决教室黑板反光的问题?其中需包含对于反光原因的分析与实验探究。"
+          ]
+        },
+        {
+          title: "教师发展",
+          dataList: [
+            "教师需要理解项目式学习的理论基础和基础概念,你需要生成一份阅读清单,要求内容为中文书籍或文献。",
+            "设计一个教师进行个人学期总结的框架,需要体现在教学、教研、个人学习方面的进步。"
+          ]
+        },
+        {
+          title: "代码分析",
+          dataList: [
+            "这段代码实现了什么效果?",
+            "请描述这段代码。",
+            "根据这段代码,给我一些修改意见。"
+          ]
+        }
+      ],
+      showTextList: false,
+      showRoleList: false,
+      choseRoleItem: 0,
+      choseTextItem: 0,
+      continuous: true,
+      showjList: false,
+      faloading: false,
+      fasource: null,
+      saveUid: "",
+      isVoice: false,
+      isTalk: false,
+      languageSetting: 0,
+      username: "",
+      options2: {
+        1: "选择题",
+        // 2: "问答题",
+        3: "问答题",
+        4: "添加文档",
+        5: "附件",
+        6: "课程",
+        7: "评分",
+        8: "日期",
+        9: "单选题",
+        10: "多选题",
+        11: "课程"
+      },
+      answerArray: [],
+      fileId: [],
+      fileList: [],
+			copyWorksArray:null,
+			stopTalkToken:false,
+    };
+  },
+  watch: {
+    courseId: {
+      immediate: true,
+      deep: true,
+      handler(newValue, oldValue) {
+        if (newValue) {
+          this.getChatList().then(_ => {
+            this.$nextTick(() => {
+              console.log(this.$refs.chatDialog.scrollHeight);
+              this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+            });
+          });
+        }
+      }
+    },
+    worksArray: {
+      immediate: false,
+      deep: true,
+      handler(newValue, oldValue) {
+        if (newValue.length && JSON.stringify(newValue)!==this.copyWorksArray) {
+          this.$emit("clearFileData");
+          this.fileId = [];
+					this.fileList = [];
+					this.copyWorksArray = JSON.stringify(newValue);
+          newValue.forEach(el => {
+            this.setJson(el);
+          });
+          // console.log("👈👉",newValue)
+          // this.setJson(newValue)
+        }
+      }
+    }
+  },
+  methods: {
+    // setJson(array){
+    //   const getAnswer = (j) => {
+    //     switch (j.type) {
+    //       case 1:
+    //         return j.json.array
+    //           .filter((_, idx) => j.json.answer2.includes(idx))
+    //           .map(item => `${item.img}${item.option}`)
+    //           .join(',');
+    //       case 3:
+    //       case 6:
+    //       case 7:
+    //       case 8:
+    //       case 11:
+    //         return j.json.answer2;
+    //       case 5:
+    //         if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
+    //           return '无附件';
+    //         }
+    //         return j.json.file.map(file => `${file.name}(${file.url})`).join(',');
+    //       default:
+    //         return '';
+    //     }
+    //   };
+
+    //   this.answerArray = array.map(i => ({
+    //     "用户名": i.name,
+    //     "提交时间": i.time,
+    //     "表单内容": i.array.map((j, index) => ({
+    //       "序号": index + 1,
+    //       "题目": j.json.title,
+    //       "题目类型": this.options2[j.type],
+    //       "答案": getAnswer(j)
+    //     }))
+    //   }))
+    //   console.log(this.answerArray);
+
+    //   // 将JSON对象转换为字符串
+    //   const jsonString = JSON.stringify(this.answerArray, null, 2);
+
+    //   // 创建Blob对象
+    //   const blob = new Blob([jsonString], { type: "application/json" });
+    //   blob.lastModifiedDate = new Date();
+    //   blob.name = `表单数据.json`;
+
+    //   // 如果仍需要上传文件,可以保留这行
+    //   return this.uploadFile(blob);
+    // },
+    setJson(obj) {
+      let array = obj.worksArray;
+			let name = obj.name;
+			if(array.length==0){
+				console.log("没人提交")
+				return this.$emit("pushFileData", {
+          fileId: "",
+          name: name,
+          url: ""
+        });
+			}
+      const getAnswer = j => {
+        if (j.type === 1) {
+          return j.json.array
+            .filter((_, idx) => j.json.answer2.includes(idx))
+            .map(item => `${item.img}${item.option}`)
+            .join(",");
+        } else if (
+          j.type === 3 ||
+          j.type === 6 ||
+          j.type === 7 ||
+          j.type === 8 ||
+          j.type === 11
+        ) {
+          return typeof j.json.answer2 === "string"
+            ? j.json.answer2.replace(/\n/g, " ")
+            : j.json.answer2;
+        } else if (j.type === 5) {
+          if (!Array.isArray(j.json.file) || j.json.file.length === 0) {
+            return "无附件";
+          }
+          return j.json.file
+            .map(file => `${file.name}(${file.url})`)
+            .join(",");
+        } else {
+          return "";
+        }
+      };
+
+      // 获取所有题目类型和题目
+      const questions = array[0].array.map((j, index) => ({
+        序号: index + 1,
+        题目类型: this.options2[j.type],
+        题目: j.json.title
+      }));
+
+      console.log(questions);
+			// let csvContent = "data:text/csv;charset=utf-8,"
+      // 构建CSV内容
+      // let csvContent = "用户名 | 提交时间 | " + questions.map(q => `${q.序号}-${q.题目类型}-${q.题目}`).join(' | ') + "\n";
+      let csvContent = "用户名,提交时间,"+ questions.map(q => `${q.序号}-${q.题目类型}-${q.题目}`).join(",") +"\n";
+
+      // 添加每个用户的答案
+      array.forEach(i => {
+        let row = [i.name, i.time];
+        i.array.forEach(j => {
+          row.push(getAnswer(j));
+        });
+        // csvContent += row.join(' | ') + "\n";
+        csvContent += row.join(",") + "\n";
+      });
+
+      // 创建Blob对象
+      // const blob = new Blob([csvContent], { type: "text/plain;charset=utf-8" });
+      // blob.lastModifiedDate = new Date();
+      // blob.name = `${name}_表单数据.txt`;
+
+      // 创建Blob对象
+      const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8" });
+      blob.lastModifiedDate = new Date();
+      blob.name = `${name}_表单数据.csv`;
+
+      // 如果仍需要上传文件,可以保留这行
+      return this.uploadFile({ file: blob, name: name });
+    },
+    uploadFile({ file, name }) {
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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"
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var _this = this;
+
+      if (file) {
+        // this.loading = true;
+        var params = {
+          Key:
+            file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            file.name.split(".")[file.name.split(".").length - 1],
+          ContentType: file.type,
+          Body: file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read"
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true
+        };
+        bucket
+          .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) {
+            if (err) {
+              _this.$message.error("上传失败");
+            } else {
+              console.log(data.Location);
+							console.log("提交")
+							_this.fileList.push(data.Location);
+              _this.$emit("pushFileData", {
+                fileId: "",
+                name: name,
+                url: data.Location
+              });
+              // _this.ajax
+              //   .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
+              //     url: data.Location
+              //   })
+              //   .then(res => {
+              //     let _data = res.data.FunctionResponse;
+              //     if (_data.result && _data.result.id) {
+              //       _this.fileId.push(_data.result.id);
+              //       _this.fileList.push(data.Location);
+              //       _this.$emit("pushFileData", {
+              //         fileId: _data.result.id,
+              //         name: name,
+              //         url: data.Location
+              //       });
+              //     } else {
+              //       console.error("获取fileId失败");
+              //     }
+              //   })
+              //   .catch(e => {
+              //     console.log(e);
+              //     console.error("获取fileId失败");
+              //   });
+              // }
+
+              // console.log(data.Location)
+            }
+          });
+      }
+    },
+    getLang() {
+      let lang = "";
+      if (this.languageSetting == 0) {
+        lang = "Chinese.";
+      } else if (this.languageSetting == 1) {
+        lang = "Traditional Chinese.";
+      } else if (this.languageSetting == 2) {
+        lang = "English.";
+      }
+      return lang;
+    },
+    promptTit() {
+      if (!this.loading && !this.courseText) {
+        this.$message({
+          message: "请输入您想要了解的内容",
+          type: "warning"
+        });
+      } else {
+        this.$message({
+          message: "请回答完毕后再次发送",
+          type: "warning"
+        });
+      }
+    },
+    addContent() {
+      if (this.courseText.trim().length == 0)
+        return this.$message.error("请输入内容");
+      let message = this.courseText;
+      if (this.courseText) {
+        let msg = ``;
+        if (this.answerArray.length) {
+          // msg += `
+          // ## 表单资料
+          // ${JSON.stringify(this.answerArray)}
+          // `;
+
+          // msg += `
+          // ## 要求
+          // 根据<参考资料>中的内容实现以下要求:${this.courseText}
+          // `;
+          msg += `## 要求
+根据上传文件中的内容实现以下要求:${this.courseText}`;
+          message = msg;
+        }
+        // 这里处理@的角色
+        let _atRoleList = [];
+        let _roleList = [...this.roleList, ...this.publicRoleList];
+        _roleList.forEach(i => {
+          if (message.indexOf(`@${i.assistantName}`) != -1) {
+            _atRoleList.push(i);
+          }
+        });
+        this.faloading = true;
+        if (_atRoleList.length > 0) {
+          //有@角色
+          let _replaceText = `Role: 你是数据检索大师,可以利用file_search的方式完整的去分析文件内容 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.\n${message}`;
+          let _htmlText = message;
+          _atRoleList.forEach(_i => {
+            _replaceText = _replaceText.replaceAll(`@${_i.assistantName}`, ``);
+            _htmlText = _htmlText.replaceAll(
+              `@${_i.assistantName}`,
+              `<span class='aite-name'>@${_i.assistantName}</span>`
+            );
+          });
+
+          _atRoleList.forEach((_item, _index) => {
+            const _uid = uuidv4();
+            if (_index == 0) {
+              this.array.push({
+                loading: true,
+                role: "user",
+                content: _htmlText,
+                uid: _uid,
+                AI: "AI",
+                aiContent: "",
+                oldContent: "",
+                isShowSynchronization: false,
+                filename: _item.assistantName,
+                index: this.array.length,
+                is_mind_map: false,
+                fileid: _item.headUrl,
+                createtime: new Date().toLocaleString().replaceAll("/", "-")
+              });
+            } else {
+              this.array.push({
+                loading: true,
+                role: "user",
+                content: "",
+                uid: _uid,
+                AI: "AI",
+                aiContent: "",
+                oldContent: "",
+                isShowSynchronization: false,
+                filename: _item.assistantName,
+                index: this.array.length,
+                is_mind_map: false,
+                fileid: _item.headUrl,
+                createtime: new Date().toLocaleString().replaceAll("/", "-")
+              });
+            }
+            this.$nextTick(() => {
+              this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+            });
+
+            let params = {
+              assistant_id: _item.assistant_id,
+              userId: this.userid,
+              message: _replaceText,
+              session_name: `${this.courseId}-${this.userid}-test`,
+              uid: _uid,
+              file_ids: this.fileId ? this.fileId : [],
+              // model: "gpt-4o-2024-11-20"
+              model: "qwen-plus"
+            };
+
+            // let params = {
+            //   prompt: _replaceText,
+            //   message: [],
+            //   file: this.fileId ? this.fileId : []
+            // };
+
+            this.ajax
+              .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
+              // .post("http://gpt4.cocorobo.cn/csvaimessage", params)
+              .then(res => {
+                // let data = res.FunctionResponse;
+                // const md = new MarkdownIt();
+                // const text = md.render(data);
+                // this.array.find(i => i.uid == _uid).aiContent = text;
+                // this.array.find(i => i.uid == _uid).isalltext = true;
+                // this.array.find(
+                //   i => i.uid == _uid
+                // ).isShowSynchronization = true;
+                // this.array.find(i => i.uid == _uid).loading = false;
+                // this.$nextTick(() => {
+                //   this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+                // });
+                // this.fasource.close();
+                // this.fasource = null;
+                // if (this.courseId) {
+                //   this.insertChat(_uid);
+                // }
+                if (
+                  converter(res.data.FunctionResponse.result) ==
+                  converter("发送成功")
+                ) {
+                } else {
+                  this.$message.warning(res.data.FunctionResponse.result);
+                }
+              })
+              .catch(err => {
+                console.log(err);
+              });
+            this.getAtAuContent(_uid);
+            this.saveUid = _uid;
+          });
+          this.courseText = "";
+        } else {
+          let _uuid = uuidv4();
+          this.array.push({
+            role: "user",
+            content: `${this.courseText}`,
+            uid: _uuid,
+            AI: "AI",
+            aiContent: "",
+            oldContent: "",
+            isShowSynchronization: false,
+            filename: "",
+            index: this.array.length,
+            is_mind_map: false,
+            createtime: new Date().toLocaleString().replaceAll("/", "-"),
+            loading: true
+          });
+
+          // let history = [];
+          // if (this.continuous) {
+          //   this.array.forEach((i, index) => {
+          //     if (i.content) history.push({ role: "user", content: index == this.array.length - 1 ? message : i.content });
+          //     if (i.aiContent)
+          //       history.push({ role: "assistant", content: i.aiContent });
+          //   });
+          // } else {
+          //   history.push({ role: "user", content: message });
+          // }
+          // history = history.filter(
+          //   i =>
+          //     i.content !=
+          //     "您好,我是您的助手小可"
+          // );
+
+          // history = history.map(i => ({
+          //   role: i.role,
+          //   content: `${i.content}`
+          // }));
+          // this.$nextTick(() => {
+          //   this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          // });
+          // let params = JSON.stringify({
+          //   // model: "gpt-3.5-turbo",
+          //   // model: "gpt-4o-2024-11-20",
+          //   model: "qwen-plus",
+          //   temperature: 0,
+          //   max_tokens: 4096,
+          //   top_p: 1,
+          //   frequency_penalty: 0,
+          //   presence_penalty: 0,
+          //   messages: history,
+          //   uid: _uuid,
+          //   mind_map_question: ""
+          // });
+          // this.courseText = "";
+
+          // this.ajax
+          //   .post("https://gpt4.cocorobo.cn/chat", params)
+          //   .then(res => {
+          //     if (
+          //       converter(res.data.FunctionResponse.result) ==
+          //       converter("发送成功")
+          //     ) {
+          //     } else {
+          //       this.$message.warning(res.data.FunctionResponse.result);
+          //     }
+          //   })
+          //   .catch(e => {
+          //     console.log(e);
+          //   });
+          // this.getAiContent(_uuid);\
+          // let params = {
+          //   assistant_id: "cd72354e-7be5-11ef-a263-12e77c4cb76b",
+          //   userId: this.userid,
+          //   message: `Role: 你是数据检索大师,可以利用file_search的方式完整的去分析文件内容 Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.\n${message}`,
+          //   session_name: `${this.courseId}-${this.userid}-test`,
+          //   uid: _uuid,
+          //   file_ids: this.fileId ? this.fileId : [],
+          //   model: "gpt-4o-2024-11-20"
+          // };
+
+          let params = {
+            prompt: message,
+            messages: [],
+            file: this.fileList ? this.fileList : []
+          };
+					this.stopTalkToken = this.ajax.setCancelSource()
+          this.$nextTick(() => {
+            this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          });
+          this.courseText = "";
+					this.saveUid = _uuid;
+          this.ajax
+            // .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
+            .post("https://gpt4.cocorobo.cn/csvaimessage", params,this.stopTalkToken)
+            .then(res => {
+              // if (
+              //   converter(res.data.FunctionResponse.result) ==
+              //   converter("发送成功")
+              // ) {
+              // } else {
+              //   this.$message.warning(res.data.FunctionResponse.result);
+              // }
+              let data = res.data.FunctionResponse;
+              const md = new MarkdownIt();
+              const text = md.render(data);
+              this.array.find(i => i.uid == _uuid).aiContent = text;
+              this.array.find(i => i.uid == _uuid).isalltext = true;
+              this.array.find(i => i.uid == _uuid).isShowSynchronization = true;
+              this.array.find(i => i.uid == _uuid).loading = false;
+							this.stopTalkToken = null;
+							this.faloading = false;
+              this.$nextTick(() => {
+                this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+              });
+              if (this.courseId) {
+                this.insertChat(_uuid);
+              }
+            })
+            .catch(err => {
+              console.log(err);
+							this.faloading = false;
+							this.stopTalkToken = null;
+            });
+          // this.getAtAuContent(_uuid);
+          // this.saveUid = _uuid;
+        }
+      }
+    },
+    getAiContent(_uid) {
+      this.fasource = new EventSource(
+        `https://gpt4.cocorobo.cn/stream/${_uid}`
+      ); //http://gpt4.cocorobo.cn:8011/stream/     https://gpt4.cocorobo.cn/stream/
+      let _allText = "";
+      let _mdText = "";
+      const md = new MarkdownIt();
+      this.fasource.onmessage = _e => {
+        if (_e.data.replace("'", "").replace("'", "") == "[DONE]") {
+          //对话已经完成
+          _mdText = _mdText.replace("_", "");
+          this.fasource.close();
+          this.fasource = null;
+          this.$nextTick(() => {
+            this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          });
+          this.array.find(i => i.uid == _uid).aiContent = _mdText;
+          this.array.find(i => i.uid == _uid).isalltext = true;
+          this.array.find(i => i.uid == _uid).isShowSynchronization = true;
+          this.array.find(i => i.uid == _uid).loading = false;
+          // 这里保存对话
+          if (this.courseId) {
+            this.insertChat(_uid);
+          }
+          return;
+        } else {
+          //对话还在继续
+          let _text = "";
+          _text = _e.data.replaceAll("'", "");
+          if (_allText == "") {
+            _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
+          } else {
+            _allText += _text;
+          }
+          _mdText = _allText + "_";
+          _mdText = _mdText.replace(/\\n/g, "\n");
+          _mdText = _mdText.replace(/\\/g, "");
+          if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
+          //转化返回的回复流数据
+          _mdText = md.render(_mdText);
+          this.array.find(i => i.uid == _uid).aiContent = _mdText;
+          this.array.find(i => i.uid == _uid).loading = false;
+          this.$nextTick(() => {
+            this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          });
+          // 处理流数据
+        }
+      };
+    },
+    getAtAuContent(_uid) {
+      this.fasource = new EventSource(
+        `https://gpt4.cocorobo.cn/question/${_uid}`
+      ); //http://gpt4.cocorobo.cn:8011/question/   https://gpt4.cocorobo.cn/question/
+      let _allText = "";
+      let _mdText = "";
+      const md = new MarkdownIt();
+      this.fasource.onmessage = _e => {
+        let _eData = JSON.parse(_e.data);
+        if (_eData.content.replace("'", "").replace("'", "") == "[DONE]") {
+          let _result = [];
+          if ("result" in _eData) {
+            _result = _eData.result;
+            for (let i = 0; i < _result.length; i++) {
+              _mdText = _mdText.replace(_result[i].text, _result[i].fileName);
+            }
+          }
+          _mdText = _mdText.replace("_", "");
+          this.array.find(i => i.uid == _uid).aiContent = _mdText;
+          this.array.find(i => i.uid == _uid).isalltext = true;
+          this.array.find(i => i.uid == _uid).isShowSynchronization = true;
+          this.array.find(i => i.uid == _uid).loading = false;
+          this.$nextTick(() => {
+            this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          });
+          this.fasource.close();
+          this.fasource = null;
+          if (this.courseId) {
+            this.insertChat(_uid);
+          }
+        } else {
+          let _text = _eData.content.replace("'", "").replace("'", "");
+          if (_allText == "") {
+            _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
+          } else {
+            _allText += _text;
+          }
+          _mdText = _allText + "_";
+          _mdText = _mdText.replace(/\\n/g, "\n");
+          _mdText = _mdText.replace(/\\/g, "");
+          if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
+          //转化返回的回复流数据
+          _mdText = md.render(_mdText);
+          this.array.find(i => i.uid == _uid).aiContent = _mdText;
+          this.array.find(i => i.uid == _uid).loading = false;
+          this.$nextTick(() => {
+            this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+          });
+          // 处理流数据
+        }
+      };
+    },
+    async getUserName() {
+      let params = { uid: this.userid };
+      try {
+        let res = await this.ajax.get(
+          this.$store.state.api + "getUser",
+          params
+        );
+        this.username = res.data[0][0].name;
+      } catch (err) {
+        console.error(err);
+      }
+    },
+    //保存消息
+    async insertChat(_uid) {
+      let _data = this.array.find(i => i.uid == _uid);
+      this.saveUid = "";
+      this.faloading = false;
+      if (!this.username) {
+        await this.getUserName();
+      }
+      if (!_data) return;
+      let params = {
+        userId: this.userid,
+        userName: this.username,
+        groupId: "602def61-005d-11ee-91d8-005056b8q12w",
+        answer: _data.aiContent,
+        problem: _data.content,
+        file_id: _data.fileid ? _data.fileid : "",
+        alltext: _data.aiContent,
+        type: "chat",
+        filename: _data.filename,
+        session_name: `${this.courseId}-${this.userid}-test` //这是对话记录位置
+      };
+      this.ajax
+        .post("https://gpt4.cocorobo.cn/insert_chat", params)
+        .then(res => {});
+    },
+    // 获取对应的聊天记录
+    getChatList() {
+      return new Promise((resolve, reject) => {
+        if (this.loading) return;
+        this.array = [];
+        this.loading = true;
+        let params = {
+          userid: this.userid,
+          groupid: "602def61-005d-11ee-91d8-005056b8q12w",
+          // session_name:``
+          session_name: `${this.courseId}-${this.userid}-test`
+        };
+        this.ajax
+          .post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
+          .then(res => {
+            let _data = JSON.parse(res.data.FunctionResponse).response;
+            if (_data.length > 0) {
+              let _chatList = [];
+              for (let i = 0; i < _data.length; i++) {
+                _chatList.push({
+                  loading: false,
+                  role: "user",
+                  content: _data[i].problem,
+                  uid: _data[i].id,
+                  AI: "AI",
+                  aiContent: _data[i].answer,
+                  oldContent: _data[i].answer,
+                  isShowSynchronization: false,
+                  filename: _data[i].filename,
+                  index: i,
+                  is_mind_map: false,
+                  fileid: _data[i].fileid,
+                  createtime: _data[i].createtime
+                });
+              }
+              this.array = _chatList;
+              this.loading = false;
+            } else {
+              let _uid = uuidv4();
+              let _chatList = [];
+              _chatList.push({
+                loading: false,
+                role: "",
+                content: "",
+                uid: _uid,
+                AI: "AI",
+                aiContent: "您好,我是您的助手小可",
+                oldContent: "您好,我是您的助手小可",
+                isShowSynchronization: false,
+                filename: "",
+                index: 0,
+                is_mind_map: false,
+                fileid: ""
+              });
+              this.array = _chatList;
+              if (this.courseId) {
+                this.insertChat(_uid);
+              }
+              //没有对话记录
+              this.loading = false;
+            }
+            resolve();
+          })
+          .catch(err => {
+            console.log(err);
+            this.$message.error("获取对话记录失败");
+            this.loading = false;
+            resolve();
+          });
+      });
+    },
+    addTask(index) {
+      if (this.checkArray.indexOf(index) !== -1) {
+        this.checkArray.splice(this.checkArray.indexOf(index), 1);
+      } else {
+        this.checkArray.push(index);
+      }
+      console.log(index);
+    },
+    addAllTask() {
+      if (this.checkArray.length === this.course.length) {
+        this.checkArray = [];
+      } else {
+        this.checkArray = [];
+        this.course.forEach((item, index) => {
+          this.checkArray.push(index);
+        });
+      }
+    },
+    checkPart(name) {
+      this.part = name;
+    },
+    inputChange() {
+      if (this.courseText.at(-1) == "@") {
+        // this.showRoleList = true;
+      }
+      if (this.courseText.at(-1) == "/") {
+        console.log("哇卡ka2");
+      }
+
+      this.$nextTick(() => {
+        this.$refs.textareaRef.style.height = "35px";
+        this.$refs.textareaRef.style.height =
+          this.$refs.textareaRef.scrollHeight + "px";
+        this.textareaHeight = this.$refs.textareaRef.style.height;
+      });
+    },
+    textareaKeydown(_e) {
+      if (this.showRoleList && this.choseRoleList.length > 0) {
+        // console.log(_e.keyCode);
+        // switch (_e.keyCode) {
+        //   case 38: //小键盘上
+        //     _e.preventDefault();
+        //     if (this.choseRoleItem == 0) return;
+        //     this.choseRoleItem--;
+        //     // 修改滚动条高度
+        //     this.$refs.roleListRef.scrollTo({
+        //       top:
+        //         this.$refs[`roleItem${this.choseRoleItem}Ref`][0].offsetTop -
+        //         10,
+        //       behavior: "smooth"
+        //     });
+        //     // this.$refs.roleListRef.scrollTop = this.choseRoleItem * 107;
+        //     break;
+        //   case 40: //小键盘下
+        //     _e.preventDefault();
+        //     if (this.choseRoleItem == this.choseRoleList.length - 1) return;
+        //     this.choseRoleItem++;
+        //     this.$refs.roleListRef.scrollTo({
+        //       top:
+        //         this.$refs[`roleItem${this.choseRoleItem}Ref`][0].offsetTop -
+        //         10,
+        //       behavior: "smooth"
+        //     });
+        //     // this.$refs.roleListRef.scrollTop = this.choseRoleItem * 107;
+        //     break;
+        //   case 13: //回车
+        //     _e.preventDefault();
+        //     this.choseRole(this.choseRoleList[this.choseRoleItem]);
+        //     break;
+        // }
+      } else if (_e.key === "Enter") {
+        _e.preventDefault();
+        if (_e.shiftKey) {
+          this.courseText += "\n";
+        } else {
+          this.addContent();
+        }
+      }
+    },
+    clear() {
+      this.$confirm("确定清空聊天记录吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(_ => {
+          this.loading = true;
+          let params = {
+            user_id: this.userid,
+            id: "602def61-005d-11ee-91d8-005056b8q12w",
+            session_name: `${this.courseId}-${this.userid}-test`
+          };
+
+          this.ajax
+            .post("https://gpt4.cocorobo.cn/delete_park_session", params)
+            .then(res => {
+              this.array = [];
+              this.$message.success("清除聊天记录成功");
+              this.loading = false;
+            })
+            .catch(err => {
+              this.loading = false;
+              this.$message.error("清除聊天记录失败");
+            });
+        })
+        .catch(_ => {});
+    },
+    getRoleList() {
+      this.roleList = [];
+      let params = {
+        userId: this.userid
+      };
+      this.ajax
+        .post("https://gpt4.cocorobo.cn/get_ai_agent_assistant_list", params)
+        .then(res => {
+          let _data = res.data.FunctionResponse.result;
+          if (_data) {
+            this.roleList = JSON.parse(_data);
+          }
+        })
+        .catch(e => {
+          console.log(e);
+          // this.$message.error("获取角色列表失败");
+          this.roleList = [];
+        });
+    },
+    getPublicRoleList() {
+      this.publicRoleList = [];
+      let params = {
+        userId: this.userid,
+        organizeid: this.oid
+      };
+      this.ajax
+        .post(
+          "https://gpt4.cocorobo.cn/get_ai_agent_assistant_share_list",
+          params
+        )
+        .then(res => {
+          let _data = res.data.FunctionResponse.result;
+          if (_data) {
+            this.publicRoleList = JSON.parse(_data);
+          }
+        })
+        .catch(e => {
+          this.publicRoleList = [];
+          console.log(e);
+          // console.log("获取公共角色失败", e);
+        });
+    },
+    choseRole(item) {
+      let _lastAtIndex = this.courseText.lastIndexOf("@");
+      this.courseText = `${this.courseText.slice(0, _lastAtIndex)}@${
+        item.assistantName
+      } `;
+      this.$refs.textareaRef.focus();
+      this.showRoleList = false;
+    },
+    onCopy(content) {
+      const turndownService = new TurndownService();
+      // 添加自定义规则来处理表格
+      turndownService.addRule("table", {
+        filter: "table",
+        replacement: (content, node) => {
+          const rows = node.querySelectorAll("tr");
+          let markdown = "";
+
+          rows.forEach(row => {
+            const cells = row.querySelectorAll("th, td");
+            const rowMarkdown = Array.from(cells)
+              .map(cell => cell.textContent)
+              .join(" | ");
+            markdown += `| ${rowMarkdown} |\n`;
+            if (cells && cells.length && cells[0].tagName == "TH") {
+              let a = Array.from(cells)
+                .map(cell => "")
+                .join(" --- |");
+              markdown += `| --- |${a}\n`;
+            }
+          });
+
+          // 添加分隔行
+          // markdown = markdown.replace(/^/, '| --- |\n');
+          return markdown;
+        }
+      });
+      // 创建临时textarea元素
+      const tempInput = document.createElement("textarea");
+
+      tempInput.value = turndownService.turndown(content); // 设置要复制的内容
+      // 隐藏元素
+      tempInput.style.position = "absolute";
+      tempInput.style.left = "-9999px";
+      // 将元素添加到DOM中
+      document.body.appendChild(tempInput);
+      // 选中元素内容
+      tempInput.select();
+      // 执行复制操作
+      document.execCommand("copy");
+      // 移除临时元素
+      document.body.removeChild(tempInput);
+      this.$message({
+        message: "复制成功",
+        type: "success"
+      });
+    },
+    stopSend() {
+      if (this.fasource) {
+        this.fasource.close();
+        if (this.array[this.array.length - 1].content == "wanSearch") {
+          this.array.pop();
+        }
+        this.array.find(i => i.uid == this.saveUid).loading = false;
+        this.faloading = false;
+        this.fasource = null;
+        this.insertChat(this.saveUid);
+      }else if(this.stopTalkToken){
+				this.stopTalkToken.cancel("Request canceled by the user.");
+				this.array = this.array.filter(i => i.uid !== this.saveUid);
+				this.stopTalkToken = null;
+				this.faloading = false;
+			}
+    },
+    changeVoice(flag) {
+      this.isVoice = flag;
+    },
+    startVoice() {
+      let iiframe = this.$refs["iiframe"];
+      iiframe.contentWindow.window.document.getElementById(
+        "languageOptions"
+      ).selectedIndex = 2; //普通话
+      iiframe.contentWindow.testdoContinuousPronunciationAssessment();
+      this.isTalk = true;
+      iiframe.contentWindow.onRecognizedResult = e => {
+        let _msg = e.privText;
+        console.log(_msg);
+        if (_msg) this.courseText += _msg;
+      };
+    },
+    stopVoice() {
+      try {
+        if (!this.isTalk) return this.$message.info("请先开始录音");
+        let iiframe = this.$refs["iiframe"];
+        iiframe.contentWindow.window.document
+          .getElementById("scenarioStopButton")
+          .click();
+        iiframe.contentWindow.onSessionStopped = (s, e) => {
+          this.isTalk = false;
+          if (this.courseText) {
+            this.addContent();
+          }
+        };
+      } catch (error) {
+        console.log(error);
+        this.isTalk = false;
+        if (this.courseText) {
+          this.addContent();
+        }
+      }
+    }
+  },
+  computed: {
+    pan() {
+      return content => {
+        try {
+          return JSON.parse(content);
+        } catch (error) {
+          return [];
+        }
+      };
+    },
+    courseTextLength() {
+      return this.courseText.length;
+    },
+    taskName() {
+      let task = "";
+      if (this.checkArray.length) {
+        task = "任务";
+        this.checkArray = this.checkArray.sort((a, b) => a - b);
+        let a = JSON.parse(JSON.stringify(this.checkArray));
+        for (let index = 0; index < a.length; index++) {
+          a[index]++;
+        }
+        task += a.join("/");
+      }
+      return task + " " + this.part;
+    },
+    choseRoleList() {
+      let result = [...this.roleList, ...this.publicRoleList];
+      const _index = this.courseText.lastIndexOf("@");
+      if (_index !== -1) {
+        let roleName = this.courseText.substring(_index + 1);
+        result = result.filter(i => i.assistantName.indexOf(roleName) != -1);
+      } else {
+        return [];
+      }
+      this.choseRoleItem = 0;
+      return result;
+    }
+  },
+  mounted() {
+    // this.getChatList().then(_ => {
+    //   this.$nextTick(() => {
+    //     console.log(this.$refs.chatDialog.scrollHeight);
+    //     this.$refs.chatDialog.scrollTop = this.$refs.chatDialog.scrollHeight;
+    //   });
+    // });
+    // if(this.worksArray.length){
+    //   this.$emit("clearFileData");
+    //   this.fileId = [];
+		// 	this.fileList = [];
+		// 	console.log("获取数据")
+    // 	this.worksArray.forEach(el=>{
+    // 		this.setJson(el)
+    // 	})
+    // }
+    // this.getRoleList();
+    // this.getPublicRoleList();
+  }
+};
+</script>
+
+<style scoped>
+.ai_body {
+  /* height: calc(100% - 158px - 46px);
+  width: 500px; */
+  height: 100%;
+  width: 100%;
+  /* margin: 0 auto; */
+  display: flex;
+  flex-direction: column;
+  /* position: fixed; */
+  /* z-index: 999; */
+  background: #fff;
+  /* right: 30px; */
+  /* bottom: 10px; */
+  padding: 10px 20px;
+  box-sizing: border-box;
+  /* box-shadow: 0 0 5px 2px #00000045;
+  border-radius: 5px; */
+}
+
+.binfo_input {
+  width: 100%;
+  margin: 0;
+  padding: 12px 14px;
+  display: block;
+  min-width: 0;
+  outline: none;
+  box-sizing: border-box;
+  background: none;
+  border: none;
+  border-radius: 4px;
+  background: #fff;
+  font-size: 14px;
+  resize: none;
+  font-family: "Microsoft YaHei";
+  min-height: 48px;
+  /* border: 1px solid #3682fc00; */
+  border: 1.5px solid #cad1dc;
+}
+
+.binfo_textarea {
+  border: 1.5px solid #cad1dc;
+  font-size: 14px;
+  resize: none;
+  /* background: #f6f6f6; */
+  font-family: "Microsoft YaHei";
+}
+
+.binfo_textarea::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 6px;
+  /*高宽分别对应横竖滚动条的尺寸*/
+  height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar-track {
+  border-radius: 10px;
+  background-color: rgba(0, 0, 0, 0.1);
+}
+
+/*定义滑块 内阴影+圆角*/
+.binfo_textarea::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+  background-color: rgba(0, 0, 0, 0.1);
+}
+
+.binfo_input:focus-visible {
+  border: 1.5px solid #3681fc !important;
+}
+
+.ai_body_input {
+  position: relative;
+  display: flex;
+
+  margin-top: auto;
+  width: 100%;
+  /* height: auto; */
+  /* max-height: 80vh; */
+  justify-content: space-between;
+  align-items: flex-end;
+  border-radius: 10px;
+  border: 1.5px solid #3681fc !important;
+  /* padding: 10px;
+	padding-top: 20px; */
+  /* overflow: auto; */
+}
+
+.ai_b_i_btnArea {
+  width: calc(100% - 10px);
+  position: absolute;
+  bottom: calc(100% + 5px);
+  height: 30px;
+  display: flex;
+  /* justify-content: space-between; */
+}
+
+.ai_b_i_btnArea > div {
+  display: flex;
+  align-items: center;
+}
+
+.ai_b_i_btnArea > div > span {
+  margin-left: 5px;
+  cursor: pointer;
+}
+
+.ai_b_i_btnArea > .clear + .clear {
+  margin-left: 10px;
+}
+
+.ai_b_i_btnArea > .clear {
+  box-sizing: border-box;
+  padding: 5px 10px;
+  box-sizing: border-box;
+  cursor: pointer;
+  border: solid 1px #3781fb;
+  border-radius: 15px;
+  display: flex;
+  font-size: 15px;
+  align-items: center;
+  justify-content: center;
+  background-color: #fff;
+}
+
+.ai_b_i_btnArea > .clear > svg {
+  width: 17px;
+  height: 17px;
+  margin-right: 5px;
+  fill: black;
+}
+
+.ai_b_i_btnArea > .clear:hover {
+  background-color: #ebf4fe;
+  color: #409eff;
+}
+
+.ai_b_i_btnArea > .clear:hover > svg {
+  fill: #409eff;
+}
+
+.ai_b_i_textListBox {
+  width: 100%;
+  height: 300px;
+  background-color: #fff;
+  position: absolute;
+  bottom: calc(100% + 5px);
+  box-sizing: border-box;
+  padding: 10px;
+  overflow: auto;
+  border-radius: 8px;
+  border: 1px solid #e7e7e7;
+  box-shadow: 0 4px 10px 0 rgba(29, 57, 131, 0.08),
+    1px 1px 20px 4px rgba(29, 57, 131, 0.05);
+  display: flex;
+}
+
+.ai_b_i_tlb_left {
+  width: 60px;
+  height: 100%;
+  background-color: red;
+}
+
+.ai_b_i_tlb_right {
+  flex: 1;
+  height: 100%;
+  background-color: yellow;
+}
+
+.ai_b_i_roleListBox {
+  width: 100%;
+  height: 300px;
+  background-color: #fff;
+  position: absolute;
+  bottom: calc(100% + 5px);
+  box-sizing: border-box;
+  padding: 10px;
+  overflow: auto;
+  border-radius: 8px;
+  border: 1px solid #e7e7e7;
+  box-shadow: 0 4px 10px 0 rgba(29, 57, 131, 0.08),
+    1px 1px 20px 4px rgba(29, 57, 131, 0.05);
+}
+
+.ai_b_i_rlb_item {
+  width: calc(100% - 20px);
+  height: auto;
+  padding: 10px;
+  background-color: #f3f7fd;
+  margin-bottom: 20px;
+  border-radius: 8px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  transition: 0.3s;
+  cursor: pointer;
+}
+
+.ai_b_i_rlb_itemActive {
+  background-color: #d1d5db !important;
+}
+
+/* .ai_b_i_rlb_item:hover{
+	background-color: #d1d5db;
+} */
+
+.ai_b_i_rlb_itemTop {
+  display: flex;
+}
+
+.ai_b_i_rlb_itemTop > img {
+  width: 40px;
+  height: 40px;
+  margin-right: 10px;
+  border-radius: 100%;
+  overflow: hidden;
+}
+
+.ai_b_i_rlb_itemTop > div {
+  display: flex;
+  flex-direction: column;
+}
+
+.ai_b_i_rlb_itemTop > div > span {
+  font-size: 16px;
+  font-weight: bold;
+}
+
+.ai_b_i_rlb_itemTop > div > span:last-child {
+  font-size: 14px;
+  color: #999;
+}
+
+.ai_b_i_rlb_itemBottom {
+  margin-top: 10px;
+  display: flex;
+}
+
+.ai_b_i_rlb_itemBottom > span {
+  width: 60px;
+  height: 30px;
+  border-radius: 15px;
+  display: flex;
+}
+
+.ai_body_input_textarea {
+  flex: 1;
+  margin: 10px 5px 10px 5px;
+  min-height: 35px;
+  height: 35px;
+  max-height: 100px;
+  border: none;
+  outline: none;
+  resize: none;
+  font-size: 16px;
+  overflow: auto;
+  padding-right: 100px;
+  background-color: #fff !important;
+}
+
+.ai_body_input_textarea::-webkit-input-placeholder {
+  font-size: 16px;
+  /* 修改placeholder字体大小 */
+  color: grey;
+  /* 修改placeholder文字颜色 */
+}
+
+.ai_body_input_textarea::-moz-placeholder {
+  font-size: 16px;
+  /* 修改placeholder字体大小 */
+  color: grey;
+  /* 修改placeholder文字颜色 */
+  opacity: 1;
+  /* 修复Firefox的透明度问题 */
+}
+
+.ai_body_input_textarea::-moz-placeholder {
+  font-size: 16px;
+  /* 修改placeholder字体大小 */
+  color: grey;
+  /* 修改placeholder文字颜色 */
+  opacity: 1;
+  /* 修复Firefox的透明度问题 */
+}
+
+.ai_body_input_textarea::-ms-input-placeholder {
+  font-size: 16px;
+  /* 修改placeholder字体大小 */
+  color: grey;
+  /* 修改placeholder文字颜色 */
+}
+
+.ai_body_input_textarea::-webkit-scrollbar {
+  width: 6px;
+}
+
+.ai_body_input_textarea::-webkit-scrollbar-track {
+  background: #d8d9dc;
+  border-radius: 2px;
+}
+
+.ai_body_input_textarea::-webkit-scrollbar-thumb {
+  background: #c9c9c9;
+  border-radius: 10px;
+}
+
+.ai_body_input_textarea::-webkit-scrollbar-thumb:hover {
+  background: #c9c9c9;
+}
+
+.c_pub_button_confirm {
+  /* position: absolute;
+    bottom: 13px;
+    right: 13px; */
+  /* margin-top: 10px; */
+  width: 60px;
+  margin-right: 5px;
+  display: flex;
+  justify-content: center;
+  margin-bottom: 10px;
+  position: absolute;
+  right: 10px;
+  bottom: 0px;
+  white-space: nowrap;
+  border-radius: 10px;
+}
+.c_pub_button_confirmVoice {
+  width: 30px;
+  height: 36px;
+  min-width: auto;
+  margin-right: 5px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 10px;
+  position: absolute;
+  right: 10px;
+  bottom: 0px;
+  white-space: nowrap;
+  border-radius: 10px;
+  background-color: #3681fc;
+  cursor: pointer;
+  padding: 0 10px;
+}
+.c_pub_button_confirmVoice > svg {
+  fill: #fff;
+  width: 25px;
+  height: 25px;
+}
+
+.c_pub_button_StopConfirmVoice {
+  width: 30px;
+  height: 36px;
+  min-width: auto;
+  margin-right: 5px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 10px;
+  position: absolute;
+  right: 10px;
+  bottom: 0px;
+  white-space: nowrap;
+  border-radius: 10px;
+  background-color: #dde2e2;
+  cursor: pointer;
+  padding: 0 10px;
+}
+
+.c_pub_button_StopConfirmVoice > svg {
+  width: 25px;
+  height: 25px;
+}
+
+.c_voiceBtn {
+  width: 25px;
+  height: 25px;
+  position: absolute;
+  right: 85px;
+  bottom: 0px;
+  margin-bottom: 17px;
+  cursor: pointer;
+}
+
+.c_voiceBtn > svg {
+  width: 100%;
+  height: 100%;
+}
+
+.c_pub_button_confirmDisabled {
+  background-color: #aeccfe;
+}
+
+.ai_body_dialog {
+  padding: 10px 0;
+  box-sizing: border-box;
+  /* min-height: calc(20vh - 10px); */
+  /* height: calc(100%); */
+  overflow: auto;
+  margin-bottom: 10px;
+}
+
+.dialog_content {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+}
+
+.dialog_content > div {
+  display: flex;
+  align-items: flex-start;
+  width: 100%;
+}
+
+.dialog_content + .dialog_content {
+  margin: 15px 0;
+}
+
+.dialog_content > div .right {
+  flex-direction: row-reverse;
+}
+
+.dialog_content > div .right .role {
+  margin-right: 0;
+  margin-left: 10px;
+}
+
+.dialog_content > div .role {
+  min-width: 30px;
+  width: 30px;
+  height: 30px;
+  margin-right: 10px;
+  border-radius: 50%;
+}
+
+.dialog_content > div .role > img {
+  height: 100%;
+  width: 100%;
+  border-radius: 100%;
+}
+
+.dialog_content > div .content {
+  padding: 10px 10px;
+  border-radius: 2px 8px 8px 8px;
+  width: auto;
+  word-break: break-word;
+  box-sizing: border-box;
+  /* white-space: pre-line; */
+  max-width: calc(100% - 85px);
+  background: #f6f9ff;
+  /* overflow: hidden; */
+  margin: 0 10px;
+  position: relative;
+}
+
+.createTime {
+  width: 100%;
+  height: 20px;
+  position: absolute;
+  bottom: -25px;
+  left: 0;
+  font-size: 14px;
+  white-space: nowrap;
+  color: #919191;
+}
+
+.dialog_content > div .content2 {
+  background: #3681fc;
+  color: #fff;
+  border-radius: 8px 2px 8px 8px;
+  margin-left: auto;
+}
+
+.ai_body_select {
+  position: relative;
+}
+
+.ai_body_select > .check {
+  background: #e7e7e7;
+  display: flex;
+  width: fit-content;
+  padding: 0 10px;
+  height: 30px;
+  border-radius: 21px;
+  font-size: 14px;
+  align-items: center;
+  justify-content: center;
+  color: #0061ff;
+  font-weight: 700;
+  margin: 10px 0;
+  cursor: pointer;
+}
+
+.ai_body_select > .check::before {
+  content: "";
+  width: 15px;
+  height: 15px;
+  display: block;
+  background-image: url("../../../../assets/icon/course/aiPart.png");
+  background-size: 100% 100%;
+  margin-right: 5px;
+}
+
+.ai_body_select > .check::after {
+  content: "";
+  width: 15px;
+  height: 15px;
+  display: block;
+  background-image: url("../../../../assets/icon/course/aiPart_arrow.png");
+  background-size: 100% 100%;
+  margin-right: 5px;
+}
+
+.ai_body_select > .isCheck {
+  background: #0061ff;
+  display: flex;
+  width: fit-content;
+  padding: 0 10px;
+  height: 30px;
+  border-radius: 21px;
+  font-size: 14px;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+  font-weight: 700;
+  margin: 10px 0;
+  cursor: pointer;
+  max-width: 100%;
+  box-sizing: border-box;
+}
+
+.ai_body_select > .isCheck > span {
+  width: calc(100% - 40px);
+  display: block;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.ai_body_select > .isCheck::before {
+  content: "";
+  width: 15px;
+  height: 15px;
+  display: block;
+  background-image: url("../../../../assets/icon/course/aiPart_active.png");
+  background-size: 100% 100%;
+  margin-right: 5px;
+}
+
+.ai_body_select > .isCheck::after {
+  content: "";
+  width: 15px;
+  height: 15px;
+  display: block;
+  background-image: url("../../../../assets/icon/course/aiPart_arrow_active.png");
+  background-size: 100% 100%;
+  margin-right: 5px;
+}
+
+.ai_body_select > .checkBox {
+  position: absolute;
+  bottom: 40px;
+  border: 1px solid #e0eafb;
+  width: 100%;
+  height: 300px;
+  background: #fff;
+  border-radius: 5px;
+  padding: 10px;
+  box-sizing: border-box;
+}
+
+.ai_body_select > .checkBox > .task > .title,
+.ai_body_select > .checkBox > .part > .title {
+  font-size: 14px;
+  font-weight: 700;
+  margin-bottom: 5px;
+}
+
+.ai_body_select > .checkBox > .task {
+  height: calc(100% - 60px);
+}
+
+.ai_body_select > .checkBox > .part {
+}
+
+.ai_body_select > .checkBox > .task > .content {
+  height: calc(100% - 40px);
+  overflow: auto;
+}
+
+.ai_body_select > .checkBox > .task > .content > .span + .span {
+  margin-top: 5px;
+}
+
+.ai_body_select > .checkBox > .task > .content > .span {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  cursor: pointer;
+}
+
+.ai_body_select > .checkBox > .task > .content > .span > .check {
+  width: 13px;
+  height: 13px;
+  display: flex;
+  align-items: center;
+  margin-right: 5px;
+}
+
+.ai_body_select > .checkBox > .task > .content > .span > .check > img {
+  width: 100%;
+  height: 100%;
+}
+
+.ai_body_select > .checkBox > .part > .content {
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  justify-content: space-between;
+}
+
+.ai_body_select > .checkBox > .part > .content > .span {
+  padding: 3px 6px;
+  border: 1px solid #e0eafb;
+  border-radius: 40px;
+  cursor: pointer;
+}
+
+.ai_body_select > .checkBox > .part > .content > .span.active {
+  color: #0061ff;
+  border-color: #0061ff;
+}
+
+.ai_b_i_jListPanel {
+  width: 400px;
+  height: 100%;
+  top: 0;
+  right: 0;
+  position: fixed;
+  /* background-color: #000; */
+  z-index: 990;
+}
+
+.ai_b_i_jListBox {
+  width: 100%;
+  max-height: 300px;
+  background-color: #fff;
+  position: absolute;
+  bottom: calc(100% + 5px);
+  box-sizing: border-box;
+  padding: 10px;
+  overflow: auto;
+  border-radius: 8px;
+  border: 1px solid #e7e7e7;
+  box-shadow: 0 4px 10px 0 rgba(29, 57, 131, 0.08),
+    1px 1px 20px 4px rgba(29, 57, 131, 0.05);
+  z-index: 999;
+}
+
+.jlist_box {
+  background: #f1f1f1;
+  border-radius: 5px;
+  margin-bottom: 10px;
+  padding: 8px 18px 8px 8px;
+  box-sizing: border-box;
+  width: 100%;
+  position: relative;
+}
+
+.jlist_box .cancel {
+  position: absolute;
+  top: 8px;
+  right: 5px;
+  cursor: pointer;
+  font-size: 14px;
+}
+
+.jlist_box > span {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 3;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  word-break: break-all;
+}
+
+.ai_btn_box {
+  min-width: fit-content;
+  margin-top: auto;
+}
+
+.ai_btn_box > img {
+  cursor: pointer;
+  width: 15px;
+}
+</style>

+ 260 - 0
src/components/pages/test/check/check.vue

@@ -0,0 +1,260 @@
+<template>
+  <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
+    <div class="pb_content_body" style="position: relative; margin: 0">
+      <div class="right">
+        <div class="courseTop">
+          <div class="stepsNav">
+            <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item
+                :to="{
+                  path:
+                    '/test?userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+                >表单管理</el-breadcrumb-item
+              >
+              <el-breadcrumb-item
+                v-if="type == 3"
+                :to="{
+                  path:
+                    '/checkToTest2?uid=' +
+                    userid2 +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+              >
+                查看表单
+              </el-breadcrumb-item>
+              <el-breadcrumb-item
+                v-else
+                :to="{
+                  path:
+                    '/checkToTest?cid=' +
+                    cid +
+                    '&userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+              >
+                查看表单
+              </el-breadcrumb-item>
+              <el-breadcrumb-item>
+                <span style="color: rgb(15, 126, 255)">{{ name }}</span>
+              </el-breadcrumb-item>
+            </el-breadcrumb>
+          </div>
+          <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
+        </div>
+        <div class="step_box">
+          <div class="edit_top">
+            <div class="op_btn">
+              <el-button type="primary" size="small" @click="publish">确定批改</el-button>
+            </div>
+          </div>
+          <topicVue :cJson="cJson" :title="title" :brief="brief" :checktype="2" :see="see" :isTeacher="1" :name="name" ref="topicVue"></topicVue>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import topicVue from "../../testStudent/view/component/topic.vue";
+export default {
+  components: {
+    topicVue,
+  },
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      userid2: this.$route.query.userid2,
+      tid: this.$route.query.tid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      cid: this.$route.query.cid,
+      type: this.$route.query.type,
+      steps: 1,
+      title: "",
+      brief: "",
+      id:"",
+      testType: [],
+      see: true,
+      cJson: [],
+      loading: false,
+      look: "",
+      name: "",
+    };
+  },
+  methods: {
+    retrunCourse() {
+      if(this.type == 3){
+        this.goTo(
+        "/checkToTest2?uid=" +
+          this.userid2 +
+          "&userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+      }else{
+        this.goTo(
+        "/checkToTest?cid=" +
+          this.cid +
+          "&userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+      }
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+
+    getData() {
+      this.loading = true;
+      let params = {
+        cid: this.cid,
+        tid: this.tid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorks2", params)
+        .then((res) => {
+          // this.cJson = JSON.parse(res.data[0][0].chapters);
+          this.$forceUpdate();
+          this.title = res.data[0][0].title;
+          this.brief = res.data[0][0].brief;
+
+          this.testType = [];
+          for (var i = 0; i < res.data[1].length; i++) {
+            this.testType.push(res.data[1][i].typeid);
+          }
+          console.log(this.testType);
+          this.look = res.data[0][0].look;
+
+          this.id = res.data[2][0].id
+          this.cJson = JSON.parse(res.data[2][0].courseJson);
+          this.name = res.data[2][0].username;
+          this.loading = false;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    publish() {
+      let cjson = this.$refs['topicVue'].checkArray
+      let params = [
+        {
+          id: this.id,
+          cjson: JSON.stringify(cjson),
+          type: "3",
+          uid:this.userid
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addTestWorksTeacher", params)
+        .then((res) => {
+          this.$message.success("批改成功");
+          this.retrunCourse();
+        })
+        .catch((err) => {
+          this.$message.error("网络不佳");
+          console.error(err);
+        });
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
+
+<style scoped>
+.pb_content {
+  height: 100% !important;
+  /* margin: 0 20px 0 20px; */
+}
+
+.pb_content_body {
+  width: 100% !important;
+  height: 100%;
+}
+
+.right {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  overflow: hidden;
+  flex-direction: column;
+}
+
+.basic_box {
+  margin: 0 auto;
+  position: relative;
+  padding: 0 20px 0 20px;
+}
+
+.courseTop {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.stepsNav {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+}
+
+.step_box {
+  width: calc(100%);
+  margin: 0 auto;
+  height: calc(100% - 38px);
+}
+
+.edit_top {
+  height: 50px;
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  position: relative;
+  padding: 0 30px;
+  border-top: 2px solid #eee;
+  border-bottom: 2px solid #eee;
+  width: 95%;
+  margin: 0 auto;
+  box-sizing: border-box;
+}
+</style>

+ 1555 - 0
src/components/pages/test/check/docxTemplateDialog.vue

@@ -0,0 +1,1555 @@
+<template>
+  <el-dialog
+    :visible.sync="show"
+    :append-to-body="true"
+    :title="dialogTitle"
+    width="60%"
+    top="10vh"
+    :fullscreen="true"
+    :before-close="handleClose"
+    class="dialog_diy"
+    ref="docxTemplateDialogRef"
+  >
+    <div class="box" v-loading="loading">
+      <div
+        class="b_left"
+        v-loading="wordContentLoading"
+        ref="wordAreaRef"
+        :contenteditable="downFileData"
+      >
+        <VueOfficeDocx
+          ref="vueOfficeDocxRef"
+          v-if="downFileData && !downFileData.txtUrl"
+          :src="downFileData ? downFileData.url : ''"
+        />
+
+        <txtHtmlView
+          ref="txtHtmlViewRef"
+          v-if="downFileData && downFileData.txtUrl"
+          :url="downFileData.txtUrl"
+          @getTxtContent="getTxtContent"
+        />
+
+        <div class="cover_box" v-if="!downFileData">
+          <el-button type="primary" @click.stop="uploadWord"
+            >上传文档</el-button
+          >
+        </div>
+      </div>
+      <div class="b_right">
+        <div class="d_box">
+          <!-- <div class="d_b_step">
+            <h2>第一步:下载模板文档</h2>
+            <p>点击下载模板文档来下载指定文档</p>
+            <el-button
+              class="d_b_s_button"
+              type="primary"
+              :disabled="!downFileData"
+              @click="downloadTemplateDocx()"
+              >下载模板文档</el-button
+            >
+          </div> -->
+
+          <div class="d_b_step">
+            <h2>第一步:填入模板变量</h2>
+            <p>按需制作排版Word模板文档,目前支持docx格式</p>
+            <p>
+              在文件中指定位置输入下方的"字段变量",用于显示真实数据的准确位置
+            </p>
+
+            <h3>文本:</h3>
+            <img
+              src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_202410090922471728436994846.png"
+            />
+
+            <h3>选择题:</h3>
+            <div class="d_b_s_imgList">
+              <img
+                src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/41728546186962.png"
+              />
+              <img
+                src="https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/51728546189479.png"
+              />
+            </div>
+            <div class="foldMenu">
+              <span v-if="foldField" @click="foldField = false"
+                >折叠字段变量</span
+              >
+              <span v-if="!foldField" @click="foldField = true"
+                >显示字段变量</span
+              >
+            </div>
+            <div
+              v-for="(item, index) in fieldList"
+              :key="index"
+              class="d_b_s_fieldListItem"
+              v-if="foldField"
+            >
+              <span
+                >{{ item.name }}:{{
+                  "{" + (item.type == "image" ? "%" : "") + item.field + "}"
+                }}</span
+              >
+              <span
+                @click="
+                  copyContent(
+                    `{${item.type == 'image' ? '%' : ''}${item.field}}`
+                  )
+                "
+              >
+                <svg
+                  width="14"
+                  height="14"
+                  viewBox="0 0 14 14"
+                  xmlns="http://www.w3.org/2000/svg"
+                >
+                  <path
+                    fill-rule="evenodd"
+                    clip-rule="evenodd"
+                    d="M1.85645 2.28599C1.85645 2.0493 2.04832 1.85742 2.28502 1.85742H8.71359C8.95028 1.85742 9.14216 2.0493 9.14216 2.28599C9.14216 2.52269 8.95028 2.71456 8.71359 2.71456H2.71359V8.71456C2.71359 8.95126 2.52171 9.14314 2.28502 9.14314C2.04832 9.14314 1.85645 8.95126 1.85645 8.71456V2.28599Z"
+                  />
+                  <path
+                    fill-rule="evenodd"
+                    clip-rule="evenodd"
+                    d="M4.42871 4.85631C4.42871 4.61961 4.62059 4.42773 4.85728 4.42773H11.7144C11.9511 4.42773 12.143 4.61961 12.143 4.85631V11.7134C12.143 11.9501 11.9511 12.142 11.7144 12.142H4.85728C4.62059 12.142 4.42871 11.9501 4.42871 11.7134V4.85631ZM5.28585 5.28488V11.2849H11.2859V5.28488H5.28585Z"
+                  />
+                </svg>
+              </span>
+            </div>
+          </div>
+
+          <!-- <div class="d_b_step">
+            <h2>第三步:上传填入后的模板文档</h2>
+            <div v-if="uploadTemplateDocxData" class="d_b_s_fileCard">
+              <svg
+                t="1728376433028"
+                class="icon"
+                viewBox="0 0 1024 1024"
+                version="1.1"
+                xmlns="http://www.w3.org/2000/svg"
+                p-id="5172"
+                width="200"
+                height="200"
+              >
+                <path
+                  d="M815.5 160v704c0 17.7-14.3 32-32 32h-543c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h543c17.7 0 32 14.3 32 32z m0-96h-607c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h607c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64z"
+                  p-id="5173"
+                ></path>
+                <path
+                  d="M703.5 320h-384c-17.7 0-32-14.3-32-32s14.3-32 32-32h384c17.7 0 32 14.3 32 32s-14.3 32-32 32zM703.5 512h-384c-17.7 0-32-14.3-32-32s14.3-32 32-32h384c17.7 0 32 14.3 32 32s-14.3 32-32 32zM511.5 704h-192c-17.7 0-32-14.3-32-32s14.3-32 32-32h192c17.7 0 32 14.3 32 32s-14.3 32-32 32z"
+                  p-id="5174"
+                ></path>
+              </svg>
+
+              <span>{{ uploadTemplateDocxData.name }}</span>
+              <span class="d_b_s_f_c_del" @click="clearUploadTemplateDocxData()"
+                >删除</span
+              >
+            </div>
+            <el-button
+              class="d_b_s_button"
+              type="primary"
+              :disabled="uploadTemplateDocxData != null"
+              @click="uploadTemplateDocx()"
+              >上传填入后的模板文档</el-button
+            >
+          </div> -->
+
+          <div class="d_b_step">
+            <h2>第二步:点击导出</h2>
+            <p></p>
+            <el-button
+              class="d_b_s_button"
+              type="primary"
+              :disabled="!downFileData"
+              @click="exportDocx3()"
+              >导出Word文档</el-button
+            >
+          </div>
+        </div>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import PizZip from "pizzip";
+import Docxtemplater from "docxtemplater";
+import ImageModule from "docxtemplater-image-module-free";
+import { saveAs } from "file-saver";
+import topicVue from "../../testStudent/view/component/topic.vue";
+// import { renderAsync } from 'docx-preview/dist/docx-preview.js'
+import VueOfficeDocx from "@vue-office/docx";
+import "@vue-office/docx/lib/index.css";
+// import { renderAsync } from 'docx-preview/dist/docx-preview.js'
+import htmlDocx from "html-docx-js/dist/html-docx";
+import txtHtmlView from "./txtHtmlView.vue";
+import JSZip from "jszip";
+// import a from './docx-preview.js'
+const getFile = url => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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"
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name
+    };
+    s3.getObject(params, function(err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        resolve({ data: data.Body });
+        console.log(data);
+      }
+    });
+  });
+};
+
+export default {
+  props: {},
+  components: {
+    topicVue,
+    VueOfficeDocx,
+    txtHtmlView
+  },
+  data() {
+    return {
+      show: false,
+      loading: false,
+      fieldList: [
+        // { name: "第五题", field: "ti_05", type: "text", value: "第五题ti_05" },
+        // {
+        //   name: "图片1",
+        //   field: "image_01",
+        //   type: "image",
+        //   value:
+        //     "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/default%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_202410090922471728436994846.png"
+        // }
+      ],
+      useFieldList: [],
+      uploadTemplateDocxData: null, //上传的模板文档
+      downFileData: null, // 下载模板文档的url
+      checkJson: [],
+      foldField: true,
+      wordContent: "",
+      wordContentLoading: true,
+      courseId: "",
+      testJson: null
+      // fileList:[],
+    };
+  },
+  methods: {
+    handleClose(done) {
+      this.close();
+      done();
+    },
+    open(data) {
+      this.init();
+      console.log(data);
+      let _fileData = data.fileData;
+      this.downFileData = _fileData;
+      this.courseId = data.courseId;
+      this.checkJson = data.formData[0].array;
+      this.testJson = data.testJson;
+      this.fieldList = this.getFieldData(data.formData[0].array);
+      let useFieldList = [];
+      data.formData.forEach(i => {
+        let obj = {
+          name: i.name,
+          id: i.id,
+          userId: i.userid,
+          fieldList: this.getFieldData(i.array),
+          time: this.formatTime(i.time)
+        };
+        useFieldList.push(obj);
+      });
+      this.useFieldList = useFieldList;
+      this.getWordContent(this.downFileData);
+      this.show = true;
+    },
+    close() {
+      this.show = false;
+      this.init();
+    },
+    init() {
+      // 初始化
+      this.downFileData = null;
+      this.fieldList = [];
+      this.uploadTemplateDocxData = null;
+      this.foldField = true;
+      // this.fileList = [];
+    },
+
+    getFieldData(array) {
+      let _list = [];
+      let _index = 0;
+      for (let i = 0; i < array.length; i++) {
+        let _item = array[i];
+        if (_item.type == 3) {
+          //问答题
+          let _item2 = _item.json;
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "text",
+            value: _item2.answer2
+          });
+          _index++;
+        } else if (_item.type == 1) {
+          //单选题
+          let _item2 = _item.json;
+          let choseTxt = ``;
+          _item2.array.forEach((i, index2) => {
+            choseTxt += `${
+              _item2.answer2 === index2 || _item2.answer2.includes(index2)
+                ? "☑"+i.option
+                : ""
+            }`;
+          });
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "text",
+            value: choseTxt
+          });
+          _index++;
+        } else if (_item.type == 8) {
+          //日期
+          let _item2 = _item.json;
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "text",
+            value: _item2.answer2
+          });
+          _index++;
+        } else if (_item.type == 12) {
+          //扫一扫
+          let _item2 = _item.json;
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "text",
+            value: _item2.answer2
+          });
+          _index++;
+        } else if (_item.type == 7) {
+          //评分
+          let _item2 = _item.json;
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "text",
+            value: _item2.answer2
+          });
+          _index++;
+        } else if (_item.type == 5) {
+          //附件
+          let _item2 = _item.json;
+          // let _value = ``;
+          // _item2.file.forEach(f => {
+          //   if (/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i.test(f.url)) {
+          //     _value += `<img src="${f.url}" alt="${f.name}" width="100" height="100"/>
+          // 		`;
+          //   } else {
+          //     _value += `<a href="${f.url}" target="_blank">${f.name}</a>
+          // 		`;
+          //   }
+          // });
+          _list.push({
+            name: _item2.title,
+            field: `ti_${_index}`,
+            type: "file",
+            value: _item2.file
+          });
+          _index++;
+        }else if(_item.type == 13){
+          //数字
+          let _item2 = _item.json;
+          _list.push({
+            name:_item2.title,
+            field:`ti_${_index}`,
+            type:"text",
+            value:`${_item2.answer2}${_item2.type=='4'?'%':''}`
+          })
+          _index++;
+        }
+      }
+      return _list;
+    },
+    downloadTemplateDocx() {
+      const officeViewer = this.$refs.vueOfficeDocxRef;
+      // console.log(this.$refs.docxTemplateDialogRef)
+      // console.log(officeViewer)
+      const blob = new Blob([officeViewer.$el.innerHTML], {
+        type:
+          "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+      });
+      const url = URL.createObjectURL(blob);
+      const a = document.createElement("a");
+      a.href = url;
+      a.download = this.downFileData.fileName;
+      a.click();
+      this.$message.success("下载成功");
+
+      // console.log(officeViewer.$data)
+      // officeViewer.exportDocx()
+      // officeViewer.getContent().then(content => {
+      // 	console.log(content)
+      // })
+      // console.log(this.$refs.vueOfficeDocxRef.$el);
+      // const el = this.$refs.vueOfficeDocxRef.$el;
+      // const body = el.querySelector(".docx");
+      // console.log("👉",body);
+      // this.generateDocx(this.downFileData.fileName,officeViewer.$el.innerHTML)
+      return;
+      getFile(this.downFileData.url).then(data => {
+        if (data.data != 1) {
+          // 下载文件, 并存成ArrayBuffer对象
+          const file_name = this.downFileData.fileName; // 获取文件名
+          const file_data = data.data; // 获取文件数据
+          let url = window.URL.createObjectURL(new Blob([file_data]));
+          let a = document.createElement("a");
+          a.name = file_name;
+          a.href = url;
+          a.download = file_name;
+          a.click();
+          console.log(data);
+          this.$message.success("下载成功");
+        } else {
+          this.$message.error("下载失败");
+        }
+      });
+    },
+    uploadTemplateDocx() {
+      let input = document.createElement("input");
+      input.type = "file";
+      // input.accept = ".wav";
+      // input.accept = "audio/*, .txt, .pdf, .xlsx";
+      input.accept = ".docx";
+      input.click();
+      input.onchange = () => {
+        this.loading = true;
+        let file = input.files[0];
+        if (!/\.(docx)$/i.test(file.name)) {
+          this.loading = false;
+          return this.$message.error("请上传.docx格式的文件");
+        }
+        console.log(file);
+        this.uploadTemplateDocxData = file;
+        this.loading = false;
+        // this.uploadWavFileAndGetText(file);
+      };
+    },
+    async exportDocx3() {
+      if (!this.downFileData) return this.$message.error("请先上传模板文档");
+      const el = this.$refs.vueOfficeDocxRef
+        ? this.$refs.vueOfficeDocxRef.$el
+        : this.$refs.txtHtmlViewRef.$el;
+      const body = el.querySelector(".docx-wrapper");
+      const html = body.innerHTML;
+      let promiseList = [];
+      this.useFieldList.forEach((i, index) => {
+        promiseList.push(
+          this.getUseFieldListFile({
+            fileName: `${i.name}_${this.testJson.title}_${i.time}.docx`,
+            fieldList: i.fieldList,
+            html
+          })
+        );
+      });
+      Promise.all(promiseList).then(async res => {
+        let fileList = res;
+        if (fileList.length == 0) {
+          this.$message.error("无文档导出");
+        } else if (fileList.length == 1) {
+          saveAs(fileList[0], fileList[0].name);
+          this.$message.success("导出成功");
+        } else {
+          const zip = new JSZip();
+          fileList.forEach(i => {
+            zip.file(`${i.name}`, i, { binary: true });
+          });
+          zip.generateAsync({ type: "blob" }).then(content => {
+            // 生成二进制流
+            saveAs(content, `${this.testJson.title}.zip`); // 利用file-saver保存文件  自定义文件名
+          });
+          this.$message.success("导出成功");
+        }
+
+        if (
+          !this.downFileData.txtUrl ||
+          this.downFileData.txt !== el.innerHTML
+        ) {
+          let txt = el.innerHTML;
+          // 创建Blob对象
+          const blob = new Blob([txt], { type: "text/plain;charset=utf-8" });
+          blob.lastModifiedDate = new Date();
+          blob.name = `${this.downFileData.fileName}_wordHtml.txt`;
+          let url = await this.uploadFile(blob);
+          if (url && this.courseId) {
+            this.downFileData.txt = txt;
+            this.downFileData.txtUrl = url;
+            this.changeDownFileData(this.downFileData);
+            this.$forceUpdate();
+          }
+        }
+      });
+    },
+    async getUseFieldListFile({ fileName, fieldList, html }) {
+      return new Promise(async (resolve, reject) => {
+        let _html = html;
+        for (let i = 0; i < fieldList.length; i++) {
+          if (fieldList[i].type == "image") {
+            const img = await this.convertImageUrlToBase64(fieldList[i].value);
+            _html = _html.replaceAll(
+              `{%${fieldList[i].field}}`,
+              `<img src="${img.url}" width="${img.width}" height="${img.height}" />`
+            );
+          } else if (fieldList[i].type == "text") {
+            _html = _html.replaceAll(
+              `{${fieldList[i].field}}`,
+              fieldList[i].value
+            );
+          } else if (fieldList[i].type == "file") {
+            let _text = ``;
+            // this.fieldList[i].value.forEach(async f => {
+            for (let j = 0; j < fieldList[i].value.length; j++) {
+              let f = fieldList[i].value[j];
+              if (/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i.test(f.url)) {
+                // const img = await this.convertImageUrlToBase64(f.url);
+                // _text += `<img src="${f.url}" width="${100}" height="100" style="object-fit:contain"/><br/>`;
+                let _imageWidthAndHeight = await this.getImageWidthAndHeight(f.url);
+                let _setWidth = 100;
+                let _setHeight = (_imageWidthAndHeight.height / _imageWidthAndHeight.width) * _setWidth; // 根据比例计算高度
+                _text += `<img src="${f.url}" width="${_setWidth}" height="${_setHeight}" style="object-fit:contain"/><br/>`;
+                console.log(_text)
+              } else {
+                _text += `<a href="${f.url}" target="_blank">${f.name}</a><br/>`;
+              }
+            }
+            _html = _html.replaceAll(`{${fieldList[i].field}}`, _text);
+            // });
+          }
+        }
+
+        let blob = await this.getGenerateDocxHtml(_html);
+        const file = new File([blob], fileName, {
+          type: ".docx",
+          lastModified: new Date().getTime()
+        });
+        // this.fileList.push(file)
+        resolve(file);
+      });
+    },
+    async exportDocx2() {
+      const el = this.$refs.vueOfficeDocxRef
+        ? this.$refs.vueOfficeDocxRef.$el
+        : this.$refs.txtHtmlViewRef.$el;
+      console.log(el);
+      const body = el.querySelector(".docx-wrapper");
+
+      let _html = body.innerHTML;
+
+      for (let i = 0; i < this.fieldList.length; i++) {
+        if (this.fieldList[i].type == "image") {
+          const img = await this.convertImageUrlToBase64(
+            this.fieldList[i].value
+          );
+          _html = _html.replaceAll(
+            `{%${this.fieldList[i].field}}`,
+            `<img src="${img.url}" width="${img.width}" height="${img.height}" />`
+          );
+        } else if (this.fieldList[i].type == "text") {
+          _html = _html.replaceAll(
+            `{${this.fieldList[i].field}}`,
+            this.fieldList[i].value
+          );
+        } else if (this.fieldList[i].type == "file") {
+          let _text = ``;
+          console.log(this.fieldList[i].value);
+          // this.fieldList[i].value.forEach(async f=>{
+          // for (let j = 0; j < this.fieldList[i].value.length; j++) {
+          //   let f = this.fieldList[i].value[j];
+          // 	console.log("👉f",f)
+          //   if (/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i.test(f.url)) {
+          //     const img = await this.convertImageUrlToBase64(f.url);
+          //     _text += `<img src="${img.url}" width="${img.width}" height="${img.height}" />\n`;
+          //   } else {
+          //     _text += `<a href="${f.url}" target="_blank">${f.name}</a>\n`;
+          //   }
+          // }
+          // _html = _html.replaceAll(`{${this.fieldList[i].field}}`, _text);
+          // })
+        }
+      }
+      return;
+      // this.fieldList.forEach(i => {
+      // _html = _html.replace(`{${i.field}}`,i.value)
+      // })
+      // 下载word文档
+      await this.generateDocx(this.downFileData.fileName, _html);
+
+      if (!this.downFileData.txtUrl || this.downFileData.txt !== el.innerHTML) {
+        let txt = el.innerHTML;
+        // 创建Blob对象
+        const blob = new Blob([txt], { type: "text/plain;charset=utf-8" });
+        blob.lastModifiedDate = new Date();
+        blob.name = `${this.downFileData.fileName}_wordHtml.txt`;
+        let url = await this.uploadFile(blob);
+
+        if (url && this.courseId) {
+          console.log("修改文件");
+          console.log(url);
+          console.log(this.courseId);
+          this.downFileData.txt = txt;
+          this.downFileData.txtUrl = url;
+          this.changeDownFileData(this.downFileData);
+          this.$forceUpdate();
+        }
+      }
+      // const uploadBlob = await this.getGenerateDocxHtml(body.out)
+
+      // let reader = new FileReader();
+      // reader.readAsArrayBuffer(uploadBlob);
+      // reader.onload = async e => {
+      // 	try {
+      // 		const binary = new Uint8Array(reader.result);
+      // 		//创建一个PizZip实例
+      // 		const zip = new PizZip(binary);
+      // 		// 将模板内容加载到 Docxtemplater 中
+      // 		const doc = new Docxtemplater().loadZip(zip);
+      // 		const output = doc.getZip().generate({
+      //       type: "blob",
+      //       mimeType:
+      //         "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+      //       compression: "DEFLATE"
+      //     });
+
+      // 		const file = new File([output],this.downFileData.fileName,{type:".docx",lastModified:new Date().getTime()})
+
+      // 		const url = await this.uploadFile(file)
+      // 		console.log(url)
+
+      // 	}catch(e){
+      // 		console.log(e)
+      // 	}
+      // }
+      // const file = new File([uploadBlob],this.downFileData.fileName,{type:".docx",lastModified:new Date().getTime()})
+
+      // const url = await this.uploadFile(file)
+      // console.log(url)
+      // if(url){
+
+      // }else{
+
+      // }
+      return;
+      // const blob = await this.getGenerateDocxHtml(body.innerHTML);
+      // if (!blob) return this.$message.error("导出失败");
+
+      // let reader = new FileReader();
+      // reader.readAsArrayBuffer(blob);
+      // reader.onload = async e => {
+      //   try {
+      //     this.loading = true;
+      //     const binary = new Uint8Array(reader.result);
+      //     //创建一个PizZip实例
+      //     const zip = new PizZip(binary);
+      //     // 将模板内容加载到 Docxtemplater 中
+      //     const doc = new Docxtemplater().loadZip(zip);
+
+      //     let _data = {};
+      //     let _image = {};
+      //     // 设置模板值
+      //     // this.fieldList.forEach(i => {
+      //     //   _data[i.field] = i.value;
+      //     // });
+      //     for (let i = 0; i < this.fieldList.length; i++) {
+      //       // console.log(this.fieldList[i])
+      //       if (this.fieldList[i].type == "text") {
+      //         //文本处理
+      //         _data[this.fieldList[i].field] = this.fieldList[i].value;
+      //       } else if (this.fieldList[i].type == "image") {
+      //         //图片处理
+      //         let _imageObj = await this.convertImageUrlToBase64(
+      //           this.fieldList[i].value
+      //         );
+      //         _data[this.fieldList[i].field] = _imageObj.url;
+      //         _image[this.fieldList[i].field] = {
+      //           width: _imageObj.width,
+      //           height: _imageObj.height
+      //         };
+      //       }
+      //     }
+      //     // return this.loading = false;
+
+      //     // 图片处理
+      //     const opts = {
+      //       centered: false,
+      //       fileType: "docx",
+      //       getImage: (value, value2, value3) => {
+      //         return this.base64DataURLToArrayBuffer(value);
+      //       },
+      //       getSize: (arrayValue, value, tagName) => {
+      //         // console.log(_image)
+      //         // console.log(tagName)
+      //         let newWidth = _image[tagName].width;
+      //         let newHeight = _image[tagName].height;
+
+      //         // let newWidth = 550;
+      //         // let newHeight = 100;
+      //         return [newWidth, newHeight];
+      //       }
+      //     };
+      // 		console.log()
+      //     doc.attachModule(new ImageModule(opts));
+      //     //渲染模板
+      //     doc.setData(_data);
+      //     doc.render();
+      //     //获取渲染后的文本
+      //     const output = doc.getZip().generate({
+      //       type: "blob",
+      //       mimeType:
+      //         "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+      //       compression: "DEFLATE"
+      //     });
+
+      //     saveAs(output, `${this.downFileData.fileName}`);
+      //     // let link = document.createElement("a");
+      //     // link.download = this.uploadTemplateDocxData.name;
+      //     // link.style.display = "none";
+      //     // let blob = new Blob([output]);
+      //     // link.href = URL.createObjectURL(blob);
+      //     // document.body.appendChild(link);
+      //     // link.click();
+      //     // document.body.removeChild(link);
+      //     this.loading = false;
+      //     this.$message.success("导出成功");
+      //   } catch (error) {
+      //     console.log(error);
+      //     this.loading = false;
+      //     return this.$message.error("导出失败");
+      //   }
+      // };
+    },
+    async exportDocx() {
+      console.log(this.useFieldList);
+      if (!this.uploadTemplateDocxData)
+        return this.$message.error("请先上传模板文档");
+      let reader = new FileReader();
+      reader.readAsArrayBuffer(this.uploadTemplateDocxData);
+      reader.onload = async e => {
+        try {
+          this.loading = true;
+          const binary = new Uint8Array(reader.result);
+          //创建一个PizZip实例
+          const zip = new PizZip(binary);
+          // 将模板内容加载到 Docxtemplater 中
+          const doc = new Docxtemplater().loadZip(zip);
+
+          let _data = {};
+          let _image = {};
+          // 设置模板值
+          // this.fieldList.forEach(i => {
+          //   _data[i.field] = i.value;
+          // });
+          for (let i = 0; i < this.fieldList.length; i++) {
+            // console.log(this.fieldList[i])
+            if (this.fieldList[i].type == "text") {
+              //文本处理
+              _data[this.fieldList[i].field] = this.fieldList[i].value;
+            } else if (this.fieldList[i].type == "image") {
+              //图片处理
+              let _imageObj = await this.convertImageUrlToBase64(
+                this.fieldList[i].value
+              );
+              _data[this.fieldList[i].field] = _imageObj.url;
+              _image[this.fieldList[i].field] = {
+                width: _imageObj.width,
+                height: _imageObj.height
+              };
+            }
+          }
+          // return this.loading = false;
+
+          // 图片处理
+          const opts = {
+            centered: false,
+            fileType: "docx",
+            getImage: (value, value2, value3) => {
+              return this.base64DataURLToArrayBuffer(value);
+            },
+            getSize: (arrayValue, value, tagName) => {
+              // console.log(_image)
+              // console.log(tagName)
+              let newWidth = _image[tagName].width;
+              let newHeight = _image[tagName].height;
+
+              // let newWidth = 550;
+              // let newHeight = 100;
+              return [newWidth, newHeight];
+            }
+          };
+          doc.attachModule(new ImageModule(opts));
+          //渲染模板
+          doc.setData(_data);
+          doc.render();
+          //获取渲染后的文本
+          const output = doc.getZip().generate({
+            type: "blob",
+            mimeType:
+              "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+            compression: "DEFLATE"
+          });
+
+          saveAs(output, `${this.uploadTemplateDocxData.name}`);
+          // let link = document.createElement("a");
+          // link.download = this.uploadTemplateDocxData.name;
+          // link.style.display = "none";
+          // let blob = new Blob([output]);
+          // link.href = URL.createObjectURL(blob);
+          // document.body.appendChild(link);
+          // link.click();
+          // document.body.removeChild(link);
+          this.loading = false;
+          this.$message.success("导出成功");
+        } catch (error) {
+          console.log(error);
+          this.loading = false;
+          return this.$message.error("导出失败");
+        }
+      };
+    },
+    clearUploadTemplateDocxData() {
+      this.uploadTemplateDocxData = null;
+    },
+    copyContent(content) {
+      const input = document.createElement("input");
+      // 设置 display为none会导致无法复制
+      // input.style.display = "none";
+      // 所以只能用其他方法隐藏
+      input.style.opacity = 0;
+      // 为了不影响布局
+      input.style.position = "fixed";
+      input.style.left = "-100%";
+      input.style.top = "-100%";
+      input.value = content;
+      document.body.appendChild(input);
+      input.select();
+      const success = document.execCommand("copy");
+      document.body.removeChild(input);
+      if (!success) {
+        return this.$message.error("复制失败");
+      } else {
+        return this.$message.success("复制成功");
+      }
+    },
+    convertImageUrlToBase64(imageUrl) {
+      return new Promise((resolve, reject) => {
+        const img = new Image();
+        img.crossOrigin = "Anonymous"; // 允许跨域请求
+        img.src = imageUrl;
+
+        img.onload = () => {
+          const canvas = document.createElement("canvas");
+          canvas.width = img.width;
+          canvas.height = img.height;
+          const ctx = canvas.getContext("2d");
+          ctx.drawImage(img, 0, 0);
+          const base64 = canvas.toDataURL("image/png");
+          resolve({ url: base64, width: img.width, height: img.height });
+        };
+
+        img.onerror = error => {
+          console.log("图片转base64失败");
+          console.log(error);
+          resolve({ url: "", width: 0, height: 0 });
+        };
+      });
+    },
+    getImageWidthAndHeight(imageUrl){
+      return new Promise((resolve)=>{
+        let _img = new Image();
+        _img.src = imageUrl;
+        _img.onload = () =>{
+          resolve({width:_img.width,height:_img.height})
+        }
+      })
+    },
+    base64DataURLToArrayBuffer(dataURL) {
+      const base64Regex = /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
+      if (!base64Regex.test(dataURL)) {
+        return false;
+      }
+      const stringBase64 = dataURL.replace(base64Regex, "");
+      let binaryString;
+      if (typeof window !== "undefined") {
+        binaryString = window.atob(stringBase64);
+      } else {
+        binaryString = new Buffer(stringBase64, "base64").toString("binary");
+      }
+      const len = binaryString.length;
+      const bytes = new Uint8Array(len);
+      for (let i = 0; i < len; i++) {
+        const ascii = binaryString.charCodeAt(i);
+        bytes[i] = ascii;
+      }
+      return bytes.buffer;
+    },
+    async getWordContent(fileData) {
+      console.log(fileData);
+      this.wordContentLoading = true;
+      return (this.wordContentLoading = false);
+      try {
+        // console.log(a)
+        // let response = await getFile(fileData.url);
+        // if (response.data == 1) {
+        //   this.wordContentLoading = false;
+        //   return this.$message.error("文件不存在");
+        // }
+
+        // await renderAsync(response.data,this.$refs.wordAreaRef);
+        this.wordContentLoading = false;
+      } catch (error) {
+        console.log(error);
+        this.wordContentLoading = false;
+        this.$message.error("加载文件失败");
+      }
+    },
+    // 导出docx
+    async generateDocx(name, html) {
+      // 将html文件中需要用到的数据挂载到store上
+      const content = `<!DOCTYPE html>
+      <html xmlns:v='urn:schemas-microsoft-com
+      :vml'xmlns:o='urn:schemas-microsoft-com:office
+      :office'xmlns:w='urn:schemas-microsoft-com:office
+      :word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'
+      xmlns='http://www.w3.org/TR/REC-html40'
+      xmlns='http://www.w3.org/1999/xhtml'>
+      <head>
+          <meta charset="UTF-8">
+          <meta http-equiv="X-UA-Compatible" content="IE=edge">
+          <meta name="viewport" content="width=device-width, initial-scale=1.0">
+          <title>${name}</title>
+          <style>
+						*{
+							font-family: '宋体';
+							margin:0;
+							padding:0;
+							line-height:1;
+						}
+            table {
+              border-collapse: collapse; /* 折叠边框 */
+              width: 100%;
+							font-size:10.5pt;
+            }
+            th, td {
+              border: 1px solid black; /* 线条样式 */
+              padding: 8px;
+              text-align: left;
+							font-size:10.5pt;
+            }
+						ol,ul{
+							margin:0;
+							padding:0;
+							margin-right:-1in;
+						}
+						li{
+							margin-bottom:0.1in
+							margin-right:-1in;
+						}
+						p{
+							line-height:1;
+							margin:0;
+							padding:0
+						}
+						.vue-office-docx{height:100%;overflow-y:auto}
+						.vue-office-docx .docx-wrapper>section.docx{margin-bottom:5px}
+						@media screen and (max-width: 800px){
+							.vue-office-docx .docx-wrapper{padding:10px}
+							.vue-office-docx .docx-wrapper>section.docx{padding:10px!important;width:100%!important}
+						}
+
+.docx-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; }
+.docx-wrapper>section.docx { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
+.docx { color: black; hyphens: auto; text-underline-position: from-font; }
+section.docx { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
+section.docx>article { margin-bottom: auto; z-index: 1; }
+section.docx>footer { z-index: 1; }
+.docx table { border-collapse: collapse; }
+.docx table td, .docx table th { vertical-align: top; }
+.docx p { margin: 0pt; min-height: 1em; }
+.docx span { white-space: pre-wrap; overflow-wrap: break-word; }
+.docx a { color: inherit; text-decoration: inherit; }
+.docx svg { fill: transparent; }
+.docx {
+  --docx-majorHAnsi-font: Calibri Light;
+  --docx-minorHAnsi-font: Calibri;
+  --docx-dk1-color: #000000;
+  --docx-lt1-color: #FFFFFF;
+  --docx-dk2-color: #44546A;
+  --docx-lt2-color: #E7E6E6;
+  --docx-accent1-color: #5B9BD5;
+  --docx-accent2-color: #ED7D31;
+  --docx-accent3-color: #A5A5A5;
+  --docx-accent4-color: #FFC000;
+  --docx-accent5-color: #4472C4;
+  --docx-accent6-color: #70AD47;
+  --docx-hlink-color: #0563C1;
+  --docx-folHlink-color: #954F72;
+}
+.docx span {
+  font-family: Times New Roman;
+}
+.docx p, p.docx_1 {
+  text-align: justify;
+}
+.docx p, p.docx_1 span {
+  font-family: var(--docx-minorHAnsi-font);
+  min-height: 10.50pt;
+  font-size: 10.50pt;
+}
+.docx table, table.docx_2 td {
+  padding-top: 0.00pt;
+  padding-left: 5.40pt;
+  padding-bottom: 0.00pt;
+  padding-right: 5.40pt;
+}
+table.docx_3 p {
+  text-align: justify;
+}
+table.docx_3 td {
+  border-top: 0.50pt solid black;
+  border-left: 0.50pt solid black;
+  border-bottom: 0.50pt solid black;
+  border-right: 0.50pt solid black;
+  padding-top: 0.00pt;
+  padding-left: 5.40pt;
+  padding-bottom: 0.00pt;
+  padding-right: 5.40pt;
+}
+	p.docx-num-2-0:before {
+  content: ""counter(docx-num-2-0, decimal)"、";
+  counter-increment: docx-num-2-0;
+}
+p.docx-num-2-0 {
+  display: list-item;
+  list-style-position: inside;
+  list-style-type: none;
+}
+p.docx-num-1-0:before {
+  content: ""counter(docx-num-1-0, decimal)"、";
+  counter-increment: docx-num-1-0;
+}
+p.docx-num-1-0 {
+  display: list-item;
+  list-style-position: inside;
+  list-style-type: none;
+}
+.docx-wrapper {
+  counter-reset: docx-num-2-0 4 docx-num-1-0 0;
+}
+
+
+
+          </style>
+      </head>
+      <body>
+      ${html}
+      </body>
+      </html>`;
+      // console.log(content)
+      // return console.log(content)
+      // debugger
+      let blob = htmlDocx.asBlob(content);
+
+      // const uploadFile = new File([blob], `${name}.docx`, {
+      //   type:
+      //     "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+      // });
+      saveAs(blob, `${name}.docx`);
+      return true;
+      // this.beforeUploadHtml(uploadFile);
+    },
+    async getGenerateDocxHtml(html) {
+      const content = `<!DOCTYPE html>
+      <html xmlns:v='urn:schemas-microsoft-com
+      :vml'xmlns:o='urn:schemas-microsoft-com:office
+      :office'xmlns:w='urn:schemas-microsoft-com:office
+      :word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'
+      xmlns='http://www.w3.org/TR/REC-html40'
+      xmlns='http://www.w3.org/1999/xhtml'>
+      <head>
+          <meta charset="UTF-8">
+          <meta http-equiv="X-UA-Compatible" content="IE=edge">
+          <meta name="viewport" content="width=device-width, initial-scale=1.0">
+          <title>DOCX</title>
+          <style>
+						*{
+							font-family: '宋体';
+							margin:0;
+							padding:0;
+							line-height:1;
+						}
+            table {
+              border-collapse: collapse; /* 折叠边框 */
+              width: 100%;
+							font-size:10.5pt;
+            }
+            th, td {
+              border: 1px solid black; /* 线条样式 */
+              padding: 8px;
+              text-align: left;
+							font-size:10.5pt;
+            }
+						ol,ul{
+							margin:0;
+							padding:0;
+							margin-right:-1in;
+						}
+						li{
+							margin-bottom:0.1in
+							margin-right:-1in;
+						}
+						p{
+							line-height:1;
+							margin:0;
+							padding:0
+						}
+						.vue-office-docx{height:100%;overflow-y:auto}
+						.vue-office-docx .docx-wrapper>section.docx{margin-bottom:5px}
+						@media screen and (max-width: 800px){
+							.vue-office-docx .docx-wrapper{padding:10px}
+							.vue-office-docx .docx-wrapper>section.docx{padding:10px!important;width:100%!important}
+						}
+
+.docx-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; }
+.docx-wrapper>section.docx { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
+.docx { color: black; hyphens: auto; text-underline-position: from-font; }
+section.docx { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
+section.docx>article { margin-bottom: auto; z-index: 1; }
+section.docx>footer { z-index: 1; }
+.docx table { border-collapse: collapse; }
+.docx table td, .docx table th { vertical-align: top; }
+.docx p { margin: 0pt; min-height: 1em; }
+.docx span { white-space: pre-wrap; overflow-wrap: break-word; }
+.docx a { color: inherit; text-decoration: inherit; }
+.docx svg { fill: transparent; }
+.docx {
+  --docx-majorHAnsi-font: Calibri Light;
+  --docx-minorHAnsi-font: Calibri;
+  --docx-dk1-color: #000000;
+  --docx-lt1-color: #FFFFFF;
+  --docx-dk2-color: #44546A;
+  --docx-lt2-color: #E7E6E6;
+  --docx-accent1-color: #5B9BD5;
+  --docx-accent2-color: #ED7D31;
+  --docx-accent3-color: #A5A5A5;
+  --docx-accent4-color: #FFC000;
+  --docx-accent5-color: #4472C4;
+  --docx-accent6-color: #70AD47;
+  --docx-hlink-color: #0563C1;
+  --docx-folHlink-color: #954F72;
+}
+.docx span {
+  font-family: Times New Roman;
+}
+.docx p, p.docx_1 {
+  text-align: justify;
+}
+.docx p, p.docx_1 span {
+  font-family: var(--docx-minorHAnsi-font);
+  min-height: 10.50pt;
+  font-size: 10.50pt;
+}
+.docx table, table.docx_2 td {
+  padding-top: 0.00pt;
+  padding-left: 5.40pt;
+  padding-bottom: 0.00pt;
+  padding-right: 5.40pt;
+}
+table.docx_3 p {
+  text-align: justify;
+}
+table.docx_3 td {
+  border-top: 0.50pt solid black;
+  border-left: 0.50pt solid black;
+  border-bottom: 0.50pt solid black;
+  border-right: 0.50pt solid black;
+  padding-top: 0.00pt;
+  padding-left: 5.40pt;
+  padding-bottom: 0.00pt;
+  padding-right: 5.40pt;
+}
+	p.docx-num-2-0:before {
+  content: ""counter(docx-num-2-0, decimal)"、";
+  counter-increment: docx-num-2-0;
+}
+p.docx-num-2-0 {
+  display: list-item;
+  list-style-position: inside;
+  list-style-type: none;
+}
+p.docx-num-1-0:before {
+  content: ""counter(docx-num-1-0, decimal)"、";
+  counter-increment: docx-num-1-0;
+}
+p.docx-num-1-0 {
+  display: list-item;
+  list-style-position: inside;
+  list-style-type: none;
+}
+.docx-wrapper {
+  counter-reset: docx-num-2-0 4 docx-num-1-0 0;
+}
+</style>
+</head>
+<body>
+${html}
+</body>
+</html>`;
+      // console.log(content)
+      // return console.log(content)
+      // debugger
+      let blob = htmlDocx.asBlob(content);
+      return blob;
+    },
+    uploadFile(file) {
+      return new Promise((resolve, reject) => {
+        var credentials = {
+          accessKeyId: "AKIATLPEDU37QV5CHLMH",
+          secretAccessKey: "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"
+        }; //秘钥形式的登录上传
+        window.AWS.config.update(credentials);
+        window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+        var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+        var _this = this;
+
+        if (file) {
+          // this.loading = true;
+          var params = {
+            Key:
+              file.name.split(".")[0] +
+              new Date().getTime() +
+              "." +
+              file.name.split(".")[file.name.split(".").length - 1],
+            ContentType: file.type,
+            Body: file,
+            "Access-Control-Allow-Credentials": "*",
+            ACL: "public-read"
+          }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+          var options = {
+            partSize: 2048 * 1024 * 1024,
+            queueSize: 2,
+            leavePartsOnError: true
+          };
+          bucket
+            .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) {
+              if (err) {
+                _this.$message.error("上传失败");
+              } else {
+                resolve(data.Location);
+              }
+            });
+        }
+      });
+    },
+    changeDownFileData(data) {
+      let _data = JSON.parse(JSON.stringify(data));
+      delete _data.txt;
+
+      let params = [
+        {
+          cid: this.courseId,
+          ncover: JSON.stringify(_data)
+        }
+      ];
+      this.$emit("changeCover", JSON.stringify(_data));
+      this.ajax
+        .post(this.$store.state.api + "update_testCourseCoverById", params)
+        .then(res => {
+          console.log(res.data);
+        });
+    },
+    getTxtContent(txt) {
+      this.downFileData.txt = txt;
+    },
+    uploadWord() {
+      let input = document.createElement("input");
+      input.type = "file";
+      // input.accept = ".wav";
+      // input.accept = "audio/*, .txt, .pdf, .xlsx";
+      input.accept = ".docx";
+      input.click();
+      input.onchange = async () => {
+        this.loading = true;
+        let file = input.files[0];
+        if (!/\.(docx)$/i.test(file.name)) {
+          this.loading = false;
+          return this.$message.error("请上传.docx格式的文件");
+        }
+        let uploadData = await this.uploadFile(file);
+        if (uploadData == 1) {
+          this.loading = false;
+          return this.$message.error("文件上传失败");
+        }
+        let obj = {
+          fileName: file.name,
+          url: uploadData
+        };
+        this.downFileData = obj;
+        this.changeDownFileData(this.downFileData);
+        this.loading = false;
+        console.log(uploadData);
+      };
+    },
+    formatTime(timeString) {
+      let [datePart, timePart] = timeString.split(" ");
+      let formattedTime =
+        timePart.replace(/:/g, (match, offset) => {
+          if (offset === 2) return "时";
+          if (offset === 5) return "分";
+          return match;
+        }) + "秒";
+      return datePart + " " + formattedTime;
+    }
+  },
+  computed: {
+    dialogTitle() {
+      let _result = "word导出";
+      if (this.useFieldList.length == 0) {
+        _result = "word导出";
+      } else if (this.useFieldList.length == 1) {
+        _result = `${this.useFieldList[0].name}数据word导出`;
+      } else {
+        _result = `批量word导出`;
+      }
+      return _result;
+    }
+  }
+};
+</script>
+
+<style scoped>
+.dialog_diy >>> .el-dialog {
+  /* height: 100%; */
+  /* margin: 0 auto !important; */
+}
+
+.dialog_diy >>> .el-dialog__header {
+  padding: 15px 20px;
+  background-color: #454545 !important;
+  color: #fff !important;
+}
+
+.dialog_diy >>> .el-dialog__body {
+  height: calc(100% - 54px);
+  box-sizing: border-box;
+  padding: 0px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fff;
+}
+
+.box {
+  width: 100%;
+  height: 100%;
+  padding: 0 20px 15px;
+  display: flex;
+  box-sizing: border-box;
+  overflow: auto;
+}
+
+.b_left {
+  flex: 1;
+  height: 100%;
+  border: none;
+  outline: none;
+  box-sizing: border-box;
+  padding-top: 20px;
+}
+
+.b_right {
+  flex: 1;
+  min-width: 700px;
+  max-width: 700px;
+  height: 100%;
+}
+
+.d_box {
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+}
+
+.d_b_step {
+  width: 100%;
+  max-width: 100%;
+  height: auto;
+  padding: 20px;
+  box-sizing: border-box;
+  /* background-color: red; */
+}
+
+.d_b_step > h2 {
+  margin-bottom: 10px;
+}
+
+.d_b_step > h3 {
+  margin-top: 20px;
+}
+
+.d_b_step > p {
+  font-size: 16px;
+}
+
+.d_b_step > img {
+  width: 100%;
+  margin-top: 10px;
+}
+
+.d_b_s_button {
+  margin-top: 10px;
+}
+
+.d_b_s_fieldListItem {
+  margin-top: 15px;
+  font-size: 16px;
+  display: flex;
+  align-items: center;
+}
+
+.d_b_s_fieldListItem > span {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.d_b_s_fieldListItem > span > svg {
+  width: 15px;
+  height: 15px;
+  cursor: pointer;
+  fill: #000;
+  margin-left: 10px;
+  transition: 0.3s;
+  fill-opacity: 0.6;
+}
+
+.d_b_s_fieldListItem > span > svg:hover {
+  fill: #409eff;
+  fill-opacity: 1;
+}
+
+.d_b_s_fileCard {
+  width: 100%;
+  height: 45px;
+  border-radius: 2px;
+  margin-bottom: 10px;
+  display: flex;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 0 10px;
+  border: solid 1px #dfdfdf;
+  position: relative;
+  cursor: default;
+}
+
+.d_b_s_fileCard > svg {
+  width: 30px;
+  height: 30px;
+  fill: #a3a8ac;
+  margin-right: 10px;
+}
+
+.d_b_s_fileCard > span {
+  max-width: calc(100% - 100px);
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 16px;
+}
+
+.d_b_s_f_c_del {
+  position: absolute;
+  right: 10px;
+  cursor: pointer;
+  color: #e60012;
+}
+
+.d_b_s_imgList {
+  margin-top: 10px;
+}
+
+.d_b_s_imgList > img {
+  width: 100%;
+}
+
+.foldMenu {
+  width: 100%;
+  display: flex;
+  justify-content: flex-end;
+  margin: 10px 0;
+}
+
+.foldMenu > span {
+  cursor: pointer;
+  color: #409eff;
+  font-size: 16px;
+}
+
+.cover_box {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+</style>

+ 4800 - 0
src/components/pages/test/check/index.vue

@@ -0,0 +1,4800 @@
+<template>
+  <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
+    <div class="pb_content_body" style="position: relative; margin: 0">
+      <div class="right">
+        <div class="courseTop">
+          <div class="stepsNav">
+            <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item
+                :to="{
+                  path:
+                    '/test?userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+                >表单管理</el-breadcrumb-item
+              >
+              <el-breadcrumb-item>
+                <span style="color: rgb(15, 126, 255)">查看表单</span>
+              </el-breadcrumb-item>
+            </el-breadcrumb>
+          </div>
+          <div
+            v-if="!peopleId"
+            class="r_pub_button_retrun"
+            @click="retrunCourse"
+          >
+            返回
+          </div>
+        </div>
+        <div class="step_box" ref="stepBox" v-loading="pdfLoading">
+          <div class="boxSticky" ref="boxSticky">
+            <div
+              class="test_title"
+              :style="!isDesktop ? 'justify-content: center;' : ''"
+            >
+              <div class="left">
+                <div class="title">{{ testJson.title }}</div>
+                <div class="info" v-if="isDesktop">
+                  <div class="info_box" v-if="testJson.typeN">
+                    <span>类型:</span>
+                    <span>{{ testJson.typeN }}</span>
+                  </div>
+                  <div class="info_box">
+                    <span>填写范围:</span>
+                    <span>{{
+                      testJson.juriP ? testJson.juriP : "所有人"
+                    }}</span>
+                  </div>
+                  <div class="info_box" v-if="testJson.overtime">
+                    <span>截止时间:</span>
+                    <span>{{ testJson.overtime }}</span>
+                  </div>
+                </div>
+              </div>
+              <div v-if="!peopleId">
+                <div class="right" v-if="isDesktop">
+                  <div class="data_box">
+                    <span>提交数量</span>
+                    <!-- <span><span class="big">{{ works.length }}</span>份</span> -->
+                    <span
+                      ><span class="big">{{ worksArray.length }}</span
+                      >份</span
+                    >
+                  </div>
+                  <div class="data_box" v-if="testJson.juriP">
+                    <span>表单完成率</span>
+                    <span
+                      ><span class="big">{{
+                        ((iscount / pcount) * 100).toFixed(0)
+                      }}</span
+                      >%</span
+                    >
+                  </div>
+                  <div class="data_box" v-if="testJson.juriP">
+                    <span>未完成人数</span>
+                    <span
+                      ><span class="big">{{ pcount - iscount }}</span></span
+                    >
+                  </div>
+                  <div class="btn_box" @click="dialogVisibleShare = true">
+                    <span></span>
+                    <span>提醒</span>
+                  </div>
+                </div>
+              </div>
+            </div>
+
+            <!-- pc端 查看切换 isDesktop-->
+            <div class="search_nav" v-if="isDesktop">
+              <div class="right">
+                <span
+                  :class="{ active: stype == 1 }"
+                  @click="checkDataType(1)"
+                  v-if="!peopleId"
+                  >按题目查看</span
+                >
+                <span :class="{ active: stype == 2 }" @click="checkDataType(2)"
+                  >按人员查看</span
+                >
+                <span
+                  :class="{ active: stype == 3 }"
+                  @click="checkDataType(3)"
+                  v-show="false"
+                  >按数量查看</span
+                >
+              </div>
+              <div class="left" v-if="isDesktop">
+                <!-- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3"> -->
+                <!-- <div style="margin-right: 10px;position: relative;">
+                  <el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
+                    <el-option
+                      label="全部"
+                      value="">
+                    </el-option>
+                    <el-option
+                      v-for="item in TeachingOptions"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select>
+                </div> -->
+                <div
+                  style="margin-right: 10px; position: relative"
+                  v-if="stype == 2 || stype == 3"
+                >
+                  <!-- <el-date-picker
+                    v-model="SubmitTime"
+                    type="date"
+                    @change="searchCourse"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker> -->
+                  <!-- <el-select v-model="SubmitTime" placeholder="按提交时间筛选">
+                    <el-option
+                      label="全部"
+                      value="">
+                    </el-option>
+                    <el-option
+                      v-for="item in SubmitTimeOptions"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id">
+                    </el-option>
+                  </el-select> -->
+                </div>
+                <div
+                  style="margin-right: 10px; position: relative"
+                  v-if="stype == 2 || stype == 3"
+                >
+                  <el-input
+                    v-model="courseName"
+                    class="student_input"
+                    :disabled="!!peopleId"
+                    placeholder="请输入需要搜索的姓名"
+                  ></el-input>
+                  <span class="serach_icon" @click="searchCourse"></span>
+                </div>
+
+                <div
+                  class="btnA"
+                  v-if="stype == 1 && !pdfLoading"
+                  @click="exportPDF"
+                >
+                  导出PDF
+                </div>
+                <div
+                  class="btnA"
+                  v-if="stype == 2"
+                  @mouseenter="btnDisplay = true"
+                  @mouseleave="btnDisplay = false"
+                >
+                  导出数据
+                  <div v-show="btnDisplay" class="buttonBox">
+                    <div type="primary" @click="exportExcel">下载汇总表格</div>
+                    <div type="primary" @click="exportAllWord">
+                      导出人员数据
+                    </div>
+                    <div
+                      type="primary"
+                      v-if="stype == 2"
+                      @click="exportWordData"
+                    >
+                      word导出
+                    </div>
+                  </div>
+                </div>
+
+                <div class="btnA" v-if="stype == 3" @click="exportAllWord2">
+                  导出人员数据
+                </div>
+                <div
+                  class="btnA"
+                  @click="openChat"
+                  v-if="this.worksArray.length && !peopleId"
+                >
+                  AI分析
+                </div>
+                <!--v-if="this.worksArray.length"-->
+              </div>
+            </div>
+            <!-- 手机端 查看切换 isDesktop-->
+            <div
+              class="search_nav"
+              style="display: flex; justify-content: space-evenly; border: none"
+              v-if="!isDesktop"
+            >
+              <div class="right">
+                <span :class="{ active2: stype == 1 }" @click="checkDataType(1)"
+                  >按题目查看</span
+                >
+                <span :class="{ active2: stype == 2 }" @click="checkDataType(2)"
+                  >按人员查看</span
+                >
+                <span
+                  :class="{ active2: stype == 3 }"
+                  @click="checkDataType(3)"
+                  v-show="false"
+                  >按数量查看</span
+                >
+              </div>
+            </div>
+          </div>
+
+          <!-- 按题目pc端 isDesktop-->
+          <div
+            class="title_content"
+            v-if="stype == 1 && isDesktop"
+            v-loading="isLoading"
+          >
+            <div
+              class="title_box"
+              v-if="!testArray.length"
+              style="
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                height: 500px;
+              "
+            >
+              暂无内容
+            </div>
+            <div
+              class="title_box"
+              v-for="(item, index) in testArray"
+              :key="index"
+            >
+              <div class="title">
+                <el-tooltip
+                  :content="selectType(item)"
+                  placement="top"
+                  effect="dark"
+                >
+                  <span
+                    class="test_icon"
+                    :class="{
+                      test_icon_check: item.type == 1 && item.atype == 2,
+                      test_icon_checkO: item.type == 1 && item.atype == 1,
+                      test_icon_gap: item.type == 3,
+                      test_icon_file: item.type == 5,
+                      test_course_file: item.type == 6 || item.type == 11,
+                      test_eva_file: item.type == 7,
+                      test_icon_time: item.type == 8,
+                    }"
+                  ></span>
+                </el-tooltip>
+                <span style="line-height: 25px">{{ item.title }}</span>
+                <el-button
+                  v-if="item.type == 5 && item.array.length > 0"
+                  class="title_downBtn"
+                  type="primary"
+                  size="small"
+                  @click.stop="downloadFileType5(item.array, item.title, index)"
+                  >批量下载附件</el-button
+                >
+                <div v-if="item.type == 7" style="right: 0; position: absolute">
+                  平均分:{{ getAverageScore(index) }}
+                </div>
+              </div>
+              <div class="detail" v-if="item.detail">{{ item.detail }}</div>
+              <div class="content1" v-if="item.type == 1">
+                <div class="left">
+                  <div class="title">
+                    <span>选项</span>
+                    <span>小计</span>
+                    <span>比例</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>
+                      <el-tooltip
+                        :content="data.name"
+                        placement="top"
+                        effect="dark"
+                      >
+                        <!-- content to trigger tooltip here -->
+                        <span>{{ data.name }}</span>
+                      </el-tooltip>
+                    </span>
+                    <span>{{ data.count }}</span>
+                    <span>
+                      <el-progress
+                        style="display: flex; align-items: center"
+                        :stroke-width="12"
+                        color="#3681fc"
+                        :percentage="
+                          data.count
+                            ? parseFloat(
+                                ((data.count / item.count) * 100).toFixed(2)
+                              )
+                            : 0
+                        "
+                      ></el-progress>
+                    </span>
+                  </div>
+                </div>
+                <div class="right">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+              </div>
+              <div class="content2" v-if="item.type == 3">
+                <div class="left"  style="min-height: 482px;">
+                  <div class="title">
+                    <span>序号</span>
+                    <span>词频</span>
+                    <span>答案文本</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index3) in item.showArray"
+                    :key="index + '-' + index3"
+                  >
+                    <span>{{ index3 + 1 }}</span>
+                    <span>{{ data.count }}次</span>
+                    <el-tooltip
+                      :content="data.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <!-- content to trigger tooltip here -->
+                      <span>{{ data.name }}</span>
+                    </el-tooltip>
+                  </div>
+                  <div class="paging" v-if="item.limit">
+                    <el-pagination
+                      background
+                      :hide-on-single-page="true"
+                      :page-size="item.limit"
+											@current-change="textPagingChange($event,item,index)"
+                      :current-page="item.nowPage"
+                      layout="prev, pager, next"
+                      :total="item.total">
+                    </el-pagination>
+                  </div>
+                </div>
+                <div class="right">
+									<div class="noWordCloud" v-if="!item.wordCloutData">
+										<el-button v-if="!item.loadingWordCloud" type="primary" @click="getWordCloutData(item,index)">生成词云图</el-button>
+                    <div v-else>
+                      <span>小可努力生成中,请稍等片刻</span>
+                      <img src="../../../../assets/KekeLoading.gif">
+                    </div>
+									</div>
+                  <wordcloud
+										v-else
+                    :data="item.wordCloutData"
+                    nameKey="name"
+                    valueKey="count"
+                    :showTooltip="false"
+                    :wordClick="wordClickHandler"
+                  >
+                  </wordcloud>
+                </div>
+              </div>
+              <div
+                class="content3"
+                :style="{
+                  position: 'relative',
+                  overflow: fileLoading[index].bool ? 'hidden' : 'auto',
+                }"
+                v-if="item.type == 5"
+              >
+                <div
+                  class="file"
+                  v-for="(file, index2) in item.array"
+                  :key="index + '-' + index2"
+                  @click.stop="checkFile(file)"
+                >
+                  <img
+                    class="download"
+                    src="../../../../assets/icon/fileIcon/download.png"
+                    @click.stop="downloadFile(file)"
+                    :style="{ right: '10px' }"
+                  />
+                  <img
+                    class="img"
+                    :src="wordIcon"
+                    alt=""
+                    v-if="file.type == 1"
+                  />
+                  <img
+                    class="img"
+                    :src="videoIcon"
+                    alt=""
+                    v-if="file.type == 2"
+                  />
+                  <img
+                    class="img"
+                    :src="file.url"
+                    alt=""
+                    v-if="file.type == 3"
+                  />
+                  <img
+                    class="img"
+                    :src="wordIcon"
+                    alt=""
+                    v-if="file.type == 4"
+                  />
+                  <img
+                    class="img"
+                    :src="fileIcon"
+                    alt=""
+                    v-if="file.type == 5"
+                  />
+                  <div class="name">
+                    <el-tooltip
+                      :content="file.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <span>{{ file.name }}</span>
+                    </el-tooltip>
+                  </div>
+                </div>
+                <div v-if="fileLoading[index].bool" class="mask">
+                  <div class="progressBox">
+                    <div class="lbox">
+                      <img src="../../../../assets/loading.gif" />打包中,请稍后
+                    </div>
+                    <div style="margin-bottom: 10px">
+                      <span>{{ fileLoading[index].load }}</span>
+                      /
+                      <span>{{ fileLoading[index].count }}</span>
+                    </div>
+                    <el-progress
+                      :text-inside="true"
+                      :stroke-width="20"
+                      :percentage="
+                        fileLoading[index].progress
+                          ? fileLoading[index].progress
+                          : 0
+                      "
+                      style="width: 80%"
+                    ></el-progress>
+                  </div>
+                </div>
+              </div>
+              <div class="content4" v-if="item.type == 6">
+                <div
+                  class="out_box"
+                  v-for="(item, index) in item.courseArray"
+                  :key="index + '-' + index2"
+                >
+                  <div class="tup">
+                    <img
+                      :src="
+                        item.cover != null && item.cover != ''
+                          ? JSON.parse(item.cover).length > 0
+                            ? JSON.parse(item.cover)[0].url
+                            : mr
+                          : mr
+                      "
+                      alt
+                    />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip
+                          :content="item.title"
+                          popper-class="text_tooltip"
+                          placement="top"
+                          effect="dark"
+                        >
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{
+                          item.state == 1
+                            ? "阶段模式"
+                            : item.state == 2
+                            ? "任务模式"
+                            : "极简模式"
+                        }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">创建日期:</span
+                        >{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">修改日期:</span
+                        >{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
+              <div class="content1" v-if="item.type == 7">
+                <div class="left">
+                  <div class="title">
+                    <span>评分</span>
+                    <span>小计</span>
+                    <span>比例</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>
+                      <span>{{ data.name }}</span>
+                    </span>
+                    <span>{{ data.count }}</span>
+                    <span>
+                      <el-progress
+                        style="display: flex; align-items: center"
+                        :stroke-width="12"
+                        color="#3681fc"
+                        :percentage="
+                          data.count
+                            ? parseFloat(
+                                ((data.count / item.count) * 100).toFixed(2)
+                              )
+                            : 0
+                        "
+                      ></el-progress>
+                    </span>
+                  </div>
+                </div>
+                <div class="right">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+              </div>
+              <div class="content2" v-if="item.type == 8">
+                <div class="left">
+                  <div class="title">
+                    <span>序号</span>
+                    <span>词频</span>
+                    <span>日期</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>{{ index2 + 1 }}</span>
+                    <span>{{ data.count }}次</span>
+                    <el-tooltip
+                      :content="data.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <!-- content to trigger tooltip here -->
+                      <span>{{ data.name }}</span>
+                    </el-tooltip>
+                  </div>
+                </div>
+                <div class="right">
+                  <wordcloud
+                    :data="item.array"
+                    nameKey="name"
+                    valueKey="count"
+                    :showTooltip="false"
+                    :wordClick="wordClickHandler"
+                  >
+                  </wordcloud>
+                </div>
+              </div>
+              <div class="content4" v-if="item.type == 11">
+                <div
+                  class="out_box"
+                  v-for="(item, index) in item.courseArray"
+                  :key="index + '-' + index2"
+                >
+                  <div class="tup">
+                    <img
+                      :src="
+                        item.cover != null && item.cover != ''
+                          ? JSON.parse(item.cover).length > 0
+                            ? JSON.parse(item.cover)[0].url
+                            : mr
+                          : mr
+                      "
+                      alt
+                    />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip
+                          :content="item.title"
+                          popper-class="text_tooltip"
+                          placement="top"
+                          effect="dark"
+                        >
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{
+                          item.state == 1
+                            ? "阶段模式"
+                            : item.state == 2
+                            ? "任务模式"
+                            : "极简模式"
+                        }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">创建日期:</span
+                        >{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">修改日期:</span
+                        >{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
+              <div class="content1" v-if="item.type == 13">
+                <div class="left">
+                  <div class="title">
+                    <span>数字</span>
+                    <span>次数</span>
+                    <span>比例</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>
+                      <span>{{ data.name }}</span>
+                    </span>
+                    <span>{{ data.count }}</span>
+                    <span>
+                      <el-progress
+                        style="display: flex; align-items: center"
+                        :stroke-width="12"
+                        color="#3681fc"
+                        :percentage="
+                          data.count
+                            ? parseFloat(
+                                ((data.count / item.count) * 100).toFixed(2)
+                              )
+                            : 0
+                        "
+                      ></el-progress>
+                    </span>
+                  </div>
+                </div>
+                <div class="right">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+              </div>
+            </div>
+          </div>
+          <!-- 按题目手机端 !isDesktop-->
+          <div
+            class="title_content"
+            v-if="stype == 1 && !isDesktop"
+            v-loading="isLoading"
+          >
+            <div
+              class="title_box"
+              v-if="!testArray.length"
+              style="
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                height: 500px;
+              "
+            >
+              暂无内容
+            </div>
+            <div
+              class="title_box"
+              v-for="(item, index) in testArray"
+              :key="index"
+            >
+              <div
+                class="title"
+                style="
+                  font-size: 16px;
+                  display: flex;
+                  justify-content: space-between;
+                  align-items: center;
+                "
+              >
+                <!-- <el-tooltip :content="selectType(item)" placement="top" effect="dark">
+                  <span class="test_icon"
+                    :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
+                </el-tooltip> -->
+                <div style="display: flex">
+                  <div class="topicTitCss">第{{ index + 1 }}题:</div>
+                  <el-tooltip
+                    :content="item.title"
+                    placement="top"
+                    effect="dark"
+                  >
+                    <div
+                      style="
+                        width: 100px;
+                        overflow: hidden;
+                        white-space: nowrap;
+                        text-overflow: ellipsis;
+                      "
+                    >
+                      {{ item.title }}
+                    </div>
+                  </el-tooltip>
+                </div>
+                <div style="display: flex">
+                  <!-- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div> -->
+                  <div
+                    style="
+                      color: rgba(0, 0, 0, 0.4);
+                      display: flex;
+                      align-items: center;
+                    "
+                  >
+                    [{{ selectType(item) }}]
+                  </div>
+                  <!-- <el-button style="padding: 5px;" v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button> -->
+                </div>
+              </div>
+              <div class="detail" v-if="item.detail">{{ item.detail }}</div>
+              <div
+                class="content1"
+                style="width: 100%; display: block"
+                v-if="item.type == 1"
+              >
+                <div class="left" style="width: 100%" v-if="!item.cut">
+                  <div class="isDesktopTitle">
+                    <div>选项</div>
+                    <div>小计</div>
+                    <div>比例</div>
+                  </div>
+                  <div
+                    class="isDesktopTitle"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <!-- <span> -->
+                    <el-tooltip
+                      :content="data.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <!-- content to trigger tooltip here -->
+                      <div>{{ data.name }}</div>
+                    </el-tooltip>
+                    <!-- </span> -->
+                    <div>{{ data.count }}</div>
+                    <div>
+                      {{
+                        data.count
+                          ? parseFloat(
+                              ((data.count / item.count) * 100).toFixed(2)
+                            )
+                          : 0
+                      }}
+                      <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
+                        :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
+                    </div>
+                  </div>
+                </div>
+                <div class="right isDesktopRight" v-if="item.cut">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+                <div class="cutBtnBlockCss">
+                  <div class="cutBtnCss" @click="item.cut = !item.cut">
+                    {{ item.cut ? "查看详情" : "查看视图" }}
+                  </div>
+                </div>
+              </div>
+              <div
+                class="content2"
+                style="width: 100%; display: block"
+                v-if="item.type == 3"
+              >
+                <div class="left" style="width: 100%" v-if="!item.cut">
+                  <div class="title">
+                    <span>序号</span>
+                    <span>词频</span>
+                    <span>答案文本</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>{{ index2 + 1 }}</span>
+                    <span>{{ data.count }}次</span>
+                    <el-tooltip
+                      :content="data.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <!-- content to trigger tooltip here -->
+                      <span>{{ data.name }}</span>
+                    </el-tooltip>
+                  </div>
+                </div>
+                <div class="right isDesktopRight" v-if="item.cut">
+                  <wordcloud
+                    :data="item.array"
+                    nameKey="name"
+                    valueKey="count"
+                    :showTooltip="false"
+                    :wordClick="wordClickHandler"
+                  >
+                  </wordcloud>
+                </div>
+                <div class="cutBtnBlockCss">
+                  <div class="cutBtnCss" @click="item.cut = !item.cut">
+                    {{ item.cut ? "查看详情" : "查看视图" }}
+                  </div>
+                </div>
+              </div>
+              <div class="content3" v-if="item.type == 5">
+                <div
+                  class="file"
+                  v-for="(file, index2) in item.array"
+                  :key="index + '-' + index2"
+                  @click.stop="checkFile(file)"
+                >
+                  <img
+                    class="download"
+                    src="../../../../assets/icon/fileIcon/download.png"
+                    @click.stop="downloadFile(file)"
+                    :style="{ right: '10px' }"
+                  />
+                  <img
+                    class="img"
+                    :src="wordIcon"
+                    alt=""
+                    v-if="file.type == 1"
+                  />
+                  <img
+                    class="img"
+                    :src="videoIcon"
+                    alt=""
+                    v-if="file.type == 2"
+                  />
+                  <img
+                    class="img"
+                    :src="file.url"
+                    alt=""
+                    v-if="file.type == 3"
+                  />
+                  <img
+                    class="img"
+                    :src="wordIcon"
+                    alt=""
+                    v-if="file.type == 4"
+                  />
+                  <img
+                    class="img"
+                    :src="fileIcon"
+                    alt=""
+                    v-if="file.type == 5"
+                  />
+                  <div class="name">
+                    <el-tooltip
+                      :content="file.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <span>{{ file.name }}</span>
+                    </el-tooltip>
+                  </div>
+                </div>
+              </div>
+              <div class="content4" v-if="item.type == 6">
+                <div
+                  class="out_box"
+                  v-for="(item, index) in item.courseArray"
+                  :key="index + '-' + index2"
+                >
+                  <div class="tup">
+                    <img
+                      :src="
+                        item.cover != null && item.cover != ''
+                          ? JSON.parse(item.cover).length > 0
+                            ? JSON.parse(item.cover)[0].url
+                            : mr
+                          : mr
+                      "
+                      alt
+                    />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip
+                          :content="item.title"
+                          popper-class="text_tooltip"
+                          placement="top"
+                          effect="dark"
+                        >
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{
+                          item.state == 1
+                            ? "阶段模式"
+                            : item.state == 2
+                            ? "任务模式"
+                            : "极简模式"
+                        }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">创建日期:</span
+                        >{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">修改日期:</span
+                        >{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
+              <div
+                class="content1"
+                style="width: 100%; display: block"
+                v-if="item.type == 7"
+              >
+                <div class="left" style="width: 100%" v-if="!item.cut">
+                  <div class="isDesktopTitle">
+                    <div>评分</div>
+                    <div>小计</div>
+                    <div style="width: 120px">比例</div>
+                  </div>
+                  <div
+                    class="isDesktopTitle"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <!-- <span> -->
+                    <div>{{ data.name }}</div>
+                    <!-- </span> -->
+                    <div>{{ data.count }}</div>
+                    <div style="width: 120px">
+                      {{
+                        data.count
+                          ? parseFloat(
+                              ((data.count / item.count) * 100).toFixed(2)
+                            )
+                          : 0
+                      }}
+                      <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
+                        :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
+                    </div>
+                  </div>
+                </div>
+                <div class="right isDesktopRight" v-if="item.cut">
+                  <checkPie :dataJ="item.array"></checkPie>
+                </div>
+                <div class="cutBtnBlockCss">
+                  <div class="cutBtnCss" @click="item.cut = !item.cut">
+                    {{ item.cut ? "查看详情" : "查看视图" }}
+                  </div>
+                </div>
+              </div>
+              <div
+                class="content2"
+                style="width: 100%; display: block"
+                v-if="item.type == 8"
+              >
+                <div class="left" style="width: 100%" v-if="!item.cut">
+                  <div class="title">
+                    <span>序号</span>
+                    <span>词频</span>
+                    <span>日期</span>
+                  </div>
+                  <div
+                    class="data"
+                    v-for="(data, index2) in item.array"
+                    :key="index + '-' + index2"
+                  >
+                    <span>{{ index2 + 1 }}</span>
+                    <span>{{ data.count }}次</span>
+                    <el-tooltip
+                      :content="data.name"
+                      placement="top"
+                      effect="dark"
+                    >
+                      <!-- content to trigger tooltip here -->
+                      <span>{{ data.name }}</span>
+                    </el-tooltip>
+                  </div>
+                </div>
+                <div class="right isDesktopRight" v-if="item.cut">
+                  <wordcloud
+                    :data="item.array"
+                    nameKey="name"
+                    valueKey="count"
+                    :showTooltip="false"
+                    :wordClick="wordClickHandler"
+                  >
+                  </wordcloud>
+                </div>
+                <div class="cutBtnBlockCss">
+                  <div class="cutBtnCss" @click="item.cut = !item.cut">
+                    {{ item.cut ? "查看详情" : "查看视图" }}
+                  </div>
+                </div>
+              </div>
+              <div class="content4" v-if="item.type == 11">
+                <div
+                  class="out_box"
+                  v-for="(item, index) in item.courseArray"
+                  :key="index + '-' + index2"
+                >
+                  <div class="tup">
+                    <img
+                      :src="
+                        item.cover != null && item.cover != ''
+                          ? JSON.parse(item.cover).length > 0
+                            ? JSON.parse(item.cover)[0].url
+                            : mr
+                          : mr
+                      "
+                      alt
+                    />
+                    <div class="bottom_box">
+                      <div>
+                        <el-tooltip
+                          :content="item.title"
+                          popper-class="text_tooltip"
+                          placement="top"
+                          effect="dark"
+                        >
+                          <span>{{ item.title }}</span>
+                        </el-tooltip>
+                      </div>
+                      <div class="kc_t">
+                        <span>{{ item.username }}</span>
+                        <span>{{
+                          item.state == 1
+                            ? "阶段模式"
+                            : item.state == 2
+                            ? "任务模式"
+                            : "极简模式"
+                        }}</span>
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">创建日期:</span
+                        >{{ item.time }}
+                      </div>
+                      <div class="kc_time">
+                        <span style="color: #717c8d">修改日期:</span
+                        >{{ item.update_at }}
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
+                  {{ courses }}
+                </div> -->
+              </div>
+
+            </div>
+          </div>
+          <div
+            class="aiBoxRight"
+            ref="aiBoxRightDivRef"
+            v-show="aiChatV && isDesktop"
+            v-if="!peopleId"
+          >
+            <aiBoxRight
+              :courseId="cid"
+              :worksArray="[{ name: testJson.title, worksArray: worksArray }]"
+              ref="aiChat"
+            ></aiBoxRight>
+          </div>
+          <!-- 按人员pc端 isDesktop-->
+          <div class="table_content" v-if="stype == 2 && isDesktop">
+            <el-table
+              class="el-table"
+              ref="table"
+              :data="tableWorksArray"
+              border
+              :fit="true"
+              :key="2"
+              v-loading="isLoading"
+              style="width: 100%"
+              :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+              @filter-change="handleFilterChange"
+              @selection-change="handleSelectionChange"
+            >
+              <el-table-column label="序号" type="selection" width="55">
+              </el-table-column>
+              <el-table-column fixed label="序号" width="80px" align="left">
+                <template slot-scope="scope">
+                  {{ scope.$index + 1 }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                fixed
+                prop="name"
+                label="提交人"
+                width="120px"
+                align="left"
+              >
+              </el-table-column>
+              <el-table-column
+                v-for="item in teaType"
+                :key="item.id"
+                :label="item.name"
+                width="120px"
+                align="left"
+                :filters="getNameTTypeFiler(item)"
+                :filter-method="getNameTTypeFiler(item) ? (value, row) => {
+                        return filterTType(value, row, index);
+                      } : null"
+              >
+                <template slot-scope="scope">
+                  {{ getTType(item.id, scope.row.cclassid) }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="time"
+                label="提交时间"
+                width="170px"
+                align="left"
+              >
+              <template slot="header" slot-scope="scope">
+                  <div
+                  style="display: flex; align-items: center"
+                  >
+                    <span :class="{timePickerActive:(submissionTimePicker && submissionTimePicker.length>0)}">提交时间</span>
+                    <div class="tableDatePicker">
+                      <el-date-picker
+                        v-model="submissionTimePicker"
+                        @change="submissionTimePickerChange"
+                        type="daterange"
+                        range-separator="▼"
+                      >
+                      </el-date-picker>
+                    </div>
+                  </div>
+                </template>
+                <template slot-scope="scope">
+                  <span
+                    :style="`${
+                      testJson.overtime &&
+                      new Date(testJson.overtime) < new Date(scope.row.time)
+                        ? 'color:#d12920'
+                        : ''
+                    }`"
+                    >{{ scope.row.time }}</span
+                  >
+                </template>
+              </el-table-column>
+              <el-table-column
+                v-for="(item, index) in chapters"
+                :key="index"
+                :label="item.json.title"
+                :min-width="item.type == 5 ? 200 : 150"
+                align="left"
+                :filters="
+                  item.type == 1
+                    ? item.nameFilters
+                    : item.type == 6 || item.type == 11
+                    ? item.nameFilters
+                    : null
+                "
+                :filter-method="
+                  item.type == 1
+                    ? (value, row) => {
+                        return filterName(value, row, index);
+                      }
+                    : item.type == 6 || item.type == 11
+                    ? (value, row) => {
+                        return filterCourse(value, row, index);
+                      }
+                    : null
+                "
+                :filter-placement="
+                  item.type == 1 || item.type == 6 || item.type == 11
+                    ? filterPlacement
+                    : null
+                "
+              >
+                <!--  item.type==8?getTimeFilterText(item,index): item.type==8?(value,row)=>{return filterTime(value,row,index)}:  item.type == 8 ||-->
+                <template slot="header" slot-scope="scope">
+                  <div
+                    v-if="item.type == 8"
+                    style="display: flex; align-items: center"
+                  >
+                    <span :class="{timePickerActive:(tableDatePicker[index] && tableDatePicker[index].length>0)}">{{ item.json.title }}</span>
+                    <div class="tableDatePicker">
+                      <el-date-picker
+                        v-model="tableDatePicker[index]"
+                        @change="tableDataPickerChange"
+                        type="daterange"
+                        range-separator="▼"
+                      >
+                      </el-date-picker>
+                    </div>
+                  </div>
+                  <div v-else style="float: left">
+                    {{ item.json.title }}
+                  </div>
+                </template>
+                <template slot-scope="scope">
+                  <div
+                    v-if="scope.row.array[index].type == 1"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    <span
+                      class="answer_type"
+                      v-for="(answer2, index2) in scope.row.array[index].json
+                        .answer2"
+                      :key="index + '-' + index2"
+                      >{{
+                        scope.row.array[index].json.array[answer2].option
+                      }}</span
+                    >
+                  </div>
+                  <div
+                    v-if="
+                      scope.row.array[index].type == 3 ||
+                      scope.row.array[index].type == 8
+                    "
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 5"
+                    style="display: flex; flex-wrap: wrap"
+                    class="table_file"
+                  >
+                    <div
+                      class="file"
+                      v-for="(file, index2) in scope.row.array[index].json.file"
+                      :key="index + '-' + index2"
+                      @click.stop="checkFile(file)"
+                    >
+                      <img
+                        class="download"
+                        src="../../../../assets/icon/fileIcon/download.png"
+                        @click.stop="downloadFile(file)"
+                        :style="{ right: '10px' }"
+                      />
+                      <img
+                        class="img"
+                        :src="wordIcon"
+                        alt=""
+                        v-if="file.type == 1"
+                      />
+                      <img
+                        class="img"
+                        :src="videoIcon"
+                        alt=""
+                        v-if="file.type == 2"
+                      />
+                      <img
+                        class="img"
+                        :src="file.url"
+                        alt=""
+                        v-if="file.type == 3"
+                      />
+                      <img
+                        class="img"
+                        :src="wordIcon"
+                        alt=""
+                        v-if="file.type == 4"
+                      />
+                      <img
+                        class="img"
+                        :src="fileIcon"
+                        alt=""
+                        v-if="file.type == 5"
+                      />
+                      <div class="name">
+                        <el-tooltip
+                          :content="file.name"
+                          placement="top"
+                          effect="dark"
+                        >
+                          <span>{{ file.name }}</span>
+                        </el-tooltip>
+                      </div>
+                    </div>
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 6"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 7"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ getScore(scope.row.array[index].json) }}
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 11"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 12"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div
+                    v-if="scope.row.array[index].type == 13"
+                    style="display: flex; flex-wrap: wrap"
+                  >
+                    {{ scope.row.array[index].json.answer2 }}<span>{{  scope.row.array[index].json.type=='4'?'%':'' }}</span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="操作"
+                width="200px"
+                fixed="right"
+                v-if="isN != 1"
+              >
+                <template slot-scope="scope">
+                  <el-button
+                    @click="getTest(scope.row)"
+                    type="primary"
+                    size="small"
+                    >查看</el-button
+                  >
+                  <!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
+									<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
+                  <el-button
+                    @click="deleteTest(scope.row.id)"
+                    type="primary"
+                    size="small"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <!-- 按人员手机端 !isDesktop-->
+          <div class="table_content" v-if="stype == 2 && !isDesktop">
+            <div
+              v-for="(i, index) in worksArray"
+              :key="i.id"
+              class="isDesktopTable_content"
+            >
+              <div class="isDTitle CutCss">
+                <div style="font-size: 16px; font-weight: 600">
+                  {{ i.name }}
+                </div>
+                <div
+                  :style="
+                    'font-size: 14px' + i.cut
+                      ? 'color:rgba(54, 129, 252, 1)'
+                      : 'color: rgba(0, 0, 0, 0.6);'
+                  "
+                >
+                  {{ i.time }}
+                </div>
+                <div @click="i.cut = !i.cut">
+                  <img
+                    v-if="!i.cut"
+                    src="../../../../assets/icon/fileIcon/downImg.png"
+                    alt=""
+                  />
+                  <img
+                    v-else
+                    src="../../../../assets/icon/fileIcon/upImg.png"
+                    alt=""
+                  />
+                </div>
+              </div>
+              <div v-if="i.cut">
+                <div class="isDBri">
+                  <div>序号:{{ i.time }}</div>
+                  <div>提交时间:{{ i.time }}</div>
+                  <div>评课人:{{ i.uteaName }}</div>
+                </div>
+                <div
+                  style="
+                    height: 1px;
+                    background-color: #717c8d;
+                    width: 100%;
+                    margin-bottom: 10px;
+                  "
+                ></div>
+                <div>
+                  <div
+                    v-for="(k, kin) in chapters"
+                    :key="k.id"
+                    class="isCTiBlc"
+                  >
+                    <div v-if="k.type == 1">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          <div
+                            v-for="(r, index2) in i.array[kin].json.answer2"
+                            :key="index + '-' + index2"
+                          >
+                            {{ i.array[kin].json.array[r].option }}
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                    <div v-if="k.type == 3 || k.type == 8">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          {{ i.array[kin].json.answer2 }}
+                        </div>
+                      </div>
+                    </div>
+                    <div v-if="k.type == 5">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          <div
+                            class="IsDFile"
+                            v-for="(file, index2) in i.array[kin].json.file"
+                            :key="index + '-' + index2"
+                            @click.stop="checkFile(file)"
+                          >
+                            <img
+                              class="IsDownload"
+                              src="../../../../assets/icon/fileIcon/download.png"
+                              @click.stop="downloadFile(file)"
+                              :style="{ right: '10px' }"
+                            />
+                            <img
+                              class="IsDImg"
+                              :src="wordIcon"
+                              alt=""
+                              v-if="file.type == 1"
+                            />
+                            <img
+                              class="IsDImg"
+                              :src="videoIcon"
+                              alt=""
+                              v-if="file.type == 2"
+                            />
+                            <img
+                              class="IsDImg"
+                              :src="file.url"
+                              alt=""
+                              v-if="file.type == 3"
+                            />
+                            <img
+                              class="IsDImg"
+                              :src="wordIcon"
+                              alt=""
+                              v-if="file.type == 4"
+                            />
+                            <img
+                              class="IsDImg"
+                              :src="fileIcon"
+                              alt=""
+                              v-if="file.type == 5"
+                            />
+                            <div
+                              class="name"
+                              style="
+                                height: 30px;
+                                background-color: #f9f9f9;
+                                overflow: hidden;
+                                white-space: nowrap;
+                                text-overflow: ellipsis;
+                              "
+                            >
+                              <!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
+                              {{ file.name }}
+                              <!-- </el-tooltip> -->
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                    <div v-if="k.type.type == 6">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          {{ i.array[kin].json.answer2 }}
+                        </div>
+                      </div>
+                    </div>
+                    <div v-if="k.type == 7">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          {{ getScore(i.array[index].json) }}
+                        </div>
+                      </div>
+                    </div>
+                    <div v-if="k.type.type == 11">
+                      <div class="isDTitle2">
+                        <div
+                          style="display: flex; justify-content: space-between"
+                        >
+                          <div style="display: flex">
+                            <span class="topicTitCss">第{{ kin + 1 }}题:</span>
+                            <div class="isDTitle2JsonTit">
+                              {{ k.json.title }}
+                            </div>
+                          </div>
+                          <div style="color: rgba(0, 0, 0, 0.4)">
+                            [{{ selectType2(k.type, k.json.type) }}]
+                          </div>
+                        </div>
+                        <div class="IsDAnswer">
+                          {{ i.array[kin].json.answer2 }}
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+
+                <div style="width: 100%; display: flex; justify-content: end">
+                  <div
+                    @click="i.cut = !i.cut"
+                    style="
+                      display: flex;
+                      flex-direction: column;
+                      align-items: center;
+                    "
+                  >
+                    <img
+                      src="../../../../assets/icon/fileIcon/retractImg.png"
+                      alt=""
+                    />
+                    <div style="color: rgba(0, 0, 0, 0.4); font-size: 16px">
+                      收起
+                    </div>
+                  </div>
+                </div>
+              </div>
+
+              <div
+                style="
+                  height: 1px;
+                  background-color: #717c8d;
+                  width: 100%;
+                  margin-bottom: 10px;
+                "
+              ></div>
+            </div>
+
+            <!-- <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
+              style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+              @filter-change="handleFilterChange">
+              <el-table-column fixed label="序号" width="80px" align="left">
+                <template slot-scope="scope">
+                  {{ scope.$index + 1 }}
+                </template>
+              </el-table-column>
+              <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
+              </el-table-column>
+              <el-table-column prop="time" label="提交时间" width="170px" align="left">
+								<template slot-scope="scope">
+									<span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
+								</template>
+              </el-table-column>
+              <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
+                :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : item.type ==  6? item.nameFilters : null"
+                :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
+                :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
+
+                <template slot-scope="scope">
+                  <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
+                    <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
+                      :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
+                  </div>
+                  <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
+                    {{ scope.row.array[index].json.answer2 }}
+                  </div>
+                  <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
+                    class="table_file">
+                    <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
+                      :key="index + '-' + index2" @click.stop="checkFile(file)">
+                      <img class="download" src="../../../../assets/icon/fileIcon/download.png"
+                        @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
+                      <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
+                      <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
+                      <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
+                      <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
+                      <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
+                      <div class="name">
+                        <el-tooltip :content="file.name" placement="top" effect="dark">
+                          <span>{{ file.name }}</span>
+                        </el-tooltip>
+                      </div>
+                    </div>
+                  </div>
+                  <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
+                    {{ scope.row.array[index].json.answer2}}
+                  </div>
+                  <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
+                    {{ getScore(scope.row.array[index].json) }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
+
+                <template slot-scope="scope">
+                  <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
+                  <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
+                  <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table> -->
+          </div>
+          <div class="table_content" v-if="stype == 3">
+            <div class="student_table">
+              <el-table
+                ref="table"
+                :data="tableData"
+                border
+                :fit="true"
+                v-loading="isLoading"
+                style="width: 100%"
+                :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+                :row-class-name="tableRowClassName"
+              >
+                <el-table-column
+                  prop="username"
+                  label="提交人"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="time"
+                  label="提交时间"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column label="是否批改" min-width="15" align="center">
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type == 3 ? "是" : "否" }}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" width="300px" v-if="isDesktop">
+                  <template slot-scope="scope">
+                    <el-button
+                      @click="getTest(scope.row)"
+                      type="primary"
+                      size="small"
+                      >查看</el-button
+                    >
+                    <el-button
+                      @click="setWordHtml2(scope.row)"
+                      type="primary"
+                      size="small"
+                      >导出答题信息</el-button
+                    >
+                    <el-button
+                      @click="deleteTest(scope.row.id)"
+                      type="primary"
+                      size="small"
+                      >删除</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div class="student_page">
+              <el-pagination
+                background
+                layout="prev, pager, next"
+                :page-size="pageSize"
+                :total="total"
+                @current-change="handleCurrentChange"
+              >
+              </el-pagination>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <share-box
+      :testJson="testJson"
+      :TeachingValue="TeachingValue"
+      :TeachName="TeachNameCpt"
+      :dialogVisibleShare.sync="dialogVisibleShare"
+    ></share-box>
+    <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
+    <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
+    <wOffice
+      :dialogVisibleOffice.sync="dialogVisibleOffice"
+      :url="wurl"
+    ></wOffice>
+
+    <docxTemplateDialog
+      ref="docxTemplateDialogRef"
+      @changeCover="changeCover"
+    />
+  </div>
+</template>
+
+<script>
+import shareBox from "../shareBox/index.vue";
+import videoIcon from "../../../../assets/icon/fileIcon/isVideo.png";
+import wordIcon from "../../../../assets/icon/fileIcon/isWord.png";
+import fileIcon from "../../../../assets/icon/fileIcon/word2.png";
+
+import wVideo from "../file/wVideo.vue";
+import wpdf from "../file/wPdf2.vue";
+import wOffice from "../file/wOffice.vue";
+
+import wordcloud from "vue-wordcloud";
+import checkPie from "../data/checkPie.vue";
+
+import { downloadPDF } from "../../../tools/pdf";
+import JSZip from "jszip";
+import FileSaver from "file-saver";
+
+import XLSX from "xlsx-js-style";
+import aiBoxRight from "./aiBoxRight.vue";
+
+import { v4 as uuidv4 } from "uuid";
+
+// word模板
+import docxTemplateDialog from "./docxTemplateDialog";
+
+const getFile = (url) => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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",
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2
+        .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+        .replace(/\+/g, " ")
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name,
+    };
+    s3.getObject(params, function (err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        resolve({ data: data.Body });
+        console.log(data);
+      } // sxuccessful response
+    });
+    // axios({
+  });
+};
+
+export default {
+  components: {
+    shareBox,
+    wVideo,
+    wpdf,
+    wOffice,
+    checkPie,
+    wordcloud,
+    aiBoxRight,
+    docxTemplateDialog,
+  },
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      cid: this.$route.query.cid,
+      isN: this.$route.query.isN,
+      peopleId: this.$route.query.peopleId,
+      screenWidth: window.innerWidth,
+      isDesktop: false,
+      aiChatV: false,
+      title: "",
+      testType: [],
+      see: false,
+      cJson: [],
+      loading: false,
+      look: "",
+      TeachingOptions: [],
+      TeachingValue: "",
+      SubmitTimeOptions: [],
+      SubmitTime: "",
+      tableHeight: 500,
+      isLoading: false,
+      pageSize: 10,
+      total: 0,
+      page: 1,
+      tableData: [],
+      testJson: {},
+      works: [],
+      iscount: 0,
+      pcount: 0,
+      stype: 1,
+      courseName: "",
+      dialogVisibleShare: false,
+      worksArray: [],
+      tableWorksArray: [],
+      testArray: [],
+      options2: {
+        1: "选择题",
+        // 2: "问答题",
+        3: "问答题",
+        4: "添加文档",
+        5: "附件",
+      },
+      videoIcon: videoIcon,
+      wordIcon: wordIcon,
+      fileIcon: fileIcon,
+      dialogVisiblePdf: false,
+      dialogVisibleVideo: false,
+      dialogVisibleOffice: false,
+      wurl: "",
+      chapters: [],
+      filterPlacement: "bottom-end",
+      pdfLoading: false,
+      btnDisplay: false,
+
+      fileLoading: [],
+      selectWorkList: [],
+      tableDatePicker: [],
+      submissionTimePicker:[],
+      // fileLoadCount: [],
+      // fileLoadNum: [],
+      // infoprogress: [],
+      teaType: [],
+    };
+  },
+  watch: {},
+  computed: {
+    TeachNameCpt: function () {
+      // `this` 指向 vm 实例
+      return this.TeachingOptions.filter((i) => {
+        return i.id == this.TeachingValue;
+      });
+    },
+    // vcWords() {
+    //   return function (array) {
+    //     let _array = [];
+    //     if (array.length) {
+    //       for (var i = 0; i < array.length; i++) {
+    //         _array.push(
+    //           {
+    //             text: array[i].name,
+    //             weight: array[i].count,
+    //           }
+    //         )
+    //       }
+    //     }
+    //     console.log(_array);
+    //     return array.length ? _array : [];
+    //   };
+    // },
+    getScore() {
+      return function (item) {
+        let array = [];
+        for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
+          array.push(i);
+        }
+        return item.answer2 ? array[item.answer2] : "";
+      };
+    },
+    selectType() {
+      return function (item) {
+        if (item.type == 1 && item.atype == 2) {
+          return "多选题";
+        } else if (item.type == 1 && item.atype == 1) {
+          return "单选题";
+        } else if (item.type == 3) {
+          return "问答题";
+        } else if (item.type == 5) {
+          return "附件";
+        } else if (item.type == 6 || item.type == 11) {
+          return "课程";
+        } else if (item.type == 7) {
+          return "评分";
+        } else if (item.type == 8) {
+          return "日期";
+        }
+      };
+    },
+    selectType2() {
+      return function (val1, val2) {
+        if (val1 == 1 && val2 == 2) {
+          return "多选题";
+        } else if (val1 == 1 && val2 == 1) {
+          return "单选题";
+        } else if (val1 == 3) {
+          return "问答题";
+        } else if (val1 == 5) {
+          return "附件";
+        } else if (val1 == 6) {
+          return "课程";
+        } else if (val1 == 7) {
+          return "评分";
+        } else if (val1 == 8) {
+          return "日期";
+        }
+      };
+    },
+    // 获取评分的平均分
+    getAverageScore() {
+      return (_index) => {
+        let _result = 0;
+        let _sum = 0;
+        this.worksArray.forEach((i1) => {
+          _result += i1.array[_index].json.answer2;
+          _sum += 1;
+        });
+        _result = _sum ? (_result / _sum).toFixed(2) : 0;
+        return _result ? _result : 0;
+      };
+    },
+    getTimeFilterText() {
+      return (item, index) => {
+        let _result = [];
+        if (item.type == 8) {
+          let array = [];
+          this.worksArray.forEach((i) => {
+            if (i.array[index].type == 8) {
+              let _data = i.array[index].json.answer2;
+              if (!array.map((r) => r.value).includes(_data)) {
+                array.push({ text: _data, value: _data });
+              }
+            }
+          });
+          array.sort((a, b) => {
+            const dateA = new Date(
+              a.value.replace(/年|月/g, "-").replace(/日/g, "")
+            );
+            const dateB = new Date(
+              b.value.replace(/年|月/g, "-").replace(/日/g, "")
+            );
+            return dateB - dateA; // 从小到大排序
+          });
+
+          console.log("👉排序:", array);
+          _result = array;
+        }
+        return _result;
+      };
+    },
+    getTType() {
+      return function (pid, cclassid) {
+        if(cclassid){
+          let string = [];
+          this.teaType.forEach((e) => {
+            if (e.id == pid) {
+              for (var i = 0; i < e.child.length; i++) {
+                if (cclassid.includes(e.child[i].id)) {
+                  string.push(e.child[i].name);
+                }
+              }
+            }
+          });
+          return string.length ? string.join(",") : "-";
+        }else{
+          return "-";
+        }
+
+      };
+    },
+    getNameTTypeFiler() {
+      return (item) => {
+        return item.child.length ? item.child.map(child => ({
+          text: child.name,
+          value: child.id
+        })) : null;
+      };
+    }
+  },
+  methods: {
+    openChat() {
+      this.aiChatV = !this.aiChatV;
+      this.$nextTick(() => {
+        const boxStickyHeight = this.$refs.boxSticky
+          ? this.$refs.boxSticky.offsetHeight
+          : 0;
+        const chatHeight = `calc(100% - ${boxStickyHeight}px - 46px)`;
+        // this.$refs.aiChat.$el.style.height = chatHeight;
+        this.$refs.aiBoxRightDivRef.style.height = chatHeight;
+      });
+    },
+    fileClose(done) {
+      done();
+    },
+    //获取教研室列表
+    getClass2() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then((res) => {
+          console.log("this.TeachingOptions", this.TeachingOptions);
+          console.log(res.data);
+          let data = res.data[0];
+          this.TeachingOptions.forEach((e) => {
+            data.forEach((i) => {
+              if (e.id == i.id) {
+                e.name = i.name;
+              }
+            });
+          });
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    getClass3() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then((res) => {
+          console.log(res.data);
+          this.TeachingOptions = res.data[0].filter((item) => {
+            return item.parentid == "6";
+          });
+          // console.log('this.TeachingOptions',this.TeachingOptions);
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    filterName(value, row, index) {
+      let name = [];
+      for (var i = 0; i < row.array[index].json.answer2.length; i++) {
+        name.push(
+          row.array[index].json.array[row.array[index].json.answer2[i]].option
+        );
+      }
+      console.log(name.indexOf(value) != -1);
+      return name.indexOf(value) != -1;
+    },
+    // 筛选课程
+    filterCourse(value, row, index) {
+      return row.array[index].json.answer2.indexOf(value) != -1;
+    },
+    //筛选日期
+    filterTime(value, row, index) {
+      return row.array[index].json.answer2.indexOf(value) != -1;
+    },
+    filterTType(value, row, index) {
+      return row.cclassid && row.cclassid.indexOf(value) != -1;
+    },
+    wordClickHandler(name, value) {
+      //  this.$notify({
+      //   title: name,
+      //   message: "数量:"+value
+      // });
+    },
+    retrunCourse() {
+      this.goTo(
+        "/test?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    changeHeight() {
+      if (this.stype == 1) {
+        return;
+      }
+      this.tableHeight = this.$refs.stepBox.offsetHeight - 120;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function () {
+        if (self.stype == 1) {
+          return;
+        }
+        self.tableHeight = this.$refs.stepBox.offsetHeight - 120;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
+        }
+      };
+      // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getData2();
+    },
+    getTest(row) {
+      this.$router.push(
+        "/checkTest2?cid=" +
+          row.courseid +
+          "&userid=" +
+          this.userid +
+          "&userid2=" +
+          row.userid +
+          "&tid=" +
+          row.id +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=2" +
+          "&role=" +
+          this.role
+      );
+    },
+    checkDataType(type) {
+      this.TeachingValue = "";
+      if (this.stype != type) {
+        this.stype = type;
+        this.courseName = "";
+        if (type == 3) {
+          this.getData2();
+        } else {
+          this.getData();
+        }
+        this.changeHeight();
+      }
+    },
+    searchCourse() {
+      if (this.stype == 3) {
+        this.getData2();
+      } else {
+        this.getData();
+      }
+    },
+
+    getData() {
+      this.isLoading = true;
+      let params = [
+        {
+          cid: this.cid,
+          cn: this.courseName,
+          tim: !this.SubmitTime ? "" : this.SubmitTime,
+          tea: this.TeachingValue,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "getTestWorksNoPageCopy2", params)
+        .then(async (res) => {
+          this.testJson = res.data[0][0];
+          console.log(
+            "this.testJson",
+            JSON.parse(JSON.stringify(this.testJson))
+          );
+
+          let a = "";
+          if (this.testJson.juriP) {
+            a = this.testJson.juriP;
+          }
+          if (this.testJson.juriP2) {
+            if (a) {
+              a = this.testJson.juriP + "," + this.testJson.juriP2;
+            } else {
+              a = this.testJson.juriP2;
+            }
+          }
+          this.testJson.juriP = a;
+
+          if (this.testJson.juriP) {
+            let ajuri2 = this.testJson.juri2.split(",");
+            this.TeachingOptions = ajuri2.map((key, index) => ({
+              id: key,
+              name: "",
+            }));
+            this.getClass2();
+          } else {
+            this.getClass3();
+          }
+
+          // console.log('dddd',this.TeachingOptions);
+
+          this.works = res.data[1];
+          this.iscount = res.data[2][0].count;
+          this.pcount = res.data[3][0].count;
+          let chapters = this.setJSON(
+            this.setJson2(
+              JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
+            )
+          );
+          this.chapters = this.setFilter(
+            this.JSONSetting(
+              JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
+            )
+          );
+          let courseCount11 = [];
+          let testArray = [];
+          let array = [];
+          let courseIds = []; // 初始化一个空数组来存储所有的courseId
+          for (let i = 0; i < this.works.length; i++) {
+            let cJson = this.setJSON(
+              JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
+            );
+            if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
+              let _json = this.JSONSetting(
+                JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
+              );
+
+              for (var ja = 0; ja < _json.length; ja++) {
+                let _json2 = _json[ja].json;
+                if (_json[ja].type == 6) {
+                  let courseId = _json2.answer2;
+                  courseIds.push(courseId); // 将type为6的courseId添加到数组中
+                }
+                if (_json[ja].type == 11) {
+                  let _answer = _json2.answer2;
+                  _answer.length
+                    ? (courseCount11 = courseCount11.concat(_answer))
+                    : "";
+                  _json[ja].json.courseId = _answer ? _answer : [];
+                  courseIds = courseIds.concat(_answer); // 将type为11的courseId添加到数组中
+                }
+              }
+            }
+          }
+
+          // 将所有的courseId去重
+          courseIds = Array.from(new Set(courseIds));
+          // 使用一个数组来存储所有的courseId后,执行getCourseInfoTestAll
+          let courseTitles = {}; // 初始化一个空对象来存储所有的courseTitles
+          let params2 = [
+            {
+              cid: courseIds.join(","),
+            },
+          ];
+
+          let data2 = await this.ajax.post(
+            this.$store.state.api + "getCourseInfoTestAll2",
+            params2
+          );
+          let result2 = data2.data[0];
+          result2.forEach((i) => {
+            // _title.push(i.title);
+            courseTitles[i.courseId] = i.title;
+          });
+
+          for (let i = 0; i < this.works.length; i++) {
+            let cJson = this.setJSON(
+              JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
+            );
+            if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
+              let _json = this.JSONSetting(
+                JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
+              );
+
+              _json.forEach((item) => {
+                if (item.type == 11) {
+                  let cid = item.json.answer2;
+                  let _title = [];
+                  for (var i = 0; i < cid.length; i++) {
+                    _title.push(courseTitles[cid[i]]);
+                  }
+                  item.json.answer2 = _title.length ? _title.join(",") : "";
+                }
+                if (item.type == 6) {
+                  let courseId = item.json.answer2;
+                  item.json.answer2 = courseTitles[courseId] || "";
+                }
+              });
+              // 更新对应的_json对象的answer2
+              array.push({
+                courseid: this.works[i].courseid,
+                cclassid: this.works[i].cclassid,
+                id: this.works[i].id,
+                userid: this.works[i].userid,
+                name: this.works[i].username ? this.works[i].username : "匿名",
+                time: this.works[i].time,
+                array: _json,
+                cut: 0,
+                uteaName: this.works[i].uteaName,
+                courseJson: JSON.parse(this.works[i].courseJson),
+              });
+            }
+          }
+
+          let allCourseIds = [];
+          for (var i = 0; i < this.chapters.length; i++) {
+            let el = this.chapters[i];
+            let topic = {
+              type: el.type,
+              cut: 0,
+              title: el.json ? el.json.title : "",
+              detail: el.json ? el.json.detail : "",
+              atype: el.json ? el.json.type : "",
+              choice: el.json ? el.json.array : "",
+              array: [],
+              answer: el.json ? el.json.answer : "",
+              answer2: "",
+              count: 0,
+              courses: el.json ? el.json.courses : [],
+              small: el.json ? el.json.small : "",
+              big: el.json ? el.json.big : "",
+            };
+            if (topic.type == 1) {
+              for (var t = 0; t < topic.choice.length; t++) {
+                topic.array.push({
+                  name: topic.choice[t].option,
+                  count: 0,
+                });
+              }
+            } else if (topic.type == 3) {
+            } else if (topic.type == 5) {
+            } else if (topic.type == 6) {
+              let _answer = topic.array;
+
+              allCourseIds = allCourseIds.concat(_answer);
+            } else if (topic.type == 7) {
+              for (
+                var t = parseInt(topic.small);
+                t <= parseInt(topic.big);
+                t++
+              ) {
+                topic.array.push({
+                  name: t,
+                  count: 0,
+                });
+              }
+            } else if (topic.type == 11) {
+              const uniqueArray = courseCount11.filter(
+                (item, index) => courseCount11.indexOf(item) === index
+              );
+              let _answer = uniqueArray;
+
+              allCourseIds = allCourseIds.concat(_answer);
+            }
+            for (var j = 0; j < array.length; j++) {
+              let el2 = array[j];
+              if (topic.type == 1) {
+                let _answer = el2.array[i].json.answer2;
+                for (var k = 0; k < _answer.length; k++) {
+                  topic.array[_answer[k]].count++;
+                  topic.count++;
+                }
+              } else if (topic.type == 3 || topic.type == 8) {
+                let type3 = 1;
+                let _answer = el2.array[i].json.answer2;
+                if (_answer) {
+                  for (var k = 0; k < topic.array.length; k++) {
+                    if (topic.array[k].name == _answer) {
+                      topic.array[k].count++;
+                      type3 = 2;
+                      topic.count++;
+                      break;
+                    }
+                  }
+                  if (type3 == 1) {
+                    topic.array.push({
+                      name: _answer,
+                      count: 1,
+                    });
+                  }
+
+                  let limit = 10;
+
+                  if(topic.array.length>limit){
+                    topic.showArray = topic.array.slice(0,limit)
+                    topic.nowPage = 1;
+                    topic.total = topic.array.length;
+                    topic.limit = limit;
+                  }else{
+                    topic.showArray = topic.array;
+                  }
+
+									topic.loadingWordCloud = false;
+									topic.wordCloutData = null;
+                }
+              } else if (topic.type == 5) {
+                let _answer = el2.array[i].json.file
+                  ? el2.array[i].json.file
+                  : [];
+                let _user = { userid: el2.userid, username: el2.name };
+                for (var k = 0; k < _answer.length; k++) {
+                  topic.array.push({ ..._answer[k], ..._user });
+                }
+              } else if (topic.type == 7) {
+                if (el2.array[i].json.answer2) {
+                  let _answer = el2.array[i].json.answer2;
+                  topic.array[_answer].count++;
+                  topic.count++;
+                }
+              } else if (topic.type == 6) {
+                if (el2.array[i].json.courses) {
+                  let _answer = el2.array[i].json.courses.length
+                    ? el2.array[i].json.courses.join(",")
+                    : "";
+                  topic.answer2 = _answer;
+                }
+              } else if (topic.type == 11) {
+                const uniqueArray = courseCount11.filter(
+                  (item, index) => courseCount11.indexOf(item) === index
+                );
+                let _answer = uniqueArray;
+                topic.answer2 = _answer;
+              }else if(topic.type == 13){
+                if (el2.array[i].json.answer2!=='') {
+                  let _answer = String(el2.array[i].json.answer2);
+                  let _type = el2.array[i].json.type;
+                  console.log("👉",el2.array[i].json)
+                  if(_type=='4')_answer+='%';
+                  if(!topic.array)topic.array=[];
+                  if(topic.array.findIndex(i=>i.name==_answer)!=-1){
+                    topic.array.find(i=>i.name==_answer).count++;
+                  }else{
+                    topic.array.push({
+                      name:_answer,
+                      count:1
+                    })
+                  }
+                  topic.count++;
+                }
+              }
+            }
+            console.log("topictopictopictopic", topic);
+            testArray.push(topic);
+            this.fileLoading.push({
+              bool: false,
+              count: 0,
+              load: 0,
+              progress: 0,
+            });
+          }
+
+          // 去重courseId
+          allCourseIds = Array.from(new Set(allCourseIds));
+
+          let params = [
+            {
+              cid: allCourseIds.join(","),
+            },
+          ];
+
+          let data = await this.ajax.post(
+            this.$store.state.api + "getCourseInfoTestAll2",
+            params
+          );
+          let result = data.data[0];
+
+          for (var i = 0; i < this.chapters.length; i++) {
+            let el = this.chapters[i];
+            let topic = testArray[i];
+            if (topic.type == 6 || topic.type == 11) {
+              result.forEach((i) => {
+                i.update_at = new Date(i.update_at)
+                  .toLocaleString("zh-CN", {
+                    year: "numeric",
+                    month: "2-digit",
+                    day: "2-digit",
+                    hour: "2-digit",
+                    minute: "2-digit",
+                    second: "2-digit",
+                    hour12: false,
+                  })
+                  .replace(/\//g, "-");
+              });
+              if (topic.type == 6) {
+                result.forEach((elc) => {
+                  if (
+                    this.chapters
+                      .find((f) => f.type == 6)
+                      .nameFilters.find((c) => c.value == elc.title) ==
+                      undefined &&
+                    topic.answer2.includes(elc.courseId)
+                  ) {
+                    this.chapters
+                      .find((c) => c.type == 6)
+                      .nameFilters.push({ text: elc.title, value: elc.title });
+                  }
+                });
+              } else if (topic.type == 11) {
+                result.forEach((elc) => {
+                  if (
+                    this.chapters
+                      .find((f, index) => index == i)
+                      .nameFilters.find((c) => c.value == elc.title) ==
+                      undefined &&
+                    topic.answer2.includes(elc.courseId)
+                  ) {
+                    this.chapters
+                      .find((c, index) => index == i)
+                      .nameFilters.push({ text: elc.title, value: elc.title });
+                  }
+                });
+              }
+
+              // this.chapters.find(i=>i.type==6 || i.type==11).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
+              if (topic.answer2.length) {
+                let _answer = topic.answer2;
+                topic.courseArray = result.filter((el) => {
+                  return _answer.includes(el.courseId);
+                });
+              } else {
+                topic.courseArray = [];
+              }
+              // topic.courseArray = result
+            }
+          }
+          this.testArray = testArray;
+          this.worksArray = array;
+          this.tableWorksArray = array;
+          this.isLoading = false;
+
+          this.teaType = res.data[5];
+          let typeInfo = res.data[6];
+
+          this.teaType.forEach((e) => {
+            e.child = [];
+            e.value = [];
+            typeInfo.forEach((i) => {
+              if (e.id == i.parentid) {
+                e.child.push({ id: i.id, name: i.name });
+              }
+            });
+          });
+          console.log(this.teaType, "teaType");
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    getData2() {
+      this.isLoading = true;
+      let params = {
+        cid: this.cid,
+        page: this.page,
+        pageSize: this.pageSize,
+        cn: this.courseName,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksPage3", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    setJSON(json) {
+      return json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json) {
+              delete item2.json.answer2;
+              delete item2.json.score2;
+              delete item2.json.file;
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json) {
+                  delete item3.json.answer2;
+                  delete item3.json.score2;
+                  delete item3.json.file;
+                }
+                return item3;
+              });
+            }
+            return item2;
+          });
+        } else if (item.ttype == 1 && item.json) {
+          delete item.json.answer2;
+          delete item.json.score2;
+          delete item.json.file;
+        }
+        return item;
+        console.log(item.array);
+      });
+    },
+    setJson2(json) {
+      let _json = json;
+      // this.type = _json[0].ttype;
+      let checkArray = _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
+              item2.json.answer2 = [];
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
+                  item3.json.answer2 = [];
+                }
+                return item3;
+              });
+            }
+            return (
+              (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
+            );
+          });
+        }
+        if (item.ttype == 1 && item.json && !item.json.answer2) {
+          item.json.answer2 = [];
+        }
+        console.log(item.array);
+        return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
+      });
+      console.log(checkArray);
+      return checkArray;
+    },
+    JSONSetting(json) {
+      let _json = json;
+      let array = [];
+      _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json) {
+              array.push(item2);
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json) {
+                  array.push(item3);
+                }
+                return item3;
+              });
+            }
+            return item2;
+          });
+        }
+        if (item.ttype == 1 && item.json) {
+          array.push(item);
+        }
+        console.log(item.array);
+        return item;
+      });
+      console.log(array);
+      return array;
+    },
+    setFilter(json) {
+      let _json = json;
+      let array = [];
+      _json.filter((item) => {
+        (item.nameFilters = []),
+          (item.filterParams = {
+            name: [],
+          });
+        if (item.type == 1) {
+          for (var i = 0; i < item.json.array.length; i++) {
+            item.nameFilters.push({
+              text: item.json.array[i].option,
+              value: item.json.array[i].option,
+            });
+          }
+        }
+
+        array.push(item);
+        return item;
+      });
+      return array;
+    },
+    checkFile(item) {
+      if (item.type == 3) {
+        this.$hevueImgPreview(item.url);
+      } else if (item.type == 5) {
+        this.downloadFile(item);
+      } else if (item.type == 1) {
+        this.dialogVisibleOffice = true;
+        this.wurl = item.url;
+      } else if (item.type == 2) {
+        this.dialogVisibleVideo = true;
+        this.wurl = item.url;
+      } else if (item.type == 4) {
+        this.dialogVisiblePdf = true;
+        this.wurl = item.url;
+      }
+    },
+    downloadFile(f) {
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+      let url2 = f.url;
+      let _url2 = "";
+      if (
+        url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+      ) {
+        _url2 = url2.split(
+          "https://view.officeapps.live.com/op/view.aspx?src="
+        )[1];
+      } else {
+        _url2 = url2;
+      }
+      let _this = this;
+
+      _this.downLoading = _url2;
+      var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+      let name = decodeURIComponent(
+        _url2
+          .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+          .replace(/\+/g, " ")
+      );
+      var params = {
+        Bucket: "ccrb",
+        Key: name,
+      };
+      s3.getObject(params, function (err, data) {
+        _this.downLoading = "";
+        if (err) console.log(err, err.stack); // an error occurred
+        else {
+          let url = window.URL.createObjectURL(new Blob([data.Body]));
+          let a = document.createElement("a");
+          a.name = f.name;
+          a.href = url;
+          a.download = f.name;
+          a.click();
+          console.log(data);
+        } // sxuccessful response
+      });
+    },
+    deleteTest(tid) {
+      let _this = this;
+      _this
+        .$confirm("确定删除此提交的表单么?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          let params = [
+            {
+              tid: tid,
+            },
+          ];
+          _this.ajax
+            .post(_this.$store.state.api + "deleteTestCourseWorks", params)
+            .then((res) => {
+              _this.$message.success("删除成功");
+              if (_this.stype == 3) {
+                _this.getData2();
+              } else {
+                _this.getData();
+              }
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        })
+        .catch(() => {
+          return;
+        });
+    },
+    exportPDF() {
+      this.pdfLoading = true;
+      var a = document.getElementsByTagName("img");
+      for (var i = 0; i < a.length; i++) {
+        a[i].crossOrigin = "*";
+      }
+      downloadPDF(this.$refs.stepBox, this.testJson.title, () => {
+        var _a = document.getElementsByTagName("img");
+        for (var i = 0; i < _a.length; i++) {
+          _a[i].removeAttribute("crossorigin");
+        }
+        setTimeout(() => {
+          this.pdfLoading = false;
+        }, 2000);
+      });
+    },
+    score(json) {
+      let score = 0;
+      json.forEach((el) => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach((item) => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach((item2) => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score ? parseFloat(item2.json.score) : 0;
+                }
+              });
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score ? parseFloat(item.json.score) : 0;
+            }
+          });
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score ? parseFloat(el.json.score) : 0;
+        }
+      });
+      return score > 0 ? score + "分" : "";
+    },
+    score2(json) {
+      let score = 0;
+      // let type = 1
+      json.forEach((el) => {
+        if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
+          el.array.forEach((item) => {
+            if (item.ttype == 2 && item.array.length > 0) {
+              item.array.forEach((item2) => {
+                if (item2.ttype == 1 && item2.json) {
+                  score += item2.json.score2
+                    ? parseFloat(item2.json.score2)
+                    : 0;
+                }
+              });
+            } else if (item.ttype == 1 && item.json) {
+              score += item.json.score2 ? parseFloat(item.json.score2) : 0;
+            }
+          });
+        } else if (el.ttype == 1 && el.json) {
+          score += el.json.score2 ? parseFloat(el.json.score2) : 0;
+        }
+      });
+      return score + "分";
+    },
+    setWordHtml(data) {
+      let _data = data;
+
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let score = this.score(data.courseJson);
+      let isScore = this.score2(data.courseJson);
+      let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
+        _data.name
+      }</b>${scoreContent}(填写范围)${
+        this.testJson.juriP ? this.testJson.juriP : "所有人"
+      }(提交时间)${_data.time}</div>`;
+      let _detail = this.testJson.brief
+        ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
+        : "";
+
+      let _test = `<div style='margin-top:40px;'>`;
+      for (let i = 0; i < _data.array.length; i++) {
+        let item = _data.array[i];
+        let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
+          item.json.title
+        }</div>`;
+        _test += _div;
+        if (item.type == 1) {
+          for (let j = 0; j < item.json.array.length; j++) {
+            let check = item.json.array[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${
+              item.json.answer2 && item.json.answer2.indexOf(j) !== -1
+                ? "☑"
+                : "☐"
+            } ${check.option}</div>`;
+            _test += _option;
+          }
+        } else if (item.type == 3 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 5 && item.json.file) {
+          for (let j = 0; j < item.json.file.length; j++) {
+            let check = item.json.file[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
+            _test += _option;
+          }
+        } else if (item.type == 6 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 7 && item.json.answer2) {
+          let _score = this.getScore2(item.json);
+          let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
+          _test += _option;
+        } else if (item.type == 8 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 11 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        }
+      }
+      _test += `</div>`;
+      let _html = _title + _content + _detail + _test;
+      this.exportToWord(_data.name + "-" + _data.time, _html);
+    },
+    setWordHtml2(data) {
+      let _data = data;
+      _data.array = this.JSONSetting(
+        JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
+      );
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let score = this.score(JSON.parse(data.courseJson));
+      let isScore = this.score2(JSON.parse(data.courseJson));
+      let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
+        _data.username ? _data.username : "匿名"
+      }</b>${scoreContent}(填写范围)${
+        this.testJson.juriP ? this.testJson.juriP : "所有人"
+      }(提交时间)${_data.time}</div>`;
+      let _detail = this.testJson.brief
+        ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
+        : "";
+
+      let _test = `<div style='margin-top:40px;'>`;
+      for (let i = 0; i < _data.array.length; i++) {
+        let item = _data.array[i];
+        let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
+          item.json.title
+        }</div>`;
+        _test += _div;
+        if (item.type == 1) {
+          for (let j = 0; j < item.json.array.length; j++) {
+            let check = item.json.array[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${
+              item.json.answer2 && item.json.answer2.indexOf(j) !== -1
+                ? "☑"
+                : "☐"
+            } ${check.option}</div>`;
+            _test += _option;
+          }
+        } else if (item.type == 3 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 5 && item.json.file) {
+          for (let j = 0; j < item.json.file.length; j++) {
+            let check = item.json.file[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
+            _test += _option;
+          }
+        } else if (item.type == 6 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 7 && item.json.answer2) {
+          let _score = this.getScore2(item.json);
+          let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
+          _test += _option;
+        } else if (item.type == 8 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 11 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        }
+      }
+      _test += `</div>`;
+      let _html = _title + _content + _detail + _test;
+      this.exportToWord(
+        _data.username ? _data.username : "匿名" + "-" + _data.time,
+        _html
+      );
+    },
+    async exportToWord(a, html) {
+      // 将html文件中需要用到的数据挂载到store上
+      const content = `<!DOCTYPE html>
+      <html lang="en">
+      <head>
+          <meta charset="UTF-8">
+          <meta http-equiv="X-UA-Compatible" content="IE=edge">
+          <meta name="viewport" content="width=device-width, initial-scale=1.0">
+          <title>${a}</title>
+          <style>
+          </style>
+      </head>
+      <body>
+      ${html}
+      </body>
+      </html>`;
+      // debugger
+      // 生成报告
+      const link = document.createElement("a");
+      let dname = a + ".doc";
+      // link.download = "报告.html"; // 文件名
+      link.download = dname; // 文件名
+      link.style.display = "none";
+      // 创建文件流
+      // 创建bolb实例时,内容一定要放在[]中
+      const blob = new Blob([content], {
+        type: "text/plain;charset='utf-8'",
+      });
+      link.href = window.URL.createObjectURL(blob);
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    },
+    setWordHtmlAll(data) {
+      let _data = data;
+
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let score = this.score(data.courseJson);
+      let isScore = this.score2(data.courseJson);
+      let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
+        _data.name
+      }</b>${scoreContent}(填写范围)${
+        this.testJson.juriP ? this.testJson.juriP : "所有人"
+      }(提交时间)${_data.time}</div>`;
+      let _detail = this.testJson.brief
+        ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
+        : "";
+
+      let _test = `<div style='margin-top:40px;'>`;
+      for (let i = 0; i < _data.array.length; i++) {
+        let item = _data.array[i];
+        let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
+          item.json.title
+        }</div>`;
+        _test += _div;
+        if (item.type == 1) {
+          for (let j = 0; j < item.json.array.length; j++) {
+            let check = item.json.array[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${
+              item.json.answer2 && item.json.answer2.indexOf(j) !== -1
+                ? "☑"
+                : "☐"
+            } ${check.option}</div>`;
+            _test += _option;
+          }
+        } else if (item.type == 3 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 5 && item.json.file) {
+          for (let j = 0; j < item.json.file.length; j++) {
+            let check = item.json.file[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
+            _test += _option;
+          }
+        } else if (item.type == 6 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 7 && item.json.answer2) {
+          let _score = this.getScore2(item.json);
+          let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
+          _test += _option;
+        } else if (item.type == 8 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 11 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
+          _test += _option;
+        }
+      }
+      _test += `</div>`;
+      let _html = _title + _content + _detail + _test;
+      return this.exportToWordAll(_data.name + "-" + _data.time, _html);
+    },
+    async setWordHtmlAll2(data) {
+      let _data = data;
+      _data.array = this.JSONSetting(
+        JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
+      );
+      let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
+      let score = this.score(JSON.parse(data.courseJson));
+      let isScore = this.score2(JSON.parse(data.courseJson));
+      let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
+      let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
+        _data.username ? _data.username : "匿名"
+      }</b>${scoreContent}(填写范围)${
+        this.testJson.juriP ? this.testJson.juriP : "所有人"
+      }(提交时间)${_data.time}</div>`;
+      let _detail = this.testJson.brief
+        ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
+        : "";
+
+      let _test = `<div style='margin-top:40px;'>`;
+      for (let i = 0; i < _data.array.length; i++) {
+        let item = _data.array[i];
+        let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
+          item.json.title
+        }</div>`;
+        _test += _div;
+        if (item.type == 1) {
+          for (let j = 0; j < item.json.array.length; j++) {
+            let check = item.json.array[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${
+              item.json.answer2 && item.json.answer2.indexOf(j) !== -1
+                ? "☑"
+                : "☐"
+            } ${check.option}</div>`;
+            _test += _option;
+          }
+        } else if (item.type == 3 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (item.type == 5 && item.json.file) {
+          for (let j = 0; j < item.json.file.length; j++) {
+            let check = item.json.file[j];
+            let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
+            _test += _option;
+          }
+        } else if (item.type == 6 && item.json.answer2) {
+          let _cjson = await this.getCourse(item.json.answer2);
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
+            _cjson ? _cjson.title : ""
+          }</div>`;
+          _test += _option;
+        } else if (item.type == 7 && item.json.answer2) {
+          let _score = this.getScore2(item.json);
+          let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
+          _test += _option;
+        } else if (item.type == 8 && item.json.answer2) {
+          let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
+          _test += _option;
+        } else if (
+          item.type == 11 &&
+          item.json.answer2 &&
+          item.json.answer2.length
+        ) {
+          let _answer = item.json.answer2;
+          _answer.length ? (courseCount11 = courseCount11.concat(_answer)) : "";
+          _json[ja].json.courseId = _answer ? _answer : [];
+          let params = [
+            {
+              cid: _answer.length ? _answer.join(",") : "",
+            },
+          ];
+
+          let data = await this.ajax.post(
+            this.$store.state.api + "getCourseInfoTestAll2",
+            params
+          );
+          let result = data.data[0];
+          let _title = [];
+          // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
+          result.forEach((i) => {
+            _title.push(i.title);
+          });
+
+          let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
+            _title.length ? _title.join(",") : ""
+          }</div>`;
+          _test += _option;
+        }
+      }
+      _test += `</div>`;
+      let _html = _title + _content + _detail + _test;
+      return this.exportToWordAll(
+        _data.username ? _data.username : "匿名" + "-" + _data.time,
+        _html
+      );
+    },
+    async exportToWordAll(a, html) {
+      // 将html文件中需要用到的数据挂载到store上
+      const content = `<!DOCTYPE html>
+      <html lang="en">
+      <head>
+          <meta charset="UTF-8">
+          <meta http-equiv="X-UA-Compatible" content="IE=edge">
+          <meta name="viewport" content="width=device-width, initial-scale=1.0">
+          <title>${a}</title>
+          <style>
+          </style>
+      </head>
+      <body>
+      ${html}
+      </body>
+      </html>`;
+      // debugger
+      // 生成报告
+      const link = document.createElement("a");
+      let dname = a + ".doc";
+      // link.download = "报告.html"; // 文件名
+      link.download = dname; // 文件名
+      link.style.display = "none";
+      // 创建文件流
+      // 创建bolb实例时,内容一定要放在[]中
+      const blob = new Blob([content], {
+        type: "text/plain;charset='utf-8'",
+      });
+      return blob;
+    },
+    exportAllWord() {
+      if (this.selectWorkList.length <= 0)
+        return this.$message.info("请先选择需要导出的表单数据");
+      this.pdfLoading = true;
+      const _chapInfo = this.selectWorkList; //this.worksArray
+      let url = [];
+      for (let i = 0; i < _chapInfo.length; i++) {
+        url.push({
+          name: _chapInfo[i].name + "-" + _chapInfo[i].time,
+          blob: this.setWordHtmlAll(_chapInfo[i]),
+        });
+      }
+      console.log(url);
+      this.downLoadAll(url);
+    },
+    exportAllWord2() {
+      this.pdfLoading = true;
+
+      let params = {
+        cid: this.cid,
+        page: 1,
+        pageSize: 999,
+        cn: this.courseName,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksPage3", params)
+        .then((res) => {
+          const _chapInfo = res.data[0];
+          let url = [];
+          for (let i = 0; i < _chapInfo.length; i++) {
+            url.push({
+              name: _chapInfo[i].username + "-" + _chapInfo[i].time,
+              blob: this.setWordHtmlAll2(_chapInfo[i]),
+            });
+          }
+          console.log(url);
+          this.downLoadAll(url);
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    downLoadAll(url) {
+      const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
+      const zip = new JSZip();
+      const cache = {};
+      data.forEach((item) => {
+        // 下载文件, 并存成ArrayBuffer对象
+        const file_name = item.name; // 获取文件名
+        zip.file(file_name + ".doc", item.blob, { binary: true }); // 逐个添加文件
+        cache[file_name] = item.blob;
+      });
+      zip.generateAsync({ type: "blob" }).then((content) => {
+        // 生成二进制流
+        FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件  自定义文件名
+        setTimeout(() => {
+          this.pdfLoading = false;
+        }, 2000);
+      });
+    },
+    handleFilterChange() {
+      console.log(this.$refs.table.store.states.data);
+    },
+    exportExcel() {
+      let res = this.$refs.table.store.states.data;
+      if (!res.length) {
+        this.$message.error("无导出数据");
+        return;
+      }
+      this.isLoading = true;
+      let chapters = this.chapters;
+
+      var array = [];
+      for (var i = 0; i < res.length; i++) {
+        var _json = {};
+        _json["序号"] = i + 1;
+        _json["提交人"] = res[i].name ? res[i].name : "匿名";
+        _json["提交时间"] = res[i].time;
+        for (var j = 0; j < chapters.length; j++) {
+          _json[j + 1 + "." + chapters[j].json.title] = "";
+          if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
+            let a = [];
+            for (
+              var answer2 = 0;
+              answer2 < res[i].array[j].json.answer2.length;
+              answer2++
+            ) {
+              a.push(
+                res[i].array[j].json.array[
+                  res[i].array[j].json.answer2[answer2]
+                ].option
+              );
+            }
+            _json[j + 1 + "." + chapters[j].json.title] = a.join("、");
+          } else if (
+            res[i].array[j].type == 3 &&
+            res[i].array[j].json.answer2
+          ) {
+            _json[j + 1 + "." + chapters[j].json.title] =
+              res[i].array[j].json.answer2;
+          } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
+            let files = [];
+            for (
+              let file = 0;
+              file < res[i].array[j].json.file.length;
+              file++
+            ) {
+              let check = res[i].array[j].json.file[file];
+              files.push(file + 1 + "." + check.name + "----" + check.url);
+            }
+            _json[j + 1 + "." + chapters[j].json.title] = files.join("\n");
+          } else if (
+            res[i].array[j].type == 6 &&
+            res[i].array[j].json.answer2
+          ) {
+            _json[j + 1 + "." + chapters[j].json.title] =
+              res[i].array[j].json.answer2;
+          } else if (
+            res[i].array[j].type == 7 &&
+            res[i].array[j].json.answer2
+          ) {
+            let _score = this.getScore2(res[i].array[j].json);
+            _json[j + 1 + "." + chapters[j].json.title] = _score;
+          } else if (
+            res[i].array[j].type == 8 &&
+            res[i].array[j].json.answer2
+          ) {
+            _json[j + 1 + "." + chapters[j].json.title] =
+              res[i].array[j].json.answer2;
+          } else if (
+            res[i].array[j].type == 11 &&
+            res[i].array[j].json.answer2
+          ) {
+            _json[j + 1 + "." + chapters[j].json.title] =
+              res[i].array[j].json.answer2;
+          }
+        }
+        array.push(_json);
+      }
+      let widthJson = [];
+      let widthArray = Object.keys(array[0]);
+      for (let i = 0; i < widthArray.length; i++) {
+        if (i == 0) {
+          widthJson.push({ wch: 5 });
+        } else {
+          widthJson.push({ wch: 30 });
+        }
+      }
+
+      const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
+      let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
+      ws["!cols"] = widthJson;
+      const styleObj = {
+        alignment: {
+          horizontal: "center",
+          vertical: "center", // 设置垂直居中
+        },
+      }; // 设置居中对齐和加粗样式
+
+      for (let cell in ws) {
+        if (!cell[0].startsWith("!")) {
+          ws[cell]["s"] = styleObj;
+        }
+      }
+
+      XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
+
+      XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
+      this.isLoading = false;
+      this.$message({
+        message: "导出成功",
+        type: "success",
+      });
+    },
+    async getCourse(id) {
+      let params = {
+        cid: id,
+      };
+      let res = await this.ajax.get(
+        this.$store.state.api + "getCourseInfoTest",
+        params
+      );
+      return res.data[0][0];
+    },
+    getScore2(item) {
+      let array = [];
+      for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
+        array.push(i);
+      }
+      return item.answer2 ? array[item.answer2] : "";
+    },
+    checkScreenSize() {
+      this.screenWidth = window.innerWidth;
+      this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
+    },
+    downloadFileType5(fileData, title = "附件", index) {
+      this.fileLoading[index].bool = true;
+      this.fileLoading[index].count = 0;
+      this.fileLoading[index].load = 0;
+      this.fileLoading[index].progress = 0;
+
+      let data = fileData;
+      const zip = new JSZip();
+      let downFileArray = [];
+      let uniqueArr = data.filter(
+        (v, i, a) => a.map((mb) => mb.userid).indexOf(v.userid) == i
+      );
+      uniqueArr.forEach((i) => {
+        downFileArray.push({
+          userid: i.userid,
+          username: i.username ? i.username : "匿名",
+          urlList: data.filter((d) => d.userid == i.userid).map((m) => m),
+        });
+      });
+      let promises = [];
+      console.log("downFileArray", downFileArray);
+      downFileArray.forEach((e) => {
+        this.fileLoading[index].count += e.urlList.length;
+      });
+
+      if (downFileArray.length == 1) {
+        //只有一位老师的情况
+        if (downFileArray[0].urlList.length > 1) {
+          //多个文件的情况
+          const folder = zip.folder(`${downFileArray[0].username}`);
+          downFileArray[0].urlList.forEach((i) => {
+            const promise = getFile(i.url).then((data) => {
+              if (data.data != 1) {
+                // 下载文件, 并存成ArrayBuffer对象
+                const file_name = i.name; // 获取文件名
+                folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
+              }
+              this.fileLoading[index].load += 1;
+              this.fileLoading[index].progress = parseInt(
+                (this.fileLoading[index].load / this.fileLoading[index].count) *
+                  100
+              );
+              if (
+                this.fileLoading[index].load == this.fileLoading[index].count
+              ) {
+                this.fileLoading[index].bool = false;
+              }
+            });
+
+            promises.push(promise);
+          });
+        } else {
+          //只有一个文件的情况
+          promises.push(
+            getFile(downFileArray[0].urlList[0].url).then((data) => {
+              if (data.data != 1) {
+                // 下载文件, 并存成ArrayBuffer对象
+                const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
+                zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
+              }
+              this.fileLoading[index].load += 1;
+              this.fileLoading[index].progress = parseInt(
+                (this.fileLoading[index].load / this.fileLoading[index].count) *
+                  100
+              );
+              if (
+                this.fileLoading[index].load == this.fileLoading[index].count
+              ) {
+                this.fileLoading[index].bool = false;
+              }
+            })
+          );
+        }
+      } else if (downFileArray.length > 1) {
+        //有多位老师的情况
+        downFileArray.forEach((i) => {
+          if (i.urlList.length == 1) {
+            //只有一个文件的情况
+            promises.push(
+              getFile(i.urlList[0].url).then((data) => {
+                if (data.data != 1) {
+                  // 下载文件, 并存成ArrayBuffer对象
+                  const file_name = `${i.username ? i.username : "匿名"}-${
+                    i.urlList[0].name
+                  }`; // 获取文件名
+                  zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
+                }
+                this.fileLoading[index].load += 1;
+                this.fileLoading[index].progress = parseInt(
+                  (this.fileLoading[index].load /
+                    this.fileLoading[index].count) *
+                    100
+                );
+                if (
+                  this.fileLoading[index].load == this.fileLoading[index].count
+                ) {
+                  this.fileLoading[index].bool = false;
+                }
+              })
+            );
+          } else if (i.urlList.length > 1) {
+            //有多个文件的
+            const folder = zip.folder(`${i.username ? i.username : "匿名"}`);
+            i.urlList.forEach((ui) => {
+              const promise = getFile(ui.url).then((data) => {
+                if (data.data != 1) {
+                  // 下载文件, 并存成ArrayBuffer对象
+                  const file_name = ui.name; // 获取文件名
+                  folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
+                }
+                this.fileLoading[index].load += 1;
+                this.fileLoading[index].progress = parseInt(
+                  (this.fileLoading[index].load /
+                    this.fileLoading[index].count) *
+                    100
+                );
+                if (
+                  this.fileLoading[index].load == this.fileLoading[index].count
+                ) {
+                  this.fileLoading[index].bool = false;
+                }
+              });
+              promises.push(promise);
+            });
+          }
+        });
+      }
+      Promise.all(promises).then(() => {
+        zip.generateAsync({ type: "blob" }).then((content) => {
+          // 生成二进制流
+          FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件  自定义文件名
+        });
+      });
+    },
+    getUserInfo() {
+      let params = {
+        uid: this.peopleId,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTestUser", params)
+        .then((res) => {
+          console.log("111111111111111111111", res.data[0][0]);
+          // 用于存储归类后的数据的对象
+          // this.checkDataType(2)
+          this.stype = 2;
+          this.courseName = res.data[0][0].name;
+          this.searchCourse();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    setWordTemplate(item) {
+      this.$refs.docxTemplateDialogRef.open({
+        fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
+        testJson: this.testJson,
+        courseId: this.testJson.courseId,
+        formData: [item],
+      }); //这里可以传数据
+    },
+    changeCover(data) {
+      this.testJson.cover = data;
+    },
+    exportWordData() {
+      if (this.selectWorkList.length <= 0)
+        return this.$message.info("请先选择需要导出的表单数据");
+      this.$refs.docxTemplateDialogRef.open({
+        fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
+        testJson: this.testJson,
+        courseId: this.testJson.courseId,
+        formData: this.selectWorkList,
+      }); //这里可以传数据this.worksArray
+    },
+    handleSelectionChange(value) {
+      this.selectWorkList = value;
+    },
+    tableDataPickerChange() {
+      let _copyData = JSON.parse(JSON.stringify(this.worksArray));
+      this.tableDatePicker.forEach((i, index) => {
+        /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
+        if (i && i.length > 0) {
+          let _startDate = new Date(i[0]);
+          let _endDate = new Date(i[1]);
+          _copyData = _copyData.filter((f) => {
+            let _answer = f.array[index].json.answer2
+              .replace(/日/g, "")
+              .replace(/年|月/g, "-");
+            let _answerDate = new Date(_answer);
+            return _answerDate >= _startDate && _answerDate <= _endDate;
+          });
+        }
+      });
+      this.tableWorksArray = _copyData;
+    },
+    submissionTimePickerChange(){
+      let _copyData = JSON.parse(JSON.stringify(this.worksArray));
+      console.log(this.submissionTimePicker)
+      if(!this.submissionTimePicker)return this.tableWorksArray = _copyData;
+      _copyData =  _copyData.filter(i=>{
+        let _startDate = new Date(this.submissionTimePicker[0]);
+        let _endDate = new Date(this.submissionTimePicker[1]);
+
+        let time = i.time.replace(/日/g, "").replace(/年|月/g, "-");
+        let _answerDate = new Date(time);
+        return _answerDate >= _startDate && _answerDate <= _endDate;
+      })
+
+      this.tableWorksArray = _copyData;
+      // this.submissionTimePicker.forEach((i, index) => {
+      //   /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
+      //   if (i && i.length > 0) {
+      //     let _startDate = new Date(i[0]);
+      //     let _endDate = new Date(i[1]);
+      //     _copyData = _copyData.filter((f) => {
+      //       let _answer = f.array[index].json.answer2
+      //         .replace(/日/g, "")
+      //         .replace(/年|月/g, "-");
+      //       let _answerDate = new Date(_answer);
+      //       return _answerDate >= _startDate && _answerDate <= _endDate;
+      //     });
+      //   }
+      // });
+    },
+    textPagingChange(event,item,index){
+			this.testArray[index].nowPage = event;
+			let _nowPage = this.testArray[index].nowPage;
+			let _limit = this.testArray[index].limit;
+			this.testArray[index].showArray = this.testArray[index].array.slice(((_nowPage==0?1:_nowPage)-1)*_limit,((_nowPage==0?1:_nowPage)-1)*_limit+_limit);
+    },
+		getWordCloutData(item,index){
+			console.log(item,index);
+      this.testArray[index].loadingWordCloud = true;
+      const _msg = `NOTICE
+Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
+Instruction: Based on the context, follow "Format example", write content.
+
+## 任务
+
+请基于以下表单文本,提炼出多个关键词,用于绘制词云图。请给出相应的关键词,关键词出现的频次。请确保输出的关键字准确反映表单文本的主要内容和主题。
+
+## 要求
+
+1. **提取关键词**:从提供的课堂实录文本中提取出多个最具代表性的关键字。关键词应该涵盖表单文本中的主要概念、重要术语和核心主题。尽量选择多样化的关键词,避免过于集中在某一个主题或概念上。
+2. **词频统计**:计算每个关键字在文本中出现的频率。
+3. **输出格式**:输出结果应包含每个关键字、对应的词频数量。
+
+## 输出格式
+
+### 输出格式
+
+[
+	{"count":1,"name":"氯化钠"},
+	{"count":2,"name":"溶液"},
+	{"count":1,"name":"实验"},
+	{"count":3,"name":"质量分数"},
+	{"count":1,"name":"溶质"},
+	{"count":2,"name":"氢氧化钠"},
+	{"count":1,"name":"溶解度"},
+	{"count":4,"name":"饱和溶液"}
+]
+
+请仅仅输出表头,输出关键词和相应的内容,无需其它任何说明文字。
+冒号、逗号等符号均使用英文字符。
+
+### Format example
+
+[
+	{"count":1,"name":"氯化钠"},
+	{"count":2,"name":"溶液"},
+	{"count":1,"name":"实验"},
+	{"count":3,"name":"质量分数"},
+	{"count":1,"name":"溶质"},
+	{"count":2,"name":"氢氧化钠"},
+	{"count":1,"name":"溶解度"},
+	{"count":4,"name":"饱和溶液"}
+]
+
+## 表单文本
+${JSON.stringify(item.array)}
+`;
+
+        const _uuid = uuidv4();
+				let params = {
+					// model: "gpt-3.5-turbo",
+					temperature: 0,
+					max_tokens: 4096,
+					top_p: 1,
+					frequency_penalty: 0,
+					presence_penalty: 0,
+					messages: [{ role: "user", content: _msg }],
+					uid: _uuid,
+					mind_map_question: "",
+					stream: false,
+					model: "gpt-4o-2024-11-20",
+				};
+        this.ajax
+					.post("https://gpt4.cocorobo.cn/chat", params)
+					.then((res) => {
+            let _data = res.data.FunctionResponse.choices[0];
+						let _jsonData = _data.message.content;
+						_jsonData = _jsonData.replaceAll("```json", "").replaceAll("```", "");
+						let _result = JSON.parse(_jsonData);
+            this.testArray[index].wordCloutData = _result;
+            this.testArray[index].loadingWordCloud = false;
+            console.log(_result);
+          }).catch(e=>{
+            console.log(e);
+            this.testArray[index].loadingWordCloud = false;
+            this.testArray[index].wordCloutData = null;
+            this.$message.error("生成词云图失败")
+          })
+		},
+  },
+
+  beforeDestroy() {
+    document.getElementsByTagName("html")[0].style.overflow = "";
+    window.removeEventListener("resize", this.checkScreenSize);
+  },
+  mounted() {
+    this.checkScreenSize();
+    window.addEventListener("resize", this.checkScreenSize);
+    document.getElementsByTagName("html")[0].scrollTop = 0;
+    document.getElementsByTagName("html")[0].style.overflow = "hidden";
+    this.$nextTick(function () {
+      if (this.peopleId) {
+        this.getUserInfo();
+      } else {
+        this.getData();
+      }
+      // this.getClass2()
+      this.changeHeight();
+    });
+  },
+};
+</script>
+
+<style scoped>
+.pb_content {
+  height: 100% !important;
+  /* margin: 0 20px 0 20px; */
+}
+.cutBtnBlockCss {
+  width: 100%;
+  display: flex;
+  justify-content: end;
+}
+.cutBtnCss {
+  width: 68px;
+  height: 27px;
+  font-size: 14px;
+  border-radius: 5px;
+  display: flex;
+  color: rgba(54, 129, 252, 1);
+  justify-content: center;
+  align-items: center;
+  margin-top: 10px;
+  border: 1px rgba(54, 129, 252, 1) solid;
+}
+.isDesktopRight {
+  width: 100% !important;
+  margin: 0 !important;
+  height: 300px !important;
+  border: none !important;
+}
+.isDTitle2JsonTit {
+  width: 130px;
+  color: rgba(0, 0, 0, 0.9);
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+.IsDAnswer {
+  margin: 20px 0 30px;
+  color: rgba(0, 0, 0, 0.6);
+}
+
+.CutCss {
+  height: 60px;
+  line-height: 60px;
+}
+.topicTitCss {
+  color: rgba(0, 0, 0, 0.9);
+  font-weight: 600;
+  margin-right: 5px;
+}
+.IsDFile {
+  width: 150px;
+  height: 120px;
+  border-radius: 10px;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  margin-bottom: 5px;
+}
+.IsDownload {
+  position: absolute;
+  width: 30px;
+  top: 5px;
+  right: 5px;
+}
+.IsDImg {
+  width: 100%;
+  height: 70px;
+  flex: 1;
+}
+.pb_content_body {
+  width: 100% !important;
+  height: 100%;
+}
+
+.pb_content_body > .right {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  overflow: hidden;
+  flex-direction: column;
+}
+
+.basic_box {
+  margin: 0 auto;
+  position: relative;
+  padding: 0 20px 0 20px;
+}
+
+.courseTop {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.stepsNav {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+}
+
+.step_box {
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  height: calc(100% - 50px);
+  overflow: auto;
+  background: #ffff;
+  border-radius: 5px;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
+
+.student_page {
+  margin-top: 10px;
+}
+
+.test_title {
+  display: flex;
+  padding: 15px 15px;
+  width: 100%;
+  box-sizing: border-box;
+  justify-content: space-between;
+  align-items: center;
+  flex-wrap: wrap;
+  margin-bottom: 10px;
+}
+
+.test_title .left {
+  max-width: 100%;
+  margin-top: 10px;
+}
+
+.test_title .left .title {
+  width: 100%;
+  font-size: 24px;
+  font-weight: 700;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.test_title .left .info {
+  display: flex;
+  margin-top: 15px;
+}
+
+.test_title .left .info .info_box {
+  font-size: 14px;
+}
+
+.test_title .left .info .info_box + .info_box {
+  margin-left: 20px;
+  padding-left: 20px;
+  border-left: 1px solid #e7e7e7;
+}
+
+.test_title .left .info .info_box span:nth-child(1) {
+  color: #00000099;
+}
+
+.test_title .left .info .info_box span:nth-child(2) {
+}
+
+.test_title .right {
+  display: flex;
+  align-items: center;
+  margin-top: 10px;
+  max-width: 100%;
+}
+
+.test_title .right .data_box {
+  margin-right: 15px;
+  width: 150px;
+  border: 1px solid #e7e7e7;
+  border-radius: 5px;
+  padding: 0 10px;
+  height: 57px;
+  font-size: 14px;
+  color: #00000099;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.test_title .right .data_box span:nth-child(1) {
+}
+
+.test_title .right .data_box span:nth-child(2) {
+}
+
+.test_title .right .data_box span:nth-child(2) .big {
+  font-size: 22px;
+}
+
+.test_title .right .btn_box {
+  display: flex;
+  flex-direction: column;
+  width: 57px;
+  height: 57px;
+  background: #3681fc;
+  border-radius: 5px;
+  font-size: 14px;
+  cursor: pointer;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+}
+
+.test_title .right .btn_box span:nth-child(1) {
+  display: block;
+  width: 12px;
+  height: 14px;
+  margin-bottom: 5px;
+  background-image: url("../../../../assets/icon/test/icon_share.png");
+  background-size: 100% 100%;
+}
+
+.test_title .right .btn_box span:nth-child(2) {
+}
+
+.search_nav {
+  border-bottom: 1px solid #e7e7e7;
+  width: 100%;
+  box-sizing: border-box;
+  padding: 0 15px 10px;
+  display: flex;
+  align-items: flex-end;
+  height: 50px;
+}
+
+.search_nav > .right {
+  display: flex;
+  align-items: center;
+}
+
+.search_nav > .right > span {
+  height: 24px;
+  font-size: 14px;
+  color: #000;
+  cursor: pointer;
+  position: relative;
+}
+.search_nav > .isDesktopRightCut {
+  display: flex;
+  justify-content: space-between;
+  width: 60%;
+}
+.search_nav > .right > span + span {
+  margin-left: 35px;
+}
+
+.search_nav > .right > span.active {
+  color: #3681fc;
+  font-weight: 600;
+}
+
+.search_nav > .right > span.active::before {
+  content: "";
+  position: absolute;
+  bottom: -10px;
+  width: 15px;
+  height: 3px;
+  background: #3681fc;
+  left: 50%;
+  transform: translateX(-50%);
+}
+
+.search_nav > .left {
+  display: flex;
+  align-items: center;
+  margin-left: auto;
+}
+
+.search_nav > .right > span.active2 {
+  color: #3681fc;
+  font-weight: 600;
+}
+.search_nav > .right > span.active2::before {
+  content: "";
+  position: absolute;
+  bottom: -10px;
+  width: 100%;
+  height: 3px;
+  background: #3681fc;
+  left: 50%;
+  transform: translateX(-50%);
+}
+
+.student_input >>> .el-input__inner {
+  height: 40px;
+  width: 190px;
+  font-size: 13px;
+  padding: 0 35px 0 10px;
+}
+
+.serach_icon {
+  position: absolute;
+  right: 12px;
+  top: 50%;
+  transform: translateY(-50%);
+  width: 13px;
+  height: 13px;
+  background: url("../../../../assets/icon/test/test_search.png") no-repeat;
+  background-size: 100% 100%;
+  cursor: pointer;
+}
+
+.title_content {
+  padding-bottom: 10px;
+}
+
+.title_content > .title_box {
+  width: calc(100% - 48px);
+  margin: 20px auto 0;
+}
+
+.title_content > .title_box > .title {
+  font-size: 18px;
+  display: flex;
+  min-height: 35px;
+  white-space: pre-line;
+  position: relative;
+}
+
+.title_content > .title_box > .title > .test_icon {
+  min-width: 20px;
+  height: 20px;
+}
+
+.title_content > .title_box > .detail {
+  font-size: 14px;
+  color: #00000099;
+  margin-top: 8px;
+  white-space: pre-line;
+}
+
+.title_content > .title_box > .content1 {
+  display: flex;
+  width: 100%;
+  margin-top: 10px;
+}
+
+.title_content > .title_box > .content1 >>> .el-progress__text {
+  color: #3681fc;
+  min-width: 55px;
+  font-size: 16px !important;
+}
+
+.title_content > .title_box > .content1 > .left {
+  width: calc(100% - 620px);
+  border: 1px solid #e7e7e7;
+}
+
+.title_content > .title_box > .content1 > .left > div + div {
+  border-top: 1px solid #e7e7e7;
+}
+
+.title_content > .title_box > .content1 > .left > .title,
+.title_content > .title_box > .content1 > .left > .data {
+  display: flex;
+  height: 40px;
+  align-items: center;
+  width: 100%;
+  padding: 0 15px;
+  box-sizing: border-box;
+  line-height: 16px;
+}
+
+.title_content > .title_box > .content1 > .left > .title > span,
+.title_content > .title_box > .content1 > .left > .data > span {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.title_content > .title_box > .content1 > .left > .title > span:nth-child(1),
+.title_content > .title_box > .content1 > .left > .data > span:nth-child(1) {
+  width: calc(100% - 320px - 110px);
+}
+
+.title_content > .title_box > .content1 > .left > .title > span:nth-child(2),
+.title_content > .title_box > .content1 > .left > .data > span:nth-child(2) {
+  width: 110px;
+}
+
+.title_content > .title_box > .content1 > .left > .title > span:nth-child(3),
+.title_content > .title_box > .content1 > .left > .data > span:nth-child(3) {
+  width: 320px;
+}
+.isDesktopTitle {
+  display: flex;
+  justify-content: space-around;
+}
+.isDesktopTitle > div {
+  width: 60px;
+  height: 30px;
+  line-height: 30px;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+/* .isDesktopTitle:nth-child(1){
+  width: 60px;
+}
+.isDesktopTitle:nth-child(2){
+  width: 60px;
+}
+.isDesktopTitle:nth-child(3){
+  flex: 1;
+} */
+
+.title_content > .title_box > .content1 > .left > .title {
+  font-weight: 700;
+  background: #f9fafb;
+}
+
+.title_content > .title_box > .content1 > .right {
+  width: 600px;
+  margin-left: 20px;
+  border: 1px solid #e7e7e7;
+  min-height: 300px;
+	box-sizing: border-box;
+}
+
+.title_content > .title_box > .content2 {
+  display: flex;
+  width: 100%;
+  margin-top: 10px;
+}
+
+.title_content > .title_box > .content2 > .left {
+  width: calc(100% - 620px);
+  border: 1px solid #e7e7e7;
+	box-sizing: border-box;
+}
+
+.title_content > .title_box > .content2 > .left > div + div {
+  border-top: 1px solid #e7e7e7;
+}
+
+.title_content > .title_box > .content2 > .left > .title,
+.title_content > .title_box > .content2 > .left > .data {
+  display: flex;
+  height: 40px;
+  align-items: center;
+  width: 100%;
+  padding: 0 15px;
+  box-sizing: border-box;
+  line-height: 16px;
+}
+
+.title_content > .title_box > .content2 > .left > .title > span,
+.title_content > .title_box > .content2 > .left > .data > span {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.title_content > .title_box > .content2 > .left > .title > span:nth-child(1),
+.title_content > .title_box > .content2 > .left > .data > span:nth-child(1) {
+  width: 55px;
+}
+
+.title_content > .title_box > .content2 > .left > .title > span:nth-child(2),
+.title_content > .title_box > .content2 > .left > .data > span:nth-child(2) {
+  width: 110px;
+}
+
+.title_content > .title_box > .content2 > .left > .title > span:nth-child(3),
+.title_content > .title_box > .content2 > .left > .data > span:nth-child(3) {
+  max-width: calc(100% - 110px - 55px);
+}
+
+.title_content > .title_box > .content2 > .left > .title {
+  font-weight: 700;
+  background: #f9fafb;
+}
+
+.title_content > .title_box > .content2 > .right {
+  width: 600px;
+  margin-left: 20px;
+  border: 1px solid #e7e7e7;
+	box-sizing: border-box;
+}
+
+.title_content > .title_box > .content2 > .right >>> .wordCloud {
+  height: auto;
+  min-height: 300px;
+}
+
+.title_content > .title_box > .content3 {
+  display: flex;
+  width: 100%;
+  overflow: auto;
+}
+
+.title_content > .title_box > .content3 > .file {
+  min-width: 200px;
+  width: 200px;
+  height: 140px;
+  margin: 10px 10px 10px 0px;
+  border-radius: 15px;
+  box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
+  overflow: hidden;
+  margin-right: 15px;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+}
+
+.title_content > .title_box > .content3 > .file > .img {
+  width: 100%;
+  height: calc(100% - 35px);
+  object-fit: cover;
+  cursor: pointer;
+}
+
+.title_content > .title_box > .content3 > .file > .del {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 10px;
+  cursor: pointer;
+}
+
+.title_content > .title_box > .content3 > .file > .download {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 35px;
+  cursor: pointer;
+  opacity: 0.8;
+}
+
+.title_content > .title_box > .content3 > .file > .name {
+  height: 35px;
+  width: 100%;
+  background: #f9f9f9;
+  display: flex;
+  align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+}
+
+.title_content > .title_box > .content3 > .file > .name > span {
+  display: block;
+  text-overflow: ellipsis;
+  max-width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.table_content {
+  /* width: calc(100% - 48px);
+  margin: 20px auto 0; */
+  padding: 20px 24px;
+  width: 100%;
+  box-sizing: border-box;
+}
+
+.table_content >>> .el-table td {
+  padding: 5px 0;
+}
+.isDesktopTable_content {
+  width: 100%;
+}
+.isDTitle {
+  display: flex;
+  justify-content: space-between;
+}
+.isDBri {
+  display: flex;
+  padding: 15px 0;
+  font-size: 14px;
+  color: rgba(0, 0, 0, 0.4);
+  flex-direction: column;
+  height: 80px;
+  justify-content: space-between;
+}
+
+.answer_type {
+  background: #f0f2f5;
+  padding: 5px 10px;
+  display: block;
+  border-radius: 3px;
+  margin: 5px;
+}
+
+.table_file > .file {
+  min-width: 100px;
+  width: 100px;
+  height: 70px;
+  margin: 10px 10px 10px 0px;
+  border-radius: 5px;
+  box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
+  overflow: hidden;
+  margin-right: 15px;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+}
+
+.table_file > .file > .img {
+  width: 100%;
+  height: calc(100% - 20px);
+  object-fit: cover;
+  cursor: pointer;
+}
+
+.table_file > .file > .del {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 10px;
+  cursor: pointer;
+}
+
+.table_file > .file > .download {
+  position: absolute;
+  width: 25px;
+  top: 10px;
+  right: 35px;
+  cursor: pointer;
+  opacity: 0.8;
+}
+
+.table_file > .file > .name {
+  height: 20px;
+  width: 100%;
+  background: #f9f9f9;
+  display: flex;
+  align-items: center;
+  padding: 0 10px;
+  box-sizing: border-box;
+  font-size: 12px;
+}
+
+.table_file > .file > .name > span {
+  display: block;
+  text-overflow: ellipsis;
+  max-width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.btnA {
+  color: #fff;
+  background-color: #0061ff;
+  padding: 0 24px;
+  font-size: 14px;
+  min-width: 64px;
+  font-weight: 500;
+  border-radius: 4px;
+  box-sizing: border-box;
+  border: none;
+  cursor: pointer;
+  transition: all 0.2s ease-in-out;
+  height: 36px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  line-height: 1;
+  margin-right: 10px;
+  position: relative;
+}
+
+.buttonBox {
+  position: absolute;
+  bottom: -0;
+  transform: translateY(100%);
+  background: #fff;
+  border-radius: 5px;
+  box-shadow: 0 0 3px 1px #e3e3e3;
+  width: 100%;
+  z-index: 999;
+}
+
+.buttonBox > div {
+  height: 40px;
+  line-height: 40px;
+  width: 100%;
+  text-align: center;
+  color: #000;
+  box-sizing: border-box;
+}
+
+.buttonBox > div + div {
+  border-top: 1px solid #e0e0e0;
+}
+
+.buttonBox > div:hover {
+  background: #f6f8ff;
+}
+
+.content4 {
+  width: 100%;
+  height: auto;
+  display: flex;
+  flex-wrap: nowrap;
+  overflow: auto;
+}
+
+.out_box {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  /* width: 200px; */
+  min-width: 280px;
+  width: 280px;
+  background: #fff;
+  /* background-color: white; */
+  margin-right: 15px;
+  /* border: 1px solid #ccc; */
+  height: fit-content;
+  box-sizing: border-box;
+  border-radius: 0px 0px 5px 5px;
+  /* overflow: hidden; */
+  margin-bottom: 15px;
+  position: relative;
+  border-radius: 8px;
+  box-sizing: border-box;
+  overflow: hidden;
+  border: 1px solid #3682fc00;
+  cursor: pointer;
+  border: 1px solid #6a9ff5;
+  height: auto;
+}
+
+.out_boxActive {
+  box-sizing: border-box;
+  border: 3px solid #3681fc !important;
+}
+
+.out_box:hover {
+  border: 1px solid #3681fc;
+}
+
+.bottom_box {
+  width: 100%;
+  display: flex;
+  padding: 10px;
+  flex-direction: column;
+  box-sizing: border-box;
+  height: 121px;
+  flex-wrap: nowrap;
+  justify-content: space-evenly;
+}
+
+.bottom_box > div:nth-child(1) {
+  width: 100%;
+  /* overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: bold; */
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.bottom_box > div:nth-child(1) > span:nth-child(1) {
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-weight: bold;
+}
+
+.bottom_box > div:nth-child(1) > span:nth-child(2) {
+  min-width: fit-content;
+  font-size: 14px;
+  color: #8c8c8c;
+}
+
+.tup {
+  width: 100%;
+  height: auto;
+  margin: 0 auto;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 10px;
+  box-sizing: border-box;
+}
+
+.tup > img {
+  width: 100%;
+  /* height: 100%; */
+  height: 150px;
+  /* object-fit: cover; */
+  object-fit: contain;
+}
+
+.kc_time {
+  margin-top: 8px;
+  font-size: 14px;
+  color: #717c8d;
+}
+
+.kc_time + .kc_time {
+  margin-top: 0;
+}
+
+.kc_t {
+  margin-top: 5px;
+  width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.kc_t > span:nth-child(1) {
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.kc_t > span:nth-child(2) {
+  min-width: fit-content;
+  font-size: 14px;
+  color: #8c8c8c;
+}
+
+.title_box > .title > .title_downBtn {
+  position: absolute;
+  right: 10px;
+  top: 0;
+}
+.fileLoadDiv >>> .el-dialog__header {
+  display: none;
+}
+.fileLoadDiv >>> .el-dialog__body {
+  display: flex;
+  justify-content: center;
+}
+.fileLoadDiv >>> .el-dialog {
+  margin-top: 60vh !important;
+  width: 200px !important;
+  height: 80px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 15px;
+}
+.mask {
+  background-color: rgb(0 0 0 / 30%);
+  /* position: fixed; */
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 90;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.progressBox {
+  width: 300px;
+  height: 150px;
+  background: #fff;
+  border-radius: 10px;
+  box-shadow: 0 0 6px 1px #bfbfbf;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  position: relative;
+  color: #6c6c6c;
+}
+
+.progressBox >>> .el-progress-bar__outer {
+  background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+  height: 50px;
+  font-size: 19px;
+  display: flex;
+  align-items: center;
+  color: #747474;
+}
+
+.progressBox .lbox img {
+  width: 40px;
+  margin-right: 20px;
+}
+
+.boxSticky {
+  position: sticky;
+  top: 0;
+  z-index: 999;
+  background: #fff;
+}
+
+.aiBoxRight {
+  height: calc(100% - 158px - 46px);
+  width: 500px;
+  margin: 0 auto;
+  position: fixed;
+  z-index: 999;
+  right: 30px;
+  bottom: 10px;
+  box-shadow: 0 0 5px 2px #00000045;
+  border-radius: 5px;
+  overflow: hidden;
+}
+
+.tableDatePicker {
+  width: 20px;
+  height: 20px;
+  margin-left: 5px;
+}
+
+.tableDatePicker >>> .el-date-editor {
+  width: 100% !important;
+  height: 100% !important;
+  padding: 0 !important;
+  cursor: pointer;
+  background: none;
+  border: none;
+}
+
+.tableDatePicker >>> .el-date-editor > i {
+  display: none;
+}
+
+.tableDatePicker >>> .el-date-editor > input {
+  display: none;
+}
+
+.tableDatePicker >>> .el-date-editor > span {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: #9095a7;
+}
+
+.tableDatePicker >>> .el-date-editor > .el-range__close-icon {
+  display: block;
+  position: relative;
+  top: -6px;
+  color: red;
+}
+
+.paging{
+  width: 100%;
+  height: 40px;
+  display: flex;
+  justify-content: flex-end;
+	align-items: center;
+  margin-top:auto ;
+}
+
+.noWordCloud{
+	width: 100%;
+	height: 100%;
+	min-height: 300px;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+
+.noWordCloud>div{
+  display: flex;
+  align-items: center;
+}
+
+.noWordCloud>div>img{
+  width: 40px;
+  height: 40px;
+  margin-left: 5px;
+}
+
+.timePickerActive{
+  color: #409EFF;
+}
+</style>

+ 309 - 0
src/components/pages/test/check/index2.vue

@@ -0,0 +1,309 @@
+<template>
+  <div class="pb_content" style="background: #fff" v-loading="loading">
+    <div class="pb_content_body" style="position: relative; margin: 0">
+      <div class="right">
+        <div class="courseTop">
+          <div class="stepsNav">
+            <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item
+                :to="{
+                  path:
+                    '/test?userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+                >表单管理</el-breadcrumb-item
+              >
+              <el-breadcrumb-item>
+                <span style="color: rgb(15, 126, 255)">查看表单</span>
+              </el-breadcrumb-item>
+            </el-breadcrumb>
+          </div>
+          <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
+        </div>
+        <div class="step_box" ref="stepBox">
+          <div class="pb_content_body">
+            <div class="student_table">
+              <el-table
+                ref="table"
+                :data="tableData"
+                border
+                :height="tableHeight"
+                :fit="true"
+                v-loading="isLoading"
+                style="width: 100%"
+                :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+                :row-class-name="tableRowClassName"
+              >
+                <el-table-column
+                  prop="username"
+                  label="提交人"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="title"
+                  label="表单名称"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="time"
+                  label="提交时间"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="time"
+                  label="是否批改"
+                  min-width="15"
+                  align="center"
+                >
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type == 3 ? '是' : '否' }}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" width="200px">
+                  <template slot-scope="scope">
+                    <el-button
+                      @click="getTest(scope.row)"
+                      type="primary"
+                      size="small"
+                      >查看</el-button
+                    >
+
+										<el-button
+                      @click="delTest(scope.row.id)"
+                      type="primary"
+                      size="small"
+                      >删除</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div class="student_page">
+              <el-pagination
+                background
+                layout="prev, pager, next"
+                :page-size="pageSize"
+                :total="total"
+                @current-change="handleCurrentChange"
+              >
+              </el-pagination>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      cid: this.$route.query.cid,
+      uid: this.$route.query.uid,
+      title: "",
+      testType: [],
+      see: false,
+      cJson: [],
+      loading: false,
+      look: "",
+      tableHeight: 500,
+      isLoading: false,
+      pageSize: 10,
+      total: 0,
+      page: 1,
+      tableData: [],
+    };
+  },
+  watch: {},
+  methods: {
+    retrunCourse() {
+      this.goTo(
+        "/test?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    changeHeight() {
+      this.tableHeight = this.$refs.stepBox.offsetHeight - 100;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function () {
+        self.tableHeight = this.$refs.stepBox.offsetHeight - 100;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
+        }
+      };
+      // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getData();
+    },
+    getTest(row) {
+      this.$router.push(
+        "/checkTest2?cid=" +
+        row.courseid +
+          "&userid=" +
+          this.userid +
+          "&userid2=" +
+          row.userid +
+          "&tid=" +
+          row.id +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=3" +
+          "&role=" +
+          this.role
+      );
+    },
+		delTest(tid){
+      let _this = this
+      _this
+        .$confirm("确定删除此提交的表单么?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          let params = [{
+            tid: tid,
+          }];
+          _this.ajax
+            .post(_this.$store.state.api + "deleteTestCourseWorks", params)
+            .then((res) => {
+              _this.$message.success("删除成功");
+              _this.getData();
+              
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        })
+        .catch(() => {
+          return;
+        });
+		},
+    getData() {
+      this.isLoading = true;
+      let params = {
+        cid: this.uid,
+        page: this.page,
+        pageSize: this.pageSize,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksPage2", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  mounted() {
+    this.$nextTick(function () {
+      this.page = 1;
+      this.changeHeight();
+      this.getData();
+    });
+  },
+};
+</script>
+
+<style scoped>
+.pb_content {
+  height: 100% !important;
+  /* margin: 0 20px 0 20px; */
+}
+
+.pb_content_body {
+  width: 100% !important;
+  height: 100%;
+}
+
+.right {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  overflow: hidden;
+  flex-direction: column;
+}
+
+.basic_box {
+  margin: 0 auto;
+  position: relative;
+  padding: 0 20px 0 20px;
+}
+
+.courseTop {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.stepsNav {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+}
+
+.step_box {
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  height: calc(100% - 38px);
+  overflow: auto;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
+
+.student_page {
+  margin-top: 10px;
+}
+</style>

+ 267 - 0
src/components/pages/test/check/indexJiu.vue

@@ -0,0 +1,267 @@
+<template>
+  <div class="pb_content" style="background: #fff" v-loading="loading">
+    <div class="pb_content_body" style="position: relative; margin: 0">
+      <div class="right">
+        <div class="courseTop">
+          <div class="stepsNav">
+            <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item
+                :to="{
+                  path:
+                    '/test?userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org +
+                    '&role=' +
+                    role,
+                }"
+                >表单管理</el-breadcrumb-item
+              >
+              <el-breadcrumb-item>
+                <span style="color: rgb(15, 126, 255)">查看表单</span>
+              </el-breadcrumb-item>
+            </el-breadcrumb>
+          </div>
+          <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
+        </div>
+        <div class="step_box" ref="stepBox">
+          <div class="pb_content_body">
+            <div class="student_table">
+              <el-table
+                ref="table"
+                :data="tableData"
+                border
+                :height="tableHeight"
+                :fit="true"
+                v-loading="isLoading"
+                style="width: 100%"
+                :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+                :row-class-name="tableRowClassName"
+              >
+                <el-table-column
+                  prop="username"
+                  label="提交人"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="time"
+                  label="提交时间"
+                  min-width="15"
+                  align="center"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="time"
+                  label="是否批改"
+                  min-width="15"
+                  align="center"
+                >
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type == 3 ? '是' : '否' }}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" width="200px">
+                  <template slot-scope="scope">
+                    <el-button
+                      @click="getTest(scope.row)"
+                      type="primary"
+                      size="small"
+                      >查看</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div class="student_page">
+              <el-pagination
+                background
+                layout="prev, pager, next"
+                :page-size="pageSize"
+                :total="total"
+                @current-change="handleCurrentChange"
+              >
+              </el-pagination>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  data() {
+    return {
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      cid: this.$route.query.cid,
+      title: "",
+      testType: [],
+      see: false,
+      cJson: [],
+      loading: false,
+      look: "",
+      tableHeight: 500,
+      isLoading: false,
+      pageSize: 10,
+      total: 0,
+      page: 1,
+      tableData: [],
+    };
+  },
+  watch: {},
+  methods: {
+    retrunCourse() {
+      this.goTo(
+        "/test?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    changeHeight() {
+      this.tableHeight = this.$refs.stepBox.offsetHeight - 100;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function () {
+        self.tableHeight = this.$refs.stepBox.offsetHeight - 100;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
+        }
+      };
+      // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getData();
+    },
+    getTest(row) {
+      this.$router.push(
+        "/checkTest2?cid=" +
+        row.courseid +
+          "&userid=" +
+          this.userid +
+          "&userid2=" +
+          row.userid +
+          "&tid=" +
+          row.id +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&type=2" +
+          "&role=" +
+          this.role
+      );
+    },
+    getData() {
+      this.isLoading = true;
+      let params = {
+        cid: this.cid,
+        page: this.page,
+        pageSize: this.pageSize,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksPage", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+  },
+  mounted() {
+    this.$nextTick(function () {
+      this.page = 1;
+      this.changeHeight();
+      this.getData();
+    });
+  },
+};
+</script>
+
+<style scoped>
+.pb_content {
+  height: 100% !important;
+  /* margin: 0 20px 0 20px; */
+}
+
+.pb_content_body {
+  width: 100% !important;
+  height: 100%;
+}
+
+.right {
+  height: 100%;
+  width: 100%;
+  display: flex;
+  overflow: hidden;
+  flex-direction: column;
+}
+
+.basic_box {
+  margin: 0 auto;
+  position: relative;
+  padding: 0 20px 0 20px;
+}
+
+.courseTop {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  padding: 10px 0;
+}
+
+.stepsNav {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: center;
+}
+
+.step_box {
+  width: calc(100% - 40px);
+  margin: 0 auto;
+  height: calc(100% - 38px);
+  overflow: auto;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
+
+.student_page {
+  margin-top: 10px;
+}
+</style>

+ 95 - 0
src/components/pages/test/check/txtHtmlView.vue

@@ -0,0 +1,95 @@
+<template>
+  <div class="txtView" ref="txtViewRef" v-html="content" v-loading="loading">
+		
+	</div>
+</template>
+
+<script>
+import "../../../../common/aws-sdk-2.235.1.min.js";
+
+const getFile = url => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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"
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name
+    };
+    s3.getObject(params, function(err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        const fileContent = data.Body.toString("utf-8");
+        resolve({ data: fileContent });
+      } // sxuccessful response
+    });
+    // axios({
+  });
+};
+export default {
+  props: {
+    url: {
+      type: String,
+      default: ""
+    },
+  },
+	data(){
+		return{
+			content:"",
+			loading:""
+		}
+	},
+	methods: {
+		getTxtContent() {
+			if(!this.url)return;
+			this.loading = true;
+			getFile(this.url).then(res=>{
+				this.loading = false;
+				this.content = res.data;
+				this.$emit("getTxtContent",this.content)
+			})
+		},
+	},
+	watch:{
+		url(newVal,oldVal){
+			if(newVal!==oldVal){
+				this.getTxtContent();
+			}
+		}
+	},
+	mounted(){
+		this.getTxtContent();
+	}
+};
+</script>
+
+<style scoped>
+.txtView{
+	width: 100%;
+	height: 100%;
+	box-sizing: border-box;
+	padding: 0px 0px;
+	margin: 0;
+	overflow: auto;
+}
+</style>

Diff do ficheiro suprimidas por serem muito extensas
+ 2400 - 0
src/components/pages/test/checkAi/aiLeader.vue


+ 52 - 0
src/components/pages/test/checkAi/eChartTemplate.vue

@@ -0,0 +1,52 @@
+<template>
+	<div class="chart" id="charts_canvas" ref="chartRef"></div>
+</template>
+
+<script>
+import * as echarts from 'echarts';
+export default {
+	props: {
+		data: {
+			type: Object,
+			default: () => {},
+		},
+	},
+	data() {
+		return {
+			chartObj: null,
+			chartData: null,
+		};
+	},
+	watch: {
+		data() {
+      this.chartData = JSON.parse(JSON.stringify(this.data))
+			this.getChartData();
+    },
+	},
+	methods: {
+		getChartData() {
+      if(!this.chartObj){
+        this.chartObj = echarts.init(this.$refs.chartRef);
+      }
+      if(!this.chartData){
+        this.chartData = JSON.parse(JSON.stringify(this.data))
+      }
+			this.chartObj.setOption(this.chartData);
+			window.addEventListener("resize", () => {
+					this.chartObj.resize();
+      });
+		},
+	},
+	mounted() {
+		this.getChartData();
+	},
+};
+</script>
+
+<style scoped>
+.chart {
+	max-width: 100%;
+	width: 100%;
+	height: 100%;
+}
+</style>

+ 331 - 0
src/components/pages/test/checkAi/wangEnduit.vue

@@ -0,0 +1,331 @@
+<template lang="html">
+  <div class="editor cont">
+    <div ref="toolbar" class="toolbar">
+    </div>
+    <div ref="editor" class="text">
+    </div>
+		<slot></slot>
+    <div v-if="proVisible" class="mask">
+      <div class="progressBox">
+        <div class="lbox">
+          <img src="../../../../assets/loading.gif" />上传中,请稍后
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import E from "wangeditor";
+import "../../../../common/aws-sdk-2.235.1.min";
+import { Loading } from 'element-ui';
+// import 'wangeditor/release/wangEditor.min.css'
+export default {
+  name: "editoritem",
+  data() {
+    return {
+      // uploadPath,
+      editor: null,
+      info_: null,
+      proVisible:false,
+      progress:0
+    };
+  },
+  model: {
+    prop: "value",
+    event: "change",
+  },
+  props: {
+    value: {
+      type: String,
+      default: "",
+    },
+    isClear: {
+      type: Boolean,
+      default: false,
+    },
+    placeholder: {
+      type: String,
+      default: "请输入正文"
+    },
+		showGetTextLoading:{
+			type:Boolean,
+			default:false,
+		}
+  },
+  watch: {
+    isClear(val) {
+      // 触发清除文本域内容
+      if (val) {
+        this.editor.txt.clear();
+        this.info_ = null;
+      }
+    },
+    value: function (value) {
+      if (value !== this.editor.txt.html()) {
+        this.editor.txt.html(this.value);
+      }
+    },
+    //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值
+  },
+  mounted() {
+    this.seteditor();
+    this.editor.txt.html(this.value);
+  },
+  methods: {
+    seteditor() {
+      this.editor = new E(this.$refs.toolbar, this.$refs.editor);
+      // 关闭菜单栏fixed
+      this.editor.config.menuFixed = false;
+      // 普通的自定义菜单
+      this.editor.config.menus = [
+        "head", //标题
+        "bold", //加粗
+        "fontSize", //字体大小
+        // "fontName", //字体
+        // "italic", //斜体
+        // "underline", //下划线
+        // "strikeThrough", //删除线
+        "indent", //缩进
+        // "lineHeight", //行高
+        // "foreColor",
+        // "backColor",
+        // "link",
+        // "list",
+        // "todo",
+        "justify",
+        // "quote",
+        // "emoticon",
+        "image",
+        // "video",
+        "table",
+        // "code",
+        // "splitLine",
+        "undo",
+        "redo",
+      ];
+      // 带格式粘贴
+      this.editor.config.pasteFilterStyle = false;
+      //忽略粘贴内容中的图片
+      this.editor.config.pasteIgnoreImg = false;
+      this.editor.config.showLinkImg = false;
+      this.editor.config.placeholder = this.placeholder;
+      var that = this;
+      this.editor.config.customUploadImg = function (files, insert) {
+        // const loading = Loading.service({
+        //   lock: true,
+        //   background: 'rgba(0, 0, 0, 0.7)'
+        // });
+        // 图片自定义上传方法
+        var kk = 0
+        for (var i = 0; i < files.length; i++) {
+          var file = files[i];
+          var credentials = {
+            accessKeyId: "AKIATLPEDU37QV5CHLMH",
+            secretAccessKey: "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",
+          }; //秘钥形式的登录上传
+          window.AWS.config.update(credentials);
+          window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+          var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+          that.proVisible = true
+          if (file) {
+            var params = {
+              Key:
+                file.name.split(".")[0] +
+                new Date().getTime() +
+                "." +
+                file.name.split(".")[file.name.split(".").length - 1],
+              ContentType: file.type,
+              Body: file,
+              "Access-Control-Allow-Credentials": "*",
+              ACL: "public-read",
+            }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+            var options = {
+              partSize: 2048 * 1024 * 1024,
+              queueSize: 2,
+              leavePartsOnError: true,
+            };
+            bucket
+              .upload(params, options)
+              .on("httpUploadProgress", function (evt) {
+                //这里可以写进度条
+                // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+              })
+              .send(function (err, data) {
+                kk++
+                if(kk == files.length - 1 || kk > files.length - 1){
+                  that.proVisible = false
+                }
+                // loading.close();
+                if (err) {
+                  that.$message.error("上传失败");
+                } else {
+                  //上传成功处理
+                  insert(data.Location);
+                }
+              });
+          }
+        }
+      };
+      //配置 自定义处理粘贴的文本内容
+      this.editor.config.pasteTextHandle = function (content) {
+        if (content == '' && !content) return ''
+        var str = content
+        // str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '')
+        str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
+        str = str.replace(/style="[\s\S]*?"/ig, '')
+        // str = str.replace(/<\/?[^>]*>/g, '')
+        // str = str.replace(/[ | ]*\n/g, '\n')
+        // str = str.replace(/&nbsp;/ig, '')
+        // console.log('****', content)
+        // console.log('****', str)
+        return str
+      };
+      this.editor.config.onchange = (html) => {
+        this.info_ = html; // 绑定当前逐渐地值
+        this.$emit("change", this.info_); // 将内容同步到父组件中
+      };
+      // 创建富文本编辑器
+      this.editor.create();
+    },
+  },
+};
+</script>
+
+<style lang="css" scoped>
+.editor {
+   width: 100%;
+   /* margin: 10px auto; */
+   position: relative;
+   z-index: 0;
+ }
+
+ .toolbar {
+   border: 1px solid #ccc;
+ }
+
+ .text {
+   border: 1px solid #ccc;
+   height: 230px;
+   overflow: auto;
+ }
+
+
+ /* table 样式 */
+ .cont>>>table {
+  border-top: 1px solid #ccc;
+  border-left: 1px solid #ccc;
+}
+
+.cont>>>table td,
+.cont>>>table th {
+  border-bottom: 1px solid #ccc;
+  border-right: 1px solid #ccc;
+  /* padding: 20px 5px; */
+  padding: 5px 10px;
+  max-width: 0px;
+  height: 30px;
+  vertical-align: baseline;
+}
+
+.cont>>>table th {
+  border-bottom: 2px solid #ccc;
+  text-align: center;
+}
+
+ /* blockquote 样式 */
+ .cont>>>blockquote {
+   display: block;
+   border-left: 8px solid #d0e5f2;
+   padding: 5px 10px;
+   margin: 10px 0;
+   line-height: 1.4;
+   font-size: 100%;
+   background-color: #f1f1f1;
+ }
+
+ /* code 样式 */
+ .cont>>>code {
+   display: inline-block;
+   *display: inline;
+   *zoom: 1;
+   background-color: #f1f1f1;
+   border-radius: 3px;
+   padding: 3px 5px;
+   margin: 0 3px;
+ }
+
+ .cont>>>pre code {
+   display: block;
+ }
+
+ /* ul ol 样式 */
+ .cont>>>ul,
+ ol {
+   margin: 0 !important;
+ }
+
+ /* .cont>>>.w-e-droplist{
+  width: 80px !important;
+ } */
+
+ .mask {
+  background-color: rgb(0 0 0 / 30%);
+  /* position: fixed; */
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 99999;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.mask2 {
+  position: fixed !important;
+  z-index: 999999;
+}
+
+.progressBox {
+  width: 300px;
+  height: 150px;
+  background: #fff;
+  border-radius: 10px;
+  box-shadow: 0 0 6px 1px #bfbfbf;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+}
+
+.progressBox .lbox {
+  height: 100px;
+  font-size: 16px;
+  display: flex;
+  align-items: center;
+}
+
+.progressBox .lbox img {
+  width: 40px;
+  margin-right: 20px;
+}
+
+.progressBox>>>.el-progress-bar__outer {
+  background-color: #d1dfff !important;
+}
+
+.progressBox .lbox {
+  height: 100px;
+  font-size: 19px;
+  display: flex;
+  align-items: center;
+}
+
+.progressBox .lbox img {
+  width: 40px;
+  margin-right: 20px;
+}
+</style>

+ 179 - 0
src/components/pages/test/choseCheck/csvTableView.vue

@@ -0,0 +1,179 @@
+<template>
+  <div class="txtView" v-loading="loading">
+    <el-table :data="tableData" border style="width: 100%;"
+      :header-cell-style="{ background: '#f1f1f1', fontSize: '16px' }" :fit="true">
+      <el-table-column :fixed="[].includes(index)" :label="item.label" :prop="item.prop"
+        v-for="(item, index) in columnList" :key="item.label + '_' + index">
+        <template slot-scope="scope">
+          <el-tooltip class="item" effect="dark" :content="scope.row[item.prop]" placement="top">
+            <!-- 为每个单元格内容添加自定义的多行文本样式 -->
+            <div class="multi-line-text">{{ scope.row[item.prop] }}</div>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- <div class="tv_content" v-text="content"></div> -->
+  </div>
+</template>
+
+<script>
+import "../../../../common/aws-sdk-2.235.1.min.js";
+
+const getFile = url => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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"
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name
+    };
+    s3.getObject(params, function (err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        const fileContent = data.Body.toString("utf-8");
+        resolve({ data: fileContent });
+      } // sxuccessful response
+    });
+    // axios({
+  });
+};
+export default {
+  props: {
+    url: {
+      type: String,
+      default: ""
+    }
+  },
+  data() {
+    return {
+      content: "",
+      loading: true,
+      tableData: [],
+      columnList: []
+    };
+  },
+  methods: {
+    getTxtContent() {
+      if (!this.url) return;
+      this.loading = true;
+      getFile(this.url).then(res => {
+        this.loading = false;
+        let tableDataObj = this.formatCSVToTable(res.data);
+        console.log(tableDataObj)
+        this.tableData = tableDataObj.result;
+        let column = [];
+        tableDataObj.header.forEach((item, index) => {
+          column.push({
+            label: item,
+            prop: `header_${index}`
+          })
+        })
+        this.columnList = column;
+        this.content = res.data;
+      });
+    },
+    formatCSVToTable(str) {
+      const result = [];
+      const jsonObj = str.split("\n");
+      let arrHeader = [];
+      for (const i in jsonObj) {
+        if (typeof jsonObj[i] === "string" && jsonObj[i].length > 0) {
+          const row = `${jsonObj[i]}`;
+          if (row.trim().length > 0) {
+            const kv = jsonObj[i].split(",");
+            if (i == 0) {
+              // 获取column表头
+              arrHeader = kv;
+            } else {
+              const obj = {};
+              for (let index = 0; index < arrHeader.length; index++) {
+                // 组装表格数据
+                const name = `header_${index}`
+                if (!arrHeader[index]) continue;
+                if (!obj[name]) {
+                  try {
+                    if (kv[index]) {
+                      obj[name] = String(kv[index]);
+                    } else {
+                      obj[name] = "";
+                    }
+                  } catch (err) {
+                    obj[name] = "";
+                  }
+                }
+              }
+              result.push(obj);
+            }
+          }
+        }
+      }
+      return { result: result, header: arrHeader };
+    },
+  },
+  watch: {
+    url(newVal, oldVal) {
+      if (newVal !== oldVal) {
+        this.getTxtContent();
+      }
+    }
+  },
+  mounted() {
+    this.getTxtContent();
+  }
+};
+</script>
+
+<style scoped>
+.txtView {
+  width: 100%;
+  height: 100%;
+  box-sizing: border-box;
+  background-color: #ececec;
+  padding: 0px 0px;
+}
+
+.tv_content {
+  width: 100%;
+  /* height: 100%; */
+  box-sizing: border-box;
+  background-color: #fff;
+  overflow: auto;
+  word-wrap: break-word;
+  border-radius: 3px;
+  white-space: pre;
+  box-sizing: border-box;
+  padding: 10px;
+}
+
+.multi-line-text {
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  line-height: 1.5;
+  max-height: 3em;
+}
+
+</style>

+ 453 - 0
src/components/pages/test/choseCheck/index.vue

@@ -0,0 +1,453 @@
+<template>
+  <div class="choseCheck">
+    <div class="cc_top">
+      <div class="cc_t_left">
+        <el-breadcrumb separator-class="el-icon-arrow-right">
+          <el-breadcrumb-item
+            :to="{
+              path:
+                '/test?userid=' +
+                userid +
+                '&oid=' +
+                oid +
+                '&org=' +
+                org +
+                '&role=' +
+                role
+            }"
+            >表单管理</el-breadcrumb-item
+          >
+          <el-breadcrumb-item>
+            <span style="color: rgb(15, 126, 255)">AI分析</span>
+          </el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+      <div class="cc_t_right">
+        <div class="r_pub_button_retrun" @click="back">返回</div>
+      </div>
+    </div>
+    <div class="cc_bottom" v-loading="loading ">
+			<div class="cc_b_left" v-loading="getFileLoading">
+				<div v-if="courseInfoList">
+					<aiBoxRight :courseId="aiBoxRightCid" :worksArray="courseInfoList" ref="aiChat" @pushFileData="pushFileData" @clearFileData="clearFileData"></aiBoxRight>
+				</div>
+			</div>
+			<div class="cc_b_right">
+				<div class="cc_b_r_menu">
+
+						<div v-for="(item,index) in menuList" @click="changeMenuIndex(index)" :key="index" :class="{'cc_b_r_menu_active':menuIndex==index}">
+							<el-tooltip  class="item" effect="dark" :content="item.name" placement="top">
+								<span>{{item.name}}</span>
+						</el-tooltip>
+						</div>
+
+				</div>
+				<div class="cc_b_r_content">
+					<!-- <iframe
+        ref="viframe"
+        v-if="showFileUrl"
+        style="width: 100%; height: 100%; border: none"
+        :src="showFileUrl"
+      ></iframe> -->
+			<!-- 'https://view.officeapps.live.com/op/view.aspx?src=' +
+			encodeURIComponent(showFileUrl) -->
+					<!-- <txtView v-if="showFileUrl" :url="showFileUrl"></txtView> -->
+					 <csvTableView v-if="showFileUrl" :url="showFileUrl"/>
+				</div>
+			</div>
+		</div>
+  </div>
+</template>
+
+<script>
+import aiBoxRight from '../check/aiBoxRight.vue';
+import txtView from './txtView.vue';
+import csvTableView from './csvTableView.vue';
+export default {
+  name: "ChoseCheck",
+	components:{
+		aiBoxRight,
+		txtView,
+		csvTableView
+	},
+  data() {
+    return {
+      // 组件数据
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      cid: this.$route.query.cid,
+			menuList:[],
+			menuIndex:0,
+			courseInfoList:[],
+			loading:true,
+			leftLoading:true,
+    };
+  },
+  methods: {
+    // 组件方法
+    back() {
+      this.goTo(
+        "/test?userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid +
+          "&org=" +
+          this.org +
+          "&role=" +
+          this.role
+      );
+    },
+    goTo(path) {
+      this.$router.push(path);
+    },
+		getData(){
+			if(this.cid){
+				this.loading = true
+				let cidList = this.cid.split(',')
+				let promiseList = []
+				cidList.forEach(el=>{
+					promiseList.push(this.getCourseData(el))
+				})
+				Promise.all(promiseList).then(res=>{
+					console.log(this.courseInfoList)
+					console.log(res);
+					this.courseInfoList = res;
+					this.loading = false
+				})
+			}
+		},
+		getCourseData(courseId) {
+      return new Promise((resolve)=>{
+				let params = {
+        cid: courseId,
+        cn: "",
+        tim : "",
+        tea: ""
+      };
+      this.ajax
+        .get(this.$store.state.api + "getTestWorksNoPageCopy", params)
+        .then(async (res) => {
+          let testJson = res.data[0][0]
+          let works = res.data[1]
+          let chapters = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
+          let courseCount11 = []
+          let array = []
+          let courseIds = []; // 初始化一个空数组来存储所有的courseId
+          for (let i = 0; i < works.length; i++) {
+            let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(works[i].courseJson))))
+            if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
+              let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(works[i].courseJson))))
+              for (var ja = 0; ja < _json.length; ja++) {
+                let _json2 = _json[ja].json;
+                if (_json[ja].type == 6) {
+                  let courseId = _json2.answer2;
+                  courseIds.push(courseId); // 将type为6的courseId添加到数组中
+                }
+                if (_json[ja].type == 11) {
+                  let _answer = _json2.answer2;
+                  _answer.length ? courseCount11 = courseCount11.concat(_answer) : '';
+                  _json[ja].json.courseId = _answer ? _answer : [];
+                  courseIds = courseIds.concat(_answer); // 将type为11的courseId添加到数组中
+                }
+              }
+            }
+          }
+          // 将所有的courseId去重
+          courseIds = Array.from(new Set(courseIds));
+          // 使用一个数组来存储所有的courseId后,执行getCourseInfoTestAll
+          let courseTitles = {}; // 初始化一个空对象来存储所有的courseTitles
+          let params2 = [{
+            cid: courseIds.join(",")
+          }]
+
+          let data2 = await this.ajax.post(this.$store.state.api + 'getCourseInfoTestAll2', params2);
+          let result2 = data2.data[0];
+          result2.forEach(i => {
+            courseTitles[i.courseId] = i.title;
+          });
+
+          for (let i = 0; i < works.length; i++) {
+            let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(works[i].courseJson))))
+            if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
+              let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(works[i].courseJson))))
+
+              _json.forEach(item => {
+                if (item.type == 11) {
+                  let cid = item.json.answer2
+                  let _title = []
+                  for(var i = 0; i < cid.length; i++){
+                    _title.push(courseTitles[cid[i]])
+                  }
+                  item.json.answer2 = _title.length ? _title.join(",") : '';
+                }
+                if (item.type == 6) {
+                  let courseId = item.json.answer2;
+                  item.json.answer2 = courseTitles[courseId] || '';
+                }
+              });
+              // 更新对应的_json对象的answer2
+              array.push({
+                courseid: works[i].courseid,
+                id: works[i].id,
+                userid: works[i].userid,
+                name: works[i].username ? works[i].username : '匿名',
+                time: works[i].time,
+                array: _json,
+                cut:0,
+                uteaName: works[i].uteaName,
+                courseJson: JSON.parse(works[i].courseJson),
+              })
+            }
+          }
+					let obj = {courseId:testJson.courseId,name:testJson.title,worksArray:array}
+					// this.courseInfoList.push(obj)
+					resolve(obj)
+        })
+        .catch((err) => {
+					resolve();
+          console.error(err);
+        });
+			})
+    },
+		setJSON(json) {
+      return json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json) {
+              delete item2.json.answer2
+              delete item2.json.score2
+              delete item2.json.file
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json) {
+                  delete item3.json.answer2
+                  delete item3.json.score2
+                  delete item3.json.file
+                }
+                return item3;
+              });
+            }
+            return item2;
+          });
+        } else if (item.ttype == 1 && item.json) {
+          delete item.json.answer2
+          delete item.json.score2
+          delete item.json.file
+        }
+        return item
+      });
+    },
+		JSONSetting(json) {
+      let _json = json
+      let array = []
+      _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json) {
+              array.push(item2)
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json) {
+                  array.push(item3)
+                }
+                return item3;
+              });
+            }
+            return item2;
+          });
+        }
+        if (item.ttype == 1 && item.json) {
+          array.push(item)
+        }
+        return item;
+      });
+      return array;
+    },
+		setFilter(json) {
+      let _json = json
+      let array = []
+      _json.filter((item) => {
+        item.nameFilters = [],
+          item.filterParams = {
+            name: [],
+          }
+        if (item.type == 1) {
+          for (var i = 0; i < item.json.array.length; i++) {
+            item.nameFilters.push({ text: item.json.array[i].option, value: item.json.array[i].option })
+          }
+        }
+        array.push(item)
+        return item;
+      });
+      return array
+    },
+		setJson2(json) {
+      let _json = json;
+      // this.type = _json[0].ttype;
+      let checkArray = _json.filter((item) => {
+        if (item.array) {
+          item.array = item.array.filter((item2) => {
+            if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
+              item2.json.answer2 = [];
+            }
+            if (item2.array) {
+              item2.array = item2.array.filter((item3) => {
+                if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
+                  item3.json.answer2 = [];
+                }
+                return item3;
+              });
+            }
+            return (
+              (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
+            );
+          });
+        }
+        if (item.ttype == 1 && item.json && !item.json.answer2) {
+          item.json.answer2 = [];
+        }
+        return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
+      });
+      return checkArray;
+
+    },
+		pushFileData(data){
+			this.menuList.push(data);
+		},
+		clearFileData(){
+			this.menuList = []
+		},
+		changeMenuIndex(index){
+			this.menuIndex = index
+		}
+  },
+	computed:{
+		showFileUrl(){
+			if(this.menuList.length){
+				return this.menuList[this.menuIndex].url
+			}else{
+				return ""
+			}
+		},
+		aiBoxRightCid(){
+			let _result = this.cid;
+
+			let _cidList = _result.split(',');
+			if(_cidList.length>1){
+				_cidList.sort((a, b) => parseInt(b) - parseInt(a));
+				_result = _cidList.join(',');
+			}
+
+			return _result
+		},
+		getFileLoading(){
+			let _result = this.cid;
+			if(this.menuList.length >= _result.split(',').length){
+				return false
+			}else{
+				return true
+			}
+		}
+	},
+	mounted(){
+		this.getData();
+	}
+};
+</script>
+
+<style scoped>
+/* 组件样式 */
+.choseCheck {
+  width: 100vw;
+  height: 100vh;
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 0 20px;
+}
+
+.cc_top {
+  width: 100%;
+  height: 40px;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+.cc_bottom {
+  width: 100%;
+  height: calc(100% - 40px - 10px);
+  overflow: auto;
+  background-color: #fff;
+	border-radius: 5px;
+	display: flex;
+}
+
+.cc_b_left{
+	width: 50%;
+	height: 100%;
+}
+
+.cc_b_left>div{
+	width: 100%;
+	height: 100%;
+}
+
+.cc_b_right{
+	width: 50%;
+	height: 100%;
+  max-height: 100%;
+  overflow: auto;
+	box-sizing: border-box;
+	border-left: 1px solid #E4E7ED;
+}
+
+.cc_b_r_menu{
+	width: 100%;
+	height: 50px;
+	display: flex;
+	align-items: center;
+	box-sizing: border-box;
+	border-bottom: 1px solid #E4E7ED;
+	overflow: auto;
+}
+
+.cc_b_r_menu>div{
+	height: 100%;
+	width: 100px;
+	min-width: 100px;
+	max-width: 100px;
+	padding: 0 15px;
+	display: flex;
+	text-align: center;
+	/* justify-content: center; */
+	align-items: center;
+	cursor: pointer;
+	transition: all 0.3s;
+	/* text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap; */
+}
+
+.cc_b_r_menu>div:hover{
+	background-color: #F5F7FA;
+}
+.cc_b_r_menu>div>span{
+	width: 100%;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+}
+
+.cc_b_r_menu_active{
+	background-color: #3681FC !important;
+	color: #fff;
+}
+
+.cc_b_r_content{
+	width: 100%;
+	height: calc(100% - 50px);
+}
+</style>

+ 106 - 0
src/components/pages/test/choseCheck/txtView.vue

@@ -0,0 +1,106 @@
+<template>
+  <div class="txtView" v-loading="loading">
+		<div class="tv_content" v-text="content"></div>
+	</div>
+</template>
+
+<script>
+import "../../../../common/aws-sdk-2.235.1.min.js";
+
+const getFile = url => {
+  return new Promise((resolve, reject) => {
+    var credentials = {
+      accessKeyId: "AKIATLPEDU37QV5CHLMH",
+      secretAccessKey: "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"
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    let url2 = url;
+    let _url2 = "";
+    if (
+      url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
+    ) {
+      _url2 = url2.split(
+        "https://view.officeapps.live.com/op/view.aspx?src="
+      )[1];
+    } else {
+      _url2 = url2;
+    }
+    var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
+    let name = decodeURIComponent(
+      _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
+    );
+    var params = {
+      Bucket: "ccrb",
+      Key: name
+    };
+    s3.getObject(params, function(err, data) {
+      if (err) {
+        console.log(err, err.stack);
+        resolve({ data: 1 });
+      } else {
+        const fileContent = data.Body.toString("utf-8");
+        resolve({ data: fileContent });
+      } // sxuccessful response
+    });
+    // axios({
+  });
+};
+export default {
+  props: {
+    url: {
+      type: String,
+      default: ""
+    },
+  },
+	data(){
+		return{
+			content:"",
+			loading:""
+		}
+	},
+	methods: {
+		getTxtContent() {
+			if(!this.url)return;
+			this.loading = true;
+			getFile(this.url).then(res=>{
+				this.loading = false;
+				this.content = res.data;
+			})
+		},
+	},
+	watch:{
+		url(newVal,oldVal){
+			if(newVal!==oldVal){
+				this.getTxtContent();
+			}
+		}
+	},
+	mounted(){
+		this.getTxtContent();
+	}
+};
+</script>
+
+<style scoped>
+.txtView{
+	width: 100%;
+	height: 100%;
+	box-sizing: border-box;
+	background-color: #ececec;
+	padding: 0px 0px;
+}
+
+.tv_content{
+	width: 100%;
+	height: 100%;
+	box-sizing: border-box;
+	background-color: #fff;
+	overflow: auto;
+	word-wrap: break-word;
+	border-radius: 3px;
+	white-space: pre;
+	box-sizing: border-box;
+	padding: 10px;
+}
+</style>

+ 143 - 0
src/components/pages/test/data/checkPie.vue

@@ -0,0 +1,143 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%" v-show="this.ooption.data.length"></div>
+            <div v-show="!this.ooption.data.length" class="noneBox">暂无数据</div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        dataJ: {
+            type: Object
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                type: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'item',
+                    formatter: '{b}: {d}%'
+                },
+                legend: {
+                    bottom: '5%',
+                    left: 'center'
+                },
+                series: [
+                    {
+                        name: '',
+                        bottom: '15%',
+                        type: 'pie',
+                        radius: ['40%', '70%'],
+                        avoidLabelOverlap: false,
+                        itemStyle: {
+                            borderRadius: 10,
+                            borderColor: '#fff',
+                            borderWidth: 2
+                        },
+                        label: {
+                            show: true,
+                            formatter: '{b}: {d}%'
+                        },
+                        labelLine: {
+                            show: true
+                        },
+                        data: [
+                            // { value: 1048, name: 'Search Engine' },
+                            // { value: 735, name: 'Direct' },
+                            // { value: 580, name: 'Email' },
+                            // { value: 484, name: 'Union Ads' },
+                            // { value: 300, name: 'Video Ads' }
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(array) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    this.$el.querySelector("#charts_canvas")
+                );
+                //   this.option.series[0].data = array;
+                let _this = this
+                _this.option.series[0].data = array.data
+                // 初始化雷达图
+                _this.chartObj = chartObj;
+                _this.chartObj.setOption(_this.option);
+            });
+        },
+        setJson(array) {
+            this.ooption = {
+                data: []
+            }
+            for(var i = 0; i < array.length; i++){
+                if(array[i].count > 0){
+                    this.ooption.data.push({value: array[i].count, name: array[i].name})
+                }
+            }
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.series[0].data = this.ooption.data;
+                this.chartObj.setOption(this.option);
+            }
+        }
+    },
+    watch: {
+        dataJ: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setJson(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setJson(this.dataJ)
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 100%;
+    /* background: #fff; */
+}
+
+.noneBox { 
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    height: 100%;
+    width: 100%;
+}
+</style>

+ 175 - 0
src/components/pages/test/data/pie1.vue

@@ -0,0 +1,175 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        dataJ: {
+            type: Object
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                type: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'item'
+                },
+                series: [
+                    {
+                        type: 'pie',
+                        radius: ['80%', '100%'],
+                        avoidLabelOverlap: false,
+                        itemStyle: {
+                            borderRadius: 10,
+                            borderColor: '#fff',
+                            borderWidth: 2
+                        },
+                        label: {
+                            show: true,
+                            position: 'center',
+                            // formatter: '{b}\n{c}'
+                            fontSize: 20,
+                            rich: {
+                                a: {
+                                    fontSize: 30,
+                                },
+                                b: {
+                                    lineHeight: 20,
+                                    fontSize: 14,
+                                    color: '#00000099'
+                                }
+                            }
+                            // formatter: function (params) {
+                            //     console.log(params);
+                            //     var sum = 0;
+                            //     for (var i = 0; i < params.data.length; i++) {
+                            //         sum += params.data[i].value;
+                            //     }
+                            //     return sum + '\n表单总数';
+                            // }
+                        },
+                        emphasis: {
+                            label: {
+                                show: true,
+                                fontSize: 20,
+                                rich: {
+                                    a: {
+                                        fontSize: 30,
+                                    },
+                                    b: {
+                                        lineHeight: 20,
+                                        fontSize: 14,
+                                        color: '#00000099'
+                                    }
+                                }
+                                // formatter: '{c}'
+                            }
+                        },
+                        labelLine: {
+                            show: false
+                        },
+                        hoverOffset: 0, // 设置鼠标悬停时不放大
+                        data: [
+                            // { value: 10, name: '进行中', itemStyle: { normal: { color: '#3673e8' } } },
+                            // { value: 7, name: '未进行', itemStyle: { normal: { color: '#f5b763' } } },
+                            // { value: 8, name: '未发布', itemStyle: { normal: { color: '#61b8ff' } } },
+                            // { value: 6, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
+                            // { value: 7, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(array) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    this.$el.querySelector("#charts_canvas")
+                );
+                //   this.option.series[0].data = array;
+                let _this = this
+                _this.option.series[0].data = array.data
+                _this.option.series[0].label.emphasis = _this.option.series[0].label.formatter = function (params) {
+                    console.log(params);
+                    var sum = 0;
+                    for (var i = 0; i < _this.option.series[0].data.length; i++) {
+                        sum += _this.option.series[0].data[i].value;
+                    }
+                    return '{a|' + sum + '}\n{b|表单总数}';
+                }
+                // 初始化雷达图
+                _this.chartObj = chartObj;
+                _this.chartObj.setOption(_this.option);
+            });
+        },
+        setJson(array) {
+            this.ooption = {
+                data: []
+            }
+            this.ooption.data = [
+                { value: array.doing, name: '进行中', itemStyle: { normal: { color: '#3673e8' } } },
+                { value: array.nodo, name: '未进行', itemStyle: { normal: { color: '#b362ff' } } },
+                { value: array.noLook, name: '未发布', itemStyle: { normal: { color: '#61b8ff' } } },
+                { value: array.is, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
+                { value: array.no, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
+            ]
+            if (!this.chartObj) {
+                this.setChart(this.ooption);
+            } else {
+                this.option.series[0].data = this.ooption.data;
+                this.chartObj.setOption(this.option);
+            }
+        }
+    },
+    watch: {
+        dataJ: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setJson(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setJson(this.dataJ)
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 100%;
+    /* background: #fff; */
+}
+</style>

+ 168 - 0
src/components/pages/test/data/pie2.vue

@@ -0,0 +1,168 @@
+<template>
+    <div class="data_body">
+        <div style="width: 100%; height: 100%">
+            <div id="charts_canvas" class="echart" style="width: 100%; height: 100%"></div>
+        </div>
+    </div>
+</template>
+  
+<script>
+export default {
+    props: {
+        loginArray: {
+            type: Array
+        },
+    },
+    data() {
+        return {
+            chartObj: null,
+            ooption: {
+                xdata: [],
+                type: [],
+            },
+            option: {
+                tooltip: {
+                    trigger: 'item'
+                },
+                series: [
+                    {
+                        type: 'pie',
+                        radius: ['80%', '100%'],
+                        avoidLabelOverlap: false,
+                        itemStyle: {
+                            borderRadius: 10,
+                            borderColor: '#fff',
+                            borderWidth: 2
+                        },
+                        label: {
+                            show: true,
+                            position: 'center',
+                            // formatter: '{b}\n{c}'
+                            fontSize: 20,
+                            rich: {
+                                a: {
+                                    fontSize: 30,
+                                },
+                                b: {
+                                    lineHeight: 20,
+                                    fontSize: 14,
+                                    color: '#00000099'
+                                }
+                            }
+                            // formatter: function (params) {
+                            //     var sum = 0;
+                            //     for (var i = 0; i < params.data.length; i++) {
+                            //         sum += params.data[i].value;
+                            //     }
+                            //     return sum + '\n表单总数';
+                            // }
+                        },
+                        emphasis: {
+                            label: {
+                                show: true,
+                                fontSize: 20,
+                                rich: {
+                                    a: {
+                                        fontSize: 30,
+                                    },
+                                    b: {
+                                        lineHeight: 20,
+                                        fontSize: 14,
+                                        color: '#00000099'
+                                    }
+                                }
+                                // formatter: '{c}'
+                            }
+                        },
+                        labelLine: {
+                            show: false
+                        },
+                        hoverOffset: 0, // 设置鼠标悬停时不放大
+                        data: [
+                            { value: 10, name: '未完成', itemStyle: { normal: { color: '#3673e8' } } },
+                            { value: 8, name: '进行中', itemStyle: { normal: { color: '#61b8ff' } } },
+                            { value: 6, name: '已完成', itemStyle: { normal: { color: '#96d8a8' } } },
+                            { value: 7, name: '逾期', itemStyle: { normal: { color: '#f5b763' } } },
+                        ]
+                    }
+                ]
+            },
+        };
+    },
+    methods: {
+        setChart(array) {
+            // 雷达图显示的标签
+            let newPromise = new Promise((resolve) => {
+                resolve();
+            });
+            //然后异步执行echarts的初始化函数
+            newPromise.then(() => {
+                const chartObj = this.$echarts.init(
+                    this.$el.querySelector("#charts_canvas")
+                );
+                //   this.option.series[0].data = array;
+                let _this = this
+                _this.option.series[0].label.emphasis = _this.option.series[0].label.formatter = function (params) {
+                    console.log(params);
+                    var sum = 0;
+                    for (var i = 0; i < _this.option.series[0].data.length; i++) {
+                        sum += _this.option.series[0].data[i].value;
+                    }
+                    return '{a|' + sum + '}\n{b|教师总数}';
+                }
+                // 初始化雷达图
+                this.chartObj = chartObj;
+                this.chartObj.setOption(this.option);
+            });
+        },
+        setJson(array) {
+            this.ooption = {
+                xdata: [],
+                sdata: [],
+                max: 0
+            }
+
+            if (!this.chartObj) {
+                this.setChart(array);
+            } else {
+                this.option.series[0].data = array;
+                this.chartObj.setOption(this.option);
+            }
+        }
+    },
+    watch: {
+        loginArray: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.setJson(newValue)
+                this.$forceUpdate();
+            },
+        },
+    },
+    mounted() {
+        this.setJson(this.loginArray)
+        var _this = this;
+        window.addEventListener("resize", () => {
+            if (_this.chartObj) {
+                _this.chartObj.resize();
+            }
+        });
+    },
+};
+</script>
+  
+<style scoped>
+.data_body {
+    height: 100%;
+    /* display: flex; */
+    position: relative;
+    border-radius: 5px;
+    /* border: 1px solid #eee; */
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding: 0;
+    width: 100%;
+    /* background: #fff; */
+}
+</style>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff