| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板位置图" prop="fileList"> |
| | | <el-upload |
| | | v-model:file-list="fileList" |
| | | v-model:file-list="bpForm.fileList" |
| | | class="upload-demo" |
| | | action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
| | | multiple |
| | |
| | | } |
| | | export default defineComponent({ |
| | | name: 'blindPanelForm', |
| | | setup() { |
| | | props: { |
| | | bpForm: Object |
| | | }, |
| | | setup(props) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const bpForm = reactive({ |
| | | bpDepartment: '', |
| | | bpApplyName: '', |
| | | bpTubeName: '', |
| | | bpMainMatter: '', |
| | | bpTemperature: '', |
| | | bpPressure: '', |
| | | bpMaterial: '', |
| | | bpFormat: '', |
| | | bpNum: '', |
| | | bpLocation: '', |
| | | fileList: [], |
| | | bpPrincipals: [], |
| | | bpInstallTime: '', |
| | | bpDePrincipals: [], |
| | | bpUninstallTime: '' |
| | | }) |
| | | const bpForm1 = reactive(props.bpForm) |
| | | // const bpForm = reactive({ |
| | | // bpDepartment: '', |
| | | // bpApplyName: '', |
| | | // bpTubeName: '', |
| | | // bpMainMatter: '', |
| | | // bpTemperature: '', |
| | | // bpPressure: '', |
| | | // bpMaterial: '', |
| | | // bpFormat: '', |
| | | // bpNum: '', |
| | | // bpLocation: '', |
| | | // fileList: [], |
| | | // bpPrincipals: [], |
| | | // bpInstallTime: '', |
| | | // bpDePrincipals: [], |
| | | // bpUninstallTime: '' |
| | | // }) |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const bpFormRules = reactive<FormRules>({ |
| | | bpDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpTubeName: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpMainMatter: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpTemperature: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpPressure: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpMaterial: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpFormat: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpNum: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpLocation: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | fileList: [{type: 'array',required: true,message: '此处不可为空',trigger: 'change'}], |
| | | bpPrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger: 'change'}], |
| | | bpInstallTime: [{required: true,message: '此处不可为空',trigger: 'blur'}], |
| | | bpDePrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger: 'change'}], |
| | | bpUninstallTime: [{required: true,message: '此处不可为空',trigger: 'blur'}] |
| | | bpDepartment:[{required: true,message: '此处不可为空'}], |
| | | bpApplyName:[{required: true,message: '此处不可为空'}], |
| | | bpTubeName: [{required: true,message: '此处不可为空'}], |
| | | bpMainMatter: [{required: true,message: '此处不可为空'}], |
| | | bpTemperature: [{required: true,message: '此处不可为空'}], |
| | | bpPressure: [{required: true,message: '此处不可为空'}], |
| | | bpMaterial: [{required: true,message: '此处不可为空'}], |
| | | bpFormat: [{required: true,message: '此处不可为空'}], |
| | | bpNum: [{required: true,message: '此处不可为空'}], |
| | | bpLocation: [{required: true,message: '此处不可为空'}], |
| | | fileList: [{type: 'array',required: true,message: '此处不可为空'}], |
| | | bpPrincipals: [{type: 'array',required: true,message: '此处不可为空'}], |
| | | bpInstallTime: [{required: true,message: '此处不可为空'}], |
| | | bpDePrincipals: [{type: 'array',required: true,message: '此处不可为空'}], |
| | | bpUninstallTime: [{required: true,message: '此处不可为空'}] |
| | | }) |
| | | const fileList = ref<UploadUserFile[]>([ |
| | | { |
| | |
| | | }; |
| | | return { |
| | | renderMenu, |
| | | bpForm, |
| | | bpForm1, |
| | | bpFormRules, |
| | | ruleFormRef, |
| | | fileList, |
| | | Search, |
| | | handleRemove, |
| | | handlePreview, |
| | | handleExceed, |