Merge branch 'master' of http://118.178.224.202:3000/ewide/zsxt_nbzs_h5
This commit is contained in:
24
FrontCode1/vue/config/webpack.config.js
Normal file
24
FrontCode1/vue/config/webpack.config.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
const path = require('path') //调用node.js中的路径
|
||||||
|
const VueLoaderPlugin = require('vue-loader/lib/plugin')
|
||||||
|
module.exports = {
|
||||||
|
entry: {
|
||||||
|
index: './src/main.js', //需要打包的文件
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
filename: '[name].js', //输入的文件名是什么,生成的文件名也是什么
|
||||||
|
path: path.resolve(__dirname, '../dist'), //指定生成的文件目录
|
||||||
|
},
|
||||||
|
mode: 'development', //开发模式,没有对js等文件压缩,默认生成的是压缩文件
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
// postcss-loader解决一些浏览器不兼容css代码的问题
|
||||||
|
{ test: /\.css$/, use: ['style-loader', 'css-loader', 'postcss-loader'] },
|
||||||
|
// 配置less加载器
|
||||||
|
{ test: /\.less$/, use: ['style-loader', 'css-loader', 'less-loader'] },
|
||||||
|
//exclude为排除项,意思是不要处理node_modules中的js文件
|
||||||
|
{ test: /\.js$/, use: 'babel-loader', exclude: /node_modules/ },
|
||||||
|
{ test: /\.vue$/, loader: 'vue-loader' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: [new VueLoaderPlugin()],
|
||||||
|
}
|
||||||
446
FrontCode2/sunshine_levy/package-lock.json
generated
446
FrontCode2/sunshine_levy/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,8 @@
|
|||||||
"@aligov/jssdk-mgop": "^3.0.0",
|
"@aligov/jssdk-mgop": "^3.0.0",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.4",
|
||||||
"element-ui": "^2.15.6",
|
"element-ui": "^2.15.6",
|
||||||
|
"html2canvas": "^1.3.2",
|
||||||
|
"jquery": "^3.6.0",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"less": "^4.1.1",
|
"less": "^4.1.1",
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
|
|||||||
@@ -228,7 +228,10 @@
|
|||||||
class="protocolList"
|
class="protocolList"
|
||||||
v-for="(item, i) in data.policiesRegulationsLists.list"
|
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="font14 protocolTitle">{{ item.title }}</div>
|
||||||
<div
|
<div
|
||||||
class="assessBox"
|
class="assessBox"
|
||||||
@@ -289,10 +292,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.onInit();
|
this.onInit();
|
||||||
|
console.log("this", this);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
onInit() {
|
onInit() {
|
||||||
@@ -311,7 +313,7 @@ export default {
|
|||||||
this.data = data.data.data;
|
this.data = data.data.data;
|
||||||
this.setZwUserAplus(this.data.idCard, this.data.userName);
|
this.setZwUserAplus(this.data.idCard, this.data.userName);
|
||||||
} else {
|
} else {
|
||||||
var errorCodes = ['6001', '6501'];
|
var errorCodes = ["6001", "6501"];
|
||||||
if (errorCodes.indexOf(data.data.bizCode) > -1) {
|
if (errorCodes.indexOf(data.data.bizCode) > -1) {
|
||||||
window.location.replace(
|
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"
|
||||||
@@ -320,10 +322,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onFail: (err) => {
|
onFail: (err) => {
|
||||||
console.log(err, "err");
|
console.log("用户无数据,不展示");
|
||||||
},
|
|
||||||
onFail: (err) => {
|
|
||||||
console.log(err, "err");
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
//获取当前数据
|
//获取当前数据
|
||||||
@@ -346,8 +345,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
pageJump() {
|
pageJump(type) {
|
||||||
this.$router.push("/policyInfo");
|
this.$router.push({
|
||||||
|
name: "policyInfo",
|
||||||
|
params: { type: type, ticket: this.$route.query.ticket },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setZwUserAplus(Userid, userName) {
|
setZwUserAplus(Userid, userName) {
|
||||||
// 设置用户信息埋点
|
// 设置用户信息埋点
|
||||||
@@ -367,7 +369,7 @@ export default {
|
|||||||
action: "aplus.setMetaInfo",
|
action: "aplus.setMetaInfo",
|
||||||
arguments: ["_hold", "START"],
|
arguments: ["_hold", "START"],
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
*作者姓名:小严
|
*作者姓名:小严
|
||||||
*制作日期:2017-09-21
|
*制作日期:2017-09-21
|
||||||
*/
|
*/
|
||||||
|
import $ from "jquery";
|
||||||
var ifDecoration = false;
|
var ifDecoration = false;
|
||||||
var ifAttached = false;
|
var ifAttached = false;
|
||||||
var ifOther = false;
|
var ifOther = false;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="pdf">
|
<!-- 表格部分 -->
|
||||||
|
<div class="pdf" ref="image">
|
||||||
<div id="printdiv">
|
<div id="printdiv">
|
||||||
<!-- 表格1 -->
|
<!-- 表格1 -->
|
||||||
<table
|
<table
|
||||||
@@ -461,14 +462,32 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
import $ from "jquery";
|
||||||
|
import html2canvas from "html2canvas";
|
||||||
import "./evaluateResult.js";
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@@ -568,7 +587,7 @@ export default {};
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.button {
|
.bottom {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pdf :src="url"></pdf>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
|
||||||
<script>
|
<script>
|
||||||
import pdf from 'vue-pdf';
|
import pdf from "vue-pdf";
|
||||||
|
import jquery from "jquery";
|
||||||
|
import html2canvas from "html2canvas";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
pdf,
|
pdf
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: '',
|
url: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.onInit();
|
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: {
|
methods: {
|
||||||
onInit() {
|
onInit() {
|
||||||
@@ -26,7 +43,19 @@ 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>
|
||||||
|
.content {
|
||||||
|
text-align: center;
|
||||||
|
height: 200px;
|
||||||
|
line-height: 200px;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.onInit();
|
this.onInit();
|
||||||
console.log(1234);
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInit() {
|
onInit() {
|
||||||
@@ -80,8 +79,11 @@ export default {
|
|||||||
console.log(this.$route.params);
|
console.log(this.$route.params);
|
||||||
this.type = this.$route.params.type;
|
this.type = this.$route.params.type;
|
||||||
},
|
},
|
||||||
pageJump() {
|
pageJump(type) {
|
||||||
this.$router.push("/evaluteResult");
|
this.$router.push({
|
||||||
|
name: "evaluteResult",
|
||||||
|
params: { type: type, ticket: this.$route.query.ticket }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user