From 4eeaec1eddd5ef2be4b79423154fa2dce81d5566 Mon Sep 17 00:00:00 2001
From: 黄何裕 <1053952480@qq.com>
Date: 星期五, 26 七月 2024 15:28:09 +0800
Subject: [PATCH] 大屏重构
---
src/views/system/data-manage/data-detail/index.vue | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue
index 95c1d4d..ca05018 100644
--- a/src/views/system/data-manage/data-detail/index.vue
+++ b/src/views/system/data-manage/data-detail/index.vue
@@ -56,8 +56,8 @@
<el-input v-model="queryParams.bayonetName" placeholder="璇疯緭鍏ュ崱鍙e悕绉�" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+ <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="small" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -120,8 +120,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
<el-button @click="cancel">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
</div>
</el-dialog>
</div>
@@ -129,7 +129,9 @@
<script>
import { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/vehicle-data-monitor";
-import { tableColumn } from "./list";
+import { videoData, carData, faceData, equipment } from "./list";
+import store from '@/store';
+
export default {
name: "Platform",
data() {
@@ -178,8 +180,15 @@
tableHead: []
};
},
+ beforeRouteEnter(to, from, next) {
+ console.log(to);
+ next();
+ },
created() {
- this.tableHead = tableColumn[0].columns;
+ if (this.$route.query.type === '1') this.tableHead = videoData[this.$route.query.index].columns;
+ if (this.$route.query.type === '2') this.tableHead = carData[this.$route.query.index].columns;
+ if (this.$route.query.type === '3') this.tableHead = faceData[this.$route.query.index].columns;
+ if (this.$route.query.type === '4') this.tableHead = equipment[this.$route.query.index].columns;
this.getList();
},
methods: {
@@ -225,9 +234,9 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id)
- this.single = selection.length !== 1
- this.multiple = !selection.length
+ this.ids = selection.map(item => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
@@ -238,7 +247,7 @@
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
- const id = row.id || this.ids
+ const id = row.id || this.ids;
getPlatform(id).then(response => {
this.form = response.data;
this.open = true;
@@ -279,7 +288,7 @@
handleExport() {
this.download('platform/platform/export', {
...this.queryParams
- }, `platform_${new Date().getTime()}.xlsx`)
+ }, `platform_${new Date().getTime()}.xlsx`);
}
}
};
@@ -300,7 +309,7 @@
width: 20%;
height: 80px;
margin-left: 5%;
- background-color: #5599F7;
+ background-color: #1890FF;
font-size: 50px;
color: #FFF;
width: 85px;
@@ -314,4 +323,4 @@
.dashboard-item {
text-align: center;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0