feat:下拉增加默认参数

This commit is contained in:
zhangyu
2020-12-25 10:39:53 +08:00
parent 3f4b1af39b
commit 5dd5b388c1
5 changed files with 18 additions and 10 deletions

View File

@@ -178,7 +178,7 @@
</div>
<!--删除弹窗-->
<div class="export-xlsx">
<el-dialog :visible.sync="deleteBox.show" :title="$t('alert.list.remark')" :modal-append-to-body='false' :show-close="true" width="450px" @close="closeDialog" class="nz-message">
<el-dialog :visible.sync="deleteBox.show" :title="$t('alert.list.remark')" :modal-append-to-body='false' :show-close="true" width="450px" @close="closeDialog" class="nz-message" @opened="openedDialog">
<div class="upload-body">
<el-form ref="remarkForm" :model="deleteBox">
<el-form-item prop="remark" :rules="[{required:true,message: $t('validate.required'), trigger: 'change'}]">
@@ -656,6 +656,9 @@
showExportDialog() {
this.importBox.show = true;
},
openedDialog(){
this.$refs.remarkForm.clearValidate()
},
closeDialog() {
this.importBox.show = false;
this.deleteBox.show = false;

View File

@@ -219,7 +219,7 @@
id: '',
sn: '',
host: '',
state: '',
state: 1,
purchaseDate: '',
idcId: '',
cabinetId: '',
@@ -234,15 +234,16 @@
accounts: [],
},
editAlertRule: {
id: "",
id: '',
alertName: '',
type: '',
linkObject: {id: '', name: ''},
expr: '',
last: '',
severity: '',
unit:2,
operator: '>',
last: 60,
severity: 'P2',
summary: '',
description: '',
receiver: '',
},
createMenu: [ //新增按钮内容
{

View File

@@ -468,7 +468,7 @@
},
getDcData() {
return new Promise(resolve => {
this.$get('idc').then(response => {
this.$get('idc?pageSize=-1').then(response => {
if (response.code === 200) {
this.dcData = response.data.list;
}
@@ -504,6 +504,9 @@
this.$get('sys/dict/all?type=assetType&pageSize=-1').then(response => {
if (response.code === 200) {
this.assetTypeData = response.data;
if(this.editAsset.model&&!this.editAsset.model.type.code){
this.editAsset.model.type.code=response.data[0].value;
}
}
resolve(this.assetTypeData);
});

View File

@@ -243,7 +243,7 @@
id: '',
sn: '',
host: '',
state: '',
state: 1,
purchaseDate: '',
idcId: '',
cabinetId: '',

View File

@@ -1342,11 +1342,12 @@
}else {
this.setIsOtherChart();
if(chartType === 'bar'||chartType === 'line'||chartType === 'stackArea'){
this.editChart.param={nullType:this.editChart.param.nullType,threshold:'',legendValue:{min:'off',max:'off',avg:'off',last:'off',total:'off'}}
this.editChart.param={nullType:'connected',threshold:'',legendValue:{min:'off',max:'off',avg:'off',last:'off',total:'off'}}
}else if(chartType == 'table'){
this.$set(this.editChart.param,'last',0)
this.editChart.param={
statistics:'',
nullType:'connected',
valueMapping:{
type:'value',
mapping:[{text:'',value:'',color:{bac:'#fff',text:'#000'}}]