Commit 77f9ec60 by liuyong

修改bug

1 parent 26bd1ee0
......@@ -493,7 +493,7 @@ export function queryViewManageQingDan(params) {
}
// 总体架构资产智能搜索,左侧树
export function archiIntelligenceSearchTree(params) {
return post('/network/archi-asset-view/assetTree', params);
return post('/network/archi-asset-view/assetLevel', params);
}
// 系统信息管理,表格
export function querysystemInfoManageTable(params) {
......@@ -519,4 +519,8 @@ export function addProjectManageTable(params) {
export function editDeleteProjectInfoManageTable(params) {
return post('/network/prj-info/upd', params);
}
// 文档在线编辑,编辑和删除
export function queryDocumentCatalog(params) {
return post('/kl-doc-parser/qryTitleTree', params);
}
......@@ -175,6 +175,11 @@ const routes = [
name: 'systemArchiViewDesign',
component: () => import('@/views/systemArchiViewDesign/index.vue'),
},
{
path: '/main/documentEdit',//文档编辑
name: 'documentEdit',
component: () => import('@/views/documentEdit/index.vue'),
},
]
}
]
......
......@@ -7,7 +7,7 @@
:props="{ children: 'subList', label: 'assetName', id: 'assetId' }"
default-expand-all
node-key="assetId"
@check="treeCheckChange"
@node-click="treeClick"
ref="tree">
</el-tree>
<div class="right_container">
......@@ -30,28 +30,39 @@ export default {
},
data() {
return {
treeData: []
treeData: [
{ assetId: 'BUSI', assetName: '业务架构', subList: [] },
{ assetId: 'APP', assetName: '应用架构', subList: [] },
{ assetId: 'DATA', assetName: '数据架构', subList: [] },
{ assetId: 'TECH', assetName: '技术架构', subList: [] },
{ assetId: 'SAFE', assetName: '安全架构', subList: [] }
]
};
},
mounted(){
this.getTreeData();
this.getTreeData('BUSI');
},
methods: {
getTreeData() {//查询左侧树
getTreeData(type) {//查询左侧树
const params = {
"assetName": null,
"versionId": null
"assetEnum": type
}
archiIntelligenceSearchTree(params).then(res => {
if(res.code == 200) {
this.treeData = res.data;
this.treeData.forEach(item => {
if(item.assetId == type) {
item.subList = res.data;
}
})
}
});
},
treeClick(data, node, e) {//树点击的时候
// console.log(data.assetId);
const type = [ 'BUSI', 'APP', 'DATA', 'TECH', 'SAFE' ];
if(type.includes(data.assetId)) {
this.getTreeData(data.assetId);
}
}
}
}
......
<template>
<div class="documentEdit">
<div class="left_container">
<div style="text-align: left;margin-left: 10px;">{{ docTitle }}</div>
<el-tree
class="filter-tree"
:data="treeData"
:highlight-current="true"
:props="{ children: 'children', label: 'docTitle', id: 'docTitleId' }"
default-expand-all
node-key="docTitleId"
@node-click="treeClick"
ref="tree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span>
<el-dropdown @command="(command) => handleCommand(command, data)">
<span class="el-dropdown-link">
<i class="el-icon-more"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1">添加章节</el-dropdown-item>
<el-dropdown-item command="2">添加子章节</el-dropdown-item>
<el-dropdown-item command="3">复制章节</el-dropdown-item>
<el-dropdown-item command="4">删除章节</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
</span>
</el-tree>
</div>
<div class="right_container">
<el-card class="box-card" style="height: 98%;">
</el-card>
</div>
</div>
</template>
<script>
import {
queryDocumentCatalog,
getDianXingAnLiSelectData
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'documentEdit',
components: {
},
data() {
return {
docTitle: null,
treeData: []
};
},
mounted(){
this.getDocCatalog();
},
methods: {
handleCommand(type, data) {
console.log(type)
console.log(data)
},
getDocCatalog() {
const params = {
docId: '111'
}
queryDocumentCatalog(params).then(res => {
console.log(res)
if(res.code == 200) {
this.docTitle = res.data.docName;
this.treeData = res.data.klReportDocStructureParserList;
}
})
},
treeClick(data) {//左侧树点击
console.log(data)
},
}
}
</script>
<style scoped>
.documentEdit{
width: 100%;
height: 100%;
display: flex;
}
.left_container{
width: 20%;
margin-right: 20px;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
.right_container{
width: 80%;
margin: 20px 20px 0 0;
}
/deep/ .is-leaf {
background-color: #fff !important;
}
</style>
\ No newline at end of file
......@@ -551,7 +551,10 @@ export default {
this.ruleForm.let4 = null;
this.selectRow = [];
this.selectRow3 = [];
this.tableData4.forEach(item => {
item.fileList = [];
item.fileArray = [];
});
});
},
editItem(row) {//编辑
......@@ -577,27 +580,31 @@ export default {
}]
this.ruleForm.let4 = row.prjName;
}
let filesValue = JSON.parse(row.filesValue);
this.tableData4.forEach((item, index) => {
item.fileList = filesValue[index].fileUrl ? [
{
name: filesValue[index].name,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
item.fileArray = filesValue[index].fileUrl ? [
{
name: filesValue[index].name,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
});
if(row.filesValue) {
let filesValue = JSON.parse(row.filesValue);
if(filesValue.length > 0) {
this.tableData4.forEach((item, index) => {
item.fileList = filesValue[index].fileUrl ? [
{
name: filesValue[index].name,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
item.fileArray = filesValue[index].fileUrl ? [
{
name: filesValue[index].name,
url: filesValue[index].fileUrl,
fileId: filesValue[index].fileId,
fileName: filesValue[index].fileName,
fileUrl: filesValue[index].fileUrl,
}
] : [];
});
}
}
this.prjId = row.prjId;
},
open_add_dialog2() {//打开选择系统窗口
......
......@@ -268,7 +268,7 @@ export default {
this.deptCode_ = row.deptCode;
},
editDocItem(){//编辑文档
this.$router.push( `/main/documentEdit`, () => {}, () => {} );
},
deleteItem(row) {//删除
MessageBox.confirm('确定删除?', '提示', {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!