提交 b22c8347 authored 作者: jianglw's avatar jianglw

修改部分bug

上级 8616b6b1
...@@ -27,7 +27,7 @@ const routes = [ ...@@ -27,7 +27,7 @@ const routes = [
] ]
const router = new VueRouter({ const router = new VueRouter({
mode: 'history', mode: 'hash',
routes routes
}) })
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- <el-table v-loading="loading" :data="topologyList"> <el-card>
<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-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="24"> <el-col :span="24">
<!-- v-hasPermi="['topology:index:add']" --> <!-- v-hasPermi="['topology:index:add']" -->
...@@ -82,7 +10,6 @@ ...@@ -82,7 +10,6 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="addTopology" @click="addTopology"
>创建组态</el-button >创建组态</el-button
> >
</el-col> </el-col>
...@@ -153,7 +80,6 @@ ...@@ -153,7 +80,6 @@
type="text" type="text"
icon="el-icon-s-tools" icon="el-icon-s-tools"
@click="handleAdd(item)" @click="handleAdd(item)"
>采集参数设置</el-button >采集参数设置</el-button
> >
<!-- v-hasPermi="['topology:index:delete']" --> <!-- v-hasPermi="['topology:index:delete']" -->
...@@ -162,7 +88,6 @@ ...@@ -162,7 +88,6 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="removeTopology(item.id)" @click="removeTopology(item.id)"
>删除</el-button >删除</el-button
> >
<!-- v-hasPermi="['topology:params:set']" --> <!-- v-hasPermi="['topology:params:set']" -->
...@@ -171,7 +96,6 @@ ...@@ -171,7 +96,6 @@
type="text" type="text"
icon="el-icon-s-tools" icon="el-icon-s-tools"
@click="handleMutual(item)" @click="handleMutual(item)"
>交互参数设置</el-button >交互参数设置</el-button
> >
<!-- v-hasPermi="['topology:index:deleteTopologyHandle']" --> <!-- v-hasPermi="['topology:index:deleteTopologyHandle']" -->
...@@ -180,7 +104,6 @@ ...@@ -180,7 +104,6 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="removeTopologyHandle(item.id)" @click="removeTopologyHandle(item.id)"
>清空原有配置</el-button >清空原有配置</el-button
> >
</div> </div>
...@@ -198,7 +121,7 @@ ...@@ -198,7 +121,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</el-card>
<add-params ref="addParams" @ok="paramsSet"></add-params> <add-params ref="addParams" @ok="paramsSet"></add-params>
<add-mutual ref="addMutual" @ok="mutualSet"></add-mutual> <add-mutual ref="addMutual" @ok="mutualSet"></add-mutual>
</div> </div>
...@@ -206,28 +129,31 @@ ...@@ -206,28 +129,31 @@
<script> <script>
import AddParams from "./modules/AddParams.vue"; import AddParams from "./modules/AddParams.vue";
import AddMutual from "./modules/AddMutual.vue" import AddMutual from "./modules/AddMutual.vue";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import PreviewToImg from "@/components/topology/PreviewToImg.vue"; import PreviewToImg from "@/components/topology/PreviewToImg.vue";
import {deleteTopologyHandle,list,deleteTopology} from "@/api/topology.js" import { deleteTopologyHandle, list, deleteTopology } from "@/api/topology.js";
import {encryption,decrypt} from "@/utils/rsautils.js";
export default { export default {
name: "ParamsConfig", name: "ParamsConfig",
props:{ props: {
editorUrl:{ editorUrl: {
type:String, type: String,
default:()=>{return "/toplogyView/workspace"} default: () => {
return "/toplogyView/workspace";
},
},
previewUrl: {
type: String,
default: () => {
return "/toplogyView/preview";
},
}, },
previewUrl:{
type:String,
default:()=>{return "/toplogyView/preview"}
}
}, },
components: { components: {
AddParams, AddParams,
PreviewToImg, PreviewToImg,
AddMutual, AddMutual,
Pagination Pagination,
}, },
data() { data() {
return { return {
...@@ -319,7 +245,7 @@ export default { ...@@ -319,7 +245,7 @@ export default {
}); });
}); });
}, },
removeTopologyHandle(id){ removeTopologyHandle(id) {
this.$confirm("确认要删除原有配置吗?", "警告", { this.$confirm("确认要删除原有配置吗?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -343,15 +269,15 @@ export default { ...@@ -343,15 +269,15 @@ export default {
this.$message.warning("未设置webscoket或mqttUrl"); this.$message.warning("未设置webscoket或mqttUrl");
return; return;
} }
console.log(this.$refs) console.log(this.$refs);
this.$refs.addParams.update(row); this.$refs.addParams.update(row);
}, },
handleMutual(row){ handleMutual(row) {
this.$refs.addMutual.init(row); this.$refs.addMutual.init(row);
}, },
mutualSet(){ mutualSet() {
this.init(); this.init();
} },
}, },
}; };
</script> </script>
......
...@@ -248,7 +248,6 @@ import NodeView from "@/components/topology/NodeView.vue"; ...@@ -248,7 +248,6 @@ import NodeView from "@/components/topology/NodeView.vue";
import LineView from "@/components/topology/LineView.vue"; import LineView from "@/components/topology/LineView.vue";
import PensView from "@/components/topology/PensView.vue"; import PensView from "@/components/topology/PensView.vue";
import { assemble, assembleSvg } from "@/utils/topology/setting.js"; import { assemble, assembleSvg } from "@/utils/topology/setting.js";
import { encryption, decrypt } from "@/utils/rsautils.js";
import { registerIcons, registerSvgs } from "@/utils/topology/customgraph.js"; import { registerIcons, registerSvgs } from "@/utils/topology/customgraph.js";
import { getTopologyId, save } from "@/api/topology.js"; import { getTopologyId, save } from "@/api/topology.js";
registerIcons(); registerIcons();
...@@ -264,7 +263,7 @@ export default { ...@@ -264,7 +263,7 @@ export default {
props: { props: {
backUrl: { backUrl: {
type: String, type: String,
default: "/back", default: "/",
}, },
previewUrl: { previewUrl: {
type: String, type: String,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论