Browse Source

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

small-tupu
hanyuqing 6 months ago
parent
commit
4be59d0dd4
  1. 10
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java
  2. 46
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java
  3. 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java
  4. 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java
  5. 6
      ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml
  6. 4
      ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml
  7. 7
      ruoyi-ui/src/api/system/SysPoint.js
  8. 34
      ruoyi-ui/src/views/system/SysPoint/index.vue
  9. 4
      ruoyi-ui/src/views/system/fileManage/index.vue
  10. 28
      ruoyi-ui/src/views/system/small/index.vue

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

@ -150,6 +150,16 @@ public class ZhyPointController extends BaseController
return toAjax(zhyPointService.updateZhyPoint(zhyPoint));
}
@GetMapping("/deleteAll")
public AjaxResult deleteAll(){
String cql = "MATCH (n:TestNode) OPTIONAL MATCH (n:TestNode)-[r]-() DELETE n,r";
neo4jUtil.excuteCypherSql(cql);
sysPointMapper.deleteZhyPointAll();
zhyPointRelationshipMapper.deleteAll();
return AjaxResult.success();
}
/**
* 删除知识点管理
*/

46
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java

@ -97,6 +97,13 @@ public class ZhyPointRelationshipController extends BaseController
int endid = Integer.valueOf(String.valueOf(point2.get(0).get("uuid")));
String endType = String.valueOf(point2.get(0).get("type1"));
String author="";
String keyword="";
String agency="";
String title="";
String RType = "";
System.out.println(point);
System.out.println(point2);
@ -133,6 +140,45 @@ public class ZhyPointRelationshipController extends BaseController
RType = "相关";
}
}
if (startType.equals("author")){
author = zhyPointRelationship.getAuthor();
}
if (startType.equals("keyword")){
keyword = zhyPointRelationship.getKeyword();
}
if (startType.equals("agency")){
agency = zhyPointRelationship.getAgency();
}
if (startType.equals("title")){
title = zhyPointRelationship.getTitle();
}
if (endType.equals("author")){
author = zhyPointRelationship.getAuthor();
}
if (endType.equals("keyword")){
keyword = zhyPointRelationship.getKeyword();
}
if (endType.equals("agency")){
agency = zhyPointRelationship.getAgency();
}
if (endType.equals("title")){
title = zhyPointRelationship.getTitle();
}
List<Map> flag = zhyPointMapper.selectPointRelationshipByName(author,keyword,agency,title);
if (flag.size()!=0){
return AjaxResult.error(500,"数据重复");
}
Map map = new HashMap();
map.put("relType",RType);
int uuid = pointService.createReletionship(startid,endid,RType,map);

1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java

@ -58,4 +58,5 @@ public interface SysPointMapper
* @return 结果
*/
public int deleteZhyPointByIds(Long[] ids);
public int deleteZhyPointAll();
}

2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java

@ -62,4 +62,6 @@ public interface ZhyPointRelationshipMapper
* @return 结果
*/
public int deleteZhyPointRelationshipByIds(Long[] ids);
public int deleteAll();
}

6
ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml

@ -63,4 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteZhyPointAll">
delete from zhy_point
</delete>
</mapper>

4
ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml

@ -87,4 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteAll" >
delete from zhy_point_relationship
</delete>
</mapper>

7
ruoyi-ui/src/api/system/SysPoint.js

@ -42,3 +42,10 @@ export function delSysPoint(id) {
method: 'delete'
})
}
export function deleteAll() {
return request({
url: '/system/SysPoint/deleteAll',
method: 'get'
})
}

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

@ -70,16 +70,19 @@
v-hasPermi="['system:SysPoint:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:SysPoint:export']"
>导出</el-button>
</el-col>
<el-button type="danger" plain style="float: left" size="mini" @click="deletAllInfo">
一键清除
</el-button>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:SysPoint:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -150,7 +153,7 @@
</template>
<script>
import { listSysPoint, getSysPoint, delSysPoint, addSysPoint, updateSysPoint } from "@/api/system/SysPoint";
import {listSysPoint, getSysPoint, delSysPoint, addSysPoint, updateSysPoint, deleteAll} from "@/api/system/SysPoint";
export default {
name: "SysPoint",
@ -198,6 +201,15 @@ export default {
this.getList();
},
methods: {
deletAllInfo(){
this.$modal.confirm('是否确认删除全部的数据项?').then(function() {
return deleteAll();
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
formatType(row, column, cellValue) {
const typeMap = {
author: '作者',

4
ruoyi-ui/src/views/system/fileManage/index.vue

@ -126,8 +126,8 @@
<!-- (scope.row.groupId==2&&scope.row.docLevel<2)-->
<!--"-->
<!-- @click="openAddTxt(scope.row)">添加</el-button>-->
<el-button style="font-size: 0.8vw;" type="text" @click="editDoc(scope.row)">编辑</el-button>
<el-button style="font-size: 0.8vw;" type="text" @click="deleteTxt(scope.row)">删除</el-button>
<el-button v-hasPermi="['system:fileManage:edit']" style="font-size: 0.8vw;" type="text" @click="editDoc(scope.row)">编辑</el-button>
<el-button v-hasPermi="['system:fileManage:remove']" style="font-size: 0.8vw;" type="text" @click="deleteTxt(scope.row)">删除</el-button>
</template>
</el-table-column>

28
ruoyi-ui/src/views/system/small/index.vue

@ -93,13 +93,13 @@
<el-table-column label="文献名" align="center" prop="title" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:relationship:edit']"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:relationship:edit']"-->
<!-- >修改</el-button>-->
<el-button
size="mini"
type="text"
@ -124,11 +124,13 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="起始节点" prop="author">
<el-cascader :options="cascadeOptions1" v-model="form.start" style="width: 200px"
filterable
:show-all-levels="false" class="cascader-ellipsis"
:props="cascaderProps"></el-cascader>
</el-form-item>
<el-form-item label="终点节点" prop="keyword">
<el-cascader :options="cascadeOptions1" v-model="form.end" style="width: 200px"
filterable
:show-all-levels="false" class="cascader-ellipsis"
:props="cascaderProps"></el-cascader>
</el-form-item>
@ -307,12 +309,12 @@ export default {
children: res.jgMap.children,
},
{
id: res.gjcMap.id,
pointName: res.gjcMap.name,
children: res.gjcMap.children,
},
// {
// id: res.gjcMap.id,
// pointName: res.gjcMap.name,
// children: res.gjcMap.children,
//
// },
]
})

Loading…
Cancel
Save