diff --git a/src/api/index.js b/src/api/index.js index e8a9f78..92beaa0 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -31,6 +31,10 @@ export default { excelExportCom: `${host}competition/competition/registration/excelExport`, exportDataInBatchesCom: `${host}competition/competition/registration/exportDataInBatches`, enterpriseCertificationDetails: `nakadai/enterprise/certification/enterpriseCertificationDetails`, + addNewApplicantsInTheBackground: `competition/competition/registration/addNewApplicantsInTheBackground`, + detailsOfApplicants: `competition/competition/registration/detailsOfApplicants`, + editRegistrationInformation: `competition/competition/registration/editRegistrationInformation`, + getOrganizationInformationByPhone: `competition/competition/registration/getOrganizationInformationByPhone`, delCertification: `nakadai/enterprise/certification/batchDeletion`, findCertification: `nakadai/enterprise/certification/findById`, @@ -52,6 +56,8 @@ export default { platformTeamAccountList: `nakadai/kindergarten/platformTeamAccount/platformTeamAccountList`, removeOrganization: `nakadai/kindergarten/platformTeamAccount/removeOrganization`, updateAccountStatus: `nakadai/kindergarten/platformTeamAccount/updateAccountStatus`, + transferTeam: `nakadai/kindergarten/platformTeamAccount/transferTeam`, + inviteJoinOrganization: `nakadai/kindergarten/platformTeamAccount/inviteJoinOrganization`, delSupplierClass: `nakadai/supplierClassification/batchDeletion`, findSupplierClass: `nakadai/supplierClassification/findById`, diff --git a/src/assets/images/auth.png b/src/assets/images/auth.png new file mode 100644 index 0000000..577e8fc Binary files /dev/null and b/src/assets/images/auth.png differ diff --git a/src/assets/images/avatar.png b/src/assets/images/avatar.png new file mode 100644 index 0000000..2b5ca9f Binary files /dev/null and b/src/assets/images/avatar.png differ diff --git a/src/assets/images/org.png b/src/assets/images/org.png new file mode 100644 index 0000000..4be761d Binary files /dev/null and b/src/assets/images/org.png differ diff --git a/src/assets/images/user1.png b/src/assets/images/user1.png new file mode 100644 index 0000000..c7e4343 Binary files /dev/null and b/src/assets/images/user1.png differ diff --git a/src/pages/activity/add/index.vue b/src/pages/activity/add/index.vue index 30a4bf8..8390f95 100644 --- a/src/pages/activity/add/index.vue +++ b/src/pages/activity/add/index.vue @@ -134,13 +134,13 @@ label="发布范围">
全平台 + label="1">全平台
指定范围 + label="0">指定范围 - +e) - data.competitionScope = 0 + if (data.competitionScope === '0') { + data.competitionScope = '1' + } else if (data.competitionScope !== '1') { + this.competitionScope = data.competitionScope.split(',') + data.competitionScope = '0' } // 附件 const fileList = data.competitionAnnexList @@ -565,7 +565,7 @@ export default { }, // 提交 save (status) { - const { form } = this + const form = JSON.parse(JSON.stringify(this.form)) if (!form.name) return Util.warningMsg("请填写活动名称"); // 发布需要校验 if (status) { @@ -580,12 +580,12 @@ export default { if (!form.playStartTime) return Util.warningMsg("请选择举办时间"); if (playStartTime && signUpEndTime && playStartTime < signUpEndTime) return Util.warningMsg("举办时间不能早于报名结束时间"); if (form.isNeedCode && (!form.invitationCode || form.invitationCode.length !== 4)) return Util.warningMsg('请填写四位数邀请码') - if (!form.competitionScope && !this.competitionScope.length) return Util.warningMsg('请选择指定范围') + if (form.competitionScope === '0' && !this.competitionScope.length) return Util.warningMsg('请选择指定范围') if (!form.quantityLimit) return Util.warningMsg('请填写报名人数上限') if (!form.description) return Util.warningMsg("请填写活动详情"); } form.publishStatus = status - if (!form.competitionScope) { + if (form.competitionScope === '0') { form.competitionScope = this.competitionScope.join(',') } form.sponsor = this.sponsorList.filter(d => d).join(); @@ -729,7 +729,9 @@ $upload-lg-height: 150px; } } } - +.input-form.model { + height: calc(100vh - 300px); +} /deep/ .d-inline-block { width: 216px; diff --git a/src/pages/activity/manage/index.vue b/src/pages/activity/manage/index.vue index 1658d7e..4f7159c 100644 --- a/src/pages/activity/manage/index.vue +++ b/src/pages/activity/manage/index.vue @@ -1,7 +1,6 @@ - - - + 转让管理员 + 踢出 - --> + + + +
    +
  • +
    + + {{ item.userName }} +
    + +
  • +
+ + 取 消 + 确 定 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + +
@@ -93,6 +169,21 @@ export default { page: 1, pageSize: 10, total: 0, + + transferVisible: false, + chooseVisible: false, + members: [], + choosePartnerId: '', + curRow: '', + provinces: [], + cities: [], + editVisible: false, + form: { + userName: '', + provinceId: '', + cityId: '', + }, + roles: [] }; }, watch: { @@ -133,60 +224,95 @@ export default { this.page = 1 this.getData() }, - handleSelectionChange (val) { - this.multipleSelection = val; - }, handleCurrentChange (val) { this.page = val; this.getData(); }, - switchOff (val, row, index) { - this.$put(`${this.api.disableActivityApplicant}?competitionRegistrationId=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { }); + // 编辑 + edit (row) { + this.editVisible = true + this.form = JSON.parse(JSON.stringify(row)) }, - delData (row) { - this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { + // 删除 + del (row) { + this.$confirm("确定要删除吗?", "提示", { type: "warning" - }) - .then(() => { - this.$post(`${this.api.delActivityApplicant}?id=${row.id}`).then(res => { - util.successMsg("删除成功"); - this.getData(); - }).catch(res => { - }); - }) - .catch(() => { - }); - }, - // 排序回调 - sortChange (column) { - // 1上2下 - if (column.prop === 'school') this.schoolOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' - if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' - this.getData() + }).then(() => { + this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { + util.successMsg("删除成功") + this.getList() + }).catch(res => { }) + }).catch(() => { }) }, - exportAll () { - const data = this.multipleSelection - if (data.length) { - data.map((e, i) => e.id = i + 1) - axios.post(this.api.exportDataInBatchesApplicant, data, { - headers: { - token: this.token - }, - responseType: 'blob' - }).then((res) => { - util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) + // 移除 + remove (row) { + this.$confirm("确定要移除吗?", "提示", { + type: "warning" + }).then(() => { + this.$get(this.api.removeOrganization, { + manageId: row.manageId, + teamId: row.classificationId, + }).then(res => { + util.successMsg("移除成功") + this.getData() }).catch(res => { }) + }).catch(() => { }) + }, + // 转让超管 + transfer (row) { + this.curRow = row + this.chooseVisible = true + this.$post(this.api.platformTeamAccountList, { + type: 1, + classificationId: this.teamId, + keyWord: '', + platformId: 5, + pageNum: 1, + pageSize: 10000 + }).then(({ pageList }) => { + this.members = pageList.records + }).catch(err => { }) + }, + // 选择成员提交 + chooseSubmit () { + const { curRow } = this + const id = this.choosePartnerId + const member = this.members.find(e => e.manageId === id) // 获取选择的成员 + if (member) { + this.$post(this.api.transferTeam, { + adminManageId: curRow.manageId, + adminTeamId: curRow.classificationId, + memberManageId: member.manageId, + memberName: member.userName, + memberTeamId: member.classificationId + }).then(res => { + this.chooseVisible = false + this.transferVisible = false + this.getData() + }).catch(err => { }) } else { - axios.get(`${this.api.excelExportApplicant}?activityId=${this.id}`, { - headers: { - token: this.token - }, - responseType: 'blob' - }).then((res) => { - util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) - }).catch(res => { }) + util.warningMsg('请选择成员!') } - } + }, + // 编辑提交 + submitEdit () { + if (this.submiting) return false + this.submiting = true + const form = JSON.parse(JSON.stringify(this.form)) + form.classificationId = form.partnerClassificationId + this.$post(this.api.editProvinceCity, form).then(res => { + this.getList() + util.successMsg("编辑成功!") + this.editVisible = false + setTimeout(() => { + this.submiting = false + }, 2000) + }).catch(res => { + setTimeout(() => { + this.submiting = false + }, 2000) + }) + }, } }; @@ -202,4 +328,28 @@ export default { align-items: center; } } +/deep/.choose-dia { + .member-list { + li { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + } + .info { + display: inline-flex; + align-items: center; + } + img { + width: 40px; + height: 40px; + } + .name { + margin-left: 10px; + } + .el-radio__label { + display: none; + } + } +} \ No newline at end of file diff --git a/src/pages/supplier/manage/member.vue b/src/pages/supplier/manage/member.vue index e8bdca1..156fb92 100644 --- a/src/pages/supplier/manage/member.vue +++ b/src/pages/supplier/manage/member.vue @@ -42,29 +42,29 @@ {{ scope.row.isTeam === '1' ? '负责人' : '成员' }} - - - + 转让管理员 + 踢出 - --> + + + + + + 取 消 + 确 定 + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + + @@ -93,6 +169,21 @@ export default { page: 1, pageSize: 10, total: 0, + + transferVisible: false, + chooseVisible: false, + members: [], + choosePartnerId: '', + curRow: '', + provinces: [], + cities: [], + editVisible: false, + form: { + userName: '', + provinceId: '', + cityId: '', + }, + roles: [] }; }, watch: { @@ -133,60 +224,95 @@ export default { this.page = 1 this.getData() }, - handleSelectionChange (val) { - this.multipleSelection = val; - }, handleCurrentChange (val) { this.page = val; this.getData(); }, - switchOff (val, row, index) { - this.$put(`${this.api.disableActivityApplicant}?competitionRegistrationId=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { }); + // 编辑 + edit (row) { + this.editVisible = true + this.form = JSON.parse(JSON.stringify(row)) }, - delData (row) { - this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { + // 删除 + del (row) { + this.$confirm("确定要删除吗?", "提示", { type: "warning" - }) - .then(() => { - this.$post(`${this.api.delActivityApplicant}?id=${row.id}`).then(res => { - util.successMsg("删除成功"); - this.getData(); - }).catch(res => { - }); - }) - .catch(() => { - }); - }, - // 排序回调 - sortChange (column) { - // 1上2下 - if (column.prop === 'school') this.schoolOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' - if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' - this.getData() + }).then(() => { + this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { + util.successMsg("删除成功") + this.getList() + }).catch(res => { }) + }).catch(() => { }) }, - exportAll () { - const data = this.multipleSelection - if (data.length) { - data.map((e, i) => e.id = i + 1) - axios.post(this.api.exportDataInBatchesApplicant, data, { - headers: { - token: this.token - }, - responseType: 'blob' - }).then((res) => { - util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) + // 移除 + remove (row) { + this.$confirm("确定要移除吗?", "提示", { + type: "warning" + }).then(() => { + this.$get(this.api.removeOrganization, { + manageId: row.manageId, + teamId: row.classificationId, + }).then(res => { + util.successMsg("移除成功") + this.getData() }).catch(res => { }) + }).catch(() => { }) + }, + // 转让超管 + transfer (row) { + this.curRow = row + this.chooseVisible = true + this.$post(this.api.platformTeamAccountList, { + type: 1, + classificationId: this.teamId, + keyWord: '', + platformId: 6, + pageNum: 1, + pageSize: 10000 + }).then(({ pageList }) => { + this.members = pageList.records + }).catch(err => { }) + }, + // 选择成员提交 + chooseSubmit () { + const { curRow } = this + const id = this.choosePartnerId + const member = this.members.find(e => e.manageId === id) // 获取选择的成员 + if (member) { + this.$post(this.api.transferTeam, { + adminManageId: curRow.manageId, + adminTeamId: curRow.classificationId, + memberManageId: member.manageId, + memberName: member.userName, + memberTeamId: member.classificationId + }).then(res => { + this.chooseVisible = false + this.transferVisible = false + this.getData() + }).catch(err => { }) } else { - axios.get(`${this.api.excelExportApplicant}?activityId=${this.id}`, { - headers: { - token: this.token - }, - responseType: 'blob' - }).then((res) => { - util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) - }).catch(res => { }) + util.warningMsg('请选择成员!') } - } + }, + // 编辑提交 + submitEdit () { + if (this.submiting) return false + this.submiting = true + const form = JSON.parse(JSON.stringify(this.form)) + form.classificationId = form.partnerClassificationId + this.$post(this.api.editProvinceCity, form).then(res => { + this.getList() + util.successMsg("编辑成功!") + this.editVisible = false + setTimeout(() => { + this.submiting = false + }, 2000) + }).catch(res => { + setTimeout(() => { + this.submiting = false + }, 2000) + }) + }, } }; @@ -202,4 +328,28 @@ export default { align-items: center; } } +/deep/.choose-dia { + .member-list { + li { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + } + .info { + display: inline-flex; + align-items: center; + } + img { + width: 40px; + height: 40px; + } + .name { + margin-left: 10px; + } + .el-radio__label { + display: none; + } + } +} \ No newline at end of file diff --git a/src/pages/user/detail/index.vue b/src/pages/user/detail/index.vue index 60ffa3b..fc4912f 100644 --- a/src/pages/user/detail/index.vue +++ b/src/pages/user/detail/index.vue @@ -2,7 +2,12 @@

用户信息

-

账号信息

+

+ + 账号信息 +

- - + +
-

实名认证信息({{ form.authentication }})

+

+ + 实名认证信息({{ form.authentication }}) +

-

已绑定的组织信息

+

+ + 已绑定的组织信息 +