浏览代码

更新优化

lex-xin 3 年之前
父节点
当前提交
fd7b8b18f2
共有 2 个文件被更改,包括 14 次插入25 次删除
  1. 8 0
      src/views/contentManager/components/appPage.vue
  2. 6 25
      src/views/contentManager/contentOperation.vue

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

@@ -176,6 +176,14 @@ export default {
       this.$router.push({
       this.$router.push({
         path: "/contentManager/contentOperation",
         path: "/contentManager/contentOperation",
         query: params,
         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) {
     onDel(row) {

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

@@ -18,25 +18,10 @@
         <el-form-item label="排序值">
         <el-form-item label="排序值">
           <el-input v-model.trim="form.order"></el-input>
           <el-input v-model.trim="form.order"></el-input>
         </el-form-item>
         </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="所属分部"
         <el-form-item label="所属分部"
+                      v-if="type != 4 && type != 6 && type != 7"
                       prop="organIdList">
                       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"
           <select-all v-model.trim="form.organIdList"
                      style="width: 400px !important"
                      style="width: 400px !important"
                      filterable
                      filterable
@@ -666,21 +651,17 @@ export default {
     messageTips (title, res) {
     messageTips (title, res) {
       if (res.code == 200) {
       if (res.code == 200) {
         this.$message.success(title + "成功");
         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 {
       } else {
         this.$message.error(res.msg);
         this.$message.error(res.msg);
       }
       }
     },
     },
     onCancel () {
     onCancel () {
+      // 是否是平台功能
+      const isPlat = this.type == 4 || this.type == 6 || this.type == 7 ? true : false
       this.$store.dispatch('delVisitedViews', this.$route)
       this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({
       this.$router.push({
-        path: "/contentManager/contentManager",
+        path: isPlat ? "/platformIndex" : "/contentManager/contentManager",
         query: {
         query: {
           tabrouter: this.typeIndex(this.type)
           tabrouter: this.typeIndex(this.type)
         }
         }