diff --git a/ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java b/ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
index cf00c42f9b0dce4065ea1fc280beecc70aafd831..04118f80664f77b292f989c4b6f4af09adae0742 100644
--- a/ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
+++ b/ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
@@ -56,7 +56,7 @@ public class ActSuppliesHistorydataController extends BaseController
     {
         List<ActSuppliesHistorydata> list = actSuppliesHistorydataService.selectActSuppliesHistorydataList(actSuppliesHistorydata);
         ExcelUtil<ActSuppliesHistorydata> util = new ExcelUtil<ActSuppliesHistorydata>(ActSuppliesHistorydata.class);
-        return util.exportExcel(list, " 历史数据数据");
+        return util.exportExcel(list, " 历史数据");
     }
 
     /**
@@ -102,7 +102,6 @@ public class ActSuppliesHistorydataController extends BaseController
         return toAjax(actSuppliesHistorydataService.deleteActSuppliesHistorydataByIds(ids));
     }
 
-
     /**
      * 添加 历史数据
      */
@@ -111,11 +110,8 @@ public class ActSuppliesHistorydataController extends BaseController
     @PostMapping("/addInsert")
     public AjaxResult addInsert(@RequestBody List<ActSuppliesHistorydata> actSuppliesHistorydata)
     {
-
         actSuppliesHistorydataService.addInsertActSuppliesHistorydata(actSuppliesHistorydata);
-
         return toAjax(1);
     }
-
-
 }
+
diff --git a/ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java b/ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
index 89fae840d597d615ad9b687050e1e49302b63432..c7e2f09d46ea891236ec7f7e161965451cd651a3 100644
--- a/ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
+++ b/ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
@@ -22,6 +22,13 @@ public class ActSuppliesHistorydata extends BaseEntity
     @Excel(name = "模板")
     private Long templateId;
 
+    /** 模板 */
+    @Excel(name = "模板Name")
+    private String templateName;
+
+    /** 模板 */
+    @Excel(name = "规则Name")
+    private String roleName;
     /** 导入 */
     @Excel(name = "导入")
     private String importUuid;
@@ -68,6 +75,26 @@ public class ActSuppliesHistorydata extends BaseEntity
     {
         return templateId;
     }
