Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
b0347b04
Commit
b0347b04
authored
Jun 03, 2024
by
军师中郎将
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 从业人员 - 导入后-有错误数据时界面有提示按钮,点击 提示按钮 弹出 可以下载 或 清除错误数据。下载错误数据,按照错误信息 修改后,能再次导入 - 此功能完成
2 从业人员 - 任职岗位 - 由原来的字典配置 调整成 可手动输入形式
parent
82692786
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
175 additions
and
29 deletions
+175
-29
TEmployedPeopleInfoController.java
...b/controller/supervise/TEmployedPeopleInfoController.java
+15
-3
TEmployedPeopleInfoErrorController.java
...troller/supervise/TEmployedPeopleInfoErrorController.java
+10
-0
TEmployedPeopleInfo.java
...in/java/com/zehong/system/domain/TEmployedPeopleInfo.java
+1
-6
TEmployedPeopleInfoError.java
...va/com/zehong/system/domain/TEmployedPeopleInfoError.java
+1
-1
TEmployedPeopleInfoErrorMapper.java
.../zehong/system/mapper/TEmployedPeopleInfoErrorMapper.java
+2
-0
TEmployedPeopleInfoMapper.java
...a/com/zehong/system/mapper/TEmployedPeopleInfoMapper.java
+3
-0
ITEmployedPeopleInfoErrorService.java
...hong/system/service/ITEmployedPeopleInfoErrorService.java
+6
-0
ITEmployedPeopleInfoService.java
...om/zehong/system/service/ITEmployedPeopleInfoService.java
+9
-1
TEmployedPeopleInfoErrorServiceImpl.java
...tem/service/impl/TEmployedPeopleInfoErrorServiceImpl.java
+8
-0
TEmployedPeopleInfoServiceImpl.java
...g/system/service/impl/TEmployedPeopleInfoServiceImpl.java
+27
-9
TEmployedPeopleInfoErrorMapper.xml
...esources/mapper/system/TEmployedPeopleInfoErrorMapper.xml
+3
-0
TEmployedPeopleInfoMapper.xml
...ain/resources/mapper/system/TEmployedPeopleInfoMapper.xml
+11
-0
supervise.js
zh-baseversion-web/src/api/regulation/supervise.js
+18
-0
index.vue
zh-baseversion-web/src/views/regulation/supervise/index.vue
+61
-9
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TEmployedPeopleInfoController.java
View file @
b0347b04
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.system.domain.TEmployedPeopleInfoError
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.annotation.Log
;
...
@@ -148,15 +149,14 @@ public class TEmployedPeopleInfoController extends BaseController
...
@@ -148,15 +149,14 @@ public class TEmployedPeopleInfoController extends BaseController
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
,
HttpServletResponse
response
)
throws
Exception
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
,
HttpServletResponse
response
)
throws
Exception
{
{
ExcelUtil
<
TEmployedPeopleInfo
>
util
=
new
ExcelUtil
<>(
TEmployedPeopleInfo
.
class
);
ExcelUtil
<
TEmployedPeopleInfo
Error
>
util
=
new
ExcelUtil
<>(
TEmployedPeopleInfoError
.
class
);
List
<
TEmployedPeopleInfo
>
XmbhList
=
util
.
importExcel
(
file
.
getInputStream
());
List
<
TEmployedPeopleInfo
Error
>
XmbhList
=
util
.
importExcel
(
file
.
getInputStream
());
String
operName
=
SecurityUtils
.
getLoginUser
().
getUsername
();
String
operName
=
SecurityUtils
.
getLoginUser
().
getUsername
();
String
message
=
tEmployedPeopleInfoService
.
importEmployedPeopleInfo
(
XmbhList
,
updateSupport
,
operName
,
response
);
String
message
=
tEmployedPeopleInfoService
.
importEmployedPeopleInfo
(
XmbhList
,
updateSupport
,
operName
,
response
);
return
AjaxResult
.
success
(
message
);
return
AjaxResult
.
success
(
message
);
}
}
/**
/**
* 模版下载
* 模版下载
* @return
* @return
...
@@ -179,4 +179,16 @@ public class TEmployedPeopleInfoController extends BaseController
...
@@ -179,4 +179,16 @@ public class TEmployedPeopleInfoController extends BaseController
int
i
=
tEmployedPeopleInfoService
.
countImportError
();
int
i
=
tEmployedPeopleInfoService
.
countImportError
();
return
AjaxResult
.
success
(
i
);
return
AjaxResult
.
success
(
i
);
}
}
/**
* 查询当前用户导入 从业人员的错误数据总数
* @return
*/
@GetMapping
(
"/queryPeopleOccupationByGroupBy"
)
public
AjaxResult
queryPeopleOccupationByGroupBy
()
{
List
<
String
>
strings
=
tEmployedPeopleInfoService
.
queryPeopleOccupationByGroupBy
();
return
AjaxResult
.
success
(
strings
);
}
}
}
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TEmployedPeopleInfoErrorController.java
View file @
b0347b04
...
@@ -59,6 +59,16 @@ public class TEmployedPeopleInfoErrorController extends BaseController
...
@@ -59,6 +59,16 @@ public class TEmployedPeopleInfoErrorController extends BaseController
return
util
.
exportExcel
(
list
,
"从业人员错误导入记录数据"
);
return
util
.
exportExcel
(
list
,
"从业人员错误导入记录数据"
);
}
}
/**
* 导出从业人员错误导入记录列表
*/
@Log
(
title
=
"从业人员错误导入记录"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/clearImportError"
)
public
AjaxResult
clearImportError
()
{
return
AjaxResult
.
success
(
tEmployedPeopleInfoErrorService
.
clearImportError
());
}
/**
/**
* 获取从业人员错误导入记录详细信息
* 获取从业人员错误导入记录详细信息
*/
*/
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TEmployedPeopleInfo.java
View file @
b0347b04
package
com
.
zehong
.
system
.
domain
;
package
com
.
zehong
.
system
.
domain
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
/**
* 从业人员信息对象 t_employed_people_info
* 从业人员信息对象 t_employed_people_info
...
@@ -46,7 +41,7 @@ public class TEmployedPeopleInfo extends BaseEntity
...
@@ -46,7 +41,7 @@ public class TEmployedPeopleInfo extends BaseEntity
private
String
registerExaminationType
;
private
String
registerExaminationType
;
/** 任职岗位:1.主要负责人 2.安全管理人员3.运行维护和抢修人员 */
/** 任职岗位:1.主要负责人 2.安全管理人员3.运行维护和抢修人员 */
@Excel
(
name
=
"任职岗位"
,
dictType
=
"enterprise_type"
)
@Excel
(
name
=
"任职岗位"
)
private
String
peopleOccupation
;
private
String
peopleOccupation
;
/** 发证日期 */
/** 发证日期 */
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TEmployedPeopleInfoError.java
View file @
b0347b04
...
@@ -40,7 +40,7 @@ public class TEmployedPeopleInfoError extends BaseEntity
...
@@ -40,7 +40,7 @@ public class TEmployedPeopleInfoError extends BaseEntity
private
String
registerExaminationType
;
private
String
registerExaminationType
;
/** 人员类型:1.主要负责人 2.安全管理人员3.运行维护和抢修人员 */
/** 人员类型:1.主要负责人 2.安全管理人员3.运行维护和抢修人员 */
@Excel
(
name
=
"人员类型
:1.主要负责人 2.安全管理人员3.运行维护和抢修人员
"
)
@Excel
(
name
=
"人员类型"
)
private
String
peopleOccupation
;
private
String
peopleOccupation
;
/** 发证日期 */
/** 发证日期 */
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TEmployedPeopleInfoErrorMapper.java
View file @
b0347b04
...
@@ -69,4 +69,6 @@ public interface TEmployedPeopleInfoErrorMapper
...
@@ -69,4 +69,6 @@ public interface TEmployedPeopleInfoErrorMapper
public
int
deleteTEmployedPeopleInfoErrorByIds
(
Long
[]
employedPeopleErrorIds
);
public
int
deleteTEmployedPeopleInfoErrorByIds
(
Long
[]
employedPeopleErrorIds
);
public
int
countByCreateByInt
(
String
createBy
);
public
int
countByCreateByInt
(
String
createBy
);
public
int
clearImportError
(
String
createBy
);
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TEmployedPeopleInfoMapper.java
View file @
b0347b04
...
@@ -72,4 +72,7 @@ public interface TEmployedPeopleInfoMapper
...
@@ -72,4 +72,7 @@ public interface TEmployedPeopleInfoMapper
* @return
* @return
*/
*/
String
selectEnterpriseName
(
String
bId
);
String
selectEnterpriseName
(
String
bId
);
public
List
<
String
>
queryPeopleOccupationByGroupBy
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITEmployedPeopleInfoErrorService.java
View file @
b0347b04
...
@@ -65,4 +65,10 @@ public interface ITEmployedPeopleInfoErrorService
...
@@ -65,4 +65,10 @@ public interface ITEmployedPeopleInfoErrorService
* @return 结果
* @return 结果
*/
*/
public
int
deleteTEmployedPeopleInfoErrorById
(
Long
employedPeopleErrorId
);
public
int
deleteTEmployedPeopleInfoErrorById
(
Long
employedPeopleErrorId
);
/**
* 清除从业人员错误数据
* @return r
*/
public
int
clearImportError
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITEmployedPeopleInfoService.java
View file @
b0347b04
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TEmployedPeopleInfo
;
import
com.zehong.system.domain.TEmployedPeopleInfo
;
import
com.zehong.system.domain.TEmployedPeopleInfoError
;
import
com.zehong.system.domain.TEnterpriseInfo
;
import
com.zehong.system.domain.TEnterpriseInfo
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -82,11 +83,18 @@ public interface ITEmployedPeopleInfoService
...
@@ -82,11 +83,18 @@ public interface ITEmployedPeopleInfoService
* @param operName 操作用户
* @param operName 操作用户
* @return 结果
* @return 结果
*/
*/
public
String
importEmployedPeopleInfo
(
List
<
TEmployedPeopleInfo
>
XmbhList
,
Boolean
isUpdateSupport
,
String
operName
,
HttpServletResponse
response
);
public
String
importEmployedPeopleInfo
(
List
<
TEmployedPeopleInfo
Error
>
XmbhList
,
Boolean
isUpdateSupport
,
String
operName
,
HttpServletResponse
response
);
/**
/**
* 查询当前用户导入 从业人员的错误数据总数
* 查询当前用户导入 从业人员的错误数据总数
* @return
* @return
*/
*/
public
int
countImportError
();
public
int
countImportError
();
/**
* 查询 人员类型 分组
* @return r
*/
public
List
<
String
>
queryPeopleOccupationByGroupBy
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TEmployedPeopleInfoErrorServiceImpl.java
View file @
b0347b04
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TEmployedPeopleInfoErrorMapper
;
import
com.zehong.system.mapper.TEmployedPeopleInfoErrorMapper
;
...
@@ -104,4 +106,10 @@ public class TEmployedPeopleInfoErrorServiceImpl implements ITEmployedPeopleInfo
...
@@ -104,4 +106,10 @@ public class TEmployedPeopleInfoErrorServiceImpl implements ITEmployedPeopleInfo
{
{
return
tEmployedPeopleInfoErrorMapper
.
deleteTEmployedPeopleInfoErrorById
(
employedPeopleErrorId
);
return
tEmployedPeopleInfoErrorMapper
.
deleteTEmployedPeopleInfoErrorById
(
employedPeopleErrorId
);
}
}
@Override
public
int
clearImportError
()
{
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
();
return
tEmployedPeopleInfoErrorMapper
.
countByCreateByInt
(
userId
+
""
);
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TEmployedPeopleInfoServiceImpl.java
View file @
b0347b04
...
@@ -132,15 +132,16 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
...
@@ -132,15 +132,16 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
}
}
@Override
@Override
public
String
importEmployedPeopleInfo
(
List
<
TEmployedPeopleInfo
>
employedPeopleInfos
,
Boolean
isUpdateSupport
,
String
operName
,
HttpServletResponse
response
)
{
public
String
importEmployedPeopleInfo
(
List
<
TEmployedPeopleInfo
Error
>
employedPeopleInfos
,
Boolean
isUpdateSupport
,
String
operName
,
HttpServletResponse
response
)
{
if
(
CollectionUtils
.
isEmpty
(
employedPeopleInfos
))
{
if
(
CollectionUtils
.
isEmpty
(
employedPeopleInfos
))
{
throw
new
BaseException
(
"导入数据不能为空! "
);
throw
new
BaseException
(
"导入数据不能为空! "
);
}
}
List
<
TEmployedPeopleInfoError
>
failList
=
new
ArrayList
<>();
List
<
TEmployedPeopleInfoError
>
failList
=
new
ArrayList
<>();
TEmployedPeopleInfoError
employedPeopleInfoError
;
TEmployedPeopleInfoError
employedPeopleInfoError
;
TEmployedPeopleInfo
tEmployedPeopleInfoForInsert
;
StringBuilder
stringBuilder
;
StringBuilder
stringBuilder
;
for
(
TEmployedPeopleInfo
tEmployedPeopleInfo
:
employedPeopleInfos
){
for
(
TEmployedPeopleInfo
Error
tEmployedPeopleInfo
:
employedPeopleInfos
){
stringBuilder
=
new
StringBuilder
();
stringBuilder
=
new
StringBuilder
();
try
{
try
{
...
@@ -158,9 +159,13 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
...
@@ -158,9 +159,13 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
TEnterpriseInfo
enterpriseInfo
=
enterpriseInfoMapper
.
selectTEnterpriseInfoByName
(
tEmployedPeopleInfo
.
getBeyondEnterpriseName
());
TEnterpriseInfo
enterpriseInfo
=
enterpriseInfoMapper
.
selectTEnterpriseInfoByName
(
tEmployedPeopleInfo
.
getBeyondEnterpriseName
());
if
(
enterpriseInfo
==
null
)
{
if
(
enterpriseInfo
==
null
)
{
stringBuilder
.
append
(
"关联企业信息
为空
|"
);
stringBuilder
.
append
(
"关联企业信息
不存在
|"
);
}
}
// 如果没有错误信息,则判断是否是之前错误的数据,如果是的话,则把之前错误的数据删除
if
(
tEmployedPeopleInfo
.
getEmployedPeopleErrorId
()
!=
null
)
{
employedPeopleInfoErrorMapper
.
deleteTEmployedPeopleInfoErrorById
(
tEmployedPeopleInfo
.
getEmployedPeopleErrorId
());
}
if
(!
""
.
equals
(
stringBuilder
.
toString
()))
{
if
(!
""
.
equals
(
stringBuilder
.
toString
()))
{
employedPeopleInfoError
=
new
TEmployedPeopleInfoError
();
employedPeopleInfoError
=
new
TEmployedPeopleInfoError
();
BeanUtils
.
copyProperties
(
tEmployedPeopleInfo
,
employedPeopleInfoError
);
BeanUtils
.
copyProperties
(
tEmployedPeopleInfo
,
employedPeopleInfoError
);
...
@@ -170,12 +175,15 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
...
@@ -170,12 +175,15 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
continue
;
continue
;
}
}
tEmployedPeopleInfoForInsert
=
new
TEmployedPeopleInfo
();
BeanUtils
.
copyProperties
(
tEmployedPeopleInfo
,
tEmployedPeopleInfoForInsert
);
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
tEmployedPeopleInfo
.
setCreateBy
(
user
.
getUserName
());
tEmployedPeopleInfoForInsert
.
setCreateBy
(
user
.
getUserName
());
tEmployedPeopleInfo
.
setCreateTime
(
new
Date
());
tEmployedPeopleInfoForInsert
.
setCreateTime
(
new
Date
());
tEmployedPeopleInfo
.
setUpdateTime
(
new
Date
());
tEmployedPeopleInfoForInsert
.
setUpdateTime
(
new
Date
());
tEmployedPeopleInfo
.
setUpdateBy
(
user
.
getUserName
());
tEmployedPeopleInfoForInsert
.
setUpdateBy
(
user
.
getUserName
());
this
.
insertTEmployedPeopleInfo
(
tEmployedPeopleInfo
);
this
.
insertTEmployedPeopleInfo
(
tEmployedPeopleInfoForInsert
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"导入出错"
);
throw
new
BaseException
(
"导入出错"
);
}
}
...
@@ -187,7 +195,6 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
...
@@ -187,7 +195,6 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
return
"导入完成"
;
return
"导入完成"
;
}
}
/**
/**
* 查询当前用户导入 从业人员的错误数据总数
* 查询当前用户导入 从业人员的错误数据总数
* @return int
* @return int
...
@@ -199,4 +206,15 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
...
@@ -199,4 +206,15 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
return
employedPeopleInfoErrorMapper
.
countByCreateByInt
(
userId
+
""
);
return
employedPeopleInfoErrorMapper
.
countByCreateByInt
(
userId
+
""
);
}
}
/**
* 查询人员类型分组
* @return r
*/
@Override
public
List
<
String
>
queryPeopleOccupationByGroupBy
()
{
return
tEmployedPeopleInfoMapper
.
queryPeopleOccupationByGroupBy
();
}
}
}
zh-baseversion-system/src/main/resources/mapper/system/TEmployedPeopleInfoErrorMapper.xml
View file @
b0347b04
...
@@ -116,4 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -116,4 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"countByCreateByInt"
parameterType=
"String"
resultType=
"int"
>
<select
id=
"countByCreateByInt"
parameterType=
"String"
resultType=
"int"
>
select count(*) from t_employed_people_info_error where create_by = #{createBy}
select count(*) from t_employed_people_info_error where create_by = #{createBy}
</select>
</select>
<delete
id=
"clearImportError"
parameterType=
"String"
>
delete from t_employed_people_info_error where create_by = #{createBy}
</delete>
</mapper>
</mapper>
\ No newline at end of file
zh-baseversion-system/src/main/resources/mapper/system/TEmployedPeopleInfoMapper.xml
View file @
b0347b04
...
@@ -152,4 +152,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -152,4 +152,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectEnterpriseName"
resultType=
"String"
>
<select
id=
"selectEnterpriseName"
resultType=
"String"
>
select enterprise_name from t_enterprise_info where enterprise_id=#{bId} and is_del='0'
select enterprise_name from t_enterprise_info where enterprise_id=#{bId} and is_del='0'
</select>
</select>
<select
id=
"queryPeopleOccupationByGroupBy"
resultType=
"String"
>
SELECT
people_occupation
FROM
t_employed_people_info
where COALESCE(people_occupation, '')
<![CDATA[<>]]>
'' and is_del='0'
GROUP BY
people_occupation
</select>
</mapper>
</mapper>
zh-baseversion-web/src/api/regulation/supervise.js
View file @
b0347b04
...
@@ -109,3 +109,21 @@ export function importErrorexportInfo() {
...
@@ -109,3 +109,21 @@ export function importErrorexportInfo() {
method
:
'get'
method
:
'get'
})
})
}
}
// 导出从业人员信息- 错误数据
export
function
clearImportError
()
{
return
request
({
url
:
'/supervise/error/clearImportError'
,
method
:
'get'
})
}
// 导出从业人员信息- 错误数据
export
function
queryPeopleOccupationByGroupBy
()
{
return
request
({
url
:
'/regulation/supervise/queryPeopleOccupationByGroupBy'
,
method
:
'get'
})
}
zh-baseversion-web/src/views/regulation/supervise/index.vue
View file @
b0347b04
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
@
click=
"handleImportError"
@
click=
"handleImportError"
class=
"button-with-badge"
class=
"button-with-badge"
>
>
<span>
下载
从业人员(错误)
</span>
<span>
下载
导入时错误数据
</span>
<span
class=
"badge"
v-if=
"importError !== 0"
>
{{
importError
}}
</span>
<span
class=
"badge"
v-if=
"importError !== 0"
>
{{
importError
}}
</span>
</el-button>
</el-button>
</el-col>
</el-col>
...
@@ -241,7 +241,10 @@
...
@@ -241,7 +241,10 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"任职岗位"
prop=
"peopleOccupation"
>
<el-form-item
label=
"任职岗位"
prop=
"peopleOccupation"
>
<el-select
v-model=
"form.peopleOccupation"
placeholder=
"请选择任职岗位"
style=
"width: 100%;"
>
<el-select
v-model=
"form.peopleOccupation"
filterable
clearable
allow-create
placeholder=
"请选择任职岗位"
style=
"width: 100%;"
>
<el-option
<el-option
v-for=
"item in peopleOccupationOptions"
v-for=
"item in peopleOccupationOptions"
:key=
"item.dictValue"
:key=
"item.dictValue"
...
@@ -325,7 +328,7 @@
...
@@ -325,7 +328,7 @@
<el-form-item>
<el-form-item>
<div
style=
"width: 100%; text-align: center;"
>
<div
style=
"width: 100%; text-align: center;"
>
<el-button
type=
"primary"
@
click=
"downloadImportError"
>
下载
</el-button>
<el-button
type=
"primary"
@
click=
"downloadImportError"
>
下载
</el-button>
<el-button
type=
"danger"
@
click=
"clearImportError"
>
清除错误数据
</el-button>
<el-button
type=
"danger"
@
click=
"clearImportError
Method
"
>
清除错误数据
</el-button>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -334,7 +337,7 @@
...
@@ -334,7 +337,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
listInfo
,
getInfo
,
delInfo
,
addInfo
,
updateInfo
,
exportInfo
,
importErrorexportInfo
,
selectTEnterprise
,
addFile
,
importTemplate
,
count
ImportError
}
from
"@/api/regulation/supervise"
;
import
{
listInfo
,
getInfo
,
delInfo
,
addInfo
,
updateInfo
,
exportInfo
,
importErrorexportInfo
,
selectTEnterprise
,
queryPeopleOccupationByGroupBy
,
importTemplate
,
countImportError
,
clear
ImportError
}
from
"@/api/regulation/supervise"
;
import
FileUpload
from
'@/components/FileSuperviseUpload'
;
import
FileUpload
from
'@/components/FileSuperviseUpload'
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
}
from
"@/utils/auth"
;
...
@@ -420,12 +423,31 @@ export default {
...
@@ -420,12 +423,31 @@ export default {
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getDicts
(
"dict_people_occupation"
).
then
(
response
=>
{
// 去掉字典配置,用户和灵活增加任职岗位
this
.
peopleOccupationOptions
=
response
.
data
;
// this.getDicts("dict_people_occupation").then(response => {
});
// this.peopleOccupationOptions = response.data;
// });
this
.
queryPeopleOccupationByGroupByMethod
();
this
.
countImportError
();
this
.
countImportError
();
},
},
methods
:
{
methods
:
{
//初始化 任职岗位下拉框
queryPeopleOccupationByGroupByMethod
()
{
queryPeopleOccupationByGroupBy
().
then
(
response
=>
{
let
peopleOccupationArr
=
response
.
data
;
if
(
peopleOccupationArr
!=
null
&&
peopleOccupationArr
.
length
>
0
)
{
for
(
const
item
of
peopleOccupationArr
)
{
let
obj
=
{
"dictValue"
:
item
,
"dictLabel"
:
item
}
this
.
peopleOccupationOptions
.
push
(
obj
);
}
}
})
},
// 任务组名字典翻译
// 任务组名字典翻译
peopleOccupationTypeFormat
(
row
)
{
peopleOccupationTypeFormat
(
row
)
{
var
label
=
this
.
selectDictLabel
(
this
.
peopleOccupationOptions
,
row
.
peopleOccupation
);
var
label
=
this
.
selectDictLabel
(
this
.
peopleOccupationOptions
,
row
.
peopleOccupation
);
...
@@ -462,6 +484,9 @@ export default {
...
@@ -462,6 +484,9 @@ export default {
this
.
getList
();
this
.
getList
();
this
.
countImportError
();
this
.
countImportError
();
//导入后 刷新 任职岗位字典数据
this
.
peopleOccupationOptions
=
[];
this
.
queryPeopleOccupationByGroupByMethod
();
},
},
// 提交上传文件
// 提交上传文件
submitFileForm
()
{
submitFileForm
()
{
...
@@ -477,7 +502,14 @@ export default {
...
@@ -477,7 +502,14 @@ export default {
// 下载从业人员错误 按钮
// 下载从业人员错误 按钮
handleImportError
()
{
handleImportError
()
{
if
(
this
.
importError
===
0
)
{
this
.
$alert
(
'暂无错误数据'
,
'下载'
,
{
confirmButtonText
:
'确定'
,
});
return
}
else
{
this
.
importErrorShow
=
true
;
this
.
importErrorShow
=
true
;
}
},
},
// 下载从业人员错误 按钮
// 下载从业人员错误 按钮
downloadImportError
()
{
downloadImportError
()
{
...
@@ -485,10 +517,22 @@ export default {
...
@@ -485,10 +517,22 @@ export default {
importErrorexportInfo
().
then
(
response
=>
{
importErrorexportInfo
().
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
download
(
response
.
msg
);
})
})
this
.
importErrorShow
=
false
;
},
},
// 清除 从业人员错误 数据
// 清除 从业人员错误 数据
clearImportError
()
{
clearImportError
Method
()
{
this
.
$confirm
(
'是否确认删除导入的从业人员错误数据?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
clearImportError
();
}).
then
(()
=>
{
this
.
importErrorShow
=
false
;
this
.
msgSuccess
(
"删除成功"
);
this
.
importError
=
0
}).
catch
(()
=>
{});
},
},
/**上传头像*/
/**上传头像*/
getFileInfo
(
res
){
getFileInfo
(
res
){
...
@@ -614,6 +658,10 @@ export default {
...
@@ -614,6 +658,10 @@ export default {
}
}
}
}
});
});
//新增后 刷新 任职岗位字典数据
this
.
peopleOccupationOptions
=
[];
this
.
queryPeopleOccupationByGroupByMethod
();
},
},
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -628,6 +676,10 @@ export default {
...
@@ -628,6 +676,10 @@ export default {
this
.
getList
();
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
//删除后 刷新 任职岗位字典数据
this
.
peopleOccupationOptions
=
[];
this
.
queryPeopleOccupationByGroupByMethod
();
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
...
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