|
|
@@ -114,6 +114,20 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template v-slot="scope">
|
|
|
+ <div
|
|
|
+ class="c-table__btn u-pointer"
|
|
|
+ @click="del(scope.row)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</c-table>
|
|
|
<el-dialog
|
|
|
title="新增升级"
|
|
|
@@ -248,7 +262,8 @@
|
|
|
import {
|
|
|
getApks,
|
|
|
getVersions,
|
|
|
- deployVersion
|
|
|
+ deployVersion,
|
|
|
+ delVersion
|
|
|
} from '@/api/upgrade'
|
|
|
import { createListOptions } from '@/utils'
|
|
|
import DeviceTree from '@/components/DeviceTree'
|
|
|
@@ -388,6 +403,14 @@ export default {
|
|
|
onChange (devices) {
|
|
|
this.$devices = devices
|
|
|
this.devices = devices.map(device => device.name).join(', ')
|
|
|
+ },
|
|
|
+ del (version) {
|
|
|
+ delVersion(version).then(() => {
|
|
|
+ if (this.options.list.length === 1 && this.options.params.pageNum > 1) {
|
|
|
+ this.options.params.pageNum -= 1
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|