jc1.0
fanluyan 1 year ago
parent cedfc24822
commit a35b708a96

@ -34,7 +34,8 @@
</el-form>
<div class="prewInfo" v-loading="warnLoading">
<div class="prewclass">
{{ prewData }}
<span>导出样例</span>
<pre><code class="xml">{{ prewData }}</code></pre>
</div>
<div class="warnmsg">
<el-tag type="warning" v-if="warnMsg !== ''">{{ warnMsg }}</el-tag>
@ -175,8 +176,13 @@ export default {
}
.configInfo {
.prewInfo {
overflow: auto;
height: 300px;
.prewclass {
pre {
height: 230px;
overflow: auto;
}
}
.warnmsg {
margin-top: 24px;
font-size: 14px;

@ -11,7 +11,7 @@
<el-table :data="configData" style="width: 100%">
<el-table-column label="类型名称" prop="typeName"> </el-table-column>
<el-table-column label="表名" prop="tableName"> </el-table-column>
<el-table-column label="时间" prop="createTime">
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
@ -69,7 +69,7 @@ export default {
//
handleDeleteClick(data) {
console.log(data);
this.$confirm("确定要删除记录吗?", "提示", {
this.$confirm(`确定要删除${data.tableName}的映射配置吗?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",

@ -15,7 +15,7 @@
:rules="rules"
:model="formInfo"
>
<el-form-item label="监测设备类型:">
<el-form-item label="导出类型:">
<el-select
v-model="formInfo.jcsbType"
@change="changeJg"
@ -104,7 +104,7 @@ export default {
submitForm() {
this.$refs.formInfo.validate((valid) => {
if (valid) {
if (this.title == "新增字段映射") {
if (this.title == "新增字段导出映射") {
console.log(this.formInfo);
console.log(this.colData);
@ -205,7 +205,7 @@ export default {
console.log(res);
this.jcsbOptions = res.data;
console.log(this.title);
if (this.title == "新增字段映射") {
if (this.title == "新增字段导出映射") {
console.log(this.formInfo);
this.formInfo.jcsbType = this.jcsbOptions[0].id;
this.selectTableName = this.jcsbOptions[0].tablename;
@ -262,7 +262,7 @@ export default {
selected: false, // selectedfalse
value: "", // value
}));
if (this.title == "新增字段映射") {
if (this.title == "新增字段导出映射") {
this.colData = [...this.colAllData]; // 使
} else {
console.log("修改 ");

@ -1,11 +1,11 @@
<template>
<div class="filedBox">
<div class="reportHead">
<h3>字段映射</h3>
<h3>字段导出映射</h3>
</div>
<div class="page-body">
<el-button type="primary" icon="el-icon-plus" @click="handleAddClick"
>新增字段映射</el-button
>新增字段导出映射</el-button
>
<div class="zsbTableBox">
<el-table :data="filedData" style="width: 100%">
@ -93,7 +93,7 @@ export default {
},
//
handleAddClick() {
this.title = "新增字段映射";
this.title = "新增字段导出映射";
this.$refs.filedAddRef.display();
},
handleEditClick(data) {

@ -2,7 +2,7 @@
<div class="I2Box">
<div class="equimentList">
<div class="sideNav">
<h3><i class="el-icon-s-tools"></i>I2配置</h3>
<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">

@ -5,15 +5,15 @@
</div>
<div class="page-body">
<div class="title">
<span>监测设备类型</span>
<span>导出类型</span>
<el-select v-model="jcsbType" @change="changeJg">
<el-option
v-for="item in jcsbOptions"
:key="item.id"
:label="item.mc + '(' + item.tablename + ')'"
:value="item.id"
:key="item.modevtypeId"
:label="item.typeName + '(' + item.tableName + ')'"
:value="item.modevtypeId"
>
{{ item.mc + "(" + item.tablename + ")" }}
{{ item.typeName + "(" + item.tableName + ")" }}
</el-option>
</el-select>
</div>
@ -52,7 +52,7 @@
</div>
</template>
<script>
import { modevtypeListAllApi, listRecordApi } from "@/utils/api/index";
import { listConfigApi, listRecordApi } from "@/utils/api/index";
// import addzsbDialog from "./components/addzsbDialog";
export default {
name: "record",
@ -60,7 +60,7 @@ export default {
data() {
return {
jcsbType: "",
jcsbOptions: [{ id: -1, mc: "全部", tablename: "all" }],
jcsbOptions: [{ modevtypeId: -1, typeName: "全部", tableName: "all" }],
selectTableName: "",
recordData: [],
recordLoading: false,
@ -73,13 +73,12 @@ export default {
watch: {},
methods: {
getjcsbListAll() {
modevtypeListAllApi()
listConfigApi()
.then((res) => {
console.log(res);
this.jcsbOptions = this.jcsbOptions.concat(res.data);
this.jcsbType = this.jcsbOptions[0].id;
this.selectTableName = this.jcsbOptions[0].tablename;
this.jcsbType = this.jcsbOptions[0].modevtypeId;
this.selectTableName = this.jcsbOptions[0].tableName;
this.exportFun();
})
.catch((err) => {
@ -89,7 +88,9 @@ export default {
//tablename
changeJg(val) {
console.log(val);
let selectedOption = this.jcsbOptions.find((item) => item.id === val);
let selectedOption = this.jcsbOptions.find(
(item) => item.modevtypeId === val
);
if (selectedOption) {
// 访 tablename
this.selectTableName = selectedOption.tablename;

Loading…
Cancel
Save