From aa05304d221b1883d746e686f390d6f3fba598a7 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 24 五月 2024 09:36:09 +0800
Subject: [PATCH] feat:动态数据中心
---
src/views/system/data-manage/data-detail/index.vue | 16 +++++++++++-----
src/views/system/data-manage/index.vue | 10 +++++++---
src/views/system/data-manage/detail.js | 6 ++++++
src/router/index.js | 19 +++++++++++++++++++
4 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index eeb0275..ca9f532 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -111,6 +111,25 @@
// 鍔ㄦ�佽矾鐢憋紝鍩轰簬鐢ㄦ埛鏉冮檺鍔ㄦ�佸幓鍔犺浇
export const dynamicRoutes = [
+
+ {
+ path: '/data-manage/data-detail',
+ component: Layout,
+ hidden: true,
+ permissions: ['data:manage:detail'],
+ children: [
+ {
+ path: 'index/:type/:typeId',
+ component: () => import('@/views/system/data-manage/data-detail'),
+ name: 'DataDetail',
+ meta: {
+ title: '鏁版嵁璇︽儏',
+ activeMenu: '/data-manage'
+ }
+ }
+ ]
+ },
+
{
path: '/system/user-auth',
component: Layout,
diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue
index 95c1d4d..ec1d7c2 100644
--- a/src/views/system/data-manage/data-detail/index.vue
+++ b/src/views/system/data-manage/data-detail/index.vue
@@ -130,6 +130,8 @@
<script>
import { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/vehicle-data-monitor";
import { tableColumn } from "./list";
+import store from '@/store';
+
export default {
name: "Platform",
data() {
@@ -178,6 +180,10 @@
tableHead: []
};
},
+ beforeRouteEnter(to, from, next) {
+ console.log(to);
+ next();
+ },
created() {
this.tableHead = tableColumn[0].columns;
this.getList();
@@ -225,9 +231,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 +244,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 +285,7 @@
handleExport() {
this.download('platform/platform/export', {
...this.queryParams
- }, `platform_${new Date().getTime()}.xlsx`)
+ }, `platform_${new Date().getTime()}.xlsx`);
}
}
};
diff --git a/src/views/system/data-manage/detail.js b/src/views/system/data-manage/detail.js
new file mode 100644
index 0000000..88c3381
--- /dev/null
+++ b/src/views/system/data-manage/detail.js
@@ -0,0 +1,6 @@
+export const detailList = [
+ {
+
+ }
+
+];
\ No newline at end of file
diff --git a/src/views/system/data-manage/index.vue b/src/views/system/data-manage/index.vue
index e53f18a..0d72dd7 100644
--- a/src/views/system/data-manage/index.vue
+++ b/src/views/system/data-manage/index.vue
@@ -138,19 +138,23 @@
{ name: '', icon: 'el-icon-money', description: '鎻忚堪淇℃伅', routerUrl: '/vehicle-data-monitor' },
{ name: '', icon: 'el-icon-data-analysis', description: '鎻忚堪淇℃伅', routerUrl: '/vehicle-data-monitor' },
]
- }
+ };
},
methods: {
handleDetail(item) {
+ this.$router.push({
+ path: `/data-manage/data-detail/index/${'car'}/${1}`,
+ });
+ return;
this.$router.push({
path: item.routerUrl,
params: {
id: item.id
}
- })
+ });
}
}
-}
+};
</script>
<style scoped>
--
Gitblit v1.8.0