|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
<CommonPreview ref="preview" :project-id="project_id">
|
|
<CommonPreview ref="preview" :project-id="project_id">
|
|
<template #operator="{ courseware }">
|
|
<template #operator="{ courseware }">
|
|
- <span v-if="isTrue(courseware.is_can_request_shangjia_book)" class="link" @click="requestShangjiaBook">
|
|
|
|
|
|
+ <span v-if="isTrue(courseware.is_can_request_shangjia_book)" class="link" @click="openRequestBookDialog">
|
|
申请上架
|
|
申请上架
|
|
</span>
|
|
</span>
|
|
<span v-if="isTrue(courseware.is_can_request_rollback_project)" class="link" @click="requestRollbackProject">
|
|
<span v-if="isTrue(courseware.is_can_request_rollback_project)" class="link" @click="requestRollbackProject">
|
|
@@ -13,12 +13,15 @@
|
|
<span class="link" @click="goBackBookList">返回项目列表</span>
|
|
<span class="link" @click="goBackBookList">返回项目列表</span>
|
|
</template>
|
|
</template>
|
|
</CommonPreview>
|
|
</CommonPreview>
|
|
|
|
+
|
|
|
|
+ <RequestBook :project-id="project_id" :visible.sync="requestBookVisible" @confirm="requestShangjiaBook" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import ProjectMenu from '@/views/project_manage/common/ProjectMenu.vue';
|
|
import ProjectMenu from '@/views/project_manage/common/ProjectMenu.vue';
|
|
import CommonPreview from '@/components/CommonPreview.vue';
|
|
import CommonPreview from '@/components/CommonPreview.vue';
|
|
|
|
+import RequestBook from './components/RequestBook.vue';
|
|
|
|
|
|
import { isTrue } from '@/utils/common';
|
|
import { isTrue } from '@/utils/common';
|
|
import { RequestShangjiaBook, RequestRollbackProject } from '@/api/project';
|
|
import { RequestShangjiaBook, RequestRollbackProject } from '@/api/project';
|
|
@@ -28,22 +31,29 @@ export default {
|
|
components: {
|
|
components: {
|
|
ProjectMenu,
|
|
ProjectMenu,
|
|
CommonPreview,
|
|
CommonPreview,
|
|
|
|
+ RequestBook,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
project_id: this.$route.params.projectId || '',
|
|
project_id: this.$route.params.projectId || '',
|
|
isTrue,
|
|
isTrue,
|
|
|
|
+ requestBookVisible: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
goBackBookList() {
|
|
goBackBookList() {
|
|
this.$router.push({ path: `/project_manage/project` });
|
|
this.$router.push({ path: `/project_manage/project` });
|
|
},
|
|
},
|
|
|
|
+ // 打开申请上架对话框
|
|
|
|
+ openRequestBookDialog() {
|
|
|
|
+ this.requestBookVisible = true;
|
|
|
|
+ },
|
|
// 申请上架
|
|
// 申请上架
|
|
- requestShangjiaBook() {
|
|
|
|
- RequestShangjiaBook({ project_id: this.project_id }).then(() => {
|
|
|
|
|
|
+ requestShangjiaBook(data) {
|
|
|
|
+ RequestShangjiaBook(data).then(() => {
|
|
this.$message.success('申请上架成功');
|
|
this.$message.success('申请上架成功');
|
|
this.$refs.preview.getProjectBaseInfo();
|
|
this.$refs.preview.getProjectBaseInfo();
|
|
|
|
+ this.requestBookVisible = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 申请退回
|
|
// 申请退回
|