From f98f75348627fc5af2faa26ef56dcf0a8bfcb1b6 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 07 Dec 2021 16:15:32 +0800
Subject: [PATCH] +加入驱动下载页面

---
 src/lang/zh.js                         |    1 
 src/router/views/index.js              |   14 ++
 src/api/drive/drive.js                 |   13 ++
 src/page/index/top/index.vue           |   14 ++
 src/page/index/top/top-drive.vue       |  114 +++++++++++++++++++
 public/pfd/build/generic/web/viewer.js |    2 
 src/page/index/top/drive.vue           |  154 +++++++++++++++++++++++++
 7 files changed, 311 insertions(+), 1 deletions(-)

diff --git a/public/pfd/build/generic/web/viewer.js b/public/pfd/build/generic/web/viewer.js
index 4339ddb..9741a95 100644
--- a/public/pfd/build/generic/web/viewer.js
+++ b/public/pfd/build/generic/web/viewer.js
@@ -6999,7 +6999,7 @@
 
   document.getElementById('sidebarToggle').addEventListener('click',
     function () {
-      console.log(12345)
+      // console.log(12345)
 
       this.classList.toggle('toggled');
       outerContainer.classList.add('sidebarMoving');
diff --git a/src/api/drive/drive.js b/src/api/drive/drive.js
new file mode 100644
index 0000000..6d7b886
--- /dev/null
+++ b/src/api/drive/drive.js
@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-desk/notice/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
diff --git a/src/lang/zh.js b/src/lang/zh.js
index c5f6de3..1f914b0 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -102,6 +102,7 @@
     notice: '消息通知',
     theme: '主题',
     userSManual: '用户手册',
+    drive: '驱动',
     color: '换色'
   },
   tagsView: {
diff --git a/src/page/index/top/drive.vue b/src/page/index/top/drive.vue
new file mode 100644
index 0000000..f2c1564
--- /dev/null
+++ b/src/page/index/top/drive.vue
@@ -0,0 +1,154 @@
+<template>
+  <div class="drive">
+    <avue-crud
+      :option="option1"
+      :table-loading="loading"
+      :data="data"
+      :page.sync="page"
+      v-model="form"
+      ref="crud"
+      @row-update="rowUpdate"
+      @row-del="rowDel"
+      @search-change="searchChange"
+      @search-reset="searchReset"
+      @selection-change="selectionChange"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
+      :row-style="rowStyle"
+      @on-load="onLoad"
+    >
+      <template slot-scope="{ type, row }" slot="menu">
+        <el-button
+          :type="type"
+          size="small"
+          icon="el-icon-bottom"
+          @click="handleCancel(row)"
+          >下载
+        </el-button>
+      </template>
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import { getList } from "@/api/drive/drive";
+export default {
+  data() {
+    return {
+      ourdata: [
+        // {
+        //   calls: "身份证驱动(内含两个安装包)",
+        //   links:
+        //     "http://223.82.109.183:2081/zhba/upload/20211201/64d8b76f3aecae93e18d015bbca89aba.rar",
+        // },
+        {
+          calls: "JLCertReaderV1.0.1.5.exe",
+          zhcalls: "身份证设备识别驱动",
+          links:
+            "http://223.82.109.183:2081/minio/download/zhba/upload/20211207/JLCertReaderV1.0.1.5.exe?token=",
+        },
+        {
+          calls: "USBDrv3.0-x64.msi",
+          zhcalls: "身份证设备USB连接驱动",
+          links:
+            "http://223.82.109.183:2081/minio/download/zhba/upload/20211207/USBDrv3.0-x64.msi?token=",
+        },
+        {
+          calls: "亚略特CID5000居民身份证指纹采集器安装程序.exe",
+          zhcalls: "指纹采集器(安装)程序",
+          links:
+            "http://223.82.109.183:2081/minio/download/zhba/upload/20211207/%E4%BA%9A%E7%95%A5%E7%89%B9CID5000%E5%B1%85%E6%B0%91%E8%BA%AB%E4%BB%BD%E8%AF%81%E6%8C%87%E7%BA%B9%E9%87%87%E9%9B%86%E5%99%A8%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F.exe?token=",
+        },
+        {
+          calls: "AratekDMA_Installer_X86_V1.0.8.67(CID).exe",
+          zhcalls: "指纹采集器(驱动)程序",
+          links:
+            "http://223.82.109.183:2081/minio/download/zhba/upload/20211207/AratekDMA_Installer_X86_V1.0.8.67(CID).exe?token=",
+        },
+      ],
+      data: [],
+      query: {},
+      loading: false,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+      },
+      option1: {
+        delBtn: false,
+        editBtn: false,
+        addBtn: false,
+        calcHeight: 260,
+        tip: false,
+        height: "auto",
+        searchShow: true,
+        searchMenuSpan: 8,
+        labelWidth: 130,
+        headerAlign: "center",
+        align: "center",
+        border: true,
+        index: true,
+        viewBtn: false,
+        selection: true,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "驱动名称",
+            prop: "zhcalls",
+          },
+          {
+            label: "文件名称",
+            prop: "calls",
+          },
+          {
+            label: "驱动链接",
+            prop: "links",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    handleCancel(row) {
+      let url = row.links;
+      window.open(url, "_self");
+    },
+    searchChange(params, done) {
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    rowDel(row) {},
+    rowUpdate(row, index, done, loading) {
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    currentChange(currentPage) {
+      //分页页码
+      this.page.currentPage = currentPage;
+      this.refreshChange();
+    },
+    sizeChange(pageSize) {
+      //分页尺寸
+      this.page.pageSize = pageSize;
+      this.refreshChange();
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      // console.log("获取数据");
+      this.data = this.ourdata;
+
+      this.loading = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>
\ No newline at end of file
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue
index 68733c6..b752661 100644
--- a/src/page/index/top/index.vue
+++ b/src/page/index/top/index.vue
@@ -59,6 +59,7 @@
           <top-theme></top-theme>
         </div>
       </el-tooltip> -->
+      <!-- 手册 -->
       <el-tooltip
         v-if="showTheme"
         effect="dark"
@@ -67,6 +68,17 @@
       >
         <div class="top-bar__item top-bar__item--show">
           <top-userSManual></top-userSManual>
+        </div>
+      </el-tooltip>
+      <!-- 驱动 -->
+      <el-tooltip
+        v-if="showTheme"
+        effect="dark"
+        :content="$t('navbar.drive')"
+        placement="bottom"
+      >
+        <div class="top-bar__item top-bar__item--show">
+          <top-drive></top-drive>
         </div>
       </el-tooltip>
       <el-tooltip
@@ -139,6 +151,7 @@
 import topNotice from "./top-notice";
 import topLang from "./top-lang";
 import topUserSManual from "./top-userSManual";
+import topDrive from "./top-drive";
 
 export default {
   components: {
@@ -151,6 +164,7 @@
     topNotice,
     topLang,
     topUserSManual,
+    topDrive,
   },
   name: "top",
   data() {
diff --git a/src/page/index/top/top-drive.vue b/src/page/index/top/top-drive.vue
new file mode 100644
index 0000000..7a913be
--- /dev/null
+++ b/src/page/index/top/top-drive.vue
@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <el-dialog title="选择" append-to-body :visible.sync="box" width="50%">
+      <el-radio-group v-model="text" class="list">
+        <el-row :span="24">
+          <el-col
+            v-for="(item, index) in list"
+            :key="index"
+            :md="4"
+            :xs="12"
+            :sm="4"
+          >
+            <el-radio :label="item.value">{{ item.name }}</el-radio>
+          </el-col>
+        </el-row>
+      </el-radio-group>
+    </el-dialog>
+
+    <span>
+      <i class="el-icon-receiving" @click="open" style="font-size: 20px"></i>
+    </span>
+  </div>
+</template>
+
+<script>
+import { setTheme } from "@/util/util";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      box: false,
+      text: "",
+      list: [
+        {
+          name: "默认主题",
+          value: "default",
+        },
+        {
+          name: "白色主题",
+          value: "theme-white",
+        },
+        {
+          name: "黑色主题",
+          value: "theme-dark",
+        },
+        {
+          name: "炫彩主题",
+          value: "theme-star",
+        },
+        {
+          name: "智能主题",
+          value: "theme-bule",
+        },
+        {
+          name: "iview主题",
+          value: "theme-iview",
+        },
+        {
+          name: "vip主题",
+          value: "theme-vip",
+        },
+        {
+          name: "cool主题",
+          value: "theme-cool",
+        },
+        {
+          name: "d2主题",
+          value: "theme-d2",
+        },
+        {
+          name: "hey主题",
+          value: "theme-hey",
+        },
+        {
+          name: "lte主题",
+          value: "theme-lte",
+        },
+      ],
+    };
+  },
+  watch: {
+    text: function (val) {
+      this.$store.commit("SET_THEME_NAME", val);
+      setTheme(val);
+    },
+  },
+  computed: {
+    ...mapGetters(["themeName"]),
+  },
+  mounted() {
+    this.text = this.themeName;
+    if (!this.text) {
+      this.text = "";
+    }
+  },
+  methods: {
+    open() {
+      // this.box = true;
+      // console.log(123);
+      this.$router.push({
+        path: "/drive/index",
+        // query: { departmentid: val.departmentid },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.list {
+  width: 100%;
+}
+</style>
+
diff --git a/src/router/views/index.js b/src/router/views/index.js
index dea6b28..084bc04 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -1020,4 +1020,18 @@
             import( /* webpackChunkName: "views" */ '@/page/index/top/userSManual')
     }]
 },
+{
+    path: '/drive',
+    component: Layout,
+    redirect: '/drive/index',
+    children: [{
+        path: 'index',
+        name: '驱动',
+        meta: {
+            i18n: 'index'
+        },
+        component: () =>
+            import( /* webpackChunkName: "views" */ '@/page/index/top/drive')
+    }]
+},
 ]
\ No newline at end of file

--
Gitblit v1.9.3