| | |
| | | stripe |
| | | :data="list" |
| | | :element-loading-text="elementLoadingText" |
| | | :height="height" |
| | | @selection-change="setSelectRows" |
| | | @expand-change="expandChange" |
| | | > |
| | |
| | | :data="props.row.pkgList" |
| | | :show-header="false" |
| | | style="width: 100%" |
| | | row-class-name="expand-row" |
| | | :highlight-current-row="false" |
| | | > |
| | | > |
| | | <el-table-column prop="fileName"></el-table-column> |
| | | <el-table-column prop="version" width="150"></el-table-column> |
| | | <el-table-column prop="commit" width="150"></el-table-column> |
| | |
| | | <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> |
| | | <style> |
| | | .el-table .expand-row { |
| | | background-color: oldlace; |
| | | } |
| | | </style> |