|
@@ -13,15 +13,15 @@
|
|
color="#fff" />
|
|
color="#fff" />
|
|
<view style="width: 20rpx"></view>
|
|
<view style="width: 20rpx"></view>
|
|
<u-avatar :text="nameText(v.name)" shape="square" bgColor="#2979ff" />
|
|
<u-avatar :text="nameText(v.name)" shape="square" bgColor="#2979ff" />
|
|
- <view style="margin-left: 20rpx">
|
|
|
|
|
|
+ <view style="margin-left: 20rpx;">
|
|
<view class="text-size-n">{{ v.name }}</view>
|
|
<view class="text-size-n">{{ v.name }}</view>
|
|
<view class="text-grey text-size-m mt-1">{{ v.des }}</view>
|
|
<view class="text-grey text-size-m mt-1">{{ v.des }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
- <template #bottom>
|
|
|
|
|
|
+ <template v-if="data.maxCount != 1 || data.dufaultIds" #bottom>
|
|
<view class="l-fixed__box" style="position: relative; z-index: 9999">
|
|
<view class="l-fixed__box" style="position: relative; z-index: 9999">
|
|
- <view class="u-flex u-row-between">
|
|
|
|
|
|
+ <view class="u-flex align-center justify-between" style="height: 100%;">
|
|
<view style="width: 65%">
|
|
<view style="width: 65%">
|
|
<view class="flex flex-row" style="color: #2979ff">
|
|
<view class="flex flex-row" style="color: #2979ff">
|
|
<text class="text-size-n">已选择:</text>
|
|
<text class="text-size-n">已选择:</text>
|
|
@@ -29,7 +29,7 @@
|
|
style="display: inline-block; margin-left: 40rpx; color: #ff9900">取消全部选中</text>
|
|
style="display: inline-block; margin-left: 40rpx; color: #ff9900">取消全部选中</text>
|
|
</view>
|
|
</view>
|
|
<view style="color: #909399; font-size: 26rpx">
|
|
<view style="color: #909399; font-size: 26rpx">
|
|
- <text class="text-size-n" v-if="showCheck">最多可以选择{{ maxCount }}人</text>
|
|
|
|
|
|
+ <text class="text-size-n" v-if="showCheck">最多可以选择{{ data.maxCount }}人</text>
|
|
<text class="text-overflow text-size-n"
|
|
<text class="text-overflow text-size-n"
|
|
style="width: 300rpx;color: #2979ff;">{{ checkedText }}</text>
|
|
style="width: 300rpx;color: #2979ff;">{{ checkedText }}</text>
|
|
</view>
|
|
</view>
|
|
@@ -76,7 +76,7 @@
|
|
})
|
|
})
|
|
|
|
|
|
const showCheck = computed(() => {
|
|
const showCheck = computed(() => {
|
|
- console.log(checkedCount.value);
|
|
|
|
|
|
+ // console.log(checkedCount.value);
|
|
return checkedCount.value === 0;
|
|
return checkedCount.value === 0;
|
|
})
|
|
})
|
|
|
|
|
|
@@ -100,6 +100,9 @@
|
|
let checked = data.list[index].checked;
|
|
let checked = data.list[index].checked;
|
|
if (data.maxCount <= checkedCount.value && !checked) return false;
|
|
if (data.maxCount <= checkedCount.value && !checked) return false;
|
|
data.list[index].checked = !checked;
|
|
data.list[index].checked = !checked;
|
|
|
|
+ if (checkedCount.value == data.maxCount && data.maxCount == 1 && !data.dufaultIds) {
|
|
|
|
+ submit();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
function submit() {
|
|
function submit() {
|
|
@@ -116,7 +119,7 @@
|
|
checkList: checkList
|
|
checkList: checkList
|
|
};
|
|
};
|
|
if (data.pageType) backParams.backType = data.pageType;
|
|
if (data.pageType) backParams.backType = data.pageType;
|
|
- uni.$emit('checkPerson', backParams);
|
|
|
|
|
|
+ uni.$emit('choose', backParams);
|
|
uni.$u.route({
|
|
uni.$u.route({
|
|
type: 'back'
|
|
type: 'back'
|
|
});
|
|
});
|
|
@@ -128,11 +131,13 @@
|
|
mask: true
|
|
mask: true
|
|
})
|
|
})
|
|
let list = [];
|
|
let list = [];
|
|
- for (var i = 0; i < 20; i++) {
|
|
|
|
|
|
+ for (var i = 0; i < 9; i++) {
|
|
|
|
+ let id = i + 1;
|
|
list.push({
|
|
list.push({
|
|
- id: i,
|
|
|
|
- name: `test${i}`,
|
|
|
|
- des: '已经服务11人'
|
|
|
|
|
|
+ id: id,
|
|
|
|
+ name: `test${id}`,
|
|
|
|
+ des: '已经服务11人',
|
|
|
|
+ checked: data.dufaultIds.indexOf(id) != -1
|
|
})
|
|
})
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -178,9 +183,11 @@
|
|
background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
|
|
background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.u-navbar-box {
|
|
.u-navbar-box {
|
|
background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
|
|
background: radial-gradient(circle at left, #FFE5E4 0%, #EEF2F5 40%, #DBEEFB 100%);
|
|
}
|
|
}
|
|
|
|
+
|
|
.radio {
|
|
.radio {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
border: 1px solid #909399;
|
|
border: 1px solid #909399;
|
|
@@ -189,31 +196,31 @@
|
|
width: 45rpx;
|
|
width: 45rpx;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.radio-active {
|
|
.radio-active {
|
|
background-color: #2979ff;
|
|
background-color: #2979ff;
|
|
border: 1px solid #2979ff;
|
|
border: 1px solid #2979ff;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.p-item {
|
|
.p-item {
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
align-items: center;
|
|
align-items: center;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
margin: 20rpx 0;
|
|
margin: 20rpx 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.p-item:active {
|
|
.p-item:active {
|
|
background-color: #e8e8e8;
|
|
background-color: #e8e8e8;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.l-fixed {
|
|
.l-fixed {
|
|
&__placeholder {
|
|
&__placeholder {
|
|
height: 100rpx;
|
|
height: 100rpx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
&__box {
|
|
&__box {
|
|
position: fixed;
|
|
position: fixed;
|
|
- width: 750rpx;
|
|
|
|
|
|
+ width: 710rpx;
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
height: 120rpx;
|
|
height: 120rpx;
|
|
@@ -221,13 +228,16 @@
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .text-size-n{
|
|
|
|
|
|
+
|
|
|
|
+ .text-size-n {
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
}
|
|
}
|
|
- .text-size-m{
|
|
|
|
|
|
+
|
|
|
|
+ .text-size-m {
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
}
|
|
}
|
|
- .text-grey{
|
|
|
|
|
|
+
|
|
|
|
+ .text-grey {
|
|
color: rgba(34, 34, 34, .4);
|
|
color: rgba(34, 34, 34, .4);
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|