feat:assetTable添加sn列

style:修改卡片样式
This commit is contained in:
zhangyu
2020-09-14 14:23:54 +08:00
parent 4ac7b24300
commit cf0cf49e10
4 changed files with 62 additions and 8 deletions

View File

@@ -66,6 +66,7 @@
<div v-if="item.prop=='assetType'">
<span>{{scope.row.model.type.value}}</span>
</div>
<template v-if="item.prop=='SN'">{{scope.row.sn}}</template>
<div v-if="item.prop=='state'">
<span>{{scope.row.state==1 ? $t('asset.inStock') : $t('asset.notInStock')}}</span>
</div>
@@ -165,6 +166,12 @@
show: true,
width: 130,
fixed:'left'
},
{
label: this.$t("asset.tableTitle.device"),
prop: 'SN',
show: true,
width: 130
},
{
label: this.$t("asset.tableTitle.assetType"),

View File

@@ -0,0 +1,26 @@
<template>
<div class="expressionInfo">
</div>
</template>
<script>
export default {
name:"expressionInfo",
props:{
},
data(){
return{
}
}
}
</script>
<style scoped>
.expressionInfo{
position: absolute;
top:50%;
left: 50%;
}
</style>

View File

@@ -83,7 +83,9 @@
<!--<div @click='zoomChange(0.1)'><i class="nz-icon nz-icon-hexagonBorder zoom-icon"></i></div>-->
<!--<div @click='zoomChange(-0.1)'><i class="nz-icon nz-icon-hexagonBorder zoom-icon"></i></div>-->
<!--</div>-->
<expression-info
v-if="expressionsInfoShow"
></expression-info>
</div>
<transition name="right-box">
<add-model
@@ -125,7 +127,7 @@
</template>
<script>
import Vis from 'vis'
import Vis from 'vis-network/dist/vis-network.js'
import addNode from './addNode'
import addLine from './addLine'
import popDataMain from './popData/Main'
@@ -134,9 +136,11 @@
import alertTable from "./popData/alertTable";
import assetTable from "./popData/assetTable";
import endpointTable from "./popData/endpointTable";
import ExpressionInfo from "./popData/expressionInfo";
export default {
name:"topology",
components: {
ExpressionInfo,
TotalChart,
alertTable,
assetTable,
@@ -204,6 +208,7 @@
},
data(){
return {
canvas:'',
totalId:'',
totalArray:[],
allModuleInfos:[],
@@ -243,7 +248,7 @@
},
popData:[
{top:'-20px', left:'-17px',className:'nz-icon-endpoint',id:'endpoint',title:this.$t('project.topology.endpoint')},
{top:'-20px', left:'28px',className:'nz-icon-shujuku',id:'asset',title:this.$t('project.topology.asset')},
{top:'-20px', left:'28px',className:'nz-icon-asset',id:'asset',title:this.$t('project.topology.asset')},
{top:'18px', left:'52px',className:'nz-icon-chart',id:'total',title:this.$t('project.topology.total')},
{top:'56px', left:'28px',className:'',id:'other',title:''},
{top:'56px', left:'-17px',className:'nz-icon-info-normal',id:'info',title:this.$t('project.topology.info')},
@@ -271,6 +276,7 @@
options:{},
data:{},
timeInterval:'',
expressionsInfoShow:false,
}
},
methods:{// 保存拓扑图数据
@@ -342,7 +348,7 @@
};
this_.options = {
autoResize: true,
clickToUse:true,
clickToUse:false,
groups:{
useDefaultGroups: true,
myGroupId:{
@@ -356,6 +362,11 @@
font:{
size:16,
},
// chosen:{
// node:(values, id, selected, hovering)=>{
// console.log(values);
// }
// },
},
edges: {
@@ -377,8 +388,13 @@
values.middleArrow=true;
values.middleArrowScale=1;
values.middleArrowType='circle';
this_.expressionsInfoShow=true;
console.log(values);
}
},
// label:(values, id, selected, hovering)=>{
// console.log(values,2222);
// },
},
},
layout:{
@@ -420,6 +436,7 @@
});
this_.containerCanvas=document.querySelectorAll("#network_id canvas")[0];
this_.modelTopUpdate();
this_.canvas=document.getElementsByTagName('canvas')[0];
},
resetAllNodes() {
this.setNetworkData(this.nodesArray,this.edgesArray);
@@ -785,14 +802,16 @@
// this_.addLineShow=true;
});
this.network.on("hoverEdge", function () { // 悬停边
this.network.on("hoverEdge", function (params,a) { // 悬停边
this_.hoverEdge=true;
this_.cursorMove=true;
console.log(params,a);
});
this.network.on("blurEdge", function () { // 边失去焦点
this_.hoverEdge=false;
this_.cursorMove=false;
this_.expressionsInfoShow=false;
});
this.network.on("dragStart", function (params) {//节点移动开始
@@ -841,6 +860,7 @@
this.network.on("hoverNode", function () {//hoverNode
this_.cursorMove=true;
console.log(123123123);
});
this.network.on("blurNode", function () {//blurNode

View File

@@ -264,7 +264,8 @@
arr.forEach((item,index)=>{
item.from=item.source;
item.to=item.target;
item.label=item.name;
item.label='';
item.title='title';
// item.dashes=(item.dashes?(new Array(100).fill(item.dashes[0])):item.dashes);
// if(index%2==0&&item.dashes){
// item.dataFlow='left';
@@ -356,7 +357,7 @@
height: calc(16% - 40px);
font-size: 12px;
position: absolute;
top: 15px;
top: 5px;
left: 15px;
z-index: 10;
}
@@ -455,7 +456,7 @@
text-align: center;
}
.label{
padding: 0 15px;
padding: 0 15px 0 0;
}
</style>