|
@@ -59,7 +59,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import ProjectLongCard from "@/components/project/ProjectLongCard";
|
|
import ProjectLongCard from "@/components/project/ProjectLongCard";
|
|
|
-import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
|
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "ProjectTab",
|
|
name: "ProjectTab",
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
const res = (await _this.$apis.forkProject(id, null)).data;
|
|
const res = (await _this.$apis.forkProject(id, null)).data;
|
|
|
if (!res.code) {
|
|
if (!res.code) {
|
|
|
_this.projects.private.push(res.data);
|
|
_this.projects.private.push(res.data);
|
|
|
- _this.projectTabName = "private";
|
|
|
|
|
|
|
+ _this.tabName = "private";
|
|
|
ElMessage.success("Fork完成");
|
|
ElMessage.success("Fork完成");
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error(res.message);
|
|
ElMessage.error(res.message);
|
|
@@ -136,13 +136,14 @@ export default {
|
|
|
|
|
|
|
|
async handleSwitchProject(id) {
|
|
async handleSwitchProject(id) {
|
|
|
const _this = this;
|
|
const _this = this;
|
|
|
- // todo: 修改项目在gitlab中的 公开/私有 状态
|
|
|
|
|
const res = (await _this.$apis.updateCourseProjectState(id)).data;
|
|
const res = (await _this.$apis.updateCourseProjectState(id)).data;
|
|
|
if (!res.code) {
|
|
if (!res.code) {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
removeProject(_this.projects.private, _this.projects.public);
|
|
removeProject(_this.projects.private, _this.projects.public);
|
|
|
|
|
+ _this.tabName="public";
|
|
|
} else {
|
|
} else {
|
|
|
removeProject(_this.projects.public, _this.projects.private);
|
|
removeProject(_this.projects.public, _this.projects.private);
|
|
|
|
|
+ _this.tabName="private";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -174,10 +175,10 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
if (_this.projectForm.isPublic) {
|
|
if (_this.projectForm.isPublic) {
|
|
|
_this.projects.public.push(res.data);
|
|
_this.projects.public.push(res.data);
|
|
|
- _this.projectTabName = "public";
|
|
|
|
|
|
|
+ _this.tabName = "public";
|
|
|
} else {
|
|
} else {
|
|
|
_this.projects.private.push(res.data);
|
|
_this.projects.private.push(res.data);
|
|
|
- _this.projectTabName = "private";
|
|
|
|
|
|
|
+ _this.tabName = "private";
|
|
|
}
|
|
}
|
|
|
_this.projectDialog = false;
|
|
_this.projectDialog = false;
|
|
|
_this.$refs.projectFormRef.resetFields();
|
|
_this.$refs.projectFormRef.resetFields();
|