|
@@ -18,17 +18,17 @@
|
|
|
</div>
|
|
|
<div class="protocol-content">
|
|
|
<el-row :gutter="24">
|
|
|
- <el-col v-for="item in dataList" :key="item.protocolId" :span="4">
|
|
|
+ <el-col v-for="item in dataList" :key="item.sourceDataID" :span="4">
|
|
|
<div class="grid-content">
|
|
|
<div class="head-line"></div>
|
|
|
<div class="grid-content-hand flex">
|
|
|
<div class="title flex-wrap">
|
|
|
- <div class="name">{{ item.protocolName }}</div>
|
|
|
+ <div class="name">{{ item.dataName }}</div>
|
|
|
<i class="loger" @click="showEditDialog(item)" />
|
|
|
</div>
|
|
|
<i class="el-icon-close icon" @click="showRemoveDialog(item)" />
|
|
|
</div>
|
|
|
- <div class="disc">行李源报文</div>
|
|
|
+ <div class="disc">{{item.dataType}}</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -52,7 +52,7 @@
|
|
|
|
|
|
<script>
|
|
|
import Dialog from "@/layout/components/Dialog/index.vue";
|
|
|
-import { GeneralDataReception } from "@/api/dataIntegration";
|
|
|
+import { Query } from '@/api/dataIntegration';
|
|
|
|
|
|
export default {
|
|
|
name: "ProtocolHome",
|
|
@@ -65,21 +65,31 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created () {
|
|
|
- for (let index = 0; index < 20; index++) {
|
|
|
- this.dataList.push({
|
|
|
- protocolId: index,
|
|
|
- protocolName: "源数据-" + (Math.floor(Math.random() * 20) + 1),
|
|
|
- });
|
|
|
- }
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ const res = await Query({
|
|
|
+ id: 4,
|
|
|
+ dataContent: []
|
|
|
+ });
|
|
|
+ if (res.code === "0") {
|
|
|
+ this.dataList = res.returnData
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message ?? "失败");
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log("错误", error);
|
|
|
+ }
|
|
|
+ },
|
|
|
// 新增-跳转
|
|
|
showAddDialog () {
|
|
|
this.$router.push('/systemSettings/sourceDataItemEdit')
|
|
|
},
|
|
|
// 编辑-跳转
|
|
|
showEditDialog (item) {
|
|
|
-
|
|
|
+ this.$router.push('/systemSettings/sourceDataItemEdit')
|
|
|
},
|
|
|
// 删除-弹框
|
|
|
showRemoveDialog (item) {
|