Browse Source

Merge branch 'small-tupu' of http://124.70.32.114:3100/jianzhenyu/Changsha_tupu into hanyuqing

hanyuqing
hanyuqing 5 months ago
parent
commit
58ca6760d0
  1. 27
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java
  2. 5
      ruoyi-ui/src/views/system/SysPoint/index.vue

27
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java

@ -13,6 +13,7 @@ import com.ruoyi.api.service.impl.PointService;
import com.ruoyi.common.utils.Neo4jUtil;
import com.ruoyi.system.domain.ZhyDoc;
import com.ruoyi.system.mapper.SysPointMapper;
import com.ruoyi.system.mapper.Test1Mapper;
import com.ruoyi.system.mapper.ZhyPointRelationshipGroupMapper;
import com.ruoyi.system.mapper.ZhyPointRelationshipMapper;
import com.ruoyi.system.service.IZhyPointRelationshipService;
@ -349,6 +350,8 @@ public class ZhyPointController extends BaseController
@Autowired
ZhyPointRelationshipGroupMapper zhyPointRelationshipGroupMapper;
@Autowired
Test1Mapper test1Mapper;
@GetMapping("/deleteAll")
public AjaxResult deleteAll(){
String cql = "MATCH (n:TestNode) OPTIONAL MATCH (n:TestNode)-[r]-() DELETE n,r";
@ -356,9 +359,31 @@ public class ZhyPointController extends BaseController
sysPointMapper.deleteZhyPointAll();
zhyPointRelationshipMapper.deleteAll();
zhyPointRelationshipGroupMapper.deleteAll();
return AjaxResult.success();
ZhyDoc zhyDoc = new ZhyDoc();
zhyDoc.setGroupId(2L);
zhyDoc.setDocLevel(1L);
List<ZhyDoc> list=test1Mapper.selectZhyDocList(zhyDoc);
System.out.println(list);
for (int i = 0; i < list.size(); i++) {
ZhyPoint zhyPoint = new ZhyPoint();
String name = list.get(i).getDocTitle();
Map<String, Object> data = new HashMap<>();
data.put("type", "keyword");
int neo4jId = pointService.createPoint(name, data);
zhyPoint.setPointName(name);
zhyPoint.setType1("keyword");
zhyPoint.setUuid(Long.valueOf(neo4jId));
zhyPointService.insertZhyPoint(zhyPoint);
}
return AjaxResult.success();
}
/**
* 删除知识点管理

5
ruoyi-ui/src/views/system/SysPoint/index.vue

@ -110,6 +110,7 @@
<!-- v-hasPermi="['system:SysPoint:edit']"-->
<!-- >修改</el-button>-->
<el-button
v-if="scope.row.type1!='keyword'"
size="mini"
type="text"
icon="el-icon-delete"
@ -223,7 +224,7 @@ export default {
typeOptions: [
{ label: '作者', value: 'author' },
{ label: '机构', value: 'agency' },
// { label: '', value: 'keyword' }
{ label: '中心词', value: 'keyword' }
],
//
loading: true,
@ -313,7 +314,7 @@ export default {
const typeMap = {
author: '作者',
agency: '机构',
keyword: '关键词'
keyword: '中心词'
};
return typeMap[cellValue] || cellValue;
},

Loading…
Cancel
Save