NEZ-2015 fix: asset / entpoint detail 页面操作 增加 Edit dashboard 按钮
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<div class="container__form">
|
||||
<el-form ref="form" :model="editPanel" :rules="rules" label-position = "top" label-width="120px" size="small">
|
||||
<el-form-item :label='$t("overall.name")' prop="name">
|
||||
<el-input id="dc-box-input-name" v-model="editPanel.name" maxlength="64" placeholder="" show-word-limit size="small"></el-input>
|
||||
<el-input id="dc-box-input-name" v-model="editPanel.name" maxlength="64" placeholder="" show-word-limit size="small" :disabled="isBottom"></el-input>
|
||||
</el-form-item>
|
||||
<!--remark-->
|
||||
<el-form-item :label='$t("overall.remark")' class="range-time" prop="remark">
|
||||
@@ -317,6 +317,14 @@ export default {
|
||||
props: {
|
||||
obj: {
|
||||
type: Object
|
||||
},
|
||||
isBottom: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
panelType: {
|
||||
type: String,
|
||||
default: 'dashboard'
|
||||
}
|
||||
},
|
||||
mixins: [editRigthBox],
|
||||
@@ -506,7 +514,7 @@ export default {
|
||||
...this.editPanel,
|
||||
id: this.editPanel.id ? this.editPanel.id : '',
|
||||
name: this.editPanel.name,
|
||||
type: 'dashboard',
|
||||
type: this.panelType,
|
||||
remark: this.editPanel.remark,
|
||||
param: {
|
||||
report: {
|
||||
@@ -612,12 +620,7 @@ export default {
|
||||
this.editPanel = JSON.parse(JSON.stringify(n))
|
||||
// 如果是空数组 则添加一条变量数据
|
||||
if (!this.editPanel.param.variables || !this.editPanel.param.variables.length) {
|
||||
const temp = [{
|
||||
show: true,
|
||||
type: 'query',
|
||||
multi: false,
|
||||
allOption: false
|
||||
}]
|
||||
const temp = []
|
||||
this.$set(this.editPanel.param, 'variables', temp)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user