LAPTOP-1LHD2FP6\joeny 5 месяцев назад
Родитель
Сommit
342a8867cc
6 измененных файлов с 864 добавлено и 829 удалено
  1. 1 1
      package.json
  2. 246 241
      src/api/knowledge.js
  3. 12 18
      src/api/project.js
  4. 265 278
      src/views/project/ProjectInput.vue
  5. 324 290
      src/views/project/components/dataList.vue
  6. 16 1
      vue.config.js

+ 1 - 1
package.json

@@ -84,7 +84,7 @@
     "@vue/cli-plugin-babel": "4.4.4",
     "@vue/cli-plugin-eslint": "4.4.4",
     "@vue/cli-plugin-unit-jest": "4.4.4",
-    "@vue/cli-service": "4.4.4",
+    "@vue/cli-service": "^4.4.4",
     "@vue/test-utils": "1.0.0-beta.29",
     "autoprefixer": "9.5.1",
     "babel-eslint": "^10.1.0",

+ 246 - 241
src/api/knowledge.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 /* 查询知识库列表 */
 export function listBuckets(data) {
   return request({
-    url: '/kbm/selectBucketInfo',//'/minio/listBuckets',
+    url: '/kbm/selectBucketInfo', // '/minio/listBuckets',
     method: 'post',
     data
   })
@@ -247,238 +247,237 @@ export function configDelete(data) {
   })
 } */
 
