| | |
| | | <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="classify"> |
| | | <el-select v-model="state.form.classify" placeholder="请选择" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in state.classifyList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="模板文件:" prop="filePath"> |
| | | <el-upload accept=".doc,.docx,.pdf" :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)" > |
| | | <el-button type="primary">点击上传</el-button> |
| | |
| | | filePath: '', |
| | | format: '', |
| | | companyId: null, |
| | | templateType: 1 |
| | | templateType: 1, |
| | | classify: '' |
| | | }, |
| | | formRules:{ |
| | | companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], |
| | | templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }], |
| | | filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }] |
| | | filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }], |
| | | classify: [{ required: true, message: '请选择分类', trigger: 'blur' }], |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | |
| | | Authorization: getToken() |
| | | }, |
| | | fileLimit: 1, |
| | | fileList: [] |
| | | fileList: [], |
| | | classifyList: [ |
| | | { |
| | | id: 1, |
| | | name: '体系标准' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '安全标准' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '其他' |
| | | }, |
| | | ] |
| | | }) |
| | | onMounted(() => { |
| | | |
| | |
| | | state.form[key] = value[key] |
| | | } |
| | | }) |
| | | state.form.classify = !state.form.classify ? null: state.form.classify |
| | | if(value.filePath) { |
| | | const obj = { |
| | | url: value.filePath, |
| | |
| | | filePath: '', |
| | | format: '', |
| | | companyId: null, |
| | | templateType: 1 |
| | | templateType: 1, |
| | | classify: '' |
| | | } |
| | | state.fileList = [] |
| | | superRef.value.clearValidate(); |
| | |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80"/> |
| | | <el-table-column label="模板名称" prop="templateName" align="center"/> |
| | | <el-table-column label="分类" prop="classify" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.classify == 1 ? '体系标准' :scope.row.classify == 2 ?'安全标准': scope.row.classify == 3 ? '其他' : ''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="模板文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | |
| | | placeholder="请输入其他资质情况" |
| | | size="small" |
| | | /> |
| | | <el-date-picker |
| | | :disabled="title === '查看'" |
| | | type="date" |
| | | v-if="item.id == 8 && state.checkQualificationList.includes(8)" |
| | | v-model="state.form.otherDate" |
| | | style="margin-left: 5px;width: 140px" |
| | | placeholder="请选择日期" |
| | | size="small" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | </el-checkbox> |
| | | </div> |
| | | </el-checkbox-group> |
| | |
| | | chargeTime: '', |
| | | companyMess: '', |
| | | otherQualifi: '', |
| | | otherDate: '', |
| | | otherProduct: '' |
| | | }, |
| | | formRules:{ |
| | |
| | | case 'craft': state.form.craft = state.checkCraftList.join(','); break; |
| | | case 'develop': state.form.develop = state.checkDevelopList.join(','); break; |
| | | case 'teamWork': state.form.teamWork = state.checkTeamWorkList.join(','); break; |
| | | case 'qualification': state.form.qualification = state.checkQualificationList.join(','); if(!state.checkQualificationList.includes(8))state.form.otherQualifi = '' ;break; |
| | | case 'qualification': state.form.qualification = state.checkQualificationList.join(','); if(!state.checkQualificationList.includes(8)){state.form.otherQualifi = '' ;state.form.otherDate = '';break;} |
| | | case 'product': state.form.product = state.checkProductList.join(',');if(!state.checkProductList.includes(5))state.form.otherProduct = ''; break; |
| | | } |
| | | |
| | |
| | | if(state.otherQualifi){ |
| | | data.qualificationList.forEach((item) => { |
| | | if(item.id == 8){ |
| | | item.name = item.name+ state.otherQualifi |
| | | item.name = item.name+ state.otherQualifi + ' ' + state.otherDate |
| | | } |
| | | }) |
| | | } |