natasha 9 months ago
parent
commit
fe2a56fb8a

+ 5 - 5
src/components/NavMenu.vue

@@ -133,11 +133,11 @@ export default {
                 },
               ],
             },
-            // {
-            //     title:'专辑管理',
-            //     index:'album_manage',
-            //     code:20003
-            // },
+            {
+              title: "专辑管理",
+              index: "album_manage",
+              code: 20003,
+            },
             {
               title: "广告管理",
               index: "advertise_manage",

+ 1 - 1
src/router/index.js

@@ -47,7 +47,7 @@ export const constantRoutes = [{
     {
         path: '/EnterSys',
         component: () =>
-            import ('@/views/index.vue')
+            import ('@/views/data_center/index.vue')
     },
     {
         path: '/people_manage',

+ 54 - 59
src/views/content_manage/album_manage/AddGoods.vue

@@ -26,7 +26,7 @@
         </div>
       </div>
       <div class="filt-box">
-        <div class="filt-item">
+        <!-- <div class="filt-item">
           <label>类型</label>
           <ul>
             <li
@@ -42,9 +42,9 @@
               {{ items.label }}
             </li>
           </ul>
-        </div>
+        </div> -->
         <template v-if="itemType === 'kecheng'">
-          <div class="filt-item">
+          <!-- <div class="filt-item">
             <label>学段</label>
             <ul>
               <li
@@ -65,7 +65,7 @@
                 {{ items.study_phase_name }}
               </li>
             </ul>
-          </div>
+          </div> -->
           <div class="filt-item">
             <label>类别</label>
             <ul>
@@ -88,6 +88,23 @@
         </template>
         <template v-else-if="itemType === 'baozhi'">
           <div class="filt-item">
+            <label>订阅</label>
+            <ul>
+              <li
+                :class="[itemy.value === baozhiForm.orderValue ? 'active' : '']"
+                v-for="(itemy, indexy) in orderList"
+                :key="indexy"
+                @click="handleClick('baozhiForm', 'orderValue', itemy.value)"
+              >
+                <i
+                  v-if="itemy.value === baozhiForm.orderValue"
+                  class="el-icon-success"
+                ></i>
+                {{ itemy.label }}
+              </li>
+            </ul>
+          </div>
+          <div class="filt-item">
             <label>年份</label>
             <ul>
               <li
@@ -104,7 +121,7 @@
               </li>
             </ul>
           </div>
-          <div class="filt-item">
+          <!-- <div class="filt-item">
             <label>学段</label>
             <ul>
               <li
@@ -129,7 +146,7 @@
                 {{ items.study_phase_name }}
               </li>
             </ul>
-          </div>
+          </div> -->
           <div class="filt-item">
             <label>类型</label>
             <ul>
@@ -168,7 +185,7 @@
               </li>
             </ul>
           </div>
-          <div class="filt-item">
+          <!-- <div class="filt-item">
             <label>学段</label>
             <ul>
               <li
@@ -193,7 +210,7 @@
                 {{ items.study_phase_name }}
               </li>
             </ul>
-          </div>
+          </div> -->
         </template>
         <template v-else-if="itemType === 'huakan'">
           <div class="filt-item">
@@ -330,7 +347,24 @@ export default {
       total_count: 0,
       loading: false,
       tableLoading: false,
-      itemType: "baozhi",
+      itemType:
+        window.localStorage.getItem("albumType") * 1 === 0
+          ? "kecheng"
+          : window.localStorage.getItem("albumType") * 1 === 2
+          ? "baozhi"
+          : window.localStorage.getItem("albumType") * 1 === 3
+          ? "jingdu"
+          : "huakan",
+      orderList: [
+        {
+          label: "非订阅",
+          value: "false",
+        },
+        {
+          label: "订阅",
+          value: "true",
+        },
+      ],
       typeSelectList: [
         {
           label: "报纸",
@@ -430,18 +464,23 @@ export default {
         },
       ],
       courseForm: {
-        studyValue: -1,
+        studyValue: window.localStorage.getItem("albumStudyPhase")
+          ? window.localStorage.getItem("albumStudyPhase") * 1
+          : -1,
         categoryValue: "LB",
       },
       baozhiForm: {
         yearValue: -1,
-        studyValue: window.localStorage.getItem("baozhiFormstudyValue")
-          ? window.localStorage.getItem("baozhiFormstudyValue") * 1
+        studyValue: window.localStorage.getItem("albumStudyPhase")
+          ? window.localStorage.getItem("albumStudyPhase") * 1
           : 11,
         typeValue: 0,
+        orderValue: "false",
       },
       jingduForm: {
-        studyValue: 11,
+        studyValue: window.localStorage.getItem("albumStudyPhase")
+          ? window.localStorage.getItem("albumStudyPhase") * 1
+          : 11,
         categoryValue: "",
       },
       huakanForm: {
@@ -641,9 +680,9 @@ export default {
         value === "LB"
       ) {
         this.courseForm.studyValue = window.localStorage.getItem(
-          "courseFormstudyValue"
+          "albumStudyPhase"
         )
-          ? window.localStorage.getItem("courseFormstudyValue") * 1
+          ? window.localStorage.getItem("albumStudyPhase") * 1
           : -1;
       }
       if (
@@ -686,49 +725,6 @@ export default {
           this.loading = false;
         });
     },
-    // 学段列表
-    getStudyList() {
-      let MethodName = "/OrgServer/DictManager/GetStudyPhaseList";
-      getLogin(MethodName, {})
-        .then((res) => {
-          if (res.status === 1) {
-            this.baozhiStudyList = res.study_phase_list;
-            this.baozhiForm.studyValue = window.localStorage.getItem(
-              "baozhiFormstudyValue"
-            )
-              ? window.localStorage.getItem("baozhiFormstudyValue") * 1
-              : res.study_phase_list[0]
-              ? res.study_phase_list[0].study_phase
-              : 11;
-            if (this.itemType === "baozhi") {
-              this.titleName = window.localStorage.getItem(
-                "baozhiFormstudyValueName"
-              )
-                ? window.localStorage.getItem("baozhiFormstudyValueName")
-                : res.study_phase_list[0]
-                ? res.study_phase_list[0].study_phase_name
-                : "";
-            } else if (this.itemType === "jingdu") {
-              this.titleName = window.localStorage.getItem(
-                "jingduFormstudyValueName"
-              )
-                ? window.localStorage.getItem("jingduFormstudyValueName")
-                : res.study_phase_list[0]
-                ? res.study_phase_list[0].study_phase_name
-                : "";
-            } else if (this.itemType === "kecheng") {
-              this.titleName = window.localStorage.getItem(
-                "courseFormstudyValueName"
-              )
-                ? window.localStorage.getItem("courseFormstudyValueName")
-                : res.study_phase_list[0]
-                ? res.study_phase_list[0].study_phase_name
-                : "";
-            }
-          }
-        })
-        .catch(() => {});
-    },
     // 获取年份列表
     getYearList() {
       this.yearList = [
@@ -808,7 +804,6 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.getTableHeight();
-    this.getStudyList();
     this.getYearList();
     this.getLabelList();
     this.getList();

+ 94 - 3
src/views/content_manage/album_manage/CreateAlbum.vue

@@ -88,6 +88,7 @@
                 filterable
                 placeholder="请选择"
                 @change="changeType"
+                :disabled="id ? true : false"
               >
                 <el-option
                   v-for="item in goodsTypeList"
@@ -102,9 +103,17 @@
               <el-select
                 v-model="organizeForm.study_phase"
                 placeholder="请选择"
+                @change="changeStudyPhase"
+                :disabled="id ? true : false"
               >
                 <el-option
-                  v-for="item in $studyType"
+                  v-for="item in organizeForm.goods_type === 0
+                    ? studyTypeCourse
+                    : organizeForm.goods_type === 2
+                    ? $studyType
+                    : organizeForm.goods_type === 3
+                    ? jingduStudyList
+                    : huakanStudyList"
                   :key="item.study_phase"
                   :label="item.study_phase_name"
                   :value="item.study_phase"
@@ -387,9 +396,79 @@ export default {
           id: 4,
           name: "画刊",
         },
+        // {
+        //   id: 5,
+        //   name: "练习册",
+        // },
+      ],
+      // 课程学段
+      studyTypeCourse: [
+        {
+          study_phase_name: "全学段",
+          study_phase: 100,
+        },
+        {
+          study_phase_name: "小学",
+          study_phase: 11,
+        },
+        {
+          study_phase_name: "初中",
+          study_phase: 20,
+        },
+        {
+          study_phase_name: "初一",
+          study_phase: 21,
+        },
+
+        {
+          study_phase_name: "初二",
+          study_phase: 22,
+        },
+        {
+          study_phase_name: "初三",
+          study_phase: 23,
+        },
+        {
+          study_phase_name: "高中",
+          study_phase: 30,
+        },
         {
-          id: 5,
-          name: "练习册",
+          study_phase_name: "高一",
+          study_phase: 31,
+        },
+        {
+          study_phase_name: "高二",
+          study_phase: 32,
+        },
+        {
+          study_phase_name: "高三",
+          study_phase: 33,
+        },
+      ],
+      // 精读
+      jingduStudyList: [
+        {
+          study_phase: 11,
+          study_phase_name: "小学",
+        },
+        {
+          study_phase: 21,
+          study_phase_name: "初一",
+        },
+        {
+          study_phase: 22,
+          study_phase_name: "初二",
+        },
+        {
+          study_phase: 23,
+          study_phase_name: "初三",
+        },
+      ],
+      // 画刊
+      huakanStudyList: [
+        {
+          study_phase: 1,
+          study_phase_name: "学前",
         },
       ],
       tabsList: ["中英双语", "少儿必读"],
@@ -501,6 +580,8 @@ export default {
     //继续创建
     handleCreate() {
       window.localStorage.removeItem("albumId");
+      window.localStorage.removeItem("albumType");
+      window.localStorage.removeItem("albumStudyPhase");
       this.$router.replace("/createAlbum");
       location.reload();
     },
@@ -603,6 +684,12 @@ export default {
     // 更改专辑类型
     changeType(val) {
       window.localStorage.setItem("albumType", val);
+      window.localStorage.setItem("albumStudyPhase", "");
+      this.organizeForm.study_phase = "";
+    },
+    // 专辑学段
+    changeStudyPhase(val) {
+      window.localStorage.setItem("albumStudyPhase", val);
     },
     getCourseInfo() {
       this.loading = true;
@@ -616,6 +703,10 @@ export default {
           if (res.status === 1) {
             this.organizeForm = res.album;
             window.localStorage.setItem("albumType", res.album.goods_type);
+            window.localStorage.setItem(
+              "albumStudyPhase",
+              res.album.study_phase
+            );
           }
         })
         .catch(() => {

+ 2 - 0
src/views/content_manage/album_manage/index.vue

@@ -353,6 +353,8 @@ export default {
       window.localStorage.setItem("pageSize", this.pageSize);
       window.localStorage.setItem("pageNumber", this.pageNumber);
       window.localStorage.removeItem("albumId");
+      window.localStorage.removeItem("albumType");
+      window.localStorage.removeItem("albumStudyPhase");
       this.$router.push({
         path: "/createAlbum",
         query: {