Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
cdf50243
提交
cdf50243
authored
3月 16, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(frontend): 视图 指标下拉菜单扩展
上级
221227e7
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
91 行增加
和
13 行删除
+91
-13
zh.js
frontend/src/lang/zh.js
+3
-1
QuotaItem.vue
frontend/src/views/chart/components/QuotaItem.vue
+80
-5
Group.vue
frontend/src/views/chart/group/Group.vue
+1
-0
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+7
-7
没有找到文件。
frontend/src/lang/zh.js
浏览文件 @
cdf50243
...
...
@@ -600,7 +600,9 @@ export default {
max
:
'最大值'
,
min
:
'最小值'
,
std
:
'标准差'
,
var_samp
:
'方差'
var_samp
:
'方差'
,
quick_calc
:
'快速计算'
,
show_name_set
:
'显示名设置'
},
dataset
:
{
datalist
:
'数据集'
,
...
...
frontend/src/views/chart/components/QuotaItem.vue
浏览文件 @
cdf50243
<
template
>
<span>
<el-dropdown
trigger=
"click"
size=
"small"
>
<el-dropdown
trigger=
"click"
size=
"small"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
>
{{
item
.
name
}}
<span
v-if=
"item.summary"
class=
"summary-span"
>
{{
$t
(
'chart.'
+
item
.
summary
)
}}
</span><i
class=
"el-icon-arrow-down el-icon--right"
/>
...
...
@@ -21,12 +21,34 @@
</el-dropdown-menu>
</el-dropdown>
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-delete"
>
item4
<el-dropdown-item
icon=
"el-icon-s-grid"
>
<el-dropdown
placement=
"right-start"
size=
"small"
@
command=
"quickCalc"
>
<span
class=
"el-dropdown-link"
>
{{
$t
(
'chart.quick_calc'
)
}}
<span
class=
"summary-span"
>
(test)
</span><i
class=
"el-icon-arrow-right el-icon--right"
/>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"beforeQuickCalc('none')"
>
test
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-edit-outline"
divided
:command=
"beforeClickItem('rename')"
>
<span>
{{
$t
(
'chart.show_name_set'
)
}}
</span>
</el-dropdown-item>
</el-dropdown-menu>
</span>
</el-dropdown>
<el-dialog
:title=
"$t('chart.show_name_set')"
:visible=
"renameItem"
:show-close=
"false"
width=
"30%"
>
<el-form
ref=
"itemForm"
:model=
"itemForm"
:rules=
"itemFormRules"
>
<el-form-item
:label=
"$t('commons.name')"
prop=
"name"
>
<el-input
v-model=
"itemForm.name"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"closeRename()"
>
{{
$t
(
'chart.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"saveRename(itemForm)"
>
{{
$t
(
'chart.confirm'
)
}}
</el-button>
</div>
</el-dialog>
</span>
</
template
>
...
...
@@ -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
(
'onQuota
Summary
Change'
,
this
.
item
)
this
.
$emit
(
'onQuota
Item
Change'
,
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
:
''
}
}
}
}
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
cdf50243
...
...
@@ -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'
})
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
cdf50243
...
...
@@ -125,7 +125,7 @@
@
end=
"end2"
>
<transition-group
class=
"draggable-group"
>
<quota-item
v-for=
"(item) in view.yaxis"
:key=
"item.id"
:item=
"item"
@
onQuota
SummaryChange=
"quotaSummary
Change"
/>
<quota-item
v-for=
"(item) in view.yaxis"
:key=
"item.id"
:item=
"item"
@
onQuota
ItemChange=
"quotaItem
Change"
/>
</transition-group>
</draggable>
</el-row>
...
...
@@ -357,13 +357,13 @@ export default {
return
true
},
quota
Summary
Change
(
item
)
{
quota
Item
Change
(
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
()
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论