Browse Source

Merge branch 'beta' into English

# Conflicts:
#	dist/index.html
#	dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
#	dist/static/js/vendor.41f9d44fcc305a660223.js.map
#	dist/static/js/vendor.8c9ac76522a5e4bf9301.js.map
#	dist/static/js/vendor.cc2818e998cd275024e3.js.map
lsc 1 month ago
parent
commit
dafe28cbd5

+ 2 - 1
config/dev.env.js

@@ -3,5 +3,6 @@ const merge = require('webpack-merge')
 const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
-  NODE_ENV: '"development"'
+  NODE_ENV: '"development"',
+  VUE_APP_HTML2MD_API: '"http://localhost:7004"'
 })

+ 2 - 1
config/prod.env.js

@@ -1,4 +1,5 @@
 'use strict'
 module.exports = {
-  NODE_ENV: '"production"'
+  NODE_ENV: '"production"',
+  VUE_APP_HTML2MD_API: '"https://r2rapi.cocorobo.cn"'
 }

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.40534e6bddaa59c5bcce50efc9151170.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.41f9d44fcc305a660223.js></script><script type=text/javascript src=./static/js/app.e6aad95441e0971d6cdd.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.637debc6fc2a76fe1c9822b8d68e2041.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.8c9ac76522a5e4bf9301.js></script><script type=text/javascript src=./static/js/app.80cc73de1a76ab9e927a.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


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


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


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


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


+ 534 - 8
package-lock.json

@@ -8,6 +8,7 @@
       "name": "cocoroboworkpc",
       "version": "1.0.0",
       "dependencies": {
+        "@antv/g6": "^4.8.25",
         "@ffmpeg/ffmpeg": "^0.9.8",
         "@microsoft/fetch-event-source": "^2.0.1",
         "@vue-office/docx": "^1.6.2",
@@ -118,6 +119,387 @@
         "npm": ">= 3.0.0"
       }
     },
