From 7df64634d3d7b292713eebfa008c40b3f5f9f65f Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: Tue, 20 Sep 2022 15:57:03 +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 a228dc3..38728a1 100644
--- a/src/views/accidentManagementSystem/accidentCases/index.vue
+++ b/src/views/accidentManagementSystem/accidentCases/index.vue
@@ -29,15 +29,15 @@
</div>
</div>
<el-table ref="multipleTableRef" :data="tableData" @selection-change="handleSelectionChange" style="width: 100%">
- <el-table-column label="序号" align="center" type="index" width="70" />
<el-table-column type="selection" align="center" width="55" />
+ <el-table-column label="序号" align="center" type="index" width="70" />
<el-table-column label="标题" align="center" property="caseTitle" sortable />
<el-table-column property="caseTime" align="center" label="发布时间" sortable />
<!-- <el-table-column property="year" label="年度" align="center" sortable show-overflow-tooltip />
<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,15 +64,16 @@
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({
pageSize: 10,
pageIndex: 1,
searchParams: {
- caseTitle: '',
+ caseTitle: '',
},
});
// 下方导航与表格
@@ -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,
--
Gitblit v1.9.2