| | |
| | | }); |
| | | } |
| | | |
| | | export function deletePkg(data) { |
| | | return request({ |
| | | url: "/package/" + data.id + "/delete", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | export function download(query) { |
| | | return request({ |
| | | url: "/package/download", |
| | |
| | | > |
| | | <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"; |
| | | |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handleDeletePkg(row) { |
| | | if (row.id) { |
| | | this.$baseConfirm("你确定要删除当前项吗", null, async () => { |
| | | const { msg } = await deletePkg(row); |
| | | this.$baseMessage(msg, "success"); |
| | | this.fetchData(); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |