yizai hace 3 años
padre
commit
6d79eff5e2

+ 7 - 0
src/api/client-setting.js

@@ -10,6 +10,13 @@ export function getList(params) {
   })
 }
 
+export function fileLoad() {
+  return appservice({
+    url: `${baseUrl}/file`,
+    method: 'get'
+  })
+}
+
 export function create(data) {
   return appservice({
     url: `${baseUrl}`,

+ 2 - 1
src/permission.js

@@ -19,7 +19,8 @@ const whiteList = [
   '/signout-callback-oidc',
   '/gride-work-info',
   '/beam-carrier-work-info',
-  '/client-credential-info'
+  '/client-credential-info',
+  '/device-manage'
 ] // no redirect whitelist
 
 router.beforeEach(async(to, from, next) => {

+ 6 - 0
src/router/index.js

@@ -69,6 +69,12 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/device-manage',
+    component: () => import('@/views/bridge/device-manage/index'),
+    name: 'diviceMng',
+    hidden: true
+  },
+  {
     path: '/',
     component: Layout,
     redirect: '/dashboard',

+ 20 - 77
src/views/bridge/device-manage/index.vue

@@ -1,26 +1,8 @@
 <template>
   <el-container class="content-height-fit">
-    <inner-sidebar>
-      <ProjectSectionTree @node-click="handleTreeClick" />
-    </inner-sidebar>
     <el-container class="resize-fit-container">
       <div class="app-container">
         <div class="filter-container blue-top-border">
-          <el-select
-            v-model="listQuery.sectionAreaId"
-            placeholder="工区"
-            class="filter-item el-selects"
-            clearable
-            @clear="delValue('sectionAreaId')"
-            @change="getList"
-          >
-            <el-option
-              v-for="item in areas"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            />
-          </el-select>
           <el-input
             v-model="listQuery.deviceNo"
             placeholder="设备编号"
@@ -59,7 +41,6 @@
             @click="handleFilter"
           >查询</el-button>
           <el-button
-            v-if="$requirePermission('BSET.DVMG.C')"
             v-waves
             class="filter-item"
             type="primary"
@@ -79,23 +60,12 @@
             style="width: 100%"
             height="calc(100vh - 276px)"
           >
-            <div slot="empty">
-              <span v-if="listQuery.sectionId">没有数据</span>
-              <span v-else>请选择标段</span>
-            </div>
             <el-table-column label="序号" type="index" width="50" align="center" />
-            <!-- <el-table-column label="工区名称" align="center">
-              <template slot-scope="{ row }">
-                {{ getAreaName(row.sectionAreaId) }}
-              </template>
-            </el-table-column> -->
             <el-table-column label="设备编号" prop="deviceNo" :show-overflow-tooltip="true" align="center" />
             <el-table-column label="设备名称" prop="deviceName" :show-overflow-tooltip="true" align="center" />
             <el-table-column label="类型名称" prop="categoryName" :show-overflow-tooltip="true" align="center" />
             <el-table-column label="规格型号" prop="spec" :show-overflow-tooltip="true" align="center" />
             <el-table-column label="制造厂家" prop="madeFactory" :show-overflow-tooltip="true" align="center" />
-            <!-- <el-table-column label="司机姓名" prop="driverName" width="80" align="center" />
-            <el-table-column label="联系电话" prop="telephone" width="120" align="center" /> -->
             <el-table-column label="累计过孔数" prop="viaCount" width="100" align="center" />
             <el-table-column label="累计工作时间" prop="allTime" width="110" align="center" />
             <el-table-column label="是否在线" width="80" align="center">
@@ -113,13 +83,11 @@
             >
               <template slot-scope="{ row }">
                 <el-button
-                  v-if="$requirePermission('BSET.DVMG.U')"
                   type="primary"
                   size="mini"
                   @click="handleUpdate(row)"
                 >修改</el-button>
                 <el-button
-                  v-if="$requirePermission('BSET.DVMG.D')"
                   size="mini"
                   type="danger"
                   @click="handleDelete(row)"
@@ -259,17 +227,13 @@
 <script>
 import * as interfaceApi from '@/api/device-manage.js'
 import * as areaApi from '@/api/backbone/section-area'
-import * as dictEntryApi from '@/api/dict-entry.js'
-import ProjectSectionTree from '@/views/projects/components/ProjectSectionTree'
-
 import waves from '@/directive/waves' // waves directive
 import Pagination from '@/components/Pagination' // secondary package based on el-pagination
-import InnerSidebar from '@/components/InnerSidebar'
 
 export default {
   name: 'DeviceMng',
   directives: { waves },
-  components: { Pagination, ProjectSectionTree, InnerSidebar },
+  components: { Pagination },
   data() {
     return {
       list: [],
@@ -277,27 +241,10 @@ export default {
         { key: 1, name: '架桥机' },
         { key: 2, name: '运梁车' }
       ],
-      entity: {
-        id: undefined,
-        projectId: undefined,
-        sectionId: undefined,
-        sectionAreaId: undefined,
-        deviceNo: '',
-        deviceName: '',
-        category: undefined,
-        categoryName: '',
-        spec: '',
-        madeFactory: '',
-        driverName: '',
-        telephone: '',
-        deviceType: undefined
-      },
+      entity: {},
       total: 0,
       listLoading: false,
       listQuery: {
-        projectId: undefined,
-        sectionId: undefined,
-        sectionAreaId: undefined,
         deviceNo: '',
         deviceName: '',
         deviceType: undefined,
@@ -340,26 +287,26 @@ export default {
   },
   mounted() {
     this.getList()
-    this.getJQJTypes()
-    this.getYLCTypes()
+    // this.getJQJTypes()
+    // this.getYLCTypes()
   },
   methods: {
-    getJQJTypes() {
-      dictEntryApi.getJQJTypes().then(res => {
-        res.forEach(t => {
-          t.code = t.code - 0
-        })
-        this.jqjTypes = res
-      })
-    },
-    getYLCTypes() {
-      dictEntryApi.getYLCTypes().then(res => {
-        res.forEach(t => {
-          t.code = t.code - 0
-        })
-        this.ylcTypes = res
-      })
-    },
+    // getJQJTypes() {
+    //   dictEntryApi.getJQJTypes().then(res => {
+    //     res.forEach(t => {
+    //       t.code = t.code - 0
+    //     })
+    //     this.jqjTypes = res
+    //   })
+    // },
+    // getYLCTypes() {
+    //   dictEntryApi.getYLCTypes().then(res => {
+    //     res.forEach(t => {
+    //       t.code = t.code - 0
+    //     })
+    //     this.ylcTypes = res
+    //   })
+    // },
     // 树形事件
     handleTreeClick(data, node) {
       this.listQuery.projectId = undefined
@@ -400,10 +347,6 @@ export default {
     },
     // 获取数据列表
     getList() {
-      if (!this.listQuery.projectId) {
-        this.list = []
-        return
-      }
       this.listLoading = true
       interfaceApi
         .getList(this.listQuery)

+ 8 - 0
src/views/client-setting/index.vue

@@ -26,6 +26,14 @@
             size="small"
             @click="handleCreate"
           >新增</el-button>
+          <el-button
+            v-waves
+            class="filter-item"
+            type="primary"
+            icon="el-icon-edit"
+            size="small"
+            @click="fileLoad"
+          >下载加密文件</el-button>
         </div>
         <div class="content-container">
           <el-table

+ 24 - 0
src/views/grider-erections/client-settings/index.vue

@@ -26,6 +26,14 @@
             size="small"
             @click="handleCreate"
           >新增</el-button>
+          <el-button
+            v-waves
+            class="filter-item"
+            type="primary"
+            icon="el-icon-edit"
+            size="small"
+            @click="fileLoad"
+          >下载加密凭证</el-button>
         </div>
         <div class="content-container">
           <el-table
@@ -225,6 +233,22 @@ export default {
             this.listLoading = false
           })
       })
+    },
+    fileLoad() {
+      this.$confirm('确定下载, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.listLoading = true
+        clientApi
+          .fileLoad()
+          .then(() => {
+            this.getList()
+          })
+      })
+        .finally(() => {
+        })
     }
   }
 }