+    public void setTemplateName(String templateName)
+    {
+        this.templateName = templateName;
+    }
+
+    public String getTemplateName()
+    {
+        return templateName;
+    }
+
+    public void setRoleName(String roleName)
+    {
+        this.roleName = roleName;
+    }
+
+    public String getRoleName()
+    {
+        return roleName;
+    }
+
     public void setImportUuid(String importUuid)
     {
         this.importUuid = importUuid;
diff --git a/ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java b/ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
index 6accf01db4b9d392a38b54fe1121e015522379ec..d30917057f6cf449566f9c73c104d9705764eb92 100644
--- a/ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
+++ b/ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
@@ -44,6 +44,8 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
     @Override
     public List<ActSuppliesHistorydata> selectActSuppliesHistorydataList(ActSuppliesHistorydata actSuppliesHistorydata)
     {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+      actSuppliesHistorydata.setCreateBy(user.getUserName());
         return actSuppliesHistorydataMapper.selectActSuppliesHistorydataList(actSuppliesHistorydata);
     }
 
diff --git a/ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml b/ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
index b04c3783298ece442a0cc2ae29da669706e0da77..79c45399765b4028a755edbbb7b1c085ade7b6f1 100644
--- a/ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
+++ b/ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
@@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="importUuid"    column="import_uuid"    />
         <result property="templateId"    column="template_id"    />
+        <result property="templateName"    column="template_name"    />
+        <result property="roleName"    column="role_name"    />
         <result property="exportUuid"    column="export_uuid"    />
         <result property="roleId"    column="role_id"    />
         <result property="historyName"    column="history_name"    />
@@ -23,12 +25,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectActSuppliesHistorydataList" parameterType="ActSuppliesHistorydata" resultMap="ActSuppliesHistorydataResult">
-        <include refid="selectActSuppliesHistorydataVo"/>
-        <where>  
-            <if test="importUuid != null  and importUuid != ''"> and import_uuid = #{importUuid}</if>
-            <if test="templateId != null "> and template_id = #{templateId}</if>
-            <if test="exportUuid != null  and exportUuid != ''"> and export_uuid = #{exportUuid}</if>
-            <if test="roleId != null "> and role_id = #{roleId}</if>
+        <!--<include refid="selectActSuppliesHistorydataVo"/>-->
+        SELECT t1.id, t1.template_id, t2.template_name, t3.role_name, t1.import_uuid, t1.export_uuid, t1.role_id, t1.history_name, t1.history_content, t1.identifying_code, t1.status, t1.create_by, t1.create_time
+        FROM act_supplies_historydata t1
+        LEFT JOIN act_supplies_template t2 ON t1.template_id = t2.id
+        LEFT JOIN act_supplies_role t3 ON t1.role_id = t3.id
+        <where>
+            t1.create_by = #{createBy}
+            <if test="templateName != null and templateName != ''"> and t2.template_name like concat('%', #{templateName}, '%')</if>
+            <if test="roleName != null and roleName != ''"> and t3.role_name like concat('%', #{roleName}, '%')</if>
             <if test="historyName != null  and historyName != ''"> and history_name like concat('%', #{historyName}, '%')</if>
             <if test="historyContent != null  and historyContent != ''"> and history_content = #{historyContent}</if>
             <if test="identifyingCode != null "> and identifying_code = #{identifyingCode}</if>
diff --git a/ruoyi-ui/src/api/system/historydata.js b/ruoyi-ui/src/api/system/historydata.js
index 9931cdcd6b8ab7437f802bd2fc1a817621b4bffe..aa3a1147204b88be4b3ceb98e73f1bf384aa86ae 100644
--- a/ruoyi-ui/src/api/system/historydata.js
+++ b/ruoyi-ui/src/api/system/historydata.js
@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import LuckyExcel from "luckyexcel";
 
 // 查询 历史数据列表
 export function listHistorydata(query) {
diff --git a/ruoyi-ui/src/views/system/historydata/index.vue b/ruoyi-ui/src/views/system/historydata/index.vue
index 02df230fb32e0289c929ba38c1c57fe47bcacc29..03ab0729179747d6bf301cdff173f41a00954080 100644
--- a/ruoyi-ui/src/views/system/historydata/index.vue
+++ b/ruoyi-ui/src/views/system/historydata/index.vue
@@ -2,9 +2,9 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
 
-      <el-form-item label="模板" prop="templateId">
+      <el-form-item label="模板" prop="templateName">
         <el-input
-          v-model="queryParams.templateId"
+          v-model="queryParams.templateName"
           placeholder="请输入模板"
           clearable
           size="small"
@@ -12,9 +12,9 @@
         />
       </el-form-item>
 
-      <el-form-item label="规则" prop="roleId">
+      <el-form-item label="规则" prop="roleName">
         <el-input
-          v-model="queryParams.roleId"
+          v-model="queryParams.roleName"
           placeholder="请输入规则"
           clearable
           size="small"
@@ -58,25 +58,28 @@
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
     <el-table v-loading="loading" :data="historydataList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" align="center" prop="id" />
-        <el-table-column label="模板" align="center" prop="templateId" />
-        <el-table-column label="规则" align="center" prop="roleId" />
-      <el-table-column label="标题" align="center" prop="historyName" />
-      <!--<el-table-column label="内容" align="center" prop="historyContent" />-->
-      <el-table-column label="导入导出" align="center" prop="identifyingCode" />
+        <el-table-column label="模板" align="center" prop="templateName" />
+        <el-table-column label="规则" align="center" prop="roleName" />
+        <el-table-column label="标题" align="center" prop="historyName" />
+        <el-table-column label="导入导出" align="center" prop="identifyingCode">
+            <template slot-scope="scope">
+                <span v-if="scope.row.identifyingCode==0">导入</span>
+                <span v-if="scope.row.identifyingCode==1">导出</span>
+            </template>
+        </el-table-column>
         <el-table-column label="操作时间" align="center" prop="createTime" />
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <!--<el-button
+          <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:historydata:edit']"
-          >详情</el-button>-->
+            @click="handleDetails(scope.row)"
+            v-hasPermi="['system:historydata']"
+          >详情</el-button>
           <el-button
             size="mini"
             type="text"
@@ -101,7 +104,10 @@
 <script>
 import { listHistorydata, getHistorydata, delHistorydata, addHistorydata, updateHistorydata, exportHistorydata } from "@/api/system/historydata";
 import Editor from '@/components/Editor';
-
+import $ from 'jquery';
+import XLSX from 'xlsx';
+import LuckyExcel from 'luckyexcel';
+import { Loading } from 'element-ui';
 export default {
   name: "Historydata",
   components: {
@@ -234,6 +240,35 @@ export default {
         }
       });
     },
+    handleDetails(row) {
+        getHistorydata(row.id).then(response => {
+            this.TemplateId = response.rows;
+        this.luckyLook();
+    })
+    },
+      /**展示详情luckysheet */
+      luckyLook() {
+
+          this.positionValue = 'absolute';
+          luckysheet.destroy();
+          luckysheet.create({
+              container: "luckysheet", // Luckysheet 的容器元素 ID
+              title: this.TemplateId[0].historyName, // Excel 文件名
+              data: JSON.parse(this.TemplateId[0].historyContent), // Excel 数据
+              showtoolbar: false, //是否第二列显示工具栏
+              showinfobar: true, //是否显示顶部名称栏
+              showsheetbar: false, //是否显示底部表格名称区域
+              pointEdit: false, //是否是编辑器插入表格模式
+              pointEditUpdate: null, //编辑器表格更新函数
+              allowEdit: false,//作用:是否允许前台编辑
+              functionButton: '<button id="exportButton" class="btn btn-primary" style=" padding:3px 6px; font-size: 16px;width: 100px;height: 27px; margin-right: 85px;" onclick="handleReturnButtonClick()">返回</button>',
+          });
+      },
+      /**详情返回按钮 */
+      handleReturnButtonClick() {
+          this.positionValue = 'static';
+          luckysheet.destroy();
+      },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;