ソースを参照

处理样式及部分bug并打包

yangg 10 ヶ月 前
コミット
c8b4905b15
90 ファイル変更728 行追加199 行削除
  1. 1 1
      .env.development
  2. 0 0
      dist/index.html
  3. 0 0
      dist/static/css/app.c0ca9889.css
  4. 0 0
      dist/static/css/chunk-009235a2.7131743c.css
  5. 0 1
      dist/static/css/chunk-06dc419e.1ffa2008.css
  6. 1 0
      dist/static/css/chunk-0ad8ab66.9e16d9e0.css
  7. 0 0
      dist/static/css/chunk-0d6cec32.e30e9787.css
  8. 0 0
      dist/static/css/chunk-2e2daf97.7131743c.css
  9. 0 1
      dist/static/css/chunk-35163b0e.e30e9787.css
  10. 0 1
      dist/static/css/chunk-3834b15c.e30e9787.css
  11. 1 0
      dist/static/css/chunk-3b70738c.6712b828.css
  12. 0 0
      dist/static/css/chunk-3c07cddb.7131743c.css
  13. 1 0
      dist/static/css/chunk-47ea0e25.b27c668a.css
  14. 0 1
      dist/static/css/chunk-55efc996.e30e9787.css
  15. 0 0
      dist/static/css/chunk-573495bd.641e9b71.css
  16. 0 0
      dist/static/css/chunk-61b2aede.4cd10360.css
  17. 0 1
      dist/static/css/chunk-6d076dd4.e30e9787.css
  18. 0 0
      dist/static/css/chunk-6da0c47d.10d1a104.css
  19. 0 0
      dist/static/css/chunk-708ed3f2.e30e9787.css
  20. 0 1
      dist/static/css/chunk-73894ea4.ed7eb474.css
  21. 0 0
      dist/static/css/chunk-78acfbee.775a21e3.css
  22. 0 1
      dist/static/css/chunk-88964510.e30e9787.css
  23. 0 1
      dist/static/css/chunk-a676d172.2799ca54.css
  24. 0 0
      dist/static/css/chunk-d649fd9a.e30e9787.css
  25. 0 0
      dist/static/js/app.2dc49afa.js
  26. 0 0
      dist/static/js/chunk-009235a2.113ddd24.js
  27. 0 0
      dist/static/js/chunk-06dc419e.759b8c84.js
  28. 0 0
      dist/static/js/chunk-07c440fa.66849224.js
  29. 0 0
      dist/static/js/chunk-07c440fa.b08e61f1.js
  30. 0 0
      dist/static/js/chunk-0ad8ab66.6a33029a.js
  31. 0 0
      dist/static/js/chunk-0d6cec32.d512cfd4.js
  32. 0 0
      dist/static/js/chunk-16a4e73a.d79d88de.js
  33. 0 0
      dist/static/js/chunk-2731e821.15c349cb.js
  34. 0 0
      dist/static/js/chunk-29786f4c.dfd507db.js
  35. 0 0
      dist/static/js/chunk-2e2daf97.f614f231.js
  36. 0 0
      dist/static/js/chunk-2f527770.8ec28f4a.js
  37. 0 0
      dist/static/js/chunk-314db29e.7c7b35b2.js
  38. 0 0
      dist/static/js/chunk-35163b0e.9d2ebef0.js
  39. 0 0
      dist/static/js/chunk-358439ff.7ec23879.js
  40. 0 0
      dist/static/js/chunk-3834b15c.d5c7200c.js
  41. 0 0
      dist/static/js/chunk-3b70738c.d211d2a4.js
  42. 0 0
      dist/static/js/chunk-3c07cddb.6b173221.js
  43. 0 0
      dist/static/js/chunk-3d9675b3.beefccde.js
  44. 0 0
      dist/static/js/chunk-3d9675b3.da57090f.js
  45. 0 0
      dist/static/js/chunk-47ea0e25.b759b7bf.js
  46. 0 0
      dist/static/js/chunk-4d02cb1c.eca1763f.js
  47. 0 0
      dist/static/js/chunk-52f685c2.b41f970d.js
  48. 0 0
      dist/static/js/chunk-52f685c2.e17bbb5a.js
  49. 0 0
      dist/static/js/chunk-55bb6aee.b0d83672.js
  50. 0 0
      dist/static/js/chunk-55efc996.945110f1.js
  51. 0 0
      dist/static/js/chunk-573495bd.b3899352.js
  52. 0 0
      dist/static/js/chunk-61b2aede.4233fbb6.js
  53. 0 0
      dist/static/js/chunk-6d076dd4.f4f4af94.js
  54. 0 0
      dist/static/js/chunk-6da0c47d.43e1c747.js
  55. 0 0
      dist/static/js/chunk-708ed3f2.460746e3.js
  56. 0 0
      dist/static/js/chunk-73894ea4.ceaed2f0.js
  57. 0 0
      dist/static/js/chunk-78acfbee.2c49e0db.js
  58. 0 0
      dist/static/js/chunk-882f79f4.f8eec342.js
  59. 0 0
      dist/static/js/chunk-88964510.164b63fb.js
  60. 0 0
      dist/static/js/chunk-a676d172.a5fd4ba0.js
  61. 0 0
      dist/static/js/chunk-d649fd9a.646d932c.js
  62. 32 6
      src/api/knowledge.js
  63. 11 4
      src/router/index.js
  64. 1 1
      src/styles/index.scss
  65. 2 2
      src/views/dataCenter/category/components/dataInfo.vue
  66. 3 0
      src/views/dataCenter/category/components/dataSearch.scss
  67. 1 1
      src/views/dataCenter/category/components/dataSearch.vue
  68. 1 1
      src/views/dataCenter/components/dataInfo.vue
  69. 1 1
      src/views/document/com/components/Attribute/Directory/index.vue
  70. 3 3
      src/views/document/com/components/Attribute/attributeVar/index.vue
  71. 3 3
      src/views/document/com/components/Attribute/docAttr/index.vue
  72. 23 4
      src/views/document/com/components/Formula/dataInfo.vue
  73. 61 14
      src/views/document/com/components/TextArea/index.vue
  74. 117 33
      src/views/document/com/components/Variable/dataInfo.vue
  75. 139 1
      src/views/document/com/view.vue
  76. 3 3
      src/views/document/components/dataList.vue
  77. 3 2
      src/views/document/components/dataSearch.vue
  78. 1 1
      src/views/document/create.scss
  79. 2 1
      src/views/document/create.vue
  80. 2 2
      src/views/document/temList/components/dataList.vue
  81. 3 2
      src/views/document/temList/components/dataSearch.vue
  82. 145 24
      src/views/knowledgeMenu/category/components/dataList.vue
  83. 11 8
      src/views/knowledgeMenu/category/components/dataSearch.vue
  84. 58 0
      src/views/knowledgeMenu/category/infoList.vue
  85. 2 2
      src/views/knowledgeMenu/category/knowledgeSet.vue
  86. 28 16
      src/views/knowledgeMenu/knowledgeList.vue
  87. 60 50
      src/views/profile/index.vue
  88. 2 1
      src/views/template/category/components/dataInfo.vue
  89. 3 2
      src/views/template/components/dataList.vue
  90. 3 2
      src/views/template/components/dataSearch.vue

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@
 ENV = 'development'
 port = 8080
 # base api
-VUE_APP_BASE_API = 'http://120.46.190.49:8000'
+VUE_APP_BASE_API = 'http://192.168.1.178:8000'
 #192.168.1.178

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/index.html


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.c0ca9889.css


+ 0 - 0
dist/static/css/chunk-314db29e.7131743c.css → dist/static/css/chunk-009235a2.7131743c.css


