feat:model asset 新增同步按钮 & 图表xy轴字体大小调整
This commit is contained in:
Binary file not shown.
@@ -20,6 +20,9 @@ Created by iconfont
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="sync" unicode="" d="M293.312 208a32 32 0 0 0-31.296 38.816C287.488 363.39200000000005 392.64 448 512 448a256.96 256.96 0 0 0 220.768-126.592 32 32 0 1 0-55.168-32.384A192.768 192.768 0 0 1 512 384c-89.504 0-168.352-63.424-187.456-150.816a32 32 0 0 0-31.232-25.184zM512-64a256.288 256.288 0 0 0-223.072 130.592 32 32 0 1 0 55.744 31.392A192.352 192.352 0 0 1 512 0c89.504 0 168.352 63.424 187.456 150.816a32 32 0 0 0 62.496-13.632C736.512 20.607999999999947 631.36-64 512-64zM288-32a32 32 0 0 0-32 32v96a32 32 0 0 0 32 32h96a32 32 0 1 0 0-64h-64v-64a32 32 0 0 0-32-32zM736 256h-96a32 32 0 1 0 0 64h64v64a32 32 0 1 0 64 0v-96a32 32 0 0 0-32-32zM860.448 87.64800000000002a32 32 0 0 0-15.424 60.032A160.256 160.256 0 0 1 928 288a159.552 159.552 0 0 1-58.912 123.968 32 32 0 0 0-10.56 33.472c3.744 13.184 5.472 24.16 5.472 34.56 0 70.592-57.408 128-128 128-6.912 0-14.24-0.736-23.104-2.368a31.872 31.872 0 0 0-34.592 17.536C635.104 712.512 546.848 768 448 768c-141.152 0-256-114.848-256-256l0.416-7.264a31.936 31.936 0 0 0-13.76-27.04A192.224 192.224 0 0 1 96 320c0-63.424 31.328-122.72 83.744-158.624a32 32 0 0 0-36.128-52.832A256.16 256.16 0 0 0 32 320a256.16 256.16 0 0 0 96.096 199.776C132.224 692.64 274.144 832 448 832a317.376 317.376 0 0 0 277.056-160.384C728.768 671.8720000000001 732.448 672 736 672c105.888 0 192-86.112 192-192 0-10.464-0.992-20.96-3.136-32.128A223.168 223.168 0 0 0 992 288a224.128 224.128 0 0 0-116.192-196.384 31.68 31.68 0 0 0-15.36-3.968zM64 288a32 32 0 0 0-32 32c0 141.152 114.848 256 256 256a32 32 0 1 0 0-64c-105.888 0-192-86.112-192-192a32 32 0 0 0-32-32zM736 480a32 32 0 0 0-32 32c0 141.152-114.848 256-256 256a32 32 0 1 0 0 64c176.448 0 320-143.552 320-320a32 32 0 0 0-32-32z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="top" unicode="" d="M853.477 85.21900000000005c-9.846 0-19.667 3.904-26.948 11.639L511.978 431 197.449 97.44200000000001c-14.019-14.867-37.436-15.554-52.303-1.536-14.867 14.02-15.555 37.437-1.536 52.304l341.47 362.131a37.003 37.003 0 0 0 26.919 11.616h0.016a36.997 36.997 0 0 0 26.925-11.639l341.47-362.737c14.006-14.879 13.299-38.296-1.58-52.302-7.143-6.726-16.259-10.06-25.353-10.06zM853.47 608.781H170.53c-20.435 0-37 16.565-37 37s16.565 37 37 37h682.94c20.435 0 37-16.565 37-37s-16.565-37-37-37z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 71 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -2016,3 +2016,10 @@ li{
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.chart-no-data{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
width:100%;
|
||||
text-align:center;
|
||||
color:#52545c;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<div class="line-area" ref="lineChartArea" :id="'lineChartArea'+chartIndex" v-show="firstShow" style="width:100%;"></div>
|
||||
<div style="position: absolute;top:50%;left:50%;" v-show="noData">No data</div>
|
||||
<div class="chart-no-data" v-show="noData">No data</div>
|
||||
<div class="legend-container" id="legendArea" ref="legendArea" v-show="firstShow" v-scrollBar:legend>
|
||||
<div v-for="(item, index) in legendList" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGrey[index]}" :key="'legend_' + item.name+'_'+index">
|
||||
<span class="legend-shape" :style="{background:(isGrey[index]?'#D3D3D3':bgColorList[index])}"></span>{{item.alias?item.alias:item.name}}
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-area" ref="screenShowArea" id="screenShowArea" style="margin-top:0px;" @mouseenter="mouseEnterFullChart" @mouseleave="mouseLeaveFullChart"></div>
|
||||
<div style="position: absolute;top:50%;left:50%;" v-show="noData">No data</div>
|
||||
<div class="chart-no-data" v-show="noData">No data</div>
|
||||
<div class="legend-container legend-container-screen" :id="'screenLegendArea'+chartIndex" @mouseenter="mouseEnterFullChart" @mouseleave="mouseLeaveFullChart" v-show="showLegend" v-scrollBar:legend>
|
||||
<div v-for="(item, index) in screenLegendList" :title="item.alias?item.alias:item.name" @click="clickScreenLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGreyScreen[index]}" :key="'legend_' + item.name+'_'+index">
|
||||
<span class="legend-shape" :style="{background:(isGreyScreen[index]?'#D3D3D3':bgColorList[index])}"></span>{{item.alias?item.alias:item.name}}
|
||||
@@ -589,6 +589,8 @@
|
||||
interval: '0',
|
||||
showMaxLabel:false,
|
||||
rotate: 0,
|
||||
show:true,
|
||||
fontSize: 10,
|
||||
formatter: function (value) {
|
||||
value = bus.computeTimezone(value);
|
||||
let t_date = new Date(value);
|
||||
@@ -652,6 +654,8 @@
|
||||
},
|
||||
//去掉y轴--end
|
||||
axisLabel: {
|
||||
show:true,
|
||||
fontSize: 10,
|
||||
formatter: function(value,index){
|
||||
let chartUnit=chartInfo.unit;
|
||||
chartUnit=chartUnit?chartUnit:2;
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||
<i class="nz-icon-create-square nz-icon"></i>
|
||||
</button>
|
||||
|
||||
<button @click="syncChart" :title="$t('overall.syncChart')" v-if="from == 'asset'||from == 'model'" style="margin-left: 20px;"
|
||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||
<i class="nz-icon-sync nz-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -411,7 +416,23 @@
|
||||
},
|
||||
clearInput:function(){
|
||||
this.$refs.queryPanel.focus();
|
||||
}
|
||||
},
|
||||
syncChart:function(){
|
||||
if(this.from=='asset'||this.from=='model'){
|
||||
let param={
|
||||
modelId:this.from=='model'?this.obj.id:null,
|
||||
assetId:this.from=='asset'?this.obj.id:null,
|
||||
}
|
||||
this.$put('/model/syncChart',param).then(response=>{
|
||||
if(response.code == 200){
|
||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")});
|
||||
}else{
|
||||
console.error(response.msg)
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted: function () {
|
||||
this.onScroll();
|
||||
|
||||
@@ -69,7 +69,8 @@ const cn = {
|
||||
reset: "重置",
|
||||
submit: "提交",
|
||||
noData:'没有数据',
|
||||
tag: '标签'
|
||||
tag: '标签',
|
||||
syncChart:'同步图表',
|
||||
},
|
||||
webshell: {
|
||||
shellTitle: "本地 Shell",
|
||||
@@ -339,7 +340,8 @@ const cn = {
|
||||
downloadSuccess: "下载成功",
|
||||
uploadSuccess: "上传成功",
|
||||
pressEnterToAdd: "回车添加新行",
|
||||
resetSuccess: "重置成功"
|
||||
resetSuccess: "重置成功",
|
||||
syncSuccess:'同步成功',
|
||||
},
|
||||
asset: {
|
||||
asset: "资产",
|
||||
|
||||
@@ -76,7 +76,8 @@ const en = {
|
||||
submit:'Submit',
|
||||
noData:'No data',
|
||||
tag: 'Tag',
|
||||
placeHolder:'please enter'
|
||||
placeHolder:'please enter',
|
||||
syncChart:'Synchronize chart',
|
||||
},
|
||||
pageSize: '/page',
|
||||
webshell:{
|
||||
@@ -358,6 +359,7 @@ const en = {
|
||||
uploadSuccess: 'Upload success',
|
||||
pressEnterToAdd: 'Press enter to add new line',
|
||||
resetSuccess:'Reset success',
|
||||
syncSuccess:'Synchronize success'
|
||||
},
|
||||
asset:{
|
||||
asset: 'Asset',
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="chart-header">{{chartTitle}}</div>
|
||||
|
||||
<div class="chart-body" ref="chartBody" :id="chartId" ></div>
|
||||
<div style="position: absolute;top:50%;left:50%;" v-show="noData">No data</div>
|
||||
<div class="chart-no-data" v-show="noData">No data</div>
|
||||
|
||||
<div class="legend-container legend-container-screen" id="legendArea" ref="legendArea" v-show="legend.length>0" v-scrollBar:legend>
|
||||
<div v-for="(item, index) in legend" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':item.isGray}" :key="'legend_' + item.name+'_'+index">
|
||||
|
||||
@@ -207,7 +207,8 @@
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: 13*window.devicePixelRatio
|
||||
show:true,
|
||||
fontSize: 10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
@@ -220,13 +221,14 @@
|
||||
},
|
||||
data: [],
|
||||
axisLabel: {
|
||||
show:true,
|
||||
formatter: function(value) {
|
||||
if (value.length > 12) {
|
||||
return value.substring(0, 9) + "...";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
fontSize: 12*window.devicePixelRatio
|
||||
fontSize: 10
|
||||
},
|
||||
triggerEvent: true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user