|
|
@@ -4,7 +4,7 @@
|
|
|
<el-button v-if="isCreator" class="tabs-function-button"
|
|
|
plain type="primary" :disabled="isRuleExisted"
|
|
|
@click="ruleFormDialog=true">
|
|
|
- {{ isRuleExisted === null ? null : (isRuleExisted ? '已开放组队' : '开放组队') }}
|
|
|
+ {{ isRuleExisted === null ? null : (isRuleExisted ? "已开放组队" : "开放组队") }}
|
|
|
</el-button>
|
|
|
<div v-else>
|
|
|
<el-button v-if="!groupData" class="tabs-function-button"
|
|
|
@@ -23,17 +23,19 @@
|
|
|
<template #default="scope">
|
|
|
<span
|
|
|
:style="groupData && scope.row['groupVO'].id===groupData['groupVO'].id ? 'color: #67C23A':''">
|
|
|
- {{ scope.row['groupVO'].name }}
|
|
|
+ {{ scope.row["groupVO"].name }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="组员">
|
|
|
<template #default="scope">
|
|
|
- <div v-for="item of scope.row.members" :key="'member'+item.id">
|
|
|
- <span
|
|
|
- :style="groupData && scope.row['groupVO'].id===groupData['groupVO'].id ? 'color: #67C23A':''">
|
|
|
- {{ item.username }}
|
|
|
- </span>
|
|
|
+ <div style="display:flex;">
|
|
|
+ <div v-for="item of scope.row.members"
|
|
|
+ :key="'member'+item.id"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ :style="groupData && scope.row['groupVO'].id===groupData['groupVO'].id ? 'color: #67C23A':''">
|
|
|
+ {{ item.username }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -117,8 +119,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
addMemberRule: {
|
|
|
- phone: [{ required: true, message: "手机号不能为空" },
|
|
|
- { type: "number",
|
|
|
+ phone: [{required: true, message: "手机号不能为空"},
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
message: "手机号格式不正确",
|
|
|
trigger: "blur",
|
|
|
transform(value) {
|
|
|
@@ -155,7 +158,7 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
- async init(){
|
|
|
+ async init() {
|
|
|
const _this = this;
|
|
|
const ruleRes = (await _this.$apis.findGroupRule(_this.courseId)).data;
|
|
|
_this.isRuleExisted = !ruleRes.code;
|
|
|
@@ -217,6 +220,7 @@ export default {
|
|
|
if (res.data.code) {
|
|
|
ElMessage.error(res.data.message);
|
|
|
} else {
|
|
|
+ this.groupData = res.data.data;
|
|
|
this.groupTableData.push(res.data.data);
|
|
|
this.createGroupDialog = false;
|
|
|
this.$refs.createGroupFormRef.resetFields();
|