Commit 004728eb authored by 李志鸣's avatar 李志鸣

Merge branch 'dev' of git.vtstar.net:zhongtong/zhongtong-avi-web into dev

parents cf3ac6cc 4522ffca
This diff is collapsed.
...@@ -17,14 +17,16 @@ ...@@ -17,14 +17,16 @@
"dependencies": { "dependencies": {
"axios": "^0.18.0", "axios": "^0.18.0",
"connect": "^3.6.6", "connect": "^3.6.6",
"echarts": "^4.4.0", "echarts": "^4.6.0",
"el-tree-select": "^2.0.7", "el-tree-select": "^2.0.7",
"element-ui": "^2.8.0", "element-ui": "^2.8.0",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"jspdf": "^1.5.3",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"moment": "^2.24.0", "moment": "^2.24.0",
"node-sass": "^4.13.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-to-regexp": "^2.4.0", "path-to-regexp": "^2.4.0",
"screenfull": "^3.3.3", "screenfull": "^3.3.3",
...@@ -87,7 +89,6 @@ ...@@ -87,7 +89,6 @@
"mocha": "^3.2.0", "mocha": "^3.2.0",
"nightwatch": "^0.9.12", "nightwatch": "^0.9.12",
"node-notifier": "^5.1.2", "node-notifier": "^5.1.2",
"node-sass": "^4.10.0",
"optimize-css-assets-webpack-plugin": "^3.2.0", "optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0", "ora": "^1.2.0",
"path-to-regexp": "^2.4.0", "path-to-regexp": "^2.4.0",
......
// 导出页面为PDF格式
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default{
install (Vue, options) {
Vue.prototype.getPdf = function () {
var title = this.htmlTitle
html2Canvas(document.querySelector('.many_charts'), {
allowTaint: true
}).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
let imgWidth = 595.28
let imgHeight = 592.28 / contentWidth * contentHeight
let pageData = canvas.toDataURL('image/jpeg', 1.0)
let PDF = new JsPDF('', 'pt', 'a4')
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
}
)
}
}
}
\ No newline at end of file
...@@ -103,6 +103,18 @@ ...@@ -103,6 +103,18 @@
"url": "/api/check/getCheckByType", "url": "/api/check/getCheckByType",
"method": "get" "method": "get"
}, },
"id-get": {
"url": "/api/check/getCheckItemModelById/{id}",
"method": "get"
},
"getCheckItemRecord-get": {
"url": "/api/check/getCheckItemRecord",
"method": "get"
},
"getCheckModel-get": {
"url": "/api/check/getCheckModel",
"method": "get"
},
"electrophoresis-post": { "electrophoresis-post": {
"url": "/api/check/getCheckRecord/electrophoresis", "url": "/api/check/getCheckRecord/electrophoresis",
"method": "post" "method": "post"
...@@ -750,10 +762,6 @@ ...@@ -750,10 +762,6 @@
"busNo-get": { "busNo-get": {
"url": "/area/detail/busNo", "url": "/area/detail/busNo",
"method": "get" "method": "get"
},
"test-get": {
"url": "/area/test",
"method": "get"
} }
}, },
"report-controller": { "report-controller": {
......
...@@ -24,6 +24,7 @@ import formValidator from '@/utils/formValidator/index'; ...@@ -24,6 +24,7 @@ import formValidator from '@/utils/formValidator/index';
import Authority from '../src/utils/authority'; import Authority from '../src/utils/authority';
import vueSwiper from 'vue-awesome-swiper' import vueSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css' //引入样式 import 'swiper/dist/css/swiper.css' //引入样式
import htmlToPdf from '@/components/htmlToPdf/htmlToPdf.js'
Vue.prototype._ = lodash; Vue.prototype._ = lodash;
Vue.prototype.formValidator = formValidator; Vue.prototype.formValidator = formValidator;
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -34,6 +35,7 @@ Vue.use(ElementUI, { ...@@ -34,6 +35,7 @@ Vue.use(ElementUI, {
}) })
Vue.use(prototypeJS) Vue.use(prototypeJS)
Vue.use(htmlToPdf)
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
......
...@@ -11,7 +11,9 @@ export default { ...@@ -11,7 +11,9 @@ export default {
props: { props: {
sendData: { sendData: {
type: Object, type: Object,
default: {} default: () => {
return {}
}
} }
}, },
data () { data () {
...@@ -42,7 +44,6 @@ export default { ...@@ -42,7 +44,6 @@ export default {
let top = this.sendData.top; let top = this.sendData.top;
let down = this.sendData.down; let down = this.sendData.down;
// this.sampleCharts.clear(); // this.sampleCharts.clear();
// echarts.dispose(domItem) // echarts.dispose(domItem)
// let echart = echarts.init(domItem) // let echart = echarts.init(domItem)
var charts = { var charts = {
...@@ -51,10 +52,6 @@ export default { ...@@ -51,10 +52,6 @@ export default {
// lineX:new Date(this.createTime).getTime(), // lineX:new Date(this.createTime).getTime(),
}; };
let opt = { let opt = {
// title: {
// text: '折线图堆叠',
// textAlign: 'auto'
// },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
...@@ -65,7 +62,7 @@ export default { ...@@ -65,7 +62,7 @@ export default {
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {
name: '日期', // name: '日期',
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
...@@ -77,17 +74,20 @@ export default { ...@@ -77,17 +74,20 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: 'T/℃', name: this.sendData.argumentName,
nameTextStyle: { nameTextStyle: {
// fontWeight: 'bold', // fontWeight: 'bold',
fontSize: 18, fontSize: 16,
color: 'red' color: '#aaa'
} }
}, },
series: [ series: [
{ {
name: '邮件营销', name: '邮件营销',
type: 'line', type: 'line',
lineStyle: {
color: '#8cd2ff'
},
stack: '总量', stack: '总量',
data: data, data: data,
markLine: { markLine: {
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<div class="method-rg clear-float">方法</div> <div class="method-rg clear-float">方法</div>
</div> </div>
<div class="modules-main ml-15 mr-15"> <div class="modules-main ml-15 mr-15">
<div class="features-component-main" v-for="(item, itemIndex) in checkedList"> <div class="features-component-main" v-for="(item, itemIndex) in checkedList" :key="itemIndex">
<div class="main-lf"> <div class="main-lf">
<span>{{item.name}}</span> <span>{{item.name}}</span>
<el-checkbox v-model="item.checked" @change="onModuleCheckedChange(item, itemIndex)"></el-checkbox> <el-checkbox v-model="item.checked" @change="onModuleCheckedChange(item, itemIndex)"></el-checkbox>
</div> </div>
<div class="main-rg clear-float"> <div class="main-rg clear-float">
<div class="main-rg-item" v-for="(data, index) in item.children"> <div class="main-rg-item" v-for="(data, index) in item.children" :key="index">
<el-checkbox v-model="data.checked" @change="checkedChange(itemIndex, index)"></el-checkbox> <el-checkbox v-model="data.checked" @change="checkedChange(itemIndex, index)"></el-checkbox>
<span>{{data.name}}</span> <span>{{data.name}}</span>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment