|
@@ -1,301 +0,0 @@
|
|
-<template>
|
|
|
|
- <div class="container-bg">
|
|
|
|
- <div class="container">
|
|
|
|
- <custom-header :name="headerName"></custom-header>
|
|
|
|
- <div class="content" v-if="total!=='0'">
|
|
|
|
- <el-input class="search" v-model="input" placeholder="搜索">
|
|
|
|
- <template #prefix>
|
|
|
|
- <el-icon class="el-input__icon"><search /></el-icon>
|
|
|
|
- </template>
|
|
|
|
- </el-input>
|
|
|
|
- <div class="list">
|
|
|
|
- <div class="list-item" v-for="(item, index) in list" :key="index">
|
|
|
|
- <checkbox @change="changeCheck" v-show="setingShow" v-model="item.checked"></checkbox>
|
|
|
|
- <div class="item-flex">
|
|
|
|
- <img class="photo" src="@/assets/img/mine/img-photo.png" alt="" />
|
|
|
|
- <div class="item-text">
|
|
|
|
- <div class="name">{{ item.name }}</div>
|
|
|
|
- <div>电话:19875236548</div>
|
|
|
|
- <div>地址:湖北省武汉市富里唱鑫园5023</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div v-else class="no-data">
|
|
|
|
- <span>当前列表无好友</span>
|
|
|
|
- <div class="button-row">
|
|
|
|
- <div class="del">删除分组</div>
|
|
|
|
- <div>添加好友</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="footer" v-show="total!=='0'">
|
|
|
|
- <span @click="handleSeting('新增分组')" v-show="!setingShow && isGroup === '1'">批量设置</span>
|
|
|
|
- <div v-show="!setingShow && isGroup!=='1'" class="btn-group">
|
|
|
|
- <div class="delete" @click="handleDelete">删除分组</div>
|
|
|
|
- <div class="btn-txt">
|
|
|
|
- <span @click="handleSeting('添加')" class="add">添加</span>
|
|
|
|
- <span @click="handleSeting('移出')">移出</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div v-show="setingShow" class="footer-flex">
|
|
|
|
- <div class="text-group">
|
|
|
|
- <div class="icon" v-show="filterList.length">
|
|
|
|
- <el-icon><ArrowUpBold /></el-icon>
|
|
|
|
- </div>
|
|
|
|
- <div class="text-item" v-for="(item, index) in filterList" :key="index">
|
|
|
|
- {{ item.name }}
|
|
|
|
- <span v-show="filterList.length - 1 !== index">/</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="button" @click="handleAdd">{{btnText}}({{ filterList.length }})</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 新增分组弹窗 -->
|
|
|
|
- <add-popup :show="showPopup"></add-popup>
|
|
|
|
- <!-- 删除弹窗 -->
|
|
|
|
- <action-sheet class="action-sheet" v-model:show="showAction" :actions="actions" cancel-text="取消" @select="onSelect">
|
|
|
|
- <template #description>
|
|
|
|
- <span class="desc">该分组下还有好友存在,删除后好友会放在 未分组的好友列表里</span>
|
|
|
|
- </template>
|
|
|
|
- </action-sheet>
|
|
|
|
-</template>
|
|
|
|
-
|
|
|
|
-<script setup>
|
|
|
|
-import customHeader from "@/components/customHeader.vue";
|
|
|
|
-import addPopup from "./components/addPopup.vue";
|
|
|
|
-import { onActivated, onMounted, ref } from "vue";
|
|
|
|
-import { useRoute } from "vue-router";
|
|
|
|
-import { Checkbox } from "vant";
|
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
|
-import { ActionSheet } from 'vant';
|
|
|
|
-const route = useRoute();
|
|
|
|
-
|
|
|
|
-const input = ref("");
|
|
|
|
-const list = ref([
|
|
|
|
- {
|
|
|
|
- name: "123",
|
|
|
|
- checked: false,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "456",
|
|
|
|
- checked: false,
|
|
|
|
- },
|
|
|
|
-]);
|
|
|
|
-
|
|
|
|
-const showPopup = ref(false);
|
|
|
|
-//新增分组
|
|
|
|
-const handleAdd = () => {
|
|
|
|
- if (filterList.value.length) {
|
|
|
|
- showPopup.value = !showPopup.value;
|
|
|
|
- } else {
|
|
|
|
- ElMessage.warning("请选择好友");
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-//批量设置
|
|
|
|
-const setingShow = ref(false);
|
|
|
|
-const btnText = ref('')
|
|
|
|
-const handleSeting = (str) => {
|
|
|
|
- btnText.value = str
|
|
|
|
- setingShow.value = true;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-//删除
|
|
|
|
-const showAction = ref(false)
|
|
|
|
-const actions = [{ name: '删除' ,color: '#F73C3C'},]
|
|
|
|
-const handleDelete = () =>{
|
|
|
|
- showAction.value = true
|
|
|
|
-}
|
|
|
|
-const onSelect = (item) =>{
|
|
|
|
- showAction.value = false
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-const filterList = ref([]);
|
|
|
|
-const changeCheck = () => {
|
|
|
|
- filterList.value = list.value.filter((item) => item.checked);
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-const headerName = ref("");
|
|
|
|
-const isGroup = ref(null);
|
|
|
|
-const total = ref(0)
|
|
|
|
-onActivated(() => {
|
|
|
|
- headerName.value = `${route.query.name}(${route.query.total})`;
|
|
|
|
- total.value = route.query.total;
|
|
|
|
- isGroup.value = route.query.isGroup;
|
|
|
|
- setingShow.value = false
|
|
|
|
- filterList.value = []
|
|
|
|
-});
|
|
|
|
-</script>
|
|
|
|
-
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-.container-bg {
|
|
|
|
- position: absolute;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100vh;
|
|
|
|
- z-index: 1;
|
|
|
|
- background: #f2f3f5;
|
|
|
|
-}
|
|
|
|
-.container {
|
|
|
|
- width: 100%;
|
|
|
|
- height: calc(100% - 40px - 40px);
|
|
|
|
- background: url("@/assets/img/mine/mine-bg.png") no-repeat center center / 100% 100%;
|
|
|
|
- .content {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- position: relative;
|
|
|
|
- padding: 20px 12px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- .search {
|
|
|
|
- width: 100%;
|
|
|
|
- ::v-deep {
|
|
|
|
- &.el-input {
|
|
|
|
- --el-input-placeholder-color: rgba(0, 190, 219, 0.63);
|
|
|
|
- }
|
|
|
|
- .el-input__prefix {
|
|
|
|
- color: rgba(0, 190, 219, 0.63);
|
|
|
|
- }
|
|
|
|
- .el-input__wrapper {
|
|
|
|
- box-shadow: none;
|
|
|
|
- border-radius: 20px;
|
|
|
|
- border: 1px solid #18d2ef;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .list {
|
|
|
|
- .list-item {
|
|
|
|
- padding: 12px 10px;
|
|
|
|
- border-radius: 8px;
|
|
|
|
- background: #fff;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- margin-top: 12px;
|
|
|
|
- ::v-deep {
|
|
|
|
- .van-checkbox__icon .van-icon {
|
|
|
|
- border-color: #00bedb;
|
|
|
|
- }
|
|
|
|
- .van-checkbox__icon--checked .van-icon {
|
|
|
|
- background: #00bedb;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .item-flex {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- }
|
|
|
|
- .item-flex {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- margin-left: 10px;
|
|
|
|
- }
|
|
|
|
- .photo {
|
|
|
|
- width: 62px;
|
|
|
|
- height: 62px;
|
|
|
|
- border-radius: 8px;
|
|
|
|
- margin-right: 12px;
|
|
|
|
- }
|
|
|
|
- .item-text {
|
|
|
|
- color: #999999;
|
|
|
|
- font-size: 12px;
|
|
|
|
- line-height: 1.6;
|
|
|
|
- .name {
|
|
|
|
- font-size: 15px;
|
|
|
|
- color: #000;
|
|
|
|
- font-weight: 500;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .no-data{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- flex-direction: column;
|
|
|
|
- span{
|
|
|
|
- font-size: 16px;
|
|
|
|
- color: rgba(0, 0, 0, 0.49);
|
|
|
|
- }
|
|
|
|
- .button-row{
|
|
|
|
- margin-top: 12px;
|
|
|
|
- display: flex;
|
|
|
|
- div{
|
|
|
|
- padding: 7px 24px;
|
|
|
|
- color: rgba(0, 0, 0, 0.49);
|
|
|
|
- border-radius: 5px;
|
|
|
|
- background: #fff;
|
|
|
|
- }
|
|
|
|
- .del{
|
|
|
|
- color: #F27777;
|
|
|
|
- margin-right: 10px;
|
|
|
|
- background: rgba(242, 119, 119, 0.12);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .footer {
|
|
|
|
- position: fixed;
|
|
|
|
- bottom: 0;
|
|
|
|
- background: #fff;
|
|
|
|
- width: 100%;
|
|
|
|
- padding: 12px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- text-align: center;
|
|
|
|
- color: #262626;
|
|
|
|
- .btn-group{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- .delete{
|
|
|
|
- color: #F27777;
|
|
|
|
- padding: 5px 12px;
|
|
|
|
- border-radius: 20px;
|
|
|
|
- background: rgba(242, 119, 119, 0.12);
|
|
|
|
- }
|
|
|
|
- .btn-txt{
|
|
|
|
- span{
|
|
|
|
- padding: 5px 12px;
|
|
|
|
- }
|
|
|
|
- .add{
|
|
|
|
- color: #8F8F8F;
|
|
|
|
- margin-right: 5px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .footer-flex {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- .text-group {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- color: #00bedb;
|
|
|
|
- .icon {
|
|
|
|
- width: 18px;
|
|
|
|
- height: 18px;
|
|
|
|
- background: #00bedb;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- color: #fff;
|
|
|
|
- line-height: 22px;
|
|
|
|
- font-size: 13px;
|
|
|
|
- margin-right: 5px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .button {
|
|
|
|
- color: #fff;
|
|
|
|
- padding: 5px 12px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- border-radius: 2px;
|
|
|
|
- background: #00bedb;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.action-sheet{
|
|
|
|
- .desc{
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|