lex-xin 3 éve
szülő
commit
fd7b8b18f2

+ 8 - 0
src/views/contentManager/components/appPage.vue

@@ -176,6 +176,14 @@ export default {
       this.$router.push({
         path: "/contentManager/contentOperation",
         query: params,
+      }, (route) => {
+        // 处理默认选中的菜单
+        const matched = route.matched || []
+        for(let i in matched) {
+          if(matched[i].path == '/contentManager/contentOperation') {
+            route.matched[i].meta.activeMenu = '/platformIndex'
+          }
+        }
       });
     },
     onDel(row) {

+ 6 - 25
src/views/contentManager/contentOperation.vue

@@ -18,25 +18,10 @@
         <el-form-item label="排序值">
           <el-input v-model.trim="form.order"></el-input>
         </el-form-item>
-        <!-- <el-form-item label="适用范围"
-                      prop="tenantId">
-          <el-select v-model="form.tenantId" style="width: 400px !important">
-            <el-option label="对内"
-                       value="1"></el-option>
-            <el-option label="对外"
-                       value="2"></el-option>
-          </el-select>
-        </el-form-item> -->
+        <!-- 平台的功能不需要选择分部 -->
         <el-form-item label="所属分部"
+                      v-if="type != 4 && type != 6 && type != 7"
                       prop="organIdList">
-          <!-- <el-select v-model="form.organIdList" placeholder="请选择所属分部" style="width: 400px !important">
-            <el-option
-              v-for="(item, index) in selects.branchs"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select> -->
           <select-all v-model.trim="form.organIdList"
                      style="width: 400px !important"
                      filterable
@@ -666,21 +651,17 @@ export default {
     messageTips (title, res) {
       if (res.code == 200) {
         this.$message.success(title + "成功");
-        this.$store.dispatch('delVisitedViews', this.$route)
-        this.$router.push({
-          path: "/contentManager/contentManager",
-          query: {
-            tabrouter: this.typeIndex(this.type)
-          }
-        });
+        this.onCancel()
       } else {
         this.$message.error(res.msg);
       }
     },
     onCancel () {
+      // 是否是平台功能
+      const isPlat = this.type == 4 || this.type == 6 || this.type == 7 ? true : false
       this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({
-        path: "/contentManager/contentManager",
+        path: isPlat ? "/platformIndex" : "/contentManager/contentManager",
         query: {
           tabrouter: this.typeIndex(this.type)
         }