From 3457909638c660c0cfcb521b6104ab64c679b914 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期二, 19 九月 2023 16:23:16 +0800
Subject: [PATCH] 修改页面左右展示比例

---
 src/views/eam/EquipmentTransferList.vue |   37 +++++++++++++++++++++++++++----------
 1 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/views/eam/EquipmentTransferList.vue b/src/views/eam/EquipmentTransferList.vue
index 4d3989b..248fa2a 100644
--- a/src/views/eam/EquipmentTransferList.vue
+++ b/src/views/eam/EquipmentTransferList.vue
@@ -59,12 +59,13 @@
         style='margin-top: 15px'
         @click='handleAdd'
         type='primary'
+        v-has="'equipmentTransfer:add'"
         icon='plus'
       >鏂板
       </a-button>
       <a-button
         v-if="selectedRowKeys.length > 0  && (selectionRows[0].auditStatus==='notSubmitted' || selectionRows[0].auditStatus==='Rejected')"
-        @click='handleSubmit' type='primary' icon='check'>鎻愪氦
+        @click='handleSubmit' type='primary' icon='check' v-has="'equipmentTransfer:submitAndCancel'">鎻愪氦
       </a-button>
       <a-button v-if="selectedRowKeys.length > 0  && selectionRows[0].auditStatus === 'pendingApproval'"
                 @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖
@@ -90,7 +91,7 @@
         size='middle'
         bordered
         rowKey='id'
-        :scroll="{ x: 'calc(1400px + 50%)', y: 900 }"
+        :scroll="{ x: true }"
         :columns='columns'
         :dataSource='dataSource'
         :pagination='ipagination'
@@ -100,21 +101,34 @@
         @change='handleTableChange'
       >
 
-
+        <template slot="num" slot-scope="text" >
+          <a-tooltip placement="top" :title="text" trigger="hover">
+            <div>
+              <template slot="title"> </template>
+              <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p>
+            </div>
+          </a-tooltip>
+        </template>
 
 
         <span
           slot='action'
           slot-scope='text, record'
         >
-          <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a>
+          <a v-if="record.auditStatus === 'notSubmitted'|| record.auditStatus === 'Rejected'"
+             @click='handleEdit(record)' v-has="'equipmentTransfer:edit'">缂栬緫</a>
           <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a>
-
-          <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' />
-        <a-dropdown v-if="record.auditStatus === 'notSubmitted'">
-                        <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a>
+           <a-divider
+             v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'"
+             type='vertical'
+           />
+        <a-dropdown >
+                        <a class='ant-dropdown-link'>鏇村 <a-icon type='down'/></a>
                         <a-menu slot='overlay'>
                             <a-menu-item>
+                            <a @click='handleDetail(record)'>璇︽儏</a>
+                            </a-menu-item>
+                            <a-menu-item v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'" v-has="'equipmentTransfer:delete'">
                                 <a-popconfirm title='纭畾鍒犻櫎鍚�?'
                                               @confirm='() => handleDelete(record.id)'>
                                     <a>鍒犻櫎</a>
@@ -192,7 +206,10 @@
         {
           title: '鍗曟嵁鍙�',
           align: 'center',
-          dataIndex: 'num'
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' },
+          width: 100,
+          ellipsis: true,
         },
         {
           title: '璋冨嚭鍏徃',
@@ -323,7 +340,7 @@
     },
 
     handleApprove: function(record) {
-      let  reject, approval;
+      let reject, approval
       reject = this.url.reject
       approval = this.url.approval
       this.$refs.approvalModalForm.showModals(record, reject, approval)

--
Gitblit v1.9.3