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