From 2cf2beb6505c866607fd6e88483a37c9ed368051 Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: Sat, 06 Aug 2022 18:02:05 +0800
Subject: [PATCH] 应急预案管理数据对接
---
src/components/checkTemplate/index.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/src/components/checkTemplate/index.vue b/src/components/checkTemplate/index.vue
index 695cb6d..50a3420 100644
--- a/src/components/checkTemplate/index.vue
+++ b/src/components/checkTemplate/index.vue
@@ -7,7 +7,7 @@
<el-col :span="24">
<el-form ref="ruleFormRef" :inline="true" status-icon>
<el-form-item>
- <el-input size="default" v-model="listQuery.searchParams.id" placeholder="id" style="max-width: 215px;"/>
+ <el-input size="default" v-model="listQuery.searchParams.authorUid" placeholder="id" style="max-width: 215px;"/>
</el-form-item>
<el-form-item>
<el-input size="default" v-model="listQuery.searchParams.teamName" placeholder="队伍名称" style="max-width: 215px;padding: 0 12px;"/>
@@ -19,15 +19,22 @@
</el-form>
</el-col>
<el-col :span="24">
- <el-button size="default" :icon="Delete" style="margin-top: 15px;">清除选择</el-button>
+ <el-button size="default" :icon="Delete" style="margin-top: 15px;" @click="submitReset">清除选择</el-button>
</el-col>
</el-row>
<el-table
:data="tableData"
ref="multipleTableRef"
style="width: 100%;margin-top:20px"
+ @cell-click="radio"
>
- <el-table-column type="selection" width="55" />
+ <el-table-column width="55">
+ <template #default="scope">
+ <el-radio-group v-model="radio1">
+ <el-radio :label="scope.row" size="large">{{ null }}</el-radio>
+ </el-radio-group>
+ </template>
+ </el-table-column>
<el-table-column align="center" prop="date" label="id" />
<el-table-column align="center" prop="name" label="队伍名称"/>
</el-table>
@@ -44,15 +51,25 @@
</div>
</el-col>
<el-col :span="6" style="padding-left: 15px">
- <el-tag v-for="tag in dynamicTags" :key="tag" class="mx-1" style="margin:5px" closable :disable-transitions="false" @close="handleClose(tag)">
- {{ tag }}
- </el-tag>
+ <div v-if="dynamicTags[0] == '' ? false : true">
+ <el-tag
+ v-for="tag in dynamicTags"
+ :key="tag"
+ class="mx-1"
+ style="margin: 5px"
+ closable
+ :disable-transitions="false"
+ @close="handleClose(tag)"
+ >
+ {{ tag.name }}
+ </el-tag>
+ </div>
</el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false" size="default">关闭</el-button>
- <el-button type="primary" @click="dialogVisible = false" size="default">确定</el-button>
+ <el-button type="primary" @click="submitForm" size="default">确定</el-button>
</span>
</template>
</el-dialog>
@@ -62,6 +79,7 @@
defineComponent,
reactive,
ref,
+ onMounted,
} from 'vue';
import {
Delete,
@@ -73,10 +91,11 @@
import {contingencyApi} from "/@/api/contingency";
export default defineComponent({
- setup() {
+ setup(props, { emit }) {
const dialogVisible = ref<boolean>(false);
const openDailog = () => {
dialogVisible.value = true;
+ onSubmit();
};
// 搜索条件
const listQuery = reactive({
@@ -103,10 +122,17 @@
})
}
}
+ const submitForm = () => {
+ let obj = JSON.parse(JSON.stringify(dynamicTags.value));
+ emit('SearchUser', obj[0]);
+ dialogVisible.value = false;
+ };
// 重置
const submitReset = () => {
listQuery.searchParams.teamName = '';
listQuery.searchParams.teamType = '';
+ radio1.value=""
+ dynamicTags.value[0]=""
onSubmit();
};
// 表格
@@ -124,10 +150,18 @@
onSubmit();
}
// 右方点击添加后显示标签
- const dynamicTags = ref(['应急救援组', '工艺抢险组', '后勤保障组']);
+ const dynamicTags = ref(['']);
const handleClose = (tag: string) => {
dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1);
+ radio1.value = '';
};
+ const radio1 = ref('');
+ const radio = (event: any) => {
+ dynamicTags.value[0] = event;
+ };
+ onMounted(() => {
+ onSubmit();
+ });
//全屏
const full = ref(false);
const toggleFullscreen = () => {
@@ -154,7 +188,11 @@
onSubmit,
listQuery,
submitReset,
- total
+ total,
+ radio,
+ radio1,
+ submitForm,
+
};
},
});
--
Gitblit v1.9.2