|
@@ -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(
|