Commit 4606323f by liuyong

修改bug

1 parent 89c21da4
......@@ -213,13 +213,13 @@ const leftCustomGraph = function(that) {//左侧自定义图形
}
})
}else {
joinGraph.forEach(item => {
item.subList.forEach(item2 => {
if(item2.eleType == '1') {
console.log(item2)
}
})
})
// joinGraph.forEach(item => {
// item.subList.forEach(item2 => {
// if(item2.eleType == '1') {
// console.log(item2)
// }
// })
// })
}
}
......
......@@ -49,25 +49,42 @@
joinGraph.forEach(item => {
let fns = [];
item.subList.forEach(item2 => {
if(item2.eleType == '2' && item2.iconName && item2.color) {
if(item.arciBelongName == '架构元素关系') {
item.eleDtos.forEach(item2 => {
fns.push(
this.createEdgeTemplateEntry(
item2.iconName + 'attr=[]',
item2.shapeWidth ? item2.shapeWidth : 150,
item2.shapeHeight ? item2.shapeHeight : 75,
'',
item2.elementName,
null,
'非封闭图形2'
)
)
});
}else {
item.eleDtos.forEach(item2 => {
if(item2.assets) {
item2.assets.forEach(item3 => {
fns.push(
this.createVertexTemplateEntry(
item2.iconName + ';fillColor=' + item2.color + ';' + 'attr=[];' + 'assetId=' + item2.assetId + ';' + 'archiBelongId=' + item2.archiBelongId + ';',
150,
75,
item2.iconName + ';fillColor=' + item2.color + ';' + 'attr=[]' + ';assetId=' + item3.assetId + ';archiBelongId=' + item3.archiBelongId + ';',
item2.shapeWidth ? item2.shapeWidth : 150,
item2.shapeHeight ? item2.shapeHeight : 75,
null,
item2.assetName,
item3.assetName,
null,
null,
'封闭图形2'
)
)
}
})
}
});
}
this.addPaletteFunctions(item.assetId, item.assetName, false, fns);
this.addPaletteFunctions(item.arciBelongId, item.arciBelongName, true, fns);
});
}
};
......
......@@ -453,7 +453,7 @@ export function evoluteFunAndLineAdd(params) {
}
// 架构视图左侧图元
export function queryArchiGraph(params) {
return post('/network/arc-ast-cn/fiveAssetTree', params);
return post('/network/ma-ml/archi-asset-list', params);
}
// 元模型字典管理表格
export function queryCircleModelDicyTable(params) {
......@@ -487,3 +487,7 @@ export function dicyUpdateTableEdit(params) {
export function dicyUpdateTableDelete(params) {
return post('/network/archi-model-dict-detail/del', params);
}
// 架构视图管理,清单列表
export function queryViewManageQingDan(params) {
return post('/network/ma-ml/asset-ele-list', params);
}
\ No newline at end of file
......@@ -4,9 +4,24 @@
<Drawio :initGraphId="routerId"></Drawio>
</div>
<div class="right_graph_container">
<el-card style="width: 100%;height: 100%;">
<div style="text-align: left;">
<span>清单目录</span>
</div>
<div style="display: flex;align-items: center;">
<el-divider direction="vertical" class="divider1"></el-divider>
<div>目录</div>
<el-divider class="divider2"></el-divider>
</div>
<el-table :data="tableData" stripe border height='500'>
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
<el-table-column prop="assetName" label="资产名称" align="center"></el-table-column>
</el-table>
<div style="text-align: right;">
<el-button type="text" @click="toBusiAssetslist">更多<i class="el-icon-arrow-right"></i></el-button>
</div>
</el-card>
</div>
<el-dialog
title="属性关联"
:visible.sync="graph_dialog"
......@@ -57,6 +72,7 @@
saveArchiViewManageCardDetails,
saveVersionArchiViewManageCardDetails,
save_drawio_attribute,
queryViewManageQingDan
} from '@/api/index.js';
import $ from 'jquery';
......@@ -67,6 +83,7 @@
},
data() {
return {
tableData: [],
routerId: null,
graph_dialog: false,
nameIndex: 0,
......@@ -78,6 +95,7 @@
};
},
mounted(){
this.getQingDanTable();
this.get_search_select1();
const id = this.$route.query.id;
......@@ -134,15 +152,31 @@
}
},
methods: {
toBusiAssetslist() {
this.$router.push( `/main/busiAssetslist`, () => {}, () => {} );
},
getQingDanTable() {
const params = {
archiViewId: this.$route.query.viewId,
assetConstant: this.$route.query.assetConstant,
}
queryViewManageQingDan(params).then(res => {
if(res.code == 200) {
this.tableData = res.data;
}else {
Message({
type: 'error',
message: res.msg
});
}
})
},
openDrawer() {
if(this.status == 1) {
$(".left_graph_container").animate({ width: "85%" }, 300, 'linear', function() {
$(".right_graph_container").css('display', 'block');
});
$(".right_graph_container").animate({ right: "0%" }, 200, 'linear');
this.status = 2;
}else{
$(".left_graph_container").animate({ width: "100%" }, 300, 'linear');
$(".right_graph_container").css('display', 'none');
$(".right_graph_container").animate({ right: "-15%" }, 200, 'linear');
this.status = 1;
}
},
......@@ -263,19 +297,35 @@
}
</style>
<style scoped>
.el-button--text{
color: #0D867F;
}
.divider1{
width: 6px;
margin-right: 6px;
background-color: #0D867F;
}
.divider2{
margin-left: 6px;
width: 74%;
}
.left_graph_container{
width: 100%;
height: 100%;
}
.right_graph_container{
width: 15%;
width: 265px;
height: 100%;
display: none;
position: absolute;
right: -15%;
top: 0;
background-color: rgba(256, 256, 256, 1);
}
.canvas{
width: 100%;
height: 100%;
display: flex;
position: relative;
}
/deep/ .el-dialog__header{
background-color: #0D867F;
......
......@@ -198,6 +198,7 @@ export default {
},
addStatus: null,
graphGroup: null,
assetConstant: null,
};
},
mounted(){
......@@ -439,15 +440,19 @@ export default {
Promise.all([ this.queryDrawioGraph(id), this.queryDrawioGraph2(id), this.getArchiGraph() ]).then(res2 => {
localStorage.setItem('commonGraph', JSON.stringify({ show: true, graph: res2[0].dataEle }));
localStorage.setItem('standardGraph', JSON.stringify({ show: true, graph: res2[1].dataEle }));
localStorage.setItem('joinGraph', JSON.stringify({ state: 2, graph: res2[2] }));
this.$router.push( `/main/archiViewManageDetails?id=${id}&info=${this.graphGroup}`, () => {}, () => {} );
localStorage.setItem('joinGraph', JSON.stringify({ state: 2, graph: res2[2].dataEle }));
this.$router.push( `/main/archiViewManageDetails?id=${id}&info=${this.graphGroup}&viewId=${this.viewId}&assetConstant=${this.assetConstant}`, () => {}, () => {} );
});
}
});
},
getArchiGraph() {//查询综合图
return new Promise((resolve, reject) => {
queryArchiGraph({}).then(res => {
const params = {
archiBelongId: this.graphGroup,
assetConstant: this.assetConstant,
}
queryArchiGraph(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}else {
......@@ -463,6 +468,7 @@ export default {
treeClick(data, node, e) {//树点击的时候
if(!data.subList) {
this.graphGroup = node.parent.data.viewId;
this.assetConstant = node.parent.data.archiType;
this.viewId = data.viewId;
this.pager1.current = 1;
this.pager2.current = 1;
......@@ -487,6 +493,7 @@ export default {
getArchiViewManage(params).then(res => {
if(res.code == 200) {
this.graphGroup = res.data[0].viewId;
this.assetConstant = res.data[0].archiType;
this.treeData[0].subList = res.data;
this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId;
......
......@@ -8,6 +8,12 @@
<el-input v-model="params.viewName" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">架构大类</span>
<el-select v-model="params.let1" placeholder="请选择" clearable class="search_item">
<el-option v-for="(item,idnex) in levelList" :key="idnex" :label="item.name" :value="item.levelId" ></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">架构层次</span>
<el-select v-model="params.archiLevelId" placeholder="请选择" clearable class="search_item">
<el-option v-for="(item,idnex) in levelList" :key="idnex" :label="item.name" :value="item.levelId" ></el-option>
......@@ -19,6 +25,14 @@
<el-option v-for="(item,idnex) in belongList" :key="idnex" :label="item.name" :value="item.belongId" ></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">状态</span>
<el-select v-model="params.state" clearable placeholder="请选择" class="search_item">
<el-option label="已发布" value="1"></el-option>
<el-option label="已停用" value="0"></el-option>
<el-option label="暂存" value="2"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="getList">
......@@ -41,7 +55,7 @@
<p>版本发布</p>
</div>
</div>
<el-table :data="tableData" stripe border @selection-change="handleSelectionChange" height="450">
<el-table :data="tableData" stripe border @selection-change="handleSelectionChange" :height="tableHeight">
<el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="viewName" label="架构视图名称" width="150" align="center"></el-table-column>
......@@ -237,6 +251,7 @@ import {
getYMXZDGLProyDel
} from "@/api/index.js";
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'archiViewConfig',
......@@ -312,6 +327,8 @@ export default {
viewName: "",
archiLevelId: "",
archiBelongId: "",
let1: null,
state: null,
},
page: {
current: 1,
......@@ -354,12 +371,15 @@ export default {
selectData2: [],
selectData3: [],
selectData4: [],
tableHeight: null,
};
},
mounted() {
},
created() {
window.addEventListener('resize', () => {
this.set_table_height();
})
this.set_table_height();
// 获取下拉
this.getLevelList();
this.getBelongList();
......@@ -373,9 +393,18 @@ export default {
// 获取元素和元素关系列表
this.getEleList();
this.gtEleRelList();
},
created() {
},
methods: {
set_table_height() {//动态设置表格高度
const table_container_height = $(".table_container").height();
const search_menu_height = $(".search_menu").height();
const search_btn_height = $(".search_btn").outerHeight(true);
this.tableHeight = table_container_height - search_menu_height - search_btn_height - 90 + 'px';
},
queryAllKey() {//查询控件右边的下拉框值
gAllDictKey().then(res => {
this.controlValueSelect = res.data;
......@@ -571,7 +600,7 @@ export default {
pageSize: 10,
rsName: "",
scope: "",
state: "",
state: null,
}
},
// 分页事件
......@@ -869,6 +898,10 @@ export default {
align-items: center;
width: 33%;
}
.tingYong_btn{
color: #DEA82A;
background-color: #FDF6E6;
}
.shanChu_btn{
color: #DD6A15;
background-color: #F8EBE2;
......@@ -932,15 +965,19 @@ export default {
.search_menu_item_container{
display: flex;
align-items: center;
height: 60px;
width: 90%;
justify-content: space-between;
}
.search_menu_btn_container{
display: flex;
align-items: center;
width: 10%;
}
.search_menu_item{
display: flex;
align-items: center;
width: 344px;
// width: 344px;
}
.search_title{
/* width: 20%; */
......@@ -1018,6 +1055,7 @@ export default {
.table_container{
width: 97%;
margin-top: 20px;
height: calc(100% - 40px);
.editBtn{
color: #0D867F;
}
......
......@@ -346,10 +346,6 @@ export default {
display: flex;
align-items: center;
}
.search_menu_item_container{
display: flex;
align-items: center;
}
.search_menu_btn_container{
display: flex;
align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!