lidongze 2 лет назад
Родитель
Сommit
7601b4ba55

+ 27 - 0
src/main/java/com/izouma/nineth/domain/RaexSnapshot.java

@@ -0,0 +1,27 @@
+package com.izouma.nineth.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.Entity;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Entity
+@ApiModel("绿洲快照")
+public class RaexSnapshot extends BaseEntity {
+
+    @ApiModelProperty("快照名称")
+    @ExcelIgnore
+    private String name;
+
+    @ApiModelProperty("快照规则")
+    @ExcelIgnore
+    private String rule;
+
+}

+ 31 - 0
src/main/java/com/izouma/nineth/repo/RaexSnapshotRepo.java

@@ -0,0 +1,31 @@
+package com.izouma.nineth.repo;
+
+import com.izouma.nineth.domain.RaexSnapshot;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+
+import javax.transaction.Transactional;
+import java.util.List;
+import java.util.Map;
+
+public interface RaexSnapshotRepo extends JpaRepository<RaexSnapshot, Long>, JpaSpecificationExecutor<RaexSnapshot> {
+    @Query("update RaexSnapshot t set t.del = true where t.id = ?1")
+    @Modifying
+    @Transactional
+    void softDelete(Long id);
+
+    @Query(value = "select user.id userId, user.nickname nickName, phone phone, count(user_id) countNum " +
+            "from user " +
+            "         inner join asset on user.id = asset.user_id " +
+            "where asset.name like ?1 " +
+            "  and ((asset.created_at < ?2 " +
+            "    and asset.status in ('NORMAL', 'TRADING', 'GIFTING', 'MINTING', 'AUCTIONING')) " +
+            "    or (" +
+            "               asset.created_at < ?2 and asset.modified_at > ?2 " +
+            "               and asset.status in ('TRANSFERRED', 'GIFTED', 'AUCTIONED', 'DESTROYED'))) " +
+            "group by asset.user_id " +
+            "order by count(user_id) desc", nativeQuery = true)
+    List<Map<String, Object>> shot(String name, String time);
+}

+ 20 - 0
src/main/java/com/izouma/nineth/service/RaexSnapshotService.java

@@ -0,0 +1,20 @@
+package com.izouma.nineth.service;
+
+import com.izouma.nineth.domain.RaexSnapshot;
+import com.izouma.nineth.dto.PageQuery;
+import com.izouma.nineth.repo.RaexSnapshotRepo;
+import com.izouma.nineth.utils.JpaUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.stereotype.Service;
+
+@Service
+@AllArgsConstructor
+public class RaexSnapshotService {
+
+    private RaexSnapshotRepo raexSnapshotRepo;
+
+    public Page<RaexSnapshot> all(PageQuery pageQuery) {
+        return raexSnapshotRepo.findAll(JpaUtils.toSpecification(pageQuery, RaexSnapshot.class), JpaUtils.toPageRequest(pageQuery));
+    }
+}

+ 82 - 0
src/main/java/com/izouma/nineth/web/RaexSnapshotController.java

@@ -0,0 +1,82 @@
+package com.izouma.nineth.web;
+
+import com.alibaba.fastjson.JSONArray;
+import com.izouma.nineth.config.MetaConstants;
+import com.izouma.nineth.domain.RaexSnapshot;
+import com.izouma.nineth.dto.PageQuery;
+import com.izouma.nineth.dto.SnapshotDTO;
+import com.izouma.nineth.exception.BusinessException;
+import com.izouma.nineth.repo.RaexSnapshotRepo;
+import com.izouma.nineth.service.RaexSnapshotService;
+import com.izouma.nineth.utils.ObjUtils;
+import com.izouma.nineth.utils.excel.ExcelUtils;
+import lombok.AllArgsConstructor;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/raexSnapshot")
+@AllArgsConstructor
+public class RaexSnapshotController extends BaseController {
+    private RaexSnapshotService raexSnapshotService;
+    private RaexSnapshotRepo raexSnapshotRepo;
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/save")
+    public RaexSnapshot save(@RequestBody RaexSnapshot record) {
+        if (record.getId() != null) {
+            RaexSnapshot orig = raexSnapshotRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            ObjUtils.merge(orig, record);
+            return raexSnapshotRepo.save(orig);
+        }
+        return raexSnapshotRepo.save(record);
+    }
+
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/all")
+    public Page<RaexSnapshot> all(@RequestBody PageQuery pageQuery) {
+        return raexSnapshotService.all(pageQuery);
+    }
+
+    @GetMapping("/get/{id}")
+    public RaexSnapshot get(@PathVariable Long id) {
+        return raexSnapshotRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+    }
+
+    @PostMapping("/del/{id}")
+    public void del(@PathVariable Long id) {
+        raexSnapshotRepo.softDelete(id);
+    }
+
+    @GetMapping("/excel")
+    @ResponseBody
+    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+        List<RaexSnapshot> data = all(pageQuery).getContent();
+        ExcelUtils.export(response, data);
+    }
+
+    @GetMapping("/shot")
+    @ResponseBody
+    public void shot(HttpServletResponse response, String name, String time) throws IOException {
+        List<Map<String, Object>> map = raexSnapshotRepo.shot(MetaConstants.LIKE.concat(name).concat(MetaConstants.LIKE), time);
+        List<SnapshotDTO> snapshotDTOS = mapToList(map);
+        ExcelUtils.export(response, snapshotDTOS);
+    }
+
+    private List<SnapshotDTO> mapToList(List<Map<String, Object>> map) {
+        if (CollectionUtils.isEmpty(map)) {
+            throw new BusinessException("无数据");
+        }
+        JSONArray jsonArray = new JSONArray();
+        jsonArray.addAll(map);
+        return jsonArray.toJavaList(SnapshotDTO.class);
+    }
+}
+

+ 50 - 42
src/main/vue/src/router.js

@@ -605,7 +605,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "collectionPendingList" */ '@/views/company/CollectionPendingList.vue'
-                            ),
+                        ),
                     meta: {
                         title: '申请中藏品'
                     }
@@ -634,7 +634,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "companyCollectionEdit" */ '@/views/company/CompanyCollectionEdit.vue'
-                            ),
+                        ),
                     meta: {
                         title: '企业藏品编辑'
                     }
@@ -645,7 +645,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "companyCollectionShelf" */ '@/views/company/CompanyCollectionShelf.vue'
-                            ),
+                        ),
                     meta: {
                         title: '企业藏品查看'
                     }
@@ -1180,7 +1180,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "metaUserTaskProgressList" */ '@/views/MetaUserTaskProgressList.vue'
-                            ),
+                        ),
                     meta: {
                         title: '元宇宙任务进度'
                     }
@@ -1373,7 +1373,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "metaPlayerRoleClassifyEdit" */ '@/views/MetaPlayerRoleClassifyEdit.vue'
-                            ),
+                        ),
                     meta: {
                         title: '元宇宙角色配置编辑'
                     }
@@ -1384,7 +1384,7 @@ const router = new Router({
                     component: () =>
                         import(
                             /* webpackChunkName: "metaPlayerRoleClassifyList" */ '@/views/MetaPlayerRoleClassifyList.vue'
-                            ),
+                        ),
                     meta: {
                         title: '元宇宙角色配置'
                     }
@@ -1459,15 +1459,15 @@ const router = new Router({
                     name: 'MetaSpatialWharfList',
                     component: () => import(/* webpackChunkName: "metaSpatialWharfList" */ '@/views/MetaSpatialWharfList.vue'),
                     meta: {
-                       title: '船只停靠列表',
+                        title: '船只停靠列表',
                     },
-               },
+                },
                 {
                     path: '/metaBoatPositionEdit',
                     name: 'MetaBoatPositionEdit',
                     component: () => import(/* webpackChunkName: "metaBoatPositionEdit" */ '@/views/MetaBoatPositionEdit.vue'),
                     meta: {
-                       title: '空间船位管理编辑',
+                        title: '空间船位管理编辑',
                     },
                 },
                 {
@@ -1475,15 +1475,15 @@ const router = new Router({
                     name: 'MetaBoatPositionList',
                     component: () => import(/* webpackChunkName: "metaBoatPositionList" */ '@/views/MetaBoatPositionList.vue'),
                     meta: {
-                       title: '空间船位管理',
+                        title: '空间船位管理',
                     },
-               },
+                },
                 {
                     path: '/metaVisitorList',
                     name: 'MetaVisitorList',
                     component: () => import(/* webpackChunkName: "metaVisitorList" */ '@/views/MetaVisitorList.vue'),
                     meta: {
-                       title: '游客管理',
+                        title: '游客管理',
                     },
                 },
                 {
@@ -1491,15 +1491,15 @@ const router = new Router({
                     name: 'NeteaseUserList',
                     component: () => import(/* webpackChunkName: "neteaseUserList" */ '@/views/NeteaseUserList.vue'),
                     meta: {
-                       title: '云信用户表',
+                        title: '云信用户表',
                     },
-               },
+                },
                 {
                     path: '/teamEdit',
                     name: 'TeamEdit',
                     component: () => import(/* webpackChunkName: "teamEdit" */ '@/views/TeamEdit.vue'),
                     meta: {
-                       title: '群组编辑',
+                        title: '群组编辑',
                     },
                 },
                 {
@@ -1507,15 +1507,15 @@ const router = new Router({
                     name: 'TeamList',
                     component: () => import(/* webpackChunkName: "teamList" */ '@/views/TeamList.vue'),
                     meta: {
-                       title: '群组',
+                        title: '群组',
                     },
-               },
+                },
                 {
                     path: '/neteaseMessageEdit',
                     name: 'NeteaseMessageEdit',
                     component: () => import(/* webpackChunkName: "neteaseMessageEdit" */ '@/views/NeteaseMessageEdit.vue'),
                     meta: {
-                       title: '信息编辑',
+                        title: '信息编辑',
                     },
                 },
                 {
@@ -1523,10 +1523,10 @@ const router = new Router({
                     name: 'NeteaseMessageList',
                     component: () => import(/* webpackChunkName: "neteaseMessageList" */ '@/views/NeteaseMessageList.vue'),
                     meta: {
-                       title: '信息',
+                        title: '信息',
                     },
-               },
-               {
+                },
+                {
                     path: '/metaQuestionEdit',
                     name: 'MetaQuestionEdit',
                     component: () => import(/* webpackChunkName: "metaQuestionEdit" */ '@/views/MetaQuestionEdit.vue'),
@@ -1659,7 +1659,7 @@ const router = new Router({
                     name: 'SnapshotEdit',
                     component: () => import(/* webpackChunkName: "snapshotEdit" */ '@/views/SnapshotEdit.vue'),
                     meta: {
-                       title: '快照管理查看',
+                        title: '快照管理查看',
                     },
                 },
                 {
@@ -1667,15 +1667,15 @@ const router = new Router({
                     name: 'SnapshotList',
                     component: () => import(/* webpackChunkName: "snapshotList" */ '@/views/SnapshotList.vue'),
                     meta: {
-                       title: '快照管理',
+                        title: '快照管理',
                     },
-               },
+                },
                 {
                     path: '/metaFeedBackEdit',
                     name: 'MetaFeedBackEdit',
                     component: () => import(/* webpackChunkName: "metaFeedBackEdit" */ '@/views/MetaFeedBackEdit.vue'),
                     meta: {
-                       title: '用户反馈编辑',
+                        title: '用户反馈编辑',
                     },
                 },
                 {
@@ -1683,9 +1683,9 @@ const router = new Router({
                     name: 'MetaFeedBackList',
                     component: () => import(/* webpackChunkName: "metaFeedBackList" */ '@/views/MetaFeedBackList.vue'),
                     meta: {
-                       title: '用户反馈',
+                        title: '用户反馈',
                     },
-               },
+                },
                 {
                     path: '/tradeAuctionOrderList',
                     name: 'TradeAuctionOrderList',
@@ -1715,7 +1715,7 @@ const router = new Router({
                     name: 'MetaLuckyDrawEdit',
                     component: () => import(/* webpackChunkName: "metaLuckyDrawEdit" */ '@/views/MetaLuckyDrawEdit.vue'),
                     meta: {
-                       title: '抽奖活动管理编辑',
+                        title: '抽奖活动管理编辑',
                     },
                 },
                 {
@@ -1723,9 +1723,9 @@ const router = new Router({
                     name: 'MetaLuckyDrawList',
                     component: () => import(/* webpackChunkName: "metaLuckyDrawList" */ '@/views/MetaLuckyDrawList.vue'),
                     meta: {
-                       title: '抽奖活动管理',
+                        title: '抽奖活动管理',
                     },
-               },
+                },
                 {
                     path: '/metaParamsConfigList',
                     name: 'MetaParamsConfigParamsList',
@@ -1739,15 +1739,15 @@ const router = new Router({
                     name: 'MetaLuckyDrawAwardReceiveRecordList',
                     component: () => import(/* webpackChunkName: "metaLuckyDrawAwardReceiveRecordList" */ '@/views/MetaLuckyDrawAwardReceiveRecordList.vue'),
                     meta: {
-                       title: '抽奖活动奖励记录',
+                        title: '抽奖活动奖励记录',
                     },
-               },
+                },
                 {
                     path: '/metaUserPropEdit',
                     name: 'MetaUserPropEdit',
                     component: () => import(/* webpackChunkName: "metaUserPropEdit" */ '@/views/MetaUserPropEdit.vue'),
                     meta: {
-                       title: '玩家道具背包编辑',
+                        title: '玩家道具背包编辑',
                     },
                 },
                 {
@@ -1755,15 +1755,15 @@ const router = new Router({
                     name: 'MetaUserPropList',
                     component: () => import(/* webpackChunkName: "metaUserPropList" */ '@/views/MetaUserPropList.vue'),
                     meta: {
-                       title: '玩家道具背包',
+                        title: '玩家道具背包',
                     },
-               },
+                },
                 {
                     path: '/metaUserPropRecordEdit',
                     name: 'MetaUserPropRecordEdit',
                     component: () => import(/* webpackChunkName: "metaUserPropRecordEdit" */ '@/views/MetaUserPropRecordEdit.vue'),
                     meta: {
-                       title: '用户道具记录编辑',
+                        title: '用户道具记录编辑',
                     },
                 },
                 {
@@ -1771,15 +1771,15 @@ const router = new Router({
                     name: 'MetaUserPropRecordList',
                     component: () => import(/* webpackChunkName: "metaUserPropRecordList" */ '@/views/MetaUserPropRecordList.vue'),
                     meta: {
-                       title: '用户道具记录',
+                        title: '用户道具记录',
                     },
-               },
+                },
                 {
                     path: '/metaResourcesEdit',
                     name: 'MetaResourcesEdit',
                     component: () => import(/* webpackChunkName: "metaResourcesEdit" */ '@/views/MetaResourcesEdit.vue'),
                     meta: {
-                       title: '资源管理编辑',
+                        title: '资源管理编辑',
                     },
                 },
                 {
@@ -1787,9 +1787,17 @@ const router = new Router({
                     name: 'MetaResourcesList',
                     component: () => import(/* webpackChunkName: "metaResourcesList" */ '@/views/MetaResourcesList.vue'),
                     meta: {
-                       title: '资源管理',
+                        title: '资源管理',
+                    },
+                },
+                {
+                    path: '/raexSnapshotList',
+                    name: 'RaexSnapshotList',
+                    component: () => import(/* webpackChunkName: "raexSnapshotList" */ '@/views/RaexSnapshotList.vue'),
+                    meta: {
+                        title: '绿洲快照',
                     },
-               }
+                }
                 /**INSERT_LOCATION**/
             ]
         },
@@ -1849,4 +1857,4 @@ router.beforeEach((to, from, next) => {
     }
 });
 
-export default router;
+export default router;

+ 188 - 157
src/main/vue/src/views/DomainOrderList.vue

@@ -5,60 +5,50 @@
             <!--                       class="filter-item">-->
             <!--                新增-->
             <!--            </el-button>-->
-            <!--            <el-button @click="download" icon="el-icon-upload2" :loading="downloading" :disabled="fetchingData"-->
-            <!--                       class="filter-item">-->
-            <!--                导出-->
-            <!--            </el-button>-->
+            <el-button @click="download" icon="el-icon-upload2" :loading="downloading" :disabled="fetchingData"
+                class="filter-item">
+                导出
+            </el-button>
         </page-title>
         <div class="filters-container">
-            <el-input
-                placeholder="搜索..."
-                v-model="search"
-                clearable
-                class="filter-item search"
-                @keyup.enter.native="getData"
-            >
+            <el-input placeholder="搜索..." v-model="search" clearable class="filter-item search"
+                @keyup.enter.native="getData">
                 <el-button @click="getData" slot="append" icon="el-icon-search"></el-button>
             </el-input>
+            <el-select v-model="orderStatus" placeholder="筛选状态" clearable @change="getData" class="filter-item">
+                <el-option v-for="item in orderStatusOptions" :key="item.value" :value="item.value"
+                    :label="item.label"></el-option>
+            </el-select>
+            <el-input placeholder="搜索域名名称" v-model="picName" clearable class="filter-item" @keyup.enter.native="getData">
+            </el-input>
+            <el-input placeholder="搜索用户ID" v-model="userId" clearable class="filter-item" @keyup.enter.native="getData">
+            </el-input>
         </div>
-        <el-table :data="tableData" row-key="id" ref="table"
-                  header-row-class-name="table-header-row"
-                  header-cell-class-name="table-header-cell"
-                  row-class-name="table-row" cell-class-name="table-cell"
-                  :height="tableHeight" v-loading="fetchingData">
-            <el-table-column v-if="multipleMode" align="center" type="selection"
-                             width="50">
+        <el-table :data="tableData" row-key="id" ref="table" header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell" row-class-name="table-row" cell-class-name="table-cell"
+            :height="tableHeight" v-loading="fetchingData">
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50">
             </el-table-column>
             <el-table-column prop="id" label="ID" width="100">
             </el-table-column>
-            <el-table-column prop="userId" label="用户id"
-            >
+            <el-table-column prop="userId" label="用户id">
             </el-table-column>
-            <el-table-column prop="userName" label="用户名"
-            >
+            <el-table-column prop="userName" label="用户名">
             </el-table-column>
             <!--            <el-table-column prop="userAvatar" label="用户头像"-->
             <!--            >-->
             <!--            </el-table-column>-->
-            <el-table-column prop="picName" label="域名名称"
-            >
+            <el-table-column prop="picName" label="域名名称">
             </el-table-column>
-            <el-table-column prop="domainName" label="域名(包含后缀)"
-            >
+            <el-table-column prop="domainName" label="域名(包含后缀)">
             </el-table-column>
-            <el-table-column prop="transactionId" label="交易流水号"
-            >
+            <el-table-column prop="transactionId" label="交易流水号">
             </el-table-column>
-            <el-table-column prop="auditResult" label="审核结果"
-            >
+            <el-table-column prop="auditResult" label="审核结果">
             </el-table-column>
-            <el-table-column prop="orderStatus" label="订单状态"
-                             :formatter="orderStatusFormatter"
-            >
+            <el-table-column prop="orderStatus" label="订单状态" :formatter="orderStatusFormatter">
             </el-table-column>
-            <el-table-column prop="payMethod" label="支付方式"
-                             :formatter="payMethodFormatter"
-            >
+            <el-table-column prop="payMethod" label="支付方式" :formatter="payMethodFormatter">
             </el-table-column>
             <!--            <el-table-column-->
             <!--                    label="操作"-->
@@ -80,118 +70,136 @@
                     <el-button @click="toggleMultipleMode(false)">取消</el-button>
                 </el-button-group>
             </div> -->
-            <el-pagination background @size-change="onSizeChange"
-                           @current-change="onCurrentChange" :current-page="page"
-                           :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
-                           layout="total, sizes, prev, pager, next, jumper"
-                           :total="totalElements">
+            <el-pagination background @size-change="onSizeChange" @current-change="onCurrentChange" :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements">
             </el-pagination>
         </div>
 
     </div>
 </template>
 <script>
-import {mapState} from "vuex";
-import pageableTable from "@/mixins/pageableTable";
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
 
 export default {
-    name: 'DomainOrderList',
-    mixins: [pageableTable],
-    data() {
-        return {
-            multipleMode: false,
-            search: "",
-            url: "/domainOrder/all",
-            downloading: false,
-            statusOptions: [{"label": "审核中", "value": "PENDING"}, {"label": "通过", "value": "SUCCESS"}, {
-                "label": "失败",
-                "value": "FAIL"
-            }],
-            orderStatusOptions: [{"label": "未支付", "value": "NOT_PAID"}, {
-                "label": "已支付,处理中",
-                "value": "PROCESSING"
-            }, {"label": "已完成", "value": "FINISH"}, {"label": "已取消", "value": "CANCELLED"}],
-            payMethodOptions: [{"label": "微信", "value": "WEIXIN"}, {
-                "label": "支付宝",
-                "value": "ALIPAY"
-            }, {"label": "无GAS费", "value": "FREE"}, {"label": "衫德支付", "value": "SANDPAY"}, {
-                "label": "河马支付",
-                "value": "HMPAY"
-            }, {"label": "首信易", "value": "PAYEASE"}, {"label": "余额支付", "value": "BALANCE"}, {
-                "label": "销毁藏品",
-                "value": "DESTROY"
-            }],
-        }
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        }
-    },
-    methods: {
-        statusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        orderStatusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.orderStatusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        payMethodFormatter(row, column, cellValue, index) {
-            let selectedOption = this.payMethodOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        beforeGetData() {
-            return {search: this.search, query: {orderStatus: 'FINISH', del: false}};
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: "/domainOrderEdit",
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        editRow(row) {
-            this.$router.push({
-                path: "/domainOrderEdit",
-                query: {
-                    id: row.id
-                }
-            });
-        },
-        download() {
+	name: 'DomainOrderList',
+	mixins: [pageableTable],
+	data() {
+		return {
+			multipleMode: false,
+			search: '',
+			url: '/domainOrder/all',
+			downloading: false,
+			statusOptions: [
+				{ label: '审核中', value: 'PENDING' },
+				{ label: '通过', value: 'SUCCESS' },
+				{
+					label: '失败',
+					value: 'FAIL'
+				}
+			],
+			orderStatusOptions: [
+				{ label: '未支付', value: 'NOT_PAID' },
+				{
+					label: '已支付,处理中',
+					value: 'PROCESSING'
+				},
+				{ label: '已完成', value: 'FINISH' },
+				{ label: '已取消', value: 'CANCELLED' }
+			],
+			payMethodOptions: [
+				{ label: '微信', value: 'WEIXIN' },
+				{
+					label: '支付宝',
+					value: 'ALIPAY'
+				},
+				{ label: '无GAS费', value: 'FREE' },
+				{ label: '衫德支付', value: 'SANDPAY' },
+				{
+					label: '河马支付',
+					value: 'HMPAY'
+				},
+				{ label: '首信易', value: 'PAYEASE' },
+				{ label: '余额支付', value: 'BALANCE' },
+				{
+					label: '销毁藏品',
+					value: 'DESTROY'
+				}
+			],
+            orderStatus: null,
+			picName: '',
+			userId: ''
+		};
+	},
+	computed: {
+		selection() {
+			return this.$refs.table.selection.map(i => i.id);
+		}
+	},
+	methods: {
+		statusFormatter(row, column, cellValue, index) {
+			let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+			if (selectedOption) {
+				return selectedOption.label;
+			}
+			return '';
+		},
+		orderStatusFormatter(row, column, cellValue, index) {
+			let selectedOption = this.orderStatusOptions.find(i => i.value === cellValue);
+			if (selectedOption) {
+				return selectedOption.label;
+			}
+			return '';
+		},
+		payMethodFormatter(row, column, cellValue, index) {
+			let selectedOption = this.payMethodOptions.find(i => i.value === cellValue);
+			if (selectedOption) {
+				return selectedOption.label;
+			}
+			return '';
+		},
+		beforeGetData() {
+			return this.getParams();
+		},
+		toggleMultipleMode(multipleMode) {
+			this.multipleMode = multipleMode;
+			if (!multipleMode) {
+				this.$refs.table.clearSelection();
+			}
+		},
+		addRow() {
+			this.$router.push({
+				path: '/domainOrderEdit',
+				query: {
+					...this.$route.query
+				}
+			});
+		},
+		editRow(row) {
+			this.$router.push({
+				path: '/domainOrderEdit',
+				query: {
+					id: row.id
+				}
+			});
+		},
+		download() {
             this.downloading = true;
+            let params = this.getParams();
+            params.size = 10000;
             this.$axios
-                .get("/domainOrder/excel", {
-                    responseType: "blob",
-                    params: {size: 10000}
+                .get('/domainOrder/excel', {
+                    responseType: 'blob',
+                    params: params,
                 })
                 .then(res => {
                     console.log(res);
                     this.downloading = false;
                     const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement("a");
+                    const link = document.createElement('a');
                     link.href = downloadUrl;
-                    link.setAttribute(
-                        "download",
-                        res.headers["content-disposition"].split("filename=")[1]
-                    );
+                    link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
                     document.body.appendChild(link);
                     link.click();
                     link.remove();
@@ -202,29 +210,52 @@ export default {
                     this.$message.error(e.error);
                 });
         },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
-                return this.$http.post(`/domainOrder/del/${row.id}`)
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(e => {
-                if (e !== 'cancel') {
-                    this.$message.error(e.error);
-                }
-            })
-        },
-    }
-}
+		operation1() {
+			this.$notify({
+				title: '提示',
+				message: this.selection
+			});
+		},
+		operation2() {
+			this.$message('操作2');
+		},
+		deleteRow(row) {
+			this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+				.then(() => {
+					return this.$http.post(`/domainOrder/del/${row.id}`);
+				})
+				.then(() => {
+					this.$message.success('删除成功');
+					this.getData();
+				})
+				.catch(e => {
+					if (e !== 'cancel') {
+						this.$message.error(e.error);
+					}
+				});
+		},
+		getParams() {
+			let data = {
+				// sort: 'createdAt,desc',
+				query: {
+					del: false
+				}
+			};
+			if (this.search) {
+				data.search = this.search;
+			}
+			if (this.orderStatus) {
+				data.query.orderStatus = this.orderStatus;
+			}
+			if (this.picName) {
+				data.query.picName = this.picName;
+			}
+			if (this.userId) {
+				data.query.userId = this.userId;
+			}
+			return data;
+		}
+	}
+};
 </script>
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 217 - 218
src/main/vue/src/views/PhotoAssetList.vue

@@ -1,108 +1,75 @@
 <template>
     <div class="list-view">
         <page-title>
-<!--            <el-button @click="addRow" type="primary" icon="el-icon-plus" :disabled="fetchingData || downloading"-->
-<!--                       class="filter-item">-->
-<!--                新增-->
-<!--            </el-button>-->
+            <!--            <el-button @click="addRow" type="primary" icon="el-icon-plus" :disabled="fetchingData || downloading"-->
+            <!--                       class="filter-item">-->
+            <!--                新增-->
+            <!--            </el-button>-->
             <el-button @click="download" icon="el-icon-upload2" :loading="downloading" :disabled="fetchingData"
-                       class="filter-item">
+                class="filter-item">
                 导出
             </el-button>
         </page-title>
         <div class="filters-container">
-            <el-input
-                placeholder="搜索..."
-                v-model="search"
-                clearable
-                class="filter-item search"
-                @keyup.enter.native="getData"
-            >
+            <el-select v-model="status" placeholder="筛选状态" clearable @change="getData" class="filter-item">
+                <el-option v-for="item in statusOptions" :key="item.value" :value="item.value"
+                    :label="item.label"></el-option>
+            </el-select>
+            <el-input placeholder="搜索用户ID" v-model="userId" clearable class="filter-item" @keyup.enter.native="getData">
+            </el-input>
+            <el-input placeholder="搜索用户名" v-model="userName" clearable class="filter-item" @keyup.enter.native="getData">
+            </el-input>
+            <el-input placeholder="搜索图片名称" v-model="picName" clearable class="filter-item" @keyup.enter.native="getData">
+            </el-input>
+            <el-input placeholder="搜索..." v-model="search" clearable class="filter-item search"
+                @keyup.enter.native="getData">
                 <el-button @click="getData" slot="append" icon="el-icon-search"></el-button>
             </el-input>
         </div>
-        <el-table :data="tableData" row-key="id" ref="table"
-                  header-row-class-name="table-header-row"
-                  header-cell-class-name="table-header-cell"
-                  row-class-name="table-row" cell-class-name="table-cell"
-                  :height="tableHeight" v-loading="fetchingData">
-            <el-table-column v-if="multipleMode" align="center" type="selection"
-                             width="50">
+        <el-table :data="tableData" row-key="id" ref="table" header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell" row-class-name="table-row" cell-class-name="table-cell"
+            :height="tableHeight" v-loading="fetchingData">
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50">
             </el-table-column>
             <el-table-column prop="id" label="ID" width="100">
             </el-table-column>
-            <el-table-column prop="userId" label="用户Id"
-            >
+            <el-table-column prop="userId" label="用户Id">
             </el-table-column>
-            <el-table-column prop="userName" label="用户名"
-            >
+            <el-table-column prop="userName" label="用户名">
             </el-table-column>
-            <el-table-column prop="destroyAssetName" label="销毁藏品"
-                             show-overflow-tooltip
-            >
+            <el-table-column prop="destroyAssetName" label="销毁藏品" show-overflow-tooltip>
             </el-table-column>
-            <el-table-column prop="destroyAssetNumber" label="藏品编号"
-            >
+            <el-table-column prop="destroyAssetNumber" label="藏品编号">
             </el-table-column>
             <el-table-column prop="destroyAssetPic" label="销毁藏品图片" width="90" align="center">
                 <template slot-scope="{ row }">
-                    <el-image
-                        style="width: 30px; height: 30px"
-                        :src="row.destroyAssetPicture.thumb || row.destroyAssetPicture.url"
-                        fit="cover"
-                        :preview-src-list="[row.destroyAssetPicture.thumb || row.destroyAssetPicture.url]"
-                    ></el-image>
+                    <el-image style="width: 30px; height: 30px"
+                        :src="row.destroyAssetPicture.thumb || row.destroyAssetPicture.url" fit="cover"
+                        :preview-src-list="[row.destroyAssetPicture.thumb || row.destroyAssetPicture.url]"></el-image>
                 </template>
             </el-table-column>
-            <el-table-column prop="picName" label="图片名称"
-                             show-overflow-tooltip
-            >
+            <el-table-column prop="picName" label="图片名称" show-overflow-tooltip>
             </el-table-column>
-            <el-table-column prop="picDesc" label="图片描述"
-                             show-overflow-tooltip
-            >
+            <el-table-column prop="picDesc" label="图片描述" show-overflow-tooltip>
             </el-table-column>
             <el-table-column prop="pic" label="作品内容" width="90" align="center">
                 <template slot-scope="{ row }">
-                    <el-image
-                        style="width: 30px; height: 30px"
-                        :src="row.pic.thumb || row.pic.url"
-                        fit="cover"
-                        :preview-src-list="[row.pic.thumb || row.pic.url]"
-                    ></el-image>
+                    <el-image style="width: 30px; height: 30px" :src="row.pic.thumb || row.pic.url" fit="cover"
+                        :preview-src-list="[row.pic.thumb || row.pic.url]"></el-image>
                 </template>
             </el-table-column>
-            <el-table-column prop="status" label="状态"
-                             :formatter="statusFormatter"
-            >
+            <el-table-column prop="status" label="状态" :formatter="statusFormatter">
             </el-table-column>
-            <el-table-column prop="auditResult" label="图片审查建议"
-            >
+            <el-table-column prop="auditResult" label="图片审查建议">
             </el-table-column>
-            <el-table-column
-                label="操作"
-                align="center"
-                fixed="right"
-                width="150">
+            <el-table-column label="操作" align="center" fixed="right" width="150">
                 <template slot-scope="{row}">
-                    <el-button
-                        @click="pass(row)"
-                        type="success"
-                        size="mini"
-                        plain
-                        v-if="row.status === 'PENDING' && row.orderStatus === 'FINISH'"
-                        :loading="row.saving"
-                    >
+                    <el-button @click="pass(row)" type="success" size="mini" plain
+                        v-if="row.status === 'PENDING' && row.orderStatus === 'FINISH'" :loading="row.saving">
                         通过
                     </el-button>
-                    <el-button
-                        @click="deny(row)"
-                        type="danger"
-                        size="mini"
-                        plain
-                        v-if="row.status === 'PENDING'"
-                        :loading="row.saving"
-                    >
+                    <el-button @click="deny(row)" type="danger" size="mini" plain v-if="row.status === 'PENDING'"
+                        :loading="row.saving">
                         拒绝
                     </el-button>
                 </template>
@@ -117,161 +84,193 @@
                     <el-button @click="toggleMultipleMode(false)">取消</el-button>
                 </el-button-group>
             </div> -->
-            <el-pagination background @size-change="onSizeChange"
-                           @current-change="onCurrentChange" :current-page="page"
-                           :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
-                           layout="total, sizes, prev, pager, next, jumper"
-                           :total="totalElements">
+            <el-pagination background @size-change="onSizeChange" @current-change="onCurrentChange" :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements">
             </el-pagination>
         </div>
 
     </div>
 </template>
 <script>
-import {mapState} from "vuex";
-import pageableTable from "@/mixins/pageableTable";
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
 
 export default {
-    name: 'PhotoAssetList',
-    mixins: [pageableTable],
-    data() {
-        return {
-            multipleMode: false,
-            search: "",
-            url: "/photoAsset/all",
-            downloading: false,
-            statusOptions: [{"label": "审核中", "value": "PENDING"}, {"label": "通过", "value": "SUCCESS"}, {
-                "label": "失败",
-                "value": "FAIL"
-            }],
-        }
-    },
-    computed: {
-        selection() {
-            return this.$refs.table.selection.map(i => i.id);
-        }
-    },
-    methods: {
-        afterGetData(res) {
-            this.tableData = res.content.map(item => {
-                return {
-                    ...item,
-                    saving: false
-                };
-            });
-        },
-        pass(row) {
-            this.$set(row, 'saving', true);
-            this.$confirm('确定通过?')
-                .then(res => {
-                    return this.$http.post('/photoAsset/pass', { id: row.id });
-                })
-                .then(res => {
-                    this.$message.success('成功');
-                    this.$set(row, 'saving', false);
-                    this.getData();
-                })
-                .catch(e => {
-                    this.$set(row, 'saving', false);
-                });
-        },
-        deny(row, index) {
-            this.$set(row, 'saving', true);
-            this.$confirm('确定拒绝?')
-                .then(res => {
-                    return this.$http.post('/photoAsset/deny', { id: row.id });
-                })
-                .then(res => {
-                    this.$message.success('成功');
-                    this.$set(row, 'saving', false);
-                    this.getData();
-                })
-                .catch(e => {
-                    this.$set(row, 'saving', false);
-                });
-        },
-        statusFormatter(row, column, cellValue, index) {
-            let selectedOption = this.statusOptions.find(i => i.value === cellValue);
-            if (selectedOption) {
-                return selectedOption.label;
-            }
-            return '';
-        },
-        beforeGetData() {
-            return {search: this.search, query: {del: false}};
-        },
-        toggleMultipleMode(multipleMode) {
-            this.multipleMode = multipleMode;
-            if (!multipleMode) {
-                this.$refs.table.clearSelection();
-            }
-        },
-        addRow() {
-            this.$router.push({
-                path: "/photoAssetEdit",
-                query: {
-                    ...this.$route.query
-                }
-            });
-        },
-        editRow(row) {
-            this.$router.push({
-                path: "/photoAssetEdit",
+	name: 'PhotoAssetList',
+	mixins: [pageableTable],
+	data() {
+		return {
+			multipleMode: false,
+			search: '',
+			url: '/photoAsset/all',
+			downloading: false,
+			statusOptions: [
+				{ label: '审核中', value: 'PENDING' },
+				{ label: '通过', value: 'SUCCESS' },
+				{
+					label: '失败',
+					value: 'FAIL'
+				}
+			],
+            status: null,
+            userId: '',
+            userName: '',
+            picName: ''
+
+		};
+	},
+	computed: {
+		selection() {
+			return this.$refs.table.selection.map(i => i.id);
+		}
+	},
+	methods: {
+		afterGetData(res) {
+			this.tableData = res.content.map(item => {
+				return {
+					...item,
+					saving: false
+				};
+			});
+		},
+		pass(row) {
+			this.$set(row, 'saving', true);
+			this.$confirm('确定通过?')
+				.then(res => {
+					return this.$http.post('/photoAsset/pass', { id: row.id });
+				})
+				.then(res => {
+					this.$message.success('成功');
+					this.$set(row, 'saving', false);
+					this.getData();
+				})
+				.catch(e => {
+					this.$set(row, 'saving', false);
+				});
+		},
+		deny(row, index) {
+			this.$set(row, 'saving', true);
+			this.$confirm('确定拒绝?')
+				.then(res => {
+					return this.$http.post('/photoAsset/deny', { id: row.id });
+				})
+				.then(res => {
+					this.$message.success('成功');
+					this.$set(row, 'saving', false);
+					this.getData();
+				})
+				.catch(e => {
+					this.$set(row, 'saving', false);
+				});
+		},
+		statusFormatter(row, column, cellValue, index) {
+			let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+			if (selectedOption) {
+				return selectedOption.label;
+			}
+			return '';
+		},
+        getParams() {
+            let data = {
+                // sort: 'createdAt,desc',
                 query: {
-                    id: row.id
-                }
-            });
-        },
-        download() {
-            this.downloading = true;
-            this.$axios
-                .get("/photoAsset/excel", {
-                    responseType: "blob",
-                    params: {size: 10000}
-                })
-                .then(res => {
-                    console.log(res);
-                    this.downloading = false;
-                    const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
-                    const link = document.createElement("a");
-                    link.href = downloadUrl;
-                    link.setAttribute(
-                        "download",
-                        res.headers["content-disposition"].split("filename=")[1]
-                    );
-                    document.body.appendChild(link);
-                    link.click();
-                    link.remove();
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.downloading = false;
-                    this.$message.error(e.error);
-                });
-        },
-        operation1() {
-            this.$notify({
-                title: '提示',
-                message: this.selection
-            });
-        },
-        operation2() {
-            this.$message('操作2');
-        },
-        deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
-                return this.$http.post(`/photoAsset/del/${row.id}`)
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(e => {
-                if (e !== 'cancel') {
-                    this.$message.error(e.error);
+                    del: false,
                 }
-            })
+            };
+            if (this.search) {
+                data.search = this.search;
+            }
+            if (this.status) {
+                data.query.status = this.status;
+            }
+            if (this.userName) {
+                data.query.userName = this.userName;
+            }
+            if (this.picName) {
+                data.query.picName = this.picName;
+            }
+            if (this.userId) {
+                data.query.userId = this.userId;
+            }
+            return data;
         },
-    }
-}
+		beforeGetData() {
+            return this.getParams();
+		},
+		toggleMultipleMode(multipleMode) {
+			this.multipleMode = multipleMode;
+			if (!multipleMode) {
+				this.$refs.table.clearSelection();
+			}
+		},
+		addRow() {
+			this.$router.push({
+				path: '/photoAssetEdit',
+				query: {
+					...this.$route.query
+				}
+			});
+		},
+		editRow(row) {
+			this.$router.push({
+				path: '/photoAssetEdit',
+				query: {
+					id: row.id
+				}
+			});
+		},
+		download() {
+			this.downloading = true;
+            let params = this.getParams();
+            params.size = 100000;
+			this.$axios
+				.get('/photoAsset/excel', {
+					responseType: 'blob',
+                    params: params
+				})
+				.then(res => {
+					console.log(res);
+					this.downloading = false;
+					const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+					const link = document.createElement('a');
+					link.href = downloadUrl;
+					link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+					document.body.appendChild(link);
+					link.click();
+					link.remove();
+				})
+				.catch(e => {
+					console.log(e);
+					this.downloading = false;
+					this.$message.error(e.error);
+				});
+		},
+		operation1() {
+			this.$notify({
+				title: '提示',
+				message: this.selection
+			});
+		},
+		operation2() {
+			this.$message('操作2');
+		},
+		deleteRow(row) {
+			this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' })
+				.then(() => {
+					return this.$http.post(`/photoAsset/del/${row.id}`);
+				})
+				.then(() => {
+					this.$message.success('删除成功');
+					this.getData();
+				})
+				.catch(e => {
+					if (e !== 'cancel') {
+						this.$message.error(e.error);
+					}
+				});
+		}
+	}
+};
 </script>
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 103 - 0
src/main/vue/src/views/RaexSnapshotEdit.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="edit-view">
+        <page-title>
+            <el-button @click="$router.go(-1)" :disabled="saving">取消</el-button>
+            <el-button @click="onDelete" :disabled="saving" type="danger" v-if="formData.id">
+                删除
+            </el-button>
+            <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
+        </page-title>
+        <div class="edit-view__content-wrapper">
+            <div class="edit-view__content-section">
+                <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right"
+                         size="small"
+                         style="max-width: 500px;">
+                        <el-form-item prop="name" label="快照名称">
+                                    <el-input v-model="formData.name"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="rule" label="快照规则">
+                                    <el-input v-model="formData.rule"></el-input>
+                        </el-form-item>
+                    <el-form-item class="form-submit">
+                        <el-button @click="onSave" :loading="saving" type="primary">
+                            保存
+                        </el-button>
+                        <el-button @click="onDelete" :disabled="saving" type="danger" v-if="formData.id">
+                            删除
+                        </el-button>
+                        <el-button @click="$router.go(-1)" :disabled="saving">取消</el-button>
+                    </el-form-item>
+                </el-form>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+    export default {
+        name: 'RaexSnapshotEdit',
+        created() {
+            if (this.$route.query.id) {
+                this.$http
+                    .get('raexSnapshot/get/' + this.$route.query.id)
+                    .then(res => {
+                        this.formData = res;
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.$message.error(e.error);
+                    });
+            }
+        },
+        data() {
+            return {
+                saving: false,
+                formData: {
+                },
+                rules: {
+                },
+            }
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.submit();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            submit() {
+                let data = {...this.formData};
+
+                this.saving = true;
+                this.$http
+                    .post('/raexSnapshot/save', data, {body: 'json'})
+                    .then(res => {
+                        this.saving = false;
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.saving = false;
+                        this.$message.error(e.error);
+                    });
+            },
+            onDelete() {
+                this.$confirm('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post(`/raexSnapshot/del/${this.formData.id}`)
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped></style>

+ 112 - 0
src/main/vue/src/views/RaexSnapshotList.vue

@@ -0,0 +1,112 @@
+<template>
+    <div class="list-view">
+        <div class="filters-container">
+        </div>
+        <el-table :data="tableData" row-key="id" ref="table" header-row-class-name="table-header-row"
+            header-cell-class-name="table-header-cell" row-class-name="table-row" cell-class-name="table-cell"
+            :height="tableHeight" v-loading="fetchingData">
+            <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
+            <el-table-column prop="name" align="center" label="名称" width="200"> </el-table-column>
+            <el-table-column prop="rule" align="center" label="作用"> </el-table-column>
+            <el-table-column label="操作" align="center" fixed="right" width="200">
+                <template slot-scope="{ row }">
+                    <el-button @click="addParams(row.id)" type="primary" size="mini" plain> 生成快照 </el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <el-dialog :visible.sync="showParamsDialog" title="添加参数" width="600px" :close-on-click-modal="false">
+            <el-form ref="paramsForm">
+                <el-form-item :rules="[{ required: true, message: '请输入名称' }]" width="300px">
+                    <el-input v-model="name" placeholder="请输入名称">
+                    </el-input>
+                </el-form-item>
+                <el-form-item :rules="[{ required: true, message: '请输入时间' }]" width="300px">
+                    <el-date-picker v-model="time" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
+                        placeholder="请输入时间"></el-date-picker>
+                </el-form-item>
+            </el-form>
+            <div slot="footer">
+                <el-button @click="showParamsDialog = false" size="mini"> 取消 </el-button>
+                <el-button @click="snapshot" size="mini" :loading="loading" type="primary"> 生成快照数据 </el-button>
+            </div>
+        </el-dialog>
+        <div class="pagination-wrapper">
+            <el-pagination background @size-change="onSizeChange" @current-change="onCurrentChange" :current-page="page"
+                :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+                :total="totalElements">
+            </el-pagination>
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import pageableTable from '@/mixins/pageableTable';
+
+export default {
+	name: 'RaexSnapshotList',
+	mixins: [pageableTable],
+	data() {
+		return {
+			tips: '',
+			id: '',
+			loading: false,
+			time: '',
+			name: '',
+			showParamsDialog: false,
+			multipleMode: false,
+			search: '',
+			url: '/raexSnapshot/all'
+		};
+	},
+	computed: {
+		selection() {
+			return this.$refs.table.selection.map(i => i.id);
+		}
+	},
+	methods: {
+		beforeGetData() {
+			return { search: this.search, query: { del: false } };
+		},
+		toggleMultipleMode(multipleMode) {
+			this.multipleMode = multipleMode;
+			if (!multipleMode) {
+				this.$refs.table.clearSelection();
+			}
+		},
+		addParams(id) {
+			this.name = '';
+			this.time = '';
+			this.id = id;
+			this.showParamsDialog = true;
+			if (this.$refs.paramsForm) {
+				this.$nextTick(() => {
+					this.$refs.paramsForm.clearValidate();
+				});
+			}
+		},
+		snapshot() {
+			this.loading = true;
+			this.$axios
+				.get('/raexSnapshot/shot', { responseType: 'blob', params: { name: this.name, time: this.time } })
+				.then(res => {
+					console.log(res);
+					const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+					const link = document.createElement('a');
+					link.href = downloadUrl;
+					link.setAttribute('download', res.headers['content-disposition'].split('filename=')[1]);
+					document.body.appendChild(link);
+					link.click();
+					link.remove();
+					this.loading = false;
+					this.showParamsDialog = false;
+				})
+				.catch(e => {
+					console.log(e);
+					this.loading = false;
+					this.$message.error(e.error);
+				});
+		}
+	}
+};
+</script>
+<style lang="less" scoped></style>