diff --git a/gyxtp/src/view/small.vue b/gyxtp/src/view/small.vue index a824afc..fb6fe04 100644 --- a/gyxtp/src/view/small.vue +++ b/gyxtp/src/view/small.vue @@ -188,7 +188,7 @@ export default { defaultNodeColor: 'rgba(255, 255, 255, 0.6)', defaultNodeBorderWidth: 1, defaultNodeBorderColor: 'rgba(255, 255, 255, 0.3)', - defaultNodeFontColor: '#1b7702', + defaultNodeFontColor: '#fff', defaultNodeShape: 0, defaultNodeWidth: 100, defaultNodeHeight: 100, @@ -268,6 +268,7 @@ export default { defaultNodeShape: 0, defaultLineFontSize: 80, defaultNodeBorderWidth: 0, + defaultNodeFontColor: '#ffffff', defaultLineColor: 'rgb(255,255,255)', defaultNodeColor: 'rgba(0, 206, 209, 1)', lineLengths: 100, @@ -424,11 +425,24 @@ export default { if (res.nodes[i].type=="keyword" && res.nodes[i].text!=this.getpoinName){ continue } - let t_data = { - id:res.nodes[i].id, - text:res.nodes[i].text, - color:this.getColor(res.nodes[i].type), + let t_data ={} + if (res.nodes[i].type=="keyword"){ + t_data = { + id:res.nodes[i].id, + text:res.nodes[i].text, + color:this.getColor(res.nodes[i].type), + fontColor:'#fff' + } + }else{ + t_data = { + id:res.nodes[i].id, + text:res.nodes[i].text, + color:this.getColor(res.nodes[i].type), + fontColor:'#000' + } } + + nodes.push(t_data) } // console.log(res.links) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java index 0ab530e..41fb2a4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java @@ -31,6 +31,7 @@ import com.ruoyi.system.domain.ZhyPoint; import com.ruoyi.system.service.IZhyPointService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** @@ -56,6 +57,22 @@ public class ZhyPointController extends BaseController @Autowired SysPointMapper sysPointMapper; + + @PostMapping("/insertPoint") + public AjaxResult insertRelationByFile(MultipartFile file) throws Throwable { + // 1. 校验文件是否为空 + if (file.isEmpty()) { + return AjaxResult.error("上传的文件为空"); + } +// 2. 校验是否为 CSV 文件 + String fileName = file.getOriginalFilename(); + if (fileName == null || !fileName.toLowerCase().endsWith(".csv")) { + return AjaxResult.error("仅支持上传 CSV 格式的文件"); + } + return AjaxResult.success(); + } + + /** * 查询知识点管理列表 */ diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java index 62b5d3b..c52851b 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java @@ -1917,7 +1917,7 @@ public class DocApiController extends BaseController { break; } System.out.println("将在 10 分钟后重试... (第 " + retryCount + " 次重试)"); - Thread.sleep(10 * 60 * 1000); // 等待 10 分钟后重试 + Thread.sleep(2 * 60 * 1000); // 等待 10 分钟后重试 continue; // 重要:跳回循环开头,重新执行整个流程 } diff --git a/ruoyi-ui/src/views/system/SysPoint/index.vue b/ruoyi-ui/src/views/system/SysPoint/index.vue index ecdeaca..3bfb4ab 100644 --- a/ruoyi-ui/src/views/system/SysPoint/index.vue +++ b/ruoyi-ui/src/views/system/SysPoint/index.vue @@ -74,6 +74,10 @@ type="danger" plain style="float: left" size="mini" @click="deletAllInfo"> 一键清除 + 导入文献 + + @@ -160,6 +164,17 @@ export default { name: "SysPoint", data() { return { + upload1: { + tip: "准备上传文件", + open: false, + title: "", + oprnIno: false, + isUploading: false, + updateSupport: 0, + headers: {Authorization: "Bearer " + getToken()}, + url: "http://localhost:10031/system/SysPoint/insertPoint" + // url: "http://127.0.0.1:10031/system/fileManage/addFile" + }, typeOptions: [ { label: '作者', value: 'author' }, { label: '机构', value: 'agency' }, @@ -202,6 +217,10 @@ export default { this.getList(); }, methods: { + handleImportRelation() { + this.upload1.title = "导入文献"; + this.upload1.open = true; + }, deletAllInfo(){ this.$modal.confirm('是否确认删除全部的数据项?').then(function() { diff --git a/ruoyi-ui/src/views/system/create/index.vue b/ruoyi-ui/src/views/system/create/index.vue index ae4722e..b2420ad 100644 --- a/ruoyi-ui/src/views/system/create/index.vue +++ b/ruoyi-ui/src/views/system/create/index.vue @@ -579,7 +579,11 @@ export default { selected:this.selectedIds4, searchItems:this.searchItems4, userId:this.userId, - url:this.sourceUrl + url:{ + name:this.selectedSource, + value:this.sourceUrl + + } } if(this.selectedIds4.length>0){ await getIsTask().then(async res=>{