ZhangXianQiang
2024-05-24 aa05304d221b1883d746e686f390d6f3fba598a7
feat:动态数据中心
3个文件已修改
1个文件已添加
51 ■■■■ 已修改文件
src/router/index.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/data-detail/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/detail.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/data-manage/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,
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`);
    }
  }
};
src/views/system/data-manage/detail.js
New file
@@ -0,0 +1,6 @@
export const detailList = [
  {
  }
];
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>