perf:account配置操作及显示优化
1.telnet时禁用exporter 2.login option位置调整
This commit is contained in:
@@ -437,6 +437,13 @@ const en = {
|
||||
createModel: 'Create model',
|
||||
remark: 'Remark',
|
||||
type: 'Type'
|
||||
},
|
||||
mib:{
|
||||
mib:'Mib',
|
||||
fileName:'FileName',
|
||||
remark:'Remark',
|
||||
updateUser:'Update User',
|
||||
updateAt:'Update Time',
|
||||
}
|
||||
},
|
||||
alert: {
|
||||
|
||||
@@ -386,12 +386,12 @@
|
||||
</div>
|
||||
<div class="line-100 asset-line"></div>
|
||||
<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 v-if="!pageObj.id">
|
||||
<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>
|
||||
<div class="line-100 asset-line" style="margin-top: -16px;"></div>
|
||||
</template>
|
||||
@@ -617,6 +617,7 @@
|
||||
module:{},
|
||||
accountValideResult:true,
|
||||
changeProtocolSwitch:true,
|
||||
exporterDisableSwitch:false
|
||||
}
|
||||
},
|
||||
/*computed: {
|
||||
@@ -961,7 +962,6 @@
|
||||
} else {
|
||||
if(this.$refs.accountConfigBox&&this.$refs.accountConfigBox.length>0){
|
||||
this.$refs.accountConfigBox[0].validateAccount();
|
||||
console.log("accountValideResult-->"+this.accountValideResult)
|
||||
}
|
||||
let modelId = ''
|
||||
// let authType = ''
|
||||
@@ -1468,6 +1468,13 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
protocolTypeChange:function(protocol){
|
||||
if(protocol == 'TELNET'){
|
||||
this.exporterDisableSwitch=true;
|
||||
}else{
|
||||
this.exporterDisableSwitch=false;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserData()
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
}).then(() => {
|
||||
this.$delete('/cabinet?ids='+temp.cabinet.id).then(response=>{
|
||||
if(response.code == 200){
|
||||
this.esc();
|
||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||
this.$emit('after',this.cabinet.idcId)
|
||||
}else{
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</el-form>
|
||||
|
||||
<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">
|
||||
{{$t('asset.createAssetTab.userPwdIntroduce')}}
|
||||
</div>
|
||||
@@ -127,6 +127,7 @@ export default {
|
||||
changeProtocolType:function(protocolType){
|
||||
if(this.isAllowedChangeProtocol){
|
||||
this.account.protocol=protocolType;
|
||||
this.$emit('protocol-type-change',protocolType)
|
||||
}else{
|
||||
return ;
|
||||
}
|
||||
@@ -202,19 +203,19 @@ export default {
|
||||
.telnet-option{
|
||||
position: relative;
|
||||
}
|
||||
.telnet-option:before{
|
||||
content: "";
|
||||
.telnet-option_title .telnet-option_spilt{
|
||||
display: inline-block;
|
||||
width: 79.9%;
|
||||
height: 1px;
|
||||
background-color: lightgrey;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 18px;
|
||||
/*margin-bottom: 18px;*/
|
||||
}
|
||||
.telnet-option .telnet-option_title{
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 18px;
|
||||
width: 100%;
|
||||
}
|
||||
.auto-login-tip{
|
||||
font-size: 12px;
|
||||
|
||||
Reference in New Issue
Block a user