|
|
|
@ -276,13 +276,30 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 按钮 -->
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="row" style="display: ruby;">
|
|
|
|
|
<button type="submit" class="group relative w-full max-w-xs flex justify-center py-3 px-6 border border-transparent text-base font-medium rounded-lg text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-all duration-300">
|
|
|
|
|
<span class="absolute left-0 inset-y-0 flex items-center pl-3" style="margin-right: 5px;">
|
|
|
|
|
<i class="fa-solid fa-file-pdf text-white transform group-hover:translate-x-0.5 transition-transform duration-200"></i>
|
|
|
|
|
</span>
|
|
|
|
|
生成PDF文件
|
|
|
|
|
生成涉密人员审查表
|
|
|
|
|
</button>
|
|
|
|
|
<a v-if="showResult" :href="pdfUrl" download="涉密人员审查表.pdf" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors duration-200">
|
|
|
|
|
<i class="fa-solid fa-download mr-2"></i> 下载PDF
|
|
|
|
|
</a>
|
|
|
|
|
<!-- 结果区域 -->
|
|
|
|
|
<!-- <div class="bg-white rounded-xl shadow-soft p-6 mb-8 transform hover:shadow-lg transition-all duration-300">-->
|
|
|
|
|
<!-- <div class="flex items-start">-->
|
|
|
|
|
<!-- <div class="ml-4">-->
|
|
|
|
|
<!-- <h3 class="text-lg font-medium text-gray-800">PDF生成成功</h3>-->
|
|
|
|
|
<!-- <div class="mt-4 flex flex-wrap gap-3">-->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- <button @click="showResult = false" class="inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md shadow-sm text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors duration-200">-->
|
|
|
|
|
<!-- <i class="fa-solid fa-times mr-2"></i> 关闭-->
|
|
|
|
|
<!-- </button>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<h4 class="form-header h4">材料上传</h4>
|
|
|
|
@ -348,26 +365,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 结果区域 -->
|
|
|
|
|
<div v-if="showResult" class="bg-white rounded-xl shadow-soft p-6 mb-8 transform hover:shadow-lg transition-all duration-300">
|
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
<div class="flex-shrink-0 bg-green-100 p-3 rounded-lg">
|
|
|
|
|
<i class="fa-solid fa-check text-green-500 text-xl"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-4">
|
|
|
|
|
<h3 class="text-lg font-medium text-gray-800">PDF生成成功</h3>
|
|
|
|
|
<p class="mt-1 text-sm text-gray-600">您的PDF表单已成功填写,可以点击下方按钮下载。</p>
|
|
|
|
|
<div class="mt-4 flex flex-wrap gap-3">
|
|
|
|
|
<a :href="pdfUrl" download="涉密人员审查表.pdf" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors duration-200">
|
|
|
|
|
<i class="fa-solid fa-download mr-2"></i> 下载PDF
|
|
|
|
|
</a>
|
|
|
|
|
<button @click="showResult = false" class="inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md shadow-sm text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors duration-200">
|
|
|
|
|
<i class="fa-solid fa-times mr-2"></i> 关闭
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 加载中 -->
|
|
|
|
|
<div v-if="isLoading" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
|
|
|
<div class="bg-white rounded-xl p-6 shadow-lg max-w-md w-full">
|
|
|
|
@ -550,7 +547,7 @@
|
|
|
|
|
// 创建下载URL
|
|
|
|
|
let blob = new Blob([response.data], { type: 'application/pdf' });
|
|
|
|
|
this.pdfUrl = window.URL.createObjectURL(blob);
|
|
|
|
|
|
|
|
|
|
this.$message.success('生成pdf成功,请点击下载!');
|
|
|
|
|
// 隐藏加载状态,显示结果
|
|
|
|
|
this.isLoading = false;
|
|
|
|
|
this.showResult = true;
|
|
|
|
|