Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pt-tobacco-lims-web
Overview
Overview
Details
Activity
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
wangweidong
pt-tobacco-lims-web
Commits
55b58f83
Commit
55b58f83
authored
Jun 06, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了登录页面和首页
parent
4af81ac8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
224 additions
and
0 deletions
+224
-0
index.vue
pages/index.vue
+224
-0
No files found.
pages/index.vue
View file @
55b58f83
...
@@ -212,6 +212,230 @@
...
@@ -212,6 +212,230 @@
<!--
<a
@
click=
"_goto"
>
跳转
</a>
-->
<!--
<a
@
click=
"_goto"
>
跳转
</a>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
import
{
drugStatistics
}
from
'../api'
import
{
test
,
waveImg
,
histogram
,
saleImg
,
salesTrendImg
,
visitImg
}
from
'../api/homePage'
export
default
{
data
()
{
return
{
value
:
''
,
dateValue
:
''
,
value2
:
''
,
range
:
'本月'
,
activeName
:
'first'
,
queryRange
:
{
day
:
undefined
,
week
:
undefined
,
month
:
'month'
,
year
:
undefined
,
beginDate
:
undefined
,
endDate
:
undefined
},
date
:
[
'今天'
,
'本周'
,
'本月'
,
'本年'
],
clickName
:
[
'_rangeDayChange'
,
'_rangeWeekChange'
,
'_rangeMonthChange'
,
'_rangeYearChange'
],
pitch
:
'_rangeDayChange'
,
personalData
:
[],
itemNotOk
:
[],
sampleItemNum
:
{},
sampleList
:
[
// { name: '胖大海', number: 700 },
// { name: '39感冒灵', number: 670 },
// { name: '三七', number: 410 },
// { name: '丁香', number: 400 },
// { name: '人血白蛋白成品', number: 300 },
// { name: '人血白蛋白原液', number: 296 }
]
}
},
mounted
()
{
this
.
_getData
()
this
.
_getSampleRank
()
this
.
_getItemFail
()
this
.
_getSampleItemNum
()
test
()
},
beforeDestroy
()
{
// this.myChart.clear()
},
methods
:
{
dateChange
()
{
console
.
log
(
'时间组件被点击'
)
if
(
this
.
dateValue
===
null
)
{
this
.
_rangeMonthChange
()
}
else
{
this
.
beginDate
=
this
.
dateValue
[
0
]
this
.
endDate
=
this
.
dateValue
[
1
]
console
.
log
((
this
.
range
=
this
.
beginDate
+
'至'
+
this
.
endDate
))
}
},
Gather
(
index
)
{
this
.
pitch
=
index
},
_getData
:
async
function
()
{
const
result
=
await
drugStatistics
.
getPersonalData
({})
if
(
result
)
{
this
.
personalData
=
result
if
(
result
.
listSeven
)
{
waveImg
(
result
.
listSeven
)
}
if
(
result
.
listSevenReceive
)
{
histogram
(
result
.
listSevenReceive
)
}
}
},
_getSampleRank
:
async
function
()
{
const
result
=
await
drugStatistics
.
getSampleRank
(
this
.
queryRange
)
if
(
result
)
{
console
.
log
(
'_getSampleRank'
,
result
)
this
.
sampleList
=
result
salesTrendImg
(
result
)
}
},
_getItemFail
:
async
function
()
{
const
result
=
await
drugStatistics
.
getItemFail
(
this
.
queryRange
)
if
(
result
)
{
console
.
log
(
'getItemFail'
,
result
)
this
.
itemNotOk
=
result
saleImg
(
result
)
}
},
_getSampleItemNum
:
async
function
()
{
const
result
=
await
drugStatistics
.
getSampleItemNum
(
this
.
queryRange
)
if
(
result
)
{
this
.
sampleItemNum
=
result
visitImg
(
result
)
}
},
_rangeDayChange
(
data
)
{
this
.
pitch
=
'_rangeDayChange'
this
.
dateValue
=
''
this
.
range
=
'今日'
this
.
queryRange
=
{
day
:
'day'
,
week
:
undefined
,
month
:
undefined
,
year
:
undefined
,
beginDate
:
undefined
,
endDate
:
undefined
}
this
.
_getItemFail
()
this
.
_getSampleRank
()
},
_rangeWeekChange
(
data
)
{
this
.
pitch
=
'_rangeWeekChange'
this
.
dateValue
=
''
this
.
range
=
'本周'
this
.
queryRange
=
{
day
:
undefined
,
week
:
'week'
,
month
:
undefined
,
year
:
undefined
,
beginDate
:
undefined
,
endDate
:
undefined
}
this
.
_getItemFail
()
this
.
_getSampleRank
()
},
_rangeMonthChange
(
data
)
{
this
.
pitch
=
'_rangeMonthChange'
this
.
dateValue
=
''
this
.
range
=
'本月'
this
.
queryRange
=
{
day
:
undefined
,
week
:
undefined
,
month
:
'month'
,
year
:
undefined
,
beginDate
:
undefined
,
endDate
:
undefined
}
this
.
_getItemFail
()
this
.
_getSampleRank
()
},
_rangeYearChange
(
data
)
{
this
.
pitch
=
'_rangeYearChange'
this
.
dateValue
=
''
this
.
range
=
'本年'
this
.
queryRange
=
{
day
:
undefined
,
week
:
undefined
,
month
:
undefined
,
year
:
'year'
,
beginDate
:
undefined
,
endDate
:
undefined
}
this
.
_getItemFail
()
this
.
_getSampleRank
()
}
}
}
</
script
>
<
style
scoped
>
.actived
{
color
:
red
!important
;
}
.serial
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
background-color
:
#f5f5f5
;
line-height
:
30px
;
border
:
0px
solid
black
;
border-radius
:
48px
;
margin-right
:
3px
;
color
:
white
;
}
.databox
{
margin-left
:
20px
;
}
.el-date-editor
.el-range-separator
{
width
:
100px
!important
;
}
.shopNameList
li
:nth-child
(
-n
+
3
)
.serial
{
background-color
:
#3398db
;
}
/*.el-row {*/
/* margin-bottom: 20px;*/
/*}*/
/*.el-col {*/
/* border-radius: 4px;*/
/*}*/
/*.bg-purple-dark {*/
/* background: #99a9bf;*/
/*}*/
.bg-purple
{
background
:
#d3dce6
;
}
/*.bg-purple-light {*/
/* background: #e5e9f2;*/
/*}*/
.grid-content
{
border-radius
:
4px
;
min-height
:
36px
;
background-color
:
#f5f7f9
;
}
/*.row-bg {*/
/* padding: 10px 0;*/
/* background-color: #f9fafc;*/
/*}*/
</
style
>
<
style
>
.databox
.el-range-separator
{
padding
:
0px
;
}
</
style
>
<!--<script>-->
<!--<script>-->
<!--import global from '../api/config'-->
<!--import global from '../api/config'-->
<!--export default {-->
<!--export default {-->
...
...
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