Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-vue
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-vue
Commits
068ad2d1
Commit
068ad2d1
authored
Oct 13, 2023
by
‘巴博尔’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页
parent
18d9cde6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
9 deletions
+82
-9
src/api/index.js
+15
-7
src/views/index.vue
+67
-2
No files found.
src/api/index.js
View file @
068ad2d1
...
...
@@ -117,9 +117,18 @@ export function companyPlistGet(query) {
// 设置时间
export
function
employeesSetWorkHourPut
(
data
)
{
return
request
({
url
:
"/merchant/app/employees/setWorkHour"
,
method
:
"put"
,
data
:
data
,
});
}
\ No newline at end of file
return
request
({
url
:
"/merchant/app/employees/setWorkHour"
,
method
:
"put"
,
data
:
data
,
});
}
// 机构
export
function
companyListGet
(
query
)
{
return
request
({
url
:
`/system/data/companyList`
,
method
:
"get"
,
params
:
query
,
});
}
src/views/index.vue
View file @
068ad2d1
...
...
@@ -8,7 +8,7 @@
<div
class=
"index-content-nav-item-top"
>
<h3>
所属城市
</h3>
</div>
<h2>
{{
cityName
?
cityName
:
''
}}
</h2>
<h2>
{{
cityName
?
cityName
:
""
}}
</h2>
</div>
</el-col>
<el-col
:span=
"4"
>
...
...
@@ -188,6 +188,40 @@
>
</el-option>
</el-select>
<template
v-if=
"user.roleId != 3"
>
<el-select
v-model=
"cityId"
placeholder=
"请选择城市"
style=
"margin-left: 15px; width: 10em"
filterable
clearable=
""
@
change=
"changeCtypChange"
>
<el-option
v-for=
"item in cityVoList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"companyId"
placeholder=
"请选择机构"
style=
"margin-left: 15px; width: 10em"
filterable
clearable=
""
@
change=
"orderQuantityEchartsAxios"
>
<el-option
v-for=
"item in companyList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</
template
>
</div>
</div>
<!-- <h2>总量:{{ sumF }}</h2> -->
...
...
@@ -232,6 +266,7 @@
import
*
as
echarts
from
"echarts"
;
require
(
"echarts/theme/macarons"
);
// echarts theme
import
resize
from
"./dashboard/mixins/resize"
;
import
{
cityVoListGET
}
from
"@/api/hispotalManage/hospital"
;
const
animationDuration
=
3000
;
import
{
dataUserGet
,
...
...
@@ -240,17 +275,22 @@ import {
platformRevenueGet
,
orderQuantityGet
,
orderQuantityEchartsGet
,
companyListGet
,
}
from
"@/api/index.js"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
name
:
"Index"
,
mixins
:
[
resize
],
computed
:
{
...
mapGetters
([
"user"
,
"cityName"
]),
...
mapGetters
([
"user"
,
"cityName"
]),
},
data
()
{
return
{
// 版本号
companyId
:
""
,
companyList
:
[],
cityVoList
:
[],
cityId
:
""
,
version
:
"4.8.0"
,
valueA
:
1
,
sumA
:
0
,
...
...
@@ -290,6 +330,7 @@ export default {
this
.
dataEmployeesAxios
();
if
(
this
.
user
.
roleId
!=
3
)
{
this
.
saleroomAxios
();
this
.
cityVoListAxios
();
}
this
.
platformRevenueAxios
();
this
.
orderQuantityAxios
();
...
...
@@ -303,6 +344,28 @@ export default {
this
.
chart
=
null
;
},
methods
:
{
changeCtypChange
()
{
this
.
companyId
=
''
this
.
companyList
=
[]
this
.
companyListAxios
()
},
async
companyListAxios
()
{
const
data_back
=
await
companyListGet
({
cityId
:
this
.
cityId
});
const
{
code
,
data
}
=
data_back
;
if
(
code
===
200
)
{
this
.
companyList
=
data
;
this
.
orderQuantityEchartsAxios
()
}
},
async
cityVoListAxios
()
{
const
data_back
=
await
cityVoListGET
();
const
{
code
,
data
}
=
data_back
;
if
(
code
===
200
)
{
this
.
cityVoList
=
data
;
}
},
changeDataer
(
e
)
{
console
.
log
(
"changeDataer"
,
e
);
if
(
!
e
)
{
...
...
@@ -319,6 +382,8 @@ export default {
async
orderQuantityEchartsAxios
()
{
let
params
=
{
type
:
this
.
valueF
,
cityId
:
this
.
cityId
,
companyId
:
this
.
companyId
,
};
if
([
0
,
1
].
includes
(
this
.
valueF
))
{
}
else
if
(
this
.
valueF
==
2
)
{
...
...
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