Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
T
topology-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
姜立玮
topology-ui
Commits
b22c8347
提交
b22c8347
authored
4月 14, 2022
作者:
jianglw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改部分bug
上级
8616b6b1
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
133 行增加
和
208 行删除
+133
-208
index.js
src/router/index.js
+1
-1
ParamsConfig.vue
src/views/configuration/ParamsConfig.vue
+131
-205
Workspace.vue
src/views/topology/Workspace.vue
+1
-2
没有找到文件。
src/router/index.js
浏览文件 @
b22c8347
...
...
@@ -27,7 +27,7 @@ const routes = [
]
const
router
=
new
VueRouter
({
mode
:
'h
istory
'
,
mode
:
'h
ash
'
,
routes
})
...
...
src/views/configuration/ParamsConfig.vue
浏览文件 @
b22c8347
<
template
>
<div
class=
"app-container"
>
<!--
<el-table
v-loading=
"loading"
:data=
"topologyList"
>
<el-table-column
label=
"组态名称"
align=
"center"
prop=
"name"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createdTime"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"修改时间"
align=
"center"
prop=
"alterTime"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"显示/隐藏"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.switchIt"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleSwitchItChange(scope.row)"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"数据"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"previeData(scope.row)"
>
<preview-to-img
slot=
"cover"
:canvasData=
"changeJson(scope.row.data)"
:width=
"'100%'"
:height=
"'10vh'"
:title=
"'点击预览'"
></preview-to-img>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-s-tools"
@
click=
"uploadTopology(scope.row)"
>
修改组态
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-s-tools"
@
click=
"handleAdd(scope.row)"
>
参数设置
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeTopology(scope.row.id)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
-->
<el-card>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"24"
>
<!-- v-hasPermi="['topology:index:add']" -->
...
...
@@ -82,7 +10,6 @@
icon=
"el-icon-plus"
size=
"mini"
@
click=
"addTopology"
>
创建组态
</el-button
>
</el-col>
...
...
@@ -153,7 +80,6 @@
type=
"text"
icon=
"el-icon-s-tools"
@
click=
"handleAdd(item)"
>
采集参数设置
</el-button
>
<!-- v-hasPermi="['topology:index:delete']" -->
...
...
@@ -162,7 +88,6 @@
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeTopology(item.id)"
>
删除
</el-button
>
<!-- v-hasPermi="['topology:params:set']" -->
...
...
@@ -171,7 +96,6 @@
type=
"text"
icon=
"el-icon-s-tools"
@
click=
"handleMutual(item)"
>
交互参数设置
</el-button
>
<!-- v-hasPermi="['topology:index:deleteTopologyHandle']" -->
...
...
@@ -180,7 +104,6 @@
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeTopologyHandle(item.id)"
>
清空原有配置
</el-button
>
</div>
...
...
@@ -198,7 +121,7 @@
</el-card>
</el-col>
</el-row>
</el-card>
<add-params
ref=
"addParams"
@
ok=
"paramsSet"
></add-params>
<add-mutual
ref=
"addMutual"
@
ok=
"mutualSet"
></add-mutual>
</div>
...
...
@@ -206,28 +129,31 @@
<
script
>
import
AddParams
from
"./modules/AddParams.vue"
;
import
AddMutual
from
"./modules/AddMutual.vue"
import
AddMutual
from
"./modules/AddMutual.vue"
;
import
Pagination
from
"@/components/Pagination"
;
import
PreviewToImg
from
"@/components/topology/PreviewToImg.vue"
;
import
{
deleteTopologyHandle
,
list
,
deleteTopology
}
from
"@/api/topology.js"
import
{
encryption
,
decrypt
}
from
"@/utils/rsautils.js"
;
import
{
deleteTopologyHandle
,
list
,
deleteTopology
}
from
"@/api/topology.js"
;
export
default
{
name
:
"ParamsConfig"
,
props
:{
editorUrl
:{
type
:
String
,
default
:()
=>
{
return
"/toplogyView/workspace"
}
props
:
{
editorUrl
:
{
type
:
String
,
default
:
()
=>
{
return
"/toplogyView/workspace"
;
},
},
previewUrl
:
{
type
:
String
,
default
:
()
=>
{
return
"/toplogyView/preview"
;
},
},
previewUrl
:{
type
:
String
,
default
:()
=>
{
return
"/toplogyView/preview"
}
}
},
components
:
{
AddParams
,
PreviewToImg
,
AddMutual
,
Pagination
Pagination
,
},
data
()
{
return
{
...
...
@@ -319,7 +245,7 @@ export default {
});
});
},
removeTopologyHandle
(
id
){
removeTopologyHandle
(
id
)
{
this
.
$confirm
(
"确认要删除原有配置吗?"
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -343,15 +269,15 @@ export default {
this
.
$message
.
warning
(
"未设置webscoket或mqttUrl"
);
return
;
}
console
.
log
(
this
.
$refs
)
console
.
log
(
this
.
$refs
)
;
this
.
$refs
.
addParams
.
update
(
row
);
},
handleMutual
(
row
){
handleMutual
(
row
)
{
this
.
$refs
.
addMutual
.
init
(
row
);
},
mutualSet
(){
mutualSet
()
{
this
.
init
();
}
}
,
},
};
</
script
>
...
...
src/views/topology/Workspace.vue
浏览文件 @
b22c8347
...
...
@@ -248,7 +248,6 @@ import NodeView from "@/components/topology/NodeView.vue";
import
LineView
from
"@/components/topology/LineView.vue"
;
import
PensView
from
"@/components/topology/PensView.vue"
;
import
{
assemble
,
assembleSvg
}
from
"@/utils/topology/setting.js"
;
import
{
encryption
,
decrypt
}
from
"@/utils/rsautils.js"
;
import
{
registerIcons
,
registerSvgs
}
from
"@/utils/topology/customgraph.js"
;
import
{
getTopologyId
,
save
}
from
"@/api/topology.js"
;
registerIcons
();
...
...
@@ -264,7 +263,7 @@ export default {
props
:
{
backUrl
:
{
type
:
String
,
default
:
"/
back
"
,
default
:
"/"
,
},
previewUrl
:
{
type
:
String
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论