Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_h5
Project
Project
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
godwithdh
WX_h5
Commits
e5761089
Commit
e5761089
authored
Dec 21, 2019
by
godwithdh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiip
parent
7d222bec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
3 deletions
+139
-3
apiMap.js
src/libs/apiMap.js
+5
-0
main.js
src/main.js
+1
-1
index.js
src/router/index.js
+16
-2
index.vue
src/view/tiip/IntReportForms/index.vue
+117
-0
No files found.
src/libs/apiMap.js
View file @
e5761089
...
@@ -64,5 +64,10 @@ const methodMap = {
...
@@ -64,5 +64,10 @@ const methodMap = {
getCipSalesinfo
:{
url
:
apiURL
(
'sales'
)
+
'/bianalysis/salesinfo/'
,
method
:
'get'
},
getCipSalesinfo
:{
url
:
apiURL
(
'sales'
)
+
'/bianalysis/salesinfo/'
,
method
:
'get'
},
getCipLiabilities
:{
url
:
apiURL
(
'sales'
)
+
'/bianalysis/liabilities/'
,
method
:
'get'
},
getCipLiabilities
:{
url
:
apiURL
(
'sales'
)
+
'/bianalysis/liabilities/'
,
method
:
'get'
},
/**
* tiip 小程序
*/
getTtipTotalamount
:{
url
:
apiURL
(
'default'
)
+
'/bianalysis/totalamount/'
,
method
:
'get'
},
};
};
export
default
methodMap
;
export
default
methodMap
;
src/main.js
View file @
e5761089
...
@@ -64,7 +64,7 @@ FastClick.attach(document.body)
...
@@ -64,7 +64,7 @@ FastClick.attach(document.body)
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
222
)
console
.
log
(
"router_beforeEach"
)
if
(
to
.
path
.
indexOf
(
'shopVersion'
)
!=
-
1
&&
to
.
params
.
hasOwnProperty
(
'iProjectId'
)){
if
(
to
.
path
.
indexOf
(
'shopVersion'
)
!=
-
1
&&
to
.
params
.
hasOwnProperty
(
'iProjectId'
)){
store
.
dispatch
(
'setIproject'
,
to
.
params
.
iProjectId
);
store
.
dispatch
(
'setIproject'
,
to
.
params
.
iProjectId
);
}
}
...
...
src/router/index.js
View file @
e5761089
...
@@ -277,7 +277,22 @@ let tipRoutes = [
...
@@ -277,7 +277,22 @@ let tipRoutes = [
}
}
},
},
]
]
}
},
{
//贸易智能报表
name
:
"main"
,
component
:()
=>
import
(
"@/view/main.vue"
),
path
:
"/main"
,
children
:[
{
path
:
"/tiip/IntReportForms/:iProjectId/:userId"
,
name
:
"IntReportForms"
,
component
:()
=>
import
(
"@/view/tiip/IntReportForms/index.vue"
),
meta
:{
title
:
"智能报表"
},
},
]
},
];
];
let
shopVersionRoutes
=
[
let
shopVersionRoutes
=
[
...
@@ -337,5 +352,4 @@ let shopVersionRoutes = [
...
@@ -337,5 +352,4 @@ let shopVersionRoutes = [
}
}
]
]
export
default
[...
tipRoutes
,...
shopVersionRoutes
];
export
default
[...
tipRoutes
,...
shopVersionRoutes
];
\ No newline at end of file
src/view/tiip/IntReportForms/index.vue
0 → 100644
View file @
e5761089
<
style
lang=
"less"
>
@import url('../../../styles/common.less');
#IntReportForms{
background:#f6f5f9;
height:100%;
display:flex;
flex-direction: column;
.HEADER{
padding:10px 10px 0 10px;
.items{
display: flex;
align-items: center;
.item{
flex:1;
display: flex;
flex-wrap: wrap;
overflow: hidden;
>span{
width:100%;
color:#aaa;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
}
.odd{
color: #708bf6;
font-size:26px;
}
.even{
color: #8470FF;
font-size:26px;
}
.contain{
display: flex;
flex-wrap: wrap;
margin-top:5px;
width:100%;
.TITLE{
color:#aaa;
}
>div{
width:100%;
display: flex;
>span{
flex:1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}
}
}
</
style
>
<
template
>
<div
id=
"IntReportForms"
>
<div
class=
"HEADER iCard"
>
<swiper
height=
"130px"
dots-position=
"center"
dots-class=
"custom-bottom"
>
<swiper-item
v-for=
"(v1,i1) in list"
:key=
'i1'
>
<div
class=
"items"
>
<div
class=
"item"
v-for=
"(v2,i2) in v1.child"
:key=
'i2'
>
<span>
{{
v2
.
title
}}
</span>
<span
:class=
"[i2 % 2 == 0 ? 'odd' : 'even']"
>
{{
v2
.
price
}}
</span>
<div
class=
"contain"
>
<div
class=
"TITLE"
>
<span>
单位
</span>
<span>
同比率
</span>
</div>
<div>
<span>
元
</span>
<span>
{{
v2
.
rate
}}
%
</span>
</div>
</div>
</div>
</div>
</swiper-item>
</swiper>
</div>
</div>
</
template
>
<
script
>
import
Util
from
'@/libs/util.js'
;
import
{
mapState
}
from
'vuex'
;
import
{
Swiper
,
SwiperItem
,
ButtonTab
,
ButtonTabItem
}
from
'vux'
;
export
default
{
name
:
"IntReportForms"
,
components
:{
Swiper
,
SwiperItem
,
ButtonTab
,
ButtonTabItem
},
data
(){
return
{
list
:[],
}
},
created
(){
this
.
$store
.
dispatch
(
'saveUserId'
,
this
.
$route
.
params
.
userId
);
this
.
$store
.
dispatch
(
'setIproject'
,
this
.
$route
.
params
.
iProjectId
);
},
computed
:{
...
mapState
({
iProjectId
:
state
=>
state
.
app
.
iProjectId
,
})
},
mounted
(){
this
.
$nextTick
(()
=>
{
this
.
init
()
})
},
methods
:{
async
init
(){
var
value
=
await
this
.
request
(
"getTtipTotalamount"
,{},
"加载中"
,{
iProjectId
:
this
.
iProjectId
});
console
.
log
(
value
)
},
}
}
</
script
>
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