Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shld-databoard-ui
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
潘自豪 Rambo Pan
shld-databoard-ui
Commits
7ff13d40
Commit
7ff13d40
authored
Jul 31, 2024
by
xuzhuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏当日订单量跳转
parent
de84c4d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
26 deletions
+31
-26
apiList.js
src/module/api/apiList.js
+7
-0
department-shipment.vue
src/module/databoard/databoard/department-shipment.vue
+10
-23
turnoverDetail.js
src/module/databoard/databoard/turnoverDetail.js
+14
-3
No files found.
src/module/api/apiList.js
View file @
7ff13d40
...
...
@@ -150,6 +150,13 @@ export const getDepartmentShipmentWeight = (department_code, cur_day) => fetch('
,
department_code
:
department_code
}
},
'POST'
);
//折线图目标量
export
const
getDepartmentTargetWeight
=
(
department_code
,
year
)
=>
fetch
(
'/api/query/*/action/get_department_target_weight'
,
{
aux
:
{
year
:
year
,
department_code
:
department_code
}
},
'POST'
);
src/module/databoard/databoard/department-shipment.vue
View file @
7ff13d40
<
template
>
<div
class=
"target-achievement"
>
<div
class=
"menu"
>
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L022'}" value="上海事业部"
@click="changeDimension('L022')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L026'}" value="广东事业部"
@click="changeDimension('L026')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L024'}" value="江苏事业部"
@click="changeDimension('L024')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L025'}" value="天津事业部"
@click="changeDimension('L025')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L004'}" value="成都事业部"
@click="changeDimension('L004')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L025'}" value="山东事业部"
@click="changeDimension('L005')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L007'}" value="河南事业部"
@click="changeDimension('L007')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L008'}" value="华西事业部"
@click="changeDimension('L008')">
<input
type=
"button"
:class=
"
{'selectedBtn': currentBtn === 'L009'}" value="湛江事业部"
@click="changeDimension('L009')">
<input
type=
"button"
value=
"上海事业部"
@
click=
"changeDimension('L022')"
>
<input
type=
"button"
value=
"广东事业部"
@
click=
"changeDimension('L026')"
>
<input
type=
"button"
value=
"江苏事业部"
@
click=
"changeDimension('L024')"
>
<input
type=
"button"
value=
"天津事业部"
@
click=
"changeDimension('L025')"
>
<input
type=
"button"
value=
"成都事业部"
@
click=
"changeDimension('L004')"
>
<input
type=
"button"
value=
"山东事业部"
@
click=
"changeDimension('L005')"
>
<input
type=
"button"
value=
"河南事业部"
@
click=
"changeDimension('L007')"
>
<input
type=
"button"
value=
"华西事业部"
@
click=
"changeDimension('L008')"
>
<input
type=
"button"
value=
"湛江事业部"
@
click=
"changeDimension('L009')"
>
</div>
<div
class=
"chart"
>
<div
ref=
"chart"
style=
"width: 100%;height: 100%;"
/>
...
...
@@ -77,7 +68,7 @@ export default {
//dimension 事业部code
async
changeDimension
(
dimension
)
{
this
.
currentBtn
=
dimension
;
this
.
chart
.
dispose
();
//
this.chart.dispose();
let
chartDom
=
this
.
$refs
.
chart
;
this
.
chart
=
echarts
.
init
(
chartDom
);
...
...
@@ -93,10 +84,6 @@ export default {
},
},
getEcharts
()
{
this
.
changeDimension
(
'L022'
);
},
mounted
()
{
setTimeout
(()
=>
{
let
chartDom
=
this
.
$refs
.
chart
;
...
...
src/module/databoard/databoard/turnoverDetail.js
View file @
7ff13d40
...
...
@@ -8,7 +8,7 @@ import {
getBusinessConditionDatasByYear
,
getAllTypeBusinessConditionDatasByYear
,
getAllTypeBusinessConditionDetailByYear
,
getBusinessConditionDatasByYoy
,
getDepartmentShipmentWeight
getBusinessConditionDatasByYoy
,
getDepartmentShipmentWeight
,
getDepartmentTargetWeight
}
from
"../../api/apiList"
;
import
{
calc_hb_str
,
calc_tb_str
,
conver_amont
}
from
"../../utils/numUtil"
;
import
moment
from
'moment'
...
...
@@ -412,7 +412,7 @@ export const adapterYoySumData = function (type, data) {
}
}
export
const
adapterXAxisData2
=
function
(
color
,
data
)
{
export
const
adapterXAxisData2
=
function
(
color
,
data
,
targetValue
)
{
return
{
type
:
'category'
,
axisTick
:
{
...
...
@@ -424,6 +424,13 @@ export const adapterXAxisData2 = function (color, data) {
color
:
color
}
},
axisPointer
:
{
label
:
{
formatter
:
function
(
params
)
{
return
params
.
seriesData
[
0
].
name
+
' 目标量:'
+
targetValue
;
}
}
},
data
:
data
}
}
...
...
@@ -535,6 +542,7 @@ export const initDetail = function () {
export
const
getShipmentWeight
=
async
function
(
department_code
,
cur_day
)
{
let
pageData
=
[];
//曲线图数据
let
response
=
await
getDepartmentShipmentWeight
(
department_code
,
cur_day
);
var
xAxisData
=
[];
var
line1
=
[];
...
...
@@ -548,7 +556,10 @@ export const getShipmentWeight = async function (department_code, cur_day) {
series
.
push
(
adapterSeriesData
(
null
,
"完成量"
,
line1
));
series
.
push
(
adapterSeriesData
(
null
,
"未完成量"
,
line2
));
var
xAxis
=
[];
xAxis
.
push
(
adapterXAxisData2
(
"#00bbe5"
,
xAxisData
));
//目标量
let
targetResp
=
await
getDepartmentTargetWeight
(
department_code
,
new
Date
().
getFullYear
());
var
target
=
targetResp
.
data
?
targetResp
.
data
.
settle_weight_sum
:
'无'
;
xAxis
.
push
(
adapterXAxisData2
(
"#00bbe5"
,
xAxisData
,
target
));
var
seriesBar
=
[];
seriesBar
.
push
(
adapterSeriesDataBar
(
null
,
"完成量"
,
line1
));
...
...
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