Browse Source

需求----新增报表分享菜单

Raod 3 năm trước cách đây
mục cha
commit
db091f00b7

+ 7 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/ReportShareController.java

@@ -66,4 +66,11 @@ public class ReportShareController extends GaeaBaseController<ReportShareParam,
         return ResponseBean.builder().data(reportShareService.detailByCode(shareCode)).build();
     }
 
+    @PostMapping({"/shareDelay"})
+    @Permission(code = "shareDelay", name = "分享延期")
+    public ResponseBean shareDelay(@RequestBody ReportShareDto dto) {
+        reportShareService.shareDelay(dto);
+        return ResponseBean.builder().build();
+    }
+
 }

+ 2 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/dto/ReportShareDto.java

@@ -2,6 +2,8 @@
 package com.anjiplus.template.gaea.business.modules.reportshare.controller.dto;
 
 import java.io.Serializable;
+
+import com.anji.plus.gaea.annotation.Formatter;
 import com.anji.plus.gaea.curd.dto.GaeaBaseDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;

+ 15 - 5
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/param/ReportShareParam.java

@@ -1,16 +1,26 @@
 /**/
 package com.anjiplus.template.gaea.business.modules.reportshare.controller.param;
 
+import com.anji.plus.gaea.annotation.Query;
+import com.anji.plus.gaea.constant.QueryEnum;
 import com.anji.plus.gaea.curd.params.PageParam;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
 
 /**
-* @desc ReportShare 报表分享查询输入类
-* @author Raod
-* @date 2021-08-18 13:37:26.663
-**/
+ * @author Raod
+ * @desc ReportShare 报表分享查询输入类
+ * @date 2021-08-18 13:37:26.663
+ **/
 @Data
-public class ReportShareParam extends PageParam implements Serializable{
+public class ReportShareParam extends PageParam implements Serializable {
+    /** 分享编码,系统生成,默认UUID */
+    @Query(value = QueryEnum.EQ)
+    private String shareCode;
+
+    /** 报表编码 */
+    @Query(value = QueryEnum.LIKE)
+    private String reportCode;
 }

+ 6 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/service/ReportShareService.java

@@ -24,4 +24,10 @@ public interface ReportShareService extends GaeaBaseService<ReportShareParam, Re
     ReportShareDto insertShare(ReportShareDto dto);
 
     ReportShare detailByCode(String shareCode);
+
+    /**
+     * 延期过期时间
+     * @param dto
+     */
+    void shareDelay(ReportShareDto dto);
 }

+ 17 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/service/impl/ReportShareServiceImpl.java

@@ -86,6 +86,23 @@ public class ReportShareServiceImpl implements ReportShareService {
         return reportShare;
     }
 
