| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="模板名称:" prop="templateName"> |
| | | <el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="模板名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="行业类别:" prop="industryTypeId"> |
| | | <el-select v-model="state.form.industryTypeId" filterable placeholder="请选择" clearable> |
| | | <el-option |
| | | v-for="item in state.typeList" |
| | | :key="item.id" |
| | | style="width: 100%" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="模板文件:" prop="filePath"> |
| | | <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" > |
| | |
| | | filePath: '', |
| | | format: '', |
| | | companyId: null, |
| | | industryTypeId: null, |
| | | industryTypeName: '', |
| | | deptId:null, |
| | | templateType: 10 |
| | | }, |
| | |
| | | templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }], |
| | | filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }], |
| | | deptId: [{ required: true, message: '请选择部门', trigger: 'blur' }], |
| | | industryTypeId: [{ required: true, message: '请选择行业类别', trigger: 'blur' }] |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | |
| | | const onSubmit = async () => { |
| | | const valid = await superRef.value.validate(); |
| | | if(valid){ |
| | | state.form.industryTypeName = state.typeList.find(i=>i.id == state.form.industryTypeId)?.name || '' |
| | | if(state.title == '新增'){ |
| | | const {id,...data} = state.form |
| | | const res = await saveStandardTemp(data) |
| | |
| | | filePath: '', |
| | | format: '', |
| | | companyId: null, |
| | | industryTypeId: null, |
| | | industryTypeName: '', |
| | | deptId:null, |
| | | templateType: 10 |
| | | } |