update:pdf底部信息位置调整,评估详情加载提示,首页内容换行问题

This commit is contained in:
2021-09-28 08:55:48 +08:00
parent 6c21c8b36e
commit 413d436897
5 changed files with 561 additions and 294 deletions

View File

@@ -1,78 +1,55 @@
<template> <template>
<div <div
class="page"
v-loading="loading" v-loading="loading"
element-loading-text="拼命加载中" element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
> >
<div class="page">
<div class="topBox"> <div class="topBox">
<div class="titleBox"> <div class="titleBox">
<div class="font">被征收人信息查询</div> 被征收人信息查询
</div>
<div>
<div class="baseInfo">
<van-image
:src="require('@/assets/img/renyuanliebiao.png')"
class="baseImg"
/>
<span class="baseFont">被征收人姓名</span>
<span class="baseFont">{{ data.userName }}</span>
</div> </div>
<div class="baseInfo"> <div class="baseInfo">
<van-image <van-image :src="require('@/assets/img/renyuanliebiao.png')" />
:src="require('@/assets/img/credentials_icon.png')" <span>被征收人姓名</span>
class="baseImg" <span>{{ data.userName }}</span>
/>
<span class="baseFont">身份证号码</span>
<span class="baseFont">{{ setIdCard(data.idCard) }}</span>
</div> </div>
<div class="baseInfo">
<van-image :src="require('@/assets/img/credentials_icon.png')" />
<span>身份证号码</span>
<span>{{ setIdCard(data.idCard) }}</span>
</div> </div>
<!-- 三张背景图 --> <!-- 三张背景图 -->
<div>
<div class="gridBg centerMagin"> <div class="gridBg centerMagin">
<div class="gridImg" style="background:#1897FB;"> <div class="gridImg" style="background:#1897FB;">
<van-image <van-image :src="require('@/assets/img/scan.png')" />
:src="require('@/assets/img/scan.png')" <span class="baseFont">扫一扫</span>
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">扫一扫</span>
</div> </div>
<div <div
@click="gotoProject('pg')" @click="gotoProject('pg')"
class="gridImg" class="gridImg"
style="background:#F1AE4B;" style="background:#F1AE4B;"
> >
<van-image <van-image :src="require('@/assets/img/evaluation.png')" />
:src="require('@/assets/img/evaluation.png')" <span class="baseFont">查评估结果</span>
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">查评估结果</span>
</div> </div>
<div <div
@click="gotoProject('xy')" @click="gotoProject('xy')"
class="gridImg" class="gridImg"
style="background:#16D7ED;" style="background:#16D7ED;"
> >
<van-image <van-image :src="require('@/assets/img/compensation.png')" />
:src="require('@/assets/img/compensation.png')" <span class="baseFont">查补偿协议</span>
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">查补偿协议</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<!-- 大背景图 -->
<div class="centerMagin"> <div class="centerMagin">
<van-image <van-image :src="require('@/assets/img/government.png')" class="bigImg" />
:src="require('@/assets/img/government.png')"
class="bigImg"
/>
</div> </div>
<!-- 项目内容 --> <!-- 项目内容 -->
<van-list> <van-list>
<div :key="item.prjId" v-for="item in data.prjList"> <div :key="item.prjId" v-for="item in data.prjList">
<div class="centerMagin">
<!-- 图标所在行 -->
<div class="project"> <div class="project">
<!-- window图标 --> <!-- window图标 -->
<div> <div>
@@ -93,8 +70,6 @@
<span class="projectRightFont">{{ item.currentState }}</span> <span class="projectRightFont">{{ item.currentState }}</span>
</div> </div>
</div> </div>
</div>
<!-- 所有内容 -->
<div class="projectCenter centerMagin"> <div class="projectCenter centerMagin">
<!-- 项目内容 --> <!-- 项目内容 -->
<div class="projectCenterBox"> <div class="projectCenterBox">
@@ -294,11 +269,9 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import "./home.css";
import { apis } from "@/common/apis"; import { apis } from "@/common/apis";
import { mgop } from "@aligov/jssdk-mgop"; import { mgop } from "@aligov/jssdk-mgop";
import { SetTicket } from "@/common/util//tools"; import { SetTicket } from "@/common/util//tools";
@@ -306,7 +279,7 @@ export default {
name: "home", name: "home",
data() { data() {
return { return {
loading: true, loading: false,
data: { data: {
idCard: "加载中...", idCard: "加载中...",
userName: "加载中...", userName: "加载中...",
@@ -343,26 +316,28 @@ export default {
] ]
} }
] ]
}, }
ticket: "8a1189367c22b456017c25bb119c2039-ticket"
}; };
}, },
created() { created() {
this.onInit(); this.onInit();
console.log("this", this); console.log("this", this);
this.setLocationAplus(); this.setLocationAplus();
SetTicket(this.$route.query.ticket || this.ticket); SetTicket(this.$route.query.ticket);
}, },
methods: { methods: {
// 获取数据 // 获取数据
onInit() { onInit() {
if (!this.$route.query.ticket == "") {
this.loading = true;
}
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON", dataType: "JSON",
type: "POST", type: "POST",
data: { data: {
ticket: this.$route.query.ticket || this.ticket ticket: this.$route.query.ticket
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
@@ -390,7 +365,7 @@ export default {
setIdCard(id) { setIdCard(id) {
return id == "加载中..." return id == "加载中..."
? id ? id
: id.substr(0, 6) + "XXXXXXXX" + id.substr(14, 4); : id.substr(0, 6) + "********" + id.substr(14, 4);
}, },
// 跳转项目详情 // 跳转项目详情
gotoProject(type) { gotoProject(type) {
@@ -491,3 +466,305 @@ export default {
} }
}; };
</script> </script>
<style lang="less" scoped>
.page {
border-radius: 6px;
background: #f2fbfd;
}
.topBox {
overflow: hidden;
width: 100%;
height: 225px;
background: url(../assets/img/bg.png);
background-size: 100% 225px;
.titleBox {
display: flex;
align-items: center;
justify-content: center;
width: 173px;
height: 36px;
margin: 15px 0 15px 0;
border-radius: 0 22px 22px 0;
background: rgba(6, 63, 142, 0.66);
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 16px;
font-weight: 600;
color: #fff;
}
}
.baseInfo {
display: flex;
.van-image {
width: 22px;
height: 21px;
padding-right: 10px;
padding-left: 31px;
}
span {
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
line-height: 20px;
height: 20px;
color: #fff;
}
}
.baseFont {
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
line-height: 20px;
height: 20px;
color: #fff;
}
.centerMagin {
margin-top: 10px;
margin-right: 12px;
margin-left: 10px;
}
.gridBg {
display: flex;
overflow: hidden;
align-items: center;
justify-content: space-around;
height: 120px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.28);
}
.gridImg {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
width: 90px;
height: 80px;
margin: 12px 6px;
padding-top: 5px;
border-radius: 10px;
.van-image {
width: 38px;
height: 35px;
}
span {
padding-top: 5px;
}
}
.bigImg {
width: 100%;
}
.project {
display: flex;
align-items: center;
justify-content: space-between;
height: 41px;
margin-top: 10px;
margin-right: 12px;
margin-left: 10px;
padding-right: 0;
padding-left: 0;
background: url(../assets/img/project_bg.png);
background-size: 100% 41px;
}
.project > div:nth-child(1) {
display: flex;
align-items: center;
width: 50%;
height: 100%;
span {
white-space: nowrap;
overflow: hidden;
}
}
.projectIcon {
display: flex;
align-items: center;
justify-content: center;
width: 50px;
height: 100%;
margin-right: 10px;
border-radius: 5px 0 0;
background: #3284cd;
}
/* 项目名字 */
.projectTitle {
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 16px;
font-weight: 600;
line-height: 20px;
height: 20px;
vertical-align: middle;
color: #fff;
}
.projectRight {
display: flex;
align-items: center;
height: 27px;
opacity: 0.82;
border-radius: 13px 0 0 17px;
background: #24bca3;
}
/* 项目名字旁边小字 */
.projectRightFont {
font-family: PingFangSC-Semibold, PingFang SC;
font-size: 12px;
line-height: 14px;
padding-right: 5px;
color: #fff;
}
.projectRightIcon {
width: 17px;
height: 17px;
margin-right: 3px;
margin-left: 8px;
}
.projectCenter {
/* height: 440px; */
padding-bottom: 35px;
background: #fff;
box-shadow: 0 2px 6px 1px rgba(212, 212, 212, 0.5);
}
.projectCenterBox {
padding: 8px 0;
}
.projectCenterInfo {
display: flex;
align-items: center;
padding-top: 5px;
width: 100%;
}
/* 项目内容小图标 */
.projectCenterImg {
width: 15px;
height: 15px;
padding: 0 10px;
}
/* 项目内容文字 */
.projectCenterFont {
font-family: PingFangSC-Regular, PingFang SC;
font-size: 14px;
font-weight: 400;
line-height: 20px;
/* height: 12px; */
color: #2c2b2b;
}
.assess {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 25px;
padding-right: 0;
padding-left: 0;
}
.assessIcon {
width: 24px;
height: 24px;
margin-right: 10px;
vertical-align: middle;
background: #2468f2;
}
/* 分户,协议标题 */
.assessTitle {
font-family: PingFangSC-Regular, PingFang SC;
font-size: 16px;
font-weight: 400;
line-height: 20px;
height: 20px;
color: #2468f2;
}
.assessRightIcon {
width: 24px;
height: 24px;
background: #2468f2;
}
.assessBox {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 12px;
}
.assessBox > span:nth-child(1) {
white-space: nowrap;
}
.assessCenter1 {
margin: 15px 10px;
border-left: 2px solid #24bca3;
}
.assessCenter2 {
margin: 15px 10px;
border-left: 2px solid #ff5959;
}
.protocolTitle {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 政策的发布时间和区域 */
.font11 {
font-family: PingFangSC-Regular, PingFang SC;
font-size: 12px;
font-weight: 400;
line-height: 11px;
height: 11px;
color: #9da2a3;
}
.protocolBox {
border-radius: 4px;
background: #fff;
box-shadow: 0 2px 5px 0 rgba(168, 168, 168, 0.5);
}
/* .font14 {
font-family: PingFangSC-Regular, PingFang SC;
font-size: 14px;
font-weight: 400;
line-height: 20px;
height: 20px;
color: #202020;
} */
.protocolList {
padding: 20px 21px 0 20px;
}
.protocolLine {
padding-bottom: 10px;
border-bottom: 1px dashed rgba(168, 168, 168, 0.5);
}
</style>

View File

@@ -23,9 +23,7 @@
</template> </template>
<script> <script>
// import pdf from "vue-pdf";
import { mgop } from "@aligov/jssdk-mgop"; import { mgop } from "@aligov/jssdk-mgop";
import $ from "jquery";
export default { export default {
components: {}, components: {},
data() { data() {
@@ -40,18 +38,7 @@ export default {
created() { created() {
this.onInit(); this.onInit();
}, },
mounted() { mounted() {},
if (
650 >=
$(".container")
.css("height")
.substr(0, 5)
) {
$(".bottomContent").addClass("absolute");
} else {
$(".absolute").removeClass("absolute");
}
},
methods: { methods: {
onInit() { onInit() {
if (this.$route.params.id) { if (this.$route.params.id) {
@@ -144,6 +131,7 @@ export default {
bottom: 0px; bottom: 0px;
} }
.bottomContent { .bottomContent {
margin-top: 20px;
margin-bottom: 10px; margin-bottom: 10px;
text-align: center; text-align: center;
width: 100%; width: 100%;

View File

@@ -146,7 +146,7 @@ export default {
setIdCard(id) { setIdCard(id) {
return id == "无数据" return id == "无数据"
? id ? id
: id.substr(0, 6) + "XXXXXXXX" + id.substr(14, 4); : id.substr(0, 6) + "********" + id.substr(14, 4);
}, },
// 页面跳转 // 页面跳转
gotoDetail(id) { gotoDetail(id) {

View File

@@ -88,8 +88,7 @@ export default {
}, },
created() { created() {
this.onInit(); this.onInit();
}, this.$nextTick(() => {
mounted() {
if ( if (
650 >= 650 >=
$(".container") $(".container")
@@ -100,7 +99,9 @@ export default {
} else { } else {
$(".absolute").removeClass("absolute"); $(".absolute").removeClass("absolute");
} }
});
}, },
mounted() {},
methods: { methods: {
onInit() { onInit() {
if (!window.sessionStorage.getItem("projectId")) { if (!window.sessionStorage.getItem("projectId")) {

View File

@@ -74,6 +74,7 @@ import $ from "jquery";
export default { export default {
data() { data() {
return { return {
loading: true,
info: { info: {
houseAddress: "地址", houseAddress: "地址",
valuationMethodText: "价值录入", valuationMethodText: "价值录入",
@@ -125,9 +126,9 @@ export default {
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
this.$store.dispatch("GET_DATA", data);
console.log("分户评估", data); console.log("分户评估", data);
if (data.data.success) { if (data.data.success) {
this.loading = false;
const { data: res } = data.data; const { data: res } = data.data;
this.info = res; this.info = res;
} else { } else {