diff --git a/src/pages/detail/mapModle.vue b/src/pages/detail/mapModle.vue index 5645bf7..75cffa6 100644 --- a/src/pages/detail/mapModle.vue +++ b/src/pages/detail/mapModle.vue @@ -47,7 +47,7 @@ export default { methods: { initMe(){ - this.project=this.$root.project; + this.project=this.$root.project||{}; this.reloadMap(); }, initImages(files){ diff --git a/src/pages/index.vue b/src/pages/index.vue index 57a2b9f..17d8c98 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -507,9 +507,9 @@ export default { }, methods: { initMe(){ - this.prj=this.$root.project; - this.deptInfo=this.$root.dept; - this.prjs=this.$root.projects; + this.prj=this.$root.project||{}; + this.deptInfo=this.$root.dept||{}; + this.prjs=this.$root.projects||[]; let res=this.prj; this.investmentAmountData1[0].value = "" + res.paidAmount * 1.0; this.investmentAmountData2[0].value = "" + res.onAccountAmount * 1.0; diff --git a/src/pages/index/mapIndex.vue b/src/pages/index/mapIndex.vue index 0de7b2f..68e3074 100644 --- a/src/pages/index/mapIndex.vue +++ b/src/pages/index/mapIndex.vue @@ -27,7 +27,7 @@ export default { methods: { initMe() { - this.project = this.$root.project; + this.project = this.$root.project||{}; this.reloadMap(); }, reloadMap() { diff --git a/src/pages/projectDetail.vue b/src/pages/projectDetail.vue index 0c6955f..59825db 100644 --- a/src/pages/projectDetail.vue +++ b/src/pages/projectDetail.vue @@ -796,9 +796,9 @@ export default { this.$refs.attDetailDlg.showDialog(data); }, initMe(){ - this.project=this.$root.project; - this.dept=this.$root.dept; - this.prjs=this.$root.projects; + this.project=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.prjs=this.$root.projects||[]; let res=this.project; if (res.id == 0) { if (this.prjs.length > 1) { diff --git a/src/pages/projectEngin.vue b/src/pages/projectEngin.vue index c44b490..faf393a 100644 --- a/src/pages/projectEngin.vue +++ b/src/pages/projectEngin.vue @@ -162,9 +162,9 @@ export default { methods: { initMe(){ - this.project=this.$root.project; - this.dept=this.$root.dept; - this.prjs=this.$root.projects; + this.project=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.prjs=this.$root.projects||[]; this.loadData(); }, doStateDlg(){ diff --git a/src/pages/projectProgress.vue b/src/pages/projectProgress.vue index eab6307..70b9365 100644 --- a/src/pages/projectProgress.vue +++ b/src/pages/projectProgress.vue @@ -477,9 +477,9 @@ export default { }, methods: { initMe(){ - this.prjInfo=this.$root.project; - this.dept=this.$root.dept; - this.projects=this.$root.projects; + this.prjInfo=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.projects=this.$root.projects||[]; this.loadProjectConstructionProgress(); this.groupByProjectCategory(this.dept.id); this.deptChange(); diff --git a/src/pages/projectQuality.vue b/src/pages/projectQuality.vue index e5fb245..58620b1 100644 --- a/src/pages/projectQuality.vue +++ b/src/pages/projectQuality.vue @@ -349,9 +349,9 @@ export default { }); }, initMe(){ - this.projectInfo=this.$root.project; - this.dept=this.$root.dept; - this.prjs=this.$root.projects; + this.projectInfo=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.prjs=this.$root.projects||[]; this.doDeptChane(); this.checkDetection(0); this.doMeasuredNav(0,'汇总') diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue index 935e68f..ab2b45a 100644 --- a/src/pages/projectSafety.vue +++ b/src/pages/projectSafety.vue @@ -404,9 +404,9 @@ export default { }, methods: { initMe(){ - this.projectInfo=this.$root.project; - this.dept=this.$root.dept; - this.projects=this.$root.projects; + this.projectInfo=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.projects=this.$root.projects||[]; this.doDeptChane(); this.getWorkTrainList(); this.getEmergencyDrillList(); diff --git a/src/pages/projectVideo.vue b/src/pages/projectVideo.vue index 89c7b69..6a4cabf 100644 --- a/src/pages/projectVideo.vue +++ b/src/pages/projectVideo.vue @@ -394,9 +394,9 @@ export default { }, methods: { initMe(){ - this.projectInfo=this.$root.project; - this.dept=this.$root.dept; - this.projectInfos=this.$root.projects; + this.projectInfo=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.projectInfos=this.$root.projects||[]; this.initVideoMenu(); }, init() { diff --git a/src/pages/toAIVideoProject.vue b/src/pages/toAIVideoProject.vue index 45cf47a..f8d790a 100644 --- a/src/pages/toAIVideoProject.vue +++ b/src/pages/toAIVideoProject.vue @@ -305,9 +305,9 @@ export default { }, methods: { initMe(){ - this.projectInfo=this.$root.project; - this.dept=this.$root.dept; - this.projectInfos=this.$root.projects; + this.projectInfo=this.$root.project||{}; + this.dept=this.$root.dept||{}; + this.projectInfos=this.$root.projects||[]; this.initVideoMenu(); }, init(){ diff --git a/vue.config.js b/vue.config.js index 5272f8a..9c06642 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,8 +23,8 @@ module.exports = defineConfig({ } }, '/jhapi':{ - //target: `http://62.234.3.186/jhapi/`, - target: `http://127.0.0.1:8090/jhapi/`, + target: `http://62.234.3.186/jhapi/`, + //target: `http://127.0.0.1:8090/jhapi/`, changeOrigin: true, pathRewrite: { '^/jhapi':'/'