Commit 94e57406 by 前端

fixed

1 parent 6f2e41a3
...@@ -29,40 +29,49 @@ Component({ ...@@ -29,40 +29,49 @@ Component({
data: { data: {
dataType: { dataType: {
crowType: [{ crowType: [{
label: '转发次数', label: '产值',
value: 1 value: 1
},{
label: '转发次数',
value: 2
}, { }, {
label: '访客总数', label: '访客总数',
value: 2 value: 3
}, { }, {
label: '浏览总数', label: '浏览总数',
value: 3 value: 4
}, { }, {
label: '成交单量', label: '成交单量',
value: 4 value: 5
}, { }, {
label: '转化率', label: '转化率',
value: 5 value: 6
}], }],
boutique: [{ boutique: [{
label: '单量', label: '产值',
value: 1 value: 1
},{
label: '单量',
value: 2
}, { }, {
label: '客单量', label: '客单量',
value: 2 value: 3
}, { }, {
label: '转化率', label: '转化率',
value: 3 value: 4
}], }],
equity: [{ equity: [{
label: '成交量', label: '产值',
value: 1 value: 1
},{
label: '成交量',
value: 2
}, { }, {
label: '报价量', label: '报价量',
value: 2 value: 3
}, { }, {
label: '转化率', label: '转化率',
value: 3 value: 4
}] }]
}, },
empName: '', empName: '',
...@@ -78,6 +87,7 @@ Component({ ...@@ -78,6 +87,7 @@ Component({
showUp() { showUp() {
this.setData({show:false}) this.setData({show:false})
}, },
//选择排序
selectType(e) { selectType(e) {
const {value,label} = e.target.dataset const {value,label} = e.target.dataset
this.setData({ this.setData({
...@@ -114,7 +124,6 @@ Component({ ...@@ -114,7 +124,6 @@ Component({
// 生成对应的表格数据 // 生成对应的表格数据
getDetail(val) { getDetail(val) {
let {tabelTh,dataType,selectValue,downType} = this.data,sortKey let {tabelTh,dataType,selectValue,downType} = this.data,sortKey
console.log(tabelTh)
for(let i in tabelTh) { for(let i in tabelTh) {
if(tabelTh[i] == dataType[downType][selectValue-1].label) { if(tabelTh[i] == dataType[downType][selectValue-1].label) {
sortKey = i sortKey = i
...@@ -123,22 +132,6 @@ Component({ ...@@ -123,22 +132,6 @@ Component({
const tableData = Util.deepClone(val).sort((a,b)=>{ const tableData = Util.deepClone(val).sort((a,b)=>{
return (b[sortKey]||0)-(a[sortKey]||0) return (b[sortKey]||0)-(a[sortKey]||0)
}) })
// let obj = {
// employeeName: '员工姓名',
// orderMoneyTotal: '产值(营业额)',
// upgradeCountTotal: '单量',
// averagePrice: '客单价',
// upgradeRatio: '转化率'
// }
// obj = {
// employeeName: '员工姓名',
// orderMoneyTotal: '产值(营业额)',
// upgradeCountTotal: '转发次数',
// averagePrice: '访客总数',
// upgradeRatio: '浏览总数',
// upgradeRatio: '成交单量',
// upgradeRatio: '转化率',
// }
const sfaffList = this.formatArr(tableData, (item) => { const sfaffList = this.formatArr(tableData, (item) => {
const result = [] const result = []
const obj_keys = Object.keys(tabelTh) const obj_keys = Object.keys(tabelTh)
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
.up-box { .up-box {
position: absolute; position: absolute;
width: 108rpx; width: 108rpx;
height: 160rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c; box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx; border-radius: 8rpx;
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
<view class='item_name'>{{item.name}}</view> <view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'> <view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl' || 'shareImageUrl'][lindex]}}"></image> <image wx:if="{{item.name == '员工'}}" src="{{item.list['avatarUrl' || 'shareImageUrl'][lindex]}}"></image>
<block>{{litem||'--'}}</block> <block wx:if="{{item.name == '转化率'}}">{{litem?(downType == 'equity'?litem*100:litem)+'%': '--'}}</block>
<block wx:else>{{litem||'--'}}</block>
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!