Forráskód Böngészése

章节报告处理

Karsa 8 hónapja
szülő
commit
d2e061ef06

+ 5 - 3
src/views/ficc_manage/chapterVariety.vue

@@ -196,10 +196,12 @@ import { bannerupload, getchapterTypeList,editChapterType } from 'api/api.js';
 export default {
     components: { mDialog },
   beforeRouteEnter(to, from, next) {
-    if (to.query.reportType == 'day') {
+    if (to.query.reportType === 'day') {
       to.matched[1].name = '晨报章节设置'
-    } else {
+    } else if(to.query.reportType === 'week') {
       to.matched[1].name = '周报章节设置'
+    }else {
+      to.matched[1].name = '章节设置'
     }
     next()
   },
@@ -222,7 +224,7 @@ export default {
   },
   methods: {
     async getList() {
-      getchapterTypeList({ ReportType: this.$route.query.reportType == 'week' ? 'week' : 'day' }).then(res => {
+      getchapterTypeList({ ClassifyId:Number(this.$route.query.id) }).then(res => {
         if (res.Ret === 200) {
           this.list = res.Data.List || []
         }

+ 4 - 4
src/views/ficc_manage/reportVariety.vue

@@ -30,7 +30,7 @@
           </div>
 
           <div class="opt-box">
-            <span class="editsty" v-if="['晨报','周报'].includes(data.ClassifyName)" @click="chapterSetting(data)">章节设置</span>
+            <span class="editsty" v-if="!data.Child" @click="chapterSetting(data)">章节设置</span>
             <span
               style="cursor: pointer; color: #409eff"
               @click.stop="handleShowEdit(data)"
@@ -544,13 +544,13 @@ export default {
   },
   methods: {
     chapterSetting(row){
-      let reportType;
+      let reportType='';
 			if(row.ClassifyName=='周报'){
 				reportType='week'
-			}else{
+			}else if(row.ClassifyName=='晨报'){
 				reportType='day'
 			}
-			this.$router.push({path:'chapterVariety',query:{reportType}})
+			this.$router.push({path:'chapterVariety',query:{id:row.Id,reportType}})
     },
     showInput(index){
 			if(index!=-1){