添加i2配置
parent
7e9ceefb77
commit
38c547c00c
@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<div class="filedBox">
|
||||||
|
<div class="reportHead">
|
||||||
|
<h3>导出类型</h3>
|
||||||
|
</div>
|
||||||
|
<div class="page-body">
|
||||||
|
<el-button type="primary" icon="el-icon-plus">添加主设备</el-button>
|
||||||
|
<div class="zsbTableBox"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
//import { zsbDeleteApi, zsbListAllApi } from "@/utils/api/index";
|
||||||
|
// import addzsbDialog from "./components/addzsbDialog";
|
||||||
|
export default {
|
||||||
|
name: "exportType",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
watch: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.filedBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.page-body {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 74px);
|
||||||
|
padding: 12px;
|
||||||
|
background: #eee;
|
||||||
|
.zsbTableBox {
|
||||||
|
margin-top: 8px;
|
||||||
|
height: calc(100% - 38px);
|
||||||
|
box-shadow: 1px 0 10px 1px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,155 @@
|
|||||||
|
<template>
|
||||||
|
<div class="filedBox">
|
||||||
|
<div class="reportHead">
|
||||||
|
<h3>字段映射</h3>
|
||||||
|
</div>
|
||||||
|
<div class="page-body">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"
|
||||||
|
>新增字段映射</el-button
|
||||||
|
>
|
||||||
|
<div class="zsbTableBox">
|
||||||
|
<el-table :data="filedData" style="width: 100%">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<!-- {{ props.row.i2syncFields }} -->
|
||||||
|
<el-table
|
||||||
|
:data="props.row.i2syncFields"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column prop="fieldName" label="表字段">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="destFieldName" label="导出字段">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="名称" prop="mc"> </el-table-column>
|
||||||
|
<el-table-column label="表名" prop="tablename"> </el-table-column>
|
||||||
|
<el-table-column label="字段映射个数" prop="i2syncFields">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.i2syncFields.length }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" class-name="editClass">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="handleEditClick(scope.row)"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-document"
|
||||||
|
>修改</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
type="danger"
|
||||||
|
@click="handleDeleteClick(scope.row)"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<addfiledDialog ref="filedAddRef" :title="title"></addfiledDialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listFieldConfigApi, delFieldConfigApi } from "@/utils/api/index";
|
||||||
|
import addfiledDialog from "./components/addfiledDialog";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addfiledDialog,
|
||||||
|
},
|
||||||
|
name: "field",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filedLoading: false,
|
||||||
|
filedData: [],
|
||||||
|
title: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getFiledList();
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
watch: {},
|
||||||
|
methods: {
|
||||||
|
//获取字段映射
|
||||||
|
getFiledList() {
|
||||||
|
this.filedLoading = true;
|
||||||
|
listFieldConfigApi()
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.filedData = res.data;
|
||||||
|
|
||||||
|
this.filedLoading = false;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err); //代码错误、请求失败捕获
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//新增
|
||||||
|
handleAddClick() {
|
||||||
|
this.title = "新增字段映射";
|
||||||
|
this.$refs.filedAddRef.display();
|
||||||
|
},
|
||||||
|
handleEditClick(data) {
|
||||||
|
this.title = "修改";
|
||||||
|
this.$refs.filedAddRef.display();
|
||||||
|
this.$refs.filedAddRef.getdataform(data);
|
||||||
|
},
|
||||||
|
//删除数据
|
||||||
|
handleDeleteClick(data) {
|
||||||
|
console.log(data);
|
||||||
|
this.$confirm("确定要删除记录吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
delFieldConfigApi({ tablename: data.tablename, mc: data.mc }).then(
|
||||||
|
(res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功",
|
||||||
|
});
|
||||||
|
this.getFiledList(); //刷新
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
type: "error",
|
||||||
|
message: res.errorMsg,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.filedBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.page-body {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 74px);
|
||||||
|
padding: 12px;
|
||||||
|
background: #eee;
|
||||||
|
.zsbTableBox {
|
||||||
|
margin-top: 8px;
|
||||||
|
height: calc(100% - 38px);
|
||||||
|
box-shadow: 1px 0 10px 1px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<div class="I2Box">
|
||||||
|
<div class="equimentList">
|
||||||
|
<div class="sideNav">
|
||||||
|
<h3><i class="el-icon-s-tools"></i>I2配置</h3>
|
||||||
|
<ul class="navList">
|
||||||
|
<li v-for="(item, index) in navlist" :key="index">
|
||||||
|
<router-link :to="item.path">
|
||||||
|
<span>{{ item.name }}</span
|
||||||
|
><i class="el-icon-arrow-right"></i>
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="reportTable">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
// import addRules from "./components/addRules";
|
||||||
|
// import copyRules from "./components/copyRules";
|
||||||
|
import {} from "@/utils/api/index";
|
||||||
|
export default {
|
||||||
|
name: "I2config",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeIndex: 0,
|
||||||
|
navlist: [
|
||||||
|
{
|
||||||
|
name: "字段映射",
|
||||||
|
path: "/I2config/filed",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "导出类型",
|
||||||
|
path: "/I2config/exportType",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "导出记录",
|
||||||
|
path: "/I2config/record",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
computed: {},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.I2Box {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
.equimentList {
|
||||||
|
min-width: 240px;
|
||||||
|
max-width: 240px;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
//border: 1px solid #fff;
|
||||||
|
margin-right: 24px;
|
||||||
|
background: rgba(8, 9, 36, 0.28);
|
||||||
|
|
||||||
|
box-shadow: inset 0 4px 44px 0 #106cde;
|
||||||
|
//padding: 0px 12px;
|
||||||
|
.sideNav {
|
||||||
|
margin: 10px;
|
||||||
|
|
||||||
|
height: calc(100% - 20px);
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-weight: normal;
|
||||||
|
display: block;
|
||||||
|
height: 38px;
|
||||||
|
line-height: 36px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 16px 0 16px;
|
||||||
|
-webkit-text-shadow: none !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #262626;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
i {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navList {
|
||||||
|
box-shadow: inset 0 4px 4px -2px rgba(0, 0, 0, 0.15),
|
||||||
|
inset 0 -4px 4px -2px rgba(0, 0, 0, 0.15);
|
||||||
|
position: relative;
|
||||||
|
background-color: #fbfbfb;
|
||||||
|
li {
|
||||||
|
padding: 0 16px 0 38px;
|
||||||
|
color: #262626;
|
||||||
|
height: 38px;
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
left: 23px;
|
||||||
|
top: 0;
|
||||||
|
bottom: 19px;
|
||||||
|
border-left: 1px solid #e2e2e2;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
a {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #106cde;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
color: #262626;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
left: -18px;
|
||||||
|
top: 16px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e2e2e2;
|
||||||
|
z-index: 2;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.router-link-active {
|
||||||
|
color: #106cde;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.reportTable {
|
||||||
|
flex: 1;
|
||||||
|
overflow-x: hidden;
|
||||||
|
background: rgba(8, 9, 36, 0.28);
|
||||||
|
// -webkit-backdrop-filter: blur(10px);
|
||||||
|
// backdrop-filter: blur(10px);
|
||||||
|
box-shadow: inset 0 4px 44px 0 #106cde;
|
||||||
|
padding: 0px 12px;
|
||||||
|
.reportHead {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
h3 {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: normal;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-table .el-table__cell {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.editClass {
|
||||||
|
.el-link.el-link--primary {
|
||||||
|
margin-right: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<div class="filedBox">
|
||||||
|
<div class="reportHead">
|
||||||
|
<h3>导出记录</h3>
|
||||||
|
</div>
|
||||||
|
<div class="page-body">
|
||||||
|
<el-button type="primary" icon="el-icon-plus">添加主设备</el-button>
|
||||||
|
<div class="zsbTableBox"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
//import { zsbDeleteApi, zsbListAllApi } from "@/utils/api/index";
|
||||||
|
// import addzsbDialog from "./components/addzsbDialog";
|
||||||
|
export default {
|
||||||
|
name: "record",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {},
|
||||||
|
watch: {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.zsbBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.page-body {
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
height: calc(100% - 74px);
|
||||||
|
padding: 12px;
|
||||||
|
background: #eee;
|
||||||
|
.zsbTableBox {
|
||||||
|
margin-top: 8px;
|
||||||
|
height: calc(100% - 38px);
|
||||||
|
box-shadow: 1px 0 10px 1px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue