xiangpei
2024-08-24 8dc5f14cb31b82de76e7d5be262d1a9c5e6e994e
src/views/system/data-manage/data-detail/index.vue
@@ -1,14 +1,14 @@
<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">
        <div v-for="card in cardList" style="display: flex;flex-direction: row; margin-right: 50px" :key="card.label">
          <div>
            <div class="icon-container">
              <i :class="card.icon"></i>
            </div>
          </div>
          <div v-for="data in card.dataList" class="dashboard-item">
          <div v-for="data in card.dataList" class="dashboard-item" :key="data.label">
            <div style="color: #5C9BF8;margin-bottom: 20px;font-size: 20px">{{ data.value }}</div>
            <div>{{ data.label }}</div>
          </div>
@@ -22,73 +22,80 @@
      </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>
    <el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange">
      <el-table-column :prop="item.prop" :label="item.label" v-for="(item, index) in tableHead" :key="index" />
      <el-table-column :prop="item.prop" :label="item.label" v-for="(item, index) in tableHead" :key="index"/>
      <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>
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
                @pagination="getList"/>
    <!-- 添加或修改卡口过车数据一致性对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="卡口名称" prop="bayonetName">
          <el-input v-model="form.bayonetName" placeholder="请输入卡口名称" />
          <el-input v-model="form.bayonetName" placeholder="请输入卡口名称"/>
        </el-form-item>
        <el-form-item label="卡口编号" prop="bayonetNumber">
          <el-input v-model="form.bayonetNumber" placeholder="请输入卡口编号" />
          <el-input v-model="form.bayonetNumber" placeholder="请输入卡口编号"/>
        </el-form-item>
        <el-form-item label="过车数据量" prop="vehicleDataNumber">
          <el-input v-model="form.vehicleDataNumber" placeholder="请输入过车数据量" />
          <el-input v-model="form.vehicleDataNumber" placeholder="请输入过车数据量"/>
        </el-form-item>
        <el-form-item label="不唯一数据 " prop="notUniqueData">
          <el-input v-model="form.notUniqueData" placeholder="请输入不唯一数据 " />
          <el-input v-model="form.notUniqueData" placeholder="请输入不唯一数据 "/>
        </el-form-item>
        <el-form-item label="不唯一数据量" prop="notUniqueDataNumber">
          <el-input v-model="form.notUniqueDataNumber" placeholder="请输入不唯一数据量" />
          <el-input v-model="form.notUniqueDataNumber" placeholder="请输入不唯一数据量"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -100,8 +107,8 @@
</template>
<script>
import { dataCenter } from "@/api/platform/data-center";
import { videoData, carData, faceData, equipment } from "./list";
import {dataCenter} from "@/api/platform/data-center";
import {videoData, carData, faceData, equipment} from "./list";
import store from '@/store';
export default {
@@ -143,14 +150,15 @@
      // 表单校验
      rules: {
        bayonetName: [
          { required: true, message: "卡口名称不能为空", trigger: "blur" }
          {required: true, message: "卡口名称不能为空", trigger: "blur"}
        ],
        bayonetNumber: [
          { required: true, message: "卡口编号不能为空", trigger: "blur" }
          {required: true, message: "卡口编号不能为空", trigger: "blur"}
        ],
      },
      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;
@@ -178,11 +187,19 @@
      this.tableHead = data.columns;
      this.cardList = data.card;
    }
    this.getList(this.$route.query.url);
    this.getList();
    if (this.index === 'image_resource_security') {
      this.getSecurityCard()
    }
  },
  methods: {
    /** 查询图像资源安全当月配置信息 */
    getSecurityCard() {
    },
    /** 查询卡口过车数据一致性列表 */
    getList(url) {
    getList() {
      let url = this.$route.query.url;
      this.loading = true;
      dataCenter(url, this.queryParams).then(response => {
        this.platformList = response.data;
@@ -214,7 +231,7 @@
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList(this.$route.query.url);
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
@@ -271,7 +288,8 @@
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => { });
      }).catch(() => {
      });
    },
    /** 导出按钮操作 */
    handleExport() {