|
@@ -216,6 +216,30 @@ function handleDelChapter(item) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+/* 撤销章节 */
|
|
|
+function handleCancelChapter(item) {
|
|
|
+ showItemOpt.value = false
|
|
|
+ showDialog({
|
|
|
+ title: '提示',
|
|
|
+ showCancelButton: true,
|
|
|
+ message: '是否确认撤销该章节?',
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then( async() => {
|
|
|
+ const res = await apiReport.cancelChapter({
|
|
|
+ ReportChapterId: item.ReportChapterId
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ showToast('撤销成功')
|
|
|
+
|
|
|
+ let index = chapterList.value.findIndex(_=>_.ReportChapterId===item.ReportChapterId)
|
|
|
+ chapterList.value[index].PublishState = 1;
|
|
|
+
|
|
|
+ }).catch(() =>{})
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/* 上传章节音频 */
|
|
|
// 上传音频
|
|
|
const showUploadAudio=ref(false)
|
|
@@ -358,7 +382,7 @@ function handleConfirmEditTrendTag(){
|
|
|
// 跳转章节详情
|
|
|
async function goChapterDetail(item){
|
|
|
|
|
|
- if(item.IsAuth) {
|
|
|
+ if(item.IsAuth && item.PublishState===1) {
|
|
|
//编辑前标记一下
|
|
|
const res = await apiReport.reportMark({
|
|
|
Status: 1,
|
|
@@ -512,7 +536,7 @@ async function handleConfirmSetLayout() {
|
|
|
<template #item="{element}">
|
|
|
<li class="item" @click="goChapterDetail(element)">
|
|
|
<div class="item-top">
|
|
|
- <div class="type-name" v-if="element.TypeName">{{element.TypeName}}宏观</div>
|
|
|
+ <div class="type-name" v-if="element.TypeName">{{element.TypeName}}</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="content">
|
|
@@ -541,7 +565,7 @@ async function handleConfirmSetLayout() {
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <img src="@/assets/imgs/report/icon_drag.png" alt="" class="move-icon">
|
|
|
+ <img src="@/assets/imgs/report/icon_drag.png" alt="" class="move-icon" v-if="isCreator">
|
|
|
</li>
|
|
|
</template>
|
|
|
</draggable>
|
|
@@ -687,6 +711,7 @@ async function handleConfirmSetLayout() {
|
|
|
<div class="title">{{activeItem.Title}}</div>
|
|
|
|
|
|
<div class="item" @click="handleChapterInfo(activeItem)" v-if="isCreator">基础信息</div>
|
|
|
+ <div class="item" @click="handleCancelChapter(activeItem)" v-if="activeItem.IsAuth&&activeItem.PublishState===2">撤销</div>
|
|
|
<div class="item" @click="handleDelChapter(activeItem)" v-if="isCreator">删除</div>
|
|
|
<div class="item" @click="handleShowTrendTag(activeItem)" v-permission="reportManageBtn.reportMange_chapter_editTag">添加标签</div>
|
|
|
<div class="item" @click="handleShowUploadAudio()">上传录音</div>
|