Commit 89c21da4 by liuyong

修改bug

1 parent 7ba42abc
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
if(joinGraph_.state == 2) { if(joinGraph_.state == 2) {
const joinGraph = joinGraph_.graph; const joinGraph = joinGraph_.graph;
// this.sidebarTitles = true;//勾选标签 this.sidebarTitles = true;//勾选标签
joinGraph.forEach(item => { joinGraph.forEach(item => {
let fns = []; let fns = [];
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
if(item2.eleType == '2' && item2.iconName && item2.color) { if(item2.eleType == '2' && item2.iconName && item2.color) {
fns.push( fns.push(
this.createVertexTemplateEntry( this.createVertexTemplateEntry(
item2.iconName + ';fillColor=' + item2.color + ';' + 'attr=[];', item2.iconName + ';fillColor=' + item2.color + ';' + 'attr=[];' + 'assetId=' + item2.assetId + ';' + 'archiBelongId=' + item2.archiBelongId + ';',
150, 150,
75, 75,
null, null,
......
<template> <template>
<div class="canvas"> <div class="canvas">
<div class="left_graph_container">
<Drawio :initGraphId="routerId"></Drawio> <Drawio :initGraphId="routerId"></Drawio>
</div>
<div class="right_graph_container">
</div>
<el-dialog <el-dialog
title="属性关联" title="属性关联"
...@@ -53,6 +58,8 @@ ...@@ -53,6 +58,8 @@
saveVersionArchiViewManageCardDetails, saveVersionArchiViewManageCardDetails,
save_drawio_attribute, save_drawio_attribute,
} from '@/api/index.js'; } from '@/api/index.js';
import $ from 'jquery';
export default { export default {
name: 'Canvas', name: 'Canvas',
components: { components: {
...@@ -67,6 +74,7 @@ ...@@ -67,6 +74,7 @@
search_select1: [], search_select1: [],
graphList: [], graphList: [],
eleLevel: null, eleLevel: null,
status: 1,
}; };
}, },
mounted(){ mounted(){
...@@ -126,6 +134,18 @@ ...@@ -126,6 +134,18 @@
} }
}, },
methods: { methods: {
openDrawer() {
if(this.status == 1) {
$(".left_graph_container").animate({ width: "85%" }, 300, 'linear', function() {
$(".right_graph_container").css('display', 'block');
});
this.status = 2;
}else{
$(".left_graph_container").animate({ width: "100%" }, 300, 'linear');
$(".right_graph_container").css('display', 'none');
this.status = 1;
}
},
showCurrentGraph(name, idx) {//图形选择窗口的文字点击 showCurrentGraph(name, idx) {//图形选择窗口的文字点击
this.nameIndex = idx; this.nameIndex = idx;
this.graphIndex = -1; this.graphIndex = -1;
...@@ -243,9 +263,19 @@ ...@@ -243,9 +263,19 @@
} }
</style> </style>
<style scoped> <style scoped>
.left_graph_container{
width: 100%;
height: 100%;
}
.right_graph_container{
width: 15%;
height: 100%;
display: none;
}
.canvas{ .canvas{
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
} }
/deep/ .el-dialog__header{ /deep/ .el-dialog__header{
background-color: #0D867F; background-color: #0D867F;
......
<template> <template>
<div class="Details"> <div class="Details">
<template v-if="showBtn"> <template v-if="showBtn">
<el-button type="text" class="lookListbtn" @click="lookList">清单目录</el-button>
<el-button type="text" class="backPrevGraphbtn" @click="backGraph">返回上级图形</el-button> <el-button type="text" class="backPrevGraphbtn" @click="backGraph">返回上级图形</el-button>
<el-button type="text" class="versionBtn" @click="releaseVersion">版本发布</el-button> <el-button type="text" class="versionBtn" @click="releaseVersion">版本发布</el-button>
<el-button type="text" class="saveFileBtn" @click="saveFile">保存</el-button> <el-button type="text" class="saveFileBtn" @click="saveFile">保存</el-button>
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
<span slot="label"> <span slot="label">
<i class="el-icon-picture"></i> <i class="el-icon-picture"></i>
</span> </span>
<Graph></Graph> <Graph ref="graphComponent"></Graph>
</el-tab-pane> </el-tab-pane>
<el-tab-pane> <el-tab-pane>
<span slot="label"> <span slot="label">
...@@ -38,6 +39,7 @@ import { ...@@ -38,6 +39,7 @@ import {
saveVersionArchiViewManageCardDetails, saveVersionArchiViewManageCardDetails,
saveArchiViewManageCardDetails saveArchiViewManageCardDetails
} from '@/api/index.js'; } from '@/api/index.js';
export default { export default {
name: 'Details', name: 'Details',
components: { components: {
...@@ -91,6 +93,9 @@ export default { ...@@ -91,6 +93,9 @@ export default {
} }
}, },
methods: { methods: {
lookList() {
this.$refs.graphComponent.openDrawer();
},
saveFile() { saveFile() {
document.getElementById("drawioGraph").contentWindow.postMessage({ type: 'saveFileSignal' } , '*'); document.getElementById("drawioGraph").contentWindow.postMessage({ type: 'saveFileSignal' } , '*');
}, },
...@@ -153,6 +158,13 @@ export default { ...@@ -153,6 +158,13 @@ export default {
height: 100%; height: 100%;
position: relative; position: relative;
} }
.lookListbtn{
position: absolute;
right: 480px;
top: 0px;
z-index: 9;
color: #0D867F;
}
.backPrevGraphbtn{ .backPrevGraphbtn{
position: absolute; position: absolute;
right: 360px; right: 360px;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<p>版本发布</p> <p>版本发布</p>
</div> </div>
</div> </div>
<el-table :data="tableData" stripe border @selection-change="handleSelectionChange" height="450"> <el-table :data="tableData" stripe border v-loading="loading" @selection-change="handleSelectionChange" height="450">
<el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column> <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 type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="rsName" label="元素关系名称" align="center"></el-table-column> <el-table-column prop="rsName" label="元素关系名称" align="center"></el-table-column>
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
<el-table-column label="操作" width="450" align="center"> <el-table-column label="操作" width="450" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-view" size="mini" @click="operate('view',scope.row)">查看</el-button> <el-button type="primary" icon="el-icon-view" size="mini" @click="operate('view',scope.row)">查看</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button> <el-button type="primary" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button> <el-button class="tingYong_btn" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button :class="scope.row.state != 2 ? '':'delBtn'" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> <el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -274,8 +274,14 @@ import { ...@@ -274,8 +274,14 @@ import {
getJGYSGLUpdateBatch, getJGYSGLUpdateBatch,
getEleList, getEleList,
query_jia_gou_gui_shu, query_jia_gou_gui_shu,
getYMXZDGLProyList,
getYMXZDGLProyAdd,
getYMXZDGLProyUpdate,
getYMXZDGLProyDel,
gAllDictKey
} from "@/api/index.js"; } from "@/api/index.js";
import $ from 'jquery'; import $ from 'jquery';
import { MessageBox, Message } from 'element-ui';
export default { export default {
...@@ -285,6 +291,7 @@ export default { ...@@ -285,6 +291,7 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
dicy_dialog: false, dicy_dialog: false,
ruleForm2: { ruleForm2: {
let1: null, let1: null,
...@@ -434,11 +441,56 @@ export default { ...@@ -434,11 +441,56 @@ export default {
created() { created() {
}, },
methods: { methods: {
queryAllKey() {//查询控件右边的下拉框值
gAllDictKey().then(res => {
this.controlValueSelect = res.data;
})
},
edit_dicy(row){//编辑字典 edit_dicy(row){//编辑字典
this.dicy_dialog = true;
this.is_add_edit2 = 'edit'; this.is_add_edit2 = 'edit';
this.queryAllKey();
this.propertyId = row.propertyId;
this.ruleForm2.let1 = row.fieldName;
this.ruleForm2.let2 = row.cnName;
this.ruleForm2.let3 = row.displayOrder;
this.ruleForm2.let4 = row.contentLength;
this.ruleForm2.let5 = row.notNull == '0' ? '是' : '否';
this.ruleForm2.let6 = row.isShow == '0' ? '显示' : '不显示';
this.ruleForm2.let7 = String(row.controlType);
this.ruleForm2.let8 = row.dictKey;
}, },
delete_dicy(row){//删除字典 delete_dicy(row){//删除字典
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
propertyId: row.propertyId,
}
getYMXZDGLProyDel(params).then(res => {
if(res.code == 200) {
this.getDicyTable();
Message({
type: 'success',
message: '删除成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}, },
openDicyDialog() {//打开字典窗口 openDicyDialog() {//打开字典窗口
this.dicy_dialog = true; this.dicy_dialog = true;
...@@ -453,11 +505,57 @@ export default { ...@@ -453,11 +505,57 @@ export default {
this.ruleForm2.let6 = '显示'; this.ruleForm2.let6 = '显示';
this.ruleForm2.let7 = null; this.ruleForm2.let7 = null;
}); });
this.queryAllKey();
}, },
save_dicy() {//字典窗口保存 save_dicy() {//字典窗口保存
this.$refs.form2.validate(valid => { this.$refs.form2.validate(valid => {
if(valid) { if(valid) {
const params = {
fieldName: this.ruleForm2.let1,
cnName: this.ruleForm2.let2,
displayOrder: this.ruleForm2.let3,
contentLength: this.ruleForm2.let4,
controlType: this.ruleForm2.let7,
type: 2,
typeId: this.formData.eleRelaId,
dictKey: this.ruleForm2.let8,
notNull: this.ruleForm2.let5 == '是' ? 0 : 1,
isShow: this.ruleForm2.let6 == '显示' ? 0 : 1,
};
const requestParams = this.is_add_edit2 == 'add' ? params : { ...params, propertyId: this.propertyId };
if(this.is_add_edit2 == 'add') {
getYMXZDGLProyAdd(requestParams).then(res => {
if(res.code == 200) {
this.dicy_dialog = false;
this.getDicyTable();
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
getYMXZDGLProyUpdate(requestParams).then(res => {
if (res.code == 200) {
this.dicy_dialog = false;
this.getDicyTable();
Message({
type: 'success',
message: '保存成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}
}else { }else {
return false; return false;
} }
...@@ -465,11 +563,13 @@ export default { ...@@ -465,11 +563,13 @@ export default {
}, },
// 查询列表 // 查询列表
getList() { getList() {
this.loading = true;
if (this.params.state != '') { if (this.params.state != '') {
this.params.state = Number(this.params.state) this.params.state = Number(this.params.state)
} }
getJGYSGLlist(this.params).then(res => { getJGYSGLlist(this.params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.loading = false;
this.page.total = res.data.total; this.page.total = res.data.total;
this.tableData = res.data.records; this.tableData = res.data.records;
} }
...@@ -521,6 +621,18 @@ export default { ...@@ -521,6 +621,18 @@ export default {
this.params.current = val; this.params.current = val;
this.getList(); this.getList();
}, },
getDicyTable() {//字典表格
const params = {
type: 2,
typeId: this.formData.eleRelaId
}
getYMXZDGLProyList(params).then(res => {
if (res.code == 200) {
// console.log(res.data)
this.tableData2 = res.data;
}
});
},
// 所有操作 // 所有操作
operate(type,item){ operate(type,item){
this.openType = type; this.openType = type;
...@@ -535,6 +647,7 @@ export default { ...@@ -535,6 +647,7 @@ export default {
this.add_dialog = true; this.add_dialog = true;
this.title = "编辑关系元素"; this.title = "编辑关系元素";
this.formData = item; this.formData = item;
this.getDicyTable();
}else if (type == "view") { }else if (type == "view") {
this.add_dialog3 = true; this.add_dialog3 = true;
this.formData = item; this.formData = item;
...@@ -621,6 +734,8 @@ export default { ...@@ -621,6 +734,8 @@ export default {
this.$confirm("确认发布吗", "提示", { this.$confirm("确认发布吗", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.formData = item this.formData = item
...@@ -637,9 +752,11 @@ export default { ...@@ -637,9 +752,11 @@ export default {
}); });
}else if (type == "stop") { }else if (type == "stop") {
// 停用 // 停用
this.$confirm("确认停用吗", "提示", { this.$confirm("确认停用吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.formData = item; this.formData = item;
...@@ -656,9 +773,11 @@ export default { ...@@ -656,9 +773,11 @@ export default {
}); });
}else if (type == "del") { }else if (type == "del") {
// 删除 // 删除
this.$confirm("确认删除吗", "提示", { this.$confirm("确认删除吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.formData = item; this.formData = item;
...@@ -806,6 +925,14 @@ export default { ...@@ -806,6 +925,14 @@ export default {
} }
</script> </script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.JiaGouYuanShuGuanXiGuanLi{ .JiaGouYuanShuGuanXiGuanLi{
width: 100%; width: 100%;
...@@ -835,6 +962,18 @@ export default { ...@@ -835,6 +962,18 @@ export default {
color: #0D867F; color: #0D867F;
border: 0; border: 0;
} }
.el-button.is-disabled{
color: #C0C4CC !important;
background-color: #fff !important;
}
.shanChu_btn{
color: #DD6A15;
background-color: #F8EBE2;
}
.tingYong_btn{
color: #DEA82A;
background-color: #FDF6E6;
}
/deep/ .dialog1 .el-dialog__body{ /deep/ .dialog1 .el-dialog__body{
height: 55vh; height: 55vh;
overflow-y: auto; overflow-y: auto;
......
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
<el-table-column label="操作" width="360" align="center"> <el-table-column label="操作" width="360" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="operate('edit',scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button :class="scope.row.state == 1 ? '':'editBtn'" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button> <el-button type="primary" icon="el-icon-upload2" size="mini" @click="operate('pushEdit',scope.row)" :disabled="scope.row.state == 1">发布</el-button>
<el-button :class="scope.row.state != 1 ? '':'stopBtn'" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button> <el-button class="tingYong_btn" icon="el-icon-remove-outline" size="mini" @click="operate('stop',scope.row)" :disabled="scope.row.state != 1">停用</el-button>
<el-button :class="scope.row.state != 2 ? '':'delBtn'" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button> <el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="operate('del',scope.row)" :disabled="scope.row.state != 2">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -860,6 +860,10 @@ export default { ...@@ -860,6 +860,10 @@ export default {
color: #0D867F; color: #0D867F;
border: 0; border: 0;
} }
.el-button.is-disabled{
color: #C0C4CC !important;
background-color: #fff !important;
}
.el-form-item{ .el-form-item{
display: flex; display: flex;
align-items: center; align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!