Commit e674ebd7 authored by 张锡奇's avatar 张锡奇
parents f6b9f17c da63f31a
......@@ -62,5 +62,10 @@ const methodMap = {
getCipSalesinfo:{url:'/bianalysis/salesinfo/',method:'get',host:'sales'},
getCipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'sales'},
/**
* tiip 小程序
*/
getTtipTotalamount:{url:apiURL('default')+'/bianalysis/totalamount/',method:'get'},
};
export default methodMap;
......@@ -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 = [
......@@ -337,5 +352,4 @@ let shopVersionRoutes = [
}
]
export default [...tipRoutes,...shopVersionRoutes];
\ No newline at end of file
<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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment