fix:修复asset配置是,location无校验信息的bug & 左侧动态菜单样式调整
This commit is contained in:
Binary file not shown.
@@ -20,6 +20,12 @@ Created by iconfont
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="push-pin-line" unicode="" d="M768 768v-85.333333h-42.666667v-256l85.333334-128v-85.333334h-256v-298.666666h-85.333334v298.666666H213.333333v85.333334l85.333334 128V682.666667H256V768h512zM384 682.666667v-281.856L315.904 298.666667h392.192L640 400.810667V682.666667H384z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="push-pin-fill" unicode="" d="M768 768v-85.333333h-42.666667v-256l85.333334-128v-85.333334h-256v-298.666666h-85.333334v298.666666H213.333333v85.333334l85.333334 128V682.666667H256V768z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="funnel" unicode="" d="M995.555556 99.55555600000002h-227.555556c-17.066667 0-28.444444-11.377778-28.444444-28.444445s11.377778-28.444444 28.444444-28.444444h227.555556c17.066667 0 28.444444 11.377778 28.444444 28.444444s-11.377778 28.444444-28.444444 28.444445zM995.555556 270.222222h-227.555556c-17.066667 0-28.444444-11.377778-28.444444-28.444444s11.377778-28.444444 28.444444-28.444445h227.555556c17.066667 0 28.444444 11.377778 28.444444 28.444445s-11.377778 28.444444-28.444444 28.444444zM739.555556 412.444444c0-17.066667 11.377778-28.444444 28.444444-28.444444h227.555556c17.066667 0 28.444444 11.377778 28.444444 28.444444s-11.377778 28.444444-28.444444 28.444445h-227.555556c-17.066667 0-28.444444-11.377778-28.444444-28.444445zM904.533333 804.977778c-5.688889 17.066667-28.444444 34.133333-51.2 34.133333H56.888889c-22.755556 0-45.511111-11.377778-51.2-34.133333s0-45.511111 17.066667-62.577778l295.822222-273.066667v-409.6c0-22.755556 11.377778-39.822222 34.133333-51.2l142.222222-68.266666c0-11.377778 11.377778-11.377778 17.066667-11.377778 11.377778 0 22.755556 5.688889 28.444444 5.688889 22.755556 11.377778 28.444444 34.133333 28.444445 51.2V469.333333l318.577778 273.066667c22.755556 11.377778 28.444444 39.822222 17.066666 62.577778zM512 492.088889V-14.222221999999988l-142.222222 68.266666V492.088889L56.888889 782.222222h796.444444L512 492.088889z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -67,7 +67,8 @@ const cn = {
|
||||
failedDetail: "失败详情"
|
||||
},
|
||||
reset: "重置",
|
||||
submit: "提交"
|
||||
submit: "提交",
|
||||
noData:'没有数据',
|
||||
},
|
||||
webshell: {
|
||||
shellTitle: "本地 Shell",
|
||||
@@ -286,7 +287,8 @@ const cn = {
|
||||
domain: "不合法的域名",
|
||||
usize: "必须是(1 - 49)的数字",
|
||||
url: "不合法的URL",
|
||||
uSize: "必须是(1 - 47)的数字"
|
||||
uSize: "必须是(1 - 47)的数字",
|
||||
requiredIdc:'机房为必选项'
|
||||
},
|
||||
search: {
|
||||
searchTip: "点击或回车执行搜索",
|
||||
|
||||
@@ -71,7 +71,8 @@ const en = {
|
||||
failedDetail:'Failed Detail'
|
||||
},
|
||||
reset:'Reset',
|
||||
submit:'Submit'
|
||||
submit:'Submit',
|
||||
noData:'No data'
|
||||
},
|
||||
pageSize: '/page',
|
||||
webshell:{
|
||||
@@ -287,7 +288,8 @@ const en = {
|
||||
fileSize:'文件过大',//File exceed max size.
|
||||
port:'Invalid Port',
|
||||
url:'Invalid URL',
|
||||
uSize:'Must be number(1 - 47)'
|
||||
uSize:'Must be number(1 - 47)',
|
||||
requiredIdc:'dc is required'
|
||||
},
|
||||
search: {
|
||||
searchTip: 'Enter to search',//'点击或回车执行搜索'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<slot name="content-left"></slot>
|
||||
<div @click="toggleStat" class="bottom-icon">
|
||||
<div class="bottom-divider"></div>
|
||||
<div style="display: inline-block;float: right"><i style="font-size: 16px;" :class="{'el-icon-d-arrow-right':isShrink,'el-icon-d-arrow-left':!isShrink}"></i></div>
|
||||
<div style="display: inline-block;float: right"><i style="font-size: 16px;" :class="{'nz-icon nz-icon-push-pin-line':isShrink,'nz-icon nz-icon-push-pin-fill':!isShrink}" :style="{color:!isShrink?'#EE9D3F':''}"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right right-slot" :class="{'right-slot-open':isShrink}">
|
||||
@@ -78,15 +78,25 @@
|
||||
bottom: 15px;
|
||||
left: 0px;
|
||||
}
|
||||
.left-slot .bottom-icon i{
|
||||
visibility: hidden;
|
||||
}
|
||||
.left-slot .bottom-icon:hover{
|
||||
i{
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
.left-slot .bottom-icon i:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bottom-icon .bottom-divider{
|
||||
display: inline-block;
|
||||
height: 1px;
|
||||
width: 175px;
|
||||
border-top: 1px solid lightgrey;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
}
|
||||
.content .left-slot-shrink:hover{
|
||||
width: 200px;
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<div class="right-box-sub-title">{{$t('asset.createAssetTab.location')}}</div>
|
||||
<div class="line-100 right-box-line"></div>
|
||||
<!------------------------------------------IDC---------------------------------------------->
|
||||
<el-form-item :label="$t('asset.createAssetTab.location')">
|
||||
<el-form-item :label="$t('asset.createAssetTab.location')" prop="locationInfo" :rules="[{validator:locationValidator,trigger:'blur'}]">
|
||||
<location-cascader :disabled="assetData.modelId !=''?false:true" :default-model-u-size="modelSize" @change="setLocationData" :init-data="initLocationData" ref="locationCascader"></location-cascader>
|
||||
</el-form-item>
|
||||
<!--<el-form-item :label="$t('asset.createAssetTab.dcName')" class="right-box-form-content" prop="idcId">
|
||||
@@ -578,6 +578,18 @@
|
||||
setLocationData:function(data){
|
||||
this.locationInfo=data;
|
||||
},
|
||||
locationValidator:function(rule, value, callback){
|
||||
let $temp=this;
|
||||
setTimeout(()=>{
|
||||
if(!this.locationInfo){
|
||||
callback(new Error($temp.$t('validate.requiredIdc')))
|
||||
}else if(this.locationInfo && !this.locationInfo.idc){
|
||||
callback(new Error($temp.$t('validate.requiredIdc')))
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
},100)
|
||||
},
|
||||
modelChange:function(ids){
|
||||
let modelId=ids[1];
|
||||
let model=this.allModelUlData.find((item,index)=>{
|
||||
@@ -751,6 +763,7 @@
|
||||
host:'',
|
||||
port:'',
|
||||
},
|
||||
locationInfo:null,
|
||||
accounts: [{
|
||||
id: '',
|
||||
authType: 1,
|
||||
@@ -791,10 +804,19 @@
|
||||
if (this.assetData.modelId) {
|
||||
this.assetData.modelId = this.assetData.modelId.join(',').split(',')[1];
|
||||
}
|
||||
if(this.locationInfo){
|
||||
if(this.locationInfo.idc){
|
||||
this.assetData.idcId=this.locationInfo.idc.id;
|
||||
}
|
||||
if(this.locationInfo.cabinet){
|
||||
this.assetData.cabinetId=this.locationInfo.cabinet.id;
|
||||
}
|
||||
if(this.locationInfo.u&&this.locationInfo.u.length>0){
|
||||
this.assetData.cabinetStart=this.locationInfo.u[0];
|
||||
this.assetData.cabinetEnd=this.locationInfo.u[1];
|
||||
}
|
||||
}
|
||||
|
||||
// let modelId = this.assetData.modelId.join(',').split(',')[1];
|
||||
// let form = new FormData();
|
||||
// form.append("id", this.pageObj.id);
|
||||
|
||||
@@ -292,7 +292,6 @@
|
||||
console.log(this.uChecked)
|
||||
this.oldUChecked=this.uChecked;
|
||||
this.selectedData.u=this.findOldCheckedMinMax(this.uChecked);
|
||||
this.$emit('change',this.selectedData);
|
||||
},
|
||||
clearUChecked:function(){ //取消所有选中,恢复到刚打开时的状态
|
||||
this.uChecked=[];
|
||||
@@ -387,7 +386,13 @@
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
|
||||
selectedData:{
|
||||
immediate:true,
|
||||
deep:true,
|
||||
handler(n,o){
|
||||
this.$emit('change',n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user