+    "node_modules/@ant-design/colors": {
+      "version": "4.0.5",
+      "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-4.0.5.tgz",
+      "integrity": "sha512-3mnuX2prnWOWvpFTS2WH2LoouWlOgtnIpc6IarWN6GOzzLF8dW/U8UctuvIPhoboETehZfJ61XP+CGakBEPJ3Q==",
+      "dependencies": {
+        "tinycolor2": "^1.4.1"
+      }
+    },
+    "node_modules/@antv/algorithm": {
+      "version": "0.1.26",
+      "resolved": "https://registry.npmjs.org/@antv/algorithm/-/algorithm-0.1.26.tgz",
+      "integrity": "sha512-DVhcFSQ8YQnMNW34Mk8BSsfc61iC1sAnmcfYoXTAshYHuU50p/6b7x3QYaGctDNKWGvi1ub7mPcSY0bK+aN0qg==",
+      "dependencies": {
+        "@antv/util": "^2.0.13",
+        "tslib": "^2.0.0"
+      }
+    },
+    "node_modules/@antv/dom-util": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/@antv/dom-util/-/dom-util-2.0.4.tgz",
+      "integrity": "sha512-2shXUl504fKwt82T3GkuT4Uoc6p9qjCKnJ8gXGLSW4T1W37dqf9AV28aCfoVPHp2BUXpSsB+PAJX2rG/jLHsLQ==",
+      "dependencies": {
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/event-emitter": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/@antv/event-emitter/-/event-emitter-0.1.3.tgz",
+      "integrity": "sha512-4ddpsiHN9Pd4UIlWuKVK1C4IiZIdbwQvy9i7DUSI3xNJ89FPUFt8lxDYj8GzzfdllV0NkJTRxnG+FvLk0llidg=="
+    },
+    "node_modules/@antv/g-base": {
+      "version": "0.5.16",
+      "resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.16.tgz",
+      "integrity": "sha512-jP06wggTubDPHXoKwFg3/f1lyxBX9ywwN3E/HG74Nd7DXqOXQis8tsIWW+O6dS/h9vyuXLd1/wDWkMMm3ZzXdg==",
+      "dependencies": {
+        "@antv/event-emitter": "^0.1.1",
+        "@antv/g-math": "^0.1.9",
+        "@antv/matrix-util": "^3.1.0-beta.1",
+        "@antv/path-util": "~2.0.5",
+        "@antv/util": "~2.0.13",
+        "@types/d3-timer": "^2.0.0",
+        "d3-ease": "^1.0.5",
+        "d3-interpolate": "^3.0.1",
+        "d3-timer": "^1.0.9",
+        "detect-browser": "^5.1.0",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/g-base/node_modules/d3-ease": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.7.tgz",
+      "integrity": "sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ=="
+    },
+    "node_modules/@antv/g-base/node_modules/d3-interpolate": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
+      "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
+      "dependencies": {
+        "d3-color": "1 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@antv/g-base/node_modules/d3-timer": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz",
+      "integrity": "sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw=="
+    },
+    "node_modules/@antv/g-canvas": {
+      "version": "0.5.17",
+      "resolved": "https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.17.tgz",
+      "integrity": "sha512-sXYJMWTOlb/Ycb6sTKu00LcJqInXJY4t99+kSM40u2OfqrXYmaXDjHR7D2V0roMkbK/QWiWS9UnEidCR1VtMOA==",
+      "dependencies": {
+        "@antv/g-base": "^0.5.12",
+        "@antv/g-math": "^0.1.9",
+        "@antv/matrix-util": "^3.1.0-beta.1",
+        "@antv/path-util": "~2.0.5",
+        "@antv/util": "~2.0.0",
+        "gl-matrix": "^3.0.0",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/g-math": {
+      "version": "0.1.9",
+      "resolved": "https://registry.npmjs.org/@antv/g-math/-/g-math-0.1.9.tgz",
+      "integrity": "sha512-KHMSfPfZ5XHM1PZnG42Q2gxXfOitYveNTA7L61lR6mhZ8Y/aExsYmHqaKBsSarU0z+6WLrl9C07PQJZaw0uljQ==",
+      "dependencies": {
+        "@antv/util": "~2.0.0",
+        "gl-matrix": "^3.0.0"
+      }
+    },
+    "node_modules/@antv/g-svg": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/@antv/g-svg/-/g-svg-0.5.7.tgz",
+      "integrity": "sha512-jUbWoPgr4YNsOat2Y/rGAouNQYGpw4R0cvlN0YafwOyacFFYy2zC8RslNd6KkPhhR3XHNSqJOuCYZj/YmLUwYw==",
+      "dependencies": {
+        "@antv/g-base": "^0.5.12",
+        "@antv/g-math": "^0.1.9",
+        "@antv/util": "~2.0.0",
+        "detect-browser": "^5.0.0",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/g-webgpu": {
+      "version": "0.7.2",
+      "resolved": "https://registry.npmjs.org/@antv/g-webgpu/-/g-webgpu-0.7.2.tgz",
+      "integrity": "sha512-kw+oYGsdvj5qeUfy5DPb/jztZBV+2fmqBd3Vv8NlKatfBmv8AirYX/CCW74AUSdWm99rEiLyxFB1VdRZ6b/wnQ==",
+      "dependencies": {
+        "@antv/g-webgpu-core": "^0.7.2",
+        "@antv/g-webgpu-engine": "^0.7.2",
+        "gl-matrix": "^3.1.0",
+        "gl-vec2": "^1.3.0",
+        "lodash": "^4.17.15"
+      }
+    },
+    "node_modules/@antv/g-webgpu-core": {
+      "version": "0.7.2",
+      "resolved": "https://registry.npmjs.org/@antv/g-webgpu-core/-/g-webgpu-core-0.7.2.tgz",
+      "integrity": "sha512-xUMmop7f3Rs34zFYKXLqHhDR1CQTeDl/7vI7Sn3X/73BqJc3X3HIIRvm83Fg2CjVACaOzw4WeLRXNaOCp9fz9w==",
+      "dependencies": {
+        "eventemitter3": "^4.0.0",
+        "gl-matrix": "^3.1.0",
+        "lodash": "^4.17.15",
+        "probe.gl": "^3.1.1"
+      }
+    },
+    "node_modules/@antv/g-webgpu-engine": {
+      "version": "0.7.2",
+      "resolved": "https://registry.npmjs.org/@antv/g-webgpu-engine/-/g-webgpu-engine-0.7.2.tgz",
+      "integrity": "sha512-lx8Y93IW2cnJvdoDRKyMmTdYqSC1pOmF0nyG3PGGyA0NI9vBYVgO0KTF6hkyWjdTWVq7XDZyf/h8CJridLh3lg==",
+      "dependencies": {
+        "@antv/g-webgpu-core": "^0.7.2",
+        "gl-matrix": "^3.1.0",
+        "lodash": "^4.17.15",
+        "regl": "^1.3.11"
+      }
+    },
+    "node_modules/@antv/g6": {
+      "version": "4.8.25",
+      "resolved": "https://registry.npmjs.org/@antv/g6/-/g6-4.8.25.tgz",
+      "integrity": "sha512-8mdTnN9QMVNQZtlXmftL8fvRsa4L+GajK58Zp51wyrGLFyjeop8R0QSkCALW45DWP2TaQeZAPtjhQUU/wf5hIg==",
+      "dependencies": {
+        "@antv/g6-pc": "0.8.25"
+      }
+    },
+    "node_modules/@antv/g6-core": {
+      "version": "0.8.24",
+      "resolved": "https://registry.npmjs.org/@antv/g6-core/-/g6-core-0.8.24.tgz",
+      "integrity": "sha512-rgI3dArAD8uoSz2+skS4ctN4x/Of33ivTIKaEYYvClxgkLZWVz9zvocy+5AWcVPBHZsAXkZcdh9zndIoWY/33A==",
+      "dependencies": {
+        "@antv/algorithm": "^0.1.26",
+        "@antv/dom-util": "^2.0.1",
+        "@antv/event-emitter": "~0.1.0",
+        "@antv/g-base": "^0.5.1",
+        "@antv/g-math": "^0.1.1",
+        "@antv/matrix-util": "^3.1.0-beta.3",
+        "@antv/path-util": "^2.0.3",
+        "@antv/util": "~2.0.5",
+        "ml-matrix": "^6.5.0",
+        "tslib": "^2.6.2"
+      }
+    },
+    "node_modules/@antv/g6-core/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
+    },
+    "node_modules/@antv/g6-element": {
+      "version": "0.8.25",
+      "resolved": "https://registry.npmjs.org/@antv/g6-element/-/g6-element-0.8.25.tgz",
+      "integrity": "sha512-bPsI+dS9rdp80O/XyV0iy6QiusyOgO/diCIsGQuLHs6rBqjLtDA5yu9JDo49mPA3JblJV0MYjbgL8Exou7Ecqw==",
+      "dependencies": {
+        "@antv/g-base": "^0.5.1",
+        "@antv/g6-core": "0.8.24",
+        "@antv/util": "~2.0.5",
+        "tslib": "^2.6.2"
+      },
+      "peerDependencies": {
+        "@antv/g6": "4.8.25"
+      }
+    },
+    "node_modules/@antv/g6-element/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
+    },
+    "node_modules/@antv/g6-pc": {
+      "version": "0.8.25",
+      "resolved": "https://registry.npmjs.org/@antv/g6-pc/-/g6-pc-0.8.25.tgz",
+      "integrity": "sha512-HZ2QyDbgsUQpQBFqrA8Zcvm/rAKN4n3I7XEeWCODZgyhQ8kz2f3qdzrRXDPmMyclexi0JF9DarCs8a2rzhV5YA==",
+      "dependencies": {
+        "@ant-design/colors": "^4.0.5",
+        "@antv/algorithm": "^0.1.26",
+        "@antv/dom-util": "^2.0.1",
+        "@antv/event-emitter": "~0.1.0",
+        "@antv/g-base": "^0.5.1",
+        "@antv/g-canvas": "^0.5.2",
+        "@antv/g-math": "^0.1.1",
+        "@antv/g-svg": "^0.5.1",
+        "@antv/g6-core": "0.8.24",
+        "@antv/g6-element": "0.8.25",
+        "@antv/g6-plugin": "0.8.25",
+        "@antv/hierarchy": "^0.6.10",
+        "@antv/layout": "^0.3.0",
+        "@antv/matrix-util": "^3.1.0-beta.3",
+        "@antv/path-util": "^2.0.3",
+        "@antv/util": "~2.0.5",
+        "color": "^3.1.3",
+        "d3-force": "^2.0.1",
+        "dagre": "^0.8.5",
+        "insert-css": "^2.0.0",
+        "ml-matrix": "^6.5.0",
+        "tslib": "^2.6.2"
+      }
+    },
+    "node_modules/@antv/g6-pc/node_modules/color": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
+      "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
+      "dependencies": {
+        "color-convert": "^1.9.3",
+        "color-string": "^1.6.0"
+      }
+    },
+    "node_modules/@antv/g6-pc/node_modules/color-string": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
+      "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
+      "dependencies": {
+        "color-name": "^1.0.0",
+        "simple-swizzle": "^0.2.2"
+      }
+    },
+    "node_modules/@antv/g6-pc/node_modules/d3-force": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz",
+      "integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==",
+      "dependencies": {
+        "d3-dispatch": "1 - 2",
+        "d3-quadtree": "1 - 2",
+        "d3-timer": "1 - 2"
+      }
+    },
+    "node_modules/@antv/g6-pc/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
+    },
+    "node_modules/@antv/g6-plugin": {
+      "version": "0.8.25",
+      "resolved": "https://registry.npmjs.org/@antv/g6-plugin/-/g6-plugin-0.8.25.tgz",
+      "integrity": "sha512-TAincRgNzrZNGBt1TvzfQV0Ob6OO3+WCcTrCZb4PzRoOessAiMsNm0S7x+7NFm30DJVC8Ud2M7M2V9DjhVd8Wg==",
+      "dependencies": {
+        "@antv/dom-util": "^2.0.2",
+        "@antv/g-base": "^0.5.1",
+        "@antv/g-canvas": "^0.5.2",
+        "@antv/g-svg": "^0.5.2",
+        "@antv/g6-core": "0.8.24",
+        "@antv/g6-element": "0.8.25",
+        "@antv/matrix-util": "^3.1.0-beta.3",
+        "@antv/path-util": "^2.0.3",
+        "@antv/scale": "^0.3.4",
+        "@antv/util": "^2.0.9",
+        "insert-css": "^2.0.0"
+      },
+      "peerDependencies": {
+        "@antv/g6": "4.8.25"
+      }
+    },
+    "node_modules/@antv/graphlib": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/@antv/graphlib/-/graphlib-1.2.0.tgz",
+      "integrity": "sha512-hhJOMThec51nU4Fe5p/viLlNIL71uDEgYFzKPajWjr2715SFG1HAgiP6AVylIeqBcAZ04u3Lw7usjl/TuI5RuQ=="
+    },
+    "node_modules/@antv/hierarchy": {
+      "version": "0.6.14",
+      "resolved": "https://registry.npmjs.org/@antv/hierarchy/-/hierarchy-0.6.14.tgz",
+      "integrity": "sha512-V3uknf7bhynOqQDw2sg+9r9DwZ9pc6k/EcqyTFdfXB1+ydr7urisP0MipIuimucvQKN+Qkd+d6w601r1UIroqQ=="
+    },
+    "node_modules/@antv/layout": {
+      "version": "0.3.25",
+      "resolved": "https://registry.npmjs.org/@antv/layout/-/layout-0.3.25.tgz",
+      "integrity": "sha512-d29Aw1PXoAavMRZy7iTB9L5rMBeChFEX0BJ9ELP4TI35ySdCu07YbmPo9ju9OH/6sG2/NB3o85Ayxrre3iwX/g==",
+      "dependencies": {
+        "@antv/g-webgpu": "0.7.2",
+        "@antv/graphlib": "^1.0.0",
+        "@antv/util": "^3.3.2",
+        "d3-force": "^2.1.1",
+        "d3-quadtree": "^2.0.0",
+        "dagre-compound": "^0.0.11",
+        "ml-matrix": "6.5.0"
+      }
+    },
+    "node_modules/@antv/layout/node_modules/@antv/util": {
+      "version": "3.3.11",
+      "resolved": "https://registry.npmjs.org/@antv/util/-/util-3.3.11.tgz",
+      "integrity": "sha512-FII08DFM4ABh2q5rPYdr0hMtKXRgeZazvXaFYCs7J7uTcWDHUhczab2qOCJLNDugoj8jFag1djb7wS9ehaRYBg==",
+      "dependencies": {
+        "fast-deep-equal": "^3.1.3",
+        "gl-matrix": "^3.3.0",
+        "tslib": "^2.3.1"
+      }
+    },
+    "node_modules/@antv/layout/node_modules/d3-force": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz",
+      "integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==",
+      "dependencies": {
+        "d3-dispatch": "1 - 2",
+        "d3-quadtree": "1 - 2",
+        "d3-timer": "1 - 2"
+      }
+    },
+    "node_modules/@antv/layout/node_modules/d3-quadtree": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz",
+      "integrity": "sha512-b0Ed2t1UUalJpc3qXzKi+cPGxeXRr4KU9YSlocN74aTzp6R/Ud43t79yLLqxHRWZfsvWXmbDWPpoENK1K539xw=="
+    },
+    "node_modules/@antv/layout/node_modules/ml-matrix": {
+      "version": "6.5.0",
+      "resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.5.0.tgz",
+      "integrity": "sha512-sms732Dge+rs5dU4mnjE0oqLWm1WujvR2fr38LgUHRG2cjXjWlO3WJupLYaSz3++2iYr0UrGDK72OAivr3J8dg==",
+      "dependencies": {
+        "ml-array-rescale": "^1.3.1"
+      }
+    },
+    "node_modules/@antv/layout/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
+    },
+    "node_modules/@antv/matrix-util": {
+      "version": "3.1.0-beta.3",
+      "resolved": "https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.1.0-beta.3.tgz",
+      "integrity": "sha512-W2R6Za3A6CmG51Y/4jZUM/tFgYSq7vTqJL1VD9dKrvwxS4sE0ZcXINtkp55CdyBwJ6Cwm8pfoRpnD4FnHahN0A==",
+      "dependencies": {
+        "@antv/util": "^2.0.9",
+        "gl-matrix": "^3.4.3",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/path-util": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@antv/path-util/-/path-util-2.0.15.tgz",
+      "integrity": "sha512-R2VLZ5C8PLPtr3VciNyxtjKqJ0XlANzpFb5sE9GE61UQqSRuSVSzIakMxjEPrpqbgc+s+y8i+fmc89Snu7qbNw==",
+      "dependencies": {
+        "@antv/matrix-util": "^3.0.4",
+        "@antv/util": "^2.0.9",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/path-util/node_modules/@antv/matrix-util": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@antv/matrix-util/-/matrix-util-3.0.4.tgz",
+      "integrity": "sha512-BAPyu6dUliHcQ7fm9hZSGKqkwcjEDVLVAstlHULLvcMZvANHeLXgHEgV7JqcAV/GIhIz8aZChIlzM1ZboiXpYQ==",
+      "dependencies": {
+        "@antv/util": "^2.0.9",
+        "gl-matrix": "^3.3.0",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/@antv/scale": {
+      "version": "0.3.18",
+      "resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.18.tgz",
+      "integrity": "sha512-GHwE6Lo7S/Q5fgaLPaCsW+CH+3zl4aXpnN1skOiEY0Ue9/u+s2EySv6aDXYkAqs//i0uilMDD/0/4n8caX9U9w==",
+      "dependencies": {
+        "@antv/util": "~2.0.3",
+        "fecha": "~4.2.0",
+        "tslib": "^2.0.0"
+      }
+    },
+    "node_modules/@antv/util": {
+      "version": "2.0.17",
+      "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.17.tgz",
+      "integrity": "sha512-o6I9hi5CIUvLGDhth0RxNSFDRwXeywmt6ExR4+RmVAzIi48ps6HUy+svxOCayvrPBN37uE6TAc2KDofRo0nK9Q==",
+      "dependencies": {
+        "csstype": "^3.0.8",
+        "tslib": "^2.0.3"
+      }
+    },
     "node_modules/@babel/code-frame": {
       "version": "7.26.2",
       "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.26.2.tgz",
@@ -369,6 +751,31 @@
         "url": "https://opencollective.com/popperjs"
       }
     },
+    "node_modules/@probe.gl/env": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/@probe.gl/env/-/env-3.6.0.tgz",
+      "integrity": "sha512-4tTZYUg/8BICC3Yyb9rOeoKeijKbZHRXBEKObrfPmX4sQmYB15ZOUpoVBhAyJkOYVAM8EkPci6Uw5dLCwx2BEQ==",
+      "dependencies": {
+        "@babel/runtime": "^7.0.0"
+      }
+    },
+    "node_modules/@probe.gl/log": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/@probe.gl/log/-/log-3.6.0.tgz",
+      "integrity": "sha512-hjpyenpEvOdowgZ1qMeCJxfRD4JkKdlXz0RC14m42Un62NtOT+GpWyKA4LssT0+xyLULCByRAtG2fzZorpIAcA==",
+      "dependencies": {
+        "@babel/runtime": "^7.0.0",
+        "@probe.gl/env": "3.6.0"
+      }
+    },
+    "node_modules/@probe.gl/stats": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-3.6.0.tgz",
+      "integrity": "sha512-JdALQXB44OP4kUBN/UrQgzbJe4qokbVF4Y8lkIA8iVCFnjVowWIgkD/z/0QO65yELT54tTrtepw1jScjKB+rhQ==",
+      "dependencies": {
+        "@babel/runtime": "^7.0.0"
+      }
+    },
     "node_modules/@tootallnate/once": {
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/@tootallnate/once/-/once-1.1.2.tgz",
@@ -378,6 +785,11 @@
         "node": ">= 6"
       }
     },
