Commit 93e6b579 by 王志慧

commit

1 parent 5b3551be
...@@ -7,7 +7,14 @@ body .app { ...@@ -7,7 +7,14 @@ body .app {
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
} }
*{
-webkit-touch-callout:none; //系统默认菜单被禁用/
-webkit-user-select:none; //webkit浏览器/
-khtml-user-select:none; //早期浏览器/
-moz-user-select:none;//火狐/
-ms-user-select:none; //IE10/
user-select:none;
}
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
(userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && tabIndex == 0 && trendChartList.length > 0) (userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && tabIndex == 0 && trendChartList.length > 0)
" "
></canvas> ></canvas>
<div class="line-tooltip flex" ref="lineCustomerTooltip"></div> <div class="line-tooltip flex" ref="lineCustomerTooltip" id="2" v-if="tabIndex == 0"></div>
<!-- 产值的折线图 --> <!-- 产值的折线图 -->
<canvas <canvas
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
(tabIndex == 1 && userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && trendList.length > 0) (tabIndex == 1 && userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && trendList.length > 0)
" "
></canvas> ></canvas>
<div class="line-tooltip flex" ref="lineTooltip"></div> <div class="line-tooltip flex" ref="lineTooltip" id="3" v-if="tabIndex == 1"></div>
<canvas class="canvas" id="pieChart" v-show="tabIndex == 1 && tabType.index == 1 && productionValueReportList.length > 0"></canvas> <canvas class="canvas" id="pieChart" v-show="tabIndex == 1 && tabType.index == 1 && productionValueReportList.length > 0"></canvas>
<template <template
...@@ -119,8 +119,6 @@ export default { ...@@ -119,8 +119,6 @@ export default {
}) })
}, },
initLineChart(id = 'lineChart') { initLineChart(id = 'lineChart') {
let offsetY
offsetY = document.getElementById(id).height * 0.4
let { trendList } = this let { trendList } = this
trendList.forEach(item => { trendList.forEach(item => {
item.type = '新增产值' item.type = '新增产值'
...@@ -162,6 +160,8 @@ export default { ...@@ -162,6 +160,8 @@ export default {
this.lineChart.tooltip({ this.lineChart.tooltip({
custom: true, custom: true,
showCrosshairs: false, showCrosshairs: false,
triggerOn: ['touchstart', 'touchmove'],
triggerOff: 'touchend',
onChange(ev) { onChange(ev) {
const currentData = ev.items[0] const currentData = ev.items[0]
let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/ let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
<div class="item flex"><span class="arc" style="color:#3975C6;">●</span>新增产值:${ev.items[0].value}</div>` <div class="item flex"><span class="arc" style="color:#3975C6;">●</span>新增产值:${ev.items[0].value}</div>`
tooltipEl.style.opacity = 1 tooltipEl.style.opacity = 1
tooltipEl.style.left = currentData.x - 140 / 2 + 'px' tooltipEl.style.left = currentData.x - 140 / 2 + 'px'
tooltipEl.style.top = currentData.y - 40 - 15 + 'px' tooltipEl.style.top = currentData.y - 45 - 15 + 'px'
}, },
onHide() { onHide() {
tooltipEl.style.opacity = 0 tooltipEl.style.opacity = 0
...@@ -316,6 +316,8 @@ export default { ...@@ -316,6 +316,8 @@ export default {
this.lineChartCustomer.tooltip({ this.lineChartCustomer.tooltip({
custom: true, custom: true,
showCrosshairs: false, showCrosshairs: false,
triggerOn: ['touchstart', 'touchmove'],
triggerOff: 'touchend',
onChange(ev) { onChange(ev) {
const currentData = ev.items[0] const currentData = ev.items[0]
let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/ let reg = /(\d{4})-(\d{1,2})-(\d{1,2})/
...@@ -325,7 +327,7 @@ export default { ...@@ -325,7 +327,7 @@ export default {
<div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>新增客户:${ev.items[1].value}</div>` <div class="item flex"><span class="arc" style="color:#FA7C0B;">●</span>新增客户:${ev.items[1].value}</div>`
tooltipEl.style.opacity = 1 tooltipEl.style.opacity = 1
tooltipEl.style.left = currentData.x - 140 / 2 + 'px' tooltipEl.style.left = currentData.x - 140 / 2 + 'px'
tooltipEl.style.top = currentData.y - 40 - 15 + 'px' tooltipEl.style.top = currentData.y - 45 - 15 + 'px'
}, },
onHide() { onHide() {
tooltipEl.style.opacity = 0 tooltipEl.style.opacity = 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!