From e29366525de315fe7dd80d7466be676218042d21 Mon Sep 17 00:00:00 2001 From: 18154758993 <605281283@qq.com> Date: Wed, 22 Oct 2025 11:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E5=9B=9E=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/preview-static.js | 16 ++++++++++ .../comprehensive/knzzGlApply/FdyAll.vue | 27 +++++++++++++++- src/views/comprehensive/knzzGlApply/fdy.vue | 32 +++++++++++++++---- src/views/stuCQS/good/FdyAll.vue | 32 ++++++++++++++++++- 4 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 build/preview-static.js diff --git a/build/preview-static.js b/build/preview-static.js new file mode 100644 index 0000000..323cc2f --- /dev/null +++ b/build/preview-static.js @@ -0,0 +1,16 @@ +const connect = require('connect'); +const serveStatic = require('serve-static'); +const chalk = require('chalk'); +const path = require('path'); + +const port = process.env.PORT ? Number(process.env.PORT) : 9526; +const mountPath = '/srs'; // 与生产 publicPath 保持一致 +const distDir = path.resolve(__dirname, '..', 'dist'); + +const app = connect(); +app.use(mountPath, serveStatic(distDir, { index: ['index.html', '/'] })); + +app.listen(port, () => { + const url = `http://localhost:${port}${mountPath}/`; + console.log(chalk.green(`> Static preview running at ${url}`)); +}); \ No newline at end of file diff --git a/src/views/comprehensive/knzzGlApply/FdyAll.vue b/src/views/comprehensive/knzzGlApply/FdyAll.vue index 9565eea..0b4e71c 100644 --- a/src/views/comprehensive/knzzGlApply/FdyAll.vue +++ b/src/views/comprehensive/knzzGlApply/FdyAll.vue @@ -51,6 +51,8 @@ @@ -132,7 +134,7 @@ import { getTokenKeySessionStorage as getToken } from '@/utils/auth' import GlApply from '@/views/comprehensive/knzzGlApply/cpnt/GlApply.vue' import GlLook from '@/views/comprehensive/knzzGlApply/cpnt/GlLook.vue' -import { listFdyAll as listView } from '@/api/comprehensive/knzzGlApply' +import { listFdyAll as listView, doEdit } from '@/api/comprehensive/knzzGlApply' export default { @@ -221,6 +223,29 @@ export default { this.lookV = true }, + // 撤回到“已提交审核”(applyStatus=1) + async handleRevoke(row) { + try { + await this.$confirm('确定撤回该申请至“已提交审核”状态吗?', '提示', { type: 'warning' }) + } catch (e) { + return + } + const loading = this.$loading({ lock: true, text: '撤回中…' }) + try { + const payload = { id: row.id, applyStatus: 1 } + const res = await doEdit(payload) + if (res.code === 200) { + this.$message.success('撤回成功,状态已变更为:已提交审核') + this.getList() + } else { + this.$message.error(res.msg || '撤回失败') + } + } catch (err) { + this.$message.error(`撤回失败:${err?.message || '网络错误'}`) + } finally { + loading.close && loading.close() + } + } } } diff --git a/src/views/comprehensive/knzzGlApply/fdy.vue b/src/views/comprehensive/knzzGlApply/fdy.vue index 5b23db2..722b76c 100644 --- a/src/views/comprehensive/knzzGlApply/fdy.vue +++ b/src/views/comprehensive/knzzGlApply/fdy.vue @@ -124,9 +124,20 @@ + + + + + + + + + + + @@ -273,6 +284,7 @@ export default { zcpmbl: '', zpm: '', zpmbl: '', + hardType: '', hardFile: '', softFile: '' }, @@ -447,17 +459,16 @@ export default { }, async handleEditSave() { const sdata = { ...this.editForm } + // 保存前兼容:若意外为数组则取首项 + if (Array.isArray(sdata.hardType)) { + sdata.hardType = sdata.hardType[0] || '' + } const loading = fullLoading(this) const res =await doEdit(sdata) loading.close() if (res.code == 200) { this.$message.success('保存成功') - if (this.editV) { - this.editForm = { ...this.editForm, ...payload } - this.editV = false - } else { - this.lookForm = { ...this.lookForm, ...payload } - } + this.editV = false this.getList() } else { this.$message.error(res.msg || '保存失败') @@ -515,6 +526,15 @@ export default { if (res.code === 200) { // 直接使用后端返回的完整数据作为编辑表单数据 this.editForm = { ...res.data } + // 兼容困难类型为字符串/数组/逗号分隔字符串的回填(单选) + const ht = this.editForm.hardType + if (Array.isArray(ht)) { + this.editForm.hardType = ht[0] || '' + } else if (typeof ht === 'string' && ht.trim()) { + this.editForm.hardType = ht.includes(',') ? ht.split(',')[0].trim() : ht + } else { + this.editForm.hardType = '' + } this.editV = true } else { this.$message.error(res.msg || '获取详情失败') diff --git a/src/views/stuCQS/good/FdyAll.vue b/src/views/stuCQS/good/FdyAll.vue index b932a85..b00ae82 100644 --- a/src/views/stuCQS/good/FdyAll.vue +++ b/src/views/stuCQS/good/FdyAll.vue @@ -43,6 +43,9 @@ 查看详情 + 撤回 @@ -280,7 +283,7 @@