-
-
+
+
+
+
+
+ {{ item.teamName }}({{ item.userNum }})
+
-
添加成员...
@@ -102,13 +106,42 @@
+
+
+
+
添加成员
-
添加部门
-
查看更多
+
添加子部门
+
更多管理
@@ -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;
+ });
}
},
};
diff --git a/static/css/iconfont.css b/static/css/iconfont.css
index 7b3a0e7..6229aa9 100644
--- a/static/css/iconfont.css
+++ b/static/css/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: 'iconfont'; /* Project id 4374774 */
- src: url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.woff2?t=1780296933405') format('woff2'),
- url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.woff?t=1780296933405') format('woff'),
- url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.ttf?t=1780296933405') format('truetype');
+ src: url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.woff2?t=1782283319059') format('woff2'),
+ url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.woff?t=1782283319059') format('woff'),
+ url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.ttf?t=1782283319059') format('truetype');
}
.iconfont {
@@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-folder:before {
+ content: "\e7d2";
+}
+
+.icon-folder-open:before {
+ content: "\e7d3";
+}
+
+.icon-folder-fill:before {
+ content: "\e85e";
+}
+
+.icon-folder-open-fill:before {
+ content: "\e85f";
+}
+
.icon-block:before {
content: "\e7e4";
}