Commit 882f8729 authored by lvzhuangzhuang's avatar lvzhuangzhuang

Merge remote-tracking branch 'origin/master'

parents 67a694db 11cb178e
......@@ -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);
}
}
......@@ -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;
......
......@@ -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);
}
......
......@@ -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"/>
<!--<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>
<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>
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>
......
import request from '@/utils/request'
import LuckyExcel from "luckyexcel";
// 查询 历史数据列表
export function listHistorydata(query) {
......
......@@ -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="templateName" />
<el-table-column label="规则" align="center" prop="roleName" />
<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="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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment