|
@@ -112,6 +112,16 @@
|
|
|
<el-form-item label="实体描述" prop="content">
|
|
|
<el-input v-model="form.content" placeholder="请输入实体描述" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="实体类" prop="labels">
|
|
|
+ <el-select v-model="form.labels" clearable multiple filterable placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in classOption"
|
|
|
+ :key="item.name"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.name">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -129,6 +139,7 @@ import { listEntity, getEntity, delEntity, addEntity, updateEntity } from "@/api
|
|
|
import { getRelationByEntityId } from '@/api/knowledge/search'
|
|
|
import {bit2Info} from '@/utils/validate'
|
|
|
import Graph from '@/components/Echarts/graph'
|
|
|
+import { getEntityClassOption } from "@/api/neo4j/class";
|
|
|
|
|
|
export default {
|
|
|
name: "Entity",
|
|
@@ -170,10 +181,12 @@ export default {
|
|
|
seriesData: [],
|
|
|
linksData: [],
|
|
|
},
|
|
|
+ classOption: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
+ this.getOption()
|
|
|
},
|
|
|
// mounted() {
|
|
|
// this.bindTableEvents();
|
|
@@ -315,6 +328,11 @@ export default {
|
|
|
// 关闭对话框
|
|
|
this.dialogGraphVisible = false;
|
|
|
},
|
|
|
+ getOption(){
|
|
|
+ getEntityClassOption().then(resp => {
|
|
|
+ this.classOption = resp.data
|
|
|
+ })
|
|
|
+ }
|
|
|
// bindTableEvents() {
|
|
|
// const tableBody = this.$el.querySelector('.el-table__body-wrapper');
|
|
|
// if (tableBody) {
|