update:更新

This commit is contained in:
2021-09-17 16:37:07 +08:00
parent 82dde0078d
commit a2c54cfcaf
5 changed files with 103 additions and 240 deletions

View File

@@ -53,7 +53,9 @@
<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="centerMagin">
<!-- 图标所在行 -->
<div class="project"> <div class="project">
<!-- window图标 -->
<div> <div>
<van-image <van-image
:src="require('@/assets/img/project.png')" :src="require('@/assets/img/project.png')"
@@ -61,6 +63,7 @@
/> />
<span class="projectTitle">{{ item.name }}</span> <span class="projectTitle">{{ item.name }}</span>
</div> </div>
<!-- 补偿协议图标 -->
<div class="projectRight"> <div class="projectRight">
<van-image <van-image
:src="require('@/assets/img/menu_yhxy.png')" :src="require('@/assets/img/menu_yhxy.png')"
@@ -70,8 +73,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 所有内容 -->
<div class="projectCenter centerMagin"> <div class="projectCenter centerMagin">
<!-- 曙光一村内容 --> <!-- 项目内容 -->
<div class="projectCenterBox"> <div class="projectCenterBox">
<div class="projectCenterInfo"> <div class="projectCenterInfo">
<div class="projectCenterInfo"> <div class="projectCenterInfo">
@@ -126,15 +130,14 @@
/> />
<span class="assessTitle">分户评估结果</span> <span class="assessTitle">分户评估结果</span>
</div> </div>
<!-- <div>
<van-image :src="require('@/assets/img/skip.png')" class="assessRightIcon" round />
</div>-->
</div> </div>
<!-- 分户评估遍历内容 -->
<van-list> <van-list>
<div <div
:key="assess.id" :key="assess.id"
class="assessCenter1" class="assessCenter1"
v-for="assess in item.fhpgList" v-for="assess in item.fhpgList"
@click="gotoProject('pg', item.prjId)"
> >
<div class="assessBox"> <div class="assessBox">
<span class="projectCenterFont">评估报告编号</span> <span class="projectCenterFont">评估报告编号</span>
@@ -171,6 +174,7 @@
<van-image :src="require('@/assets/img/skip.png')" class="assessRightIcon" round /> <van-image :src="require('@/assets/img/skip.png')" class="assessRightIcon" round />
</div>--> </div>-->
</div> </div>
<!-- 补偿协议遍历内容 -->
<van-list> <van-list>
<div <div
:key="protocol.id" :key="protocol.id"
@@ -225,6 +229,7 @@
</div> </div>
<div class="centerMagin" style="padding-bottom: 20px"> <div class="centerMagin" style="padding-bottom: 20px">
<div class="protocolBox"> <div class="protocolBox">
<!-- 遍历内容 -->
<van-list> <van-list>
<div <div
:key="item.id" :key="item.id"
@@ -289,9 +294,10 @@ export default {
idCard: "加载中...", idCard: "加载中...",
userName: "加载中...", userName: "加载中...",
policiesRegulationsLists: { policiesRegulationsLists: {
totalCount: 0, totalCount: 0
}, }
}, },
ticket: "8a1188557bda7894017bf257a07e7ccb-ticket"
}; };
}, },
async created() { async created() {
@@ -308,11 +314,12 @@ export default {
dataType: "JSON", dataType: "JSON",
type: "POST", type: "POST",
data: { data: {
ticket: this.$route.query.ticket, ticket: this.$route.query.ticket
//ticket: "8a118a427bda7bed017bed084ec10622-ticket" ? this.$route.query.ticket
: this.ticket
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: (data) => { onSuccess: data => {
console.log("首页数据", data); console.log("首页数据", data);
if (data.data && data.data.success == true) { if (data.data && data.data.success == true) {
this.data = data.data.data; this.data = data.data.data;
@@ -328,16 +335,22 @@ export default {
} else console.log("用户无数据,不展示"); } else console.log("用户无数据,不展示");
} }
}, },
onFail: (err) => { onFail: err => {
console.log("用户无数据,不展示"); console.log("用户无数据,不展示");
}, }
}); });
}, },
// 跳转项目详情 // 跳转项目详情
gotoProject(type) { gotoProject(type, id) {
this.$router.push({ this.$router.push({
name: "projectSelect", name: "projectSelect",
params: { type: type, ticket: this.$route.query.ticket }, params: {
type: type,
ticket: this.$route.params.ticket
? this.$route.params.ticket
: this.ticket,
prjId: id ? id : this.data.prjList[0].prjId
}
}); });
}, },
// 加载项目数统计信息 // 加载项目数统计信息
@@ -357,37 +370,37 @@ export default {
// 设置用户信息埋点 // 设置用户信息埋点
aplus_queue.push({ aplus_queue.push({
action: "aplus.setMetaInfo", action: "aplus.setMetaInfo",
arguments: ["_hold", "BLOCK"], arguments: ["_hold", "BLOCK"]
}); });
aplus_queue.push({ aplus_queue.push({
action: "aplus.setMetaInfo", action: "aplus.setMetaInfo",
arguments: ["_user_nick", userName], // this.userInfoData.username], arguments: ["_user_nick", userName] // this.userInfoData.username],
}); });
aplus_queue.push({ aplus_queue.push({
action: "aplus.setMetaInfo", action: "aplus.setMetaInfo",
arguments: ["_user_id", Userid], arguments: ["_user_id", Userid]
}); });
aplus_queue.push({ aplus_queue.push({
action: "aplus.setMetaInfo", action: "aplus.setMetaInfo",
arguments: ["_hold", "START"], arguments: ["_hold", "START"]
}); });
}, },
setLocationAplus() { setLocationAplus() {
ZWJSBridge.onReady(() => { ZWJSBridge.onReady(() => {
console.log("初始化完成后执行bridge方法"); console.log("初始化完成后执行bridge方法");
ZWJSBridge.getUserType() ZWJSBridge.getUserType()
.then((result1) => { .then(result1 => {
console.log(result1); console.log(result1);
//经纬度 //经纬度
ZWJSBridge.getLocation() ZWJSBridge.getLocation()
.then((result2) => { .then(result2 => {
console.log(result2); console.log(result2);
debugger; debugger;
aplus_queue.push({ aplus_queue.push({
action: "aplus.sendPV", action: "aplus.sendPV",
arguments: [ arguments: [
{ {
is_auto: false, is_auto: false
}, },
{ {
isMini: true, isMini: true,
@@ -395,20 +408,20 @@ export default {
miniAppName: "房屋征收", miniAppName: "房屋征收",
long: result2.longitude, long: result2.longitude,
lati: result2.latitude, lati: result2.latitude,
userType: result1.userType, userType: result1.userType
}, }
], ]
}); });
}) })
.catch((error) => { .catch(error => {
console.log(error); console.log(error);
}); });
}) })
.catch((error) => { .catch(error => {
console.log(error); console.log(error);
}); });
}); });
}, }
}, }
}; };
</script> </script>

