优化代码

pull/37/head
nineven 3 years ago
parent dd73441bdd
commit f94184551a
  1. 9
      fir_admin/src/views/appinfos/list.vue
  2. 2
      fir_ser/admin/utils/utils.py

@ -40,7 +40,11 @@
</el-table-column> </el-table-column>
<el-table-column label="应用名称"> <el-table-column label="应用名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.name }} <el-tooltip content="点击访问下载页">
<el-link :underline="false" @click="go_download_url(scope.row)">
{{ scope.row.name }}
</el-link>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Bundle_Id" align="center"> <el-table-column label="Bundle_Id" align="center">
@ -202,6 +206,9 @@ export default {
this.fetchData() this.fetchData()
}, },
methods: { methods: {
go_download_url(app_info) {
window.open(app_info.preview_url + '/' + app_info.short, '_blank', '')
},
deleteApp(app_id) { deleteApp(app_id) {
this.$confirm('此操作将永久删除该应用, 是否继续?', '提示', { this.$confirm('此操作将永久删除该应用, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

@ -7,6 +7,8 @@ from rest_framework.pagination import PageNumberPagination
from rest_framework.viewsets import ModelViewSet from rest_framework.viewsets import ModelViewSet
from common.core.response import ApiResponse
class AppsPageNumber(PageNumberPagination): class AppsPageNumber(PageNumberPagination):
page_size = 20 # 每页显示多少条 page_size = 20 # 每页显示多少条

Loading…
Cancel
Save