Browse Source

修改选择框回显问题

test
douzhuo 2 years ago
parent
commit
2498d42025
2 changed files with 78 additions and 64 deletions
  1. +1
    -3
      pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue
  2. +77
    -61
      pages/center/Piabodata/TrendAnalysis.vue

+ 1
- 3
pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue View File

@@ -42,9 +42,7 @@
</view> </view>
</view> </view>
<view v-if="Showhiddenunits">
<u-select v-model="Showhiddenunits" mode="single-column" :list="selectlist" @confirm="confirm"></u-select>
</view>
<u-select v-model="Showhiddenunits" mode="single-column" :list="selectlist" @confirm="confirm"></u-select>
</view> </view>
</template> </template>




+ 77
- 61
pages/center/Piabodata/TrendAnalysis.vue View File

@@ -44,17 +44,19 @@
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
<view class="boxzonglan" style="min-height: 100rpx;"> <view class="boxzonglan" style="min-height: 100rpx;">
<view class="zonglantit">简报</view> <view class="zonglantit">简报</view>
<view class="zonglanbox" >
<view class="grid" v-for="(item,index) in numlist" :key="index" style="height: auto;padding-bottom: 20rpx;">
<view class="zonglanbox">
<view class="grid" v-for="(item,index) in numlist" :key="index"
style="height: auto;padding-bottom: 20rpx;">
<view class="audonum" v-if="item.name=='接待时长'">{{item.name}}/分</view> <view class="audonum" v-if="item.name=='接待时长'">{{item.name}}/分</view>
<view class="audonum" v-else>{{item.name}}</view> <view class="audonum" v-else>{{item.name}}</view>
<view class="num" >
<view class="num">
<view class="" style="width: 35%;"> <view class="" style="width: 35%;">
{{index==1?item.num+'%':item.num}} {{index==1?item.num+'%':item.num}}
</view> </view>
<view class="comparesize" v-if="compareFlag&&timepickpickisshow"> <view class="comparesize" v-if="compareFlag&&timepickpickisshow">
<text style="margin-right: 10rpx;">对比:{{index==1?item.num1+'%':item.num1}} </text> <text style="margin-right: 10rpx;">对比:{{index==1?item.num1+'%':item.num1}} </text>
<text :style="{color:item.num2*1>0?'red':'green'}">{{item.num2+'%'}} {{item.num2*1>0?'↑':'↓'}}</text>
<text :style="{color:item.num2*1>0?'red':'green'}">{{item.num2+'%'}}
{{item.num2*1>0?'↑':'↓'}}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -81,7 +83,8 @@




<view class="chart"> <view class="chart">
<view style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;margin-top: 16rpx;"
<view
style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;margin-top: 16rpx;"
v-if="guwenshow&&lopanobj.name" @click="oninputtap()"> v-if="guwenshow&&lopanobj.name" @click="oninputtap()">
<view class="title2-che" style="width: 220rpx;">{{lopanobj.name}} <view class="title2-che" style="width: 220rpx;">{{lopanobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
@@ -106,7 +109,7 @@
</view> </view>
</view> --> </view> -->
</view> </view>


<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;"> <view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;">
<view>选择二级:</view> <view>选择二级:</view>
@@ -127,8 +130,8 @@
</view> </view>
</view> </view>


<view style="display: flex;align-items: center;height: 80rpx;justify-content: center;" v-if="Selecttuandui&&Selecttuanduiobj.name"
@click="oninputtap4()">
<view style="display: flex;align-items: center;height: 80rpx;justify-content: center;"
v-if="Selecttuandui&&Selecttuanduiobj.name" @click="oninputtap4()">
<view class="title2-che" style="width: 220rpx;">{{Selecttuanduiobj.name}} <view class="title2-che" style="width: 220rpx;">{{Selecttuanduiobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view> </view>
@@ -137,11 +140,12 @@


<view class="single"> <view class="single">
<!-- <view class="danwei" style="margin-top: 10rpx;">销讲词执行率</view> --> <!-- <view class="danwei" style="margin-top: 10rpx;">销讲词执行率</view> -->
<view class="uchaserbox" :class="{ uchaserboxs : newactiveTotal == 1 || newactiveTotal == 3 }" v-if="lineOptsect.series.length!=0">
<view class="uchaserbox" :class="{ uchaserboxs : newactiveTotal == 1 || newactiveTotal == 3 }"
v-if="lineOptsect.series.length!=0">


<qiun-data-charts :style="!showCanvas?'display:none':''" :type="linetype" :chartData="lineOptsect"
background="none" :ontouch="true" canvasId="wangxiaohuaerlingeryilingwuyibao" :opts="opts"
:canvas2d="true" />
<qiun-data-charts :style="!showCanvas?'display:none':''" :type="linetype" :chartData="lineOptsect"
background="none" :ontouch="true" canvasId="wangxiaohuaerlingeryilingwuyibao" :opts="opts"
:canvas2d="true" />
</view> </view>
<view v-else style="width: 100%;"> <view v-else style="width: 100%;">
<view style="width: 100%;text-align: center;"> <view style="width: 100%;text-align: center;">
@@ -167,20 +171,25 @@
style="border-right:1px solid #E0E0E0;">{{item1}}</view> style="border-right:1px solid #E0E0E0;">{{item1}}</view>
<view v-if="index>0 && index1==item.length-1" class="td" <view v-if="index>0 && index1==item.length-1" class="td"
style="border-right:1px solid #E0E0E0;" :style="{color:item1*1>0?'red':'green'}"> style="border-right:1px solid #E0E0E0;" :style="{color:item1*1>0?'red':'green'}">
{{item1==0?'--':item1+'%'}}{{item1*1>0?'↑':item1*1<0?'↓':''}}</view>
{{item1==0?'--':item1+'%'}}{{item1*1>0?'↑':item1*1<0?'↓':''}}
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="table" v-if="guwenFlag" style="width: 100%;"> <view class="table" v-if="guwenFlag" style="width: 100%;">
<scroll-view scroll-x="true" style="white-space: nowrap;">
<view v-for="(item,index) in tableDate" :key="index" :style="{display:index==0?'inline-block':'block'}">
<scroll-view scroll-x="true" style="white-space: nowrap;">
<view v-for="(item,index) in tableDate" :key="index"
:style="{display:index==0?'inline-block':'block'}">
<view class="tr" style="display: inline-block;"> <view class="tr" style="display: inline-block;">
<view v-for="(item1,index1) in item" :key="index1" class="trd" style="display: inline-block;">
<view v-for="(item1,index1) in item" :key="index1" class="trd"
style="display: inline-block;">
<view v-if="index==1&&index1>0" class="td" :style="{color:item1*1>0?'red':'green'}" <view v-if="index==1&&index1>0" class="td" :style="{color:item1*1>0?'red':'green'}"
style="border-right:1px solid #E0E0E0;">{{item1==0?'--':item1+'%'}}{{item1*1>0?'↑':item1*1<0?'↓':''}}</view>
style="border-right:1px solid #E0E0E0;">
{{item1==0?'--':item1+'%'}}{{item1*1>0?'↑':item1*1<0?'↓':''}}</view>
<view v-else-if="index>1&&index1>0" class="td" style="border-right:1px solid #E0E0E0;"> <view v-else-if="index>1&&index1>0" class="td" style="border-right:1px solid #E0E0E0;">
{{item1+'%'}}</view>
{{item1+'%'}}
</view>
<view v-else class="td" style="border-right:1px solid #E0E0E0;">{{item1}}</view> <view v-else class="td" style="border-right:1px solid #E0E0E0;">{{item1}}</view>
</view> </view>
</view> </view>
@@ -190,22 +199,18 @@


</view> </view>
<view style="width: 100%;height: 60rpx;"></view> <view style="width: 100%;height: 60rpx;"></view>
<view v-if="Showhiddenunits">
<u-select v-model="Showhiddenunits" mode="single-column" :list="selectlist" @confirm="confirm">
</u-select>
</view>
<view v-if="Showhiddenunits2">
<u-select v-model="Showhiddenunits2" mode="single-column" :list="selectlist2" @confirm="confirm2">
</u-select>
</view>
<view v-if="Showhiddenunits3">
<u-select v-model="Showhiddenunits3" mode="single-column" :list="selectlist3" @confirm="confirm3">
</u-select>
</view>
<view v-if="Showhiddenunits4">
<u-select v-model="Showhiddenunits4" mode="single-column" :list="selectlist4" @confirm="confirm4">
</u-select>
</view>
<u-select v-model="Showhiddenunits" mode="single-column" :list="selectlist" @confirm="confirm"
:default-value="selindex">
</u-select>
<u-select v-model="Showhiddenunits2" mode="single-column" :list="selectlist2" @confirm="confirm2"
:default-value="selindex">
</u-select>
<u-select v-model="Showhiddenunits3" mode="single-column" :list="selectlist3" @confirm="confirm3"
:default-value="selindex">
</u-select>
<u-select v-model="Showhiddenunits4" mode="single-column" :list="selectlist4" @confirm="confirm4"
:default-value="selindex">
</u-select>
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2"> <newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2">
</newcalendar> </newcalendar>
@@ -369,7 +374,7 @@
} }
this.activeTotal = 8; this.activeTotal = 8;
}, },
init() { init() {
this.$u.post("/cusLvStatistics/lyAndcp", this.pamect).then(data => { this.$u.post("/cusLvStatistics/lyAndcp", this.pamect).then(data => {
this.pamect.lastStartDate = data.lastStartDate; this.pamect.lastStartDate = data.lastStartDate;
@@ -377,16 +382,16 @@
this.numlist[0].num = data.startSumCustomer this.numlist[0].num = data.startSumCustomer
this.numlist[1].num = data.startFraction; this.numlist[1].num = data.startFraction;


this.numlist[2].num = Math.floor(data.startSumDuration/60) || 0;
this.numlist[2].num = Math.floor(data.startSumDuration / 60) || 0;
if (data.endSumDuration != null) { if (data.endSumDuration != null) {
this.compareFlag = true this.compareFlag = true
// return // return
this.numlist[0].num1 = data.endSumCustomer this.numlist[0].num1 = data.endSumCustomer
this.numlist[1].num1 = data.endFraction; this.numlist[1].num1 = data.endFraction;
this.numlist[2].num1 = Math.floor(data.endSumDuration/60) || 0;
this.numlist[2].num1 = Math.floor(data.endSumDuration / 60) || 0;
this.numlist[0].num2 = data.contrastSumCustomer this.numlist[0].num2 = data.contrastSumCustomer
this.numlist[1].num2 = data.contrastFraction; this.numlist[1].num2 = data.contrastFraction;
this.numlist[2].num2 = data.contrastSumDuration|| 0;
this.numlist[2].num2 = data.contrastSumDuration || 0;
} else { } else {
this.compareFlag = false this.compareFlag = false
} }
@@ -547,7 +552,7 @@
this.guwenshow = false; this.guwenshow = false;
this.Selectlevel = false; this.Selectlevel = false;
this.Selecttuandui = false; this.Selecttuandui = false;
this.tableDate=[]
this.tableDate = []
this.pamect.showStatus = 0; this.pamect.showStatus = 0;
this.pamect.timeType = "4"; this.pamect.timeType = "4";
this.pamect.firstStartDate = ''; this.pamect.firstStartDate = '';
@@ -606,7 +611,8 @@
data.lastValue.forEach((child, zxc) => { data.lastValue.forEach((child, zxc) => {
if (sdf == zxc) { if (sdf == zxc) {
that.lineOptsect.categories.push( that.lineOptsect.categories.push(
child.statDate.substring(5,10) + 'vs' + item.statDate.substring(5, 10)
child.statDate.substring(5, 10) + 'vs' + item.statDate
.substring(5, 10)
) )
} }
}) })
@@ -625,7 +631,8 @@
// }, // },
] ]
that.lineOptsect.categories.map((item, index) => { that.lineOptsect.categories.map((item, index) => {
let newarr = [item, data.lastValue[index].fraction, data.firstValue[index].fraction,data.contrast[index].data
let newarr = [item, data.lastValue[index].fraction, data.firstValue[index]
.fraction, data.contrast[index].data
] ]
// obj.time=item // obj.time=item
// obj.time1=data.firstValue[index].fraction // obj.time1=data.firstValue[index].fraction
@@ -651,7 +658,7 @@
// return // return
let max = data.firstList[0].total let max = data.firstList[0].total
for (let i = 0; i < data.firstList.length; i++) { for (let i = 0; i < data.firstList.length; i++) {
if(max < data.firstList[i]) max = data.firstList[i];
if (max < data.firstList[i]) max = data.firstList[i];
} }
this.opts = { this.opts = {
fontSize: 10, fontSize: 10,
@@ -712,7 +719,7 @@
arr[1].push(data.thirdList[index].total) arr[1].push(data.thirdList[index].total)
}) })
that.tableDate = arr that.tableDate = arr
console.log(this.lineOptsect, 'console.log(this.lineOptsect)') console.log(this.lineOptsect, 'console.log(this.lineOptsect)')
} }


@@ -836,9 +843,10 @@
data.firstList.forEach((item, sdf) => { data.firstList.forEach((item, sdf) => {
data.lastList.forEach((child, zxc) => { data.lastList.forEach((child, zxc) => {
if (sdf == zxc) { if (sdf == zxc) {
this.lineOptsect.categories.push(
child.statDate.substring(5,10) + 'vs' + item.statDate.substring(5, 10)
)
this.lineOptsect.categories.push(
child.statDate.substring(5, 10) + 'vs' + item.statDate
.substring(5, 10)
)
} }
}) })
}) })
@@ -852,7 +860,9 @@
] ]
that.lineOptsect.categories.map((item, index) => { that.lineOptsect.categories.map((item, index) => {
let newarr = [item, data.lastList[ let newarr = [item, data.lastList[
index].avgExecutionRate, data.firstList[index].avgExecutionRate, data.contrast[index].data]
index].avgExecutionRate, data.firstList[index].avgExecutionRate,
data.contrast[index].data
]
arr.push(newarr) arr.push(newarr)
}) })
// console.log(arr) // console.log(arr)
@@ -1065,7 +1075,8 @@
data.lastValue.receptionStatList.forEach((child, zxc) => { data.lastValue.receptionStatList.forEach((child, zxc) => {
if (sdf == zxc) { if (sdf == zxc) {
that.lineOptsect.categories.push( that.lineOptsect.categories.push(
child.statDate.substring(5,10) + 'vs' + item.statDate.substring(5, 10)
child.statDate.substring(5, 10) + 'vs' + item
.statDate.substring(5, 10)
) )
} }
}) })
@@ -1087,8 +1098,9 @@
// }, // },
] ]
that.lineOptsect.categories.map((item, index) => { that.lineOptsect.categories.map((item, index) => {
let newarr = [item, data
.lastValue.receptionStatList[index].fraction, data.firstValue.receptionStatList[index].fraction,data.contrast
let newarr = [item, data
.lastValue.receptionStatList[index].fraction, data.firstValue
.receptionStatList[index].fraction, data.contrast
.receptionStatList[index].data .receptionStatList[index].data
] ]
// obj.time=item // obj.time=item
@@ -1153,7 +1165,7 @@
align-items: center; align-items: center;
border-bottom: 1px solid #E0E0E0; border-bottom: 1px solid #E0E0E0;
flex-wrap: nowrap; flex-wrap: nowrap;
.td { .td {
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
@@ -1163,11 +1175,13 @@
line-height: 64rpx; line-height: 64rpx;
// flex-shrink: 0; // flex-shrink: 0;
} }
.trd{
flex-shrink: 0;
min-width: 300rpx;
// border-bottom: 1px solid #ccc;

.trd {
flex-shrink: 0;
min-width: 300rpx;
// border-bottom: 1px solid #ccc;
} }

.th { .th {
height: 64rpx; height: 64rpx;
text-align: center; text-align: center;
@@ -1182,12 +1196,12 @@
.uchaserbox { .uchaserbox {
width: 100%; width: 100%;
} }
.uchaserboxs { .uchaserboxs {
width: 100%; width: 100%;
height: 70vh; height: 70vh;
} }
.activecllasscet2 { .activecllasscet2 {
color: #2671E2; color: #2671E2;
border-bottom: 2px solid #2671E2; border-bottom: 2px solid #2671E2;
@@ -1362,11 +1376,13 @@
color: #666666; color: #666666;
margin-top: 10rpx; margin-top: 10rpx;
} }
.grid:nth-child(1){
border-right:none ;
border-bottom:none ;

.grid:nth-child(1) {
border-right: none;
border-bottom: none;
} }
.grid:nth-child(3){

.grid:nth-child(3) {
width: 50.5%; width: 50.5%;
} }
</style> </style>

Loading…
Cancel
Save