| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" title="选择安全目标指标" width="50%" draggable> |
| | | <el-dialog v-model="dialogVisible" :fullscreen="full" title="选择安全目标指标" width="50%" draggable> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form ref="ruleFormRef" :model="ruleForm" status-icon> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item> |
| | | <el-input v-model="ruleForm.pass" placeholder="安全目标指标" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" :offset="1"> |
| | | <el-form-item> |
| | | <el-input v-model="ruleForm.checkPass" placeholder="目标指标编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" :offset="1"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm(ruleFormRef)">查询</el-button> |
| | | <el-button @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" prop="date" label="安全目标指标" width="180" /> |
| | | <el-table-column align="center" prop="name" label="目标指标编号" width="180" /> |
| | | <el-table-column align="center" prop="address" label="年度" /> |
| | | <el-table-column align="center" prop="address" label="指标值" /> |
| | | </el-table> |
| | | <el-pagination |
| | | style="padding:20px 0;border-bottom:1px solid #dedede" |
| | | v-model:currentPage="currentPage4" |
| | | v-model:page-size="pageSize4" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :small="small" |
| | | :disabled="disabled" |
| | | :background="background" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="400" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="4"></el-col> |
| | | <el-col :span="17"> |
| | | <el-form ref="ruleFormRef" :model="ruleForm" status-icon> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item size="default"> |
| | | <el-input v-model="ruleForm.pass" placeholder="安全目标指标" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" :offset="1"> |
| | | <el-form-item size="default"> |
| | | <el-input v-model="ruleForm.checkPass" placeholder="目标指标编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" :offset="1"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm(ruleFormRef)">查询</el-button> |
| | | <el-button @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"> |
| | | <template #default="scope"> |
| | | <el-radio-group v-model="radio1" @change="radio"> |
| | | <el-radio :label="scope.row.date" size="large">{{null}}</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="date" label="安全目标指标" width="180" /> |
| | | <el-table-column align="center" prop="name" label="目标指标编号" width="180" /> |
| | | <el-table-column align="center" prop="address" label="年度" /> |
| | | <el-table-column align="center" prop="address" label="指标值" /> |
| | | </el-table> |
| | | <el-pagination |
| | | style="padding: 20px 0; border-bottom: 1px solid #dedede" |
| | | v-model:currentPage="currentPage4" |
| | | v-model:page-size="pageSize4" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :small="small" |
| | | :disabled="disabled" |
| | | :background="background" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="400" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <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> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent, reactive, ref } from 'vue'; |
| | | import { Delete } from '@element-plus/icons-vue'; |
| | | import { Delete,FullScreen } from '@element-plus/icons-vue'; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const dialogVisible = ref<boolean>(false); |
| | |
| | | const handleCurrentChange = (val: number) => { |
| | | console.log(`current page: ${val}`); |
| | | }; |
| | | // 右方点击添加后显示标签 |
| | | const dynamicTags = ref(['2016-05-03']); |
| | | const handleClose = (tag: string) => { |
| | | dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1); |
| | | radio1.value="" |
| | | }; |
| | | const radio1=ref('2016-05-03') |
| | | const radio=(event:any)=>{ |
| | | dynamicTags.value[0]=event |
| | | } |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | | if (full.value == false) { |
| | | full.value = true; |
| | | }else{ |
| | | full.value = false; |
| | | } |
| | | }; |
| | | return { |
| | | dialogVisible, |
| | | openDailog, |
| | |
| | | pageSize4, |
| | | handleSizeChange, |
| | | handleCurrentChange, |
| | | dynamicTags, |
| | | handleClose, |
| | | radio1, |
| | | radio, |
| | | full, |
| | | toggleFullscreen, |
| | | Delete, |
| | | FullScreen |
| | | }; |
| | | }, |
| | | }); |