This commit is contained in:
路 范
2021-09-15 18:05:16 +08:00
8 changed files with 354 additions and 225 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,8 @@
"@aligov/jssdk-mgop": "^3.0.0",
"axios": "^0.21.4",
"element-ui": "^2.15.6",
"html2canvas": "^1.3.2",
"jquery": "^3.6.0",
"js-md5": "^0.7.3",
"less": "^4.1.1",
"less-loader": "^4.1.0",

View File

@@ -228,7 +228,10 @@
class="protocolList"
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"
@@ -289,10 +292,9 @@ export default {
},
created() {
this.onInit();
console.log("this", this);
},
mounted() {
},
mounted() {},
methods: {
onLoad() {},
onInit() {
@@ -311,7 +313,7 @@ export default {
this.data = data.data.data;
this.setZwUserAplus(this.data.idCard, this.data.userName);
} else {
var errorCodes = ['6001', '6501'];
var errorCodes = ["6001", "6501"];
if (errorCodes.indexOf(data.data.bizCode) > -1) {
window.location.replace(
"https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=fwzs"
@@ -320,10 +322,7 @@ export default {
}
},
onFail: (err) => {
console.log(err, "err");
},
onFail: (err) => {
console.log(err, "err");
console.log("用户无数据,不展示");
},
});
//获取当前数据
@@ -346,8 +345,11 @@ export default {
});
},
// 页面跳转
pageJump() {
this.$router.push("/policyInfo");
pageJump(type) {
this.$router.push({
name: "policyInfo",
params: { type: type, ticket: this.$route.query.ticket },
});
},
setZwUserAplus(Userid, userName) {
// 设置用户信息埋点
@@ -367,7 +369,7 @@ export default {
action: "aplus.setMetaInfo",
arguments: ["_hold", "START"],
});
}
},
},
};
</script>

View File

@@ -3,6 +3,7 @@
*作者姓名:小严
*制作日期2017-09-21
*/
import $ from "jquery";
var ifDecoration = false;
var ifAttached = false;
var ifOther = false;

View File

@@ -1,6 +1,7 @@
<template>
<div class="container">
<div class="pdf">
<!-- 表格部分 -->
<div class="pdf" ref="image">
<div id="printdiv">
<!-- 表格1 -->
<table
@@ -461,14 +462,32 @@
</p>
</div>
</div>
<div class="button">
<el-button type="primary">保存到相册</el-button>
<!-- 底部按钮 -->
<div class="bottom">
<a href="#" download="">
<el-button type="primary">保存到相册</el-button>
</a>
</div>
</div>
</template>
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
<script>
import $ from "jquery";
import html2canvas from "html2canvas";
import "./evaluateResult.js";
export default {};
export default {
data() {
return {};
},
methods: {},
mounted() {
html2canvas(this.$refs.image).then(canvas => {
canvas.id = "mycanvas";
var base64 = canvas.toDataURL("image/png");
$("a").prop("href", base64);
});
}
};
</script>
<style lang="less" scoped>
@@ -568,7 +587,7 @@ export default {};
}
}
}
.button {
.bottom {
text-align: center;
margin-bottom: 20px;
}

View File

@@ -1,23 +1,40 @@
<template>
<div>
<pdf :src="url"></pdf>
<div ref="content" class="content">被保存的内容</div>
<div class="bottom">
<a href="" download="">
<el-button type="primary">保存到相册</el-button>
</a>
</div>
</div>
</template>
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
<script>
import pdf from 'vue-pdf';
import pdf from "vue-pdf";
import jquery from "jquery";
import html2canvas from "html2canvas";
export default {
components: {
pdf,
pdf
},
data() {
return {
url: '',
url: ""
};
},
created() {
this.onInit();
console.log('pdf');
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: {
onInit() {
@@ -26,7 +43,19 @@ export default {
onLoadData() {
console.log(this.$route.params);
this.url = this.$route.params.url;
},
},
}
}
};
</script>
</script>
<style lang="less" scoped>
.content {
text-align: center;
height: 200px;
line-height: 200px;
font-size: 30px;
}
.bottom {
text-align: center;
margin-bottom: 20px;
}
</style>

View File

@@ -70,7 +70,6 @@ export default {
},
created() {
this.onInit();
console.log(1234);
},
methods: {
onInit() {
@@ -80,8 +79,11 @@ export default {
console.log(this.$route.params);
this.type = this.$route.params.type;
},
pageJump() {
this.$router.push("/evaluteResult");
pageJump(type) {
this.$router.push({
name: "evaluteResult",
params: { type: type, ticket: this.$route.query.ticket }
});
}
}
};