feat:assetTable添加sn列
style:修改卡片样式
This commit is contained in:
@@ -66,6 +66,7 @@
|
|||||||
<div v-if="item.prop=='assetType'">
|
<div v-if="item.prop=='assetType'">
|
||||||
<span>{{scope.row.model.type.value}}</span>
|
<span>{{scope.row.model.type.value}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<template v-if="item.prop=='SN'">{{scope.row.sn}}</template>
|
||||||
<div v-if="item.prop=='state'">
|
<div v-if="item.prop=='state'">
|
||||||
<span>{{scope.row.state==1 ? $t('asset.inStock') : $t('asset.notInStock')}}</span>
|
<span>{{scope.row.state==1 ? $t('asset.inStock') : $t('asset.notInStock')}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -165,6 +166,12 @@
|
|||||||
show: true,
|
show: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
fixed:'left'
|
fixed:'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t("asset.tableTitle.device"),
|
||||||
|
prop: 'SN',
|
||||||
|
show: true,
|
||||||
|
width: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t("asset.tableTitle.assetType"),
|
label: this.$t("asset.tableTitle.assetType"),
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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 @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>-->
|
<!--</div>-->
|
||||||
|
<expression-info
|
||||||
|
v-if="expressionsInfoShow"
|
||||||
|
></expression-info>
|
||||||
</div>
|
</div>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<add-model
|
<add-model
|
||||||
@@ -125,7 +127,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vis from 'vis'
|
import Vis from 'vis-network/dist/vis-network.js'
|
||||||
import addNode from './addNode'
|
import addNode from './addNode'
|
||||||
import addLine from './addLine'
|
import addLine from './addLine'
|
||||||
import popDataMain from './popData/Main'
|
import popDataMain from './popData/Main'
|
||||||
@@ -134,9 +136,11 @@
|
|||||||
import alertTable from "./popData/alertTable";
|
import alertTable from "./popData/alertTable";
|
||||||
import assetTable from "./popData/assetTable";
|
import assetTable from "./popData/assetTable";
|
||||||
import endpointTable from "./popData/endpointTable";
|
import endpointTable from "./popData/endpointTable";
|
||||||
|
import ExpressionInfo from "./popData/expressionInfo";
|
||||||
export default {
|
export default {
|
||||||
name:"topology",
|
name:"topology",
|
||||||
components: {
|
components: {
|
||||||
|
ExpressionInfo,
|
||||||
TotalChart,
|
TotalChart,
|
||||||
alertTable,
|
alertTable,
|
||||||
assetTable,
|
assetTable,
|
||||||
@@ -204,6 +208,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
canvas:'',
|
||||||
totalId:'',
|
totalId:'',
|
||||||
totalArray:[],
|
totalArray:[],
|
||||||
allModuleInfos:[],
|
allModuleInfos:[],
|
||||||
@@ -243,7 +248,7 @@
|
|||||||
},
|
},
|
||||||
popData:[
|
popData:[
|
||||||
{top:'-20px', left:'-17px',className:'nz-icon-endpoint',id:'endpoint',title:this.$t('project.topology.endpoint')},
|
{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:'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:'28px',className:'',id:'other',title:''},
|
||||||
{top:'56px', left:'-17px',className:'nz-icon-info-normal',id:'info',title:this.$t('project.topology.info')},
|
{top:'56px', left:'-17px',className:'nz-icon-info-normal',id:'info',title:this.$t('project.topology.info')},
|
||||||
@@ -271,6 +276,7 @@
|
|||||||
options:{},
|
options:{},
|
||||||
data:{},
|
data:{},
|
||||||
timeInterval:'',
|
timeInterval:'',
|
||||||
|
expressionsInfoShow:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{// 保存拓扑图数据
|
methods:{// 保存拓扑图数据
|
||||||
@@ -342,7 +348,7 @@
|
|||||||
};
|
};
|
||||||
this_.options = {
|
this_.options = {
|
||||||
autoResize: true,
|
autoResize: true,
|
||||||
clickToUse:true,
|
clickToUse:false,
|
||||||
groups:{
|
groups:{
|
||||||
useDefaultGroups: true,
|
useDefaultGroups: true,
|
||||||
myGroupId:{
|
myGroupId:{
|
||||||
@@ -356,6 +362,11 @@
|
|||||||
font:{
|
font:{
|
||||||
size:16,
|
size:16,
|
||||||
},
|
},
|
||||||
|
// chosen:{
|
||||||
|
// node:(values, id, selected, hovering)=>{
|
||||||
|
// console.log(values);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
|
|
||||||
edges: {
|
edges: {
|
||||||
@@ -377,8 +388,13 @@
|
|||||||
values.middleArrow=true;
|
values.middleArrow=true;
|
||||||
values.middleArrowScale=1;
|
values.middleArrowScale=1;
|
||||||
values.middleArrowType='circle';
|
values.middleArrowType='circle';
|
||||||
|
this_.expressionsInfoShow=true;
|
||||||
|
console.log(values);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// label:(values, id, selected, hovering)=>{
|
||||||
|
// console.log(values,2222);
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
layout:{
|
layout:{
|
||||||
@@ -420,6 +436,7 @@
|
|||||||
});
|
});
|
||||||
this_.containerCanvas=document.querySelectorAll("#network_id canvas")[0];
|
this_.containerCanvas=document.querySelectorAll("#network_id canvas")[0];
|
||||||
this_.modelTopUpdate();
|
this_.modelTopUpdate();
|
||||||
|
this_.canvas=document.getElementsByTagName('canvas')[0];
|
||||||
},
|
},
|
||||||
resetAllNodes() {
|
resetAllNodes() {
|
||||||
this.setNetworkData(this.nodesArray,this.edgesArray);
|
this.setNetworkData(this.nodesArray,this.edgesArray);
|
||||||
@@ -785,14 +802,16 @@
|
|||||||
// this_.addLineShow=true;
|
// this_.addLineShow=true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.network.on("hoverEdge", function () { // 悬停边
|
this.network.on("hoverEdge", function (params,a) { // 悬停边
|
||||||
this_.hoverEdge=true;
|
this_.hoverEdge=true;
|
||||||
this_.cursorMove=true;
|
this_.cursorMove=true;
|
||||||
|
console.log(params,a);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.network.on("blurEdge", function () { // 边失去焦点
|
this.network.on("blurEdge", function () { // 边失去焦点
|
||||||
this_.hoverEdge=false;
|
this_.hoverEdge=false;
|
||||||
this_.cursorMove=false;
|
this_.cursorMove=false;
|
||||||
|
this_.expressionsInfoShow=false;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.network.on("dragStart", function (params) {//节点移动开始
|
this.network.on("dragStart", function (params) {//节点移动开始
|
||||||
@@ -841,6 +860,7 @@
|
|||||||
|
|
||||||
this.network.on("hoverNode", function () {//hoverNode
|
this.network.on("hoverNode", function () {//hoverNode
|
||||||
this_.cursorMove=true;
|
this_.cursorMove=true;
|
||||||
|
console.log(123123123);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.network.on("blurNode", function () {//blurNode
|
this.network.on("blurNode", function () {//blurNode
|
||||||
|
|||||||
@@ -264,7 +264,8 @@
|
|||||||
arr.forEach((item,index)=>{
|
arr.forEach((item,index)=>{
|
||||||
item.from=item.source;
|
item.from=item.source;
|
||||||
item.to=item.target;
|
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);
|
// item.dashes=(item.dashes?(new Array(100).fill(item.dashes[0])):item.dashes);
|
||||||
// if(index%2==0&&item.dashes){
|
// if(index%2==0&&item.dashes){
|
||||||
// item.dataFlow='left';
|
// item.dataFlow='left';
|
||||||
@@ -356,7 +357,7 @@
|
|||||||
height: calc(16% - 40px);
|
height: calc(16% - 40px);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 5px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
@@ -455,7 +456,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.label{
|
.label{
|
||||||
padding: 0 15px;
|
padding: 0 15px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user