Compare commits

...

2 Commits

4 changed files with 38 additions and 14 deletions

View File

@@ -1,4 +1,9 @@
// 设置ticket
export function SetTicket(data) {
window.sessionStorage.setItem("ticket", data);
}
// 设置项目id
export function SetProjectId(data) {
window.sessionStorage.setItem("projectId", data);
}

View File

@@ -99,7 +99,8 @@ export default {
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.params.ticket
ticket:
this.$route.params.ticket || window.sessionStorage.getItem("ticket")
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {

View File

@@ -3,13 +3,11 @@
<div class="image">
<img alt src="@/assets/img/agreement.png" />
</div>
<div class="text">
为您查询到{{ this.info.prjList[0].bcxyList.length }}条结果
</div>
<div class="text">为您查询到{{ prjListLength }}条结果</div>
<div
:key="index"
@click="showPdf(item.url)"
v-for="(item, index) in info.prjList[0].bcxyList"
v-for="(item, index) in prjList.bcxyList"
>
<el-card body-style="padding:10px 10px 0">
<div>
@@ -30,7 +28,7 @@
<div>
<img alt src="@/assets/img/money.png" />
评估总金额
<b style="color: red">{{ info.prjList[0].fhpgList[0].countValue }}</b>
<b style="color: red">{{ item.countValue }}</b>
</div>
<div>
<img alt src="@/assets/img/money.png" />
@@ -43,7 +41,7 @@
<div class="flex">
<div class="flex backgroundColor">
<img alt src="@/assets/img/shijian.png" />
<span>签订日期{{ item.date }}</span>
<span>签订日期{{ item.signTime }}</span>
</div>
</div>
</el-card>
@@ -52,6 +50,7 @@
</template>
<script>
import { mgop } from "@aligov/jssdk-mgop";
import { SetProjectId } from "@/common/util/tools";
export default {
data() {
return {
@@ -70,7 +69,9 @@ export default {
fhpgList: [{ countValue: "无数据", assessmentNo: "无数据" }]
}
]
}
},
prjList: [],
prjListLength: ""
};
},
created() {
@@ -79,13 +80,17 @@ export default {
methods: {
onInit() {
this.type = this.$route.params.type;
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
ticket:
this.$route.params.ticket || window.sessionStorage.getItem("ticket")
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
@@ -93,10 +98,15 @@ export default {
console.log("res", res);
this.info = res;
const prjList = res.prjList.find((item, index) => {
return item.prjId == this.$route.params.prjId;
return (
item.prjId ==
(this.$route.params.prjId ||
window.sessionStorage.getItem("projectId"))
);
});
console.log("协议", prjList);
this.prjList = prjList;
this.prjListLength = prjList.fhpgList.length;
this.prjListLength = prjList.bcxyList.length;
},
onFail: err => {
console.log("用户无数据,不展示");

View File

@@ -49,6 +49,7 @@
</template>
<script>
import { mgop } from "@aligov/jssdk-mgop";
import { SetProjectId } from "@/common/util/tools";
export default {
data() {
return {
@@ -77,22 +78,29 @@ export default {
// 获取数据
onInit() {
this.type = this.$route.params.type;
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
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;
return (
item.prjId ==
(this.$route.params.prjId ||
window.sessionStorage.getItem("projectId"))
);
});
console.log("find", prjList);
this.prjList = prjList;
this.prjListLength = prjList.fhpgList.length;
},