From 16a0bb92f70e91755db0497b7190fa121d817cba Mon Sep 17 00:00:00 2001 From: haha Date: Mon, 29 Apr 2024 23:00:47 +0800 Subject: [PATCH] update code --- src/pages/quality/checkDetectionDlg.vue | 18 +++++++++++++++--- src/pages/quality/showCheckingDlg.vue | 11 +++++++++++ vue.config.js | 3 ++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/pages/quality/checkDetectionDlg.vue b/src/pages/quality/checkDetectionDlg.vue index f978322..ee0c60e 100644 --- a/src/pages/quality/checkDetectionDlg.vue +++ b/src/pages/quality/checkDetectionDlg.vue @@ -83,7 +83,9 @@ 材料名称: -
{{ it.materialName }}
+
{{ it.materialName }} + 下载附件 +
使用部位: @@ -176,6 +178,13 @@ export default { mounted() { }, methods: { + downFiles(files){ + files.forEach(item=>{ + if (item) { + this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/") + 1)); + } + }) + }, handleCurrentChange(n) { this.index = n; this.loadData(); @@ -193,8 +202,11 @@ export default { ...this.opt },this.size,this.index).then(d=>{ this.total=d.total||0; - this.dataTable=d.rows||[]; - this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][opt.checkType||0]+`[${this.dataTable.length}]`; + this.dataTable=(d.rows||[]).map(it=>{ + it.attachmentFiles=this.$tryToJson(it.attachment,[]); + return it; + }); + this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][this.opt.checkType||0]+`[${this.dataTable.length}]`; }); } }, diff --git a/src/pages/quality/showCheckingDlg.vue b/src/pages/quality/showCheckingDlg.vue index a83245a..fa123f6 100644 --- a/src/pages/quality/showCheckingDlg.vue +++ b/src/pages/quality/showCheckingDlg.vue @@ -91,6 +91,9 @@ +
+ 下载附件 +
@@ -120,10 +123,18 @@ export default { }, methods: { + downFiles(files){ + files.forEach(item=>{ + if (item) { + this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/") + 1)); + } + }) + }, download(it) { window.open(it.insuranceFile) }, showDialog(row) { + row.attFiles=this.$tryToJson(row.checkingFiles,[]); this.row = row; this.images = this.getBigProfileImage(row); this.show = true; diff --git a/vue.config.js b/vue.config.js index bbccaad..6a80e09 100644 --- a/vue.config.js +++ b/vue.config.js @@ -46,7 +46,8 @@ module.exports = defineConfig({ } }, '/profile':{ - target: `http://szgc.jhncidg.com/jhapi/profile`, + //target: `http://szgc.jhncidg.com/jhapi/profile`, + target: `http://62.234.3.186/profile/`, changeOrigin: true, pathRewrite: { '^/profile':'/'