修复BUG

1.泾河新城第一污水处理厂工程  项目全景页面不显示,他们有一条数据
2.项目成果的分类从前往后点有详细数据,每个分类下都有数据,从后往前点,数据就没了
prv
haha 2024-03-20 22:04:31 +08:00
parent f1f3baf502
commit e3f5a423ab
2 changed files with 10 additions and 9 deletions

View File

@ -77,7 +77,7 @@ export default {
})); }));
this.$bus.$on("projectChange", debounce(res => { this.$bus.$on("projectChange", debounce(res => {
this.prj = res; this.prj = res;
this.loadData(); this.loadData2();
})); }));
if (this.$root.hasInitHeader) { if (this.$root.hasInitHeader) {
this.initMe(); this.initMe();
@ -91,7 +91,7 @@ export default {
this.info=it; this.info=it;
},400) },400)
}, },
loadData() { loadData2() {
this.info=null; this.info=null;
this.getProjectId(id => { this.getProjectId(id => {
this.$api.project.listPhotography(id).then(d => { this.$api.project.listPhotography(id).then(d => {
@ -108,9 +108,9 @@ export default {
}); });
}, },
initMe() { initMe() {
this.project = this.$root.project || {}; this.prj = this.$root.project || {};
this.prjs = this.$root.projects || []; this.prjs = this.$root.projects || [];
this.loadData(); this.loadData2();
}, },
getProjectId(cb) { getProjectId(cb) {
let func = () => { let func = () => {

View File

@ -606,6 +606,7 @@ import projectInfoDlg from './detail/projectInfoDlg.vue'
import debounce from 'lodash.debounce' import debounce from 'lodash.debounce'
import AttendanceDetailDialog from './components/AttendanceDetailDialog.vue' import AttendanceDetailDialog from './components/AttendanceDetailDialog.vue'
import JobWorkerDialog from './components/JobWorkerDialog.vue' import JobWorkerDialog from './components/JobWorkerDialog.vue'
import { tryToJson } from '@/utils/tools'
export default { export default {
components: { components: {
MonitAndWarning, projectInfoDlg, MonitAndWarning, projectInfoDlg,
@ -1016,8 +1017,8 @@ export default {
this.prjResNav = n; this.prjResNav = n;
if (n == '06') { if (n == '06') {
this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 4 && d.lvl.substring(0, 2) == '06').map(it => { this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 4 && d.lvl.substring(0, 2) == '06').map(it => {
if (it.files) { if (it.files && !Array.isArray(it.files)) {
it.files = JSON.parse(it.files); it.files = tryToJson(it.files,[]);
} else { } else {
it.files = []; it.files = [];
} }
@ -1025,8 +1026,8 @@ export default {
}); });
} else { } else {
this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 6 && d.lvl.substring(0, 2) == n).map(it => { this.prjResultsData = this.finishBuildNode.filter(d => d.lvl.length == 6 && d.lvl.substring(0, 2) == n).map(it => {
if (it.files) { if (it.files && !Array.isArray(it.files)) {
it.files = JSON.parse(it.files); it.files = tryToJson(it.files,[]);
} else { } else {
it.files = []; it.files = [];
} }