From cd92b35c810d6a762e9c30b896c38928e2d2d87a Mon Sep 17 00:00:00 2001 From: zhaojiale <631455805@qq.com> Date: 星期一, 15 八月 2022 14:41:19 +0800 Subject: [PATCH] 事故快报与应急队伍修改 --- src/views/goalManagement/TargetBook/component/DailogSearch.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/views/goalManagement/TargetBook/component/DailogSearch.vue b/src/views/goalManagement/TargetBook/component/DailogSearch.vue index 6404fd8..4e7e97a 100644 --- a/src/views/goalManagement/TargetBook/component/DailogSearch.vue +++ b/src/views/goalManagement/TargetBook/component/DailogSearch.vue @@ -6,7 +6,7 @@ <el-form ref="ruleFormRef" :model="ruleForm" status-icon> <el-row> <el-col :span="12"> - <el-form-item> + <el-form-item size="default"> <el-input v-model="ruleForm.pass" placeholder="岗位名称" /> </el-form-item> </el-col> @@ -17,15 +17,21 @@ </el-col> --> <el-col :span="11" :offset="1"> <el-form-item> - <el-button type="primary" @click="submitForm(ruleFormRef)">查询</el-button> - <el-button @click="resetForm(ruleFormRef)">重置</el-button> + <el-button size="default" type="primary" @click="submitForm(ruleFormRef)">查询</el-button> + <el-button size="default" @click="resetForm(ruleFormRef)">重置</el-button> </el-form-item> </el-col> </el-row> </el-form> <el-button size="default" :icon="Delete">清除选择</el-button> - <el-table :data="tableData" style="width: 100%; margin-top: 20px"> - <el-table-column align="center" type="selection" /> + <el-table :data="tableData" style="width: 100%; margin-top: 20px" > + <el-table-column align="center" width="70px"> + <template #default="scope"> + <el-radio-group v-model="radio1"> + <el-radio :label="scope.row.id" @click="radio(scope.row)" size="large">{{ null }}</el-radio> + </el-radio-group> + </template> + </el-table-column> <el-table-column align="center" prop="date" label="岗位名称" /> </el-table> <el-pagination @@ -43,6 +49,7 @@ /> </el-col> <el-col :span="7"> + <div v-if="dynamicTags[0]==''?false:true"> <el-tag v-for="tag in dynamicTags" :key="tag" @@ -52,14 +59,15 @@ :disable-transitions="false" @close="handleClose(tag)" > - {{ tag }} + {{ tag.date }} </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> @@ -68,7 +76,7 @@ import { defineComponent, reactive, ref } from 'vue'; import { Delete, FullScreen } from '@element-plus/icons-vue'; export default defineComponent({ - setup() { + setup(props,{emit}) { const dialogVisible = ref<boolean>(false); const openDailog = () => { dialogVisible.value = true; @@ -80,23 +88,25 @@ }); // 表格 const tableData = [ - { - date: '2016-05-03', + { id:1, + date: '岗位1', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', }, { - date: '2016-05-02', + id:2, + date: '岗位2', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', }, - { - date: '2016-05-04', + { + id:3, + date: '岗位3', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', }, - { - date: '2016-05-01', + { id:4, + date: '岗位4', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', }, @@ -109,10 +119,24 @@ console.log(`current page: ${val}`); }; // 右方点击添加后显示标签 - const dynamicTags = ref(['Tag 1', 'Tag 2', 'Tag 3']); + 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; + }; + const clear=()=>{ + dynamicTags.value=[''] + radio1.value="" + } + const submitForm=()=>{ + let obj=JSON.parse(JSON.stringify(dynamicTags.value)) + emit("backNum",obj[0]) + dialogVisible.value = false + } //全屏 const full = ref(false); const toggleFullscreen = () => { @@ -123,6 +147,9 @@ } }; return { + radio1, + radio, + clear, dialogVisible, openDailog, ruleForm, @@ -132,6 +159,7 @@ handleCurrentChange, dynamicTags, handleClose, + submitForm, Delete, full, toggleFullscreen, -- Gitblit v1.9.2