+    /**
+     * 延期过期时间
+     *
+     * @param dto
+     */
+    @Override
+    public void shareDelay(ReportShareDto dto) {
+        Integer shareValidType = dto.getShareValidType();
+        if (null == dto.getId() || null == shareValidType) {
+            throw BusinessExceptionBuilder.build("入参不完整");
+        }
+        ReportShare entity = selectOne(dto.getId());
+        entity.setShareValidTime(DateUtil.getFutureDateTmdHmsByTime(entity.getShareValidTime(), shareValidType));
+        entity.setShareToken(JwtUtil.createToken(entity.getReportCode(), entity.getShareCode(), entity.getSharePassword(), entity.getShareValidTime()));
+        update(entity);
+    }
+
     @Override
     public void processBeforeOperation(ReportShare entity, BaseOperationEnum operationEnum) throws BusinessException {
         switch (operationEnum) {

+ 17 - 0
report-core/src/main/java/com/anjiplus/template/gaea/business/util/DateUtil.java

@@ -62,6 +62,23 @@ public class DateUtil {
         return calendar.getTime();
     }
 
+    /**未来时间
+     * 根据指定时间获取
+     * @param time
+     * @param day
+     * @return
+     */
+    public static Date getFutureDateTmdHmsByTime(Date time, int day) {
+        if (day <= 0) {
+            //默认2099年
+            return parse("2099-01-01", defaultDatePattern);
+        }
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(time);
+        calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + day);
+        return calendar.getTime();
+    }
+
     public static void main(String[] args) {
         Date futureDateTmdHms = getFutureDateTmdHms(7);
         System.out.println(futureDateTmdHms);

+ 8 - 0
report-core/src/main/resources/db/migration/V1.0.22__add_report_share.sql

@@ -0,0 +1,8 @@
+INSERT INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('report', 'reportShareManage', '报表分享', 'query', '查询报表分享', 231, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1);
+INSERT INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('report', 'reportShareManage', '报表分享', 'detail', '查询明细', 232, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1);
+INSERT INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('report', 'reportShareManage', '报表分享', 'shareDelay', '分享延期', 233, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1);
+INSERT INTO `aj_report`.`access_authority`(`parent_target`, `target`, `target_name`, `action`, `action_name`, `sort`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('report', 'reportShareManage', '报表分享', 'delete', '删除分享', 234, 1, 0, 'admin', '2019-07-23 15:59:40', 'admin', '2019-07-23 15:59:40', 1);
+INSERT INTO `aj_report`.`access_role_authority`(`role_code`, `target`, `action`) VALUES ('root', 'reportShareManage', 'query');
+INSERT INTO `aj_report`.`access_role_authority`(`role_code`, `target`, `action`) VALUES ('root', 'reportShareManage', 'detail');
+INSERT INTO `aj_report`.`access_role_authority`(`role_code`, `target`, `action`) VALUES ('root', 'reportShareManage', 'shareDelay');
+INSERT INTO `aj_report`.`access_role_authority`(`role_code`, `target`, `action`) VALUES ('root', 'reportShareManage', 'delete');

+ 16 - 8
report-ui/src/api/reportShare.js

@@ -16,12 +16,20 @@ export function reportShareAdd(data) {
   })
 }
 
+export function reportShareDelay(data) {
+  return request({
+    url: 'reportShare/shareDelay',
+    method: 'post',
+    data
+  })
+}
+
 export function reportShareDeleteBatch(data) {
-return request({
-url: 'reportShare/delete/batch',
-method: 'post',
-data
-})
+  return request({
+    url: 'reportShare/delete/batch',
+    method: 'post',
+    data
+  })
 }
 
 export function reportShareUpdate(data) {
@@ -35,7 +43,7 @@ export function reportShareDetail(data) {
   return request({
     url: 'reportShare/' + data.id,
     method: 'get',
-    params: { accessKey: data.accessKey }
+    params: {accessKey: data.accessKey}
   })
 }
 
@@ -43,8 +51,8 @@ export function reportShareDetailByCode(data) {
   return request({
     url: 'reportShare/detailByCode',
     method: 'get',
-    params: { shareCode: data }
+    params: {shareCode: data}
   })
 }
 
-export default { reportShareList, reportShareAdd, reportShareDeleteBatch, reportShareUpdate, reportShareDetail }
+export default {reportShareList, reportShareAdd, reportShareDeleteBatch, reportShareUpdate, reportShareDetail}

+ 205 - 193
report-ui/src/router/index.js

@@ -26,263 +26,275 @@ import Layout from '../views/layout/Layout'
 * AuthKey: 'roleManage:find'      该页面进入的权限码
 **/
 export const constantRouterMap = [
-  { 
-    path: '/login', 
-    component: () => import('@/views/login'), hidden: true 
+  {
+    path: '/login',
+    component: () => import('@/views/login'), hidden: true
   },
-  { 
+  {
     path: '/aj/**',
-    component: () => import('@/views/bigScreenReport/aj'), 
-    hidden: true 
+    component: () => import('@/views/bigScreenReport/aj'),
+    hidden: true
   },
   {
-    path: '/index', 
-    component: Layout, 
-    name: 'index', 
-    meta: { 
-      title: '首页', 
-      icon: 'iconhome2' 
+    path: '/index',
+    component: Layout,
+    name: 'index',
+    meta: {
+      title: '首页',
+      icon: 'iconhome2'
     },
     children: [
-      { 
-        path: '', 
-        component: () => import('@/views/home/index'), 
-        meta: { 
-          title: '首页', 
-          icon: 'iconhome2', 
-          keepAlive: true, 
-          requireAuth: true 
-        } 
+      {
+        path: '',
+        component: () => import('@/views/home/index'),
+        meta: {
+          title: '首页',
+          icon: 'iconhome2',
+          keepAlive: true,
+          requireAuth: true
+        }
       },
     ]
   },
   {
-    path: '/access', 
-    name: 'access', 
-    component: Layout, 
-    meta: { 
-      title: '用户权限', 
-      icon: 'icondfzq-', 
+    path: '/access',
+    name: 'access',
+    component: Layout,
+    meta: {
+      title: '用户权限',
+      icon: 'icondfzq-',
       requireAuth: true,
-      permission: 'authorityManage|roleManage|userManage' 
+      permission: 'authorityManage|roleManage|userManage'
     },
     children: [
-      { 
-        path: 'authority', 
-        name: 'authority', 
-        component: () => import('@/views/accessAuthority/index'), 
-        meta: { 
-          title: '权限管理', 
-          icon: 'iconquanxian', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'authority',
+        name: 'authority',
+        component: () => import('@/views/accessAuthority/index'),
+        meta: {
+          title: '权限管理',
+          icon: 'iconquanxian',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'authorityManage'
-        } 
+        }
       },
-      { 
-        path: 'role', 
-        name: 'role', 
-        component: () => import('@/views/accessRole/index'), 
-        meta: { 
-          title: '角色管理', 
-          icon: 'iconjiaose1', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'role',
+        name: 'role',
+        component: () => import('@/views/accessRole/index'),
+        meta: {
+          title: '角色管理',
+          icon: 'iconjiaose1',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'roleManage'
-        } 
+        }
       },
-      { 
-        path: 'user', 
-        name: 'user', 
-        component: () => import('@/views/accessUser/index'), 
-        meta: { 
-          title: '用户管理', 
-          icon: 'iconyonghu', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'user',
+        name: 'user',
+        component: () => import('@/views/accessUser/index'),
+        meta: {
+          title: '用户管理',
+          icon: 'iconyonghu',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'userManage'
-        } 
+        }
       },
     ]
   },
   {
-    path: '/report', 
-    name: 'report', 
-    component: Layout, 
-    meta: { 
-      title: '报表设计', 
-      icon: 'iconnavicon-ywcs', 
-      requireAuth: true, 
-      permission: 'datasourceManage|resultsetManage|reportManage|bigScreenManage' 
+    path: '/report',
+    name: 'report',
+    component: Layout,
+    meta: {
+      title: '报表设计',
+      icon: 'iconnavicon-ywcs',
+      requireAuth: true,
+      permission: 'datasourceManage|resultsetManage|reportManage|bigScreenManage'
     },
     children: [
-      { 
-        path: 'datasource', 
-        name: 'datasource', 
-        component: () => import('@/views/datasource/index'), 
-        meta: { 
-          title: '数据源', 
-          icon: 'icondatabase', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'datasource',
+        name: 'datasource',
+        component: () => import('@/views/datasource/index'),
+        meta: {
+          title: '数据源',
+          icon: 'icondatabase',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'datasourceManage'
-        } 
+        }
       },
-      { 
-        path: 'resultset', 
-        name: 'resultset', 
+      {
+        path: 'resultset',
+        name: 'resultset',
         component: () => import('@/views/resultset/index'),
-        meta: { 
-          title: '数据集', 
-          icon: 'iconAPIwangguan', 
-          keepAlive: true, 
-          requireAuth: true, 
+        meta: {
+          title: '数据集',
+          icon: 'iconAPIwangguan',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'resultsetManage'
-        } 
+        }
       },
-      { 
-        path: 'report', 
-        name: 'reportIndex', 
-        component: () => import('@/views/reportManage/index'), 
-        meta: { 
-          title: '报表管理', 
-          icon: 'iconnavicon-ywcs', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'report',
+        name: 'reportIndex',
+        component: () => import('@/views/reportManage/index'),
+        meta: {
+          title: '报表管理',
+          icon: 'iconnavicon-ywcs',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'reportManage'
-        } 
+        }
       },
-      { 
-        path: 'bigscreen', 
-        name: 'bigscreen', 
-        component: () => import('@/views/bigScreenReport/index'), 
-        meta: { 
-          title: '大屏报表', 
-          icon: 'iconchufaqipeizhi-hui', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'bigscreen',
+        name: 'bigscreen',
+        component: () => import('@/views/bigScreenReport/index'),
+        meta: {
+          title: '大屏报表',
+          icon: 'iconchufaqipeizhi-hui',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'bigScreenManage'
-        },       
+        },
       },
-      { 
-        path: 'excelreport', 
-        name: 'excelreport', 
-        component: () => import('@/views/excelreport/index'), 
-        meta: { 
-          title: '表格报表', 
-          icon: 'iconliebiao', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'excelreport',
+        name: 'excelreport',
+        component: () => import('@/views/excelreport/index'),
+        meta: {
+          title: '表格报表',
+          icon: 'iconliebiao',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'excelManage'
-        } 
+        }
+      },
+      {
+        path: 'reportshare',
+        name: 'reportshare',
+        component: () => import('@/views/reportShare/index'),
+        meta: {
+          title: '报表分享',
+          icon: 'iconliebiao',
+          keepAlive: true,
+          requireAuth: true,
+          permission: 'reportShareManage'
+        }
       },
     ]
   },
   {
-    path: '/system', 
-    name: 'system', 
-    component: Layout, 
-    meta: { 
-      title: '系统设置', 
-      icon: 'iconshezhi', 
-      requireAuth: true, 
-      permission: 'fileManage|dictManage|dictItemManage' 
+    path: '/system',
+    name: 'system',
+    component: Layout,
+    meta: {
+      title: '系统设置',
+      icon: 'iconshezhi',
+      requireAuth: true,
+      permission: 'fileManage|dictManage|dictItemManage'
     },
     children: [
-      { 
-        path: 'file', 
-        name: 'file', 
-        component: () => import('@/views/fileManagement/index'), 
-        meta: { 
-          title: '文件管理', 
-          icon: 'iconfill_folder', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'file',
+        name: 'file',
+        component: () => import('@/views/fileManagement/index'),
+        meta: {
+          title: '文件管理',
+          icon: 'iconfill_folder',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'fileManage'
-        } 
+        }
       },
-      { 
-        path: 'dict', 
-        name: 'dict', 
-        component: () => import('@/views/dict/index'), 
-        meta: { 
-          title: '数据字典', 
-          icon: 'iconzidian', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'dict',
+        name: 'dict',
+        component: () => import('@/views/dict/index'),
+        meta: {
+          title: '数据字典',
+          icon: 'iconzidian',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'dictManage'
-        } 
+        }
       },
-      { 
-        path: 'dictItem', 
-        name: 'dictItem', 
-        component: () => import('@/views/dict/dict-item'), 
-        hidden: true, 
-        meta: { 
-          title: '字典项', 
-          icon: 'iconzidianxiang', 
-          keepAlive: true, 
-          requireAuth: true, 
+      {
+        path: 'dictItem',
+        name: 'dictItem',
+        component: () => import('@/views/dict/dict-item'),
+        hidden: true,
+        meta: {
+          title: '字典项',
+          icon: 'iconzidianxiang',
+          keepAlive: true,
+          requireAuth: true,
           permission: 'dictItemManage'
-        } 
+        }
       },
     ]
   },
-  { 
-    path: '/bigscreen/viewer', 
-    component: () => import('@/views/bigscreenDesigner/viewer'), 
-    hidden: true, 
-    meta: { 
-      requireAuth: true 
+  {
+    path: '/bigscreen/viewer',
+    component: () => import('@/views/bigscreenDesigner/viewer'),
+    hidden: true,
+    meta: {
+      requireAuth: true
     }
   },
-  { 
-    path: '/bigscreen/designer', 
-    component: () => import('@/views/bigscreenDesigner/designer'), 
-    hidden: true, 
-    meta: { 
-      requireAuth: true 
+  {
+    path: '/bigscreen/designer',
+    component: () => import('@/views/bigscreenDesigner/designer'),
+    hidden: true,
+    meta: {
+      requireAuth: true
     }
   },
-  { 
-    path: '/excelreport/viewer', 
-    component: () => import('@/views/excelreport/viewer'), 
-    hidden: true, 
-    meta: { 
-      requireAuth: true 
+  {
+    path: '/excelreport/viewer',
+    component: () => import('@/views/excelreport/viewer'),
+    hidden: true,
+    meta: {
+      requireAuth: true
     }
   },
-  { 
-    path: '/excelreport/designer', 
-    component: () => import('@/views/excelreport/designer'), 
-    hidden: true, 
-    meta: { 
-      requireAuth: true 
+  {
+    path: '/excelreport/designer',
+    component: () => import('@/views/excelreport/designer'),
+    hidden: true,
+    meta: {
+      requireAuth: true
     }
   },
   // 重写大屏
   {
-    path: '/screenDesigner', 
+    path: '/screenDesigner',
     component: () => import('@/views/screenDesigner/index'),
-    name: 'screenDesigner', 
+    name: 'screenDesigner',
   },
   {
-    path: '/screen/preview', 
-    component: () => import('@/views/screenDesigner/preview'), 
-    hidden: true, 
-    meta: { 
-      requireAuth: true 
+    path: '/screen/preview',
+    component: () => import('@/views/screenDesigner/preview'),
+    hidden: true,
+    meta: {
+      requireAuth: true
     }
   },
-  { 
-    path: '/404', 
-    component: () => import('@/views/404'), 
-    hidden: true 
+  {
+    path: '/404',
+    component: () => import('@/views/404'),
+    hidden: true
   },
-  { 
-    path: '*', 
-    redirect: '/login', 
-    hidden: true 
+  {
+    path: '*',
+    redirect: '/login',
+    hidden: true
   },
 ]
 

+ 238 - 0
report-ui/src/views/reportShare/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <anji-crud ref="listPage" :option="crudOption">
+    <template v-slot:pageSection>
+
+    </template>
+  </anji-crud>
+</template>
+<script>
+import {
+  reportShareDeleteBatch,
+  reportShareDetail,
+  reportShareList,
+  reportShareDelay, reportShareAdd
+} from "@/api/reportShare";
+export default {
+  name: "Report",
+  components: {
+    anjiCrud: require("@/components/AnjiPlus/anji-crud/anji-crud").default,
+  },
+  data() {
+    return {
+      crudOption: {
+        // 使用菜单做为页面标题
+        title: '报表分享',
+        // 详情页中输入框左边文字宽度
+        labelWidth: '120px',
+        // 查询表单条件
+        queryFormFields: [
+          {
+            inputType: "input",
+            label: "分享编码",
+            field: "shareCode"
+          },
+          {
+            inputType: "input",
+            label: "报表编码",
+            field: "reportCode"
+          },
+        ],
+        // 表头按钮
+        tableButtons: [
+          {
+            label: "删除",
+            type: "danger",
+            permission: "reportShareManage:delete",
+            icon: "el-icon-delete",
+            plain: false,
+            click: () => {
+              return this.$refs.listPage.handleDeleteBatch();
+            }
+          }
+        ],
+        // 表格行按钮
+        rowButtons: [
+          {
+            label: "复制url",
+            click: this.copyUrlPath
+          },
+          {
+            label: "删除",
+            permission: "reportShareManage:delete",
+            click: row => {
+              return this.$refs.listPage.handleDeleteBatch(row);
+            }
+          },
+          {
+            label: "延期1天",
+            permission: "reportShareManage:shareDelay",
+            click: this.shareDelay_1
+          },
+          {
+            label: "延期1周",
+            permission: "reportShareManage:shareDelay",
+            click: this.shareDelay_7
+          },
+          {
+            label: "延期1月",
+            permission: "reportShareManage:shareDelay",
+            click: this.shareDelay_30
+          },
+        ],
+        // 操作按钮
+        buttons: {
+          query: {
+            api: reportShareList,
+            permission: 'ReportShare:query'
+          },
+          queryByPrimarykey: {
+            api: reportShareDetail,
+            permission: 'ReportShare:detail'
+          },
+          delete: {
+            api: reportShareDeleteBatch,
+            permission: 'ReportShare:delete'
+          },
+          rowButtonsWidth: 150 // row自定义按钮表格宽度
+        },
+        // 表格列
+        columns: [
+          {
+            label: '',
+            field: 'id',
+            primaryKey: true, // 根据主键查询详情或者根据主键删除时, 主键的
+            tableHide: true, // 表格中不显示
+            editHide: true, // 编辑弹框中不显示
+          },
+          {
+            label: '报表编码',//报表编码
+            placeholder: '',
+            field: 'reportCode',
+            editField: 'reportCode',
+            inputType: 'input',
+            rules: [
+              { min: 1, max: 50, message: '不超过50个字符', trigger: 'blur' }
+            ],
+            disabled: false,
+          },
+          {
+            label: '分享编码',//分享编码,系统生成,默认UUID
+            placeholder: '',
+            field: 'shareCode',
+            editField: 'shareCode',
+            inputType: 'input',
+            rules: [
+              { min: 1, max: 50, message: '不超过50个字符', trigger: 'blur' }
+            ],
+            disabled: false,
+          },
+          {
+            label: '分享有效期类型',//分享有效期类型,DIC_NAME=SHARE_VAILD
+            placeholder: '',
+            field: 'shareValidType',
+            fieldTableRowRenderer: row => {
+              return this.getDictLabelByCode("SHARE_VAILD", row["shareValidType"]);
+            },
+            editField: 'shareValidType',
+            inputType: 'input',
+            rules: [
+            ],
+            disabled: false,
+          },
+          {
+            label: '分享有效期',//分享有效期
+            placeholder: '',
+            field: 'shareValidTime',
+            editField: 'shareValidTime',
+            inputType: 'input',
+            rules: [
+            ],
+            disabled: false,
+          },
+          {
+            label: '分享token',//分享token
+            placeholder: '',
+            field: 'shareToken',
+            editField: 'shareToken',
+            inputType: 'input',
+            rules: [
+              { min: 1, max: 255, message: '不超过255个字符', trigger: 'blur' }
+            ],
+            disabled: false,
+          },
+          {
+            label: '分享url',//分享url
+            placeholder: '',
+            field: 'shareUrl',
+            editField: 'shareUrl',
+            inputType: 'input',
+            rules: [
+              { min: 1, max: 100, message: '不超过100个字符', trigger: 'blur' }
+            ],
+            disabled: false,
+          },
+        ],
+        // 弹出框表单对应的值有改动时
+        // formData 整个表单,通过编辑打开弹出框,根据主键查询数据时,fieldName, fieldVal, fieldExtend为空
+        // fieldName 触发修改的input name
+        // fieldVal input最新值
+        // fieldExtend 对于select型的扩展值
+        formChange: (formData, fieldName, fieldVal, fieldExtend) => {
+
+        }
+      },
+
+      // 复制
+      copyVisible: false,
+      rowData: {}
+    };
+  },
+
+  created() {},
+  methods: {
+    handleOpenDialog1() {
+      alert("自定义按钮1点击事件");
+    },
+
+    shareDelay_1(val) {
+      this.shareDelay(val.id, 1)
+    },
+    shareDelay_7(val) {
+      this.shareDelay(val.id, 7)
+    },
+    shareDelay_30(val) {
+      this.shareDelay(val.id, 30)
+    },
+
+    async shareDelay(shareId, shareValidType) {
+      const param = {}
+      param['id'] = shareId
+      param['shareValidType'] = shareValidType
+      const {code} = await reportShareDelay(param);
+      if (code != "200") return;
+      this.$message({
+        message: "延期成功!",
+        type: "success"
+      });
+      this.$refs.listPage.handleQueryForm("query");
+    },
+
+    copyUrlPath(val) {
+      this.copyToClip(val.shareUrl);
+      this.$message({
+        message: "已将url路径复制至剪切板!",
+        type: "success"
+      });
+    },
+
+    copyToClip(content, message) {
+      let aux = document.createElement("input");
+      aux.setAttribute("value", content);
+      document.body.appendChild(aux);
+      aux.select();
+      document.execCommand("copy");
+      document.body.removeChild(aux);
+    }
+  }
+};
+</script>