From b59d7d4f48f84dc856d46f6ee6c8e9300376d272 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期四, 08 九月 2022 09:33:43 +0800
Subject: [PATCH] 合并
---
src/views/doublePrevent/riskLevel/unit/index.vue | 63 ++++++++++++++-----------------
1 files changed, 28 insertions(+), 35 deletions(-)
diff --git a/src/views/doublePrevent/riskLevel/unit/index.vue b/src/views/doublePrevent/riskLevel/unit/index.vue
index d2dde4b..ec369c6 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>
@@ -84,9 +62,10 @@
import { ElMessageBox, ElMessage } from 'element-plus';
import safetyRiskAnalyseUnitDialog from './components/safetyRiskAnalyseUnitDialog.vue';
import { safetyRiskAnalyseUnitApi } from '/@/api/doublePreventSystem/safetyRiskAnalyseUnit/index.ts';
-import { departmentApi } from '/@/api/department';
-import { userApi } from '/@/api/user';
+import { departmentApi } from '/@/api/systemManage/department';
+import { userApi } from '/@/api/systemManage/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,
@@ -269,4 +251,15 @@
};
</script>
-<style scoped></style>
+<style scoped>
+:deep(.el-textarea.is-disabled .el-textarea__inner) {
+ background-color: var(--el-card-bg-color);
+ color: var(--el-input-text-color, var(--el-text-color-regular));
+}
+:deep(.el-input.is-disabled .el-input__inner) {
+ color: var(--el-input-text-color, var(--el-text-color-regular));
+}
+:deep(.el-input.is-disabled .el-input__wrapper) {
+ background-color: var(--el-card-bg-color);
+}
+</style>
--
Gitblit v1.9.2