wuzhen update

This commit is contained in:
wuzhen committed 2025-08-10 10:53:18 +08:00
1 parent 909e3d916b
commit cee0034091
22 files changed
+59 -689

No files matched your search

+16
View File
@@ -95,6 +95,14 @@ export interface JcbtPovertyApplicationForm {
assistanceTypeNames?: string
/** 备注 */
remark?: string
/** 申请表附件URL */
attachApplicationFormUrl?: string
/** 申请表附件ID */
attachApplicationFormId?: number
/** 调查表附件URL */
attachSurveyFormUrl?: string
/** 调查表附件ID */
attachSurveyFormId?: number
}
/**
@@ -169,6 +177,14 @@ export interface JcbtPovertyApplicationVo {
updateBy: number
/** 更新时间 */
updateTime: string
/** 申请表附件URL */
attachApplicationFormUrl: string
/** 申请表附件ID */
attachApplicationFormId: number
/** 调查表附件URL */
attachSurveyFormUrl: string
/** 调查表附件ID */
attachSurveyFormId: number
}
/**
@@ -200,7 +200,7 @@
</template>
<script setup name="JcbtPovertyApplicationForm" lang="ts">
import { ref, onMounted, getCurrentInstance } from 'vue';
import { ref, onMounted, getCurrentInstance, computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import {
getPovertyApplication,
@@ -212,6 +212,7 @@ import {
checkDuplicate
} from '@/api/jcbt/povertyApplication';
import { UploadFilled, User, House, Document, Folder } from '@element-plus/icons-vue';
import { getToken } from '@/utils/auth';
const { proxy } = getCurrentInstance();
const route = useRoute();
@@ -241,6 +242,14 @@ const selectedGroupDescription = ref('');
// 文件上传
const fileList = ref([]);
// 文件上传相关
const uploadHeaders = computed(() => {
return {
'Authorization': `Bearer ${getToken() || ''}`,
'clientid': import.meta.env.VITE_APP_CLIENT_ID || 'e5cd7e4891bf95d1d19206ce24a7b32e'
};
});
// 学生搜索相关
const filteredStudents = ref([]);
const studentSearchLoading = ref(false);
@@ -768,8 +768,11 @@ const rules = {
}
// 文件上传相关
const uploadHeaders = ref({
Authorization: "Bearer " + getToken()
const uploadHeaders = computed(() => {
return {
'Authorization': `Bearer ${getToken() || ''}`,
'clientid': import.meta.env.VITE_APP_CLIENT_ID || 'e5cd7e4891bf95d1d19206ce24a7b32e'
};
})
// 申请表文件列表
@@ -908,7 +911,9 @@ function reset() {
applicationReason: null,
remark: null,
attachApplicationFormUrl: null,
attachSurveyFormUrl: null
attachApplicationFormId: null,
attachSurveyFormUrl: null,
attachSurveyFormId: null
}
// 重置文件列表
@@ -1104,6 +1109,9 @@ function submitForm() {
open.value = false
getList()
getStatistics()
}).catch(error => {
console.error('新增失败:', error)
proxy.$modal.msgError(error.msg || '新增失败,请稍后重试')
})
}
}
@@ -1162,6 +1170,7 @@ function beforeUpload(file) {
function handleApplicationFormUploadSuccess(response, file) {
if (response.code === 200) {
form.value.attachApplicationFormUrl = response.data.url
form.value.attachApplicationFormId = response.data.ossId
applicationFormFileList.value = [{
name: file.name,
url: response.data.url
@@ -1176,6 +1185,7 @@ function handleApplicationFormUploadSuccess(response, file) {
function handleSurveyFormUploadSuccess(response, file) {
if (response.code === 200) {
form.value.attachSurveyFormUrl = response.data.url
form.value.attachSurveyFormId = response.data.ossId || response.data.id
surveyFormFileList.value = [{
name: file.name,
url: response.data.url
@@ -1195,12 +1205,14 @@ function handleUploadError(error) {
/** 申请表移除 */
function handleApplicationFormRemove() {
form.value.attachApplicationFormUrl = ''
form.value.attachApplicationFormId = null
applicationFormFileList.value = []
}
/** 调查表移除 */
function handleSurveyFormRemove() {
form.value.attachSurveyFormUrl = ''
form.value.attachSurveyFormId = null
surveyFormFileList.value = []
}