fix:修改 查询机柜的参数

This commit is contained in:
zhangyu
2021-05-27 14:09:02 +08:00
parent 7e0083d0df
commit 4fca3c43db
7 changed files with 27 additions and 8 deletions

View File

@@ -1,5 +1,8 @@
<style lang="scss">
@import './webSSH.scss';
.config-dropdown.w260{
width: 260px;
}
</style>
<template>
<!-- <div id="shell-service" data-yunlog-scope="popup" :class="{'shell-service-max': isFullScreen,'shell-service':true}" v-show="consoleShow">
@@ -227,7 +230,7 @@
</el-select>
</el-form-item>
<el-form-item :label='$t("webshell.authType")' prop="authType" @change="authTypeChange" >
<el-select value-key="id" popper-class="config-dropdown" v-model="customConnect.authType" :disabled="customConnect.authProtocol === 2" placeholder="" size="small" id="webshell-box-input-protocol">
<el-select value-key="id" popper-class="config-dropdown w260" v-model="customConnect.authType" :disabled="customConnect.authProtocol === 2" placeholder="" size="small" id="webshell-box-input-protocol">
<el-option v-for="item in authType" :id="'dc-principal-op-'+item.value" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@@ -363,7 +366,15 @@ export default {
},
columns: [
{ title: 'id', data: 'id' },
{ title: 'name', data: 'name' },
{
title: 'name',
data: function (row) {
if (row.name.length > 15) {
return row.name.substring(0, 12) + '...'
}
return row.name
}
},
{ title: 'Manage Ip', data: 'manageIp' },
{
title: 'Type',

View File

@@ -111,7 +111,7 @@ export default {
handler (n) {
if (n) {
this.currentDc = JSON.parse(JSON.stringify(n))
this.searchLabel = { dcId: this.currentDc.id }
this.searchLabel = { dcIds: this.currentDc.id }
this.getTableData()
}
}

View File

@@ -139,3 +139,7 @@ export function uSize (rule, value, callback) {
}
}, 100)
}
export function longAndLat (rule, value, callback) { // 校验经纬度
}

View File

@@ -118,7 +118,7 @@ export default {
if (this.cabinetInfos.has(cabinetKey) && this.cabinetInfos.get(cabinetKey) && this.cabinetInfos.get(cabinetKey).length > 0) {
this.showCabinetInfos = this.cabinetInfos.get(cabinetKey)
} else {
this.$get('dc/cabinet?pageSize=-1&dcId=' + dc.id).then(response => {
this.$get('dc/cabinet?pageSize=-1&dcIds=' + dc.id).then(response => {
if (response.code == 200) {
this.cabinetInfos.set(cabinetKey, response.data.list)
this.showCabinetInfos = response.data.list

View File

@@ -72,7 +72,7 @@ export default {
this.prevent_opt.save = true
this.$refs.cabinetForm.validate(valid => {
if (valid) {
this.editCabinet.dcId = this.currentDc.id
this.editCabinet.dcIds = this.currentDc.id
if (this.editCabinet.id) {
this.$put('/dc/cabinet', this.editCabinet).then(res => {
this.prevent_opt.save = false

View File

@@ -38,7 +38,7 @@
<span v-if="item.prop==='varType'">{{scope.row[item.prop]===1?'Asset':'endpoint'}}</span>
<span v-else-if="item.prop==='type'">
<i :class="typeIcon(scope.row)"/>
{{chartTypeList.find(title=>title.value === scope.row[item.prop]).label}}
{{findTypeLabel(scope.row)}}
</span>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template>
@@ -144,6 +144,10 @@ export default {
break
}
return str
},
findTypeLabel (row) {
const typeItem = this.chartTypeList.find(title => title.value === row.type)
return typeItem ? typeItem.label : '-'
}
}
}

View File

@@ -45,7 +45,7 @@
<template v-else-if="item.prop === 'state'">
<el-switch
v-model="scope.row.state"
:disabled="!hasButton('dc_toEdit') || !hasButton('dc_toEdit')"
:disabled="!hasButton('dc_edit') || !hasButton('dc_edit')"
active-color="#ee9d3f"
active-value="ON"
inactive-value="OFF"
@@ -89,7 +89,7 @@
fixed="right">
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
<div slot-scope="scope" class="table-operation-items">
<button class="table-operation-item" v-has="'dc_toEdit'" @click="tableOperation(['edit', scope.row])"><i class="nz-icon nz-icon-edit"></i></button>
<button class="table-operation-item" v-has="'dc_edit'" @click="tableOperation(['edit', scope.row])"><i class="nz-icon nz-icon-edit"></i></button>
<el-dropdown size="medium" v-has="['dc_delete']" trigger="hover" @command="tableOperation">
<div class="table-operation-item table-operation-item--more">
<span></span><i class="nz-icon nz-icon-arrow-down"></i>