From 16cda76553fec9722447ea4282feb6cc5df3ede6 Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: Mon, 08 Aug 2022 11:37:09 +0800
Subject: [PATCH] 应急预案管理数据对接
---
src/components/checkTemplate/index.vue | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/components/checkTemplate/index.vue b/src/components/checkTemplate/index.vue
index 15734ac..2fe655e 100644
--- a/src/components/checkTemplate/index.vue
+++ b/src/components/checkTemplate/index.vue
@@ -26,10 +26,10 @@
:data="tableData"
ref="multipleTableRef"
style="width: 100%;margin-top:20px"
- @cell-click="radio"
+ @selection-change="handleSelectionChange"
>
- <el-table-column width="55">
- <template #default="scope">
+ <el-table-column type="selection" width="55" v-if="types==0">
+ <template #default="scope" v-if="types!=0">
<el-radio-group v-model="radio1">
<el-radio :label="scope.row.id" @click="radio(scope.row)" size="large">{{ null }}</el-radio>
</el-radio-group>
@@ -92,10 +92,12 @@
export default defineComponent({
setup(props, { emit }) {
+ const types=ref()
const dialogVisible = ref<boolean>(false);
- const openDailog = () => {
+ const openDailog = (type:any) => {
+ types.value=type
dialogVisible.value = true;
- onSubmit();
+ // onSubmit();
};
// 搜索条件
const listQuery = reactive({
@@ -123,10 +125,17 @@
}
}
const submitForm = () => {
- let obj = JSON.parse(JSON.stringify(dynamicTags.value));
- emit('SearchUser', obj[0]);
+ if(types.value==0){
+ emit('SearchUser',dynamicTags.value,types.value);
+ }
+ else {
+ emit('SearchUser',dynamicTags.value[0],types.value);
+ }
dialogVisible.value = false;
};
+ const handleSelectionChange = (val:any) => {
+ dynamicTags.value=val
+ }
// 重置
const submitReset = () => {
listQuery.searchParams.teamName = '';
@@ -157,6 +166,7 @@
};
const radio1 = ref('');
const radio = (event: any) => {
+ console.log(event)
dynamicTags.value[0] = event;
};
onMounted(() => {
@@ -192,7 +202,8 @@
radio,
radio1,
submitForm,
-
+ types,
+ handleSelectionChange,
};
},
});
--
Gitblit v1.9.2