| | |
| | | <template> |
| | | <el-form ref="ruleFormRef" :model="ruleForm" status-icon label-width="20px" class="topTitle"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input v-model="ruleForm.pass" size="default" placeholder="安全目标指标" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input v-model="ruleForm.checkPass" size="default" placeholder="目标指标编号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-form-item> |
| | | <el-button type="primary" size="default" @click="submitForm(ruleFormRef)">查询</el-button> |
| | | <el-button size="default" @click="resetForm(ruleFormRef)">重置</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { ref, reactive, defineComponent } from 'vue'; |
| | | import { |
| | | FormInstance, |
| | | } from "element-plus"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | // 搜索条件 |
| | | const ruleForm = reactive({ |
| | | pass: '', |
| | | checkPass: '', |
| | | }); |
| | | const resetForm = (formEl: FormInstance | undefined) => { |
| | | console.log(!formEl); |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | }; |
| | | return { |
| | | ruleForm, |
| | | resetForm |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | .topTitle { |
| | | background-color: #fff; |
| | | padding: 20px 0px 20px 0px; |
| | | } |
| | | </style> |