Compare commits

...

2 Commits

6 changed files with 9944 additions and 832 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,7 @@
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"@aligov/jssdk-mgop": "^3.1.7",
"axios": "^0.21.4", "axios": "^0.21.4",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
@@ -19,6 +20,7 @@
"px2rem-loader": "^0.1.9", "px2rem-loader": "^0.1.9",
"vant": "^2.12.27", "vant": "^2.12.27",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-pdf": "^4.3.0",
"vue-router": "^3.0.1" "vue-router": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -34,5 +34,11 @@ export default new Router({
name: 'reportAgreement', name: 'reportAgreement',
component: () => import('../views/report/agreement') component: () => import('../views/report/agreement')
}, },
// 查看pdf页面
{
path: '/showPdf',
name: 'showPdf',
component: () => import('../views/pdf/pdf')
},
] ]
}) })

View File

@@ -207,6 +207,8 @@ import './home.css';
import { apis } from '@/common/apis'; import { apis } from '@/common/apis';
import { token } from '@/common/token'; import { token } from '@/common/token';
import request from '@/common/util'; import request from '@/common/util';
import { mgop } from '@aligov/jssdk-mgop';
export default { export default {
name: 'home', name: 'home',
data() { data() {
@@ -302,6 +304,19 @@ export default {
methods: { methods: {
onLoad() {}, onLoad() {},
onInit() { onInit() {
mgop({
api: 'mgop.kykj.houseexpropriat.getprjlist', // 必须
host: 'https://mapi.zjzwfw.gov.cn/',
dataType: 'JSON',
type: 'GET',
appKey: 'es4b8zmz+2001833218+dehllx', // 必须
onSuccess: (data) => {
console.log('data', data);
},
onFail: (err) => {
console.log(err, 'err');
},
});
let apidata = { let apidata = {
success: true, success: true,
code: 200, code: 200,

View File

@@ -0,0 +1,32 @@
<template>
<div>
<pdf :src="url"></pdf>
</div>
</template>
<script>
import pdf from 'vue-pdf';
export default {
components: {
pdf,
},
data() {
return {
url: '',
};
},
created() {
this.onInit();
console.log('pdf');
},
methods: {
onInit() {
this.onLoadData();
},
onLoadData() {
console.log(this.$route.params);
this.url = this.$route.params.url;
},
},
};
</script>

View File

@@ -4,7 +4,7 @@
<img alt src="@/assets/img/agreement.png" /> <img alt src="@/assets/img/agreement.png" />
</div> </div>
<div class="text">为您查询到{{ this.result }}条结果</div> <div class="text">为您查询到{{ this.result }}条结果</div>
<div :key="index" v-for="(item, index) in info"> <div :key="index" @click="showPdf(item.url)" v-for="(item, index) in info">
<el-card body-style="padding:10px 10px 0"> <el-card body-style="padding:10px 10px 0">
<div> <div>
<img alt src="@/assets/img/bianhao.png" /> <img alt src="@/assets/img/bianhao.png" />
@@ -37,7 +37,7 @@
<div class="flex"> <div class="flex">
<div class="flex backgroundColor"> <div class="flex backgroundColor">
<img alt src="@/assets/img/shijian.png" /> <img alt src="@/assets/img/shijian.png" />
<span> 签订日期{{ item.time }}</span> <span>签订日期{{ item.time }}</span>
</div> </div>
</div> </div>
</el-card> </el-card>
@@ -48,25 +48,27 @@
export default { export default {
data() { data() {
return { return {
result: "2", result: '2',
info: [ info: [
{ {
number: "044", number: '044',
name: "胡守钧", name: '胡守钧',
address: "宁波市江北区四洲街16号404", address: '宁波市江北区四洲街16号404',
money: "180234元", money: '180234元',
person: "王勇", person: '王勇',
time: "2021-9-1" time: '2021-9-1',
url: '',
}, },
{ {
number: "044", number: '044',
name: "胡守钧", name: '胡守钧',
address: "宁波市江北区四洲街16号404", address: '宁波市江北区四洲街16号404',
money: "180234元", money: '180234元',
person: "王勇", person: '王勇',
time: "2021-9-1" time: '2021-9-1',
} url: '',
] },
],
}; };
}, },
created() { created() {
@@ -80,8 +82,12 @@ export default {
onLoadData() { onLoadData() {
console.log(this.$route.params); console.log(this.$route.params);
this.type = this.$route.params.type; this.type = this.$route.params.type;
} },
} showPdf(url) {
url = '';
this.$router.push({ name: 'showPdf', params: { url: url } });
},
},
}; };
</script> </script>
<style> <style>