| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" title="选择检查模板" width="900px" draggable :fullscreen="full"> |
| | | <el-dialog v-model="dialogVisible" title="选择应急队伍" width="900px" draggable :fullscreen="full"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-row> |
| | | <el-col :span="18"> |
| | |
| | | <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-form-item> |
| | | <el-form-item> |
| | | <el-input size="default" v-model="listQuery.searchParams.teamName" placeholder="队伍名称" style="max-width: 215px;padding: 0 12px;"/> |
| | | <el-input size="default" v-model="listQuery.searchParams.teamName" placeholder="队伍名称" style="max-width: 215px; padding: 0 12px" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="default" type="primary" @click="onSubmit">查询</el-button> |
| | |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-button size="default" :icon="Delete" style="margin-top: 15px;" @click="submitReset">清除选择</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" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table :data="tableData" ref="multipleTableRef" style="width: 100%; margin-top: 20px" @selection-change="handleSelectionChange"> |
| | | <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-dialog> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { |
| | | defineComponent, |
| | | reactive, |
| | | ref, |
| | | onMounted, |
| | | } from 'vue'; |
| | | import { |
| | | Delete, |
| | | FullScreen |
| | | } from '@element-plus/icons-vue'; |
| | | import { |
| | | ElMessage, |
| | | } from 'element-plus'; |
| | | import {contingencyApi} from "/@/api/contingencyManagement/contingency"; |
| | | import { defineComponent, reactive, ref, onMounted } from 'vue'; |
| | | import { Delete, FullScreen } from '@element-plus/icons-vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { contingencyApi } from '/@/api/contingencyManagement/contingency'; |
| | | |
| | | export default defineComponent({ |
| | | setup(props, { emit }) { |
| | | const types=ref() |
| | | const types = ref(); |
| | | const dialogVisible = ref<boolean>(false); |
| | | const openDailog = (type:any) => { |
| | | types.value=type |
| | | types.value = type; |
| | | dialogVisible.value = true; |
| | | // onSubmit(); |
| | | }; |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | searchParams: { |
| | | teamName: "", |
| | | id: "", |
| | | } |
| | | teamName: '', |
| | | }, |
| | | }); |
| | | // 列表数据请求 |
| | | const onSubmit = async () => { |
| | | let res = await contingencyApi().getTeamManagementList(listQuery) |
| | | let res = await contingencyApi().getTeamManagementList(listQuery); |
| | | if(res.data.code === '200'){ |
| | | tableData.value = res.data.data; |
| | | pageIndex.value = res.data.pageIndex; |
| | |
| | | ElMessage({ |
| | | showClose: true, |
| | | type:'error', |
| | | message:res.data.msg |
| | | }) |
| | | message: res.data.msg, |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | const submitForm = () => { |
| | | if(types.value==0){ |
| | | emit('SearchUser',dynamicTags.value,types.value); |
| | | } |
| | | else { |
| | | } else { |
| | | emit('SearchUser',dynamicTags.value[0],types.value); |
| | | } |
| | | dialogVisible.value = false; |
| | | }; |
| | | const handleSelectionChange = (val:any) => { |
| | | dynamicTags.value=val |
| | | } |
| | | dynamicTags.value = val; |
| | | }; |
| | | // 重置 |
| | | const submitReset = () => { |
| | | listQuery.searchParams.teamName = ''; |
| | | listQuery.searchParams.id = ''; |
| | | radio1.value="" |
| | | dynamicTags.value[0]="" |
| | | radio1.value = ''; |
| | | dynamicTags.value[0] = ''; |
| | | onSubmit(); |
| | | }; |
| | | // 表格 |
| | |
| | | const handleCurrentChange = (val: number) => { |
| | | listQuery.pageIndex = val; |
| | | onSubmit(); |
| | | } |
| | | }; |
| | | // 右方点击添加后显示标签 |
| | | const dynamicTags = ref(['']); |
| | | const handleClose = (tag: string) => { |
| | |
| | | }; |
| | | const radio1 = ref(''); |
| | | const radio = (event: any) => { |
| | | console.log(event) |
| | | console.log(event); |
| | | dynamicTags.value[0] = event; |
| | | }; |
| | | onMounted(() => { |