+    "node_modules/@types/d3-timer": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.3.tgz",
+      "integrity": "sha512-jhAJzaanK5LqyLQ50jJNIrB8fjL9gwWZTgYjevPvkDLMU+kTAZkYsobI59nYoeSrH1PucuyJEi247Pb90t6XUg=="
+    },
     "node_modules/@types/eslint": {
       "version": "8.56.10",
       "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.56.10.tgz",
@@ -3179,7 +3591,6 @@
       "version": "1.9.3",
       "resolved": "https://registry.npmmirror.com/color-convert/download/color-convert-1.9.3.tgz?cache=0&sync_timestamp=1566248870121&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor-convert%2Fdownload%2Fcolor-convert-1.9.3.tgz",
       "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
-      "dev": true,
       "dependencies": {
         "color-name": "1.1.3"
       }
@@ -3187,8 +3598,7 @@
     "node_modules/color-name": {
       "version": "1.1.3",
       "resolved": "https://registry.npmmirror.com/color-name/download/color-name-1.1.3.tgz",
-      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
-      "dev": true
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
     },
     "node_modules/color-string": {
       "version": "0.3.0",
@@ -4754,6 +5164,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/csstype": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
+      "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
+    },
     "node_modules/cuint": {
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/cuint/download/cuint-0.2.2.tgz",
@@ -5070,6 +5485,26 @@
         "d3-transition": "1"
       }
     },
+    "node_modules/dagre": {
+      "version": "0.8.5",
+      "resolved": "https://registry.npmjs.org/dagre/-/dagre-0.8.5.tgz",
+      "integrity": "sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==",
+      "dependencies": {
+        "graphlib": "^2.1.8",
+        "lodash": "^4.17.15"
+      }
+    },
+    "node_modules/dagre-compound": {
+      "version": "0.0.11",
+      "resolved": "https://registry.npmjs.org/dagre-compound/-/dagre-compound-0.0.11.tgz",
+      "integrity": "sha512-UrSgRP9LtOZCYb9e5doolZXpc7xayyszgyOs7uakTK4n4KsLegLVTRRtq01GpQd/iZjYw5fWMapx9ed+c80MAQ==",
+      "engines": {
+        "node": ">=6.0.0"
+      },
+      "peerDependencies": {
+        "dagre": "^0.8.5"
+      }
+    },
     "node_modules/dashdash": {
       "version": "1.14.1",
       "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz",
@@ -5310,6 +5745,11 @@
       "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
       "dev": true
     },
+    "node_modules/detect-browser": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz",
+      "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w=="
+    },
     "node_modules/detect-indent": {
       "version": "4.0.0",
       "resolved": "https://registry.npmmirror.com/detect-indent/-/detect-indent-4.0.0.tgz",
@@ -5979,8 +6419,7 @@
     "node_modules/eventemitter3": {
       "version": "4.0.7",
       "resolved": "https://registry.npmmirror.com/eventemitter3/download/eventemitter3-4.0.7.tgz?cache=0&sync_timestamp=1598517728928&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.7.tgz",
-      "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=",
-      "dev": true
+      "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8="
     },
     "node_modules/events": {
       "version": "3.3.0",
@@ -6320,6 +6759,11 @@
         "node": ">=0.4.0"
       }
     },
+    "node_modules/fecha": {
+      "version": "4.2.3",
+      "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz",
+      "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw=="
+    },
     "node_modules/fflate": {
       "version": "0.3.11",
       "resolved": "https://registry.npmmirror.com/fflate/download/fflate-0.3.11.tgz?cache=0&sync_timestamp=1616295166909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffflate%2Fdownload%2Ffflate-0.3.11.tgz",
@@ -6789,6 +7233,16 @@
         "assert-plus": "^1.0.0"
       }
     },
+    "node_modules/gl-matrix": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz",
+      "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA=="
+    },
+    "node_modules/gl-vec2": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/gl-vec2/-/gl-vec2-1.3.0.tgz",
+      "integrity": "sha512-YiqaAuNsheWmUV0Sa8k94kBB0D6RWjwZztyO+trEYS8KzJ6OQB/4686gdrf59wld4hHFIvaxynO3nRxpk1Ij/A=="
+    },
     "node_modules/glob": {
       "version": "7.1.6",
       "resolved": "https://registry.npmmirror.com/glob/download/glob-7.1.6.tgz",
@@ -6898,6 +7352,14 @@
       "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz",
       "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
     },
+    "node_modules/graphlib": {
+      "version": "2.1.8",
+      "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz",
+      "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==",
+      "dependencies": {
+        "lodash": "^4.17.15"
+      }
+    },
     "node_modules/growly": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/growly/download/growly-1.3.0.tgz",
@@ -7731,6 +8193,11 @@
       "resolved": "https://registry.npmmirror.com/inherits/download/inherits-2.0.4.tgz",
       "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w="
     },
+    "node_modules/insert-css": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/insert-css/-/insert-css-2.0.0.tgz",
+      "integrity": "sha512-xGq5ISgcUP5cvGkS2MMFLtPDBtrtQPSFfC6gA6U8wHKqfjTIMZLZNxOItQnoSjdOzlXOLU/yD32RKC4SvjNbtA=="
+    },
     "node_modules/internal-ip": {
       "version": "1.2.0",
       "resolved": "https://registry.npmmirror.com/internal-ip/download/internal-ip-1.2.0.tgz?cache=0&sync_timestamp=1605885528721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finternal-ip%2Fdownload%2Finternal-ip-1.2.0.tgz",
@@ -7813,6 +8280,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/is-any-array": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.1.tgz",
+      "integrity": "sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ=="
+    },
     "node_modules/is-arguments": {
       "version": "1.1.0",
       "resolved": "https://registry.npmmirror.com/is-arguments/download/is-arguments-1.1.0.tgz?cache=0&sync_timestamp=1607117337190&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-arguments%2Fdownload%2Fis-arguments-1.1.0.tgz",
@@ -9729,6 +10201,41 @@
         "mkdirp": "bin/cmd.js"
       }
     },
+    "node_modules/ml-array-max": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-1.2.4.tgz",
+      "integrity": "sha512-BlEeg80jI0tW6WaPyGxf5Sa4sqvcyY6lbSn5Vcv44lp1I2GR6AWojfUvLnGTNsIXrZ8uqWmo8VcG1WpkI2ONMQ==",
+      "dependencies": {
+        "is-any-array": "^2.0.0"
+      }
+    },
+    "node_modules/ml-array-min": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-1.2.3.tgz",
+      "integrity": "sha512-VcZ5f3VZ1iihtrGvgfh/q0XlMobG6GQ8FsNyQXD3T+IlstDv85g8kfV0xUG1QPRO/t21aukaJowDzMTc7j5V6Q==",
+      "dependencies": {
+        "is-any-array": "^2.0.0"
+      }
+    },
+    "node_modules/ml-array-rescale": {
+      "version": "1.3.7",
+      "resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-1.3.7.tgz",
+      "integrity": "sha512-48NGChTouvEo9KBctDfHC3udWnQKNKEWN0ziELvY3KG25GR5cA8K8wNVzracsqSW1QEkAXjTNx+ycgAv06/1mQ==",
+      "dependencies": {
+        "is-any-array": "^2.0.0",
+        "ml-array-max": "^1.2.4",
+        "ml-array-min": "^1.2.3"
+      }
+    },
+    "node_modules/ml-matrix": {
+      "version": "6.12.1",
+      "resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.12.1.tgz",
+      "integrity": "sha512-TJ+8eOFdp+INvzR4zAuwBQJznDUfktMtOB6g/hUcGh3rcyjxbz4Te57Pgri8Q9bhSQ7Zys4IYOGhFdnlgeB6Lw==",
+      "dependencies": {
+        "is-any-array": "^2.0.1",
+        "ml-array-rescale": "^1.3.7"
+      }
+    },
     "node_modules/move-concurrently": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/move-concurrently/-/move-concurrently-1.0.1.tgz",
@@ -14455,6 +14962,17 @@
         "node": ">= 0.6"
       }
     },
+    "node_modules/probe.gl": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/probe.gl/-/probe.gl-3.6.0.tgz",
+      "integrity": "sha512-19JydJWI7+DtR4feV+pu4Mn1I5TAc0xojuxVgZdXIyfmTLfUaFnk4OloWK1bKbPtkgGKLr2lnbnCXmpZEcEp9g==",
+      "dependencies": {
+        "@babel/runtime": "^7.0.0",
+        "@probe.gl/env": "3.6.0",
+        "@probe.gl/log": "3.6.0",
+        "@probe.gl/stats": "3.6.0"
+      }
+    },
     "node_modules/process": {
       "version": "0.11.10",
       "resolved": "https://registry.npmmirror.com/process/download/process-0.11.10.tgz",
@@ -14925,6 +15443,11 @@
         "jsesc": "bin/jsesc"
       }
     },
