update:更新页面

This commit is contained in:
2021-09-17 10:47:08 +08:00
parent c67d0c11a7
commit fa1bce7667
7 changed files with 309 additions and 113 deletions

View File

@@ -1,17 +1,24 @@
<template>
<div>
<div :class="type == 'pg' ? 'proTopBoxpg': 'proTopBoxxy'">
<div :class="type == 'pg' ? 'proTopBoxpg' : 'proTopBoxxy'">
<div class="proCenterBox">
<div class="proCenterInfo">
<van-image :src="require('@/assets/img/expropriated_person.png')" class="proCenterImg" />
<van-image
:src="require('@/assets/img/expropriated_person.png')"
class="proCenterImg"
/>
<div>
<div>
<span class="proCenterFont">被征收人姓名</span>
<span class="proCenterFont" style="color:#626262;">{{user.name}}</span>
<span class="proCenterFont" style="color:#626262;">{{
info.userName
}}</span>
</div>
<div>
<span class="proCenterFont">身份证号</span>
<span class="proCenterFont" style="color:#626262;">{{user.identityId}}</span>
<span class="proCenterFont" style="color:#626262;">{{
info.idCard
}}</span>
</div>
</div>
</div>
@@ -27,23 +34,23 @@
:key="item.id"
@click="gotoDetail(item.id)"
class="proListBox shadow"
v-for="(item) in list"
v-for="item in info.prjList"
>
<div class="proAreaBox">
<div class="proArea">{{item.area}}</div>
<div class="proCenterFont" v-if="item.state_cd == 1">· {{item.state}}</div>
<div
class="proCenterFont"
style="color:#179D5C"
v-else-if="item.state_cd == 2"
>· {{item.state}}</div>
<div class="proArea">{{ item.area }}</div>
<div class="proCenterFont" v-if="item.state_cd == 1">
· {{ item.currentState }}
</div>
<div class="proCenterFont" style="color:#179D5C" v-else>
· {{ item.currentState }}
</div>
</div>
<div class="proAreaBox">
<div class="proTitleBox">{{item.title}}</div>
<div class="proTitleBox">{{ item.zsbm }}</div>
</div>
<van-divider style="margin:8px 0;" />
<div class="proDateBox">
<div>{{item.date}}</div>
<div>{{ item.year }}</div>
</div>
</div>
</van-list>
@@ -52,80 +59,77 @@
</template>
<script>
import './project.css';
import { apis } from '@/common/apis';
import "./project.css";
import { mgop } from "@aligov/jssdk-mgop";
export default {
data() {
return {
loading: true,
type: '',
type: "",
data: new Object(),
user: {
name: '胡伯钧',
identityId: '3302041982893743782',
},
list: [
{
id: 11,
area: '镇海区',
title: '郁金花园北块地',
date: '2021-09-08',
state_cd: '1',
state: '协议签订阶段',
},
{
id: 22,
area: '象山县',
title: '象山县人民广场周边区块改造项目',
date: '2021-09-08',
state_cd: '2',
state: '项目已报结',
},
// {
// id: 33,
// area: '全大市',
// title: '宁波市住房和城乡建设委员会开展关于住房的政策',
// date: '2021年09月05日',
// state_cd: '0',
// state: '测试',
// },
],
loading: false,
finished: true,
ticket: '',
// 初始数据
info: {
userName: "无数据",
idCard: "无数据",
prjList: [
{
area: "无数据",
currentState: "无数据",
zsbm: "无数据",
year: "无数据"
}
]
}
};
},
created() {
this.onInit();
this.onLoadData();
},
methods: {
onInit() {
this.onLoadData();
mgop({
api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.params.ticket
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
console.log("首页数据", data);
const { data: res } = data;
this.info = res.data;
},
onFail: err => {
console.log("用户无数据,不展示");
}
});
},
onLoadData() {
// apis.mailDetail({ id: this.$route.query.id }).then(({ result }) => {
// this.loading = false;
// this.data = result;
// });
this.type = this.$route.params.type;
this.ticket = this.$route.params.ticket;
},
gotoDetail(id) {
if (this.type == 'pg') {
if (this.type == "pg") {
// 评估结果页面
this.$router.push({
name: 'reportCompensate',
params: { projectid: id, type: this.type, ticket: this.ticket },
name: "evaluteResult",
params: { projectid: id, type: this.type, ticket: this.ticket }
});
} else if (this.type == 'xy') {
} else if (this.type == "xy") {
// 协议结果页面
this.$router.push({ name: 'reportAgreement', params: { projectid: id, type: this.type, ticket: this.ticket } });
this.$router.push({
name: "reportAgreement",
params: { projectid: id, type: this.type, ticket: this.ticket }
});
}
},
},
}
}
};
</script>
<style>
</style>
<style></style>