修复选择成员列表无法滚动的异常,修正任务姓名为nickname
This commit is contained in:
parent
e8ca86e899
commit
8dcca60350
|
|
@ -18,7 +18,7 @@
|
||||||
<text class="loading-text">加载中...</text>
|
<text class="loading-text">加载中...</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view class="form-scroll" scroll-y v-else>
|
<view v-else>
|
||||||
<view class="form-container">
|
<view class="form-container">
|
||||||
<view class="form-section">
|
<view class="form-section">
|
||||||
<view class="section-title">基本信息</view>
|
<view class="section-title">基本信息</view>
|
||||||
|
|
@ -153,44 +153,46 @@
|
||||||
<text class="col role">角色</text>
|
<text class="col role">角色</text>
|
||||||
<text class="col action">操作</text>
|
<text class="col action">操作</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<scroll-view class="member-scroll" scroll-y>
|
||||||
class="member-row"
|
<view
|
||||||
v-for="(member, index) in formData.memberList"
|
class="member-row"
|
||||||
:key="member.userId || index"
|
v-for="(member, index) in formData.memberList"
|
||||||
>
|
:key="member.userId || index"
|
||||||
<text class="col index">{{ index + 1 }}</text>
|
>
|
||||||
<view class="col name member-name">
|
<text class="col index">{{ index + 1 }}</text>
|
||||||
<text>{{ member.userName || '未命名' }}</text>
|
<view class="col name member-name">
|
||||||
|
<text>{{ member.userName || '未命名' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="col role role-options">
|
||||||
|
<label
|
||||||
|
class="role-option"
|
||||||
|
:class="{ active: member.role === 'OWNER' }"
|
||||||
|
@click="updateMemberRole(member.userId, 'OWNER')"
|
||||||
|
>
|
||||||
|
<text class="radio"></text>
|
||||||
|
<text>负责人</text>
|
||||||
|
</label>
|
||||||
|
<label
|
||||||
|
class="role-option"
|
||||||
|
:class="{ active: member.role !== 'OWNER' }"
|
||||||
|
@click="updateMemberRole(member.userId, 'NORMAL')"
|
||||||
|
>
|
||||||
|
<text class="radio"></text>
|
||||||
|
<text>跟进人</text>
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<text class="col action action-btn" @click="removeMember(member.userId)">
|
||||||
|
删除
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="col role role-options">
|
<view class="empty-tip" v-if="!formData.memberList.length">
|
||||||
<label
|
请点击「选择成员」添加项目成员
|
||||||
class="role-option"
|
|
||||||
:class="{ active: member.role === 'OWNER' }"
|
|
||||||
@click="updateMemberRole(member.userId, 'OWNER')"
|
|
||||||
>
|
|
||||||
<text class="radio"></text>
|
|
||||||
<text>负责人</text>
|
|
||||||
</label>
|
|
||||||
<label
|
|
||||||
class="role-option"
|
|
||||||
:class="{ active: member.role !== 'OWNER' }"
|
|
||||||
@click="updateMemberRole(member.userId, 'NORMAL')"
|
|
||||||
>
|
|
||||||
<text class="radio"></text>
|
|
||||||
<text>跟进人</text>
|
|
||||||
</label>
|
|
||||||
</view>
|
</view>
|
||||||
<text class="col action action-btn" @click="removeMember(member.userId)">
|
</scroll-view>
|
||||||
删除
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="empty-tip" v-if="!formData.memberList.length">
|
|
||||||
请点击「选择成员」添加项目成员
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom-bar">
|
<view class="bottom-bar">
|
||||||
<uv-button
|
<uv-button
|
||||||
|
|
@ -502,7 +504,7 @@ const loadMemberOptions = async () => {
|
||||||
const res = await getUserList({ pageSize: 200 });
|
const res = await getUserList({ pageSize: 200 });
|
||||||
memberOptions.value = (res.rows || res.data || res.list || []).map((item) => ({
|
memberOptions.value = (res.rows || res.data || res.list || []).map((item) => ({
|
||||||
userId: String(item.userId || item.id),
|
userId: String(item.userId || item.id),
|
||||||
userName: item.userName || item.nickName || '',
|
userName: item.nickName || '',
|
||||||
deptName: item.deptName || item.dept?.deptName || '',
|
deptName: item.deptName || item.dept?.deptName || '',
|
||||||
avatar: item.avatar || item.userAvatar || ''
|
avatar: item.avatar || item.userAvatar || ''
|
||||||
}));
|
}));
|
||||||
|
|
@ -869,6 +871,14 @@ const formatDate = (timestamp) => {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid #f0f0f0;
|
border: 1px solid #f0f0f0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-scroll {
|
||||||
|
max-height: 400rpx;
|
||||||
|
min-height: 80rpx;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-row {
|
.member-row {
|
||||||
|
|
@ -1023,7 +1033,7 @@ const formatDate = (timestamp) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-list {
|
.member-list {
|
||||||
flex: 1;
|
height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-item {
|
.member-item {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const Request = () => {
|
||||||
// 初始化请求配置
|
// 初始化请求配置
|
||||||
uni.$uv.http.setConfig((config) => {
|
uni.$uv.http.setConfig((config) => {
|
||||||
/* config 为默认全局配置*/
|
/* config 为默认全局配置*/
|
||||||
config.baseURL = 'http://192.168.1.9:4001'; /* 根域名 */
|
config.baseURL = 'http://192.168.1.4:4001'; /* 根域名 */
|
||||||
// config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */
|
// config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */
|
||||||
return config
|
return config
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user