From 1621b3719092d93e6c29f7a27e401529e0454420 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期一, 01 八月 2022 18:57:45 +0800
Subject: [PATCH] 双重预防

---
 src/views/doublePrevent/riskLevel/unit/index.vue |   46 ++++++++++++++--------------------------------
 1 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/src/views/doublePrevent/riskLevel/unit/index.vue b/src/views/doublePrevent/riskLevel/unit/index.vue
index d2dde4b..4c2b168 100644
--- a/src/views/doublePrevent/riskLevel/unit/index.vue
+++ b/src/views/doublePrevent/riskLevel/unit/index.vue
@@ -4,17 +4,7 @@
             <div class="system-user-search mb15">
                 <div class="basic-line">
                     <span>责任部门:</span>
-                    <el-cascader
-                        @change="achieveUserList"
-                        :options="departmentList"
-                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
-                        placeholder="责任部门"
-                        clearable
-                        filterable
-                        class="input-box"
-                        v-model="safetyRiskAnalyseUnitData.params.liableDepId"
-                    >
-                    </el-cascader>
+                    <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="责任部门" clearable filterable class="input-box" v-model="safetyRiskAnalyseUnitData.params.liableDepId"> </el-cascader>
                 </div>
                 <div class="basic-line">
                     <span>责任人:</span>
@@ -24,8 +14,7 @@
                 </div>
                 <div class="basic-line">
                     <span>单元名称:</span>
-                    <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称">
-                    </el-input>
+                    <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称"> </el-input>
                 </div>
                 <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
                     <el-icon>
@@ -51,27 +40,16 @@
                 <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                 <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                 <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
-                <el-table-column label="操作" width="150">
+                <el-table-column label="操作" width="200" align="center">
                     <template #default="scope">
-                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
-                        <el-button size="small" text type="danger" @click="onDelProductionDevice(scope.row)">删除</el-button>
+                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
+                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
+                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelRiskUnit(scope.row)">删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
             <br />
-            <el-pagination
-                @size-change="onHandleSizeChange"
-                @current-change="onHandleCurrentChange"
-                class="page-position"
-                :pager-count="5"
-                :page-sizes="[10, 20, 30]"
-                v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex"
-                background
-                v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="safetyRiskAnalyseUnitData.total"
-            >
-            </el-pagination>
+            <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex" background v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskAnalyseUnitData.total"> </el-pagination>
             <br />
             <br />
         </el-card>
@@ -87,6 +65,7 @@
 import { departmentApi } from '/@/api/department';
 import { userApi } from '/@/api/user';
 import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice';
+import { Edit, Delete, View } from '@element-plus/icons-vue';
 
 // 定义接口来定义对象的类型
 interface TableData {
@@ -120,7 +99,7 @@
 
 export default {
     name: 'productionDevice',
-    components: { safetyRiskAnalyseUnitDialog },
+    components: { safetyRiskAnalyseUnitDialog, Edit, Delete, View },
     setup() {
         const safetyRiskAnalyseUnitDialogRef = ref();
         const state = reactive<TableDataState>({
@@ -205,7 +184,7 @@
         };
 
         // 删除角色
-        const onDelProductionDevice = (row: any) => {
+        const onDelRiskUnit = (row: any) => {
             ElMessageBox.confirm(`此操作将永久删除该条安全风险分析单元:“${row.riskUnitName}”,是否继续?`, '提示', {
                 confirmButtonText: '确认',
                 cancelButtonText: '取消',
@@ -254,11 +233,14 @@
         });
 
         return {
+            Edit,
+            Delete,
+            View,
             handleSearch,
             achieveUserList,
             onOpenDialogRef,
             onHandleSizeChange,
-            onDelProductionDevice,
+            onDelRiskUnit,
             onHandleCurrentChange,
             safetyRiskAnalyseUnitDialog,
             safetyRiskAnalyseUnitDialogRef,

--
Gitblit v1.9.2