zhangjie 2 years ago
parent
commit
903d6f424f
2 changed files with 2 additions and 36 deletions
  1. 1 36
      src/modules/admin/app-version/AppVersionManage.vue
  2. 1 0
      src/views/Home.vue

+ 1 - 36
src/modules/admin/app-version/AppVersionManage.vue

@@ -51,17 +51,6 @@
         <el-table ref="TableList" :data="dataList">
           <el-table-column prop="id" label="ID" width="80"></el-table-column>
           <el-table-column prop="name" label="名称"> </el-table-column>
-          <el-table-column prop="archived" label="是否为主干版本" width="124">
-            <template slot-scope="scope">
-              <span
-                :class="{
-                  'color-success': scope.row.id === curMasterVersionId,
-                }"
-              >
-                {{ scope.row.id === curMasterVersionId ? "主干版本" : "" }}
-              </span>
-            </template>
-          </el-table-column>
           <el-table-column prop="archived" label="状态" width="80">
             <template slot-scope="scope">
               <span
@@ -131,11 +120,7 @@
 </template>
 
 <script>
-import {
-  appVersionList,
-  appVersionInsertOrUpdate,
-  appSetMasterVersion,
-} from "../api";
+import { appVersionList, appVersionInsertOrUpdate } from "../api";
 import { ARCHIVED_TYPE } from "@/constants/enumerate";
 import ModifyAppVersion from "./ModifyAppVersion.vue";
 
@@ -162,12 +147,10 @@ export default {
       total: 0,
       dataList: [],
       curRow: {},
-      curMasterVersionId: null,
     };
   },
   methods: {
     visibleChange() {
-      this.curMasterVersionId = this.app.latestVersionId;
       this.toPage(1);
     },
     cancel() {
@@ -201,24 +184,6 @@ export default {
       this.curRow = { ...row, appId: this.app.id };
       this.$refs.ModifyAppVersion.open();
     },
-    async toSetMaster(row) {
-      const confirm = await this.$confirm(
-        `确定要设置版本号【${row.name}】为主干版本吗?`,
-        "提示",
-        {
-          type: "warning",
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await appSetMasterVersion({
-        appId: this.app.id,
-        versionId: row.id,
-      });
-      this.$message.success("操作成功!");
-      this.curMasterVersionId = row.id;
-      this.$emit("master-change");
-    },
     async toArchived(row) {
       const action = row.archived ? "取消归档" : "归档";
       const confirm = await this.$confirm(

+ 1 - 0
src/views/Home.vue

@@ -117,6 +117,7 @@ export default {
     initData() {
       this.menus = this.getMenu();
       this.privileges = this.getPrivileges();
+      console.log(this.menus);
 
       if (this.$route.name === "Home") {
         // console.log(this.getMenuFirstRouter());