Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
NLT-e-cigarette
Commits
fc7bd542
Commit
fc7bd542
authored
Sep 09, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否获取图表数据,防止接口请求中切换页面造成下个页面的echarts图污染
parent
a4a1c23a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
23 deletions
+50
-23
homePage.vue
src/views/homePage.vue
+15
-8
produceStatistics.vue
src/views/productionStatis/produceStatistics.vue
+19
-9
repairStatistics.vue
src/views/productionStatis/repairStatistics.vue
+16
-6
No files found.
src/views/homePage.vue
View file @
fc7bd542
...
@@ -288,6 +288,7 @@ export default {
...
@@ -288,6 +288,7 @@ export default {
complePropo1
:
'0.0'
complePropo1
:
'0.0'
},
},
HistoricalInvestigation
:
[],
HistoricalInvestigation
:
[],
getDateType
:
true
,
// 判断是否获取图表数据,防止接口请求中切换页面造成下个页面的echarts图污染
// 图标x轴数据
// 图标x轴数据
xData
:
[],
xData
:
[],
// 计划数量数据
// 计划数量数据
...
@@ -298,13 +299,13 @@ export default {
...
@@ -298,13 +299,13 @@ export default {
goodPropoData
:
[]
goodPropoData
:
[]
}
}
},
},
watch
:
{
//
watch: {
HistoricalInvestigation
:
{
//
HistoricalInvestigation: {
handler
()
{
//
handler() {
this
.
getProLineMonitor
()
//
this.getProLineMonitor()
}
//
}
}
//
}
},
//
},
created
()
{
created
()
{
this
.
getImagData
()
this
.
getImagData
()
this
.
getTableData
()
this
.
getTableData
()
...
@@ -328,6 +329,9 @@ export default {
...
@@ -328,6 +329,9 @@ export default {
})
})
})
})
},
},
beforeDestroy
()
{
this
.
getDateType
=
false
},
methods
:
{
methods
:
{
changeTime
()
{
changeTime
()
{
const
that
=
this
const
that
=
this
...
@@ -491,7 +495,10 @@ export default {
...
@@ -491,7 +495,10 @@ export default {
}
}
getEchartsData
(
params
).
then
(
response
=>
{
getEchartsData
(
params
).
then
(
response
=>
{
// this.xData = response.data.line
// this.xData = response.data.line
this
.
HistoricalInvestigation
=
response
.
data
.
nums
if
(
this
.
getDateType
===
true
)
{
this
.
HistoricalInvestigation
=
response
.
data
.
nums
this
.
getProLineMonitor
()
}
})
})
},
},
/**
/**
...
...
src/views/productionStatis/produceStatistics.vue
View file @
fc7bd542
...
@@ -244,6 +244,7 @@ export default {
...
@@ -244,6 +244,7 @@ export default {
logo
:
require
(
'@/assets/image/btnChose.png'
),
logo
:
require
(
'@/assets/image/btnChose.png'
),
choseType
:
'day'
,
choseType
:
'day'
,
dataList
:
[],
dataList
:
[],
getDateType
:
true
,
// 判断是否获取图表数据,防止接口请求中切换页面造成下个页面的echarts图污染
btnList
:
[
btnList
:
[
{
dictLabel
:
'日报'
,
dictLabelEnglish
:
'Daily'
,
dictValue
:
'day'
},
{
dictLabel
:
'日报'
,
dictLabelEnglish
:
'Daily'
,
dictValue
:
'day'
},
{
dictLabel
:
'周报'
,
dictLabelEnglish
:
'Weekly'
,
dictValue
:
'week'
},
{
dictLabel
:
'周报'
,
dictLabelEnglish
:
'Weekly'
,
dictValue
:
'week'
},
...
@@ -289,6 +290,9 @@ export default {
...
@@ -289,6 +290,9 @@ export default {
})
})
})
})
},
},
beforeDestroy
()
{
this
.
getDateType
=
false
},
methods
:
{
methods
:
{
/** 导出按钮操作*/
/** 导出按钮操作*/
handleExport
()
{
handleExport
()
{
...
@@ -325,9 +329,11 @@ export default {
...
@@ -325,9 +329,11 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getProDetails
(
params
).
then
(
res
=>
{
getProDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getStatistics
()
this
.
getProLineMonitor
()
this
.
getStatistics
()
}
})
})
},
},
/** 更改筛选时间*/
/** 更改筛选时间*/
...
@@ -338,9 +344,11 @@ export default {
...
@@ -338,9 +344,11 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getProDetails
(
params
).
then
(
res
=>
{
getProDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getStatistics
()
this
.
getProLineMonitor
()
this
.
getStatistics
()
}
})
})
},
},
/** 选择按钮类型*/
/** 选择按钮类型*/
...
@@ -354,9 +362,11 @@ export default {
...
@@ -354,9 +362,11 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getProDetails
(
params
).
then
(
res
=>
{
getProDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getStatistics
()
this
.
getProLineMonitor
()
this
.
getStatistics
()
}
})
})
},
},
/** 统计占比echarts*/
/** 统计占比echarts*/
...
...
src/views/productionStatis/repairStatistics.vue
View file @
fc7bd542
...
@@ -248,6 +248,7 @@ export default {
...
@@ -248,6 +248,7 @@ export default {
logo
:
require
(
'@/assets/image/btnChose.png'
),
logo
:
require
(
'@/assets/image/btnChose.png'
),
choseType
:
'day'
,
choseType
:
'day'
,
dataList
:
[],
dataList
:
[],
getDateType
:
true
,
// 判断是否获取图表数据,防止接口请求中切换页面造成下个页面的echarts图污染
btnList
:
[
btnList
:
[
{
dictLabel
:
'日报'
,
dictLabelEnglish
:
'Daily'
,
dictValue
:
'day'
},
{
dictLabel
:
'日报'
,
dictLabelEnglish
:
'Daily'
,
dictValue
:
'day'
},
{
dictLabel
:
'周报'
,
dictLabelEnglish
:
'Weekly'
,
dictValue
:
'week'
},
{
dictLabel
:
'周报'
,
dictLabelEnglish
:
'Weekly'
,
dictValue
:
'week'
},
...
@@ -285,6 +286,9 @@ export default {
...
@@ -285,6 +286,9 @@ export default {
})
})
})
})
},
},
beforeDestroy
()
{
this
.
getDateType
=
false
},
methods
:
{
methods
:
{
/** 导出按钮操作*/
/** 导出按钮操作*/
handleExport
()
{
handleExport
()
{
...
@@ -321,8 +325,10 @@ export default {
...
@@ -321,8 +325,10 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getDataDetails
(
params
).
then
(
res
=>
{
getDataDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getProLineMonitor
()
}
})
})
},
},
/** 更改筛选时间*/
/** 更改筛选时间*/
...
@@ -333,8 +339,10 @@ export default {
...
@@ -333,8 +339,10 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getDataDetails
(
params
).
then
(
res
=>
{
getDataDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getProLineMonitor
()
}
})
})
},
},
/** 选择按钮类型*/
/** 选择按钮类型*/
...
@@ -348,8 +356,10 @@ export default {
...
@@ -348,8 +356,10 @@ export default {
type
:
this
.
choseType
type
:
this
.
choseType
}
}
getDataDetails
(
params
).
then
(
res
=>
{
getDataDetails
(
params
).
then
(
res
=>
{
this
.
dataList
=
res
.
data
if
(
this
.
getDateType
===
true
)
{
this
.
getProLineMonitor
()
this
.
dataList
=
res
.
data
this
.
getProLineMonitor
()
}
})
})
},
},
/** 生产线监控*/
/** 生产线监控*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment