Commit 4522ffca authored by 车宾's avatar 车宾

fae(化验室槽液参数趋势变化):功能联调

parent a4904520
This diff is collapsed.
......@@ -17,14 +17,16 @@
"dependencies": {
"axios": "^0.18.0",
"connect": "^3.6.6",
"echarts": "^4.4.0",
"echarts": "^4.6.0",
"el-tree-select": "^2.0.7",
"element-ui": "^2.8.0",
"font-awesome": "^4.7.0",
"js-cookie": "^2.2.0",
"jspdf": "^1.5.3",
"lodash": "^4.17.11",
"mockjs": "^1.0.1-beta3",
"moment": "^2.24.0",
"node-sass": "^4.13.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^2.4.0",
"screenfull": "^3.3.3",
......@@ -87,7 +89,6 @@
"mocha": "^3.2.0",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"node-sass": "^4.10.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.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 @@
"url": "/api/check/getCheckByType",
"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": {
"url": "/api/check/getCheckRecord/electrophoresis",
"method": "post"
......@@ -750,10 +762,6 @@
"busNo-get": {
"url": "/area/detail/busNo",
"method": "get"
},
"test-get": {
"url": "/area/test",
"method": "get"
}
},
"report-controller": {
......
......@@ -24,6 +24,7 @@ import formValidator from '@/utils/formValidator/index';
import Authority from '../src/utils/authority';
import vueSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css' //引入样式
import htmlToPdf from '@/components/htmlToPdf/htmlToPdf.js'
Vue.prototype._ = lodash;
Vue.prototype.formValidator = formValidator;
Vue.config.productionTip = false
......@@ -34,6 +35,7 @@ Vue.use(ElementUI, {
})
Vue.use(prototypeJS)
Vue.use(htmlToPdf)
/* eslint-disable no-new */
new Vue({
......
......@@ -11,7 +11,9 @@ export default {
props: {
sendData: {
type: Object,
default: {}
default: () => {
return {}
}
}
},
data () {
......@@ -42,7 +44,6 @@ export default {
let top = this.sendData.top;
let down = this.sendData.down;
// this.sampleCharts.clear();
// echarts.dispose(domItem)
// let echart = echarts.init(domItem)
var charts = {
......@@ -51,10 +52,6 @@ export default {
// lineX:new Date(this.createTime).getTime(),
};
let opt = {
// title: {
// text: '折线图堆叠',
// textAlign: 'auto'
// },
tooltip: {
trigger: 'axis'
},
......@@ -65,7 +62,7 @@ export default {
containLabel: true
},
xAxis: {
name: '日期',
// name: '日期',
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
......@@ -77,17 +74,20 @@ export default {
},
yAxis: {
type: 'value',
name: 'T/℃',
name: this.sendData.argumentName,
nameTextStyle: {
// fontWeight: 'bold',
fontSize: 18,
color: 'red'
fontSize: 16,
color: '#aaa'
}
},
series: [
{
name: '邮件营销',
type: 'line',
lineStyle: {
color: '#8cd2ff'
},
stack: '总量',
data: data,
markLine: {
......
......@@ -5,13 +5,13 @@
<div class="method-rg clear-float">方法</div>
</div>
<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">
<span>{{item.name}}</span>
<el-checkbox v-model="item.checked" @change="onModuleCheckedChange(item, itemIndex)"></el-checkbox>
</div>
<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>
<span>{{data.name}}</span>
</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