|
|
|
|
@ -45,15 +45,15 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<div class="dom_3 r_box g_ml_10 g_mr_10" style="margin-top: 10px;">
|
|
|
|
|
<div v-for="item in memberList" :key="item.id" @click="editMember(item)"
|
|
|
|
|
<div class="dom_3 r_box g_ml_10 g_mr_10" style="margin-top: 10px;" data-remark="团队列表">
|
|
|
|
|
<div data-remark="成员列表" v-for="(item, index) in memberList" :key="item.id" @click="editMember(item)"
|
|
|
|
|
class="g_flex_row_between g_fs_18" style="padding: 0 10px">
|
|
|
|
|
<div class="g_flex_c g_flex_none g_mr_10">
|
|
|
|
|
<img :src="item.avatar || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg'"
|
|
|
|
|
alt="" style="width: 40px;height: 40px;border-radius: 50%;">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_column_between g_flex_1"
|
|
|
|
|
style="border-bottom: 0.5px solid #eee;padding: 9px 0;"
|
|
|
|
|
:style="index === memberList.length - 1 ? 'padding: 9px 0;' : 'border-bottom: 0.5px solid #eee;padding: 9px 0;'"
|
|
|
|
|
>
|
|
|
|
|
<div class="g_flex_1 g_flex_row_start" style="font-size: 17px;color: rgba(0, 0, 0, 0.9);">
|
|
|
|
|
{{ item.aliasName || item.userName }}
|
|
|
|
|
@ -75,15 +75,19 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="dom_4 g_flex_row_start" style="padding: 10px 0px;"
|
|
|
|
|
@click="addMemberShow = true" v-if="false"
|
|
|
|
|
>
|
|
|
|
|
<div class="g_flex_column_center" style="padding: 0 10px;">
|
|
|
|
|
<div class="g_flex_c" style="width: 40px;height: 40px;background-color: rgba(2, 122, 255, 0.1);color: #1890ff;border-radius: 50%;">
|
|
|
|
|
<i class="iconfont icon-plus"></i>
|
|
|
|
|
<div data-remark="部门列表">
|
|
|
|
|
<div v-for="(item,index) in teamList" :key="index" class="g_flex_row_start titem" style="padding: 0px 10px;">
|
|
|
|
|
<div class="g_flex_none g_flex_column_center" style="margin-right: 10px;">
|
|
|
|
|
<div class="g_flex_c" style="width: 40px;height: 40px;background-color: rgba(2, 122, 255, 0.1);color: #1890ff;border-radius: 50%;">
|
|
|
|
|
<i class="iconfont icon-folder-fill" style="font-size: 20px;"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_1 g_flex_column_center rtime" style="padding: 9px 0px;border-top: 0.5px solid #eee;height: 60px;">
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);" class="g_ell_1">
|
|
|
|
|
{{ item.teamName }}({{ item.userNum }})
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_column_center" style="font-size: 17px;height: 40px;color: rgba(2, 122, 255, 1);">添加成员...</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_h_40"></div>
|
|
|
|
|
@ -102,13 +106,42 @@
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
<u-modal v-model="addTeamShow" width="90%" negativeTop="150" :showTitle="false" :showConfirmButton="false" :maskCloseAble="true">
|
|
|
|
|
<div class="g_fs_17 g_text_c">
|
|
|
|
|
<div style="padding: 32px 24px">
|
|
|
|
|
<div class="g_text_c g_fw_600 g_c_0 g_mb_16">添加子部门</div>
|
|
|
|
|
<div class="">
|
|
|
|
|
<u-input v-model="teamName"
|
|
|
|
|
:customStyle="{
|
|
|
|
|
fontSize: '17px',
|
|
|
|
|
borderRadius: '4px',
|
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
|
}"
|
|
|
|
|
height="80"
|
|
|
|
|
border
|
|
|
|
|
border-color="#dddddd"
|
|
|
|
|
placeholder="请输入子部门名称"
|
|
|
|
|
placeholder-style="color:#999;font-size: 17px;"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_row_center flex_center g_fw_600 g_border_e_t">
|
|
|
|
|
<div class="g_flex_1 g_text_c g_border_e_r" hover-class="thover" @click="addTeamShow = false" style="height: 56px;line-height: 56px;font-size: 17px;color: #333;">取消</div>
|
|
|
|
|
<div class="g_flex_1 g_text_c g_c_sub" hover-class="thover" @click="submitAddTeam" style="height: 56px;line-height: 56px;font-size: 17px;color: #576b95;">
|
|
|
|
|
<u-loading mode="circle" size="16" v-if="addTeamLoading"></u-loading>
|
|
|
|
|
<span v-else>确定</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</u-modal>
|
|
|
|
|
|
|
|
|
|
<div style="height: 40px;"></div>
|
|
|
|
|
<g-panel-fixed>
|
|
|
|
|
<slot>
|
|
|
|
|
<div class="g_flex_row_between" style="padding: 0 10px;">
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);" @click="addMemberShow = true">添加成员</div>
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);">添加部门</div>
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);" @click="goPage('/root/person/info?active=1')">查看更多</div>
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);" @click="addTeamShow = true">添加子部门</div>
|
|
|
|
|
<div style="font-size: 17px;color: rgba(2, 122, 255, 1);" @click="goPage('/root/person/info?active=1')">更多管理</div>
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
@ -125,13 +158,19 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
memberList: [],
|
|
|
|
|
addMemberShow: false,
|
|
|
|
|
addTeamShow: false,
|
|
|
|
|
addTeamLoading: false,
|
|
|
|
|
teamName: "",
|
|
|
|
|
agencyInfo: uni.getStorageSync("agencyInfo"),
|
|
|
|
|
applyNum: 0,
|
|
|
|
|
teamList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.getMemberList();
|
|
|
|
|
this.getNewApplyNum();
|
|
|
|
|
let that = this;
|
|
|
|
|
this.getNewApplyNum(()=>{
|
|
|
|
|
that.getMemberList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onLoad() {},
|
|
|
|
|
created() {
|
|
|
|
|
@ -156,16 +195,24 @@ export default {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: "加载中...",
|
|
|
|
|
});
|
|
|
|
|
this.G.Get(this.api.order_peopleList, { pageSize: 500 }, (res) => {
|
|
|
|
|
console.log("报名人列表:", res);
|
|
|
|
|
that.memberList = res.recordList;
|
|
|
|
|
that.memberList.forEach((item) => {
|
|
|
|
|
item.agencyRoleNameList = item.agencyRoleName.split(";");
|
|
|
|
|
item.agencyRoleNameList = item.agencyRoleNameList.sort(this.compare);
|
|
|
|
|
});
|
|
|
|
|
// 部门列表
|
|
|
|
|
that.G.Post('/yishoudan/agency/team/list',{},(teamRes)=>{
|
|
|
|
|
console.log('部门列表:', teamRes.list)
|
|
|
|
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
});
|
|
|
|
|
// 成员列表
|
|
|
|
|
this.G.Get(this.api.order_peopleList, { pageSize: 500 }, (res) => {
|
|
|
|
|
console.log("成员列表:", res);
|
|
|
|
|
that.memberList = res.recordList;
|
|
|
|
|
that.memberList.forEach((item) => {
|
|
|
|
|
item.agencyRoleNameList = item.agencyRoleName.split(";");
|
|
|
|
|
item.agencyRoleNameList = item.agencyRoleNameList.sort(this.compare);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
that.teamList = teamRes.list;
|
|
|
|
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
addMember() {
|
|
|
|
|
this.addMemberShow = true;
|
|
|
|
|
@ -181,11 +228,12 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
this.addMemberShow = false;
|
|
|
|
|
},
|
|
|
|
|
getNewApplyNum() {
|
|
|
|
|
getNewApplyNum(callback=() => {}) {
|
|
|
|
|
let that = this;
|
|
|
|
|
this.G.Get(this.api.order_getNewApplyNum, {}, (res) => {
|
|
|
|
|
console.log("order_getNewApplyNum", res);
|
|
|
|
|
that.applyNum = res;
|
|
|
|
|
callback(res);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
openChoose() {
|
|
|
|
|
@ -215,6 +263,29 @@ export default {
|
|
|
|
|
return filteredRoles;
|
|
|
|
|
}
|
|
|
|
|
return [...filteredRoles.slice(0, 3), '...'];
|
|
|
|
|
},
|
|
|
|
|
submitAddTeam() {
|
|
|
|
|
if (!this.teamName || !this.teamName.trim()) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "请输入子部门名称",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.addTeamLoading) return;
|
|
|
|
|
this.addTeamLoading = true;
|
|
|
|
|
this.G.Post("/yishoudan/agency/team/add", { teamName: this.teamName.trim() }, (res) => {
|
|
|
|
|
this.addTeamLoading = false;
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "添加成功",
|
|
|
|
|
icon: "success",
|
|
|
|
|
});
|
|
|
|
|
this.addTeamShow = false;
|
|
|
|
|
this.teamName = "";
|
|
|
|
|
this.getMemberList();
|
|
|
|
|
}, (err) => {
|
|
|
|
|
this.addTeamLoading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|