diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index ee5fc92263..13cfc66257 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -600,7 +600,9 @@ export default {
max: '最大值',
min: '最小值',
std: '标准差',
- var_samp: '方差'
+ var_samp: '方差',
+ quick_calc: '快速计算',
+ show_name_set: '显示名设置'
},
dataset: {
datalist: '数据集',
diff --git a/frontend/src/views/chart/components/QuotaItem.vue b/frontend/src/views/chart/components/QuotaItem.vue
index c616da6676..0ee7658c4c 100644
--- a/frontend/src/views/chart/components/QuotaItem.vue
+++ b/frontend/src/views/chart/components/QuotaItem.vue
@@ -1,6 +1,6 @@
-
+
{{ item.name }}{{ $t('chart.'+item.summary) }}
@@ -21,12 +21,34 @@
-
- item4
+
+
+
+ {{ $t('chart.quick_calc') }}(test)
+
+
+ test
+
+
+
+
+ {{ $t('chart.show_name_set') }}
+
+
+
+
+
+
+
+
+
@@ -40,7 +62,17 @@ export default {
}
},
data() {
- return {}
+ return {
+ renameItem: false,
+ itemForm: {
+ name: ''
+ },
+ itemFormRules: {
+ name: [
+ { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
+ ]
+ }
+ }
},
mounted() {
@@ -49,12 +81,55 @@ export default {
summary(param) {
// console.log(param)
this.item.summary = param.type
- this.$emit('onQuotaSummaryChange', this.item)
+ this.$emit('onQuotaItemChange', this.item)
},
beforeSummary(type) {
return {
type: type
}
+ },
+ quickCalc(param) {
+
+ },
+ beforeQuickCalc(type) {
+ return {
+ type: type
+ }
+ },
+ clickItem(param) {
+ if (!param) {
+ return
+ }
+ switch (param.type) {
+ case 'rename':
+ this.showRename()
+ break
+ default:
+ break
+ }
+ },
+ beforeClickItem(type) {
+ return {
+ type: type
+ }
+ },
+ showRename() {
+ this.itemForm.name = this.item.name
+ this.renameItem = true
+ },
+ closeRename() {
+ this.renameItem = false
+ this.resetRename()
+ },
+ saveRename(param) {
+ this.item.name = param.name
+ this.$emit('onQuotaItemChange', this.item)
+ this.closeRename()
+ },
+ resetRename() {
+ this.itemForm = {
+ name: ''
+ }
}
}
}
diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue
index 64d42e578a..35a2a951e1 100644
--- a/frontend/src/views/chart/group/Group.vue
+++ b/frontend/src/views/chart/group/Group.vue
@@ -487,6 +487,7 @@ export default {
sceneClick(data, node) {
this.$store.dispatch('chart/setViewId', null)
this.$store.dispatch('chart/setViewId', data.id)
+ this.$store.dispatch('chart/setTableId', null)
this.$store.dispatch('chart/setTableId', data.tableId)
// this.$router.push('/chart/chart-edit')
this.$emit('switchComponent', { name: 'ChartEdit' })
diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue
index f00fb81691..519802869b 100644
--- a/frontend/src/views/chart/view/ChartEdit.vue
+++ b/frontend/src/views/chart/view/ChartEdit.vue
@@ -125,7 +125,7 @@
@end="end2"
>
-
+
@@ -357,13 +357,13 @@ export default {
return true
},
- quotaSummaryChange(item) {
+ quotaItemChange(item) {
// 更新item
- this.view.yaxis.forEach(function(ele) {
- if (ele.id === item.id) {
- ele.summary = item.summary
- }
- })
+ // this.view.yaxis.forEach(function(ele) {
+ // if (ele.id === item.id) {
+ // ele.summary = item.summary
+ // }
+ // })
this.save()
}
}