+    "node_modules/regl": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/regl/-/regl-1.7.0.tgz",
+      "integrity": "sha512-bEAtp/qrtKucxXSJkD4ebopFZYP0q1+3Vb2WECWv/T8yQEgKxDxJ7ztO285tAMaYZVR6mM1GgI6CCn8FROtL1w=="
+    },
     "node_modules/relateurl": {
       "version": "0.2.7",
       "resolved": "https://registry.npmmirror.com/relateurl/download/relateurl-0.2.7.tgz",
@@ -15729,7 +16252,6 @@
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/simple-swizzle/download/simple-swizzle-0.2.2.tgz",
       "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
-      "dev": true,
       "dependencies": {
         "is-arrayish": "^0.3.1"
       }
@@ -15737,8 +16259,7 @@
     "node_modules/simple-swizzle/node_modules/is-arrayish": {
       "version": "0.3.2",
       "resolved": "https://registry.npmmirror.com/is-arrayish/download/is-arrayish-0.3.2.tgz",
-      "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=",
-      "dev": true
+      "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM="
     },
     "node_modules/slash": {
       "version": "1.0.0",
@@ -16727,6 +17248,11 @@
       "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
       "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
     },
+    "node_modules/tinycolor2": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz",
+      "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw=="
+    },
     "node_modules/to-arraybuffer": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz",

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
     "build": "node build/build.js"
   },
   "dependencies": {
+    "@antv/g6": "^4.8.25",
     "@ffmpeg/ffmpeg": "^0.9.8",
     "@microsoft/fetch-event-source": "^2.0.1",
     "@vue-office/docx": "^1.6.2",

+ 2 - 2
src/common/axios.config.js

@@ -26,9 +26,9 @@ axios.interceptors.request.use((config) => {
     // } else if (config.method === 'post') {
     //     config.data = qs.stringify(config.data)//序列化post 参数
     // }
-    if (config.url === 'https://gpt.cocorobo.cn/search_image' || config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
+    if (config.url.includes('knowledge-base') || config.url === 'https://gpt.cocorobo.cn/search_image' || config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
         config.data = config.data//序列化post 参数
-    } else if (config.url.indexOf('https://r2rserver.cocorobo.cn') != -1) {
+    } else if (config.url.indexOf('http://localhost:7004') != -1 || config.url.indexOf('https://r2rserver.cocorobo.cn') != -1) {
         config.headers = {
             'Content-Type': 'application/json',
         }

+ 162 - 0
src/components/pages/knowledge/WebCrawlDialog.vue

@@ -0,0 +1,162 @@
+<template>
+  <el-dialog
+    :visible.sync="localVisible"
+    :title="lang.webCrawlDialog.title"
+    width="800px"
+    :close-on-click-modal="true"
+    class="web-crawl-dialog"
+  >
+    <el-tabs v-model="tab" class="web-crawl-tabs">
+      <el-tab-pane :label="lang.webCrawlDialog.tabSingle" name="single" />
+      <el-tab-pane :label="lang.webCrawlDialog.tabSite" name="site" disabled />
+    </el-tabs>
+    <div class="web-crawl-form">
+      <el-input
+        :value="inputUrl"
+        @input="$emit('update:inputUrl', $event)"
+        :placeholder="lang.webCrawlDialog.inputPlaceholder"
+        class="web-crawl-input"
+      />
+      <div class="web-crawl-tip">
+        {{lang.webCrawlDialog.tip}}
+      </div>
+      <el-collapse v-model="advancedOpen" class="web-crawl-advanced">
+        <el-collapse-item :title="lang.webCrawlDialog.advancedTitle" name="advanced">
+          <div class="web-crawl-advanced-row web-crawl-advanced-row-flex">
+            <div class="web-crawl-advanced-block">
+              <div class="web-crawl-advanced-item">
+                <span>{{lang.webCrawlDialog.schedule}}</span>
+                <el-select v-model="schedule" :placeholder="lang.webCrawlDialog.scheduleNever" style="width: 120px; margin-left: 8px;" disabled>
+                  <!-- 暂未实现,禁用 -->
+                  <el-option :label="lang.webCrawlDialog.scheduleNever" value="never" />
+                  <el-option :label="lang.webCrawlDialog.scheduleDay" value="day" />
+                  <el-option :label="lang.webCrawlDialog.scheduleWeek" value="week" />
+                </el-select>
+              </div>
+              <div class="web-crawl-advanced-tip">{{lang.webCrawlDialog.scheduleTip}}</div>
+            </div>
+            <div class="web-crawl-advanced-block">
+              <div class="web-crawl-advanced-item">
+                <span>{{lang.webCrawlDialog.attachment}}</span>
+                <el-switch v-model="getAttachment" style="margin-left: 8px;" disabled />
+                <!-- 暂未实现,禁用 -->
+              </div>
+              <div class="web-crawl-advanced-tip">{{lang.webCrawlDialog.attachmentTip}}</div>
+            </div>
+          </div>
+        </el-collapse-item>
+      </el-collapse>
+    </div>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="$emit('update:visible', false)">{{lang.cancel}}</el-button>
+      <el-button type="primary" @click="handleConfirm">{{lang.webCrawlDialog.run}}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: 'WebCrawlDialog',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    inputUrl: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      localVisible: this.visible,
+      tab: 'single',
+      advancedOpen: [],
+      schedule: 'never',
+      getAttachment: false
+    }
+  },
+  watch: {
+    visible(val) {
+      this.localVisible = val;
+    },
+    localVisible(val) {
+      this.$emit('update:visible', val);
+    }
+  },
+  created() {
+    // console.log('[WebCrawlDialog created] props.visible:', this.visible);
+  },
+  updated() {
+    // console.log('[WebCrawlDialog updated] props.visible:', this.visible);
+  },
+  methods: {
+    handleConfirm() {
+      this.$emit('confirm', {
+        url: this.inputUrl,
+        tab: this.tab,
+        schedule: this.schedule,
+        getAttachment: this.getAttachment
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+.web-crawl-dialog >>> .el-dialog__body {
+  padding-top: 0;
+}
+.web-crawl-tabs {
+  margin-bottom: 10px;
+}
+.web-crawl-form {
+  margin: 0 10px 0 10px;
+}
+.web-crawl-input {
+  width: 100%;
+  margin-bottom: 8px;
+}
+.web-crawl-tip {
+  color: #888;
+  font-size: 13px;
+  margin-bottom: 10px;
+}
+.web-crawl-advanced {
+  margin-top: 10px;
+}
+.web-crawl-advanced-row {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+.web-crawl-advanced-row-flex {
+  flex-direction: row;
+  justify-content: flex-start;
+  gap: 40px;
+}
+.web-crawl-advanced-block {
+  display: flex;
+  flex-direction: column;
+  min-width: 260px;
+}
+.web-crawl-advanced-item {
+  display: flex;
+  align-items: center;
+  margin-bottom: 0;
+}
+.web-crawl-advanced-row span {
+  min-width: 110px;
+  color: #333;
+}
+.web-crawl-advanced-tip {
+  color: #888;
+  font-size: 13px;
+  padding-left: 0;
+  margin-bottom: 8px;
+  margin-top: 4px;
+}
+.dialog-footer {
+  text-align: right;
+}
+</style> 

+ 65 - 9
src/components/pages/knowledge/components/checkDialog.vue

@@ -11,7 +11,7 @@
       <div class="contentBox" v-loading="isLoading">
         <div class="content rowCloumn">
           <div class="title">{{lang.Summary}}</div>
-          <div class="text">{{ data.summary }}</div>
+          <div class="text">{{ data.summary || data.cdetail }}</div>
         </div>
         <div class="content">
           <div class="title">{{lang.FileName}}</div>
@@ -50,7 +50,7 @@
         </div>
         <div class="noneData" v-if="!chunksArray.length">{{lang.sliceDataNull}}</div>
         <el-pagination v-if="chunksArray.length > 0" style="margin-top: 10px" background layout="prev, pager, next"
-          :page-size="limit" :total="total" @current-change="handleCurrentChange">
+          :page-size="limit" :total="total" :current-page="page" @current-change="handleCurrentChange">
         </el-pagination>
       </div>
       <div class="chunkBox" v-show="type == 3" v-loading="entitiesLoading">
@@ -62,7 +62,7 @@
         </div>
         <div class="noneData" v-if="!entitiesArray.length">{{lang.entDataNull}}</div>
         <el-pagination v-if="entitiesArray.length > 0" style="margin-top: 10px" background layout="prev, pager, next"
-          :page-size="limit2" :total="total2" @current-change="handleCurrentChange2">
+          :page-size="limit2" :total="total2" :current-page="page2" @current-change="handleCurrentChange2">
         </el-pagination>
       </div>
       <div class="chunkBox" v-show="type == 4" v-loading="relationshipsLoading">
@@ -75,12 +75,12 @@
         </div>
         <div class="noneData" v-if="!relationshipsArray.length">{{lang.reaDataNUll}}</div>
         <el-pagination v-if="relationshipsArray.length > 0" style="margin-top: 10px" background
-          layout="prev, pager, next" :page-size="limit3" :total="total3" @current-change="handleCurrentChange3">
+          layout="prev, pager, next" :page-size="limit3" :total="total3" :current-page="page3" @current-change="handleCurrentChange3">
         </el-pagination>
       </div>
-      <div class="tuBox" v-show="type == 2" v-loading="graphLoading">
+      <div class="tuBox" v-if="type == 2" v-loading="graphLoading">
         <div v-if="!Object.keys(graphJson).length" class="noneData">{{lang.graphDataNull}}</div>
-        <graph v-if="Object.keys(graphJson).length" :Json="graphJson"></graph>
+        <graph ref="graphComponent" v-if="Object.keys(graphJson).length" :Json="graphJson"></graph>
       </div>
     </div>
     <span slot="footer">
@@ -122,6 +122,16 @@ export default {
       full: false,
     };
   },
+  watch: {
+    full() {
+      // The DOM update and CSS transition need time.
+      setTimeout(() => {
+        if (this.$refs.graphComponent) {
+          this.$refs.graphComponent.handleResize();
+        }
+      }, 300);
+    }
+  },
   computed: {
     getState() {
       return function (item) {
@@ -173,6 +183,9 @@ export default {
       this.page = 1;
       this.page2 = 1;
       this.page3 = 1;
+      this.chunksArray = []
+      this.entitiesArray = []
+      this.relationshipsArray = []
       this.getFileDetail();
       this.getChunks();
       this.setGrapJson();
@@ -197,7 +210,6 @@ export default {
         });
     },
     getChunks() {
-      this.chunksArray = [];
       this.chunksLoading = true;
       let params = {
         documentId: this.did,
@@ -214,6 +226,7 @@ export default {
         })
         .catch(err => {
           this.chunksLoading = false;
+          this.chunksArray = [];
           console.error(err);
         });
     },
@@ -239,6 +252,7 @@ export default {
         })
         .catch(err => {
           this.entitiesLoading = false;
+          this.entitiesArray = [];
           console.error(err);
         });
     },
@@ -264,6 +278,7 @@ export default {
         })
         .catch(err => {
           this.relationshipsLoading = false;
+          this.relationshipsArray = []
           console.error(err);
         });
     },
@@ -346,6 +361,47 @@ export default {
         lines: lines
       };
     },
+    transformData2(data) {
+        const nodes2 = [];
+        const lines2 = [];
+        // 构建节点
+        const nodeMap2 = new Map();
+
+        data.results.forEach(item => {
+            const subject = item.subject;
+            const object = item.object;
+            const subjectId = item.subjectId;
+            const objectId = item.objectId;
+
+            // 构建节点
+            const addNode = (id, label) => {
+                if (!nodeMap2.has(id)) {
+                    nodeMap2.set(id, { id, label });
+                    nodes2.push(nodeMap2.get(id));
+                }
+            };
+
+            addNode(subjectId, subject);
+            addNode(objectId, object);
+
+            // 添加关系线
+            lines2.push({
+                source: item.subjectId,
+                target: item.objectId,
+                predicate: item.predicate
+            });
+        });
+
+        console.log({
+            nodes: nodes2,
+            edges: lines2
+        });
+
+        return {
+            nodes: nodes2,
+            edges: lines2
+        };
+    },
     setGrapJson() {
       this.graphLoading = true;
       let params = {
@@ -359,8 +415,8 @@ export default {
           this.graphLoading = false;
           console.log(res.data);
           if (res.data.result.results.length) {
-            console.log(this.transformData(res.data.result));
-            this.graphJson = this.transformData(res.data.result)
+            console.log(this.transformData2(res.data.result));
+            this.graphJson = this.transformData2(res.data.result)
           }else {
             this.graphJson = {}
           }

+ 80 - 0
src/components/pages/knowledge/components/graph copy.vue

@@ -0,0 +1,80 @@
+<template>
+    <div style="width: 100%; max-height: 600px; overflow: auto;padding-bottom: 10px;" class="content">
+        <div style="height:600px;position: relative;">
+            <RelationGraph ref="seeksRelationGraph" :options="graphOptions" :on-node-click="onNodeClick"
+                :on-line-click="onLineClick" />
+        </div>
+    </div>
+</template>
+
+<script>
+import RelationGraph from 'relation-graph'
+
+export default {
+    props: ['Json'],
+    components: {
+        RelationGraph,
+    },
+    data() {
+        return {
+            graphOptions: {
+                allowSwitchLineShape: true,
+                zoomToFitWhenRefresh: true,
+                moveToCenterWhenRefresh: true,
+                // allowSwitchJunctionPoint: true,
+                defaultJunctionPoint: 'border',
+                // backgroundImage: "https://ssl.relation-graph.com/images/relatioon-graph-canvas-bg.png",
+                backgroundImageNoRepeat: true,
+                useAnimationWhenRefresh: true,
+                defaultNodeBorderWidth: 5,
+                defaultNodeColor: "#0C7FF6",
+                defaultNodeBorderColor: "#0C7FF6",
+                defaultLineShape: 5,
+                hideNodeContentByZoom: true,
+                layouts: [
+                    {
+                        label: "中心",
+                        layoutName: "center",
+                        centerOffset_x: 0,
+                        centerOffset_y: 0,
+                        distanceCoefficient: 1
+                    }
+                ]
+            }
+        }
+    },
+    mounted() {
+        this.showSeeksGraph()
+    },
+    watch: {
+        Json: {
+            immediate: true,
+            deep: true,
+            handler(newValue, oldValue) {
+                this.Json = newValue
+                this.showSeeksGraph()
+            }
+        }
+    },
+    methods: {
+        showSeeksGraph() {
+            const __graph_json_data = this.Json
+            // 以上数据中的node和link可以参考"Node节点"和"Link关系"中的参数进行配置 
+            this.$refs.seeksRelationGraph.setJsonData(__graph_json_data, (seeksRGGraph) => {
+                // Called when the relation-graph is completed 
+            })
+        },
+        onNodeClick(nodeObject, $event) {
+            console.log('onNodeClick:', nodeObject)
+        },
+        onLineClick(lineObject, $event) {
+            console.log('onLineClick:', lineObject)
+        }
+    }
+}
+
+</script>
+
+<style>
+
+</style>

+ 158 - 49
src/components/pages/knowledge/components/graph.vue

@@ -1,80 +1,189 @@
 <template>
     <div style="width: 100%; max-height: 600px; overflow: auto;padding-bottom: 10px;" class="content">
-        <div style="height:600px;position: relative;">
-            <RelationGraph ref="seeksRelationGraph" :options="graphOptions" :on-node-click="onNodeClick"
-                :on-line-click="onLineClick" />
-        </div>
+        <div style="height:600px;position: relative;" ref="container"></div>
     </div>
 </template>
 
 <script>
-import RelationGraph from 'relation-graph'
+import G6 from '@antv/g6';
 
 export default {
     props: ['Json'],
-    components: {
-        RelationGraph,
-    },
     data() {
         return {
-            graphOptions: {
-                allowSwitchLineShape: true,
-                zoomToFitWhenRefresh: true,
-                moveToCenterWhenRefresh: true,
-                // allowSwitchJunctionPoint: true,
-                defaultJunctionPoint: 'border',
-                // backgroundImage: "https://ssl.relation-graph.com/images/relatioon-graph-canvas-bg.png",
-                backgroundImageNoRepeat: true,
-                useAnimationWhenRefresh: true,
-                defaultNodeBorderWidth: 5,
-                defaultNodeColor: "#0C7FF6",
-                defaultNodeBorderColor: "#0C7FF6",
-                defaultLineShape: 5,
-                hideNodeContentByZoom: true,
-                layouts: [
-                    {
-                        label: "中心",
-                        layoutName: "center",
-                        centerOffset_x: 0,
-                        centerOffset_y: 0,
-                        distanceCoefficient: 1
-                    }
-                ]
-            }
+            graph: null,
         }
     },
     mounted() {
-        this.showSeeksGraph()
+        this.$nextTick(() => {
+            if (this.Json && this.Json.nodes) {
+                this.showSeeksGraph(this.Json);
+            }
+        });
+        window.addEventListener('resize', this.handleResize);
+    },
+    beforeDestroy() {
+        window.removeEventListener('resize', this.handleResize);
+        if (this.graph) {
+            this.graph.destroy();
+        }
     },
     watch: {
         Json: {
             immediate: true,
             deep: true,
             handler(newValue, oldValue) {
-                this.Json = newValue
-                this.showSeeksGraph()
+                this.$nextTick(() => {
+                    if (newValue && newValue.nodes && this.$refs.container) {
+                        this.showSeeksGraph(newValue);
+                    }
+                });
             }
         }
     },
     methods: {
-        showSeeksGraph() {
-            const __graph_json_data = this.Json
-            // 以上数据中的node和link可以参考"Node节点"和"Link关系"中的参数进行配置 
-            this.$refs.seeksRelationGraph.setJsonData(__graph_json_data, (seeksRGGraph) => {
-                // Called when the relation-graph is completed 
-            })
-        },
-        onNodeClick(nodeObject, $event) {
-            console.log('onNodeClick:', nodeObject)
+        showSeeksGraph(data) {
+            if (this.graph) {
+                this.graph.destroy();
+            }
+            console.log(data);
+
+            const container = this.$refs.container;
+            if (!container) return;
+            
+            this.graph = new G6.Graph({
+                container: container,
+                width: container.scrollWidth,
+                height: container.scrollHeight || 600,
+                fitView: true,
+                modes: {
+                    default: ['drag-canvas', 'zoom-canvas', 'drag-node'],
+                },
+                layout: {
+                    type: 'force',
+                    preventOverlap: true,
+                    nodeSpacing: 30,
+                    linkDistance: 200,
+                    nodeStrength: -60,
+                    edgeStrength: 0.1,
+                },
+                defaultNode: {
+                    size: 40,
+                    style: {
+                        fill: 'rgba(24, 144, 255, 0.2)', // 浅蓝半透明
+                        stroke: '#1890ff', // 实色边框
+                        lineWidth: 2 // 边框宽度
+                    },
+                    labelCfg: {
+                        position: 'bottom', // 标签显示在节点下方
+                        style: {
+                            fill: '#000',
+                            fontSize: 12
+                        }
+                    }
+                },
+                defaultEdge: {
+                    type: 'cubic', // 贝塞尔曲线
+                    style: {
+                        endArrow: true,
+                    },
+                     labelCfg: {
+                        autoRotate: true,
+                    }
+                }
+            });
+
+
+            const nodeIds = new Set(data.nodes.map(node => node.id));
+
+            // 统计每个节点的连线数量
+            const linkCount = {};
+            data.edges.forEach(edge => {
+                if (edge.source) linkCount[edge.source] = (linkCount[edge.source] || 0) + 1;
+                if (edge.target) linkCount[edge.target] = (linkCount[edge.target] || 0) + 1;
+            });
+
+            // 六档蓝色系(更有区分度)
+            const strokeColors = [
+                '#b3e5fc', // 0 浅蓝青
+                '#4fc3f7', // 1 天蓝
+                '#0288d1', // 2 深天蓝
+                '#1976d2', // 3 标准蓝
+                '#1565c0', // 4 深蓝
+                '#0d47a1', // 5 靛蓝
+                '#002171'  // 6+ 极深蓝
+            ];
+            const fillColors = [
+                'rgba(179,229,252,0.2)',
+                'rgba(79,195,247,0.2)',
+                'rgba(2,136,209,0.2)',
+                'rgba(25,118,210,0.2)',
+                'rgba(21,101,192,0.2)',
+                'rgba(13,71,161,0.2)',
+                'rgba(0,33,113,0.2)'
+            ];
+
+            const graphData = {
+                nodes: data.nodes.map(node => {
+                    const count = linkCount[node.id] || 0;
+                    const cappedCount = Math.min(count, 6);
+                    const size = 20 + count * 10; // 不封顶
+                    const stroke = strokeColors[cappedCount];
+                    const fill = fillColors[cappedCount];
+                    // 保留 comboId 字段
+                    const nodeData = {
+                        id: node.id,
+                        label: node.label,
+                        size,
+                        style: {
+                            fill,
+                            stroke,
+                            lineWidth: 2
+                        }
+                    };
+                    if (node.comboId) nodeData.comboId = node.comboId;
+                    return nodeData;
+                }),
+                edges: data.edges
+                    .filter(edge => {
+                        const sourceExists = nodeIds.has(edge.source);
+                        const targetExists = nodeIds.has(edge.target);
+                        if (!sourceExists || !targetExists) {
+                            console.warn('Filtering out edge with non-existent node ID:', edge);
+                        }
+                        return sourceExists && targetExists;
+                    })
+                    .map(edge => ({
+                        source: edge.source,
+                        target: edge.target,
+                        label: edge.predicate,
+                })),
+                combos: Array.isArray(data.combos) ? data.combos : undefined
+            };
+            console.log('graphData',graphData);
+            
+            this.graph.data(graphData);
+            this.graph.render();
+
+            this.graph.on('node:mouseenter', (e) => {
+                this.graph.setItemState(e.item, 'hover', true);
+            });
+
+            this.graph.on('node:mouseleave', (e) => {
+                this.graph.setItemState(e.item, 'hover', false);
+            });
         },
-        onLineClick(lineObject, $event) {
-            console.log('onLineClick:', lineObject)
+        handleResize() {
+            if (!this.graph || this.graph.get('destroyed')) return;
+            if (!this.$refs.container) return;
+            
+            const container = this.$refs.container;
+            this.graph.changeSize(container.offsetWidth, container.scrollHeight || 600);
+            this.graph.fitView();
         }
     }
 }
 
 </script>
 
-<style>
-
-</style>
+<style></style>

+ 1 - 0
src/components/pages/knowledge/components/relateFiles.vue

@@ -248,6 +248,7 @@ export default {
       this.getData();
     },
     handleSizeChange(val){
+      this.page = 1;
       this.limit = val
       this.getData()
     },

+ 72 - 8
src/components/pages/knowledge/fileBox.vue

@@ -54,7 +54,7 @@
           />
         </div>
         <div class="f_box_top_right">
-          <el-button type="primary" size="small" @click="serchFile"
+          <el-button type="primary" size="small" @click="refresh"
           style="background-color: rgb(51, 112, 255);"
             >
           <img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
@@ -170,7 +170,7 @@
                         @mouseleave="isHover = false"
                         v-if="scope.row.userid == userid">
                         <img
-                        style="width: 14px;"
+                        style="width: 14px; margin-right:8px;"
                         :src="isHover ? tqList2 : tqList"
                          alt="">
                         <span :class="isHover ? 'lookHp2' : 'lookHp1'">{{lang.extract}}</span>
@@ -238,6 +238,7 @@
         :total="total"
         @current-change="handleCurrentChange"
         :page-sizes="[10, 20, 50, 100]"
+        :current-page="page"
       >
       <el-select v-model="limit" @change="handleSizeChange" class="file_mySelect">
           <el-option
@@ -264,6 +265,21 @@
       :url="wurl"
     ></wOffice>
     <checkDialog ref="checkDialog"></checkDialog>
+    <el-dialog
+      :title="lang.prompt2"
+      :visible.sync="promptDialog"
+      class="fileDialogBlock"
+      :close-on-click-modal="false"
+      :before-close="handleClose" 
+    >
+      <span class="promptBox" v-loading="promptLoading">
+        <!-- <el-input v-model="prompt" :placeholder="lang.promptPlaceholder" class="promptInput"></el-input> -->
+        <el-input type="textarea" v-model="prompt" :placeholder="lang.promptPlaceholder" rows="5"></el-input>
+        <div class="btnbox">
+          <el-button type="primary" @click="handleExtract">{{ lang.confirm }}</el-button>
+        </div>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -373,7 +389,11 @@ export default {
       user: "",
       userArray: [],
       pcount: 0,
-      ptotal: 0
+      ptotal: 0,
+      row: {},
+      promptDialog: false,
+      promptLoading: false,
+      prompt: "",
     };
   },
   computed: {
@@ -424,11 +444,15 @@ export default {
     },
   },
   methods: {
+    handleClose(done){
+      done();
+    },
     handleCurrentChange(val) {
       this.page = val;
       this.getData();
     },
     handleSizeChange(val){
+      this.page = 1;
       this.limit = val
       this.getData()
     },
@@ -485,6 +509,9 @@ export default {
         this.serchFile();
       }, 300);
     },
+    refresh(){
+      this.getData();
+    },
     serchFile() {
       this.page = 1;
       this.getData();
@@ -508,6 +535,7 @@ export default {
         "ppt",
         "pptx",
         "docx",
+        "doc",
         "jpg",
         "jpeg",
         "png",
@@ -696,16 +724,21 @@ export default {
 
     extractFile(row) {
       if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
-
+      this.row = row
+      this.promptDialog = true;
+    },
+    handleExtract() {
+      this.promptLoading = true
       let params = {
-        documentid: row.documentid
+        documentid: this.row.documentid,
+        prompt: this.prompt
       };
       // 获取切片
       try {
         const res = this.ajax.post(this.$store.state.fileApi + "extractFile2", [
           params
         ]).then(res => {
-          console.log(res, row);
+          console.log(res, this.row);
           const message = res.data.result && res.data.result.message;
           // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
           // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
@@ -719,12 +752,15 @@ export default {
           //   }
           // });
           setTimeout(() => {
+            this.promptLoading = false
+            this.promptDialog = false
             this.getData();
           }, 1000)
         }).catch(err => {
+          this.promptLoading = false
           this.$message.error(this.lang.extrFailed)
           this.fileArray.forEach(e => {
-            if (e.documentid === row.documentid) {
+            if (e.documentid === this.row.documentid) {
               e.extractionStatus = 'failed';
             }
           });
@@ -734,8 +770,10 @@ export default {
         this.$message.success(this.lang.extractingFile);
         this.getData();
       } catch (err) {
+        this.promptLoading = false
+        
         console.error(err);
-      }
+      } 
     },
     isSelectable(row) {
       return row.userid == this.userid;
@@ -1353,5 +1391,31 @@ export default {
   padding: 8px 6px;
   border-radius: 8px;
 }
+
+.fileDialogBlock >>> .el-dialog {
+  width: 648px;
+  min-height: 180px;
+  border-radius: 12px;
+  box-sizing: border-box;
+}
+
+.fileDialogBlock >>> .el-dialog__title {
+  font-weight: 600 !important;
+  font-size: 18px !important;
+}
+
+.fileDialogBlock >>> .el-upload-list__item .el-icon-close {
+  top: 13px;
+}
+
+.promptBox{
+  display: block;
+}
+
+.btnbox{
+  margin-top: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
 </style>
 

+ 6 - 2
src/components/pages/knowledge/folder.vue

@@ -672,7 +672,7 @@ export default {
       folderDescription: "",
       page: 1,
       total: 0,
-      limit: 10,
+      limit: 20,
       tagLoading1: false,
       tagLoading2: false,
       tagLoading3: false,
@@ -779,6 +779,7 @@ export default {
       this.getData();
     },
     handleSizeChange(val) {
+      this.page = 1;
       this.limit = val;
       this.getData();
     },
@@ -795,10 +796,13 @@ export default {
         page: this.page,
         num: this.limit,
       };
+      if(!type[0] == "0"){
+        params.juri2 = this.lang.lang == 'hk' ? 2 : this.lang.lang == 'en' ? 3 : 1;
+      }
       this.ajax
         .post(
           this.$store.state.fileApi +
-            (type[0] == "0" ? "getFolderPage3" : "getFolderPageOpen"),
+            (type[0] == "0" ? "getFolderPage3" : "getFolderPageOpen2"),
           [params]
         )
         .then((res) => {

+ 137 - 7
src/components/pages/knowledge/folderDetail.vue

@@ -153,6 +153,7 @@
 
           <div class="canEditFileName">{{lang.subjectTag}}</div>
           <selectTag
+            v-if="canEdit"
             v-loading="tagLoading1"
             v-model="fileDetailCheck1"
             :options="tagData1"
@@ -163,6 +164,7 @@
 
           <div class="canEditFileName">{{lang.gradeTag}}</div>
           <selectTag
+            v-if="canEdit"
             v-loading="tagLoading2"
             v-model="fileDetailCheck2"
             :options="tagData2"
@@ -174,6 +176,7 @@
 
           <div class="canEditFileName">{{lang.customTag}}:</div>
           <selectTag2
+            v-if="canEdit"
             v-loading="tagLoading3"
             v-model="fileDetailCheck3"
             :options="tagData3"
@@ -197,6 +200,30 @@
                 </el-radio-group>
               </div>
           </div>
+          <div class="canEditFileName" style="margin-bottom: 9px;" v-if="fileDetail.juri == 2">{{ lang.labPermissions }}</div>
+
+          <div class="tag"  v-if="fileDetail.juri == 2">
+            <div class="info_span" v-for="item in teaType" :key="item.id">
+                <span>
+                  {{ item.name + ":" }}
+                </span>
+                <el-select v-model="item.value" multiple :placeholder="item.name" @change="Ochange">
+                  <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="canEditFileName" style="margin-bottom: 9px;" v-if="fileDetail.juri == 3">{{ lang.PublicPermissions }}</div>
+
+          <div class="tag"  v-if="fileDetail.juri == 3">
+            <div class="tag_check">
+                <el-radio-group  v-model="fileDetail.juri2" >
+                  <el-radio label="1">cn</el-radio>
+                  <el-radio label="2">hk</el-radio>
+                  <el-radio label="3">com</el-radio>
+                </el-radio-group>
+              </div>
+          </div>
           <!-- disabled @change="updateFolder()" -->
 
         <span slot="footer" class="dialog-footer">
@@ -255,15 +282,18 @@ export default {
       check2: [],
       check3: [],
       fold:false,
+      oid: this.$route.query.oid,
+      teaType: [],
+      options: []
     };
   },
   watch: {
     pid(newValue, oldValue) {
       this.data = {};
-      this.getData();
       this.getTag(1); // 获取标签
       this.getTag(2); // 获取标签
       this.getTag(3); // 获取标签
+      this.getTypeInfo();
     }
   },
   computed: {
@@ -336,18 +366,29 @@ export default {
     this.getTag(1); // 获取标签
     this.getTag(2); // 获取标签
     this.getTag(3); // 获取标签
-    this.getData();
+    this.getTypeInfo();
   },
   methods: {
     openCanEdit(){
       this.canEdit = true;
 
       this.fileDetail = JSON.parse(JSON.stringify(this.data))
-      this.fileDetailCheck1 = JSON.parse(JSON.stringify(this.check1))
-      this.fileDetailCheck2 = JSON.parse(JSON.stringify(this.check2))
-      this.fileDetailCheck3 = JSON.parse(JSON.stringify(this.check3))
+      this.fileDetailCheck1 = this.check1 ? JSON.parse(JSON.stringify(this.check1)) : []
+      this.fileDetailCheck2 = this.check2 ? JSON.parse(JSON.stringify(this.check2)) : []
+      this.fileDetailCheck3 = this.check3 ? JSON.parse(JSON.stringify(this.check3)) : []
+
 
 
+    },
+    generateResultInfo() {
+      // 从 teaType 中提取所有的值
+      const selectedValues = this.teaType.flatMap(item => item.value);
+
+      console.log(selectedValues);
+
+      // 将合并后的数组转换为逗号分隔的字符串
+      return selectedValues.join(',');
+
 
     },
     modifyDetail(){
@@ -365,13 +406,15 @@ export default {
         ct: this.fileDetailCheck2.join(","),
         t: this.fileDetailCheck3.join(","),
         j: this.fileDetail.juri,
-        folderid: this.folderid
+        j2: this.fileDetail.juri == 2 ? this.generateResultInfo() : "",
+        folderid: this.folderid,
+        j2: this.fileDetail.juri2,
       };
       // t: this.fileDetailCheck3.join(","),
 // return console.log('params2',params);
 
       this.ajax
-        .post(this.$store.state.fileApi + "updateFolder", [params])
+        .post(this.$store.state.fileApi + "updateFolder3", [params])
         .then(res => {
           this.$message.success(this.lang.updateSuccess);
           this.canEdit=false
@@ -418,12 +461,47 @@ export default {
             ? res.data[0][0].class_tag.split(",")
             : [];
           this.check3 = res.data[0][0].tag ? res.data[0][0].tag.split(",") : [];
+
+
+          let teacherOffice = []
+          let array = []
+          for (var i = 0; i < this.options.length; i++) {
+            array.push(this.options[i].id)
+          }
+          teacherOffice = this.arrayToArray(this.data.teacherJuri ? this.data.teacherJuri.split(',') : [], array)
+          console.log(this.data.teacherJuri);
+          let count = 0
+          this.teaType.forEach(e =>{
+            let array2 = []
+            for (var i = 0; i < e.child.length; i++) {
+              array2.push(e.child[i].id)
+            }
+            e.value = this.arrayToArray(this.data.teacherJuri ? this.data.teacherJuri.split(',') : [], array2)
+            if(e.value.length){
+              count++
+            }
+          })
         })
         .catch(err => {
           this.isLoading = false;
           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;
+    },
     getTag(type) {
       const tagLoadings = [
         this.tagLoading1,
@@ -625,6 +703,41 @@ export default {
             });
         })
         .catch(() => {});
+    },
+    //获取分类类名
+    getTypeInfo() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectPerInfoAllTea", params)
+        .then(res => {
+					
+					console.log(res.data)
+          this.teaType = res.data[0];
+          let typeInfo = res.data[1];
+
+          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");
+          this.options = res.data[2];
+          this.getData();
+        })
+        .catch(err => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    Ochange() {
+      this.$forceUpdate()
     }
   }
 };
@@ -917,4 +1030,21 @@ export default {
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+
+.info_span {
+  display: flex;
+  margin-top: 10px;
+  width: 350px;
+}
+
+.info_span>span:nth-child(1) {
+  /* width: 100px;
+  min-width: 100px; */
+  /* text-align: right; */
+  line-height: 40px;
+}
+
+.info_span>div {
+    width: 250px;
+}
 </style>

+ 281 - 72
src/components/pages/knowledge/folderFileBox.vue

@@ -32,7 +32,12 @@
           />
           <div class="serch"></div>
         </div>
-
+        <!-- <el-button type="primary" size="small" @click="resetGraphs">
+          重置文件夹
+        </el-button>
+        <el-button type="primary" size="small" @click="getGraph">
+          获取文件夹图谱
+        </el-button> -->
         <el-button type="primary" size="small" @click="serchFile">
           <img
             style="
@@ -40,39 +45,27 @@
               transform: scale(1.1);
               padding-bottom: 2px;
               box-sizing: border-box;
-            "
-            src="../../../assets/shuax.svg"
-            alt=""
-          />
-          {{ lang.flushed }}</el-button
-        >
-        <el-button
-          v-if="userid == data.userid"
-          type="primary"
-          icon="el-icon-plus"
-          size="small"
-          @click="addImg($event)"
-          >{{ lang.uploadFile }}
-          <input
-            type="file"
-            accept="*"
-            style="display: none"
-            multiple="multiple"
-            @change="beforeUpload($event)"
-        /></el-button>
-        <el-button
-          type="primary"
-          size="small"
-          @click="openG"
-          v-if="userid == data.userid && data.isMo == '2'"
-        >
-          <img
-            style="vertical-align: middle"
-            src="../../../assets/ETL.svg"
-            alt=""
-          />
-          {{ lang.associatedFiles }}</el-button
-        >
+            " src="../../../assets/shuax.svg" alt=""/>
+          {{ lang.flushed }}
+        </el-button>
+        <el-button v-if="userid == data.userid" type="primary" icon="el-icon-plus" size="small"
+                   @click="addImg($event)">{{ lang.uploadFile }}
+          <input type="file" accept="*" style="display: none" multiple="multiple"
+                 @change="beforeUpload($event)"/></el-button>
+        <el-button v-if="userid == data.userid" type="primary" icon="el-icon-plus" size="small"
+                   @click="importFromWebpage($event)">{{ lang.importFromWebpage }}
+          <!--          <input-->
+          <!--            type="file"-->
+          <!--            accept="*"-->
+          <!--            style="display: none"-->
+          <!--            multiple="multiple"-->
+          <!--            @change="importFromWebpage($event)"-->
+          <!--            />-->
+        </el-button>
+        <el-button type="primary" size="small" @click="openG" v-if="userid == data.userid && data.isMo == '2'">
+          <img style="vertical-align: middle" src="../../../assets/ETL.svg" alt=""/>
+          {{ lang.associatedFiles }}
+        </el-button>
 
         <el-button
           type="primary"
@@ -406,6 +399,22 @@
     ></wOffice>
     <relateFiles ref="relateFiles"></relateFiles>
     <checkDialog ref="checkDialog"></checkDialog>
+    <WebCrawlDialog :visible.sync="webUrlDialogVisible" :input-url.sync="webInputUrl" @confirm="handleWebUrlConfirm"/>
+    <el-dialog
+      :title="lang.prompt2"
+      :visible.sync="promptDialog"
+      class="fileDialogBlock"
+      :close-on-click-modal="false"
+      :before-close="handleClose" 
+    >
+      <span class="promptBox" v-loading="promptLoading">
+        <!-- <el-input v-model="prompt" :placeholder="lang.promptPlaceholder" class="promptInput"></el-input> -->
+        <el-input type="textarea" v-model="prompt" :placeholder="lang.promptPlaceholder" rows="5"></el-input>
+        <div class="btnbox">
+          <el-button type="primary" @click="handleExtract">{{ lang.confirm }}</el-button>
+        </div>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -434,6 +443,8 @@ import { v4 as uuidv4 } from "uuid";
 import relateFiles from "./components/relateFiles";
 import checkDialog from "./components/checkDialog";
 import testBox from "./components/testBox";
+import WebCrawlDialog from "./WebCrawlDialog.vue";
+
 export default {
   components: {
     wVideo,
@@ -442,6 +453,7 @@ export default {
     relateFiles,
     checkDialog,
     testBox,
+    WebCrawlDialog,
   },
   props: {
     userid: {
@@ -519,6 +531,12 @@ export default {
       pcount: 0,
       ptotal: 0,
       fileType: 1,
+      webUrlDialogVisible: false,
+      webInputUrl: '',
+      row: {},
+      promptDialog: false,
+      promptLoading: false,
+      prompt: "",
     };
   },
   computed: {
@@ -562,6 +580,34 @@ export default {
     },
   },
   methods: {
+    getGraph(){
+      let params = {
+        collectionId: this.folderid
+      };
+
+      this.ajax
+        .post(this.$store.state.fileApi + "getRelationshipsGraphs", [params])
+        .then(res => {
+          console.log('getRelationshipsGraphs',res);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    resetGraphs(){
+      let params = {
+        collectionId: this.folderid
+      };
+
+      this.ajax
+        .post(this.$store.state.fileApi + "resetGraphs", [params])
+        .then(res => {
+          console.log('resetGraphs',res);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
     goBackPage() {
       this.$emit("goCheckType", this.pid.split("/")[0]);
     },
@@ -570,6 +616,7 @@ export default {
       this.getData();
     },
     handleSizeChange(val) {
+      this.page = 1;
       this.limit = val;
       this.getData();
     },
@@ -638,6 +685,7 @@ export default {
         "ppt",
         "pptx",
         "docx",
+        "doc",
         "jpg",
         "jpeg",
         "png",
@@ -698,6 +746,103 @@ export default {
 
       await uploadFiles(event.target.files);
     },
+    async importFromWebpage(event) {
+      console.log('importFromWebpage');
+      this.webUrlDialogVisible = true;
+    },
+    handleWebUrlConfirm(dataFromForm) {
+      if (!dataFromForm) return;
+      this.proVisible = true;
+      let uuid = uuidv4();
+      let formData = new FormData();
+      let string = [this.folderid, this.moFolderid].filter((id) => id);
+      formData.append("url", dataFromForm.url)
+      formData.append("collection_ids", JSON.stringify(string));
+      formData.append("id", uuid);
+      formData.append(
+        "metadata",
+        JSON.stringify({url: dataFromForm.url, collection_ids: string})
+      );
+      formData.append("ingestion_mode", "fast");
+      formData.append("run_with_orchestration", "false");
+      debugger
+      const html2mdApi = process.env.VUE_APP_HTML2MD_API || 'http://localhost:7004';
+      const url = html2mdApi + '/file/knowledge-base/html-to-markdown';
+      const headers = {'Content-Type': 'multipart/form-data'};
+      this.ajax.post(url, formData, {headers})
+        .then(async (response) => {
+          if (response && response.data && response.data.results) {
+            this.$message.success('文件上传成功');
+            const fileName = response.data.title;
+            const documentId = response.data.results && response.data.results.document_id;
+            const status = response && response.status === 200 ? "success" : "failed";
+            const msg = response && response.status === 200 ? "切片成功" : "切片失败";
+            this.$message({ message: msg, type: status == "success" ? status : "error" });
+            this.getData();
+            setTimeout(() => {
+              this.fileArray.forEach((e) => {
+                if (e.documentid === uuid) {
+                  e.ingestionStatus = status;
+                }
+              });
+            }, 1000);
+            if (documentId) {
+              await this.bindFileAndFolder(
+                fileName,
+                documentId,
+                this.userid,
+                this.folderid,
+                this.moFolderid
+              );
+            }
+            // 受控组件写法,直接清空 input
+            this.webInputUrl = '';
+            // 关闭弹窗
+            this.webUrlDialogVisible = false;
+          } else {
+            this.$message.error(response && response.data && response.data.msg ? response.data.msg : '文件上传失败');
+          }
+          this.proVisible = false;
+        })
+        .catch((error) => {
+          this.$message.error('服务器繁忙');
+          if (this.fileNames) this.fileNames.pop && this.fileNames.pop();
+          if (this.fileUrls) this.fileUrls.pop && this.fileUrls.pop();
+          console.log(error);
+          if (this.loadingInstance) {
+            this.$nextTick(() => {
+              this.loadingInstance.close();
+            });
+          }
+          this.proVisible = false;
+        });
+    },
+    async bindFileAndFolder(name, docid, uid, folder_id, mofid = '') {
+      try {
+        let params = {
+          n: name,
+          did: docid,
+          uid: this.userid,
+          fid: this.folderid,
+          mofid: this.moFolderid != this.folderid ? this.moFolderid : "",
+        };
+        const res2 = await this.ajax.post(this.$store.state.api + "addFile", [
+          params,
+        ]);
+        // 如果成功,关闭对话框
+        if (res2 && res2.status === 200) {
+          // this.handleClose && this.handleClose();
+          this.webUrlDialogVisible = false;
+        }
+
+        console.log(res2);
+      } catch (err) {
+        console.error(err);
+        this.$message.error(this.lang.uploadFail);
+      }
+      this.proVisible = false;
+
+    },
     async uploadFile(formData, name, uuid) {
       try {
         this.ajax
@@ -895,53 +1040,106 @@ export default {
         });
     },
 
+    // extractFile(row) {
+    //   if (row.ingestionStatus != "success")
+    //     return this.$message.info(this.lang.fileUploadFail);
+
+    //   let params = {
+    //     documentid: row.documentid,
+    //   };
+    //   // 获取切片
+    //   try {
+    //     const res = this.ajax
+    //       .post(this.$store.state.fileApi + "extractFile2", [params])
+    //       .then((res) => {
+    //         console.log(res, row);
+    //         const message = res.data.result && res.data.result.message;
+    //         // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
+    //         // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
+    //         // this.$message({
+    //         //   message: msg,
+    //         //   type: status == 'success' ? status : 'error'
+    //         // })
+    //         // this.fileArray.forEach(e => {
+    //         //   if (e.documentid === row.documentid) {
+    //         //     e.extractionStatus = status;
+    //         //   }
+    //         // });
+    //         setTimeout(() => {
+    //           this.getData();
+    //         }, 1000);
+    //       })
+    //       .catch((err) => {
+    //         this.$message.error(this.lang.extrFailed);
+    //         this.fileArray.forEach((e) => {
+    //           if (e.documentid === row.documentid) {
+    //             e.extractionStatus = "failed";
+    //           }
+    //         });
+    //         console.error(err);
+    //       });
+
+    //     console.log(res.data);
+    //     this.$message.success(this.lang.extractingFile);
+    //   } catch (err) {
+    //     console.error(err);
+    //   }
+    // },
+    checkType(type) {
+      this.fileType = type;
+    },
     extractFile(row) {
-      if (row.ingestionStatus != "success")
-        return this.$message.info(this.lang.fileUploadFail);
-
+      if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
+      this.row = row
+      this.promptDialog = true;
+    },
+    handleExtract() {
+      this.promptLoading = true
       let params = {
-        documentid: row.documentid,
+        documentid: this.row.documentid,
+        prompt: this.prompt
       };
       // 获取切片
       try {
-        const res = this.ajax
-          .post(this.$store.state.fileApi + "extractFile2", [params])
-          .then((res) => {
-            console.log(res, row);
-            const message = res.data.result && res.data.result.message;
-            // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
-            // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
-            // this.$message({
-            //   message: msg,
-            //   type: status == 'success' ? status : 'error'
-            // })
-            // this.fileArray.forEach(e => {
-            //   if (e.documentid === row.documentid) {
-            //     e.extractionStatus = status;
-            //   }
-            // });
-            setTimeout(() => {
-              this.getData();
-            }, 1000);
-          })
-          .catch((err) => {
-            this.$message.error(this.lang.extrFailed);
-            this.fileArray.forEach((e) => {
-              if (e.documentid === row.documentid) {
-                e.extractionStatus = "failed";
-              }
-            });
-            console.error(err);
+        const res = this.ajax.post(this.$store.state.fileApi + "extractFile2", [
+          params
+        ]).then(res => {
+          console.log(res, this.row);
+          const message = res.data.result && res.data.result.message;
+          // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
+          // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
+          // this.$message({
+          //   message: msg,
+          //   type: status == 'success' ? status : 'error'
+          // })
+          // this.fileArray.forEach(e => {
+          //   if (e.documentid === row.documentid) {
+          //     e.extractionStatus = status;
+          //   }
+          // });
+          setTimeout(() => {
+            this.promptLoading = false
+            this.promptDialog = false
+            this.getData();
+          }, 1000)
+        }).catch(err => {
+          this.promptLoading = false
+          this.$message.error(this.lang.extrFailed)
+          this.fileArray.forEach(e => {
+            if (e.documentid === this.row.documentid) {
+              e.extractionStatus = 'failed';
+            }
           });
-
+          console.error(err);
+        });
         console.log(res.data);
         this.$message.success(this.lang.extractingFile);
+        this.getData();
       } catch (err) {
+        this.promptLoading = false
+        
         console.error(err);
-      }
-    },
-    checkType(type) {
-      this.fileType = type;
+      } 
     },
   },
   mounted() {
@@ -1062,6 +1260,7 @@ export default {
   padding: 0 24px;
   min-height: fit-content;
 }
+
 .f_box_top_right > .input {
   position: relative;
   /* height: 40px; */
@@ -1169,7 +1368,7 @@ export default {
   left: 0;
   width: 100%;
   height: 100%;
-  z-index: 90;
+  z-index: 4000;
   display: flex;
   align-items: center;
   justify-content: center;
@@ -1817,4 +2016,14 @@ export default {
   font-size: 13px;
   color: #606266;
 }
+
+.promptBox{
+  display: block;
+}
+
+.btnbox{
+  margin-top: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
 </style>

+ 24 - 2
src/lang/cn.json

@@ -29,6 +29,7 @@
   "knowledgeDesc":"请输入知识库描述",
   "cancel":"取消",
   "confirm":"确定",
+
   "office":"OFFICE文件",
   "video":"视频文件",
   "img":"图片",
@@ -41,6 +42,8 @@
   "defaultFolderDesc":"该文件夹为系统创设,将自动关联您所有上传的文件",
   "confirmDelete":"确定删除文件夹吗?",
   "prompt":"提示",
+  "prompt2": "提示词设置",
+  "promptPlaceholder": "提示词设置(非必填)",
   "deleteSuccess":"删除成功",
   "deleteFail":"删除失败",
   "copySuccess":"复制成功",
@@ -52,6 +55,7 @@
   "selectFileName":"请输入你需要搜索的文件名字",
   "flushed":"刷新",
   "uploadFile":"上传文件",
+  "importFromWebpage": "从网页导入",
   "selectedFiles":"已选文件",
   "nouploadFiles":"暂无上传文件",
   "fileName":"文件名",
@@ -83,6 +87,8 @@
   "sliceSuccess":"切片成功",
   "sliceFail":"切片失败",
   "permissions":"权限管理",
+  "labPermissions":"教研室权限",
+  "PublicPermissions":"公开权限",
   "edit":"编辑",
   "inputName":"输入文件夹名字",
   "inputDesc":"输入文件夹描述",
@@ -152,5 +158,21 @@
   "allSelect":"全选",
   "pleaseSelect":"请选择",
   "a_total_of_x_items":"共 ${x} 条",
-  "x_items_selected":"已选文件${x}个"
-}
+  "x_items_selected":"已选文件${x}个",
+  "webCrawlDialog": {
+    "title": "从网站获取内容",
+    "tabSingle": "爬取单一网页",
+    "tabSite": "爬取整站",
+    "inputPlaceholder": "请输入网址",
+    "tip": "处于合规原因,当前仅支持公开可获取的静态网页(微信公众号、知乎、小红书等特殊内容不可爬取)",
+    "advancedTitle": "高级配置",
+    "schedule": "定时获取",
+    "scheduleNever": "从不",
+    "scheduleDay": "每天",
+    "scheduleWeek": "每周",
+    "scheduleTip": "如开启,将每隔指定时长重新获取该网页内容",
+    "attachment": "获取网页中的附件",
+    "attachmentTip": "如开启,将自动下载该页面中 pdf、docx、doc、pptx 格式的附件",
+    "run": "运行"
+  }
+}

+ 23 - 2
src/lang/en.json

@@ -41,6 +41,8 @@
   "defaultFolderDesc":"This folder is created by the system and will automatically associate with all your uploaded files",
   "confirmDelete":"This action cannot be undone. Do you want to continue?",
   "prompt":"Tip",
+  "prompt2": "Prompt Setting",
+  "promptPlaceholder": "Prompt Setting (Optional)",
   "deleteSuccess":"Deletion Successful",
   "deleteFail":"Delete Failed",
   "copySuccess":"Copy Success",
@@ -52,6 +54,7 @@
   "selectFileName":"Enter file name to search",
   "flushed":"Refresh",
   "uploadFile":"Upload File",
+  "importFromWebpage": "Import From Webpage",
   "selectedFiles":"Selected Files",
   "nouploadFiles":"No Uploaded Files",
   "fileName":"File Name",
@@ -83,6 +86,8 @@
   "sliceSuccess":"Slice Success",
   "sliceFail":"Slice Failed",
   "permissions":"Permission",
+  "labPermissions":"Lab Permission",
+  "PublicPermissions":"Public Permissions",
   "edit":"Edit",
   "inputName":"Input folder name",
   "inputDesc":"Please enter folder description",
@@ -152,5 +157,21 @@
   "allSelect":"All Select",
   "pleaseSelect":"Please select",
   "a_total_of_x_items":"A total of ${x} items.",
-  "x_items_selected":"${x} items selected"
-}
+  "x_items_selected":"${x} items selected",
+  "webCrawlDialog": {
+    "title": "Get Content from Website",
+    "tabSingle": "Crawl Single Page",
+    "tabSite": "Crawl Whole Site",
+    "inputPlaceholder": "Please enter URL",
+    "tip": "For compliance reasons, only publicly accessible static web pages are supported (WeChat Official Accounts, Zhihu, Xiaohongshu, etc. are not supported)",
+    "advancedTitle": "Advanced Settings",
+    "schedule": "Scheduled Fetch",
+    "scheduleNever": "Never",
+    "scheduleDay": "Every day",
+    "scheduleWeek": "Every week",
+    "scheduleTip": "If enabled, the page will be fetched again at the specified interval",
+    "attachment": "Fetch Attachments in Page",
+    "attachmentTip": "If enabled, will automatically download attachments in pdf, docx, doc, pptx format from the page",
+    "run": "Run"
+  }
+}

+ 23 - 3
src/lang/hk.json

@@ -41,6 +41,8 @@
   "defaultFolderDesc": "該文件夾為系統創設,將自動關聯您所有上傳的文件",
   "confirmDelete": "確定刪除文件夾嗎?",
   "prompt": "提示",
+  "prompt2": "提示詞設定",
+  "promptPlaceholder": "提示詞設定(非必填)",
   "deleteSuccess": "刪除成功",
   "deleteFail": "刪除失敗",
   "copySuccess": "複製成功",
@@ -52,6 +54,7 @@
   "selectFileName": "請輸入你需要搜索的文件名字",
   "flushed": "刷新",
   "uploadFile": "上傳文件",
+  "importFromWebpage": "從網頁匯入資料",
   "selectedFiles": "已選文件",
   "nouploadFiles": "暫無上傳文件",
   "fileName": "文件名",
@@ -83,6 +86,8 @@
   "sliceSuccess": "切片成功",
   "sliceFail": "切片失敗",
   "permissions": "權限管理",
+  "labPermissions":"教研室權限",
+  "PublicPermissions":"公開權限",
   "edit": "編輯",
   "inputName": "輸入文件夾名字",
   "inputDesc": "輸入文件夾描述",
@@ -152,6 +157,21 @@
   "allSelect":"全選",
   "pleaseSelect":"請選擇",
   "a_total_of_x_items":"共 ${x} 條",
-  "x_items_selected":"已選文件${x}個"
-
-}
+  "x_items_selected":"已選文件${x}個",
+  "webCrawlDialog": {
+    "title": "從網站獲取內容",
+    "tabSingle": "爬取單一網頁",
+    "tabSite": "爬取整站",
+    "inputPlaceholder": "請輸入網址",
+    "tip": "處於合規原因,目前僅支持公開可獲取的靜態網頁(微信公眾號、知乎、小紅書等特殊內容不可爬取)",
+    "advancedTitle": "高級配置",
+    "schedule": "定時獲取",
+    "scheduleNever": "從不",
+    "scheduleDay": "每天",
+    "scheduleWeek": "每週",
+    "scheduleTip": "如開啟,將每隔指定時長重新獲取該網頁內容",
+    "attachment": "獲取網頁中的附件",
+    "attachmentTip": "如開啟,將自動下載該頁面中 pdf、docx、doc、pptx 格式的附件",
+    "run": "運行"
+  }
+}

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