View File

@@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<pdf :src="url"></pdf> <div ref="content" class="content">
<div ref="content" class="content">被保存的内容</div> <pdf :src="url" class="PDF"></pdf>
</div>
<div class="bottom"> <div class="bottom">
<a href="" download=""> <a href="" download="">
<el-button type="primary">保存到相册</el-button> <el-button type="primary">保存到相册</el-button>
@@ -19,44 +20,36 @@ import axios from "axios";
import request from "@/common/util"; import request from "@/common/util";
export default { export default {
components: { components: {
pdf, pdf
}, },
data() { data() {
return { return {
url: "", url: ""
}; };
}, },
created() { created() {
this.onInit(); this.onInit();
console.log("pdf");
},
mounted() {
// 截图
html2canvas(this.$refs.content).then((canvas) => {
canvas.id = "mycanvas";
const base64 = canvas.toDataURL("image/png");
jquery("a").prop("href", base64);
});
}, },
methods: { methods: {
onInit() { onInit() {
this.onLoadData(); this.onLoadData();
request({ request({
url: "http://localhost:5566/agreement/info", url: "http://10.19.94.9:7099/api/agreement/info",
method: "post", method: "post",
data: { data: {
ticket: "8a1188557bda7894017bed584f803119-ticket", ticket: "8a1188557bda7894017bf257a07e7ccb-ticket",
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C", id: "C655515B-FD91-48F2-BD79-EAABAFB7077C"
}, },
headers: { "Content-Type": "application/json; charset=UTF-8" }, headers: { "Content-Type": "application/json; charset=UTF-8" },
responseType: "arraybuffer", //一定要设置响应类型否则页面会是空白pdf responseType: "arraybuffer" //一定要设置响应类型否则页面会是空白pdf
}).then((result) => { }).then(result => {
const binaryData = []; const binaryData = [];
binaryData.push(result.data); binaryData.push(result.data);
//获取blob链接 //获取blob链接
this.url = window.URL.createObjectURL( this.url = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" }) new Blob(binaryData, { type: "application/pdf" })
); );
jquery("a").prop("href", this.url);
// if (pdfUrl) { // if (pdfUrl) {
// this.handlePrint(pdfUrl); // this.handlePrint(pdfUrl);
// } // }
@@ -107,16 +100,16 @@ export default {
onLoadData() { onLoadData() {
// console.log(this.$route.params); // console.log(this.$route.params);
// this.url = this.$route.params.url; // this.url = this.$route.params.url;
}, }
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.content { .content {
text-align: center; text-align: center;
height: 200px;
line-height: 200px; line-height: 200px;
font-size: 30px; font-size: 30px;
margin-bottom: 20px;
} }
.bottom { .bottom {
text-align: center; text-align: center;

View File

@@ -32,25 +32,26 @@
<van-list> <van-list>
<div <div
:key="item.id" :key="item.id"
@click="gotoDetail(item.id)"
class="proListBox shadow" class="proListBox shadow"
v-for="item in info.prjList" v-for="item in info.prjList"
> >
<div class="proAreaBox"> <div @click="gotoDetail(item.prjId)">
<div class="proArea">{{ item.area }}</div> <div class="proAreaBox">
<div class="proCenterFont" v-if="item.state_cd == 1"> <div class="proArea">{{ item.area }}</div>
· {{ item.currentState }} <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>
<div class="proCenterFont" style="color:#179D5C" v-else> <div class="proAreaBox">
· {{ item.currentState }} <div class="proTitleBox">{{ item.name }}</div>
</div>
<van-divider style="margin:8px 0;" />
<div class="proDateBox">
<div>{{ item.prjId }}</div>
</div> </div>
</div>
<div class="proAreaBox">
<div class="proTitleBox">{{ item.zsbm }}</div>
</div>
<van-divider style="margin:8px 0;" />
<div class="proDateBox">
<div>{{ item.year }}</div>
</div> </div>
</div> </div>
</van-list> </van-list>
@@ -86,10 +87,12 @@ export default {
}, },
created() { created() {
this.onInit(); this.onInit();
this.onLoadData();
}, },
methods: { methods: {
// 获取数据
onInit() { onInit() {
this.type = this.$route.params.type;
this.ticket = this.$route.params.ticket;
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
@@ -100,7 +103,6 @@ export default {
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
console.log("首页数据", data);
const { data: res } = data; const { data: res } = data;
this.info = res.data; this.info = res.data;
}, },
@@ -109,16 +111,17 @@ export default {
} }
}); });
}, },
onLoadData() { // 页面跳转
this.type = this.$route.params.type;
this.ticket = this.$route.params.ticket;
},
gotoDetail(id) { gotoDetail(id) {
if (this.type == "pg") { if (this.type == "pg") {
// 评估结果页面 // 评估结果页面
this.$router.push({ this.$router.push({
name: "evaluteResult", name: "evaluteResult",
params: { projectid: id, type: this.type, ticket: this.ticket } params: {
prjId: id,
type: this.type,
ticket: this.$route.params.ticket
}
}); });
} else if (this.type == "xy") { } else if (this.type == "xy") {
// 协议结果页面 // 协议结果页面

View File

@@ -1,152 +0,0 @@
<template>
<div class="container">
<div class="image">
<img alt src="@/assets/img/evalute.png" />
</div>
<div class="text">为您查询到{{ this.result }}条结果</div>
<div :key="index" v-for="(item, index) in info" @click="pageJump()">
<el-card body-style="padding:10px">
<div>
<img alt src="@/assets/img/bianhao.png" />
评估报告编号
<b>{{ item.number }}</b>
</div>
<div>
<img alt src="@/assets/img/name.png" />
被征收人姓名
<b>{{ item.name }}</b>
</div>
<div>
<img alt src="@/assets/img/address.png" />
被征收人房屋地址
<b>{{ item.address }}</b>
</div>
<div>
<img alt src="@/assets/img/money.png" />
评估总金额
<b style="color: red">{{ item.money }}</b>
</div>
<div class="line">
<img alt src="@/assets/img/hengxian.png" />
</div>
<div class="content">
<div class=" backgroundColor">
<img alt src="@/assets/img/renyuan.png" />
<span> 评估人员{{ item.person }}</span>
</div>
<div class="backgroundColor">
<img alt src="@/assets/img/shijian.png" />
<span> 评估时间{{ item.time }}</span>
</div>
</div>
</el-card>
</div>
</div>
</template>
<script>
export default {
data() {
return {
result: "2",
info: [
{
number: "044",
name: "胡守钧",
address: "宁波市江北区四洲街16号404",
money: "180234元",
person: "王勇",
time: "2021-9-1"
},
{
number: "044",
name: "胡守钧",
address: "宁波市江北区四洲街16号404",
money: "180234元",
person: "王勇",
time: "2021-9-1"
}
]
};
},
created() {
this.onInit();
},
methods: {
onInit() {
this.onLoadData();
},
onLoadData() {
console.log(this.$route.params);
this.type = this.$route.params.type;
},
pageJump(type) {
this.$router.push({
name: "evaluteResult",
params: { type: type, ticket: this.$route.query.ticket }
});
}
}
};
</script>
<style lang="less" scoped>
.container {
font-size: 12px;
.image {
margin-top: 20px;
text-align: center;
img {
width: 90%;
}
}
.text {
font-weight: bolder;
margin: 10px 0;
text-align: center;
color: #2d6df2;
}
.el-card {
margin: 0 10px 10px;
.el-card__body {
> div {
margin: 14px 0;
display: flex;
align-items: center;
img {
margin-right: 6px;
}
b {
font-size: 14px;
}
}
.line {
opacity: 1;
img {
width: 100%;
}
img {
height: 2px;
}
}
.content {
display: flex;
justify-content: space-between;
> div {
display: flex;
align-items: center;
}
.backgroundColor {
background-color: #e3ebfd;
img {
margin-right: 10px;
}
span {
padding-right: 10px;
}
}
}
}
}
}
</style>

View File

@@ -3,12 +3,10 @@
<div class="image"> <div class="image">
<img alt src="@/assets/img/evalute.png" /> <img alt src="@/assets/img/evalute.png" />
</div> </div>
<div class="text"> <div class="text">为您查询到{{ this.returnResult() }}条结果</div>
为您查询到{{ this.info.prjList[0].fhpgList.length }}条结果
</div>
<div <div
:key="index" :key="index"
v-for="(item, index) in info.prjList[0].fhpgList" v-for="(item, index) in this.info.prjList[0].fhpgList"
@click="pageJump()" @click="pageJump()"
> >
<el-card body-style="padding:10px"> <el-card body-style="padding:10px">
@@ -38,11 +36,11 @@
<div class="content"> <div class="content">
<div class=" backgroundColor"> <div class=" backgroundColor">
<img alt src="@/assets/img/renyuan.png" /> <img alt src="@/assets/img/renyuan.png" />
<span> 评估人员{{ item.person }}</span> <span> 评估人员{{ item.createUserName }}</span>
</div> </div>
<div class="backgroundColor"> <div class="backgroundColor">
<img alt src="@/assets/img/shijian.png" /> <img alt src="@/assets/img/shijian.png" />
<span> 评估时间{{ item.time }}</span> <span> 评估时间{{ item.createTime }}</span>
</div> </div>
</div> </div>
</el-card> </el-card>
@@ -62,22 +60,22 @@ export default {
{ {
assessmentNo: "无数据", assessmentNo: "无数据",
houseAddress: "无数据", houseAddress: "无数据",
countValue: "无数据", countValue: "无数据"
person: "无数据",
time: "无数据"
} }
] ]
} }
] ]
} },
prjList: []
}; };
}, },
created() { created() {
this.onInit(); this.onInit();
}, },
methods: { methods: {
// 获取数据
onInit() { onInit() {
this.onLoadData(); this.type = this.$route.params.type;
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
@@ -91,21 +89,29 @@ export default {
const { data: res } = data.data; const { data: res } = data.data;
console.log("res", res); console.log("res", res);
this.info = res; this.info = res;
const obj = res.prjList.filter((index, item) => {
return item.prjId == this.$route.params.prjId;
});
console.log(999, obj);
}, },
onFail: err => { onFail: err => {
console.log("用户无数据,不展示"); console.log("用户无数据,不展示");
} }
}); });
}, },
onLoadData() { // 跳转评估结果pdf
console.log(this.$route.params); pageJump() {
this.type = this.$route.params.type;
},
pageJump(type) {
this.$router.push({ this.$router.push({
name: "evaluteResult", // name: "evaluteResult"
params: { type: type, ticket: this.$route.query.ticket } path: "/evaluteResult"
}); });
},
// 页面顶部返回结果数值
returnResult() {
const object = this.info.prjList.filter((index, item) => {
return item.prjId == this.$route.params.prjId;
});
return object.length;
} }
} }
}; };
@@ -161,7 +167,7 @@ export default {
.backgroundColor { .backgroundColor {
background-color: #e3ebfd; background-color: #e3ebfd;
img { img {
margin-right: 10px; margin-right: 4px;
} }
span { span {
padding-right: 10px; padding-right: 10px;