-  /* 获取首页知识库分类汇总 */
-
-  export function structure_count(data) {
-    return request({
-      url: '/knowledgebase/structure_count/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 获取首页文档信息 */
-  export function concle_count(data) {
-    return request({
-      url: '/knowledgebase/concle_count/',
-      method: 'post',
-      data
-    })
-  } 
-
-   /* 应用配置类型 */
-   export function application_types(data) {
-    return request({
-      url: '/chatbot/application-types/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 设置为默认 /chatbot/configuration/set_default/ */
-
-  export function set_default(data) {
-    return request({
-      url: '/chatbot/configuration/set_default/',
-      method: 'post',
-      data
-    })
-  } 
-
-    /* 获取默认id值 */
-    export function get_default(data) {
-      return request({
-        url: 'chatbot/configuration/get_default/',
-        method: 'get',
-        data
-      })
-    } 
-
-    /* 批量删除 */
-
-  export function delDocumentList(data) {
-    return request({
-      url: 'kbm/delDocumentList',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 获取GPU数据 /machines/gpu-info/*/
-
-  export function gpu_info(data) {
-    return request({
-      url: '/machines/gpu-info/',
-      method: 'get',
-      data
-    })
-  } 
-
-
-  /* 列表 literature-data/list/ */
-
-  export function GET_list(data) {
-    return request({
-      url: 'literature-data/list/',
-      method: 'post',
-      data
-    })
-  } 
-  
-  /* /literature-data/sync/ */
-
-  export function GET_sync(data) {
-    return request({
-      url: '/literature-data/sync/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* mq利用率 */
-
-  export function GET_Rbq(data) {
-    return request({
-      url: '/rabbitmq/info/',
-      method: 'get',
-      data
-    })
-  } 
-
-  /* 获取解析进度 */
-
-  export function getdocpro(data) {
-    return request({
-      url: '/kbm/getdocpro',
-      method: 'post',
-      data
-    })
-  } 
-  /* 单个处理任务监听 */
-  export function resultTask(data) {
-    return request({
-      url: `tasks/result/?document_id=${data}`,
-      method: 'get',
-    })
-  } 
-  /* 文献处理 */
-  export function literResult(data) {
-    return request({
-      url: `tasks/literResult/?literature_id=${data}`,
-      method: 'get',
-    })
-  } 
-
-  /* 获取解析结果  */
-  
-  export function getDetail(data) {
-    return request({
-      url: '/literature-data/detail/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 新增标签 */
-
-  export function add_tags(data) {
-    return request({
-      url: '/literature-tags/add_tags/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 获取标签 */
-
-  export function get_literature_tags(data) {
-    return request({
-      url: '/literature-tags/get_literature_tags/',
-      method: 'get',
-      data
-    })
-  } 
-
-  /* 删除 */
-
-  export function remove_tags(data) {
-    return request({
-      url: '/literature-tags/remove_tags/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 搜索 */
-
-  export function search_tags(data) {
-    return request({
-      url: '/literature-tags/search_tags/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 编辑  */
-
-  export function edit_tags(data) {
-    return request({
-      url: '/literature-tags/edit_tags/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 文献搜索 */
-
-  export function search(data) {
-    return request({
-      url: '/literature-data/search/',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 保存配置 */
-
-  export function saveConfig(data) {
-    return request({
-      url: '/project-prompt/save',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 获取配置列表 */
-  export function listProConfig(data) {
-    return request({
-      url: '/project-prompt/list',
-      method: 'get',
-      data
-    })
-  } 
-
-  /* 更新配置 project-prompt/update*/
-
-  export function updateConfig(data) {
-    return request({
-      url: 'project-prompt/update',
-      method: 'post',
-      data
-    })
-  } 
-
-  /* 删除配置 */
-
-  export function deleteConfig(data) {
-    return request({
-      url: 'project-prompt/delete',
-      method: 'post',
-      data
-    })
-  } 
-
-/*批量解析新   kbm/analysisPro*/
+/* 获取首页知识库分类汇总 */
+
+export function structure_count(data) {
+  return request({
+    url: '/knowledgebase/structure_count/',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取首页文档信息 */
+export function concle_count(data) {
+  return request({
+    url: '/knowledgebase/concle_count/',
+    method: 'post',
+    data
+  })
+}
+
+/* 应用配置类型 */
+export function application_types(data) {
+  return request({
+    url: '/chatbot/application-types/',
+    method: 'post',
+    data
+  })
+}
+
+/* 设置为默认 /chatbot/configuration/set_default/ */
+
+export function set_default(data) {
+  return request({
+    url: '/chatbot/configuration/set_default/',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取默认id值 */
+export function get_default(data) {
+  return request({
+    url: 'chatbot/configuration/get_default/',
+    method: 'get',
+    data
+  })
+}
+
+/* 批量删除 */
+
+export function delDocumentList(data) {
+  return request({
+    url: 'kbm/delDocumentList',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取GPU数据 /machines/gpu-info/*/
+
+export function gpu_info(data) {
+  return request({
+    url: '/machines/gpu-info/',
+    method: 'get',
+    data
+  })
+}
+
+/* 列表 literature-data/list/ */
+
+export function GET_list(data) {
+  return request({
+    url: 'literature-data/list/',
+    method: 'post',
+    data
+  })
+}
+
+/* /literature-data/sync/ */
+
+export function GET_sync(data) {
+  return request({
+    url: '/literature-data/sync/',
+    method: 'post',
+    data
+  })
+}
+
+/* mq利用率 */
+
+export function GET_Rbq(data) {
+  return request({
+    url: '/rabbitmq/info/',
+    method: 'get',
+    data
+  })
+}
+
+/* 获取解析进度 */
+
+export function getdocpro(data) {
+  return request({
+    url: '/kbm/getdocpro',
+    method: 'post',
+    data
+  })
+}
+/* 单个处理任务监听 */
+export function resultTask(data) {
+  return request({
+    url: `tasks/result/?document_id=${data}`,
+    method: 'get'
+  })
+}
+/* 文献处理 */
+export function literResult(data) {
+  return request({
+    url: `tasks/literResult/?literature_id=${data}`,
+    method: 'get'
+  })
+}
+
+/* 获取解析结果  */
+
+export function getDetail(data) {
+  return request({
+    url: '/literature-data/detail/',
+    method: 'post',
+    data
+  })
+}
+
+/* 新增标签 */
+
+export function add_tags(data) {
+  return request({
+    url: '/literature-tags/add_tags/',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取标签 */
+
+export function get_literature_tags(data) {
+  return request({
+    url: '/literature-tags/get_literature_tags/',
+    method: 'get',
+    data
+  })
+}
+
+/* 删除 */
+
+export function remove_tags(data) {
+  return request({
+    url: '/literature-tags/remove_tags/',
+    method: 'post',
+    data
+  })
+}
+
+/* 搜索 */
+
+export function search_tags(data) {
+  return request({
+    url: '/literature-tags/search_tags/',
+    method: 'post',
+    data
+  })
+}
+
+/* 编辑  */
+
+export function edit_tags(data) {
+  return request({
+    url: '/literature-tags/edit_tags/',
+    method: 'post',
+    data
+  })
+}
+
+/* 文献搜索 */
+
+export function search(data) {
+  return request({
+    url: '/literature-data/search/',
+    method: 'post',
+    data
+  })
+}
+
+/* 保存配置 */
+
+export function saveConfig(data) {
+  return request({
+    url: '/project-prompt/save',
+    method: 'post',
+    data
+  })
+}
+
+/* 获取配置列表 */
+export function listProConfig(data) {
+  return request({
+    url: '/project-prompt/list',
+    method: 'get',
+    data
+  })
+}
+
+/* 更新配置 project-prompt/update*/
+
+export function updateConfig(data) {
+  return request({
+    url: 'project-prompt/update',
+    method: 'post',
+    data
+  })
+}
+
+/* 删除配置 */
+
+export function deleteConfig(data) {
+  return request({
+    url: 'project-prompt/delete',
+    method: 'post',
+    data
+  })
+}
+
+/* 批量解析新   kbm/analysisPro*/
 
 export function analysisPro(data) {
   return request({
@@ -486,8 +485,7 @@ export function analysisPro(data) {
     method: 'post',
     data
   })
-} 
-
+}
 
 /* 文献点位列表 */
 
@@ -539,6 +537,16 @@ export function projectList(data) {
   })
 }
 
+/* 根据模板id搜索输入信息表*/
+export function projectListFromTemplate(data) {
+  return request({
+    url: '/template/get_tech_report_locations',
+    method: 'post',
+    data,
+    timeout: 30000
+  })
+}
+
 /* 新增文献项目 project-input/add*/
 
 export function projectAdd(data) {
@@ -641,7 +649,7 @@ export function doc_status(data) {
 
 export function create_items(data) {
   return request({
-    timeout:100000,
+    timeout: 100000,
     url: 'project-input/create-items',
     method: 'post',
     data
@@ -652,7 +660,7 @@ export function create_items(data) {
 
 export function delete_items(data) {
   return request({
-    timeout:100000,
+    timeout: 100000,
     url: 'project-input/delete-items',
     method: 'post',
     data
@@ -663,7 +671,7 @@ export function delete_items(data) {
 
 export function update_items(data) {
   return request({
-    timeout:100000,
+    timeout: 100000,
     url: 'project-input/update-items',
     method: 'post',
     data
@@ -699,7 +707,6 @@ export function rateScope(data) {
   })
 }
 
-
 /* 获取输入项目位置表  */
 
 export function Templatelist(data) {
@@ -752,7 +759,6 @@ export function projectTemUpdate(data) {
   })
 }
 
-
 /* task/clear/ */
 
 export function endClear(data) {
@@ -793,7 +799,6 @@ export function updateInfo(data) {
   })
 }
 
-
 /* 批量修改部门 */
 export function batchUpdateInfo(data) {
   return request({

+ 12 - 18
src/api/project.js

@@ -8,7 +8,6 @@ export function searchCategory(data) {
   })
 }
 
-
 export function createCategory(data) {
   return request({
     url: '/project/category/create',
@@ -17,8 +16,6 @@ export function createCategory(data) {
   })
 }
 
-
-
 export function updateCategory(data) {
   return request({
     url: '/project/category/update',
@@ -27,7 +24,6 @@ export function updateCategory(data) {
   })
 }
 
-
 export function getCategoryInfo(data) {
   return request({
     url: '/project/category/info',
@@ -36,8 +32,6 @@ export function getCategoryInfo(data) {
   })
 }
 
-
-
 export function deleteCategory(data) {
   return request({
     url: '/project/category/delete',
@@ -46,8 +40,6 @@ export function deleteCategory(data) {
   })
 }
 
-
-
 // 项目相关
 
 export function searchProject(data) {
@@ -58,7 +50,6 @@ export function searchProject(data) {
   })
 }
 
-
 export function createProject(data) {
   return request({
     url: '/project/create',
@@ -67,8 +58,6 @@ export function createProject(data) {
   })
 }
 
-
-
 export function updateProject(data) {
   return request({
     url: '/project/update',
@@ -77,7 +66,6 @@ export function updateProject(data) {
   })
 }
 
-
 export function getProjectInfo(data) {
   return request({
     url: '/project/info',
@@ -86,8 +74,6 @@ export function getProjectInfo(data) {
   })
 }
 
-
-
 export function deleteProject(data) {
   return request({
     url: '/project/delete',
@@ -106,8 +92,6 @@ export function relate(data) {
   })
 }
 
-
-
 /* 获取绑定数据内容  template/searchTemplateList*/
 
 export function searchTemplateList(data) {
@@ -118,6 +102,16 @@ export function searchTemplateList(data) {
   })
 }
 
+/* 获取绑定数据模板列表  template/seachTemplateListNoData*/
+
+export function searchTemplateListNoData(data) {
+  return request({
+    url: '/template/seachTemplateListNoData',
+    method: 'post',
+    data
+  })
+}
+
 /* 阶段 project/getphases */
 
 export function getphases(data) {
@@ -155,6 +149,6 @@ export function exportItems(data) {
     url: '/project-input/export',
     method: 'post',
     data,
-    responseType: 'blob'  // 重要:需要设置responseType为blob以接收文件流
+    responseType: 'blob' // 重要:需要设置responseType为blob以接收文件流
   })
-}
+}

Разница между файлами не показана из-за своего большого размера
+ 265 - 278
src/views/project/ProjectInput.vue


Разница между файлами не показана из-за своего большого размера
+ 324 - 290
src/views/project/components/dataList.vue


+ 16 - 1
vue.config.js

@@ -52,7 +52,15 @@ module.exports = {
       new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {
         resource.request = resource.request.replace(/^node:/, "");
       }),
-    ]
+    ],
+    devtool: 'source-map',
+    stats: {
+      colors: true,
+      modules: true,
+      children: true,
+      chunks: true,
+      chunkModules: true
+    }
   },
   chainWebpack(config) {
     // it can improve the speed of the first screen, it is recommended to turn on preload
@@ -126,5 +134,12 @@ module.exports = {
           config.optimization.runtimeChunk('single')
         }
       )
+
+    config
+      .plugin('friendly-errors')
+      .tap(args => {
+        args[0].clearConsole = false;
+        return args;
+      });
   }
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов