Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-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
赵啸非
enterprise-platform
Commits
7e8a8bf8
Commit
7e8a8bf8
authored
Sep 27, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加首页统计报表
parent
aff16c35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
20 deletions
+132
-20
enterprise-manager-ui/admin/src/views/company/drawershow.vue
enterprise-manager-ui/admin/src/views/company/drawershow.vue
+114
-13
enterprise-manager/src/main/java/com/mortals/xhx/module/company/model/vo/CompanyVo.java
...va/com/mortals/xhx/module/company/model/vo/CompanyVo.java
+1
-1
enterprise-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
...s/xhx/module/company/service/impl/CompanyServiceImpl.java
+17
-6
No files found.
enterprise-manager-ui/admin/src/views/company/drawershow.vue
View file @
7e8a8bf8
...
@@ -52,9 +52,9 @@
...
@@ -52,9 +52,9 @@
<Field
:span=
"24"
label=
"备注"
prop=
"remark"
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
<Field
:span=
"24"
label=
"备注"
prop=
"remark"
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
</el-row>
</el-row>
<el-divider
content-position=
"center"
>
公司标
注
信息
</el-divider>
<el-divider
content-position=
"center"
>
公司标
签
信息
</el-divider>
<br/>
<br/>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
style=
"margin-left:10px"
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAddCompanyLabels"
>
添加
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAddCompanyLabels"
>
添加
</el-button>
</el-col>
</el-col>
...
@@ -66,15 +66,23 @@
...
@@ -66,15 +66,23 @@
<el-table
:data=
"companyLabelsList"
:row-class-name=
"rowCompanyLabelsIndex"
@
selection-change=
"handleCompanyLabelsSelectionChange"
ref=
"companyLabels"
>
<el-table
:data=
"companyLabelsList"
:row-class-name=
"rowCompanyLabelsIndex"
@
selection-change=
"handleCompanyLabelsSelectionChange"
ref=
"companyLabels"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"index"
width=
"50"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"index"
width=
"50"
/>
<el-table-column
label=
"标签名称"
prop=
"labelName"
>
<!--
<el-table-column
label=
"标签名称"
prop=
"labelName"
>
--
>
<template
slot-scope=
"scope"
>
<!--
<template
slot-scope=
"scope"
>
--
>
<el-input
v-model=
"scope.row.labelName"
placeholder=
"请选择标签名称"
/
>
<!--
<el-input
v-model=
"scope.row.labelName"
placeholder=
"请选择标签名称"
/>
--
>
</
template
>
<!--
</
template
>
--
>
</el-table-column
>
<!-- </el-table-column>--
>
<el-table-column
label=
"标签名称"
prop=
"labelId"
>
<el-table-column
label=
"标签名称"
prop=
"labelId"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<Field
label=
"请选择标签名称"
prop=
"labelId"
v-model=
"scope.row.labelId"
type=
"select"
:enumData=
"dict.labels"
placeholder=
"请选择"
/>
<el-select
v-model=
"scope.row.labelId"
placeholder=
"请选择标签名称"
>
<el-option
v-for=
"($label, $value) in dict.labels"
:key=
"$value"
:label=
"$label"
:value=
"$value"
></el-option>
</el-select>
<!--
<el-input
v-model=
"scope.row.labelName"
placeholder=
"请选择标签名称"
/>
-->
<!--
<el-input
v-model=
"scope.row.labelName"
placeholder=
"请选择标签名称"
/>
-->
</
template
>
</
template
>
...
@@ -94,6 +102,58 @@
...
@@ -94,6 +102,58 @@
</el-table>
</el-table>
<el-divider
content-position=
"center"
>
公司专利信息
</el-divider>
<br/>
<el-row
style=
"margin-left:10px"
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAddCompanyPatents"
>
添加
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"handleDeleteCompanyPatents"
>
删除
</el-button>
</el-col>
</el-row>
<el-table
:data=
"companyPatentsList"
:row-class-name=
"rowCompanyPatentsIndex"
@
selection-change=
"handleCompanyPatentsSelectionChange"
ref=
"companyPatents"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"index"
width=
"50"
/>
<!-- <el-table-column label="标签名称" prop="labelName">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.labelName" placeholder="请选择标签名称" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label=
"标签名称"
prop=
"labelId"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.labelId"
placeholder=
"请选择标签名称"
>
<el-option
v-for=
"($label, $value) in dict.labels"
:key=
"$value"
:label=
"$label"
:value=
"$value"
></el-option>
</el-select>
<!--
<el-input
v-model=
"scope.row.labelName"
placeholder=
"请选择标签名称"
/>
-->
</
template
>
</el-table-column>
<!-- <el-table-column label="公司名称" prop="companyName">
<template slot-scope="scope">
<el-input v-model="scope.row.companyName" placeholder="请输入公司名称" />
</template>
</el-table-column>-->
<el-table-column
label=
"备注"
prop=
"remark"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remark"
placeholder=
"请输入备注"
/>
</
template
>
</el-table-column>
</el-table>
<form-buttons
@
submit=
'submitForm'
v-if=
"pageInfo.type!='view'"
noCancelBtn
/>
<form-buttons
@
submit=
'submitForm'
v-if=
"pageInfo.type!='view'"
noCancelBtn
/>
</el-form>
</el-form>
...
@@ -146,6 +206,10 @@
...
@@ -146,6 +206,10 @@
checkedCompanyLabels
:
[],
checkedCompanyLabels
:
[],
// 公司标注表格数据
// 公司标注表格数据
companyLabelsList
:
[],
companyLabelsList
:
[],
// 子表选中数据
checkedCompanyPatents
:
[],
// 公司专利表格数据
companyPatentsList
:
[],
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 弹出层标题
// 弹出层标题
...
@@ -154,9 +218,6 @@
...
@@ -154,9 +218,6 @@
open
:
false
,
open
:
false
,
direction
:
"
rtl
"
,
direction
:
"
rtl
"
,
toString
:[
toString
:[
"
totalEmployees
"
,
"
softNum
"
,
"
patentNum
"
,
],
],
toDate
:[
toDate
:[
"
establishDate
"
,
"
establishDate
"
,
...
@@ -204,9 +265,7 @@
...
@@ -204,9 +265,7 @@
methods
:
{
methods
:
{
addressSelect
(
val
){
addressSelect
(
val
){
console
.
log
(
"
addressSelect
"
,
val
)
console
.
log
(
"
addressSelect
"
,
val
)
},
},
/** 公司标注序号 */
/** 公司标注序号 */
...
@@ -243,11 +302,51 @@
...
@@ -243,11 +302,51 @@
this
.
checkedCompanyLabels
=
selection
;
this
.
checkedCompanyLabels
=
selection
;
}
}
},
},
/** 公司专利序号 */
rowCompanyPatentsIndex
({
row
,
rowIndex
})
{
row
.
index
=
rowIndex
+
1
;
},
/** 公司专利添加按钮操作 */
handleAddCompanyPatents
()
{
let
obj
=
{};
obj
.
labelId
=
""
;
obj
.
labelName
=
""
;
obj
.
companyName
=
""
;
obj
.
remark
=
""
;
obj
.
createUserId
=
""
;
obj
.
createTime
=
""
;
obj
.
updateUserId
=
""
;
obj
.
updateTime
=
""
;
this
.
companyPatentsList
.
push
(
obj
);
},
/** 公司专利删除按钮操作 */
handleDeleteCompanyPatents
()
{
if
(
this
.
checkedCompanyPatentss
.
length
==
0
)
{
this
.
$alert
(
"
请先选择要删除的公司专利数据
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
});
}
else
{
this
.
companyPatentsList
.
splice
(
this
.
checkedCompanyPatents
[
0
].
index
-
1
,
1
);
}
},
/** 单选框选中数据 */
handleCompanyPatentsSelectionChange
(
selection
)
{
if
(
selection
.
length
>
1
)
{
this
.
$refs
.
companyPatents
.
clearSelection
();
this
.
$refs
.
companyPatents
.
toggleRowSelection
(
selection
.
pop
());
}
else
{
this
.
checkedCompanyPatents
=
selection
;
}
},
// 渲染前置处理
// 渲染前置处理
beforeRender
(
data
)
{
beforeRender
(
data
)
{
if
(
data
.
entity
.
companyLabelsList
)
{
if
(
data
.
entity
.
companyLabelsList
)
{
this
.
companyLabelsList
=
data
.
entity
.
companyLabelsList
;
this
.
companyLabelsList
=
data
.
entity
.
companyLabelsList
;
}
}
if
(
data
.
entity
.
companyPatentsList
)
{
this
.
companyPatentsList
=
data
.
entity
.
companyPatentsList
;
}
return
data
return
data
},
},
/** 编辑 */
/** 编辑 */
...
@@ -325,6 +424,8 @@
...
@@ -325,6 +424,8 @@
sort
:
0
,
sort
:
0
,
establishDate
:
null
,
establishDate
:
null
,
remark
:
""
,
remark
:
""
,
companyLabelsList
:[],
companyPatentsList
:[]
};
};
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
...
...
enterprise-manager/src/main/java/com/mortals/xhx/module/company/model/vo/CompanyVo.java
View file @
7e8a8bf8
...
@@ -29,7 +29,7 @@ public class CompanyVo extends BaseEntityLong {
...
@@ -29,7 +29,7 @@ public class CompanyVo extends BaseEntityLong {
private
List
<
Long
>
idList
;
private
List
<
Long
>
idList
;
//公司专利
//公司专利
private
List
<
CompanyPatentEntity
>
companyPatentList
=
new
ArrayList
<>();
private
List
<
CompanyPatentEntity
>
companyPatent
s
List
=
new
ArrayList
<>();
//产品数量
//产品数量
private
Integer
productNums
=
0
;
private
Integer
productNums
=
0
;
...
...
enterprise-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
View file @
7e8a8bf8
...
@@ -14,6 +14,8 @@ import com.mortals.xhx.module.company.service.CompanyPatentService;
...
@@ -14,6 +14,8 @@ import com.mortals.xhx.module.company.service.CompanyPatentService;
import
com.mortals.xhx.module.company.service.CompanyProductService
;
import
com.mortals.xhx.module.company.service.CompanyProductService
;
import
com.mortals.xhx.module.feedback.model.FeedbackQuery
;
import
com.mortals.xhx.module.feedback.model.FeedbackQuery
;
import
com.mortals.xhx.module.feedback.service.FeedbackService
;
import
com.mortals.xhx.module.feedback.service.FeedbackService
;
import
com.mortals.xhx.module.labels.model.LabelsEntity
;
import
com.mortals.xhx.module.labels.service.LabelsService
;
import
com.mortals.xhx.module.news.model.NewsCategoryEntity
;
import
com.mortals.xhx.module.news.model.NewsCategoryEntity
;
import
com.mortals.xhx.module.news.model.NewsCategoryQuery
;
import
com.mortals.xhx.module.news.model.NewsCategoryQuery
;
import
com.mortals.xhx.module.news.model.NewsQuery
;
import
com.mortals.xhx.module.news.model.NewsQuery
;
...
@@ -57,6 +59,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -57,6 +59,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
private
CompanyLabelsService
companyLabelsService
;
private
CompanyLabelsService
companyLabelsService
;
@Autowired
@Autowired
private
CompanyPatentService
companyPatentService
;
private
CompanyPatentService
companyPatentService
;
@Autowired
@Autowired
private
CompanyService
companyService
;
private
CompanyService
companyService
;
@Autowired
@Autowired
...
@@ -75,6 +78,8 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -75,6 +78,8 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
private
NewsCategoryService
newsCategoryService
;
private
NewsCategoryService
newsCategoryService
;
@Autowired
@Autowired
private
StaffRecordService
staffRecordService
;
private
StaffRecordService
staffRecordService
;
@Autowired
private
LabelsService
labelsService
;
@Override
@Override
...
@@ -82,7 +87,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -82,7 +87,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
list
.
stream
().
peek
(
item
->
{
list
.
stream
().
peek
(
item
->
{
List
<
CompanyPatentEntity
>
companyPatentEntities
=
companyPatentService
.
find
(
new
CompanyPatentQuery
().
companyId
(
item
.
getId
()));
List
<
CompanyPatentEntity
>
companyPatentEntities
=
companyPatentService
.
find
(
new
CompanyPatentQuery
().
companyId
(
item
.
getId
()));
item
.
setCompanyPatentList
(
companyPatentEntities
);
item
.
setCompanyPatent
s
List
(
companyPatentEntities
);
}).
count
();
}).
count
();
}
}
...
@@ -90,20 +95,26 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -90,20 +95,26 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
protected
void
saveAfter
(
CompanyEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CompanyEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyLabelsList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyLabelsList
()))
{
entity
.
getCompanyLabelsList
().
stream
().
peek
(
item
->
{
entity
.
getCompanyLabelsList
().
stream
().
peek
(
item
->
{
LabelsEntity
labelsEntity
=
labelsService
.
get
(
item
.
getLabelId
(),
context
);
item
.
setLabelName
(
labelsEntity
.
getLabelName
());
item
.
setCompanyId
(
entity
.
getId
());
item
.
setCompanyId
(
entity
.
getId
());
item
.
setCompanyName
(
entity
.
getCompanyName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
companyLabelsService
.
save
(
entity
.
getCompanyLabelsList
());
companyLabelsService
.
save
(
entity
.
getCompanyLabelsList
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyPatentList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyPatentsList
()))
{
entity
.
getCompanyPatentList
().
stream
().
peek
(
item
->
{
entity
.
getCompanyPatentsList
().
stream
().
peek
(
item
->
{
item
.
setCompanyId
(
entity
.
getId
());
item
.
setCompanyId
(
entity
.
getId
());
item
.
setCompanyName
(
entity
.
getCompanyName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
companyPatentService
.
save
(
entity
.
getCompanyPatentList
());
companyPatentService
.
save
(
entity
.
getCompanyPatent
s
List
());
}
}
super
.
saveAfter
(
entity
,
context
);
super
.
saveAfter
(
entity
,
context
);
}
}
...
@@ -123,7 +134,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -123,7 +134,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
companyLabelsService
.
save
(
entity
.
getCompanyLabelsList
());
companyLabelsService
.
save
(
entity
.
getCompanyLabelsList
());
}
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyPatentList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyPatent
s
List
()))
{
Long
[]
companyPantentIds
=
companyPatentService
.
find
(
new
CompanyPatentQuery
().
companyId
(
entity
.
getId
())).
stream
().
map
(
CompanyPatentEntity:
:
getId
).
toArray
(
Long
[]::
new
);
Long
[]
companyPantentIds
=
companyPatentService
.
find
(
new
CompanyPatentQuery
().
companyId
(
entity
.
getId
())).
stream
().
map
(
CompanyPatentEntity:
:
getId
).
toArray
(
Long
[]::
new
);
companyPatentService
.
remove
(
companyPantentIds
,
context
);
companyPatentService
.
remove
(
companyPantentIds
,
context
);
entity
.
getCompanyLabelsList
().
stream
().
peek
(
item
->
{
entity
.
getCompanyLabelsList
().
stream
().
peek
(
item
->
{
...
@@ -133,7 +144,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -133,7 +144,7 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
}).
count
();
}).
count
();
companyPatentService
.
save
(
entity
.
getCompanyPatentList
());
companyPatentService
.
save
(
entity
.
getCompanyPatent
s
List
());
}
}
super
.
updateAfter
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
...
...
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