From d9390dc918302864ab2011575cf701bb328cb023 Mon Sep 17 00:00:00 2001 From: 13937891274 <kxc0822> Date: 星期一, 04 七月 2022 11:10:04 +0800 Subject: [PATCH] 应急队伍管理弹窗 --- src/views/contingencyManagement/contingency/component/openEdit.vue | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views/contingencyManagement/contingency/component/openEdit.vue b/src/views/contingencyManagement/contingency/component/openEdit.vue index 602a172..2ceb729 100644 --- a/src/views/contingencyManagement/contingency/component/openEdit.vue +++ b/src/views/contingencyManagement/contingency/component/openEdit.vue @@ -97,7 +97,7 @@ <template #default="scope"> <el-button size="small" type="primary" text="plain" >查看 </el-button> - <el-button size="small" type="primary" text="plain" @click="onEditEmergencyPersonnel" style="margin-right: 5px;">编辑 + <el-button size="small" type="primary" text="plain" @click="onEditEmergencyPersonnel(scope.row)" style="margin-right: 5px;">编辑 </el-button> <el-button size="small" type="primary" text="plain" style="margin-right: 5px;">删除 </el-button> @@ -135,6 +135,7 @@ TabsPaneContext, FormInstance, FormRules, + ElTable, } from 'element-plus' import { Search @@ -149,6 +150,15 @@ position: string; } // 定义接口来定义对象的类型 +interface TableDataRow { + // userName: string; + // userNickname: string; + // roleSign: string; + // department: string[]; + // phone: string; + // email: string; +} +// 定义接口来定义对象的类型 interface DeptData { deptName: string; createTime: string; @@ -158,6 +168,7 @@ id: number; children?: DeptData[]; } +// 定义接口来定义对象的类型 interface RuleFormRow { // teamName: string; // teamLevel: string; @@ -307,6 +318,7 @@ }; //定义表格数据 + const multipleTableRef = ref<InstanceType<typeof ElTable>>() const multipleSelection = ref<User[]>([]) const tableData: User[] = [ { @@ -399,8 +411,8 @@ } //表格编辑弹窗 const editRef = ref(); - const onEditEmergencyPersonnel = () => { - editRef.value.openDialog(); + const onEditEmergencyPersonnel = (row: TableDataRow) => { + editRef.value.openDialog(row); }; return { openDialog, @@ -422,6 +434,7 @@ rules, ruleFormRef, tableData, + multipleTableRef, ...toRefs(state), }; }, -- Gitblit v1.9.2