| | |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="state.noticeForm" size="default" ref="noticeRef" :rules="title === '新增' || title === '编辑' ? state.formRules : {}" label-width="110px" > |
| | | <el-form-item v-if="state.isAdmin" label="企业:" prop="companyId"> |
| | | <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId"> |
| | | <el-select v-model="state.noticeForm.companyId" placeholder="请选择" clearable filterable style="width: 100%" :disabled="title == '查看' || title == '编辑' || !state.isAdmin"> |
| | | <el-option |
| | | |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="企业概括:" v-if="showEditor" required> |
| | | <el-form-item label="单位概况:" v-if="showEditor" required> |
| | | <t-editor style="width: 800px" ref="myEditor" :toolbar="toolbar" :value="state.noticeForm.companySummary" ></t-editor> |
| | | </el-form-item> |
| | | <el-form-item label="企业概括:" v-else> |
| | | <el-form-item label="单位概况:" v-else> |
| | | <div class="ql-container ql-snow" style="height: 500px;width: 100%;margin-top: 10px;" > |
| | | <div class="ql-editor"> |
| | | <div class="reviewTable" v-html="state.noticeForm.companySummary" @click="showFile($event)"></div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="营业执照:" prop="filePath"> |
| | | <el-form-item label="营业执照:" prop="filePath" v-if="showEditor"> |
| | | <el-upload accept=".jpg,.jpeg,.png,.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> |
| | | <template #tip> |
| | |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="营业执照:" prop="filePath" v-else> |
| | | <div v-if="state.fileType === 'pdf'" class="pdf-preview"> |
| | | <iframe |
| | | :src="state.fileUrl" |
| | | width="650px" |
| | | height="800px" |
| | | ></iframe> |
| | | </div> |
| | | <div v-else class="image-preview"> |
| | | <img :src="state.fileUrl" style="width:650px" alt="预览图片" class="preview-image" /> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer v-if="!isReview"> |
| | | <span class="dialog-footer"> |
| | |
| | | Authorization: getToken() |
| | | }, |
| | | fileLimit: 1, |
| | | fileList: [] |
| | | fileList: [], |
| | | fileType: '', |
| | | fileUrl: '' |
| | | |
| | | }) |
| | | |
| | |
| | | url: value.filePath, |
| | | name: value.fileName |
| | | } |
| | | state.fileType = value.fileName.split('.')[1] |
| | | state.fileUrl = import.meta.env.VITE_APP_BASE_API + '/' + value.filePath |
| | | state.fileList = [obj] |
| | | } |
| | | } |