|
@@ -47,7 +47,7 @@
|
|
|
<el-row :gutter="20" class="form-row">
|
|
<el-row :gutter="20" class="form-row">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- label="指标名称1"
|
|
|
|
|
|
|
+ label="指标名称"
|
|
|
prop="target"
|
|
prop="target"
|
|
|
:show-message="false"
|
|
:show-message="false"
|
|
|
>
|
|
>
|
|
@@ -920,7 +920,7 @@ export default {
|
|
|
getConfigDetail({ id: this.targetId })
|
|
getConfigDetail({ id: this.targetId })
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
- const {
|
|
|
|
|
|
|
+ let {
|
|
|
config,
|
|
config,
|
|
|
experimentalConfigDetailPoList: methods,
|
|
experimentalConfigDetailPoList: methods,
|
|
|
icon,
|
|
icon,
|
|
@@ -939,6 +939,13 @@ export default {
|
|
|
? JSON.parse(item.chartOption)
|
|
? JSON.parse(item.chartOption)
|
|
|
: []
|
|
: []
|
|
|
})
|
|
})
|
|
|
|
|
+ if(methods.length == 0){ //(性能指标初始化,没有方案时)如果没有方法,则默认添加一个方法
|
|
|
|
|
+ const m = JSON.parse(JSON.stringify(this.initMethod))
|
|
|
|
|
+ m.id = this.$utils.guid()
|
|
|
|
|
+ m.sn = 1
|
|
|
|
|
+ m.methodName = '方法1'
|
|
|
|
|
+ methods = [m]
|
|
|
|
|
+ }
|
|
|
this.formData = {
|
|
this.formData = {
|
|
|
icon,
|
|
icon,
|
|
|
sn,
|
|
sn,
|
|
@@ -951,6 +958,7 @@ export default {
|
|
|
this.activeTab = this.methodTabs[0].methodName
|
|
this.activeTab = this.methodTabs[0].methodName
|
|
|
this.loadCompleted = true
|
|
this.loadCompleted = true
|
|
|
if (this.detailId) this.filterDetailTab()
|
|
if (this.detailId) this.filterDetailTab()
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.loading = false
|
|
this.loading = false
|