Prechádzať zdrojové kódy

fix(accident): 放宽事故编号列 + 操作列宽度

- 事故编号列 width 170 → 220,加 show-overflow-tooltip(容纳 19 位 AC+ts+3位随机数)
- 操作列 width 200 → 240,容纳 3 个图标+文字按钮不挤压
- 详情/编辑/删除按钮按 sys_menu perms 加 v-hasPermi
klxj001 3 dní pred
rodič
commit
aea5e4bb95
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      src/views/risk/accident/index.vue

+ 5 - 5
src/views/risk/accident/index.vue

@@ -120,7 +120,7 @@
       </template>
 
       <el-table v-loading="loading" :data="accidentList" border>
-        <el-table-column label="事故编号" align="center" prop="accidentCode" width="170" />
+        <el-table-column label="事故编号" align="center" prop="accidentCode" width="220" :show-overflow-tooltip="true" />
         <el-table-column label="事故名称" align="center" prop="accidentTitle" :show-overflow-tooltip="true" />
         <el-table-column label="事故时间" align="center" prop="accidentTime" width="170" />
         <el-table-column label="事故地点" align="center" prop="accidentLocation" width="160" :show-overflow-tooltip="true" />
@@ -135,11 +135,11 @@
             <el-tag :type="getStatusTag(scope.row.handleStatus)">{{ scope.row.handleStatus }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column label="操作" fixed="right" align="center" width="200" class-name="small-padding fixed-width">
+        <el-table-column label="操作" fixed="right" align="center" width="240" class-name="small-padding fixed-width">
           <template #default="scope">
-            <el-button link type="primary" icon="View" @click="handleView(scope.row)">详情</el-button>
-            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
-            <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
+            <el-button v-hasPermi="['risk:accident:query']" link type="primary" icon="View" @click="handleView(scope.row)">详情</el-button>
+            <el-button v-hasPermi="['risk:accident:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
+            <el-button v-hasPermi="['risk:accident:remove']" link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>