| | |
| | | <template> |
| | | <div class="comp-container"> |
| | | <el-form :model="clForm" label-width="180px" :rules="clFormRules" ref="ruleFormRef"> |
| | | <el-form :model="clForm" label-width="180px" :rules="clFormRules" ref="clRef"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | |
| | | } |
| | | export default defineComponent({ |
| | | name: 'cutLineForm', |
| | | setup() { |
| | | props: { |
| | | clForm: Object |
| | | }, |
| | | setup(props) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const clForm = reactive({ |
| | | clDepartment: '', |
| | | clApplyName: '', |
| | | clReason: '', |
| | | clUnits: [], |
| | | fileList: [] |
| | | }) |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const clForm1 = reactive(props.clForm) |
| | | const clRef = ref<FormInstance>() |
| | | const clFormRules = reactive<FormRules>({ |
| | | clDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | clApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | |
| | | () => false |
| | | ) |
| | | } |
| | | const validateForm = async () => { |
| | | let flag = null |
| | | await clRef.value.validate(valid=>{ |
| | | if(valid){ |
| | | flag = true |
| | | }else{ |
| | | flag = false |
| | | } |
| | | }) |
| | | return flag |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | |
| | | }; |
| | | return { |
| | | renderMenu, |
| | | clForm, |
| | | clForm1, |
| | | Search, |
| | | clFormRules, |
| | | ruleFormRef, |
| | | clRef, |
| | | fileList, |
| | | validateForm, |
| | | handleRemove, |
| | | handlePreview, |
| | | handleExceed, |