Merge remote-tracking branch 'origin/codeCheck' into codeCheck

This commit is contained in:
chenjinsong
2020-11-26 14:16:53 +08:00
8 changed files with 52 additions and 41 deletions

View File

@@ -414,10 +414,10 @@ function timeCompute(value,unit,dot=0){
}
function timeFormat34(value) {
return bus.timeFormate(value, "yyyy-MM-dd hh:mm:ss");
return bus.timeFormate(parseInt(value), "yyyy-MM-dd hh:mm:ss");
}
function timeFormat35(value) {
return bus.timeFormate(value, "MM/dd/yyyy h:mm:ss a");
return bus.timeFormate(parseInt(value), "MM/dd/yyyy h:mm:ss a");
}
//unit转化配置信息
/*

View File

@@ -3,7 +3,7 @@
text-align: center;
margin-top: 16px;
}
.nz-table /deep/ .el-table{
.plTableBox.nz-table /deep/ .el-table{
display: block !important;
}
@@ -61,7 +61,7 @@
<div class="table-header-inner" @click="clearSelectedMetrics"><span><i style="font-size: 12px;margin-left: 2px;" class="nz-icon nz-icon-close " :class="{'control-icon-unchecked':selectedEndpoints.length<1,'control-icon-checked':selectedEndpoints.length>0}"></i></span></div>
<pl-table :row-height="28" use-virtual :datas="tableData" border :empty-text="$t('config.mib.noData')" :header-cell-class-name="cellClass" :style="{height: $tableHeight.noPagination}"
class="nz-table endpoint-query-table" style="width: 100%;" v-loading="loading" v-scrollBar:el-table="'large'" :pagination-show="false" ref="endpointQueryTable"
@selection-change="selectChange" v-if="tableShow && plTableSHow" :border="true">
@selection-change="selectChange" v-if="tableShow && plTableSHow" :border="true" :tooltip-effect="'light'">
<pl-table-column
type="selection"
width="39"
@@ -74,6 +74,7 @@
:resizable="true"
:min-width="1000"
column-key="element"
:show-overflow-tooltip="true"
:label="$t('project.endpoint.element')">
<template v-slot="scope">
<el-popover trigger="click" placement="right" v-if="typeof scope.row.metricTip != 'undefined' && scope.row.metricTip != null">
@@ -655,6 +656,7 @@
plpsscrolly(self){
let el = self.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
self.scrollTop=el.scrollTop;
console.log(self.scrollTop);
if (el._ps_.scrollbarYTop > 50) {
self.showTopBtn = true;
self.tableHover = true;
@@ -663,17 +665,19 @@
self.tableHover = false;
}
},
tableResize(self){
let el = self.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
el.removeEventListener("ps-scroll-y", this.plpsscrolly);
self.plTableSHow=false;
self.$nextTick(()=>{
self.plTableSHow=true;
setTimeout(()=>{
el = self.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
el.addEventListener("ps-scroll-y", this.plpsscrolly.bind('',self));
el.scrollTop = self.scrollTop;
},100)
tableResize(){
let el = this.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
el.removeEventListener("ps-scroll-y", this.plpsscrolly.bind('',this));
this.plTableSHow=false;
this.$nextTick(()=>{
this.plTableSHow=true;
this.$nextTick(()=>{
el = this.$refs.endpointQueryTable.$el.querySelector(".el-table__body-wrapper");
el.addEventListener("ps-scroll-y", this.plpsscrolly.bind('',this));
setTimeout(()=>{
el.scrollTop = this.scrollTop;
},100)
});
});
}
},
@@ -708,7 +712,7 @@
}, 300);
//});
window.addEventListener('resize', this.tableResize.bind('',this));
window.addEventListener('resize', this.tableResize);
},
beforeDestroy(){
window.removeEventListener('resize', this.tableResize);

View File

@@ -742,7 +742,7 @@ const cn = {
link: {
link:'Link',
name: "名称",
url: "URL",
url: "Url",
operation: "操作",
add: "添加",
update: "更新",

View File

@@ -50,7 +50,7 @@ const en = {
changePwd:'Change password',//修改密码
createChart:'Create chart',
createProject:'Create project',
createEndpoint:'Create Endpoint',
createEndpoint:'Create endpoint',
createAsset:'Create asset',
createAlertRule:'Create alert rule',
createAccount:'Create account',
@@ -531,7 +531,7 @@ const en = {
lastReply:'Ping last reply',
modules: 'Endpoint',//'组件'
alerts: 'Alerts',//'告警信息'
dataCenter: 'Data Center',//DC
dataCenter: 'Data center',//DC
cabinet: 'Cabinet',//'机柜'
model: 'Model',//'型号'
vendor: 'Vendor',//'厂商'
@@ -678,7 +678,7 @@ const en = {
},
mib:{
mib:'SNMP MIB',
fileName:'FileName',
fileName:'File name',
remark:'Remark',
updateUser:'Update user',
updateAt:'Update time',
@@ -707,7 +707,7 @@ const en = {
systemName:'System name',
curUrl:'Current site URL',
timezone:'Timezone',
defaultCabinetUsize:'Cabinet U Size',
defaultCabinetUsize:'Cabinet U size',
second:'second',
day:'day',
maxSeries:'Query max series',
@@ -732,7 +732,7 @@ const en = {
},
terminal:{
terminal:'Terminal',
terminalNum:'Max Terminal Number'
terminalNum:'Max terminal number'
},
ldap:{
ldap:'LDAP',
@@ -741,13 +741,13 @@ const en = {
pwd:'Password',
ou:'User OU',
filter:'User filter',
map:'LDAP Field Mapping',
active:'LDAP Authentication'
map:'LDAP field mapping',
active:'LDAP authentication'
},
link: {
link:'Link',
name: "Name",
filePath: "FilePath",
url: "Url",
operation: "Operation",
add: "Add",
update: "Update",
@@ -917,8 +917,8 @@ const en = {
selTwoNode:'Please select two module',
save:'save',
cancel:'cancel',
addLine:'Add Line',
editLine:'Edit Line',
addLine:'Add line',
editLine:'Edit line',
lineName:'Line Name',
width:'thickness',
dashes:'dotted line',
@@ -927,8 +927,8 @@ const en = {
color:'color',
chartName:'Name',
unit:'Unit',
addModule:'Add Module',
editModule:'Edit Module',
addModule:'Add module',
editModule:'Edit module',
edit:'edit',
refresh:'refresh',
endpoint:'Endpoint',

View File

@@ -401,7 +401,7 @@
method: "password",
password: "",
key: "",
passwordKey: ""
keyPassword: ""
}
});
} else if (type == "TELNET") {

View File

@@ -37,6 +37,7 @@
@select="selectAsset"
@change.native="inputAsset"
size="small"
:disabled="true"
value-key="host"
popper-class="no-style-class"
style="width: 100%;"

View File

@@ -620,6 +620,16 @@
document.onmousemove = null;
}
},
domResize(){
let scrollTop=this.$refs['resultTable'].$el.querySelector(".el-table__body-wrapper").scrollTop;
this.showTable=false;
this.$nextTick(()=>{
this.showTable=true;
this.$nextTick(()=>{
this.$refs['resultTable'].$el.querySelector(".el-table__body-wrapper").scrollTop=scrollTop
})
})
},
exportXlsx() {
if (this.resultData.length == 0) {
return;
@@ -641,20 +651,16 @@
)
} catch (e) {}
return out
}
},
},
mounted() {
this.getWalkData();
this.getModelData();
this.getAssetData();
window.onresize=()=>{
console.log(123123,this);
this.showTable=false;
this.$nextTick(()=>{
this.showTable=true;
// this.$refs['resultTable'].doLayout();
})
}
window.addEventListener('resize',this.domResize);
},
beforeDestroy(){
window.removeEventListener('resize',this.domResize);
}
}
</script>
@@ -874,7 +880,7 @@
}
</style>
<style scoped>
.nz-table /deep/ .el-table{
.plTableBox.nz-table /deep/ .el-table{
display: block !important;
}
</style>

View File

@@ -156,7 +156,7 @@
show: true,
width: 80
}, {
label: 'Data Center',
label: this.$t("config.dc.dc"),
prop: 'idc',
show: true,
}, {