| | |
| | | <template> |
| | | <div class="comp-container"> |
| | | <el-form :model="bpForm" label-width="180px" :rules="bpFormRules" ref="ruleFormRef"> |
| | | <el-form :model="bpForm" label-width="180px" :rules="bpFormRules" ref="bpRef"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item label="申请人" prop="bpApplyName"> |
| | | <el-input |
| | | v-model="bpForm.bpApplyName" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpApplyName" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="设备管道名称" prop="bpTubeName"> |
| | | <el-input |
| | | v-model="bpForm.bpTubeName" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpTubeName" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="主要介质" prop="bpMainMatter"> |
| | | <el-input |
| | | v-model="bpForm.bpMainMatter" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpMainMatter" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item label="温度" prop="bpTemperature"> |
| | | <el-input |
| | | v-model="bpForm.bpTemperature" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpTemperature" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="压力" prop="bpPressure"> |
| | | <el-input |
| | | v-model="bpForm.bpPressure" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpPressure" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板材质" prop="bpMaterial"> |
| | | <el-input |
| | | v-model="bpForm.bpMaterial" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpMaterial" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板规格" prop="bpFormat"> |
| | | <el-input |
| | | v-model="bpForm.bpFormat" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpFormat" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板编号" prop="bpNum"> |
| | | <el-input |
| | | v-model="bpForm.bpNum" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | v-model="bpForm.bpNum" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板位置" prop="bpLocation"> |
| | | <el-input |
| | | v-model="bpForm.bpLocation" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | type="textarea" |
| | | v-model="bpForm.bpLocation" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="盲板位置图" prop="fileList"> |
| | | <el-form-item label="盲板位置图"> |
| | | <el-upload |
| | | v-model:file-list="bpForm.fileList" |
| | | class="upload-demo" |
| | | action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
| | | multiple |
| | | :on-preview="handlePreview" |
| | | :on-remove="handleRemove" |
| | | :before-remove="beforeRemove" |
| | | :limit="3" |
| | | :on-exceed="handleExceed" |
| | | v-model:file-list="bpForm.picList" |
| | | class="upload-demo" |
| | | action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
| | | multiple |
| | | :on-preview="handlePreview" |
| | | :on-remove="handleRemove" |
| | | :before-remove="beforeRemove" |
| | | :limit="3" |
| | | :on-exceed="handleExceed" |
| | | > |
| | | <el-button type="primary">上传附件</el-button> |
| | | <template #tip> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="装盲板时间" prop="bpInstallTime"> |
| | | <el-date-picker |
| | | v-model="bpForm.bpInstallTime" |
| | | type="datetime" |
| | | placeholder="请选择" |
| | | v-model="bpForm.bpInstallTime" |
| | | type="datetime" |
| | | placeholder="请选择" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | export default defineComponent({ |
| | | name: 'blindPanelForm', |
| | | props: { |
| | | bpForm: Object |
| | | bpForm: Object, |
| | | }, |
| | | setup(props) { |
| | | const userInfo = useUserInfo() |
| | |
| | | // bpDePrincipals: [], |
| | | // bpUninstallTime: '' |
| | | // }) |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const bpRef = ref<FormInstance>() |
| | | const bpFormRules = reactive<FormRules>({ |
| | | bpDepartment:[{required: true,message: '此处不可为空'}], |
| | | bpApplyName:[{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: '此处不可为空'}], |
| | | bpPrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger:'blur'}], |
| | | bpInstallTime: [{required: true,message: '此处不可为空'}], |
| | | bpDePrincipals: [{type: 'array',required: true,message: '此处不可为空'}], |
| | | bpDePrincipals: [{type: 'array',required: true,message: '此处不可为空',trigger:'blur'}], |
| | | bpUninstallTime: [{required: true,message: '此处不可为空'}] |
| | | }) |
| | | const fileList = ref<UploadUserFile[]>([ |
| | |
| | | () => false |
| | | ) |
| | | } |
| | | |
| | | const validateForm = async () => { |
| | | let flag = null |
| | | await bpRef.value.validate(valid=>{ |
| | | if(valid){ |
| | | flag = true |
| | | }else{ |
| | | flag = false |
| | | } |
| | | }) |
| | | return flag |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | |
| | | renderMenu, |
| | | bpForm1, |
| | | bpFormRules, |
| | | ruleFormRef, |
| | | bpRef, |
| | | fileList, |
| | | Search, |
| | | validateForm, |
| | | handleRemove, |
| | | handlePreview, |
| | | handleExceed, |