From e3f5a423ab22331bad815a8a87d046bf9540427e Mon Sep 17 00:00:00 2001 From: haha Date: Wed, 20 Mar 2024 22:04:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG=201.=E6=B3=BE=E6=B2=B3?= =?UTF-8?q?=E6=96=B0=E5=9F=8E=E7=AC=AC=E4=B8=80=E6=B1=A1=E6=B0=B4=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=8E=82=E5=B7=A5=E7=A8=8B=20=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=85=A8=E6=99=AF=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E4=BB=96=E4=BB=AC=E6=9C=89=E4=B8=80=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=202.=E9=A1=B9=E7=9B=AE=E6=88=90=E6=9E=9C=E7=9A=84?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BB=8E=E5=89=8D=E5=BE=80=E5=90=8E=E7=82=B9?= =?UTF-8?q?=E6=9C=89=E8=AF=A6=E7=BB=86=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=AF=8F?= =?UTF-8?q?=E4=B8=AA=E5=88=86=E7=B1=BB=E4=B8=8B=E9=83=BD=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E4=BB=8E=E5=90=8E=E5=BE=80=E5=89=8D=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=B0=B1=E6=B2=A1=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/photography.vue | 10 +++++----- src/pages/projectDetail.vue | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/pages/photography.vue b/src/pages/photography.vue index e1bf444..8047d4e 100644 --- a/src/pages/photography.vue +++ b/src/pages/photography.vue @@ -77,7 +77,7 @@ export default { })); this.$bus.$on("projectChange", debounce(res => { this.prj = res; - this.loadData(); + this.loadData2(); })); if (this.$root.hasInitHeader) { this.initMe(); @@ -91,7 +91,7 @@ export default { this.info=it; },400) }, - loadData() { + loadData2() { this.info=null; this.getProjectId(id => { this.$api.project.listPhotography(id).then(d => { @@ -108,9 +108,9 @@ export default { }); }, initMe() { - this.project = this.$root.project || {}; - this.prjs = this.$root.projects || []; - this.loadData(); + this.prj = this.$root.project || {}; + this.prjs = this.$root.projects || []; + this.loadData2(); }, getProjectId(cb) { let func = () => { diff --git a/src/pages/projectDetail.vue b/src/pages/projectDetail.vue index 9dc2f7c..e6dbb85 100644 --- a/src/pages/projectDetail.vue +++ b/src/pages/projectDetail.vue @@ -606,6 +606,7 @@ import projectInfoDlg from './detail/projectInfoDlg.vue' import debounce from 'lodash.debounce' import AttendanceDetailDialog from './components/AttendanceDetailDialog.vue' import JobWorkerDialog from './components/JobWorkerDialog.vue' +import { tryToJson } from '@/utils/tools' export default { components: { MonitAndWarning, projectInfoDlg, @@ -1016,8 +1017,8 @@ export default { this.prjResNav = n; if (n == '06') { this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 4 && d.lvl.substring(0, 2) == '06').map(it => { - if (it.files) { - it.files = JSON.parse(it.files); + if (it.files && !Array.isArray(it.files)) { + it.files = tryToJson(it.files,[]); } else { it.files = []; } @@ -1025,8 +1026,8 @@ export default { }); } else { this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 6 && d.lvl.substring(0, 2) == n).map(it => { - if (it.files) { - it.files = JSON.parse(it.files); + if (it.files && !Array.isArray(it.files)) { + it.files = tryToJson(it.files,[]); } else { it.files = []; }