diff --git a/FrontCode2/sunshine_levy/src/router/index.js b/FrontCode2/sunshine_levy/src/router/index.js index 2b40f83..2bc0e08 100644 --- a/FrontCode2/sunshine_levy/src/router/index.js +++ b/FrontCode2/sunshine_levy/src/router/index.js @@ -38,7 +38,7 @@ export default new Router({ component: () => import ("../views/report/agreement") }, - // 查看pdf页面 + // 补偿协议pdf { path: "/showPdf", name: "showPdf", diff --git a/FrontCode2/sunshine_levy/src/store/index.js b/FrontCode2/sunshine_levy/src/store/index.js index d7e2837..19806cd 100644 --- a/FrontCode2/sunshine_levy/src/store/index.js +++ b/FrontCode2/sunshine_levy/src/store/index.js @@ -2,14 +2,16 @@ import Vuex from "vuex"; import Vue from "vue"; Vue.use(Vuex); -export default new Vuex.Store({ +const store = new Vuex.Store({ // state 中存放的就是全局共享的数据 state: { info: {}, // 首页数据 homeData: {}, // 评估详情页面类型 - type: "" + type: "", + //分户评估id + id: "" }, mutations: { getData: (state, data) => { @@ -21,6 +23,10 @@ export default new Vuex.Store({ }, setType: (state, data) => { state.type = data; + }, + // 设置分户评估id + setFhpgId: (state, id) => { + state.id = id; } }, actions: { @@ -33,8 +39,14 @@ export default new Vuex.Store({ commit("getHomeData", data); }, // 设置评估详情页面类型 - SET_TYPE: ({ commit }, data) => { - commit("setType", data); + SET_TYPE: ({ commit }, type) => { + commit("setType", type); + }, + // 设置分户评估id + SET_FHPGID: ({ commit }, id) => { + commit("setFhpgId", id); } } -}); \ No newline at end of file +}); + +export default store; \ No newline at end of file diff --git a/FrontCode2/sunshine_levy/src/views/index.vue b/FrontCode2/sunshine_levy/src/views/index.vue index a54e057..e885a52 100644 --- a/FrontCode2/sunshine_levy/src/views/index.vue +++ b/FrontCode2/sunshine_levy/src/views/index.vue @@ -152,7 +152,7 @@
@@ -185,17 +185,14 @@ :src="require('@/assets/img/assess_2.png')" class="assessIcon" /> - 补偿协议 + 补偿结果
-
@@ -319,7 +316,7 @@ export default { ticket: "8a1188537bda78db017c11306d640ca7-ticket" }; }, - async created() { + created() { this.onInit(); console.log("this", this); this.setLocationAplus(); @@ -360,7 +357,7 @@ export default { }); }, // 跳转项目详情 - gotoProject(type, id) { + gotoProject(type) { this.$router.push({ name: "projectSelect", params: { @@ -368,6 +365,22 @@ export default { } }); }, + // 直接跳转分户评估结果页面 + toEvaluate(id, type) { + this.$router.push({ + name: "evaluatePage", + params: { + fhpgId: id, + type + } + }); + }, + // 直接跳转协议结果pdf + toAgreement() { + this.$router.push({ + name: "showPdf" + }); + }, // 加载项目数统计信息 onLoadStatistic() { apis.projectStatistics().then(({ result }) => { @@ -378,7 +391,7 @@ export default { pageJump(id) { this.$router.push({ name: "policyInfo", - params: { ticket: this.ticket, id: id } + params: { ticket: window.sessionStorage.getItem("ticket"), id: id } }); }, setZwUserAplus(Userid, userName) { diff --git a/FrontCode2/sunshine_levy/src/views/report/agreement.vue b/FrontCode2/sunshine_levy/src/views/report/agreement.vue index 4d4fd43..17eb749 100644 --- a/FrontCode2/sunshine_levy/src/views/report/agreement.vue +++ b/FrontCode2/sunshine_levy/src/views/report/agreement.vue @@ -7,7 +7,7 @@
@@ -54,7 +54,6 @@ import { SetProjectId } from "@/common/util/tools"; export default { data() { return { - result: "2", info: { userName: "无数据", prjList: [ @@ -70,11 +69,14 @@ export default { } ] }, - prjList: [], prjListLength: "" }; }, created() { + console.log( + "this.$store.state.homeData.data.data", + this.$store.state.homeData.data.data + ); this.onInit(); }, methods: { @@ -82,33 +84,16 @@ export default { if (!window.sessionStorage.getItem("projectId")) { SetProjectId(this.$route.params.prjId); } - mgop({ - api: "mgop.kykj.houseexpropriat.getprjlist", - host: "https://mapi.zjzwfw.gov.cn/", - dataType: "JSON", - type: "POST", - data: { - ticket: - this.$route.params.ticket || window.sessionStorage.getItem("ticket") - }, - appKey: "es4b8zmz+2001833218+dehllx", - onSuccess: data => { - const { data: res } = data.data; - this.info = res; - const prjList = res.prjList.find((item, index) => { - return ( - item.prjId == - (this.$route.params.prjId || - window.sessionStorage.getItem("projectId")) - ); - }); - this.prjList = prjList; - this.prjListLength = prjList.bcxyList.length; - }, - onFail: err => { - console.log("用户无数据,不展示"); + this.info = JSON.parse( + JSON.stringify(this.$store.state.homeData.data.data) + ); + const prjList = this.$store.state.homeData.data.data.prjList.find( + item => { + return item.prjId == window.sessionStorage.getItem("projectId"); } - }); + ); + this.info.prjList = prjList; + this.prjListLength = prjList.bcxyList.length; }, showPdf(url) { url = ""; diff --git a/FrontCode2/sunshine_levy/src/views/report/evaluatePage.vue b/FrontCode2/sunshine_levy/src/views/report/evaluatePage.vue index 404252d..353d787 100644 --- a/FrontCode2/sunshine_levy/src/views/report/evaluatePage.vue +++ b/FrontCode2/sunshine_levy/src/views/report/evaluatePage.vue @@ -27,19 +27,19 @@
被征收房屋评估金额: - {{ info.housingAssessmentValue }} + {{ info.housingAssessmentValue }}元
被征收房屋评估价值: - {{ info.countValue }} + {{ info.countValue }}元
附属物评估金额: - {{ info.attachedAssessedValue }} + {{ info.attachedAssessedValue }}元
装修评估金额: - {{ info.decorateAssessedValue }} + {{ info.decorateAssessedValue }}元
超容积率土地补偿费: @@ -86,6 +86,7 @@ export default { getData() { if (this.$route.params.type) { this.$store.dispatch("SET_TYPE", this.$route.params.type); + this.$store.dispatch("SET_FHPGID", this.$route.params.fhpgId); } mgop({ api: "mgop.kykj.houseexpropriat.getHouseEstimateInfoJzlr", @@ -94,8 +95,7 @@ export default { type: "POST", data: { ticket: window.sessionStorage.getItem("ticket"), - id: - "FDE2318D-A545-4C95-9666-D01CE5EA635C" || this.$route.params.fhpgId, + id: "FDE2318D-A545-4C95-9666-D01CE5EA635C" || this.$store.state.id, type: this.$store.state.type }, appKey: "es4b8zmz+2001833218+dehllx", @@ -152,9 +152,6 @@ export default { margin-right: 10px; } } - > span { - // width: 20%; - } } } .el-card {