Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
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
赵啸非
sample-form-platform
Commits
51587a86
Commit
51587a86
authored
Nov 11, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加公共庫
parent
7d64babb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
18 deletions
+122
-18
sample-form-manager-ui/admin/src/api/libray.js
sample-form-manager-ui/admin/src/api/libray.js
+62
-0
sample-form-manager-ui/admin/src/pages/software/librarymanage/LibraryManage.vue
.../admin/src/pages/software/librarymanage/LibraryManage.vue
+46
-14
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
...hx/module/matter/service/impl/MatterDatumServiceImpl.java
+14
-4
No files found.
sample-form-manager-ui/admin/src/api/libray.js
0 → 100644
View file @
51587a86
import
request
from
'
@/utils/request
'
/**
* 材料公共库
*/
// 获取公共库列表
export
const
getPubdatumList
=
(
data
)
=>
{
return
request
({
url
:
`/sampleform/pubdatum/list`
,
method
:
"
post
"
,
data
,
});
};
// 删除公共库材料
export
const
delPubdatum
=
(
params
)
=>
{
return
request
({
url
:
`/sampleform/pubdatum/delete`
,
method
:
"
get
"
,
params
,
});
};
// 加入样表事项
export
const
createMatter
=
(
params
)
=>
{
return
request
({
url
:
`/sampleform/matter/createMatter`
,
method
:
"
get
"
,
params
,
});
};
// 查询样表系统事项列表
export
const
getWriteMatterList
=
(
data
)
=>
{
return
request
({
url
:
`/sampleform/pubdatum/list`
,
method
:
"
post
"
,
data
,
});
};
// 保存新增样表事项
export
const
addMatter
=
(
data
)
=>
{
return
request
({
url
:
`/sampleform/matter/save`
,
method
:
"
post
"
,
data
,
});
};
// 推荐事项
export
const
recommendMatter
=
(
params
)
=>
{
return
request
({
url
:
`/sampleform/matter/recommend`
,
method
:
"
get
"
,
params
,
});
};
\ No newline at end of file
sample-form-manager-ui/admin/src/pages/software/librarymanage/LibraryManage.vue
View file @
51587a86
...
...
@@ -6,15 +6,15 @@
</div>
<TableHeader>
<div
slot=
"left"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleAddMaterials"
<!--
<el-button
size=
"small"
type=
"primary"
@
click=
"handleAddMaterials"
>
加入材料
</el-button
>
>
-->
<el-button
size=
"small"
type=
"danger"
@
click=
"handleDelAll"
>
批量移除
</el-button
>
</div>
<div
slot=
"right"
class=
"flex"
>
<el-select
<!--
<el-select
v-model=
"department"
size=
"small"
class=
"autoWidth"
...
...
@@ -30,7 +30,7 @@
:
value
=
"
item.id
"
>
<
/el-option
>
<
/el-select
>
<
/el-select>
--
>
<
el
-
input
size
=
"
small
"
v
-
model
=
"
searchVal
"
...
...
@@ -49,6 +49,7 @@
<
el
-
table
ref
=
"
multipleTable
"
size
=
"
small
"
v
-
loading
=
"
loading
"
:
data
=
"
tableData
"
border
tooltip
-
effect
=
"
dark
"
...
...
@@ -69,20 +70,20 @@
<
/el-table-column
>
<
el
-
table
-
column
show
-
overflow
-
tooltip
label
=
"
部门
"
label
=
"
部门
编号
"
align
=
"
center
"
prop
=
"
dep
artment
"
width
=
"
8
0
"
prop
=
"
dep
tCode
"
width
=
"
16
0
"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
name
"
show
-
overflow
-
tooltip
label
=
"
材料名称
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
p
class
=
"
short
"
>
{{
scope
.
row
.
n
ame
}}
<
/p
>
<
p
class
=
"
full-name
"
>
材料全称:
{{
scope
.
row
.
name2
}}
<
/p
>
<
p
class
=
"
short
"
>
{{
scope
.
row
.
materialN
ame
}}
<
/p
>
<
p
class
=
"
full-name
"
>
材料全称:
{{
scope
.
row
.
materiaFullName
}}
<
/p
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
t
ime
"
prop
=
"
createT
ime
"
label
=
"
添加时间
"
align
=
"
center
"
width
=
"
150
"
...
...
@@ -135,12 +136,12 @@
import
TableHeader
from
"
@/components/TableHeader.vue
"
;
import
AddMaterals
from
"
./modal/AddMaterals.vue
"
;
import
PreviewMaterals
from
"
./modal/PreviewMaterals.vue
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
{
getPubdatumList
,
delPubdatum
}
from
"
@/api/libray
"
;
export
default
{
components
:
{
TableHeader
,
AddMaterals
,
PreviewMaterals
,
PreviewMaterals
}
,
data
()
{
return
{
...
...
@@ -170,6 +171,7 @@ export default {
size
:
10
,
total
:
10
,
pageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
,
200
],
loading
:
false
,
selectKeys
:
[],
depList
:
[],
libVisible
:
false
,
...
...
@@ -177,10 +179,30 @@ export default {
previewVisible
:
false
,
}
;
}
,
c
omputed
:
{
...
mapGetters
([
"
deptList
"
]),
c
reated
()
{
this
.
getPbuList
();
}
,
// computed:
{
// ...mapGetters(["deptList"]),
//
}
,
methods
:
{
// 系统事项列表
async
getPbuList
()
{
this
.
loading
=
true
;
let
res
=
await
getPubdatumList
({
page
:
this
.
current
,
size
:
this
.
size
,
}
);
this
.
loading
=
false
;
console
.
log
(
"
res
"
,
res
)
if
(
res
.
data
.
code
===
1
)
{
let
{
data
,
total
}
=
res
.
data
.
data
;
this
.
tableData
=
data
;
this
.
total
=
total
;
}
}
,
// 加入材料
handleAddMaterials
()
{
this
.
libVisible
=
true
;
...
...
@@ -191,6 +213,9 @@ export default {
this
.
$message
.
warning
(
"
请先勾选数据
"
);
return
;
}
let
ids
=
this
.
selectKeys
.
map
((
v
)
=>
v
.
id
).
join
(
"
,
"
);
this
.
handleDel
(
ids
);
}
,
// 搜索
handleSearch
()
{
...
...
@@ -232,6 +257,13 @@ export default {
)
.
then
(
async
()
=>
{
console
.
log
(
id
);
let
res
=
await
delPubdatum
({
id
}
);
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
getPbuList
();
this
.
selectKeys
=
[];
}
}
)
.
catch
(()
=>
{
console
.
log
(
"
取消成功!
"
);
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
View file @
51587a86
...
...
@@ -94,17 +94,27 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
matterEntity
.
setDatumCount
(
count
);
matterService
.
update
(
matterEntity
,
context
);
}
addPubdatum
(
entity
,
context
);
super
.
saveAfter
(
entity
,
context
);
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getPub
())&&
entity
.
getPub
()==
YesNoEnum
.
YES
.
getValue
()){
private
void
addPubdatum
(
MatterDatumEntity
entity
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getPub
())
&&
entity
.
getPub
()
==
YesNoEnum
.
YES
.
getValue
())
{
//添加到公共库
PubdatumEntity
pubdatumEntity
=
new
PubdatumEntity
();
pubdatumEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
pubdatumEntity
,
new
String
[]{
"id"
});
BeanUtils
.
copyProperties
(
entity
,
pubdatumEntity
,
new
String
[]{
"id"
});
pubdatumEntity
.
setCreateTime
(
new
Date
());
pubdatumEntity
.
setCreateUserId
(
getContextUserId
(
context
));
pubdatumService
.
save
(
pubdatumEntity
,
context
);
pubdatumService
.
save
(
pubdatumEntity
,
context
);
}
super
.
saveAfter
(
entity
,
context
);
}
@Override
protected
void
updateAfter
(
MatterDatumEntity
entity
,
Context
context
)
throws
AppException
{
addPubdatum
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
@Override
...
...
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