+ 0 - 1
dist/static/css/chunk-06dc419e.1ffa2008.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.avatar-uploader .avatar{width:178px;height:178px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);border-radius:6px;cursor:pointer;position:relative;overflow:hidden;-webkit-transition:var(--el-transition-duration-fast);transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.el-icon.avatar-uploader-icon{font-size:28px;color:#8c939d;width:178px;height:178px;text-align:center}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 1 - 0
dist/static/css/chunk-0ad8ab66.9e16d9e0.css

@@ -0,0 +1 @@
+.ledge_box .data-search[data-v-63fade9e]{padding:20px 10px 0 10px}.ledge_box .data-list[data-v-63fade9e]{padding:10px;min-height:200px;position:relative}.ledge_box .data-list .time[data-v-63fade9e]{font-size:13px;color:#999}.ledge_box .data-list .bottom[data-v-63fade9e]{margin-top:13px;line-height:12px}.ledge_box .data-list .button[data-v-63fade9e]{padding:0;float:right}.ledge_box .data-list .image[data-v-63fade9e]{width:100%;display:block}.ledge_box .data-list .clearfix[data-v-63fade9e]:after,.ledge_box .data-list .clearfix[data-v-63fade9e]:before{display:table;content:""}.ledge_box .data-list .clearfix[data-v-63fade9e]:after{clear:both}.ledge_box .data-list .card_box[data-v-63fade9e]{padding:20px}.ledge_box .data-list .card_box .header[data-v-63fade9e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ledge_box .data-list .card-col[data-v-63fade9e]{margin-bottom:30px}.ledge_box .data-list .card-col .card_box[data-v-63fade9e]{height:235px}.ledge_box .data-list .card-col .card_box .box_content[data-v-63fade9e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%}.ledge_box .data-list .card-col .card_box .box_content .content[data-v-63fade9e]{font-size:24px;line-height:32px;font-weight:600;color:rgba(0,0,0,.8784313725490196);word-break:break-all}.ledge_box .data-list .card-col .card_box .box_content .footer[data-v-63fade9e]{font-size:12px;font-weight:600;color:rgba(0,0,0,.6509803921568628);vertical-align:middle}

+ 0 - 0
dist/static/css/chunk-16a4e73a.e30e9787.css → dist/static/css/chunk-0d6cec32.e30e9787.css


+ 0 - 0
dist/static/css/chunk-4d02cb1c.7131743c.css → dist/static/css/chunk-2e2daf97.7131743c.css


+ 0 - 1
dist/static/css/chunk-35163b0e.e30e9787.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 0 - 1
dist/static/css/chunk-3834b15c.e30e9787.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 1 - 0
dist/static/css/chunk-3b70738c.6712b828.css

@@ -0,0 +1 @@
+.sub-imgs[data-v-2c6b7984]{padding:0;margin:0}.sub-imgs li[data-v-2c6b7984]{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search[data-v-01f60281]{padding:20px 10px 0 10px}.el-dialog__body[data-v-01f60281]{padding:10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 0 - 0
dist/static/css/chunk-55bb6aee.7131743c.css → dist/static/css/chunk-3c07cddb.7131743c.css


+ 1 - 0
dist/static/css/chunk-47ea0e25.b27c668a.css

@@ -0,0 +1 @@
+.project-search{padding:30px;font-size:12px}

+ 0 - 1
dist/static/css/chunk-55efc996.e30e9787.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 0 - 0
dist/static/css/chunk-29786f4c.641e9b71.css → dist/static/css/chunk-573495bd.641e9b71.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-61b2aede.4cd10360.css


+ 0 - 1
dist/static/css/chunk-6d076dd4.e30e9787.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-6da0c47d.10d1a104.css


+ 0 - 0
dist/static/css/chunk-2731e821.e30e9787.css → dist/static/css/chunk-708ed3f2.e30e9787.css


+ 0 - 1
dist/static/css/chunk-73894ea4.ed7eb474.css

@@ -1 +0,0 @@
-.ledge_box .data-search[data-v-0f4ea960]{padding:20px 10px 0 10px}.ledge_box .data-list[data-v-0f4ea960]{padding:10px;min-height:200px;position:relative}.ledge_box .data-list .time[data-v-0f4ea960]{font-size:13px;color:#999}.ledge_box .data-list .bottom[data-v-0f4ea960]{margin-top:13px;line-height:12px}.ledge_box .data-list .button[data-v-0f4ea960]{padding:0;float:right}.ledge_box .data-list .image[data-v-0f4ea960]{width:100%;display:block}.ledge_box .data-list .clearfix[data-v-0f4ea960]:after,.ledge_box .data-list .clearfix[data-v-0f4ea960]:before{display:table;content:""}.ledge_box .data-list .clearfix[data-v-0f4ea960]:after{clear:both}.ledge_box .data-list .card_box[data-v-0f4ea960]{padding:20px}.ledge_box .data-list .card_box .header[data-v-0f4ea960]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ledge_box .data-list .card-col[data-v-0f4ea960]{margin-bottom:30px}.ledge_box .data-list .card-col .card_box[data-v-0f4ea960]{height:235px}.ledge_box .data-list .card-col .card_box .box_content[data-v-0f4ea960]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%}.ledge_box .data-list .card-col .card_box .box_content .content[data-v-0f4ea960]{font-size:24px;line-height:32px;font-weight:600;color:rgba(0,0,0,.8784313725490196);word-break:break-all}.ledge_box .data-list .card-col .card_box .box_content .footer[data-v-0f4ea960]{font-size:12px;font-weight:600;color:rgba(0,0,0,.6509803921568628);vertical-align:middle}

+ 0 - 0
dist/static/css/chunk-24067204.775a21e3.css → dist/static/css/chunk-78acfbee.775a21e3.css


+ 0 - 1
dist/static/css/chunk-88964510.e30e9787.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.project-search{padding:30px;font-size:12px}

+ 0 - 1
dist/static/css/chunk-a676d172.2799ca54.css

@@ -1 +0,0 @@
-.sub-imgs{padding:0;margin:0}.sub-imgs li{float:left;margin-right:10px;width:100px;height:100px;list-style:none}.data-search{padding:20px 10px 0 10px}.data-list .btns,.data-list .page-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.data-list .page-info{margin-top:10px}.data-list .page-info .opt{width:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.data-list .page-info .opt .pick{width:100px}.data-list .page-info .opt .section{margin-left:10px}.data-list .page-info .page-data{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.data-list .page-info .page-data .page-item{width:100%}.data-list .page-info .page-data .page-opt{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.el-table{scrollbar-color:#efefef #fff;scrollbar-width:thin}.el-table::-webkit-scrollbar{height:8px}.el-table::-webkit-scrollbar-thumb{background-color:#efefef;border-radius:4px}.el-table::-webkit-scrollbar-track{background-color:#fff}.project-search{padding:30px;font-size:12px}

+ 0 - 0
dist/static/css/chunk-2f527770.e30e9787.css → dist/static/css/chunk-d649fd9a.e30e9787.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.2dc49afa.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-009235a2.113ddd24.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-06dc419e.759b8c84.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-07c440fa.66849224.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-07c440fa.b08e61f1.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-0ad8ab66.6a33029a.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-0d6cec32.d512cfd4.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-16a4e73a.d79d88de.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-2731e821.15c349cb.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-29786f4c.dfd507db.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-2e2daf97.f614f231.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-2f527770.8ec28f4a.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-314db29e.7c7b35b2.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-35163b0e.9d2ebef0.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-358439ff.7ec23879.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-3834b15c.d5c7200c.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-3b70738c.d211d2a4.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-3c07cddb.6b173221.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-3d9675b3.beefccde.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-3d9675b3.da57090f.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-47ea0e25.b759b7bf.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-4d02cb1c.eca1763f.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-52f685c2.b41f970d.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-52f685c2.e17bbb5a.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-55bb6aee.b0d83672.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-55efc996.945110f1.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-573495bd.b3899352.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-61b2aede.4233fbb6.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-6d076dd4.f4f4af94.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-6da0c47d.43e1c747.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-708ed3f2.460746e3.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-73894ea4.ceaed2f0.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-78acfbee.2c49e0db.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-882f79f4.f8eec342.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-88964510.164b63fb.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-a676d172.a5fd4ba0.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-d649fd9a.646d932c.js


+ 32 - 6
src/api/knowledge.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 /* 查询知识库列表 */
 export function listBuckets(data) {
   return request({
-    url: '/minio/listBuckets',
+    url: '/kbm/selectBucketInfo',//'/minio/listBuckets',
     method: 'post',
     data
   })
@@ -18,11 +18,20 @@ export function createBucket(data) {
   })
 }
 
-/* 获取指定的内部信息 /minio/getBucketContents */
+/* 删除知识库  kbm/deleteBucket*/
+export function deleteBucket(data) {
+  return request({
+    url: '/kbm/deleteBucket',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取指定的内部信息*/
 
 export function getBucketContents(data) {
   return request({
-    url: '/minio/getBucketContents',
+    url: '/kbm/getFileInfo',
     method: 'post',
     data
   })
@@ -32,7 +41,7 @@ export function getBucketContents(data) {
 
 export function deleteFile(data) {
   return request({
-    url: '/minio/deleteFile',
+    url: '/kbm/deleteDocument',
     method: 'post',
     data
   })
@@ -42,7 +51,7 @@ export function deleteFile(data) {
 
 export function nameGetUrl(data) {
   return request({
-    url: '/minio/nameGetUrl',
+    url: '/kbm/getUrl',
     method: 'post',
     data
   })
@@ -61,8 +70,25 @@ export function postUpload(data) {
 /* 修改文档名称 /minio/renameFile */
 export function renameFile(data) {
   return request({
-    url: '/minio/renameFile',
+    url: '/kbm/updateName',
+    method: 'post',
+    data
+  })
+}
+
+/* 解析方法 /kbm/analysis */
+export function analysis(data) {
+  return request({
+    url: '/kbm/analysis',
     method: 'post',
     data
   })
 }
+/* 文本信息 /kbm/searchTaskInfo */
+export function searchTaskInfo(data) {
+  return request({
+    url: '/kbm/searchTaskInfo',
+    method: 'post',
+    data
+  })
+}

+ 11 - 4
src/router/index.js

@@ -137,7 +137,7 @@ export const constantRoutes = [
  * the routes that need to be dynamically loaded based on user roles
  */
 export const asyncRoutes = [
-  {
+/*   {
     path: '/project',
     component: Layout,
     type:1,
@@ -160,7 +160,7 @@ export const asyncRoutes = [
         meta: { title: '项目分类',  noCache: true ,roles: ['admin']}
       }
     ]
-  },
+  }, */
   {
     path: '/customer',
     component: Layout,
@@ -179,7 +179,7 @@ export const asyncRoutes = [
       }
     ]
   },
-  {
+/*   {
     path: '/product',
     component: Layout,
     type:5,
@@ -214,7 +214,7 @@ export const asyncRoutes = [
         meta: { title: '品牌设置',  noCache: true ,roles: ['admin']}
       }
     ]
-  },
+  }, */
 
   {
     path: '/document',
@@ -318,6 +318,13 @@ export const asyncRoutes = [
         name: 'KBM\n_setting',
         hidden:true,
         meta: { title: '知识库配置',  noCache: true ,roles: ['admin']}
+      },
+      {
+        path: 'category/infoList',
+        component: () => import('@/views/knowledgeMenu/category/infoList'),
+        name: 'KBM_info',
+        hidden:true,
+        meta: { title: '解析块',  noCache: true ,roles: ['admin']}
       }
     ]
   },

+ 1 - 1
src/styles/index.scss

@@ -211,7 +211,7 @@ aside {
 .text-input-box{
   border:none;
   border-bottom:1px solid #CCC;
-  min-width:100px;
+  min-width:50px;
   text-align:center;
 }
 h1{

+ 2 - 2
src/views/dataCenter/category/components/dataInfo.vue

@@ -19,7 +19,7 @@
 
       </el-form>
     </el-card>
-    <div style="text-align:right; margin-top:20px;">
+    <div style="text-align:right; margin-top:20px;margin-bottom: 20px;">
         <el-button type="warning" @click="btnSave">确认保存</el-button>
     </div>
   </div>
@@ -107,6 +107,6 @@
   }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
  @import './dataInfo.scss'
 </style>

+ 3 - 0
src/views/dataCenter/category/components/dataSearch.scss

@@ -1,3 +1,6 @@
 .data-search{ 
   padding:20px 10px 0px 10px;
 }
+.el-dialog__body{
+  padding: 10px;
+}

+ 1 - 1
src/views/dataCenter/category/components/dataSearch.vue

@@ -89,6 +89,6 @@ export default{
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 @import "./dataSearch.scss"
 </style>

+ 1 - 1
src/views/dataCenter/components/dataInfo.vue

@@ -168,7 +168,7 @@ export default {
         _this.dataForm = res.data;
         _this.dataForm.sourceData = JSON.parse(_this.dataForm.source_data);
         if (res.data.category && res.data.category.id) {
-          _this.dataForm.category_id = res.data.category.id;
+          _this.dataForm.category_id = res.data.category.category_id;
         }
 
         _this.fileLoadStatus = true;

+ 1 - 1
src/views/document/com/components/Attribute/Directory/index.vue

@@ -3,7 +3,7 @@
     <el-form class="dirceForm">
       <template v-for="(sub) in coms">
         <template v-for="(item,index) in sub.attrs">
-          <el-form-item :key="index" v-if="item.type=='Directory'" :label="item.name + ' (引用名:[' + item.id + '])'">
+          <el-form-item :key="index" v-if="item.type=='Directory'" :label="item.id "><!-- + ' (引用名:[' + item.id + '])' -->
             <el-input type="textarea" v-model="item.content"></el-input>
           </el-form-item>
         </template>

+ 3 - 3
src/views/document/com/components/Attribute/attributeVar/index.vue

@@ -4,7 +4,7 @@
       <template v-for="(sub, subIndex) in filteredAttrs">
         <template v-if="com.type == 'TextArea'">
           <template v-if="isTextAreaType(sub.type)">
-            <el-form-item :label="sub.name + ' (引用名:[' + sub.id + '])'">
+            <el-form-item :label="sub.id"><!--  + ' (引用名:[' + sub.id + '])' -->
               <el-input
                 type="textarea"
                 @input="updateAllReferences(sub, $event)"
@@ -13,12 +13,12 @@
             </el-form-item>
           </template>
           <template v-if="sub.type == 'formual'">
-            <el-form-item :label="sub.name + ' (引用名:[' + sub.id + '])'">
+            <el-form-item :label="sub.id "><!-- + ' (引用名:[' + sub.id + '])' -->
               <el-input type="textarea" v-model="sub.formula"></el-input>
             </el-form-item>
           </template>
           <template v-if="sub.type == 'sourceData'">
-            <el-form-item :label="sub.name + ' (引用名:[' + sub.id + '])'">
+            <el-form-item :label="sub.id "><!-- + ' (引用名:[' + sub.id + '])' -->
               {{ formatSourceData(sub.id, sub.formula) }}
             </el-form-item>
           </template>

+ 3 - 3
src/views/document/com/components/Attribute/docAttr/index.vue

@@ -11,13 +11,13 @@
         <el-select v-model="attrs.category_id" style="width:100%;" placeholder="请选择所属分类">
           <el-option
                 v-for="(item,index) in articleCategoryList"
-                :key="item.id"
+                :key="index"
                 :label="item.name"
                 :value="item.id"
               />
         </el-select>
       </el-form-item>
-      <el-form-item label="适用产品:">
+      <!-- <el-form-item label="适用产品:">
         <el-select v-model="attrs.linkProduct" :multiple="true" style="width:100%;" @change="onChangeProduct"  placeholder="请选择适用产品">
           <el-option
                 v-for="(item,index) in productList"
@@ -37,7 +37,7 @@
                 :value="item.id"
               />
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
     </el-form>
   </div>
 </template>

+ 23 - 4
src/views/document/com/components/Formula/dataInfo.vue

@@ -35,6 +35,16 @@
             <div>示例 [T][模块01][attr01]+[T][模块01][attr02]</div>
           </div>
         </el-form-item>
+        <el-form-item label="保留小数点:">
+          <el-input
+            v-model.number="dataForm.point"
+            type="number"
+            min="0"
+            max="4"
+            :step="1"
+            @input="validatePoint"
+          ></el-input>
+        </el-form-item>
         <el-form-item label="介绍:">
           <el-input type="textarea" v-model="dataForm.intro"></el-input>
         </el-form-item>
@@ -66,7 +76,7 @@
       custom-class="prod-verify"
       :title="title"
       :close-on-click-modal="false"
-       @close="close"
+      @close="close"
     >
       <el-form :model="insertForm" :rules="insertRules" ref="insertRef">
         <el-form-item label="模块名称:">
@@ -192,6 +202,7 @@ export default {
             status: "",
             use_status: 5,
             params: "[]",
+            point: 0,
           };
           return;
         }
@@ -222,6 +233,7 @@ export default {
         status: 5,
         use_status: 5,
         params: "[]",
+        point: 0,
       },
       statusOptions: [
         {
@@ -240,7 +252,7 @@ export default {
       variablesVisible: false,
       title: "",
       insertForm: {
-        moduleName: '',
+        moduleName: "",
         Variable: "",
       },
       insertRules: {
@@ -269,10 +281,17 @@ export default {
     this.initTableList();
   },
   methods: {
+    validatePoint(value) {
+      const intValue = parseInt(value);
+      if (isNaN(intValue) || intValue < 0 || intValue > 4) {
+        this.dataForm.point = "";
+      } else {
+        this.dataForm.point = intValue;
+      }
+    },
     /* 关闭 */
     close() {
-      this.insertForm = {
-      };
+      this.insertForm = {};
     },
     /*  */
     handleFormulaInput(value) {

+ 61 - 14
src/views/document/com/components/TextArea/index.vue

@@ -30,6 +30,7 @@
 <script>
 // import CKEditor from "ckeditor4-vue";
 import { findData } from "@/api/sourceData";
+import { data } from "jquery";
 export default {
   name: "app",
   emits: ["onUpdate", "onUpdateAttr", "onUpdateProdAttr"],
@@ -85,11 +86,11 @@ export default {
         if (val == null) return;
         if (val.content == undefined || val.content == null) return;
         try {
-          console.log("com",val);
           let res = await _this.replaceData(val.content);
           _this.content = res;
           _this.$nextTick(() => {
             _this.bindEvents();
+            _this.initializeInputWidths();
           });
         } catch (error) {
           console.error("处理 com 时出错:", error);
@@ -134,7 +135,11 @@ export default {
       focusedInputId: null,
     };
   },
-  mounted() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.initializeInputWidths();
+    });
+  },
   // 记得在组件销毁时移除事件监听器
   beforeDestroy() {
     this.$el.removeEventListener("input", this.handleInputChange);
@@ -187,7 +192,7 @@ export default {
                 attrId +
                 '"  data-index="' +
                 i +
-                '" class="text-input-box" value="' +
+                '" class="text-input-box auto-width" value="' +
                 _this.com.attrs[i].content +
                 '">'
             );
@@ -244,10 +249,11 @@ export default {
           //// console.log('attrs',_this.com.attrs[i]);
           //处理计算公式 不处理
           let formual = await _this.analysisFormual(_this.com.attrs[i]);
-
+          let point= _this.com.attrs[i].data.point
           formual = await _this.getRemote(formual);
-          _this.com.attrs[i].content = eval(formual);
-          data = data.replace("{{" + attrId + "}}", eval(formual));
+        
+          _this.com.attrs[i].content = eval(formual).toFixed(point);
+          data = data.replace("{{" + attrId + "}}", eval(formual).toFixed(point));
 
           /* let formual = await _this.analysisFormual(_this.com.attrs[i]);
           formual = await _this.getRemote(formual);
@@ -276,17 +282,17 @@ export default {
             const precedingTag = precedingText.match(/<([^>]+)>$/);
             const followingCloseTag = followingText.match(/^<\/([^>]+)>/);
 
-            if (
+            // If it's inside matching tags, replace the entire element
+            return `<h1>${directoryContent}</h1>`;
+            /*     if (
               precedingTag &&
               followingCloseTag &&
               precedingTag[1] === followingCloseTag[1]
             ) {
-              // If it's inside matching tags, replace the entire element
-              return `<h1>${directoryContent}</h1>`;
             } else {
               // Otherwise, just replace the placeholder
               return directoryContent;
-            }
+            } */
           });
           //处理目录
           /* data = data.replace(
@@ -315,14 +321,40 @@ export default {
       }
       this.$nextTick(() => {
         this.addInputListeners();
+        this.initializeInputWidths();
       });
       return data;
     },
     addInputListeners() {
       // 使用事件委托来处理所有的 .text-input-box 元素
       this.$el.addEventListener("blur", this.handleInputChange, true);
+      this.$el.addEventListener("input", this.adjustInputWidth, true);
+    },
+    initializeInputWidths() {
+      const inputs = this.$el.querySelectorAll(".text-input-box");
+      inputs.forEach((input) => this.adjustInputWidth({ target: input }));
     },
 
+    adjustInputWidth(event) {
+      if (event.target.classList.contains("text-input-box")) {
+        const input = event.target;
+        const sizeCalculator = document.createElement("span");
+        sizeCalculator.className = "size-calculator";
+        sizeCalculator.textContent = input.value || input.placeholder || "0";
+        document.body.appendChild(sizeCalculator);
+
+        const styles = window.getComputedStyle(input);
+        sizeCalculator.style.font = styles.font;
+        sizeCalculator.style.fontSize = styles.fontSize;
+        sizeCalculator.style.fontWeight = styles.fontWeight;
+        sizeCalculator.style.letterSpacing = styles.letterSpacing;
+
+        const width = sizeCalculator.offsetWidth;
+        input.style.width = `${width + 10}px`; // Add some padding
+
+        document.body.removeChild(sizeCalculator);
+      }
+    },
     handleInputChange(event) {
       if (event.target.classList.contains("text-input-box")) {
         const attrId = event.target.id;
@@ -392,7 +424,7 @@ export default {
         let itemName = items[0];
         // console.log("处理项:", itemName);
         try {
-          let data = await _this.getFormualData(itemName);
+          let data = await _this.getFormualData(itemName,attrs.data);
           // console.log(`获取到的数据: ${itemName} = ${data}`);
           if (data === null || data === undefined || isNaN(data)) {
             console.warn(`获取到的数据无效: ${itemName}`);
@@ -405,11 +437,11 @@ export default {
           formual = formual.replace(itemName, "(0)");
         }
       }
-      // console.log("分析后的公式:", formual);
+      /*  console.log("分析后的公式:", formual); */
       return formual;
     },
 
-    async getFormualData(formualItem) {
+    async getFormualData(formualItem,data) {
       let _this = this;
       // console.log("开始获取公式数据:", formualItem);
       var pattern = /\[(.*?)\]\[(.*?)\]\[(.*?)\]/;
@@ -422,7 +454,7 @@ export default {
       } else {
         console.warn("无法解析公式项:", formualItem);
       }
-      // console.log("计算结果:", calResult);
+   /*     console.log("计算结果:", formualItem,data); */
       return calResult;
     },
 
@@ -644,4 +676,19 @@ export default {
   width: 80%; // Adjust as needed
   color: inherit; // Ensure the color remains unchanged
 }
+.auto-width-wrapper {
+  display: inline-block;
+  position: relative;
+}
+
+.size-calculator {
+  position: absolute;
+  top: -9999px;
+  left: -9999px;
+  white-space: pre;
+  font-family: inherit;
+  font-size: inherit;
+  font-weight: inherit;
+  padding: 2px 4px;
+}
 </style>

+ 117 - 33
src/views/document/com/components/Variable/dataInfo.vue

@@ -1,8 +1,13 @@
 <template>
   <div class="data-info">
     <el-card>
-      <el-form :model="dataForm" ref="dataFormRef" label-width="120px">
-      <!--   <el-form-item label="编码:">
+      <el-form
+        :model="dataForm"
+        :rules="dataRule"
+        ref="dataFormRef"
+        label-width="120px"
+      >
+        <!--   <el-form-item label="编码:">
           <el-input v-model="dataForm.code"></el-input>
         </el-form-item> -->
         <el-form-item label="名称 :">
@@ -14,6 +19,7 @@
             placeholder="请选择取值类型"
             size="large"
             style="width: 100%"
+            clearable
           >
             <el-option
               v-for="item in valueTypeList"
@@ -23,7 +29,34 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="取值:">
+        <el-form-item
+          label="取值:"
+          v-if="dataForm.value_type == 1 || dataForm.value_type == 2"
+          prop="value"
+        >
+          <el-input v-model="dataForm.value"></el-input>
+        </el-form-item>
+        <el-form-item
+          label="取值:"
+          v-if="dataForm.value_type == 3"
+          prop="value"
+        >
+          <el-input v-model="dataForm.value"></el-input>
+        </el-form-item>
+        <el-form-item
+          label="取值:"
+          v-if="dataForm.value_type == 4"
+          prop="value"
+        >
+          <el-input v-model="dataForm.value">
+            <template slot="append">%</template></el-input
+          >
+        </el-form-item>
+        <el-form-item
+          label="取值:"
+          v-if="dataForm.value_type == 5"
+          prop="value"
+        >
           <el-input v-model="dataForm.value"></el-input>
         </el-form-item>
         <el-form-item label="取值范围:" v-if="dataForm.value_type == 2">
@@ -92,18 +125,54 @@ export default {
     },
   },
   data() {
+    const validateBucketName = (rule, value, callback) => {
+      if (this.dataForm.value_type == 5) {
+        const regex = /^\d+$/;
+        if (!regex.test(value)) {
+          callback(new Error("请输入整数"));
+        } else {
+          callback();
+        }
+      } else if (this.dataForm.value_type == 4) {
+        const regex = /^(?:100|\d{1,2}(?:\.\d+)?)$/;
+        if (!regex.test(value)) {
+          callback(new Error("请输入有效的百分数(0-100%)"));
+        } else {
+          callback();
+        }
+      } else if (this.dataForm.value_type == 3) {
+        const regex = /^\d+(\.\d+)?$/;
+        if (!regex.test(value)) {
+          callback(new Error("请输入有效的小数"));
+        } else {
+          callback();
+        }
+      }
+    };
     return {
       activeName: "base",
       currentCategory: [],
       valueTypeList: [
         {
           value: 1,
-          name: "文本内容",
+          name: "输入框",
         },
         {
           value: 2,
           name: "下拉选择",
         },
+        {
+          value: 3,
+          name: "小数",
+        },
+        {
+          value: 4,
+          name: "百分比",
+        },
+        {
+          value: 5,
+          name: "整数",
+        },
       ],
       allCategories: [],
       typeList: [
@@ -140,6 +209,12 @@ export default {
           label: "已停用",
         },
       ],
+      dataRule: {
+        value: [
+          { required: true, message: "请输入取值", trigger: "blur" },
+          { validator: validateBucketName, trigger: "blur" },
+        ],
+      },
     };
   },
 
@@ -149,42 +224,51 @@ export default {
   methods: {
     resetForm() {
       // 重置所有表单字段
-      this.dataForm = { type: 1, value_type: 1,status:5}; // 或者设置为初始值
+      this.dataForm = { type: 1, value_type: 1, status: 5 }; // 或者设置为初始值
       // 如果使用 el-form,可以调用其 resetFields 方法
       this.$refs.dataFormRef.resetFields();
     },
     //保存更新
     btnSave(e) {
       let _this = this;
-
-      if (_this.dataForm.value_type == 1) {
-        _this.dataForm.value_item = _this.dataForm.value;
-      }
-      _this.dataForm.code=_this.dataForm.name
-      if (_this.dataForm.id > 0) {
-        updateParams(_this.dataForm).then((res) => {
-          if (res.status != 200) return;
-          _this.dataForm = {
-            type: 1,
-            value_type: 1,
-            status:5
-          };
-          _this.$alert("信息更新成功");
-          _this.$emit("onClose");
-        });
-      } else {
-        createParams(_this.dataForm).then((res) => {
-          if (res.status != 200) return;
-          _this.dataForm = {
-            type: 1,
-            value_type: 1,
-            status:5
-          };
-          _this.$alert("信息创建成功");
+      _this.$refs.creatRef.validate((valid) => {
+        if (valid) {
+          if (_this.dataForm.value_type == 1) {
+            _this.dataForm.value_item = _this.dataForm.value;
+          } else if (_this.dataForm.value_type == 4) {
+            // 将输入值转换为数字
+            const num = parseFloat(_this.dataForm.value);
+            // 格式化为百分数,保留两位小数
+            const percentage = num.toFixed(2) + "%";
+            _this.dataForm.value = percentage;
+          }
+          _this.dataForm.code = _this.dataForm.name;
+          if (_this.dataForm.id > 0) {
+            updateParams(_this.dataForm).then((res) => {
+              if (res.status != 200) return;
+              _this.dataForm = {
+                type: 1,
+                value_type: 1,
+                status: 5,
+              };
+              _this.$alert("信息更新成功");
+              _this.$emit("onClose");
+            });
+          } else {
+            createParams(_this.dataForm).then((res) => {
+              if (res.status != 200) return;
+              _this.dataForm = {
+                type: 1,
+                value_type: 1,
+                status: 5,
+              };
+              _this.$alert("信息创建成功");
+              _this.$emit("onClose");
+            });
+          }
           _this.$emit("onClose");
-        });
-      }
-      _this.$emit("onClose");
+        }
+      });
     },
 
     //产品详情

+ 139 - 1
src/views/document/com/view.vue

@@ -268,6 +268,89 @@ export default {
 
       try {
         let contentClone = this.$refs.content.cloneNode(true);
+        /* const templateTextareas =
+          contentClone.querySelectorAll(".template-textarea");
+
+        if (templateTextareas.length > 0) {
+          // 创建目录页
+          const tocPage = document.createElement("div");
+          tocPage.className = "toc-page";
+          tocPage.innerHTML = `
+    <div style="page-break-before: always; page-break-after: always; height: 100vh; display: flex; flex-direction: column; justify-content: center;">
+      <h1 style="text-align: center; margin-bottom: 40px;">目录</h1>
+      <div id="toc" style="margin: 0 auto; min-width: 600px;"></div>
+    </div>
+  `;
+
+          // 在第一个 template-textarea 之后插入目录页
+          templateTextareas[0].parentNode.insertBefore(
+            tocPage,
+            templateTextareas[0].nextSibling
+          );
+
+          // 生成目录内容
+          let tocHtml = '<div style="column-count: 1; column-gap: 40px;">';
+          templateTextareas.forEach((textarea, index) => {
+            const title = textarea.querySelector("h1, h2, h3, h4, h5, h6");
+            if (title) {
+              tocHtml += `
+                <p style="margin: 0; padding: 5px 0;">
+                  <span style="float: left;">${title.textContent}</span>
+                  <span style="float: right;">${index + 1}</span>
+                  <span style="display: block; overflow: hidden; height: 1.2em; border-bottom: 1px dotted black;"></span>
+                </p>
+              `;
+              title.id = `section-${index + 1}`;
+            }
+          });
+          tocHtml += "</div>";
+
+          // 将目录内容插入到目录页中
+          contentClone.querySelector("#toc").innerHTML = tocHtml;
+        } */
+        const templateTextareas =
+          contentClone.querySelectorAll(".template-textarea");
+
+        if (templateTextareas.length > 0) {
+          // 创建空白页和目录页
+          const blankPage = document.createElement("div");
+          blankPage.className = "blank-page";
+          blankPage.innerHTML = '<div style="page-break-after: always;"></div>';
+
+          const tocPage = document.createElement("div");
+          tocPage.className = "toc-page";
+          tocPage.innerHTML = `
+            <div class="toc-content">
+              <h1 style="text-align: center; margin-bottom: 40px;">目录</h1>
+              <div id="toc"></div>
+            </div>
+          `;
+
+          // 在第一个 template-textarea 之后插入空白页和目录页
+          templateTextareas[0].parentNode.insertBefore(
+            tocPage,
+            templateTextareas[0].nextSibling
+          );
+          templateTextareas[0].parentNode.insertBefore(blankPage, tocPage);
+
+          // 生成目录内容
+          let tocHtml = "";
+          templateTextareas.forEach((textarea, index) => {
+            const title = textarea.querySelector("h1, h2, h3, h4, h5, h6");
+            if (title) {
+              tocHtml += `
+                <div class="toc-item">
+                  <span class="toc-text">${title.textContent}</span>
+                  <span class="toc-page-num">${index + 2}</span>
+                </div>
+              `;
+              title.id = `section-${index + 2}`;
+            }
+          });
+
+          // 将目录内容插入到目录页中
+          contentClone.querySelector("#toc").innerHTML = tocHtml;
+        }
 
         contentClone.querySelectorAll('input[type="text"]').forEach((input) => {
           const span = document.createElement("span");
@@ -275,7 +358,62 @@ export default {
           input.parentNode.replaceChild(span, input);
         });
 
-        let contentData = `<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><p class="header1"></p> ${contentClone.innerHTML} </body></html>`;
+        let contentData = `<!DOCTYPE html><html><head><meta charset="UTF-8"><style>
+      @media print {
+         body {
+                margin: 0;
+                padding: 0;
+              }
+              .template-textarea {
+                page-break-after: always;
+              }
+              .toc-page {
+                page-break-before: always;
+                page-break-after: always;
+              }
+              .toc-content {
+                height: 100vh;
+                display: flex;
+                flex-direction: column;
+                justify-content: flex-start;
+                padding-top: 100px;
+              }
+              #toc {
+                margin: 0 auto;
+                max-width: 600px;
+              }
+              .toc-item {
+                display: flex;
+                justify-content: space-between;
+                margin-bottom: 10px;
+              }
+              .toc-text {
+                margin-right: 10px;
+              }
+              .toc-page-num {
+                flex-shrink: 0;
+              }
+              .toc-item::after {
+                content: "";
+                border-bottom: 1px dotted black;
+                flex-grow: 1;
+                order: 2;
+                margin: 0 5px;
+                position: relative;
+                top: -5px;
+              }
+              .toc-text {
+                order: 1;
+              }
+              .toc-page-num {
+                order: 3;
+              }
+              /* 移除 WPS 自动添加的目录引用框 */
+              .TOC {
+                display: none !important;
+              }
+      }
+    </style></head><body><p class="header1"></p>${contentClone.innerHTML}</body></html>`;
         contentData = contentData
           .replaceAll("<table ", `<table style="border-collapse: collapse;" `)
           .replaceAll("<td>", `<td style="border: 1px solid black;">`);

+ 3 - 3
src/views/document/components/dataList.vue

@@ -180,13 +180,13 @@ export default {
 
     //编辑
     btnEdit(e) {
-      let _this = this;
+    /*   let _this = this;
       let a = document.createElement("a");
       a.href = "#/document/create?articleId=" + e; // 使用 hash
       a.target = "_blank";
-      a.click();
+      a.click(); */
 
-      // _this.$router.push({path:"/document/create",query:{articleId:e}})
+       this.$router.push({path:"/document/create",query:{articleId:e}})
     },
 
     handleClose() {

+ 3 - 2
src/views/document/components/dataSearch.vue

@@ -99,11 +99,12 @@ export default{
     },
     /* 创建文档 */
     addDocument(){
-      let _this = this;
+      this.$router.push('/document/create');
+     /*  let _this = this;
       let a = document.createElement("a");
       a.href = "#/document/create"; // 使用 hash
       a.target = "_blank";
-      a.click();
+      a.click(); */
     }
   }
 }

+ 1 - 1
src/views/document/create.scss

@@ -113,7 +113,7 @@
         top:60px;
         background:#FFF;
         z-index:999;
-        width: 58.5%;
+        width: 61.5%;
       }
 
       .editor-box{

+ 2 - 1
src/views/document/create.vue

@@ -763,7 +763,8 @@ export default {
       this.showViewForm = true;
     },
     onClose() {
-      window.close();
+      this.$router.back()
+      /* window.close(); */
     },
 
     loadArticle(e) {

+ 2 - 2
src/views/document/temList/components/dataList.vue

@@ -174,13 +174,13 @@ export default {
 
     //编辑
     btnEdit(e) {
-      let _this = this;
+     /*  let _this = this;
       let a = document.createElement("a");
       a.href = "#/document/create?articleId=" + e;
       a.target = "_blank";
       a.click();
 
-      // _this.$router.push({path:"/document/create",query:{articleId:e}})
+      // _ */this.$router.push({path:"/document/create",query:{articleId:e}})
     },
 
     handleClose() {

+ 3 - 2
src/views/document/temList/components/dataSearch.vue

@@ -99,11 +99,12 @@ export default{
     },
     /* 创建模版 */
     addDocument(){
-      let _this = this;
+      /* let _this = this;
       let a = document.createElement("a");
       a.href = "#/document/create"; // 使用 hash
       a.target = "_blank";
-      a.click();
+      a.click(); */
+      this.$router.push('/document/create');
     }
   }
 }

+ 145 - 24
src/views/knowledgeMenu/category/components/dataList.vue

@@ -7,39 +7,65 @@
       empty-text="没有模板信息"
     >
       <el-table-column prop="id" label="ID" align="center" width="80" />
-      <el-table-column prop="object_name" label="文件名称" align="center" />
-      <el-table-column prop="size" label="分块数" align="center" />
-      <el-table-column prop="last_modified" label="上传时间" align="center" />
-      <el-table-column prop="" label="解析方法" align="center" />
-      <el-table-column prop="createTime" label="启用" align="center" />
-      <el-table-column prop="status" label="解析状态" align="center">
+      <el-table-column prop="name" label="文件名称" align="center">
         <template #default="scope">
+          <span @click="getName(scope.row)">{{ scope.row.name }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="token_num" label="分块数" align="center" />
+      <el-table-column prop="create_time" label="上传时间" align="center" />
+      <!-- <el-table-column prop="" label="解析方法" align="center" /> -->
+      <el-table-column prop="createTime" label="启用" align="center"
+        ><template #default="scope">
           <div v-if="scope.row.status == 5">启用</div>
           <div v-if="scope.row.status == 6">停用</div>
+        </template></el-table-column
+      >
+      <el-table-column prop="run" label="解析状态" align="center">
+        <template #default="scope">
+          <div v-if="scope.row.run == 0">未解析</div>
+          <div v-if="scope.row.run == 1">解析中</div>
+          <div v-if="scope.row.run == 3">成功</div>
+          <div v-if="scope.row.run == 4">失败</div>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="300"><!-- editWidth() -->
+      <el-table-column label="操作" align="center" width="500"
+        ><!-- editWidth() -->
         <template #default="scope">
           <div class="btns">
             <el-button
               type="primary"
               size="small"
               v-if="allowEdit"
-              @click="btnEdit(scope.row.object_name)"
+              @click="analysis(scope.row)"
+              >解析</el-button
+            >
+            <el-button
+              type="primary"
+              size="small"
+              v-if="allowEdit"
+              @click="Analytical(scope.row)"
+              >解析方法</el-button
+            >
+            <el-button
+              type="primary"
+              size="small"
+              v-if="allowEdit"
+              @click="btnEdit(scope.row)"
               ><svg-icon icon-class="edit" />修改文件名</el-button
             >
             <el-button
               type="primary"
               size="small"
               v-if="allowEdit"
-              @click="btnDown(scope.row.object_name)"
+              @click="btnDown(scope.row.name)"
               ><svg-icon icon-class="edit" />下载</el-button
             >
             <el-button
               type="danger"
               size="small"
               v-if="allowDelete"
-              @click="btnDelete(scope.row.object_name)"
+              @click="btnDelete(scope.row.id)"
               ><svg-icon icon-class="delete" />删除</el-button
             >
           </div>
@@ -78,11 +104,56 @@
         <el-button type="primary" @click="submitBuck">确 定</el-button>
       </span>
     </el-dialog>
+
+    <!-- 解析方法 -->
+    <el-dialog
+      title="解析方法"
+      :visible.sync="anaDialogVisible"
+      width="30%"
+      :before-close="handleAnalClose"
+    >
+      <el-form
+        :model="analForm"
+        ref="analRef"
+        label-position="top"
+        :rules="analRules"
+      >
+        <el-form-item label="页码范围:" prop="new_name">
+          <el-input-number
+            v-model="analForm.start_page"
+            controls-position="right"
+            :min="1"
+          ></el-input-number>
+          <el-input-number
+            v-model="analForm.end_page"
+            controls-position="right"
+            :min="1"
+            style="margin-left: 10px"
+          ></el-input-number>
+        </el-form-item>
+        <el-form-item label="块token数">
+          <div class="block">
+            <el-slider v-model="analForm.token_num" :max="2048" show-input>
+            </el-slider>
+          </div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleAnalClose">取 消</el-button>
+        <el-button type="primary" @click="submitAnal">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { getBucketContents, deleteFile, nameGetUrl,renameFile } from "@/api/knowledge";
+import {
+  getBucketContents,
+  deleteFile,
+  nameGetUrl,
+  renameFile,
+  analysis,
+} from "@/api/knowledge";
 export default {
   props: {
     queryForm: {
@@ -91,7 +162,7 @@ export default {
         return {
           page: 1,
           pageSize: 10,
-          bucket_name: "",
+          id: "",
         };
       },
     },
@@ -137,22 +208,64 @@ export default {
       currentData: {},
       dialogVisible: false,
       wordForm: {
-        bucket_name: this.$route.query.bucket_name,
-        object_name: "",
+        document_id: "",
         new_name: "",
       },
       wordRules: {
         new_name: [
           { required: true, message: "请输入文件名称", trigger: "blur" },
-          { validator: validateBucketName, trigger: "blur" },
+          /* { validator: validateBucketName, trigger: "blur" }, */
         ],
       },
+      anaDialogVisible: false,
+      analForm: {
+        start_page: 1,
+        end_page: 10000,
+        token_num: 0,
+      },
+      analRules: {},
     };
   },
   mounted() {
     this.search();
   },
   methods: {
+    /* 跳转页面 */
+    getName(e) {
+      this.$router.push({
+        path: "/knowledge/category/infoList",
+        query: { id: 6 },
+      });
+    },
+    /* 解析 */
+    analysis(e) {
+      analysis({
+        document_id: e.id,
+        start_page: 0,
+        end_page: 1000,
+        max_tokens: e.token_num,
+      }).then((res) => {});
+    },
+    handleAnalClose() {
+      this.anaDialogVisible = false;
+    },
+    /* 确认 */
+    submitAnal() {
+      this.dataList.map((el) => {
+        if (this.analForm.id == el.id) {
+          el.start_page = this.analForm.start_page;
+          el.end_page = this.analForm.end_page;
+          el.token_num=this.analForm.token_num
+        }
+      });
+
+    },
+    /* 解析方法 */
+    Analytical(e) {
+      this.analForm.id = e.id;
+      this.analForm.token_num = e.token_num;
+      this.anaDialogVisible = true;
+    },
     editWidth() {
       if (this.allowDelete && this.allowEdit) {
         return 200;
@@ -179,8 +292,7 @@ export default {
     btnDelete(e) {
       let _this = this;
       let par = {
-        bucket_name: this.$route.query.bucket_name,
-        object_name: e,
+        document_id: e,
       };
       _this
         .$confirm("您是否确认删除该记录?", "提示", {
@@ -190,6 +302,8 @@ export default {
         })
         .then((res) => {
           deleteFile(par).then((res) => {
+            if (res.status !== 200) return;
+            _this.$message.success(res.data);
             _this.search();
           });
         })
@@ -207,7 +321,8 @@ export default {
     },
     /* 修改文件名 */
     btnEdit(e) {
-      this.wordForm.object_name = e;
+      this.wordForm.new_name = e.name;
+      this.wordForm.document_id = e.id;
       this.dialogVisible = true;
     },
     /* 提交 */
@@ -216,9 +331,12 @@ export default {
         if (valid) {
           renameFile(this.wordForm).then((res) => {
             if (res.status !== 200) return;
-            this.search()
+            this.search();
             this.dialogVisible = false;
-            this.wordForm = {};
+            this.wordForm = {
+              new_name: "",
+              document_id: "",
+            };
           });
         } else {
           this.$message.error("请填写文档名称");
@@ -229,8 +347,7 @@ export default {
     //编辑
     btnDown(e) {
       nameGetUrl({
-        bucket_name: this.$route.query.bucket_name,
-        object_name: e,
+        name: e,
       })
         .then((res) => {
           if (res.status !== 200) {
@@ -284,8 +401,12 @@ export default {
       getBucketContents(_this.queryForm)
         .then((res) => {
           if (res.status !== 200) return;
-          _this.dataList = res.data.files;
-          _this.pageTotal = res.data.total_count;
+          res.data.documents.map((el) => {
+            el.start_page = this.analForm.start_page;
+            el.end_page = this.analForm.end_page;
+          });
+          _this.dataList = res.data.documents;
+          _this.pageTotal = res.data.pagination.total_count;
           _this.loading = false; // Set loading to false after data is processed
         })
         .catch(() => {

+ 11 - 8
src/views/knowledgeMenu/category/components/dataSearch.vue

@@ -30,9 +30,9 @@
         </el-form-item> -->
 
       <el-form-item>
-        <el-button type="primary" @click="onSubmit">
+        <!-- <el-button type="primary" @click="onSubmit">
           <svg-icon icon-class="search" /> 搜索</el-button
-        >
+        > -->
       </el-form-item>
       <el-form-item>
         <el-popover placement="bottom" trigger="click">
@@ -79,7 +79,7 @@
             class="upload-demo"
             drag
             :action="url + '/minio/post'"
-            :data="{ bucket_name: queryForm.bucket_name }"
+            :data="{ bucket_id: queryForm.bucket_id,user_id:queryForm.user_id }"
             multiple
             :on-change="handleFileChange"
             :file-list="fileList"
@@ -113,8 +113,8 @@ export default {
         return {
           page: 1,
           pageSize: 10,
-          bucket_name: "",
-          object_name: "",
+          bucket_id: "",
+          user_id:''
         };
       },
     },
@@ -156,7 +156,7 @@ export default {
       creatRules: {
         bucket_name: [
           { required: true, message: "请输入知识库名称", trigger: "blur" },
-          { validator: validateBucketName, trigger: "blur" },
+         /*  { validator: validateBucketName, trigger: "blur" }, */
         ],
       },
       uploadVisible: false,
@@ -168,7 +168,8 @@ export default {
   },
   mounted() {
     this.url = process.env.VUE_APP_BASE_API;
-    this.queryForm.bucket_name = this.$route.query.bucket_name;
+    this.queryForm.bucket_id = this.$route.query.id;
+   this.queryForm.user_id=this.$store.state.user.id
   },
   methods: {
     onCreate(e) {
@@ -176,6 +177,7 @@ export default {
     },
     //搜索
     onSubmit() {
+      console.log(11);
       this.$emit("bindSetQuery", this.$props.queryForm);
     },
     /* 创建模版 */
@@ -209,7 +211,6 @@ export default {
     },
     /*  */
     handleFileChange(file, fileList) {
-      console.log(file);
       this.fileList = fileList.map((f) => f.raw);
     },
 
@@ -218,6 +219,8 @@ export default {
     },
     handleAvatarSuccess(res, file) {
       this.$emit("bindSetQuery", this.$props.queryForm);
+      this.$message.success('添加成功!')
+      this.uploadVisible=false
     },
 
     submitUpload() {

+ 58 - 0
src/views/knowledgeMenu/category/infoList.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="project-search">
+    <div v-for="item in dataList" :key="item.id">
+      <div v-html="item.content"></div>
+    </div>
+  </div>
+</template>
+    
+    <script>
+import { mapGetters } from "vuex";
+import { searchTaskInfo } from "@/api/knowledge";
+export default {
+  components: {},
+  computed: {
+    ...mapGetters(["roleInfo", "authList"]),
+  },
+
+  data() {
+    return {
+      queryForm: {
+        document_id: "",
+      },
+      dataList: [],
+      conten: "",
+    };
+  },
+  mounted() {
+    this.queryForm.document_id = this.$route.query.id;
+    this.search();
+  },
+  methods: {
+    checkAuth(path) {
+      if (this.roleInfo.is_admin == 1) {
+        return true;
+      }
+      /* let auth=this.authList.filter(o=>o.type==999 && o.path==path);
+            if(auth.length>0){
+              return true;
+            } */
+      return true;
+    },
+    search() {
+      searchTaskInfo(this.queryForm).then((res) => {
+        console.log(res);
+        this.dataList = res.data.tasks;
+      });
+    },
+  },
+};
+</script>
+    
+    <style lang="scss">
+.project-search {
+  padding: 30px;
+  font-size: 12px;
+}
+</style>
+    

+ 2 - 2
src/views/knowledgeMenu/category/knowledgeSet.vue

@@ -26,12 +26,12 @@
         queryForm: {
           page: 1,
           pageSize: 10,
-          bucket_name:''
+          bucket_id:''
         },
       };
     },
     mounted(){
-      this.queryForm.bucket_name=this.$route.query.bucket_name
+      this.queryForm.bucket_id=this.$route.query.id
     },
     methods: {
       checkAuth(path) {

+ 28 - 16
src/views/knowledgeMenu/knowledgeList.vue

@@ -32,7 +32,7 @@
     </div>
     <!-- 卡片模块 -->
     <div class="data-list" v-loading="loading" element-loading-text="加载中...">
-      <el-row >
+      <el-row>
         <el-col
           :span="4"
           v-for="(item, index) in buckList"
@@ -42,7 +42,7 @@
         >
           <el-card :body-style="{ padding: '0px' }" shadow="never">
             <div class="card_box">
-              <div class="box_content"  @click="getInfo(item)">
+              <div class="box_content" @click="getInfo(item)">
                 <div class="header">
                   <div class="header_left">
                     <svg-icon
@@ -64,7 +64,7 @@
                   </el-popover>
                 </div>
                 <div class="content">
-                  {{ item.bucket_name }}
+                  {{ item.name }}
                 </div>
                 <div class="footer">
                   <div class="file">
@@ -72,14 +72,14 @@
                       icon-class="word"
                       style="width: 18px; height: 18px; filter: grayscale(100%)"
                     />
-                    {{ item.file_count }}
+                    {{ item.doc_num }}
                   </div>
                   <div class="date">
                     <svg-icon
                       icon-class="date"
                       style="width: 18px; height: 18px; filter: grayscale(100%)"
                     />
-                    {{ item.creation_date }}
+                    {{ item.create_time }}
                   </div>
                 </div>
               </div>
@@ -112,7 +112,7 @@
 </template>
   
 <script>
-import { listBuckets, createBucket } from "@/api/knowledge";
+import { listBuckets, createBucket, deleteBucket } from "@/api/knowledge";
 import { mapGetters } from "vuex";
 
 export default {
@@ -122,7 +122,11 @@ export default {
     const validateBucketName = (rule, value, callback) => {
       const regex = /^[a-z0-9-]{3,63}$/;
       if (!regex.test(value)) {
-        callback(new Error('名称必须在 3-63 个字符之间,只能包含小写字母、数字和连字符'));
+        callback(
+          new Error(
+            "名称必须在 3-63 个字符之间,只能包含小写字母、数字和连字符"
+          )
+        );
       } else {
         callback();
       }
@@ -139,7 +143,7 @@ export default {
       creatRules: {
         bucket_name: [
           { required: true, message: "请输入知识库名称", trigger: "blur" },
-          { validator: validateBucketName, trigger: 'blur' }
+          { validator: validateBucketName, trigger: "blur" },
         ],
       },
     };
@@ -155,7 +159,8 @@ export default {
     /* 搜索创建模块 */
     onCreate(e) {
       this.creatForm = {
-        bucket_name:''
+        bucket_name: "",
+        user_id: this.$store.state.user.id,
       };
       this.dialogVisible = true;
     },
@@ -166,7 +171,7 @@ export default {
     //搜索
     onSubmit() {
       this.loading = true;
-      listBuckets({})
+      listBuckets({ user_id: this.$store.state.user.id })
         .then((res) => {
           if (res.status !== 200) return;
           res.data.map((el) => {
@@ -186,9 +191,12 @@ export default {
         type: "warning",
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
+          deleteBucket({ bucket_id: val.id }).then((res) => {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.onSubmit();
           });
         })
         .catch(() => {
@@ -219,9 +227,13 @@ export default {
       });
     },
     /* 跳转到详细页面 */
-    getInfo(item){
-      this.$router.push({path:'/knowledge/category/knowledgeSet',query:{bucket_name:item.bucket_name}});
-    }
+    getInfo(item) {
+      console.log(item.id);
+      this.$router.push({
+        path: "/knowledge/category/knowledgeSet",
+        query: { id: item.id },
+      });
+    },
   },
 };
 </script>

+ 60 - 50
src/views/profile/index.vue

@@ -1,69 +1,79 @@
 <template>
-  <div class="app-container">
-
-      <el-row :gutter="20">
-        <el-col :span="6" :xs="24">
-          <user-card :dataForm="dataForm" @onUploadHeader="onUploadHeader"/>
-        </el-col>
-        <el-col :span="18" :xs="24">
-          <el-card>
-            <el-tabs v-model="activeTab">
-
-              <el-tab-pane label="基本信息" name="account">
-                <account :dataForm="dataForm" />
-              </el-tab-pane>
-              <el-tab-pane label="修改密码" name="pasword">
-                <PasswordConfirm  />
-              </el-tab-pane>
-            </el-tabs>
-          </el-card>
-        </el-col>
-      </el-row>
-
+  <div class="app-container" v-loading="loading">
+    <el-row :gutter="20">
+      <el-col :span="6" :xs="24">
+        <user-card :dataForm="dataForm" @onUploadHeader="onUploadHeader" />
+      </el-col>
+      <el-col :span="18" :xs="24">
+        <el-card>
+          <el-tabs v-model="activeTab">
+            <el-tab-pane label="基本信息" name="account">
+              <account :dataForm="dataForm" />
+            </el-tab-pane>
+            <el-tab-pane label="修改密码" name="pasword">
+              <PasswordConfirm />
+            </el-tab-pane>
+          </el-tabs>
+        </el-card>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import UserCard from './components/UserCard'
-import PasswordConfirm from './components/PasswordConfirm'
-import Account from './components/Account'
-import {getCurrentUserInfo } from "@/api/api"
-import {updateProfile } from "@/api/admin"
+import { mapGetters } from "vuex";
+import UserCard from "./components/UserCard";
+import PasswordConfirm from "./components/PasswordConfirm";
+import Account from "./components/Account";
+import { getCurrentUserInfo } from "@/api/api";
+import { updateProfile } from "@/api/admin";
 export default {
-  name: 'Profile',
-  components: { UserCard, PasswordConfirm,Account },
+  name: "Profile",
+  components: { UserCard, PasswordConfirm, Account },
   data() {
     return {
+      loading: false,
       user: {},
-      activeTab: 'account',
-      dataForm:{
-        header:this.avatar,
-        code:'',
-      }
-    }
+      activeTab: "account",
+      dataForm: {
+        header: this.avatar,
+        code: "",
+      },
+    };
   },
   created() {
-    this.initUser()
+    this.initUser();
   },
   methods: {
     initUser() {
-      let _this=this;
-      getCurrentUserInfo({}).then(res=>{
-        if(res.status!=200)return;
-        _this.dataForm=res.data;
-      })
+      let _this = this;
+      this.loading = true;
+      getCurrentUserInfo({})
+        .then((res) => {
+          if (res.status != 200) return;
+          _this.dataForm = res.data;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
-    onUploadHeader(e){
-        this.dataForm.header=e;
-        updateProfile(this.dataForm).then(res=>{
-          if(res.status!=200){
-            this.$message(res.message);return;
+
+    onUploadHeader(e) {
+      this.dataForm.header = e;
+      this.loading = true;
+      updateProfile(this.dataForm)
+        .then((res) => {
+          if (res.status != 200) {
+            this.$message(res.message);
+            return;
           }
-          this.$message("用户头像更新成功")
-          location.reload()
+          this.$message("用户头像更新成功");
+          location.reload();
         })
+        .finally(() => {
+          this.loading = false;
+        });
     },
-  }
-}
+  },
+};
 </script>

+ 2 - 1
src/views/template/category/components/dataInfo.vue

@@ -80,7 +80,7 @@ export default {
       dataForm: {
         id: 0,
         name: "",
-        parent_id: "",
+        parent_id: 0,
         intro: "",
         status: 5,
       },
@@ -159,6 +159,7 @@ export default {
       getTemplateCategoryInfo(par).then((res) => {
         if (!res) return;
         if (res.status != 200) return;
+        res.data.parent_id=Number( res.data.parent_id)
         _this.dataForm = res.data;
       });
     },

+ 3 - 2
src/views/template/components/dataList.vue

@@ -141,11 +141,12 @@
 
       //编辑
       btnEdit(e){
-        let _this=this;
+       /*  let _this=this;
         var a = document.createElement('a');
         a.href="#/document/create?templateId="+e
         a.target="_blank";
-        a.click();
+        a.click(); */
+        this.$router.push({path:"/document/create",query:{templateId:e}})
       },
 
       handleClose(){

+ 3 - 2
src/views/template/components/dataSearch.vue

@@ -100,11 +100,12 @@ export default{
       /* this.dialogVisible=true; */
      /*  const url = this.$router.resolve({ path: 'new' }).href;
       window.open(url, '_blank'); */
-      let _this=this;
+      /* let _this=this;
         var a = document.createElement('a');
         a.href="#/document/create"
         a.target="_blank";
-        a.click();
+        a.click(); */
+        this.$router.push('/document/create');
     },
 
     //搜索

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません