|
@@ -2,17 +2,9 @@
|
|
<div
|
|
<div
|
|
class="node"
|
|
class="node"
|
|
:style="{left:detail.x+'px',top:detail.y+'px'}"
|
|
:style="{left:detail.x+'px',top:detail.y+'px'}"
|
|
- >
|
|
|
|
- <transition name="action">
|
|
|
|
- <div class="action" v-show="show">
|
|
|
|
- <a-row type="flex" justify="space-around" align="middle">
|
|
|
|
- <a-col :span="6"><a-button type="link">编辑</a-button></a-col>
|
|
|
|
- <a-col :span="6"><a-button type="link">条件分支</a-button></a-col>
|
|
|
|
- <a-col :span="6"><a-button type="link">抄送人</a-button></a-col>
|
|
|
|
- <a-col :span="6"><a-button type="link">删除</a-button></a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </div>
|
|
|
|
- </transition>
|
|
|
|
|
|
+ @mouseover="show = true"
|
|
|
|
+ @mouseout="show=false">
|
|
|
|
+
|
|
<div
|
|
<div
|
|
v-if="detail.type===1"
|
|
v-if="detail.type===1"
|
|
class="start">
|
|
class="start">
|
|
@@ -21,40 +13,106 @@
|
|
<div class="title">
|
|
<div class="title">
|
|
{{ detail.name }}
|
|
{{ detail.name }}
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- class="content"
|
|
|
|
- @mouseover="show = true"
|
|
|
|
- @mouseout="show=false">
|
|
|
|
|
|
+ <div class="card-content">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-else-if="detail.type===2" class="term">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-else-if="detail.type===2"
|
|
|
|
+ class="term">
|
|
<div class="top"></div>
|
|
<div class="top"></div>
|
|
<div class="bottom"></div>
|
|
<div class="bottom"></div>
|
|
<div class="title">
|
|
<div class="title">
|
|
{{ detail.name }}
|
|
{{ detail.name }}
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- class="content"
|
|
|
|
- @mouseover="show = true"
|
|
|
|
- @mouseout="show=false">
|
|
|
|
-
|
|
|
|
|
|
+ <div class="card-content">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div v-else-if="detail.type===3" class="verify">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-else-if="detail.type===3"
|
|
|
|
+ class="verify">
|
|
<div class="top"></div>
|
|
<div class="top"></div>
|
|
<div class="bottom"></div>
|
|
<div class="bottom"></div>
|
|
<div class="title">
|
|
<div class="title">
|
|
{{ detail.name }}
|
|
{{ detail.name }}
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- class="content"
|
|
|
|
- @mouseover="show = true"
|
|
|
|
- @mouseout="show=false">
|
|
|
|
-
|
|
|
|
|
|
+ <div class="card-content">
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="action">
|
|
|
|
+ <a-row
|
|
|
|
+ type="flex"
|
|
|
|
+ justify="space-around"
|
|
|
|
+ align="middle">
|
|
|
|
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <div class="btn">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 条件分支
|
|
|
|
+ </template>
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ shape="circle"
|
|
|
|
+ @click="add(2)"
|
|
|
|
+ icon="apartment" />
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <div class="btn">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 审核人
|
|
|
|
+ </template>
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="audit"
|
|
|
|
+ @click="add(3)"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="audit" />
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <div class="btn">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 编辑
|
|
|
|
+ </template>
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="edit"
|
|
|
|
+ type="primary" />
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <div class="btn">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 删除
|
|
|
|
+ </template>
|
|
|
|
+ <a-popconfirm
|
|
|
|
+ title="确定删除该节点?"
|
|
|
|
+ ok-text="是"
|
|
|
|
+ cancel-text="否"
|
|
|
|
+ @confirm="handleDelete"
|
|
|
|
+ >
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="delete"
|
|
|
|
+ type="danger" />
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -73,11 +131,15 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
setPosition (position) {
|
|
setPosition (position) {
|
|
|
|
+ console.log(position)
|
|
this.detail.x = position.x
|
|
this.detail.x = position.x
|
|
this.detail.y = position.y
|
|
this.detail.y = position.y
|
|
},
|
|
},
|
|
- mouseover () {
|
|
|
|
-
|
|
|
|
|
|
+ add (type) {
|
|
|
|
+ this.$emit('add', this.detail, type)
|
|
|
|
+ },
|
|
|
|
+ handleDelete () {
|
|
|
|
+ this.$emit('delete', this.detail)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -88,7 +150,7 @@ export default {
|
|
width: 200px;
|
|
width: 200px;
|
|
position: absolute;
|
|
position: absolute;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
- border-radius: 0 0 10px 10px;
|
|
|
|
|
|
+ border-radius: 0 0 10px 10px;
|
|
.top {
|
|
.top {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|
|
@@ -116,51 +178,38 @@ export default {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
background: #9e9ebc;
|
|
background: #9e9ebc;
|
|
color: #fff;
|
|
color: #fff;
|
|
- border-radius: 10px 10px 0 0;
|
|
|
|
|
|
+ border-radius: 10px 10px 0 0;
|
|
}
|
|
}
|
|
- .content{
|
|
|
|
- background: #fff;
|
|
|
|
|
|
+ .card-content {
|
|
|
|
+ background: #fff;
|
|
min-height: 50px;
|
|
min-height: 50px;
|
|
- border-radius:0 0 10px 10px ;
|
|
|
|
}
|
|
}
|
|
- .term{
|
|
|
|
- .title{
|
|
|
|
- color: #0ab74c;
|
|
|
|
- border-bottom:1px solid #ccc;
|
|
|
|
- background: #fff;
|
|
|
|
|
|
+ .term {
|
|
|
|
+ .title {
|
|
|
|
+ color: #0ab74c;
|
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
|
+ background: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .verify{
|
|
|
|
- .title{
|
|
|
|
- background: #e99e09;
|
|
|
|
|
|
+ .verify {
|
|
|
|
+ .title {
|
|
|
|
+ background: #e99e09;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.action{
|
|
|
|
- position: absolute;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- right: 0;
|
|
|
|
- border-radius: 10px 10px;
|
|
|
|
- top: 0;
|
|
|
|
- background: rgba(0, 0, 0, .3);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.action-enter-active {
|
|
|
|
- animation: action-in .5s;
|
|
|
|
-}
|
|
|
|
-.action-leave-active {
|
|
|
|
- animation: action-in .5s reverse;
|
|
|
|
-}
|
|
|
|
-@keyframes action-in {
|
|
|
|
- 0% {
|
|
|
|
- width: 0;
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
+.action {
|
|
|
|
+ border-top: 1px solid #ccc;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ border-radius: 0 0 10px 10px;
|
|
|
|
+ background: #fff;
|
|
|
|
+ .btn {
|
|
|
|
+ padding: 5px;
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
- 100% {
|
|
|
|
- width: 100%;
|
|
|
|
- overflow: visible;
|
|
|
|
|
|
+}
|
|
|
|
|
|
- }
|
|
|
|
|
|
+.audit {
|
|
|
|
+ background: #e99e09;
|
|
|
|
+ border: #e99e09 solid 1px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|