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