xiangpei
2024-08-24 8dc5f14cb31b82de76e7d5be262d1a9c5e6e994e
src/views/system/data-manage/data-detail/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
    <el-card class="box-card" v-show="index !== 'image_resource_security'">
      <el-row style="display: flex; flex-direction: row; align-items: center" justify="space-between">
        <div v-for="card in cardList" style="display: flex;flex-direction: row; margin-right: 50px" :key="card.label">
          <div>
@@ -22,36 +22,41 @@
      </el-row>
    </el-card>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="卡口编号" prop="bayonetNumber">
        <el-input v-model="queryParams.bayonetNumber" placeholder="请输入卡口编号" clearable
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="卡口名称" prop="bayonetName">
        <el-input v-model="queryParams.bayonetName" placeholder="请输入卡口名称" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <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>
    <!--    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">-->
    <!--      <el-form-item label="卡口编号" prop="bayonetNumber">-->
    <!--        <el-input v-model="queryParams.bayonetNumber" placeholder="请输入卡口编号" clearable-->
    <!--          @keyup.enter.native="handleQuery" />-->
    <!--      </el-form-item>-->
    <!--      <el-form-item label="卡口名称" prop="bayonetName">-->
    <!--        <el-input v-model="queryParams.bayonetName" placeholder="请输入卡口名称" clearable @keyup.enter.native="handleQuery" />-->
    <!--      </el-form-item>-->
    <!--      <el-form-item>-->
    <!--        <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>-->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
          v-hasPermi="['platform:platform:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
          v-hasPermi="['platform:platform:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
          v-hasPermi="['platform:platform:remove']">删除</el-button>
      </el-col>
    <el-row :gutter="10" class="mb8" v-show="index === 'image_resource_security'">
      <!--      <el-col :span="1.5">-->
      <!--        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
      <!--          v-hasPermi="['platform:platform:add']">新增</el-button>-->
      <!--      </el-col>-->
      <!--      <el-col :span="1.5">-->
      <!--        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"-->
      <!--          v-hasPermi="['platform:platform:edit']">修改</el-button>-->
      <!--      </el-col>-->
      <!--      <el-col :span="1.5">-->
      <!--        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"-->
      <!--          v-hasPermi="['platform:platform:remove']">删除</el-button>-->
      <!--      </el-col>-->
      <!--      <el-col :span="1.5">-->
      <!--        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"-->
      <!--          v-hasPermi="['platform:platform:export']">导出</el-button>-->
      <!--      </el-col>-->
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
          v-hasPermi="['platform:platform:export']">导出</el-button>
                   v-hasPermi="['platform:platform:export']">导入
        </el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
@@ -62,9 +67,11 @@
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['platform:platform:edit']">修改</el-button>
                     v-hasPermi="['platform:platform:edit']">修改
          </el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['platform:platform:remove']">删除</el-button>
                     v-hasPermi="['platform:platform:remove']">删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -150,7 +157,8 @@
        ],
      },
      tableHead: [],
      cardList: []
      cardList: [],
      index: null
    };
  },
  beforeRouteEnter(to, from, next) {
@@ -158,11 +166,12 @@
    next();
  },
  created() {
    this.index = this.$route.query.index;
    if (this.$route.query.type === '1') {
      let data = videoData.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
      this.cardList = data.card;
    };
    }
    if (this.$route.query.type === '2') {
      let data = carData.table.filter(item => item.index === this.$route.query.index)[0]
      this.tableHead = data.columns;
@@ -179,8 +188,15 @@
      this.cardList = data.card;
    }
    this.getList();
    if (this.index === 'image_resource_security') {
      this.getSecurityCard()
    }
  },
  methods: {
    /** 查询图像资源安全当月配置信息 */
    getSecurityCard() {
    },
    /** 查询卡口过车数据一致性列表 */
    getList() {
      let url = this.$route.query.url;
@@ -272,7 +288,8 @@
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {