guarantee-lsq před 2 roky
rodič
revize
5a9b8ae6ae
1 změnil soubory, kde provedl 39 přidání a 24 odebrání
  1. 39 24
      src/views/sb/change-record/SbChangeRecord.vue

+ 39 - 24
src/views/sb/change-record/SbChangeRecord.vue

@@ -58,9 +58,11 @@
         size="default"
         rowKey="id"
         :columns="columns"
+        :widthSpace="true"
         :data="loadData"
         :alert="options.alert"
         :rowSelection="options.rowSelection"
+        :scroll="{x: 1500, y: BaseTool.Constant.scrollY}"
         showPagination="auto"
       >
         <span slot="action" slot-scope="record">
@@ -114,63 +116,76 @@ export default {
         {
           title: '序号',
           dataIndex: 'index',
+          width: 100,
+          checked: true,
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
           }
         },
         {
           title: '记录人',
+          width: 100,
+          checked: true,
           dataIndex: 'createdUserName'
         },
         {
-          title: '设备ID',
-          dataIndex: 'sbId'
+          title: '设备',
+          width: 130,
+          checked: true,
+          dataIndex: 'sbName'
         },
         {
-          title: '更改内容',
-          dataIndex: 'content'
-        },
-        {
-          title: '原设备位置',
-          dataIndex: 'oldPositionId'
-        },
-        {
-          title: '修改后设备位置',
-          dataIndex: 'positionId'
-        },
-        {
-          title: '位号',
+          title: '设备位号',
+          width: 130,
+          checked: true,
           dataIndex: 'sbNoId'
         },
         {
-          title: '原父设备ID',
-          dataIndex: 'oldParentId'
+          title: '更改类型',
+          width: 130,
+          checked: true,
+          dataIndex: 'changeType',
+          customRender: (text, record, index) => {
+            if (text === 1) {
+              return '设备位置变更'
+            } else if (text === 2) {
+              return '设备位号变更'
+            } else {
+              return '父设备变更'
+            }
+          }
         },
         {
-          title: '修改后父设备ID',
-          dataIndex: 'parentId'
+          title: '更改内容',
+          width: 200,
+          checked: true,
+          dataIndex: 'content'
         },
         {
           title: '记录时间',
+          width: 150,
+          checked: true,
           dataIndex: 'createdTime'
         },
         {
           title: '开始时间',
+          width: 150,
+          checked: true,
           dataIndex: 'startTime'
         },
         {
           title: '结束时间',
+          width: 150,
+          checked: true,
           dataIndex: 'endTime'
         },
-        {
-          title: '更改类型 1 位置 2 位号 3 父设备',
-          dataIndex: 'changeType'
-        },
         {
           title: '操作',
           key: 'action',
           width: '200px',
           align: 'center',
+          fixed: 'right',
+          checked: true,
           scopedSlots: { customRender: 'action' }
         }
       ],
@@ -182,7 +197,7 @@ export default {
           ...this.queryParam,
           dataScope: {
             sortBy: 'desc',
-            sortName: 'update_time'
+            sortName: 'created_time'
           }
         }
         return getSbChangeRecordPage(Object.assign(parameter, this.queryParam))