Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
2441edd1
提交
2441edd1
authored
3月 16, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: ESLint插件格式化前端代码
上级
221227e7
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
60 行增加
和
62 行删除
+60
-62
index.vue
frontend/src/components/vue-drag-resize-rotate/index.vue
+0
-0
main.js
frontend/src/main.js
+0
-1
PanelPreview.vue
frontend/src/views/panel/list/PanelPreview.vue
+13
-13
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+47
-48
没有找到文件。
frontend/src/components/vue-drag-resize-rotate/index.vue
浏览文件 @
2441edd1
差异被折叠。
点击展开。
frontend/src/main.js
浏览文件 @
2441edd1
...
@@ -21,7 +21,6 @@ import directives from './directive'
...
@@ -21,7 +21,6 @@ import directives from './directive'
import
'./styles/vdrr/common-temp.scss'
import
'./styles/vdrr/common-temp.scss'
import
vdrr
from
'./components/vue-drag-resize-rotate'
import
vdrr
from
'./components/vue-drag-resize-rotate'
Vue
.
component
(
'vdrr'
,
vdrr
)
Vue
.
component
(
'vdrr'
,
vdrr
)
...
...
frontend/src/views/panel/list/PanelPreview.vue
浏览文件 @
2441edd1
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<el-row
style=
"height: 100%;overflow-y: hidden;width: 100%;"
>
<el-row
style=
"height: 100%;overflow-y: hidden;width: 100%;"
>
<span>
仪表盘名称:
{{
panelName
}}
</span>
<span>
仪表盘名称:
{{
panelName
}}
</span>
</el-row>
</el-row>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
loadTable
,
getScene
,
addGroup
,
delGroup
,
addTable
,
delTable
,
groupTree
}
from
'@/api/dataset/dataset'
import
{
loadTable
,
getScene
,
addGroup
,
delGroup
,
addTable
,
delTable
,
groupTree
}
from
'@/api/dataset/dataset'
export
default
{
export
default
{
name
:
'PanelView'
,
name
:
'PanelView'
,
data
()
{
data
()
{
return
{
return
{
...
@@ -35,21 +35,21 @@
...
@@ -35,21 +35,21 @@
},
},
groupFormRules
:
{
groupFormRules
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
]
]
},
},
tableFormRules
:
{
tableFormRules
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
],
],
mode
:
[
mode
:
[
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
{
required
:
true
,
message
:
this
.
$t
(
'commons.input_content'
),
trigger
:
'blur'
}
]
]
}
}
}
}
},
},
computed
:
{
computed
:
{
panelName
:
function
()
{
panelName
:
function
()
{
console
.
log
(
this
.
$store
.
state
.
panel
.
panelName
)
console
.
log
(
this
.
$store
.
state
.
panel
.
panelName
)
return
this
.
$store
.
state
.
panel
.
panelName
return
this
.
$store
.
state
.
panel
.
panelName
}
}
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
})
})
this
.
tableTree
()
this
.
tableTree
()
// this.$router.push('/dataset/home')
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
null
)
this
.
$store
.
dispatch
(
'dataset/setTable'
,
null
)
})
})
}
else
{
}
else
{
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
})
})
this
.
tableTree
()
this
.
tableTree
()
// this.$router.push('/dataset/home')
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
null
)
this
.
$store
.
dispatch
(
'dataset/setTable'
,
null
)
})
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
// console.log(route)
// console.log(route)
// this.$router.push('/dataset/index')
// this.$router.push('/dataset/index')
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
null
)
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
null
)
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
},
clickAddData
(
param
)
{
clickAddData
(
param
)
{
// console.log(param);
// console.log(param);
...
@@ -313,7 +313,7 @@
...
@@ -313,7 +313,7 @@
// scene: this.currGroup
// scene: this.currGroup
// }
// }
// })
// })
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddDB'
,
param
:
this
.
currGroup
})
this
.
$emit
(
'switchComponent'
,
{
name
:
'AddDB'
,
param
:
this
.
currGroup
})
},
},
sceneClick
(
data
,
node
)
{
sceneClick
(
data
,
node
)
{
// console.log(data);
// console.log(data);
...
@@ -325,7 +325,7 @@
...
@@ -325,7 +325,7 @@
// table: data
// table: data
// }
// }
// })
// })
this
.
$emit
(
'switchComponent'
,
{
name
:
'ViewTable'
})
this
.
$emit
(
'switchComponent'
,
{
name
:
'ViewTable'
})
},
},
refresh
()
{
refresh
()
{
const
path
=
this
.
$route
.
path
const
path
=
this
.
$route
.
path
...
@@ -340,9 +340,9 @@
...
@@ -340,9 +340,9 @@
panelDefaultClick
(
data
,
node
)
{
panelDefaultClick
(
data
,
node
)
{
// console.log(data);
// console.log(data);
// console.log(node);
// console.log(node);
},
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
2441edd1
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<el-tabs
v-model=
"ViewActiveName"
>
<el-tabs
v-model=
"ViewActiveName"
>
<!--视图展示操作-->
<!--视图展示操作-->
<el-tab-pane
name=
"Views"
class=
"view-list-thumbnails-outline"
>
<el-tab-pane
name=
"Views"
class=
"view-list-thumbnails-outline"
>
<span
slot=
"label"
><i
class=
"el-icon-s-data"
/>
视图
</span>
<span
slot=
"label"
><i
class=
"el-icon-s-data"
/>
视图
</span>
<draggable
<draggable
v-model=
"thumbnails"
v-model=
"thumbnails"
:options=
"
{group:{name: 'itxst',pull:'clone'},sort: true}"
:options=
"
{group:{name: 'itxst',pull:'clone'},sort: true}"
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
@end="end1"
@end="end1"
>
>
<transition-group>
<transition-group>
<div
v-for=
"item in thumbnails"
:key=
"item.name"
v-on:dblclick =
panelViewAdd(item)
>
<div
v-for=
"item in thumbnails"
:key=
"item.name"
@
dblclick=
"panelViewAdd(item)"
>
<span
style=
"color: gray"
>
{{
item
.
name
}}
</span>
<span
style=
"color: gray"
>
{{
item
.
name
}}
</span>
<img
class=
"view-list-thumbnails"
:src=
"'/common-files/images/'+item.id"
alt=
""
/
>
<img
class=
"view-list-thumbnails"
:src=
"'/common-files/images/'+item.id"
alt=
""
>
</div>
</div>
</transition-group>
</transition-group>
</draggable>
</draggable>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<!--通用组件操作-->
<!--通用组件操作-->
<el-tab-pane
name=
"PublicTools"
>
<el-tab-pane
name=
"PublicTools"
>
<span
slot=
"label"
><i
class=
"el-icon-s-grid"
/>
组件
</span>
<span
slot=
"label"
><i
class=
"el-icon-s-grid"
/>
组件
</span>
开发中...
开发中...
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -47,18 +47,18 @@
...
@@ -47,18 +47,18 @@
<div
class=
"container"
style=
"overflow-y: auto"
>
<div
class=
"container"
style=
"overflow-y: auto"
>
<div
:style=
"gridStyle"
>
<div
:style=
"gridStyle"
>
<!--
<draggable-->
<!--
<draggable-->
<!-- v-model="thumbnailsTmp"-->
<!-- v-model="thumbnailsTmp"-->
<!-- :options="
{group:{name: 'itxst',pull:'clone'},sort: true}"-->
<!-- :options="
{group:{name: 'itxst',pull:'clone'},sort: true}"-->
<!-- animation="300"-->
<!-- animation="300"-->
<!-- :move="onMove"-->
<!-- :move="onMove"-->
<!-- style="height: 100%;overflow:auto"-->
<!-- style="height: 100%;overflow:auto"-->
<!-- @end="end1"-->
<!-- @end="end1"-->
<!-- >-->
<!-- >-->
<vdrr
v-
if=
"item.keepFlag"
:view-id=
"item.id"
:parent=
"true"
v-for=
"item in thumbnailsTmp"
:key=
"item.nam
e"
@
newStyle=
"newStyle"
@
removeView=
"removeView"
>
<vdrr
v-
for=
"item in thumbnailsTmp"
v-show=
"item.keepFlag"
:key=
"item.name"
:view-id=
"item.id"
:parent=
"tru
e"
@
newStyle=
"newStyle"
@
removeView=
"removeView"
>
<img
class=
"view-list-thumbnails"
:src=
"'/common-files/images/'+item.id"
alt=
""
/
>
<img
class=
"view-list-thumbnails"
:src=
"'/common-files/images/'+item.id"
alt=
""
>
</vdrr>
</vdrr>
<!--
</draggable>
-->
<!--
</draggable>
-->
</div>
</div>
</div>
</div>
...
@@ -74,13 +74,13 @@
...
@@ -74,13 +74,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
import
{
post
}
from
'@/api/dataset/dataset'
import
draggable
from
'vuedraggable'
import
draggable
from
'vuedraggable'
import
{
BASE_BAR
}
from
'../chart/chart'
import
{
BASE_BAR
}
from
'../chart/chart'
export
default
{
export
default
{
name
:
'PanelViewShow'
,
name
:
'PanelViewShow'
,
components
:
{
draggable
},
components
:
{
draggable
},
data
()
{
data
()
{
return
{
return
{
gridStyle
:
{
gridStyle
:
{
...
@@ -94,14 +94,14 @@
...
@@ -94,14 +94,14 @@
ViewActiveName
:
'Views'
,
ViewActiveName
:
'Views'
,
table
:
{},
table
:
{},
thumbnailsTmp
:
[
thumbnailsTmp
:
[
{
id
:
'b4e3fd39-1424-4f22-bbac-07885829fb59'
,
name
:
'TEST1'
,
keepFlag
:
true
,
style
:
''
},
{
id
:
'b4e3fd39-1424-4f22-bbac-07885829fb59'
,
name
:
'TEST1'
,
keepFlag
:
true
,
style
:
''
},
{
id
:
'bf91a1dc-10c1-4383-87ae-9ab1d6e57918'
,
name
:
'TEST2'
,
keepFlag
:
true
,
style
:
''
}
{
id
:
'bf91a1dc-10c1-4383-87ae-9ab1d6e57918'
,
name
:
'TEST2'
,
keepFlag
:
true
,
style
:
''
}
],
],
thumbnails
:
[
thumbnails
:
[
{
id
:
'e70d7955-44dc-4158-9002-7b48ed0d5d80'
,
name
:
'TEST1'
},
{
id
:
'e70d7955-44dc-4158-9002-7b48ed0d5d80'
,
name
:
'TEST1'
},
{
id
:
'bf91a1dc-10c1-4383-87ae-9ab1d6e57918'
,
name
:
'TEST2'
},
{
id
:
'bf91a1dc-10c1-4383-87ae-9ab1d6e57918'
,
name
:
'TEST2'
},
{
id
:
'aebc8346-c3f2-44ad-97d3-1e36a10dd0fa'
,
name
:
'TEST3'
},
{
id
:
'aebc8346-c3f2-44ad-97d3-1e36a10dd0fa'
,
name
:
'TEST3'
},
{
id
:
'b4e3fd39-1424-4f22-bbac-07885829fb59'
,
name
:
'TEST4'
}
{
id
:
'b4e3fd39-1424-4f22-bbac-07885829fb59'
,
name
:
'TEST4'
}
],
],
quota
:
[],
quota
:
[],
view
:
{
view
:
{
...
@@ -113,14 +113,14 @@
...
@@ -113,14 +113,14 @@
},
},
// 定义要被拖拽对象的数组
// 定义要被拖拽对象的数组
arr1
:
[
arr1
:
[
{
id
:
1
,
name
:
'id'
},
{
id
:
1
,
name
:
'id'
},
{
id
:
2
,
name
:
'名称'
},
{
id
:
2
,
name
:
'名称'
},
{
id
:
3
,
name
:
'类型'
},
{
id
:
3
,
name
:
'类型'
},
{
id
:
5
,
name
:
'状态'
},
{
id
:
5
,
name
:
'状态'
},
{
id
:
4
,
name
:
'指标指标指标'
}
{
id
:
4
,
name
:
'指标指标指标'
}
],
],
arr2
:
[
arr2
:
[
{
id
:
11
,
name
:
'容量'
}
{
id
:
11
,
name
:
'容量'
}
],
],
moveId
:
-
1
moveId
:
-
1
}
}
...
@@ -154,27 +154,26 @@
...
@@ -154,27 +154,26 @@
activated
()
{
activated
()
{
},
},
methods
:
{
methods
:
{
panelViewAdd
(
item
)
{
panelViewAdd
(
item
)
{
le
t
pushItem
=
{
cons
t
pushItem
=
{
id
:
item
.
id
,
id
:
item
.
id
,
name
:
item
.
name
,
name
:
item
.
name
,
keepFlag
:
true
keepFlag
:
true
}
}
debugger
debugger
this
.
thumbnailsTmp
.
push
(
pushItem
)
this
.
thumbnailsTmp
.
push
(
pushItem
)
console
.
log
(
this
.
thumbnailsTmp
);
console
.
log
(
this
.
thumbnailsTmp
)
},
},
removeView
(
viewId
)
{
removeView
(
viewId
)
{
this
.
thumbnailsTmp
.
forEach
(
function
(
item
,
index
)
{
this
.
thumbnailsTmp
.
forEach
(
function
(
item
,
index
)
{
if
(
item
.
id
===
viewId
)
{
if
(
item
.
id
===
viewId
)
{
item
.
keepFlag
=
false
item
.
keepFlag
=
false
}
}
})
})
},
},
newStyle
(
viewId
,
newStyleInfo
)
{
newStyle
(
viewId
,
newStyleInfo
)
{
console
.
log
(
viewId
);
console
.
log
(
viewId
)
console
.
log
(
JSON
.
stringify
(
newStyleInfo
))
console
.
log
(
JSON
.
stringify
(
newStyleInfo
))
},
},
initTableData
(
id
)
{
initTableData
(
id
)
{
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
...
@@ -192,7 +191,7 @@
...
@@ -192,7 +191,7 @@
},
},
click1
(
item
)
{
click1
(
item
)
{
// console.log(item);
// console.log(item);
const
c
=
this
.
view
.
xaxis
.
filter
(
function
(
ele
)
{
const
c
=
this
.
view
.
xaxis
.
filter
(
function
(
ele
)
{
return
ele
.
id
===
item
.
id
return
ele
.
id
===
item
.
id
})
})
// console.log(c);
// console.log(c);
...
@@ -202,7 +201,7 @@
...
@@ -202,7 +201,7 @@
},
},
click2
(
item
)
{
click2
(
item
)
{
// console.log(item);
// console.log(item);
const
c
=
this
.
view
.
yaxis
.
filter
(
function
(
ele
)
{
const
c
=
this
.
view
.
yaxis
.
filter
(
function
(
ele
)
{
return
ele
.
id
===
item
.
id
return
ele
.
id
===
item
.
id
})
})
// console.log(c);
// console.log(c);
...
@@ -255,7 +254,7 @@
...
@@ -255,7 +254,7 @@
if
(
chart
.
data
)
{
if
(
chart
.
data
)
{
chart_option
.
title
.
text
=
chart
.
title
chart_option
.
title
.
text
=
chart
.
title
chart_option
.
xAxis
.
data
=
chart
.
data
.
x
chart_option
.
xAxis
.
data
=
chart
.
data
.
x
chart
.
data
.
series
.
forEach
(
function
(
y
)
{
chart
.
data
.
series
.
forEach
(
function
(
y
)
{
chart_option
.
legend
.
data
.
push
(
y
.
name
)
chart_option
.
legend
.
data
.
push
(
y
.
name
)
chart_option
.
series
.
push
(
y
)
chart_option
.
series
.
push
(
y
)
})
})
...
@@ -313,12 +312,12 @@
...
@@ -313,12 +312,12 @@
var
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'echart'
))
var
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'echart'
))
// 指定图表的配置项和数据
// 指定图表的配置项和数据
setTimeout
(
myChart
.
setOption
(
option
,
true
),
500
)
setTimeout
(
myChart
.
setOption
(
option
,
true
),
500
)
window
.
onresize
=
function
()
{
window
.
onresize
=
function
()
{
myChart
.
resize
()
myChart
.
resize
()
}
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论