From e1b028d486713eaf55aaf35fbf334aa568059c0d Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 14 四月 2026 15:46:54 +0800
Subject: [PATCH] 项目复制
---
src/views/h5/addrVerify/form.vue | 233 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 233 insertions(+), 0 deletions(-)
diff --git a/src/views/h5/addrVerify/form.vue b/src/views/h5/addrVerify/form.vue
new file mode 100644
index 0000000..abb1d26
--- /dev/null
+++ b/src/views/h5/addrVerify/form.vue
@@ -0,0 +1,233 @@
+<template>
+ <div>
+ <el-row class="p-3 m-0" justify="space-between" align="middle">
+ <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="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">
+ <div v-if="pdfUrl" :style="{width: '100%', height: `${mainHeight - 100}px`}">
+ <PdfPreview v-if="pdfUrl" :url="pdfUrl"></PdfPreview>
+ </div>
+ <el-text v-if="pdfUrlError" class="ml-2 text-info">鑰冪偣鐢虫姤鏂囦欢鍔犺浇澶辫触...</el-text>
+ <div class="p-2 my-4">
+ <el-form ref="verifyForm" :model="form">
+ <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.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>
+ <el-form-item class="mt-1">
+ <el-input
+ v-model="form.suggestion"
+ :rows="3"
+ type="textarea"
+ placeholder="璇峰~鍐欒瘎浼版剰瑙�"
+ :disabled="isVerified"
+ />
+ </el-form-item>
+ <el-row><el-text>*鐜板満宸ヤ綔鐓х墖</el-text></el-row>
+ <el-row>
+ <UploadBtn
+ v-model="form.image"
+ :disabled="isVerified"
+ :accept="['pdf', 'jpg']"
+ :limitFileCount="10"
+ listType="picture-card"
+ ></UploadBtn>
+ </el-row>
+
+ <Signature v-model="form.signatureUrl" :disabled="isVerified" :isRequire="true"></Signature>
+
+ <el-button
+ v-if="!isVerified"
+ @click="submitVerify"
+ type="primary" size="large"
+ class="my-7" style="width: 100%;"
+ :loading="submitLoading"
+ >鎻愪氦鏍搁獙缁撴灉
+ </el-button>
+ <el-button
+ v-if="isVerified"
+ disabled
+ type="primary" size="large"
+ class="my-7" style="width: 100%;"
+ >鏍搁獙缁撴灉宸叉彁浜�
+ </el-button>
+ </el-form>
+ </div>
+ </el-scrollbar>
+ </div>
+</template>
+<script>
+import PdfPreview from '@/views/components/PdfPreview.vue'
+import { useWindowSize } from '@/utils/hook.js'
+import Signature from '@/views/components/Signature.vue';
+import { useSessionStore } from '@/stores/session.js'
+import { storeToRefs } from 'pinia';
+
+export default {
+ components: {
+ PdfPreview,
+ Signature
+ },
+ setup() {
+ const { height } = useWindowSize()
+ const { userInfo } = storeToRefs(useSessionStore())
+ return { pageHeight: height, userInfo }
+ },
+ data() {
+ return {
+ title: '',
+ pdfUrl: '',
+ form: {
+ id: '',
+ isContentTrue: 0,
+ isSitePass: 0,
+ suggestion: '',
+ image: [],
+ signatureUrl: ''
+ },
+ isVerified: false,
+ saveLoading: false,
+ submitLoading: false,
+ pdfUrlError: false
+ }
+ },
+ computed: {
+ mainHeight() {
+ return this.pageHeight - 80
+ },
+ appId() {
+ return this.$route.query.appId
+ }
+ },
+ async created() {
+ this.getVerifyDetail()
+ },
+ mounted() {
+ document.title = '鑰冪偣鏍搁獙'
+ },
+ methods: {
+ getVerifyDetail() {
+ 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 = resData.examSiteVerifyFile ? this.$qxueyou.qxyRes + resData.examSiteVerifyFile : ''
+ this.title = resData.organizationName + '-' + resData.examSite.siteName + '鑰冪偣鏍搁獙'
+ if (resData.id) {
+ 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
+ }
+ if (!this.pdfUrl) {
+ this.pdfUrlError = false
+ }
+ } else {
+ this.$message.error('鑾峰彇鏍搁獙淇℃伅澶辫触')
+ }
+ })
+ },
+ tempSave() {
+ const data = {
+ applicationId: this.appId,
+ id: this.form.id,
+ 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.saveLoading = true
+ this.$axios.put(`/exam/verify-record/save`, data).then(res => {
+ if (res.data.code == 0) {
+ 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) {
+ console.log(msg)
+ },
+ onError(msg) {
+ console.log(msg)
+ },
+ onPageChange() {}
+ }
+}
+</script>
\ No newline at end of file
--
Gitblit v1.8.0