diff --git a/components/AddressPicker.vue b/components/AddressPicker.vue index 650543a..31ee44b 100644 --- a/components/AddressPicker.vue +++ b/components/AddressPicker.vue @@ -9,10 +9,15 @@ + + + + + \ No newline at end of file + \ No newline at end of file diff --git a/components/config/configPopup.vue b/components/config/configPopup.vue index 9103059..49cba91 100644 --- a/components/config/configPopup.vue +++ b/components/config/configPopup.vue @@ -23,7 +23,7 @@ //打开配置信息菜单 open(key){ this.$api('queryConfig', { - paramCode : 'config_vip_service', + paramCode : key, }) .then(res => { // this.content = this.configList[key] diff --git a/components/list/userList/index.vue b/components/list/userList/index.vue index cec956f..24236de 100644 --- a/components/list/userList/index.vue +++ b/components/list/userList/index.vue @@ -5,8 +5,7 @@ @scrolltolower="loadMoreData"> - + + + ⚠️ + + 数据已被删除 + 该用户信息可能已被删除或不存在 + + + + + + - + - {{ item.employAuthenticationPerson.name }} - + {{ item.employAuthenticationPerson && item.employAuthenticationPerson.name }} + {{ item.typeId_dictText }} - + {{ item.natureId_dictText }} @@ -79,14 +91,27 @@ }, computed : { headImage(){ - return this.image || this.item.headImage || '/static/image/center/headImage.png' + return this.image || (this.item && this.item.headImage) || '/static/image/center/headImage.png' }, phone(){ - return this.item.hanHaiMember && this.item.hanHaiMember.phone + return this.item && this.item.hanHaiMember && this.item.hanHaiMember.phone }, + // 检查数据是否有效 + isDataValid(){ + return this.item && this.item.id + } }, methods: { callPhone(){ + // 检查数据是否有效和电话号码是否存在 + if (!this.isDataValid || !this.phone) { + uni.showToast({ + title: '联系方式不可用', + icon: 'none' + }); + return; + } + uni.makePhoneCall({ phoneNumber: this.phone, success() { @@ -105,6 +130,39 @@ .boss-item{ background-color: #fff; border-radius: 20rpx; + + &.deleted-item { + background-color: #f5f5f5; + border: 2rpx dashed #ccc; + padding: 40rpx 20rpx; + + .deleted-content { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + text-align: center; + + .deleted-icon { + font-size: 60rpx; + margin-bottom: 20rpx; + } + + .deleted-text { + .deleted-title { + font-size: 32rpx; + color: #666; + font-weight: bold; + margin-bottom: 10rpx; + } + + .deleted-desc { + font-size: 24rpx; + color: #999; + } + } + } + } .head { display: flex; align-items: center; diff --git a/components/list/workList/workItem.vue b/components/list/workList/workItem.vue index ff2c61e..c9c6cdb 100644 --- a/components/list/workList/workItem.vue +++ b/components/list/workList/workItem.vue @@ -1,5 +1,17 @@ @@ -333,7 +340,7 @@ this.result.push({ name: n.type, label: this.popupSelectedAddress, - value: this.popupSelectedAddress + value: this.popupSelectedAddress == '全部地区' ? 'all' : this.popupSelectedAddress }) } else { // 其他选项使用tag选择 @@ -347,13 +354,14 @@ }) this.result = this.result.filter(item => this.defaultValue.indexOf(item.value) == -1); - + this.$emit('clickItem', this.result) this.$refs.popup.close() }, // 弹窗中打开地址选择器 openAddressPickerInPopup() { + this.activeName = 'areaId' this.$refs.addressPicker.open() }, @@ -377,12 +385,49 @@ // 关闭下拉菜单 - 通过发送事件来关闭 uni.$emit(`${this.sign}_CLOSEPOPUP`) }, + + // 选择全部地区 + selectAllAreas() { + // 更新弹窗中的地址显示 + this.popupSelectedAddress = '全部地区' + + // 更新areaId的状态 + this.areaId.label = '全部地区' + this.areaId.value = 'all' + + // 调用clickItem来更新result数组并触发父组件事件 + this.clickItem({ + label: '全部地区', + value: 'all', + }) + + // 关闭地址选择器 + this.$refs.addressPicker.close() + + // 关闭下拉菜单 + uni.$emit(`${this.sign}_CLOSEPOPUP`) + }, } }