East 3 lat temu
rodzic
commit
d86120361d

+ 1 - 1
src/components/newTable/NewTable.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-18 16:30:17
- * @LastEditTime: 2021-09-18 17:56:06
+ * @LastEditTime: 2021-09-22 16:22:44
  * @LastEditors: Please set LastEditors
  * @Description: 表格的封装
  * @FilePath: \hyyfClient\src\components\NewTable.vue

+ 24 - 3
src/views/BioSafety/PersonAdmin.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-09-18 17:10:56
+ * @LastEditTime: 2021-09-22 16:58:35
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \hyyfClient\src\views\BioSafety\PersonAdmin.vue
@@ -19,7 +19,26 @@
     <query-conditions :formItems="formItems" :propFormData="propFormData" @getQueryParams="handleQuery"></query-conditions>
 
     <!-- 表格 -->
-    <new-table :title="title" :listData="listData" :tableItems="tableItems"></new-table>
+    <new-table :title="title" :listData="listData" :tableItems="tableItems" :shows="tableShows">
+      <template v-slot:right>
+        <template v-if="btnSelected === 1">
+          <div>
+            <el-button size="mini">添加人员</el-button>
+            <el-button size="mini">添加区域</el-button>
+          </div>
+        </template>
+        <template v-else-if="btnSelected === 2">
+          <div>
+            
+          </div>
+        </template>
+        <template v-else>
+          <div>
+            
+          </div>
+        </template>
+      </template>
+    </new-table>
   </div>
 </template>
 
@@ -29,7 +48,7 @@ import QueryConditions from 'components/bioSafety/QueryConditions'
 import NewTable from 'components/newTable/NewTable'
 
 import { formItems, propFormData } from './personAdmin/queryCondition.config'
-import { titles, tableItems } from './personAdmin/table.config'
+import { titles, tableItems, tableShows } from './personAdmin/table.config'
 
 export default {
   name: "PersonAdmin",
@@ -51,6 +70,7 @@ export default {
       title: '', // 传给 BioTable 组件的 title
       listData: [], // 传给 BioTable 组件的表格展示的值 listData
       tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
+      tableShows: {}
     }
   },
   mounted() {
@@ -58,6 +78,7 @@ export default {
     this.propFormData = propFormData[this.btnSelected - 1]
     this.title = titles[this.btnSelected - 1]
     this.tableItems = tableItems[this.btnSelected - 1]
+    this.tableShows = tableShows
   },
   methods: {
     // 获取选中的按钮情况

+ 89 - 2
src/views/BioSafety/personAdmin/table.config.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-09-18 17:27:48
+ * @LastEditTime: 2021-09-22 16:22:29
  * @LastEditors: Please set LastEditors
  * @Description: 表格的配置
  * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
@@ -63,4 +63,91 @@ const tableItems1 = [
     slotName: 'handler'
   }
 ]
-export const tableItems = [tableItems1]
+
+const tableItems2 = [
+  {
+    prop: 'time',
+    label: '时间',
+    minWidth: '100',
+    slotName: 'time'
+  },
+  {
+    prop: 'photo',
+    label: '人员图片',
+    minWidth: '150',
+    slotName: 'photo'
+  },
+  {
+    prop: 'name',
+    label: '姓名',
+    minWidth: '150',
+    slotName: 'name'
+  },
+  {
+    prop: 'enterRegion',
+    label: '进入区域',
+    minWidth: '150',
+    slotName: 'enterRegion'
+  },
+  {
+    prop: 'region',
+    label: '负责区域',
+    minWidth: '150',
+    slotName: 'region'
+  },
+  {
+    prop: 'status',
+    label: '状态',
+    minWidth: '100',
+    slotName: 'status'
+  },
+  {
+    prop: 'backlist',
+    label: '黑名单',
+    minWidth: '150',
+    slotName: 'backlist'
+  },
+  {
+    label: '操作',
+    minWidth: '150',
+    slotName: 'handler'
+  }
+]
+
+const tableItems3 = [
+  {
+    prop: 'photo',
+    label: '人员图片',
+    minWidth: '150',
+    slotName: 'photo'
+  },
+  {
+    prop: 'name',
+    label: '姓名',
+    minWidth: '150',
+    slotName: 'name'
+  },
+  {
+    prop: 'location',
+    label: '位置',
+    minWidth: '150',
+    slotName: 'location'
+  },
+  {
+    prop: 'region',
+    label: '负责区域',
+    minWidth: '150',
+    slotName: 'region'
+  },
+  {
+    label: '操作',
+    minWidth: '150',
+    slotName: 'handler'
+  }
+]
+
+export const tableItems = [tableItems1, tableItems2, tableItems3]
+
+export const tableShows = {
+  showIndex: false, showSelect: true
+}