update:更新页面接口
This commit is contained in:
@@ -316,7 +316,7 @@ export default {
|
||||
totalCount: 0
|
||||
}
|
||||
},
|
||||
ticket: "8a1188527bda7a4d017c0bf804381ed5-ticket"
|
||||
ticket: "8a1188537bda78db017c0cb56c2d3f85-ticket"
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
|
||||
121
FrontCode2/sunshine_levy/src/views/pdf/evaluateResultPdf.vue
Normal file
121
FrontCode2/sunshine_levy/src/views/pdf/evaluateResultPdf.vue
Normal file
@@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<div style="margin: 0 auto">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="testdownload4()"
|
||||
style="display: block; margin: 0 auto"
|
||||
:loading="isloading"
|
||||
>下载到手机</el-button
|
||||
>
|
||||
<div v-for="(item, index) in apidata.pics" :key="index" class="divbaseImg">
|
||||
<van-image
|
||||
:width="pic_width"
|
||||
:height="pic_height"
|
||||
:src="item"
|
||||
class="baseImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import pdf from "vue-pdf";
|
||||
import { mgop } from "@aligov/jssdk-mgop";
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
url: "",
|
||||
apidata: {},
|
||||
pic_width: "100%",
|
||||
pic_height: "100%",
|
||||
isloading: true
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.onInit();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
onInit() {
|
||||
mgop({
|
||||
api: "mgop.kykj.houseexpropriat.getagreementinfop",
|
||||
host: "https://mapi.zjzwfw.gov.cn/",
|
||||
dataType: "JSON",
|
||||
type: "POST",
|
||||
data: {
|
||||
ticket:
|
||||
this.$route.params.ticket ||
|
||||
window.sessionStorage.getItem("ticket"),
|
||||
id: "C655515B-FD91-48F2-BD79-EAABAFB7077C"
|
||||
},
|
||||
appKey: "es4b8zmz+2001833218+dehllx",
|
||||
onSuccess: result => {
|
||||
console.log("pdf.vue页面请求pdf文件:", result);
|
||||
if (result.data && result.data.success == true) {
|
||||
console.log("result.data.data:", result.data.data);
|
||||
this.apidata = result.data.data;
|
||||
this.pic_width = "100%";
|
||||
this.pic_height = "100%";
|
||||
this.isloading = false;
|
||||
}
|
||||
},
|
||||
onFail: err => {
|
||||
console.log("用户无数据,不展示");
|
||||
}
|
||||
});
|
||||
},
|
||||
saveImages() {
|
||||
ZWJSBridge.onReady(() => {
|
||||
console.log("初始化完成后,执行bridge方法-saveImages");
|
||||
ZWJSBridge.saveImage({
|
||||
url: this.apidata.pdf
|
||||
})
|
||||
.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.apidata.pdf
|
||||
})
|
||||
.then(result => {
|
||||
console.log("测试新开窗口():" + result);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.content {
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
font-size: 30px;
|
||||
margin-bottom: 20px;
|
||||
height: 200px;
|
||||
}
|
||||
.bottom {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.divbaseImg {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.baseImg {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -80,6 +80,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
console.log("this.state", this.$store.state);
|
||||
},
|
||||
methods: {
|
||||
// 获取数据
|
||||
@@ -93,7 +94,8 @@ export default {
|
||||
ticket:
|
||||
this.$route.params.ticket ||
|
||||
window.sessionStorage.getItem("ticket"),
|
||||
id: this.$route.params.projectId
|
||||
id: this.$route.params.fhpgId,
|
||||
type: this.$route.params.type
|
||||
},
|
||||
appKey: "es4b8zmz+2001833218+dehllx",
|
||||
onSuccess: data => {
|
||||
@@ -108,9 +110,15 @@ export default {
|
||||
},
|
||||
// 跳转评估结果pdf
|
||||
pageJump() {
|
||||
this.$router.push({
|
||||
name: "evaluteResult"
|
||||
});
|
||||
if (this.info.valuationMethod == "0") {
|
||||
this.$router.push({
|
||||
name: "evaluteResult"
|
||||
});
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: "evaluateResultPdf"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div
|
||||
:key="index"
|
||||
v-for="(item, index) in this.prjList.fhpgList"
|
||||
@click="pageJump(item.id)"
|
||||
@click="pageJump(item.id, item.type)"
|
||||
>
|
||||
<div v-if="item.type === '1'">
|
||||
<el-card body-style="padding:10px">
|
||||
@@ -162,6 +162,8 @@ export default {
|
||||
);
|
||||
});
|
||||
this.prjList = prjList;
|
||||
console.log("prjList", prjList);
|
||||
this.$store.dispatch("GETDATA", prjList);
|
||||
this.prjListLength = prjList.fhpgList.length;
|
||||
},
|
||||
onFail: err => {
|
||||
@@ -170,11 +172,12 @@ export default {
|
||||
});
|
||||
},
|
||||
// 跳转评估结果二级页面
|
||||
pageJump(id) {
|
||||
pageJump(id, type) {
|
||||
this.$router.push({
|
||||
name: "evaluatePage",
|
||||
params: {
|
||||
projectId: id
|
||||
fhpgId: id,
|
||||
type
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user