<el-tab-pane label="按模板创建" name="template">
<div id="showDiv" v-show="isShow" @mouseenter="isShow=true" :style="{left: floatLeft,top: floatTop}"
style="border-radius:5px; position: absolute;height: 80px;width: 160px; background-color: white;padding: 10px 5px 5px 15px">
<p style="font-size: 15px">{{details.detail}}</p>
</div>
<el-card :key="index" v-for="(item,index) in cardTemplate" v-if="item.flowInfoEntity.length>0">
<div slot="header">
<span> {{item.flowPackageEntity.name}}</span>
</div>
<el-col :span="6" :key="indexInfo" v-for="(itemInfo,indexInfo) in item.flowInfoEntity">
<el-card style="height: 150px" body-style="height:100%;">
<div :id="itemInfo.id" @click="intoAnalyse(itemInfo)" @mouseenter="mouseenter($event,itemInfo)" @mouseleave="mouseLeave(itemInfo)">
<div style="height: 100px;background-color: #DAE4E4;">
<p class="p_svg" style="height: 100%;margin: 0;" v-html='itemInfo.svg'></p>
</div>
</div>
<div style="height: calc(100% - 100px);display: flex;align-items: center;justify-content: center;">
<span> {{itemInfo.id}}</span>
</div>
</el-card>
</el-col>
</el-card>
</el-tab-pane>
mouseenter(e,itemInfo){
this.details = {};
this.details.detail = itemInfo.details;
if(this.details.detail){
this.isShow = true
}else{
this.isShow = false
}
var id = itemInfo.id;
var actualLeft = this.getLeft(id);
var actualTop = this.getTop(id);
this.floatLeft = actualLeft-150 + 'px'
this.floatTop = actualTop-30 + 'px'
if(e.currentTarget.getBoundingClientRect().right>1300){
this.floatLeft = actualLeft-350 + 'px'
}
},
getLeft(id){
var element = document.getElementById(id);
var actualLeft = element.offsetLeft;
var current = element.offsetParent;
while (current !== null){
actualLeft += current.offsetLeft;
current = current.offsetParent;
}
return actualLeft
},
getTop(id){
var element = document.getElementById(id);
var actualTop = element.offsetTop;
var current = element.offsetParent;
while (current !== null){
actualTop += current.offsetTop;
current = current.offsetParent;
}
return actualTop;
},