Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
882f8729
Commit
882f8729
authored
Aug 25, 2023
by
lvzhuangzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
67a694db
11cb178e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
27 deletions
+93
-27
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
...i/system/controller/ActSuppliesHistorydataController.java
+2
-6
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
.../java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
+27
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+2
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
.../resources/mapper/system/ActSuppliesHistorydataMapper.xml
+11
-6
ruoyi-ui/src/api/system/historydata.js
ruoyi-ui/src/api/system/historydata.js
+1
-0
ruoyi-ui/src/views/system/historydata/index.vue
ruoyi-ui/src/views/system/historydata/index.vue
+50
-15
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
View file @
882f8729
...
...
@@ -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
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHistorydata.java
View file @
882f8729
...
...
@@ -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
;
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
882f8729
...
...
@@ -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
);
}
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
View file @
882f8729
...
...
@@ -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>
...
...
ruoyi-ui/src/api/system/historydata.js
View file @
882f8729
import
request
from
'
@/utils/request
'
import
LuckyExcel
from
"
luckyexcel
"
;
// 查询 历史数据列表
export
function
listHistorydata
(
query
)
{
...
...
ruoyi-ui/src/views/system/historydata/index.vue
View file @
882f8729
...
...
@@ -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=
"template
Id
"
>
<el-form-item
label=
"模板"
prop=
"template
Name
"
>
<el-input
v-model=
"queryParams.template
Id
"
v-model=
"queryParams.template
Name
"
placeholder=
"请输入模板"
clearable
size=
"small"
...
...
@@ -12,9 +12,9 @@
/>
</el-form-item>
<el-form-item
label=
"规则"
prop=
"role
Id
"
>
<el-form-item
label=
"规则"
prop=
"role
Name
"
>
<el-input
v-model=
"queryParams.role
Id
"
v-model=
"queryParams.role
Name
"
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=
"handle
Update
(scope.row)"
v-hasPermi=
"['system:historydata
:edit
']"
>
详情
</el-button>
-->
@
click=
"handle
Details
(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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment