perf:account配置操作及显示优化

1.telnet时禁用exporter
2.login option位置调整
This commit is contained in:
wangwenrui
2020-03-13 15:59:23 +08:00
parent 36cc264b18
commit f70de42918
4 changed files with 23 additions and 7 deletions

View File

@@ -437,6 +437,13 @@ const en = {
createModel: 'Create model', createModel: 'Create model',
remark: 'Remark', remark: 'Remark',
type: 'Type' type: 'Type'
},
mib:{
mib:'Mib',
fileName:'FileName',
remark:'Remark',
updateUser:'Update User',
updateAt:'Update Time',
} }
}, },
alert: { alert: {

View File

@@ -386,12 +386,12 @@
</div> </div>
<div class="line-100 asset-line"></div> <div class="line-100 asset-line"></div>
<template v-if="accountSwitch"> <template v-if="accountSwitch">
<account-config-box v-for="(item,index) in assetData.accounts" :is-edit="!tabView" :account="item" :key="index" ref="accountConfigBox" @setValidateResult="setAccountValideResult" :is-allowed-change-protocol="changeProtocolSwitch"></account-config-box> <account-config-box v-for="(item,index) in assetData.accounts" :is-edit="!tabView" :account="item" :key="index" ref="accountConfigBox" @setValidateResult="setAccountValideResult" :is-allowed-change-protocol="changeProtocolSwitch" @protocol-type-change="protocolTypeChange"></account-config-box>
</template> </template>
<template v-if="!pageObj.id"> <template v-if="!pageObj.id">
<el-form-item :label="$t('asset.createAssetTab.exporter')" class="exporter-label"> <el-form-item :label="$t('asset.createAssetTab.exporter')" class="exporter-label">
<el-switch class="exporter-switch" v-model="assetData.exporter" active-color="#ee9d3f" active-value="1" inactive-value="0"></el-switch> <el-switch class="exporter-switch" v-model="assetData.exporter" active-color="#ee9d3f" active-value="1" inactive-value="0" :disabled="exporterDisableSwitch"></el-switch>
</el-form-item> </el-form-item>
<div class="line-100 asset-line" style="margin-top: -16px;"></div> <div class="line-100 asset-line" style="margin-top: -16px;"></div>
</template> </template>
@@ -617,6 +617,7 @@
module:{}, module:{},
accountValideResult:true, accountValideResult:true,
changeProtocolSwitch:true, changeProtocolSwitch:true,
exporterDisableSwitch:false
} }
}, },
/*computed: { /*computed: {
@@ -961,7 +962,6 @@
} else { } else {
if(this.$refs.accountConfigBox&&this.$refs.accountConfigBox.length>0){ if(this.$refs.accountConfigBox&&this.$refs.accountConfigBox.length>0){
this.$refs.accountConfigBox[0].validateAccount(); this.$refs.accountConfigBox[0].validateAccount();
console.log("accountValideResult-->"+this.accountValideResult)
} }
let modelId = '' let modelId = ''
// let authType = '' // let authType = ''
@@ -1468,6 +1468,13 @@
} }
} }
}, },
protocolTypeChange:function(protocol){
if(protocol == 'TELNET'){
this.exporterDisableSwitch=true;
}else{
this.exporterDisableSwitch=false;
}
}
}, },
mounted() { mounted() {
this.getUserData() this.getUserData()

View File

@@ -171,6 +171,7 @@
}).then(() => { }).then(() => {
this.$delete('/cabinet?ids='+temp.cabinet.id).then(response=>{ this.$delete('/cabinet?ids='+temp.cabinet.id).then(response=>{
if(response.code == 200){ if(response.code == 200){
this.esc();
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
this.$emit('after',this.cabinet.idcId) this.$emit('after',this.cabinet.idcId)
}else{ }else{

View File

@@ -50,7 +50,7 @@
</el-form> </el-form>
<div class="telnet-option" v-show="isEdit && account.protocol=='TELNET'"> <div class="telnet-option" v-show="isEdit && account.protocol=='TELNET'">
<div class="telnet-option_title clickable" @click="isShowTelnetOption">login option<i style="font-size: 12px;" :class="{'el-icon-arrow-left':!showTelnetOption,'el-icon-arrow-down':showTelnetOption}"></i></div> <div class="telnet-option_title clickable" @click="isShowTelnetOption">login option<div class="telnet-option_spilt"></div><i style="font-size: 12px;" :class="{'el-icon-arrow-left':!showTelnetOption,'el-icon-arrow-down':showTelnetOption}"></i></div>
<div v-show="isEdit && account.protocol=='TELNET' && showTelnetOption" class="auto-login-tip"> <div v-show="isEdit && account.protocol=='TELNET' && showTelnetOption" class="auto-login-tip">
{{$t('asset.createAssetTab.userPwdIntroduce')}} {{$t('asset.createAssetTab.userPwdIntroduce')}}
</div> </div>
@@ -127,6 +127,7 @@ export default {
changeProtocolType:function(protocolType){ changeProtocolType:function(protocolType){
if(this.isAllowedChangeProtocol){ if(this.isAllowedChangeProtocol){
this.account.protocol=protocolType; this.account.protocol=protocolType;
this.$emit('protocol-type-change',protocolType)
}else{ }else{
return ; return ;
} }
@@ -202,19 +203,19 @@ export default {
.telnet-option{ .telnet-option{
position: relative; position: relative;
} }
.telnet-option:before{ .telnet-option_title .telnet-option_spilt{
content: "";
display: inline-block; display: inline-block;
width: 79.9%; width: 79.9%;
height: 1px; height: 1px;
background-color: lightgrey; background-color: lightgrey;
vertical-align: middle; vertical-align: middle;
margin-bottom: 18px; /*margin-bottom: 18px;*/
} }
.telnet-option .telnet-option_title{ .telnet-option .telnet-option_title{
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-bottom: 18px; margin-bottom: 18px;
width: 100%;
} }
.auto-login-tip{ .auto-login-tip{
font-size: 12px; font-size: 12px;