Compare commits

...

2 Commits

Author SHA1 Message Date
31ff426acf Merge branch 'master' of http://118.178.224.202:3000/ewide/zsxt_nbzs_h5 2021-09-18 16:53:55 +08:00
3f1c64f9d4 更新后退bug问题 2021-09-18 16:51:37 +08:00
12 changed files with 332 additions and 132 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

View File

@@ -7,12 +7,18 @@
</div>
<div>
<div class="baseInfo">
<van-image :src="require('@/assets/img/renyuanliebiao.png')" class="baseImg" />
<van-image
:src="require('@/assets/img/renyuanliebiao.png')"
class="baseImg"
/>
<span class="baseFont">被征收人姓名</span>
<span class="baseFont">{{ data.userName }}</span>
</div>
<div class="baseInfo">
<van-image :src="require('@/assets/img/credentials_icon.png')" class="baseImg" />
<van-image
:src="require('@/assets/img/credentials_icon.png')"
class="baseImg"
/>
<span class="baseFont">身份证号码</span>
<span class="baseFont">{{ data.idCard }}</span>
</div>
@@ -21,22 +27,42 @@
<div>
<div class="gridBg centerMagin">
<div class="gridImg" style="background:#1897FB;">
<van-image :src="require('@/assets/img/scan.png')" class="gridImgBg" />
<van-image
:src="require('@/assets/img/scan.png')"
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">扫一扫</span>
</div>
<div @click="gotoProject('pg')" class="gridImg" style="background:#F1AE4B;">
<van-image :src="require('@/assets/img/evaluation.png')" class="gridImgBg" />
<div
@click="gotoProject('pg')"
class="gridImg"
style="background:#F1AE4B;"
>
<van-image
:src="require('@/assets/img/evaluation.png')"
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">查评估结果</span>
</div>
<div @click="gotoProject('xy')" class="gridImg" style="background:#16D7ED;">
<van-image :src="require('@/assets/img/compensation.png')" class="gridImgBg" />
<div
@click="gotoProject('xy')"
class="gridImg"
style="background:#16D7ED;"
>
<van-image
:src="require('@/assets/img/compensation.png')"
class="gridImgBg"
/>
<span class="baseFont" style="padding-top: 5px;">查补偿协议</span>
</div>
</div>
</div>
</div>
<div class="centerMagin">
<van-image :src="require('@/assets/img/government.png')" class="bigImg" />
<van-image
:src="require('@/assets/img/government.png')"
class="bigImg"
/>
</div>
<!-- 项目内容 -->
<van-list>
@@ -56,7 +82,10 @@
</div>
<!-- 补偿协议图标 -->
<div class="projectRight">
<van-image :src="require('@/assets/img/menu_yhxy.png')" class="projectRightIcon" />
<van-image
:src="require('@/assets/img/menu_yhxy.png')"
class="projectRightIcon"
/>
<span class="projectRightFont">{{ item.currentState }}</span>
</div>
</div>
@@ -103,9 +132,7 @@
/>
<span class="projectCenterFont">征收决定号</span>
<span class="projectCenterFont" style="color: #3883f1">
{{
item.zsjdh
}}
{{ item.zsjdh }}
</span>
</div>
</div>
@@ -114,7 +141,10 @@
<!-- 分户评估结果部分 -->
<div class="assess">
<div>
<van-image :src="require('@/assets/img/assess_1.png')" class="assessIcon" />
<van-image
:src="require('@/assets/img/assess_1.png')"
class="assessIcon"
/>
<span class="assessTitle">分户评估结果</span>
</div>
</div>
@@ -128,26 +158,33 @@
>
<div class="assessBox">
<span class="projectCenterFont">评估报告编号</span>
<span class="projectCenterFont">{{ assess.assessmentNo }}</span>
<span class="projectCenterFont">{{
assess.assessmentNo
}}</span>
</div>
<div class="assessBox">
<span class="projectCenterFont" style="width: 40%">被征收房屋地址</span>
<span class="projectCenterFont" style="width: 40%"
>被征收房屋地址</span
>
<span class="projectCenterFont protocolTitle">
{{
assess.houseAddress
}}
{{ assess.houseAddress }}
</span>
</div>
<div class="assessBox">
<span class="projectCenterFont">评估总金额</span>
<span class="projectTitle" style="color: red">¥{{ assess.countValue }}</span>
<span class="projectTitle" style="color: red"
>¥{{ assess.countValue }}</span
>
</div>
</div>
</van-list>
<!-- 补偿协议部分 -->
<div class="assess">
<div>
<van-image :src="require('@/assets/img/assess_2.png')" class="assessIcon" />
<van-image
:src="require('@/assets/img/assess_2.png')"
class="assessIcon"
/>
<span class="assessTitle">补偿协议</span>
</div>
<!-- <div>
@@ -167,27 +204,24 @@
<span class="projectCenterFont">{{ protocol.xyNo }}</span>
</div>
<div class="assessBox">
<span class="projectCenterFont" style="width: 40%">被征收房屋地址</span>
<span class="projectCenterFont" style="width: 40%"
>被征收房屋地址</span
>
<span class="projectCenterFont protocolTitle">
{{
protocol.houseAddress
}}
{{ protocol.houseAddress }}
</span>
</div>
<div class="assessBox">
<span class="projectCenterFont">补偿方式</span>
<span class="projectCenterFont">
{{
protocol.switchProductionWay
}}
{{ protocol.switchProductionWay }}
</span>
</div>
<div class="assessBox">
<span class="projectCenterFont">合计补偿资金</span>
<span
class="projectTitle"
style="color: red"
>¥{{ protocol.summationShouldCompensateMoney }}</span>
<span class="projectTitle" style="color: red"
>¥{{ protocol.summationShouldCompensateMoney }}</span
>
</div>
</div>
</van-list>
@@ -197,16 +231,18 @@
</van-list>
<!-- 征收政策背景图 -->
<div class="centerMagin">
<van-image :src="require('@/assets/img/expropriationPolicy.png')" class="bigImg" />
<van-image
:src="require('@/assets/img/expropriationPolicy.png')"
class="bigImg"
/>
</div>
<!-- 征收政策部分 -->
<div class="centerMagin">
<span class="projectTitle" style="color: #202020">征收政策</span>
<div class="assessBox" style="padding-left: 5px; padding-right: 5px">
<span
class="font11"
style="color: #2c2b2b"
>{{ data.policiesRegulationsLists.totalCount }}</span>
<span class="font11" style="color: #2c2b2b"
>{{ data.policiesRegulationsLists.totalCount }}</span
>
</div>
</div>
<div class="centerMagin" style="padding-bottom: 20px">
@@ -220,9 +256,15 @@
v-for="(item, i) in data.policiesRegulationsLists.list"
>
<!-- 非最后一行 -->
<div class="protocolLine" v-if="i != data.policiesRegulationsLists.list.length - 1">
<div
class="protocolLine"
v-if="i != data.policiesRegulationsLists.list.length - 1"
>
<div class="font14 protocolTitle">{{ item.title }}</div>
<div class="assessBox" style="padding-left: 5px; padding-right: 5px">
<div
class="assessBox"
style="padding-left: 5px; padding-right: 5px"
>
<div>
<span class="font11">发布时间</span>
<span class="font11">{{ item.publicTime }}</span>
@@ -236,7 +278,10 @@
<!-- 最后一行 -->
<div style="padding-bottom: 10px" v-else>
<div class="font14 protocolTitle">{{ item.title }}</div>
<div class="assessBox" style="padding-left: 5px; padding-right: 5px">
<div
class="assessBox"
style="padding-left: 5px; padding-right: 5px"
>
<div>
<span class="font11">发布时间</span>
<span class="font11">{{ item.publicTime }}</span>
@@ -256,27 +301,27 @@
</template>
<script>
import './home.css';
import { apis } from '@/common/apis';
import { mgop } from '@aligov/jssdk-mgop';
import { SetTicket } from '@/common/util//tools';
import "./home.css";
import { apis } from "@/common/apis";
import { mgop } from "@aligov/jssdk-mgop";
import { SetTicket } from "@/common/util//tools";
export default {
name: 'home',
name: "home",
data() {
return {
data: {
idCard: '加载中...',
userName: '加载中...',
idCard: "加载中...",
userName: "加载中...",
policiesRegulationsLists: {
totalCount: 0,
},
totalCount: 0
}
},
ticket: '8a1189377bdad67c017bf66039d76376-ticket',
ticket: "8a11885a7bda783f017bf73e5e095219-ticket"
};
},
async created() {
this.onInit();
console.log('this', this);
console.log("this", this);
this.setLocationAplus();
SetTicket(this.$route.query.ticket || this.ticket);
},
@@ -284,16 +329,16 @@ export default {
// 获取数据
onInit() {
mgop({
api: 'mgop.kykj.houseexpropriat.getprjlist',
host: 'https://mapi.zjzwfw.gov.cn/',
dataType: 'JSON',
type: 'POST',
api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON",
type: "POST",
data: {
ticket: this.$route.query.ticket || this.ticket,
ticket: this.$route.query.ticket || this.ticket
},
appKey: 'es4b8zmz+2001833218+dehllx',
onSuccess: (data) => {
console.log('首页数据', data);
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
console.log("首页数据", data);
if (data.data && data.data.success == true) {
this.data = data.data.data;
// 埋点
@@ -303,25 +348,25 @@ export default {
// 跳转到政务系统;
if (errorCodes.indexOf(data.data.bizCode) > -1) {
window.location.replace(
'https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs'
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
);
} else console.log('用户无数据,不展示');
} else console.log("用户无数据,不展示");
}
},
onFail: (err) => {
console.log('用户无数据,不展示');
},
onFail: err => {
console.log("用户无数据,不展示");
}
});
},
// 跳转项目详情
gotoProject(type, id) {
this.$router.push({
name: 'projectSelect',
name: "projectSelect",
params: {
type: type,
ticket: this.$route.query.ticket || this.ticket,
prjId: id || this.data.prjList[0].prjId,
},
prjId: id || this.data.prjList[0].prjId
}
});
},
// 加载项目数统计信息
@@ -333,68 +378,68 @@ export default {
// 政策信息页面跳转
pageJump(id) {
this.$router.push({
name: 'policyInfo',
params: { ticket: this.ticket, id: id },
name: "policyInfo",
params: { ticket: this.ticket, id: id }
});
},
setZwUserAplus(Userid, userName) {
// 设置用户信息埋点
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'BLOCK'],
action: "aplus.setMetaInfo",
arguments: ["_hold", "BLOCK"]
});
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_user_nick', userName], // this.userInfoData.username],
action: "aplus.setMetaInfo",
arguments: ["_user_nick", userName] // this.userInfoData.username],
});
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_user_id', Userid],
action: "aplus.setMetaInfo",
arguments: ["_user_id", Userid]
});
aplus_queue.push({
action: 'aplus.setMetaInfo',
arguments: ['_hold', 'START'],
action: "aplus.setMetaInfo",
arguments: ["_hold", "START"]
});
},
setLocationAplus() {
ZWJSBridge.onReady(() => {
console.log('初始化完成后执行bridge方法');
console.log("初始化完成后执行bridge方法");
ZWJSBridge.getUserType()
.then((result1) => {
console.log('getUserType():' + JSON.stringify(result1));
console.log('result1.userType:' + result1.userType);
.then(result1 => {
console.log("getUserType():" + JSON.stringify(result1));
console.log("result1.userType:" + result1.userType);
//经纬度
ZWJSBridge.getLocation()
.then((result2) => {
console.log('getLocation():' + JSON.stringify(result2));
console.log('result2.longitude:' + result2.longitude);
console.log('result2.latitude:' + result2.latitude);
.then(result2 => {
console.log("getLocation():" + JSON.stringify(result2));
console.log("result2.longitude:" + result2.longitude);
console.log("result2.latitude:" + result2.latitude);
aplus_queue.push({
action: 'aplus.sendPV',
action: "aplus.sendPV",
arguments: [
{
is_auto: false,
is_auto: false
},
{
isMini: true,
miniAppId: '2001833218', //'应用开发管理平台-应用 ID
miniAppName: '房屋征收',
miniAppId: "2001833218", //'应用开发管理平台-应用 ID
miniAppName: "房屋征收",
long: result2.longitude,
lati: result2.latitude,
userType: result1.userType,
},
],
userType: result1.userType
}
]
});
})
.catch((error) => {
.catch(error => {
console.log(error);
});
})
.catch((error) => {
.catch(error => {
console.log(error);
});
});
},
},
}
}
};
</script>

View File

@@ -0,0 +1,137 @@
<template>
<div>
<div ref="content" class="content">
<!-- <pdf :src="url" class="PDF"></pdf> -->
</div>
<div class="bottom">
<a href="" download="">
<el-button type="primary">保存到相册</el-button>
</a>
</div>
<iframe
src="https://zsxt.nbzs.org.cn/Files/UploadFiles/e85a13ef-431c-46a5-85cd-9dd1b4f50fc6/80616f98-da17-49bc-92d0-b87199963787.pdf"
frameborder="0"
></iframe>
<!-- <el-button type="primary" @click="this.savePdf()">测试2</el-button>
<el-button type="primary" @click="this.handlePrint()">测试3</el-button>
<el-button type="primary" @click="testdownload4()">测试4</el-button>
<div id="nav">222</div> -->
</div>
</template>
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
<script>
import pdf from "vue-pdf";
import $ from "jquery";
import html2canvas from "html2canvas";
// import axios from "axios";
import request from "@/common/util";
import { mgop } from "@aligov/jssdk-mgop";
export default {
components: {
pdf
},
data() {
return {
url: ""
};
},
created() {
this.onInit();
},
mounted() {
// 截图
// html2canvas(this.$refs.PDF).then(canvas => {
// canvas.id = "mycanvas";
// const base64 = canvas.toDataURL("image/png");
// jquery("a").prop("href", base64);
// });
},
methods: {
onInit() {
this.onLoadData();
request({
url: "http://10.19.94.9:7099/api/agreement/info",
method: "post",
data: {
ticket: window.sessionStorage.getItem("ticket"),
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C"
},
headers: { "Content-Type": "application/json; charset=UTF-8" },
responseType: "arraybuffer" //一定要设置响应类型否则页面会是空白pdf
}).then(result => {
console.log("请求成功了", result);
const binaryData = [];
binaryData.push(result.data);
//获取blob链接
this.url = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" })
);
$("a").prop("href", this.url);
// if (pdfUrl) {
// this.handlePrint(pdfUrl);
// }
});
},
handlePrint() {
if (document.getElementById("print-iframe")) {
document.body.removeChild(document.getElementById("print-iframe"));
}
//判断iframe是否存在不存在则创建iframe
let iframe = document.getElementById("print-iframe");
if (!iframe) {
iframe = document.createElement("IFRAME");
let doc = null;
iframe.setAttribute("src", this.url);
iframe.setAttribute("id", "print-iframe");
document.body.appendChild(iframe);
doc = iframe.contentWindow.document;
doc.close();
iframe.contentWindow.focus();
}
iframe.contentWindow.print();
},
savePdf() {
ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法-savePdf");
ZWJSBridge.saveImage({
url: this.url
})
.then(result => {
console.log("saveImage()成功:" + JSON.stringify(result));
})
.catch(error => {
console.log("saveImage()失败:" + JSON.stringify(result));
console.log(error);
});
});
},
testdownload4() {
ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法-testdownload4");
ZWJSBridge.openLink({
url: this.url
})
.then(result => {
console.log("testdownload4():" + result);
})
.catch(error => {
console.log(error);
});
});
}
}
};
</script>
<style lang="less" scoped>
.content {
text-align: center;
line-height: 200px;
font-size: 30px;
margin-bottom: 20px;
}
.bottom {
text-align: center;
margin-bottom: 20px;
}
</style>

