| | |
| | | <el-table-column width="300"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-show="props.row.type == 'os'" |
| | | v-show="props.row.type == 'os' || props.row.type == 'algo'" |
| | | size="small" |
| | | @click="handlePublish(scope.row)" |
| | | >发布</el-button |
| | |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="warning" |
| | | :disabled="scope.row.state === 0" |
| | | @click="handleRebuild(scope.row)" |
| | | >重置</el-button |
| | | > |
| | | |
| | | <!-- 正在打包的任务以及自动打包的任务不允许删除 --> |
| | | <el-button |
| | | size="small" |
| | | type="danger" |
| | | :disabled=" |
| | | scope.row.createType == 0 || |
| | | (scope.row.state > 0 && scope.row.state < 3) |
| | | " |
| | | @click="handleDeletePkg(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | <script> |
| | | import { getList, deletePrj, getPkgList, buildPkg } from "@/api/project"; |
| | | import { publish, download, rebuild } from "@/api/package"; |
| | | import { publish, download, rebuild, deletePkg } from "@/api/package"; |
| | | |
| | | import TableEdit from "./components/ProjectEdit.vue"; |
| | | |
| | |
| | | arm64: "arm_64", |
| | | }, |
| | | typeOptions: { |
| | | os: "OS基础包", |
| | | os: "AIOS", |
| | | sys: "系统包", |
| | | app: "应用包", |
| | | algo: "算法包", |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handleDeletePkg(row) { |
| | | if (row.id) { |
| | | this.$baseConfirm("你确定要删除当前项吗", null, async () => { |
| | | const { msg } = await deletePkg(row); |
| | | this.$baseMessage(msg, "success"); |
| | | this.fetchData(); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |