| | |
| | | <template> |
| | | <div class="comp-container"> |
| | | <el-form :model="hwForm" label-width="150px" :rules="hwRules" ref="ruleFormRef"> |
| | | <el-form :model="hwForm" label-width="150px" :rules="hwRules" ref="hwRef"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const hwForm1 = reactive(props.hwForm) |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const hwRef = ref<FormInstance>() |
| | | const hwRules = reactive<FormRules>({ |
| | | hwDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | hwApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | hwLevel: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | hwHeight: [{required: true,message: '此处不可为空',trigger: 'blur'}] |
| | | }) |
| | | const validateForm = async () => { |
| | | let flag = null |
| | | await hwRef.value.validate(valid=>{ |
| | | if(valid){ |
| | | flag = true |
| | | }else{ |
| | | flag = false |
| | | } |
| | | }) |
| | | return flag |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | |
| | | return { |
| | | renderMenu, |
| | | hwForm1, |
| | | ruleFormRef, |
| | | hwRef, |
| | | hwRules, |
| | | validateForm, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |