From 2bff5e788d4f7e505961270f0624aa3e78280e25 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期四, 13 十月 2022 14:31:29 +0800
Subject: [PATCH] 目录
---
src/views/accidentManagementSystem/accidentCases/index.vue | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/views/accidentManagementSystem/accidentCases/index.vue b/src/views/accidentManagementSystem/accidentCases/index.vue
index 9ffc3fc..38728a1 100644
--- a/src/views/accidentManagementSystem/accidentCases/index.vue
+++ b/src/views/accidentManagementSystem/accidentCases/index.vue
@@ -23,7 +23,7 @@
<div class="minCenter">
<div class="btns">
<div>
- <el-button size="default" type="primary" :icon="Plus" @click="openD('新增')">新增</el-button>
+ <el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button>
<!-- <el-button size="default" type="warning" :disabled="warning" :icon="EditPen" plain @click="openD('修改', deletAll[0])">修改</el-button> -->
<el-button size="default" type="danger" :disabled="danger" :icon="Delete" plain @click="onDeleteAll">删除</el-button>
</div>
@@ -37,7 +37,7 @@
<el-table-column property="value" label="指标值" align="center" sortable show-overflow-tooltip /> -->
<el-table-column label="操作" align="center" sortable show-overflow-tooltip>
<template #default="scope">
- <!-- <el-button link type="primary" size="small" :icon="View" @click="openD('查看', scope.row.id)">查看</el-button> -->
+ <el-button link type="primary" size="small" :icon="View" @click="jump(scope.row.id)">查看</el-button>
<el-button link type="primary" size="small" :icon="EditPen" @click="openD('修改', scope.row.id)">编辑</el-button>
<el-button link type="primary" size="small" :icon="Delete" @click="onDelete(scope.row.id)">删除</el-button>
</template>
@@ -64,8 +64,9 @@
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
import { Plus, Delete, Upload, Download, Refresh, View, EditPen } from '@element-plus/icons-vue';
import { accidentManagementSystemApi } from '/@/api/accidentManagementSystem';
+import { useRouter } from 'vue-router';
export default defineComponent({
- components: { ElButton, ElInput,DailogCases },
+ components: { ElButton, ElInput, DailogCases },
setup() {
// 搜索条件
const ruleForm = reactive({
@@ -116,7 +117,7 @@
// 打开弹窗
const Show = ref();
const openD = (title: String, id: number) => {
- Show.value.openDailog(title,id);
+ Show.value.openDailog(title, id);
};
// 删除
const onDelete = (id: number) => {
@@ -128,7 +129,7 @@
type: 'warning',
})
.then(() => {
- console.log(arr)
+ console.log(arr);
accidentManagementSystemApi()
.getaccidentCaseDelete(arr)
.then((res) => {
@@ -203,7 +204,19 @@
const add = () => {
listApi();
};
+ let router = useRouter();
+ let jump = (id:any) => {
+ router.push({
+ path: '/accidentCasesCop' ,
+ query:{
+ id:id,
+ }
+ });
+ };
+
return {
+ jump,
+ router,
listApi,
add,
resetForm,
@@ -258,4 +271,4 @@
.tableC {
margin: 0 10%;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.2