|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<el-dialog class="create-dialog" title="新建拓扑图" width="600px" :visible.sync="outerVisible" :close-on-click-modal="false" custom-class="createDialog"
|
|
|
- @close="closeModal">
|
|
|
+ @close="closeModal" @closed="closed">
|
|
|
<graphTypeDialog ref="graphTypeDialog" @selectNode="selectNode"></graphTypeDialog>
|
|
|
<div class="dialog-bodys">
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-position="top">
|
|
@@ -11,7 +11,7 @@
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="名称" prop="name">
|
|
|
- <el-input v-model="ruleForm.name" placeholder="请输入名称" size="small"></el-input>
|
|
|
+ <el-input v-model="ruleForm.name" placeholder="请输入名称" size="small" :maxlength="20"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="标签" prop="resource">
|
|
|
<div class="tagContainer">
|
|
@@ -19,7 +19,7 @@
|
|
|
{{tag}}
|
|
|
</el-tag>
|
|
|
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
|
|
- @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" >
|
|
|
+ @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
|
|
|
</el-input>
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加</el-button>
|
|
|
</div>
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
},
|
|
|
resetForm(formName) {
|
|
|
this.dynamicTags = [];
|
|
|
- this.buttonStr= '';
|
|
|
+ this.buttonStr = '';
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.outerVisible = false
|
|
|
},
|
|
@@ -125,8 +125,8 @@ export default {
|
|
|
createGraph(pa).then(res => {
|
|
|
if (res.result == "success") {
|
|
|
this.outerVisible = false;
|
|
|
- this.$message.success('创建成功');
|
|
|
- const routeUrl = this.$router.resolve({
|
|
|
+ // this.$message.success('创建成功');
|
|
|
+ this.routeUrl = this.$router.resolve({
|
|
|
name: 'Editer',
|
|
|
query: {
|
|
|
graphId: res.entityList[0].graphId,
|
|
@@ -136,7 +136,6 @@ export default {
|
|
|
isPub: 0
|
|
|
}
|
|
|
})
|
|
|
- window.open(routeUrl.href, "_blank");
|
|
|
} else {
|
|
|
this.$message(res.message)
|
|
|
}
|
|
@@ -144,6 +143,12 @@ export default {
|
|
|
},
|
|
|
closeModal() {
|
|
|
this.resetForm('ruleForm');
|
|
|
+ },
|
|
|
+ closed() {
|
|
|
+ if (this.routeUrl) {
|
|
|
+ window.open(this.routeUrl.href, "_blank");
|
|
|
+ }
|
|
|
+ this.routeUrl = ''
|
|
|
}
|
|
|
},
|
|
|
}
|