View File

@@ -8,9 +8,10 @@
<el-button type="primary">保存到相册</el-button>
</a>
</div>
<el-button type="primary" @click="this.savePdf()">测试2</el-button>
<iframe :src="url" frameborder="0"></iframe>
<!-- <el-button type="primary" @click="this.savePdf()">测试2</el-button>
<el-button type="primary" @click="this.handlePrint()">测试3</el-button>
<el-button type="primary" @click="testdownload4()">测试4</el-button>
<el-button type="primary" @click="testdownload4()">测试4</el-button> -->
</div>
</template>
@@ -24,44 +25,47 @@ import request from "@/common/util";
import { mgop } from "@aligov/jssdk-mgop";
export default {
components: {
pdf,
pdf
},
data() {
return {
url: "",
url:
"https://zsxt.nbzs.org.cn/Files/UploadFiles/e85a13ef-431c-46a5-85cd-9dd1b4f50fc6/80616f98-da17-49bc-92d0-b87199963787.pdf"
};
},
created() {
this.onInit();
console.log("pdf");
},
mounted() {
// 截图
html2canvas(this.$refs.PDF).then((canvas) => {
canvas.id = "mycanvas";
const base64 = canvas.toDataURL("image/png");
jquery("a").prop("href", base64);
});
// html2canvas(this.$refs.PDF).then(canvas => {
// canvas.id = "mycanvas";
// const base64 = canvas.toDataURL("image/png");
// jquery("a").prop("href", base64);
// });
},
methods: {
onInit() {
this.onLoadData();
// this.onLoadData();
request({
url: "http://10.19.94.9:7099/api/agreement/info",
method: "post",
data: {
ticket: window.sessionStorage.getItem("ticket"),
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C",
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C"
},
headers: { "Content-Type": "application/json; charset=UTF-8" },
responseType: "arraybuffer", //一定要设置响应类型否则页面会是空白pdf
}).then((result) => {
responseType: "blob" //一定要设置响应类型否则页面会是空白pdf
}).then(result => {
console.log("结果", result);
const binaryData = [];
binaryData.push(result.data);
//获取blob链接
this.url = window.URL.createObjectURL(
const gan = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" })
);
this.url = this.getObjectURL(result.data);
console.log("aaa", this.url);
$("a").prop("href", this.url);
// if (pdfUrl) {
// this.handlePrint(pdfUrl);
@@ -73,31 +77,34 @@ export default {
dataType: "JSON",
type: "POST",
data: {
ticket: "8a1189377bdad67c017bf66039d76376-ticket",
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C",
ticket: window.sessionStorage.getItem("ticket"),
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C"
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: (result) => {
onSuccess: result => {
console.log("pdf.vue页面请求pdf文件:", result);
if (result.data && result.data.success == true) {
console.log("result.data.data:", result.data.data);
this.url = result.data.data;
// const binaryData = [];
// binaryData.push(result.data);
// //获取blob链接
// this.url = window.URL.createObjectURL(
// new Blob(binaryData, { type: "application/pdf" })
// );
// this.url = result.data.data;
const binaryData = [];
binaryData.push(result.data.data);
//获取blob链接
const gan = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" })
);
this.url = this.getObjectURL(gan);
console.log("aaa", this.url);
// if (pdfUrl) {
// this.handlePrint(pdfUrl);
// }
}
},
onFail: (err) => {
onFail: err => {
console.log("用户无数据,不展示");
},
}
});
},
handlePrint() {
if (document.getElementById("print-iframe")) {
document.body.removeChild(document.getElementById("print-iframe"));
@@ -124,12 +131,12 @@ export default {
ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法-savePdf");
ZWJSBridge.saveImage({
url: this.url,
url: this.url
})
.then((result) => {
.then(result => {
console.log("saveImage()成功:" + JSON.stringify(result));
})
.catch((error) => {
.catch(error => {
console.log("saveImage()失败:" + JSON.stringify(result));
console.log(error);
});
@@ -139,17 +146,17 @@ export default {
ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法-testdownload4");
ZWJSBridge.openLink({
url: this.url,
url: this.url
})
.then((result) => {
.then(result => {
console.log("testdownload4():" + result);
})
.catch((error) => {
.catch(error => {
console.log(error);
});
});
},
},
}
}
};
</script>
<style lang="less" scoped>
@@ -158,6 +165,7 @@ export default {
line-height: 200px;
font-size: 30px;
margin-bottom: 20px;
height: 200px;
}
.bottom {
text-align: center;

View File

@@ -93,6 +93,9 @@ export default {
// 获取数据
onInit() {
this.type = this.$route.params.type;
if (this.$route.params.type) {
window.sessionStorage.setItem("type", this.$route.params.type);
}
this.ticket = this.$route.params.ticket;
mgop({
api: "mgop.kykj.houseexpropriat.getprjlist",
@@ -115,7 +118,8 @@ export default {
},
// 页面跳转
gotoDetail(id) {
if (this.type == "pg") {
console.log("跳转了");
if (window.sessionStorage.getItem("type") == "pg") {
// 评估结果页面
this.$router.push({
name: "evaluteResult",
@@ -124,7 +128,7 @@ export default {
ticket: this.$route.params.ticket
}
});
} else if (this.type == "xy") {
} else if (window.sessionStorage.getItem("type") == "xy") {
// 协议结果页面
this.$router.push({
name: "reportAgreement",

View File

@@ -147,19 +147,25 @@ export default {
margin: 14px 0;
display: flex;
align-items: center;
height: 20px;
b {
font-size: 14px;
}
img {
margin-right: 6px;
height: 100%;
}
}
.flex {
display: flex;
align-items: center;
justify-content: center;
> div {
height: 100%;
}
img {
margin-right: 10px;
height: 100%;
}
}
.line {