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