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
8da7109a
Commit
8da7109a
authored
Sep 14, 2023
by
潘自豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改接口请求工具类
parent
6d2a50a0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
10 deletions
+61
-10
package-lock.json
package-lock.json
+25
-0
package.json
package.json
+2
-0
apiList.js
src/module/api/apiList.js
+9
-0
fetch.js
src/module/api/fetch.js
+4
-1
ring-pie-chart.vue
src/module/databoard/components/chart/ring-pie-chart.vue
+1
-1
turnover-detail.vue
src/module/databoard/databoard/turnover-detail.vue
+1
-1
index.vue
src/module/databoard/index.vue
+19
-7
No files found.
package-lock.json
View file @
8da7109a
...
...
@@ -14,8 +14,10 @@
"js-base64"
:
"^3.7.5"
,
"js-md5"
:
"^0.7.3"
,
"materialize-css"
:
"^0.98.2"
,
"moment"
:
"^2.29.4"
,
"vue"
:
"^2.3.3"
,
"vue-axios"
:
"^3.5.2"
,
"vue-cookies"
:
"^1.8.3"
,
"vue-router"
:
"^2.3.1"
},
"devDependencies"
:
{
...
...
@@ -5295,6 +5297,14 @@
"mkdirp"
:
"bin/cmd.js"
}
},
"node_modules/moment"
:
{
"version"
:
"2.29.4"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.29.4.tgz"
,
"integrity"
:
"sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
,
"engines"
:
{
"node"
:
"*"
}
},
"node_modules/move-concurrently"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz"
,
...
...
@@ -8889,6 +8899,11 @@
"vue"
:
"^3.0.0 || ^2.0.0"
}
},
"node_modules/vue-cookies"
:
{
"version"
:
"1.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-cookies/-/vue-cookies-1.8.3.tgz"
,
"integrity"
:
"sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA=="
},
"node_modules/vue-hot-reload-api"
:
{
"version"
:
"2.3.4"
,
"resolved"
:
"https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
,
...
...
@@ -14358,6 +14373,11 @@
"minimist"
:
"^1.2.6"
}
},
"moment"
:
{
"version"
:
"2.29.4"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.29.4.tgz"
,
"integrity"
:
"sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
"move-concurrently"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz"
,
...
...
@@ -17354,6 +17374,11 @@
"integrity"
:
"sha512-GP+dct7UlAWkl1qoP3ppw0z6jcSua5/IrMpjB5O8bh089iIiJ+hdxPYH2NPEpajlYgkW5EVMP95ttXWdas1O0g=="
,
"requires"
:
{}
},
"vue-cookies"
:
{
"version"
:
"1.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-cookies/-/vue-cookies-1.8.3.tgz"
,
"integrity"
:
"sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA=="
},
"vue-hot-reload-api"
:
{
"version"
:
"2.3.4"
,
"resolved"
:
"https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
,
...
...
package.json
View file @
8da7109a
...
...
@@ -16,8 +16,10 @@
"
js-base64
"
:
"
^3.7.5
"
,
"
js-md5
"
:
"
^0.7.3
"
,
"
materialize-css
"
:
"
^0.98.2
"
,
"
moment
"
:
"
^2.29.4
"
,
"
vue
"
:
"
^2.3.3
"
,
"
vue-axios
"
:
"
^3.5.2
"
,
"
vue-cookies
"
:
"
^1.8.3
"
,
"
vue-router
"
:
"
^2.3.1
"
},
"devDependencies"
:
{
...
...
src/module/api/apiList.js
View file @
8da7109a
...
...
@@ -20,3 +20,12 @@ export const userLogin = (username, pass, captchaSign, verificationcode, captcha
}
},
'POST'
);
export
const
getBusinessConditionDatas
=
(
cur_day
)
=>
fetch
(
'/api/query/*/action/get_business_condition_datas'
,
{
aux
:
{
cur_day
:
cur_day
}
},
'POST'
);
src/module/api/fetch.js
View file @
8da7109a
import
VueCookies
from
"vue-cookies"
;
export
default
async
(
url
=
''
,
data
=
{},
type
=
'GET'
,
method
=
'fetch'
)
=>
{
let
baseUrl
=
''
;
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
...
...
@@ -26,7 +28,8 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => {
method
:
type
,
headers
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
,
'X-XSRF-TOKEN'
:
VueCookies
.
get
(
"XSRF-TOKEN"
)
},
mode
:
"cors"
,
cache
:
"force-cache"
...
...
src/module/databoard/components/chart/ring-pie-chart.vue
View file @
8da7109a
...
...
@@ -2,7 +2,7 @@
<div
ref=
"chart"
style=
"width: 100%;height: 50%;"
@
click=
""
/>
</
template
>
<
script
>
import
*
as
echarts
from
"
_echarts@5.4.3@
echarts"
;
import
*
as
echarts
from
"echarts"
;
export
default
{
name
:
"RingPieChart"
,
...
...
src/module/databoard/databoard/turnover-detail.vue
View file @
8da7109a
...
...
@@ -25,7 +25,7 @@
import
TitleContentMark
from
"../components/layout/title-content-mark.vue"
;
import
TableColumn
from
"../components/table/table-column.vue"
;
import
ContrastCard
from
"../components/card/contrast-card.vue"
;
import
*
as
echarts
from
"
_echarts@5.4.3@
echarts"
;
import
*
as
echarts
from
"echarts"
;
export
default
{
name
:
"TurnoverDetail"
,
...
...
src/module/databoard/index.vue
View file @
8da7109a
...
...
@@ -105,6 +105,9 @@ import WinnersList from "./components/card/winners-list.vue";
import
TitleContentMark
from
"./components/layout/title-content-mark.vue"
;
import
TableColumn
from
"./components/table/table-column.vue"
;
import
RingPieChart
from
"./components/chart/ring-pie-chart.vue"
;
import
{
getBusinessConditionDatas
}
from
"../api/apiList"
;
import
moment
from
"moment"
;
import
VueCookies
from
"vue-cookies"
;
export
default
{
components
:
{
...
...
@@ -120,6 +123,7 @@ export default {
},
data
()
{
return
{
today
:
moment
().
format
(
"yyyy-MM-DD"
),
mockData
:
{
yyqk
:
{
yye
:
{
...
...
@@ -341,24 +345,24 @@ export default {
{
value
:
484
,
name
:
'水运'
},
],
customer
:
[
{
value
:
500
,
name
:
'上海欧冶物流股份有限公司'
},
{
value
:
2500
,
name
:
'宝钢运输部'
},
{
value
:
1100
,
name
:
'宝山钢铁股份有限公司'
},
{
value
:
500
,
name
:
'上海欧冶物流股份有限公司'
},
{
value
:
2500
,
name
:
'宝钢运输部'
},
{
value
:
1100
,
name
:
'宝山钢铁股份有限公司'
},
]
},
},
paths
:{
paths
:
{
"营业额"
:
"/turnover-detail"
,
"成本"
:
"/turnover-detail"
,
"毛利"
:
"/turnover-detail"
,
},
charts
:{}
charts
:
{}
}
},
methods
:
{
cellStyleFunction
(
data
)
{
let
res
=
{
color
:
'#5eeef4'
};
if
(
data
.
indexOf
(
'+'
)
!==
-
1
)
{
if
(
data
.
indexOf
(
'+'
)
!==
-
1
)
{
res
.
color
=
'#fee064'
}
return
res
;
...
...
@@ -368,12 +372,20 @@ export default {
this
.
charts
[
chartsKey
].
resize
();
}
},
routerTo
(
path
){
routerTo
(
path
)
{
console
.
log
(
path
)
this
.
$router
.
push
({
path
:
path
});
},
//营业情况
showBusinessConditionDatas
()
{
getBusinessConditionDatas
(
this
.
today
)
console
.
log
(
"--"
+
this
.
today
+
"--"
)
console
.
log
(
"cookies:"
+
VueCookies
.
keys
());
}
},
mounted
()
{
this
.
showBusinessConditionDatas
();
setTimeout
(()
=>
{
window
.
addEventListener
(
'resize'
,
this
.
resizeChart
);
},
500
)
...
...
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