|
|
@@ -12,10 +12,17 @@
|
|
|
plain type="primary" @click="createGroupDialog=true">
|
|
|
创建队伍
|
|
|
</el-button>
|
|
|
- <el-button v-else class="tabs-function-button"
|
|
|
- plain type="primary" @click="addMemberDialog=true">
|
|
|
- 邀请成员
|
|
|
- </el-button>
|
|
|
+ <div v-else>
|
|
|
+ <el-button class="tabs-function-button"
|
|
|
+ plain type="primary" @click="addMemberDialog=true">
|
|
|
+ 邀请成员
|
|
|
+ </el-button>
|
|
|
+ <el-button class="tabs-function-button"
|
|
|
+ plain type="primary" @click="deleteGroup=true">
|
|
|
+ 解散团队
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table v-if="isRuleExisted" :data="groupTableData" style="width: 100%">
|
|
|
@@ -81,6 +88,11 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog v-model="deleteGroup">
|
|
|
+ <div style="margin: 10px;position: relative;left: 280px">确定要解散团队吗?</div>
|
|
|
+ <el-button type="primary" style="margin: 10px;position: relative;left: 220px" @click="deleteUserGroup">确认</el-button>
|
|
|
+ <el-button style="margin: 10px;position: relative;left: 300px" @click="beforeDeleteGroup">取消</el-button>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -100,7 +112,7 @@ export default {
|
|
|
return {
|
|
|
groupTableData: [],
|
|
|
groupData: null,
|
|
|
-
|
|
|
+ deleteGroup:false,
|
|
|
isRuleExisted: false,
|
|
|
ruleFormDialog: false,
|
|
|
maxNameLen:10,
|
|
|
@@ -206,6 +218,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ beforeDeleteGroup(){
|
|
|
+ this.deleteGroup=false;
|
|
|
+ },
|
|
|
+
|
|
|
+ deleteUserGroup(){
|
|
|
+ this.$apis.deleteGroup(this.$store.state.user.id,this.courseId).then(res=>{
|
|
|
+ console.log(res);
|
|
|
+ this.$router.go(0);
|
|
|
+ });
|
|
|
+ this.beforeDeleteGroup();
|
|
|
+ } ,
|
|
|
beforeGroupFormClose() {
|
|
|
this.createGroupDialog = false;
|
|
|
this.$refs.createGroupFormRef.resetFields();
|