fix:修复chartGroup name显示错误
This commit is contained in:
14
nezha-fronted/package-lock.json
generated
14
nezha-fronted/package-lock.json
generated
@@ -1583,9 +1583,9 @@
|
||||
}
|
||||
},
|
||||
"tar": {
|
||||
"version": "6.1.11",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
|
||||
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
|
||||
"version": "6.1.12",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
|
||||
"integrity": "sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==",
|
||||
"requires": {
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
@@ -4103,12 +4103,12 @@
|
||||
"integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA=="
|
||||
},
|
||||
"canvas": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.10.1.tgz",
|
||||
"integrity": "sha512-29pIjn9uwTUsIgJUNd7GXxKk8sg4iyJwLm1wIilNIqX1mVzXSc2nUij9exW1LqNpis1d2ebMYfMqTWcokZ4pdA==",
|
||||
"version": "2.10.2",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.10.2.tgz",
|
||||
"integrity": "sha512-FSmlsip0nZ0U4Zcfht0qBJqDhlfGuevTZKE8h+dBOYrJjGvY3iqMGSzzbvkaFhvMXiVxfcMaPHS/kge++T5SKg==",
|
||||
"requires": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.0",
|
||||
"nan": "^2.15.0",
|
||||
"nan": "^2.17.0",
|
||||
"simple-get": "^3.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
</span>
|
||||
</el-popover>
|
||||
</span>
|
||||
<div class="chart-header__title" :title="nameFormate()">
|
||||
<div class="chart-header__title" :title="nameFormate">
|
||||
<slot name="title-icon"></slot>
|
||||
{{nameFormate()}}
|
||||
{{nameFormate}}
|
||||
</div>
|
||||
<div class="chart-header__tools">
|
||||
<span v-if="chartInfo.remark" class="chart-header__tool top-tool-btn-group">
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
</span>
|
||||
</el-popover>
|
||||
</span>
|
||||
<div class="chart-header__title" v-if="!isGroup" :title="nameFormate()">{{nameFormate()}}</div>
|
||||
<div class="chart-header__title" v-if="!isGroup" :title="nameFormate">{{nameFormate}}</div>
|
||||
<div class="chart-header__title groupTitle" v-else >
|
||||
<span @click="groupShow" style="cursor:pointer"> <i class="nz-icon" :class="chartInfo.param.collapse ? 'nz-icon-arrow-right': 'nz-icon-arrow-down'"></i></span>
|
||||
{{nameFormate()}}
|
||||
{{nameFormate}}
|
||||
<span v-show="chartInfo.param.collapse" class="collapse-content">({{chartData ? chartData.length : 0}} charts)</span>
|
||||
</div>
|
||||
<div class="temp"></div>
|
||||
|
||||
@@ -84,6 +84,11 @@ export default {
|
||||
},
|
||||
unitChange (val) {
|
||||
this.$emit('unitChange', val)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
variablesArr () {
|
||||
return this.$store.getters.getVariablesArr
|
||||
},
|
||||
// 所有类型 chart name 支持变量替换
|
||||
nameFormate () {
|
||||
@@ -114,11 +119,6 @@ export default {
|
||||
return str
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
variablesArr () {
|
||||
return this.$store.getters.getVariablesArr
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isError: {
|
||||
immediate: true,
|
||||
@@ -127,14 +127,6 @@ export default {
|
||||
this.errorText = this.chartData.filter(item => item.error).map(item => item.error).join('\n')
|
||||
}
|
||||
}
|
||||
},
|
||||
'chartInfo.repeatVariable': {
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
if (n) {
|
||||
this.nameFormate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,9 +591,9 @@ export default {
|
||||
if (item.type === 'group' && variables.name === repeatVariable) {
|
||||
if (!variables.checked.length) {
|
||||
item.children.forEach(children => {
|
||||
delete children.repeatIndex
|
||||
delete children.repeatVariable
|
||||
delete children.repeatValue
|
||||
this.$delete(children, 'repeatIndex')
|
||||
this.$delete(children, 'repeatVariable')
|
||||
this.$delete(children, 'repeatValue')
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -616,13 +616,13 @@ export default {
|
||||
// 复制数据
|
||||
this.copyDataList.splice(index, 0, repeatItem)
|
||||
} else {
|
||||
item.repeatIndex = 0
|
||||
item.repeatVariable = repeatVariable
|
||||
item.repeatValue = subItem
|
||||
this.$set(item, 'repeatIndex', 0)
|
||||
this.$set(item, 'repeatVariable', repeatVariable)
|
||||
this.$set(item, 'repeatValue', subItem)
|
||||
item.children.forEach(children => {
|
||||
children.repeatIndex = 0
|
||||
children.repeatVariable = repeatVariable
|
||||
children.repeatValue = subItem
|
||||
this.$set(children, 'repeatIndex', 0)
|
||||
this.$set(children, 'repeatVariable', repeatVariable)
|
||||
this.$set(children, 'repeatValue', subItem)
|
||||
})
|
||||
this.$refs['chart' + item.id] && this.$refs['chart' + item.id][0] && this.$refs['chart' + item.id][0].getChartData()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user