| | |
| | | <template> |
| | | <div> |
| | | <div v-if="pdfUrl"> |
| | | <el-row class="p-3 m-0" justify="space-between" align="middle"> |
| | | <el-col :span="3"></el-col> |
| | | <el-col :span="18"> |
| | | <el-text class="text-lg font-bold text-center"> |
| | | {{ title }} |
| | | </el-text> |
| | | <el-col :span="4"></el-col> |
| | | <el-col :span="16"> |
| | | <el-row justify="center"> |
| | | <el-text class="text-lg font-bold text-center"> |
| | | {{ title }} |
| | | </el-text> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-button text style="color: var(--el-color-primary);" :loading="saveLoading" @click="tempSave()">暂存</el-button> |
| | | <el-col :span="4"> |
| | | <el-row justify="center"> |
| | | <el-button |
| | | v-if="!isVerified" |
| | | text style="color: var(--el-color-primary);" |
| | | :loading="saveLoading" @click="tempSave()" |
| | | class="mx-4" |
| | | > |
| | | 暂存 |
| | | </el-button> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-divider class="m-0" style="flex-shrink: 0;"></el-divider> |
| | | <el-scrollbar :height="`${mainHeight}px`" class="p-2 m-0 mt-1" min-size="none"> |
| | | <el-scrollbar :height="`${mainHeight}px`" class="p-2 m-0 mt-1" > |
| | | <div v-if="pdfUrl" :style="{width: '100%', height: `${mainHeight - 100}px`}"> |
| | | <PdfPreview v-if="pdfUrl" :url="pdfUrl"></PdfPreview> |
| | | </div> |
| | | <div class="p-2 my-4"> |
| | | <el-form ref="verifyForm" :model="form"> |
| | | <el-form-item label="以上申报内容是否属实" prop="isVerified"> |
| | | <el-radio-group v-model="form.isVerified"> |
| | | <el-radio :value="true">是</el-radio> |
| | | <el-radio :value="false">否</el-radio> |
| | | <el-form-item label="*以上申报内容是否属实" prop="isVerified"> |
| | | <el-radio-group v-model="form.isContentTrue" :disabled="isVerified"> |
| | | <el-radio :value="1">是</el-radio> |
| | | <el-radio :value="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="该考点核验是否通过" prop="isPass"> |
| | | <el-radio-group v-model="form.isPass"> |
| | | <el-radio :value="true">是</el-radio> |
| | | <el-radio :value="false">否</el-radio> |
| | | <el-form-item label="*该考点核验是否通过" prop="isPass"> |
| | | <el-radio-group v-model="form.isSitePass" :disabled="isVerified"> |
| | | <el-radio :value="1">是</el-radio> |
| | | <el-radio :value="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-row><el-text>专家评估意见</el-text></el-row> |
| | |
| | | :rows="3" |
| | | type="textarea" |
| | | placeholder="请填写评估意见" |
| | | :disabled="isVerified" |
| | | /> |
| | | </el-form-item> |
| | | <el-row><el-text>现场工作照片</el-text></el-row> |
| | | <el-row><el-text>*现场工作照片</el-text></el-row> |
| | | <el-row> |
| | | <UploadBtn v-model="form.image" :accept="['pdf', 'jpg']" :limitFileCount="10" listType="picture-card"></UploadBtn> |
| | | <UploadBtn v-model="form.image" :disabled="isVerified" :accept="['pdf', 'jpg']" :limitFileCount="10" listType="picture-card"></UploadBtn> |
| | | </el-row> |
| | | |
| | | <Signature v-model="form.signature"></Signature> |
| | | <Signature v-model="form.signatureUrl" :disabled="isVerified" :isRequire="true"></Signature> |
| | | |
| | | <el-button type="primary" size="large" class="my-7" style="width: 100%;">提交核验结果</el-button> |
| | | <el-button |
| | | v-if="!isVerified" |
| | | @click="submitVerify" |
| | | type="primary" size="large" |
| | | class="my-7" style="width: 100%;" |
| | | :loading="submitLoading" |
| | | >提交核验结果</el-button> |
| | | </el-form> |
| | | </div> |
| | | </el-scrollbar> |
| | |
| | | import Signature from '@/views/main/components/Signature.vue'; |
| | | import { useSessionStore } from '@/stores/session.js' |
| | | import { storeToRefs } from 'pinia'; |
| | | import { tokenUtils } from '@/utils/axios.js'; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | pdfUrl: '', |
| | | form: { |
| | | id: '', |
| | | isVerified: false, |
| | | isPass: false, |
| | | isContentTrue: 0, |
| | | isSitePass: 0, |
| | | suggestion: '', |
| | | image: [], |
| | | signature: '' |
| | | signatureUrl: '' |
| | | }, |
| | | saveLoading: false |
| | | isVerified: false, |
| | | saveLoading: false, |
| | | submitLoading: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return this.pageHeight - 80 |
| | | }, |
| | | appId() { |
| | | return this.$route.params.id |
| | | return this.$route.query.appId |
| | | } |
| | | }, |
| | | async created() { |
| | |
| | | }, |
| | | mounted() { |
| | | document.title = '考点核验' |
| | | this.pdfUrl = this.$qxueyou.qxyRes + '20260304/匠心学院职业技能评价考点核验申请表_1772591122177.pdf' |
| | | }, |
| | | methods: { |
| | | getVerifyDetail() { |
| | | const params = { id: this.appId } |
| | | this.$axios.get('/exam/verify-record/get', { params }).then(res => { |
| | | const params = { applicationId: this.appId } |
| | | this.$axios.get('/exam/verify-record/get-by-application-id', { params }).then(res => { |
| | | if (res.data.code == 0) { |
| | | const resData = res.data.data || {} |
| | | this.pdfUrl = this.$qxueyou.qxyRes + resData.examSiteVerifyFile |
| | | this.title = resData.organizationName + '-' + resData.examSite.siteName + '考点核验' |
| | | if (resData.id) { |
| | | this.form = { |
| | | ...resData |
| | | } |
| | | this.form.isContentTrue = resData.isContentTrue |
| | | this.form.isSitePass = resData.isSitePass |
| | | this.form.suggestion = resData.evaluationOpinion |
| | | resData.sitePhotos?.forEach(ele => { |
| | | this.form.image.push({ name: '', url: ele }) |
| | | }) |
| | | this.form.signatureUrl = resData.signatureUrl |
| | | this.isVerified = resData.isVerified |
| | | } |
| | | } else { |
| | | this.$message.error('获取核验信息失败') |
| | |
| | | }, |
| | | tempSave() { |
| | | const data = { |
| | | applicationId: this.appId, |
| | | id: this.form.id, |
| | | userId: 0, |
| | | name: "", |
| | | gender: "", |
| | | mobile: "", |
| | | age: 0, |
| | | idNumber: "", |
| | | isContentTrue: 0, |
| | | isSitePass: 0, |
| | | evaluationOpinion: "", |
| | | sitePhotos: [], |
| | | status: 0 |
| | | userId: this.userInfo.id, |
| | | name: this.userInfo.name, |
| | | mobile: this.userInfo.mobile, |
| | | idNumber: this.userInfo.idCard, |
| | | isContentTrue: this.form.isContentTrue, |
| | | isSitePass: this.form.isSitePass, |
| | | evaluationOpinion: this.form.suggestion, |
| | | sitePhotos: this.form.image.map(ele => ele.url), |
| | | signatureUrl: this.form.signatureUrl, |
| | | } |
| | | this.$axios.post('/exam/verify-record/create', data).then(res => { |
| | | this.saveLoading = true |
| | | this.$axios.put(`/exam/verify-record/save`, data).then(res => { |
| | | if (res.data.code == 0) { |
| | | console.log(res.data.data) |
| | | this.$message.success('保存成功') |
| | | this.getVerifyDetail() |
| | | } else { |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | }).finally(() => { |
| | | this.saveLoading = false |
| | | }) |
| | | }, |
| | | submitVerify() { |
| | | if (this.form.image.length==0) { |
| | | this.$message.error('请上传现场工作照片') |
| | | return |
| | | } |
| | | if (!this.form.signatureUrl) { |
| | | this.$message.error('请填写签名') |
| | | return |
| | | } |
| | | this.$messageBox.confirm('提交之后不可再编辑核验,确认提交吗', '提示', |
| | | { confirmButtonText: '确定', cancelButtonText: '取消', type: 'tip' }).then(res => { |
| | | if (res == 'confirm') { |
| | | this.submitLoading = true |
| | | const data = { |
| | | applicationId: this.appId, |
| | | isContentTrue: this.form.isContentTrue, |
| | | isSitePass: this.form.isSitePass, |
| | | evaluationOpinion: this.form.suggestion, |
| | | sitePhotos: this.form.image.map(ele => ele.url), |
| | | signatureUrl: this.form.signatureUrl, |
| | | } |
| | | this.$axios.post('/exam/verify-record/verify', data).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.$message.success('提交核验成功') |
| | | this.isVerified = true |
| | | } else { |
| | | this.$message.error(res.data.msg || '提交核验失败') |
| | | } |
| | | }).finally(() => { |
| | | this.submitLoading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onPagesLoaded(msg) { |