Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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
耿迪迪
gassafety-progress
Commits
d2426e87
Commit
d2426e87
authored
Feb 14, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务下发 gengdidi
parent
2343b553
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
673 additions
and
98 deletions
+673
-98
TWorkOrderController.java
...web/controller/operationMonitor/TWorkOrderController.java
+33
-0
SysLoginController.java
.../com/zehong/web/controller/system/SysLoginController.java
+5
-0
SysUserController.java
...a/com/zehong/web/controller/system/SysUserController.java
+18
-8
TEnterpriseInfoController.java
...hong/web/controller/system/TEnterpriseInfoController.java
+12
-0
SysUser.java
...in/java/com/zehong/common/core/domain/entity/SysUser.java
+13
-1
SysPostMapper.java
...src/main/java/com/zehong/system/mapper/SysPostMapper.java
+7
-0
SysUserMapper.java
...src/main/java/com/zehong/system/mapper/SysUserMapper.java
+10
-0
ISysPostService.java
.../main/java/com/zehong/system/service/ISysPostService.java
+7
-0
ISysUserService.java
.../main/java/com/zehong/system/service/ISysUserService.java
+10
-0
SysPostServiceImpl.java
...va/com/zehong/system/service/impl/SysPostServiceImpl.java
+10
-0
SysUserServiceImpl.java
...va/com/zehong/system/service/impl/SysUserServiceImpl.java
+14
-0
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+3
-0
SysPostMapper.xml
...system/src/main/resources/mapper/system/SysPostMapper.xml
+8
-0
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+26
-4
info.js
gassafetyprogress-web/src/api/regulation/info.js
+11
-0
post.js
gassafetyprogress-web/src/api/system/post.js
+10
-1
user.js
gassafetyprogress-web/src/api/system/user.js
+14
-0
index.vue
gassafetyprogress-web/src/components/MyFileUpload/index.vue
+2
-0
user.js
gassafetyprogress-web/src/store/modules/user.js
+11
-1
WorkIssue.vue
...views/operationMonitor/workOrder/components/WorkIssue.vue
+39
-0
index.vue
...ogress-web/src/views/operationMonitor/workOrder/index.vue
+335
-71
index.vue
gassafetyprogress-web/src/views/system/user/index.vue
+75
-12
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/operationMonitor/TWorkOrderController.java
View file @
d2426e87
package
com
.
zehong
.
web
.
controller
.
operationMonitor
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.core.domain.model.LoginUser
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.system.domain.SysPost
;
import
com.zehong.system.service.ISysPostService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -33,6 +39,9 @@ public class TWorkOrderController extends BaseController
@Autowired
private
ITWorkOrderService
tWorkOrderService
;
@Autowired
private
ISysPostService
iSysPostService
;
/**
* 查询燃气任务列表
*/
...
...
@@ -41,6 +50,7 @@ public class TWorkOrderController extends BaseController
public
TableDataInfo
list
(
TWorkOrder
tWorkOrder
)
{
startPage
();
judgeUserRole
(
tWorkOrder
);
List
<
TWorkOrder
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
return
getDataTable
(
list
);
}
...
...
@@ -53,11 +63,34 @@ public class TWorkOrderController extends BaseController
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TWorkOrder
tWorkOrder
)
{
judgeUserRole
(
tWorkOrder
);
List
<
TWorkOrder
>
list
=
tWorkOrderService
.
selectTWorkOrderList
(
tWorkOrder
);
ExcelUtil
<
TWorkOrder
>
util
=
new
ExcelUtil
<
TWorkOrder
>(
TWorkOrder
.
class
);
return
util
.
exportExcel
(
list
,
"燃气任务数据"
);
}
/**
* 判断用户角色
* @param tWorkOrder
*/
private
void
judgeUserRole
(
TWorkOrder
tWorkOrder
){
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
//获取用户所属单位
long
enterpriseId
=
user
.
getDeptId
();
//判断是否为政府用户
if
(!
"-2"
.
equals
(
String
.
valueOf
(
enterpriseId
))){
tWorkOrder
.
setWorkAssignEnterproseId
(
enterpriseId
);
//判断是否为巡线员
List
<
Integer
>
postIds
=
iSysPostService
.
selectPostListByUserId
(
user
.
getUserId
());
for
(
Integer
postId
:
postIds
){
SysPost
postInfo
=
iSysPostService
.
selectPostById
(
postId
.
longValue
());
if
(
"se"
.
equals
(
postInfo
.
getPostCode
())){
tWorkOrder
.
setWorkAssignManId
(
user
.
getUserId
());
}
}
}
}
/**
* 获取燃气任务详细信息
*/
...
...
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/system/SysLoginController.java
View file @
d2426e87
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
java.util.Set
;
import
com.zehong.framework.systemsetting.SystemSetting
;
import
com.zehong.system.service.ISysPostService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -44,6 +45,9 @@ public class SysLoginController
@Autowired
private
SystemSetting
systemSetting
;
@Autowired
private
ISysPostService
iSysPostService
;
/**
* 登录方法
*
...
...
@@ -80,6 +84,7 @@ public class SysLoginController
ajax
.
put
(
"roles"
,
roles
);
ajax
.
put
(
"permissions"
,
permissions
);
ajax
.
put
(
"systemSetting"
,
systemSetting
.
getSystemWebSetting
());
ajax
.
put
(
"posts"
,
iSysPostService
.
getPostListByUserId
(
user
.
getUserId
()));
return
ajax
;
}
...
...
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/system/SysUserController.java
View file @
d2426e87
package
com
.
zehong
.
web
.
controller
.
system
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.zehong.framework.systemsetting.SystemSetting
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.constant.UserConstants
;
...
...
@@ -207,4 +202,19 @@ public class SysUserController extends BaseController
user
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
userService
.
updateUserStatus
(
user
));
}
/**
* 根据企业获取巡线员
*
* @param enterpriseId 企业id
* @param postCode 岗位编码
* @return 巡线员信息
*/
@GetMapping
(
"/getInspectionUsers"
)
public
AjaxResult
getInspectionUsers
(
@RequestParam
(
value
=
"enterpriseId"
)
String
enterpriseId
,
@RequestParam
(
value
=
"postCode"
)
String
postCode
){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"enterpriseId"
,
enterpriseId
);
map
.
put
(
"postCode"
,
postCode
);
return
AjaxResult
.
success
(
userService
.
getInspectionUsers
(
map
));
};
}
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/system/TEnterpriseInfoController.java
View file @
d2426e87
...
...
@@ -45,6 +45,18 @@ public class TEnterpriseInfoController extends BaseController
return
getDataTable
(
list
);
}
/**
*查询所有企业信息
* @param tEnterpriseInfo
* @return
*/
@GetMapping
(
"/enterpriseLists"
)
public
TableDataInfo
enterpriseLists
(
TEnterpriseInfo
tEnterpriseInfo
)
{
List
<
TEnterpriseInfo
>
list
=
tEnterpriseInfoService
.
selectTEnterpriseInfoList
(
tEnterpriseInfo
);
return
getDataTable
(
list
);
}
/**
* 导出企业信息列表
*/
...
...
gassafetyprogress-common/src/main/java/com/zehong/common/core/domain/entity/SysUser.java
View file @
d2426e87
...
...
@@ -76,13 +76,17 @@ public class SysUser extends BaseEntity
@Excel
(
name
=
"最后登录时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
,
type
=
Type
.
EXPORT
)
private
Date
loginDate
;
/** 部门对象 */
/** 部门对象 */
@Excels
({
@Excel
(
name
=
"部门名称"
,
targetAttr
=
"deptName"
,
type
=
Type
.
EXPORT
),
@Excel
(
name
=
"部门负责人"
,
targetAttr
=
"leader"
,
type
=
Type
.
EXPORT
)
})
private
SysDept
dept
;
/** 所属单位 */
@Excel
(
name
=
"所属单位"
,
targetAttr
=
"enterpriseName"
,
type
=
Type
.
EXPORT
)
private
String
enterpriseName
;
/** 角色对象 */
private
List
<
SysRole
>
roles
;
...
...
@@ -300,6 +304,14 @@ public class SysUser extends BaseEntity
this
.
postIds
=
postIds
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/SysPostMapper.java
View file @
d2426e87
...
...
@@ -41,6 +41,13 @@ public interface SysPostMapper
*/
public
List
<
Integer
>
selectPostListByUserId
(
Long
userId
);
/**
* 根据用户ID查询岗位信息
* @param userId 用户id
* @return
*/
List
<
SysPost
>
getPostListByUserId
(
Long
userId
);
/**
* 查询用户所属岗位组
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/SysUserMapper.java
View file @
d2426e87
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.zehong.common.core.domain.entity.SysUser
;
...
...
@@ -108,4 +110,12 @@ public interface SysUserMapper
* @return 结果
*/
public
SysUser
checkEmailUnique
(
String
email
);
/**
* 根据企业获取巡线员
*
* @param map
* @return 巡线员信息
*/
List
<
SysUser
>
getInspectionUsers
(
Map
<
String
,
String
>
map
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ISysPostService.java
View file @
d2426e87
...
...
@@ -41,6 +41,13 @@ public interface ISysPostService
*/
public
List
<
Integer
>
selectPostListByUserId
(
Long
userId
);
/**
* 根据用户ID查询岗位信息
* @param userId 用户id
* @return
*/
List
<
SysPost
>
getPostListByUserId
(
Long
userId
);
/**
* 校验岗位名称
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/ISysUserService.java
View file @
d2426e87
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.common.core.domain.entity.SysUser
;
/**
...
...
@@ -164,4 +166,12 @@ public interface ISysUserService
* @return 结果
*/
public
String
importUser
(
List
<
SysUser
>
userList
,
Boolean
isUpdateSupport
,
String
operName
);
/**
* 根据企业获取巡线员
*
* @param map
* @return 巡线员信息
*/
List
<
SysUser
>
getInspectionUsers
(
Map
<
String
,
String
>
map
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/SysPostServiceImpl.java
View file @
d2426e87
...
...
@@ -72,6 +72,16 @@ public class SysPostServiceImpl implements ISysPostService
return
postMapper
.
selectPostListByUserId
(
userId
);
}
/**
* 根据用户ID查询岗位信息
* @param userId 用户id
* @return
*/
@Override
public
List
<
SysPost
>
getPostListByUserId
(
Long
userId
){
return
postMapper
.
getPostListByUserId
(
userId
);
}
/**
* 校验岗位名称是否唯一
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/SysUserServiceImpl.java
View file @
d2426e87
...
...
@@ -2,6 +2,8 @@ package com.zehong.system.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -460,4 +462,16 @@ public class SysUserServiceImpl implements ISysUserService
}
return
successMsg
.
toString
();
}
/**
* 根据企业获取巡线员
*
* @param map
* @return 巡线员信息
*/
@Override
public
List
<
SysUser
>
getInspectionUsers
(
Map
<
String
,
String
>
map
){
return
userMapper
.
getInspectionUsers
(
map
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
d2426e87
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TWorkOrderMapper
;
...
...
@@ -54,6 +55,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
)
{
tWorkOrder
.
setCreateTime
(
DateUtils
.
getNowDate
());
tWorkOrder
.
setCreateBy
(
SecurityUtils
.
getUsername
());
return
tWorkOrderMapper
.
insertTWorkOrder
(
tWorkOrder
);
}
...
...
@@ -67,6 +69,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
public
int
updateTWorkOrder
(
TWorkOrder
tWorkOrder
)
{
tWorkOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tWorkOrder
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
tWorkOrderMapper
.
updateTWorkOrder
(
tWorkOrder
);
}
...
...
gassafetyprogress-system/src/main/resources/mapper/system/SysPostMapper.xml
View file @
d2426e87
...
...
@@ -53,6 +53,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
<select
id=
"getPostListByUserId"
parameterType=
"Long"
resultMap=
"SysPostResult"
>
select p.*
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
<select
id=
"selectPostsByUserName"
parameterType=
"String"
resultMap=
"SysPostResult"
>
select p.post_id, p.post_name, p.post_code
...
...
gassafetyprogress-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
d2426e87
...
...
@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"enterpriseName"
column=
"enterprise_name"
/>
<association
property=
"dept"
column=
"dept_id"
javaType=
"SysDept"
resultMap=
"deptResult"
/>
<collection
property=
"roles"
javaType=
"java.util.List"
resultMap=
"RoleResult"
/>
</resultMap>
...
...
@@ -56,8 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select
id=
"selectUserList"
parameterType=
"SysUser"
resultMap=
"SysUserResult"
>
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, (CASE WHEN u.dept_id = '-2' THEN '政府部门'
ELSE enter.enterprise_name END)AS enterprise_name from sys_user u
LEFT JOIN t_enterprise_info enter ON u.dept_id = enter.enterprise_id
where u.del_flag = '0'
<if
test=
"userName != null and userName != ''"
>
AND u.user_name like concat('%', #{userName}, '%')
...
...
@@ -74,9 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"params.endTime != null and params.endTime != ''"
>
<!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d')
<
= date_format(#{params.endTime},'%y%m%d')
</if>
<if
test=
"deptId != null and deptId != 0"
>
<
!--<
if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if>
</if>
-->
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
...
...
@@ -178,5 +180,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</delete>
<select
id=
"getInspectionUsers"
parameterType=
"java.util.Map"
resultMap=
"SysUserResult"
>
SELECT
u.user_id,
u.dept_id,
u.user_name
FROM
sys_user u
LEFT JOIN sys_user_post up ON u.user_id = up.user_id
LEFT JOIN sys_post p ON up.post_id = p.post_id
<where>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
AND u.dept_id = #{enterpriseId}
</if>
<if
test=
"postCode !=null and postCode != ''"
>
AND p.post_code = #{postCode}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
gassafetyprogress-web/src/api/regulation/info.js
View file @
d2426e87
...
...
@@ -9,6 +9,17 @@ export function listInfo(query) {
})
}
// 查询企业所有信息
export
function
enterpriseLists
(
query
)
{
return
request
({
url
:
'/regulation/info/enterpriseLists'
,
method
:
'get'
,
params
:
query
})
}
// 查询企业信息详细
export
function
getInfo
(
enterpriseId
)
{
return
request
({
...
...
gassafetyprogress-web/src/api/system/post.js
View file @
d2426e87
...
...
@@ -50,4 +50,13 @@ export function exportPost(query) {
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
}
//查询所有岗位
export
function
optionselect
(
query
)
{
return
request
({
url
:
'/system/post/optionselect'
,
method
:
'get'
,
params
:
query
})
}
gassafetyprogress-web/src/api/system/user.js
View file @
d2426e87
...
...
@@ -125,3 +125,17 @@ export function importTemplate() {
method
:
'get'
})
}
//获取用户巡检员
export
function
getInspectionUsers
(
enterpriseId
,
postCode
)
{
const
data
=
{
enterpriseId
,
postCode
}
return
request
({
url
:
'/system/user/getInspectionUsers'
,
method
:
'get'
,
params
:
data
})
}
gassafetyprogress-web/src/components/MyFileUpload/index.vue
View file @
d2426e87
...
...
@@ -17,6 +17,7 @@
class=
"upload-file-uploader"
:class=
"
{ hide: fileArr.length>0 ||addShow }"
ref="upload"
:disabled="readOnly"
>
<!-- 上传按钮 -->
<!--
<el-button
size=
"mini"
icon=
""
type=
"primary"
></el-button>
-->
...
...
@@ -95,6 +96,7 @@ export default {
type
:
Boolean
,
default
:
true
,
},
readOnly
:
false
},
data
()
{
return
{
...
...
gassafetyprogress-web/src/store/modules/user.js
View file @
d2426e87
...
...
@@ -9,6 +9,8 @@ const user = {
roles
:
[],
permissions
:
[],
systemSetting
:{},
posts
:
[],
enterpriseId
:
''
},
mutations
:
{
...
...
@@ -29,6 +31,12 @@ const user = {
},
SET_SYSTEMSETTING
:
(
state
,
systemSetting
)
=>
{
state
.
systemSetting
=
systemSetting
},
SET_POSTS
:
(
state
,
posts
)
=>
{
state
.
posts
=
posts
},
SET_ENTERPRISEID
:
(
state
,
enterpriseId
)
=>
{
state
.
enterpriseId
=
enterpriseId
}
},
...
...
@@ -67,6 +75,8 @@ const user = {
commit
(
'SET_AVATAR'
,
avatar
)
// 默认配置
commit
(
'SET_SYSTEMSETTING'
,
res
.
systemSetting
)
commit
(
'SET_POSTS'
,
res
.
posts
)
commit
(
'SET_ENTERPRISEID'
,
user
.
deptId
)
console
.
log
(
res
.
systemSetting
)
resolve
(
res
)
}).
catch
(
error
=>
{
...
...
@@ -74,7 +84,7 @@ const user = {
})
})
},
// 退出系统
LogOut
({
commit
,
state
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
gassafetyprogress-web/src/views/operationMonitor/workOrder/components/WorkIssue.vue
0 → 100644
View file @
d2426e87
<
template
>
<el-dialog
title=
"任务下发"
:visible
.
sync=
"dialogVisible"
width=
"900px"
append-to-body
>
<el-form
ref=
"workForm"
:model=
"workForm"
label-width=
"80px"
>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:{
workForm
:{},
dialogVisible
:
false
},
data
()
{
return
{
}
},
created
()
{
console
.
log
(
"dsaadddd=============>"
,
this
.
workForm
)
},
methods
:
{
submitForm
(){
},
cancel
(){
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
gassafetyprogress-web/src/views/operationMonitor/workOrder/index.vue
View file @
d2426e87
...
...
@@ -81,28 +81,41 @@
<el-table
v-loading=
"loading"
:data=
"orderList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"任务标题"
align=
"center"
prop=
"workTitle"
/>
<el-table-column
label=
"任务类型"
align=
"center"
prop=
"workType"
/>
<el-table-column
label=
"任务内容"
align=
"center"
prop=
"workContent"
/>
<el-table-column
label=
"任务类型"
align=
"center"
prop=
"workType"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.workType == 1"
>
入户安检
</span>
<span
v-if=
"scope.row.workType == 2"
>
巡检
</span>
<span
v-if=
"scope.row.workType == 3"
>
报警巡查
</span>
<span
v-if=
"scope.row.workType == 4"
>
其他
</span>
</
template
>
</el-table-column>
<!-- <el-table-column label="任务内容" align="center" prop="workContent" />-->
<el-table-column
label=
"创建单位"
align=
"center"
prop=
"workCreateEnterpriseName"
/>
<el-table-column
label=
"指派单位"
align=
"center"
prop=
"workAssignEnterproseName"
/>
<el-table-column
label=
"指派人"
align=
"center"
prop=
"workAssignManId"
/>
<el-table-column
label=
"任务状态"
align=
"center"
prop=
"workStatus"
/>
<el-table-column
label=
"巡检时间"
align=
"center"
prop=
"inspectionDate"
width=
"180"
>
<el-table-column
label=
"任务状态"
align=
"center"
prop=
"workStatus"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.workStatus == 1"
>
派发中
</span>
<span
v-if=
"scope.row.workStatus == 2"
>
反馈
</span>
<span
v-if=
"scope.row.workStatus == 3"
>
归档
</span>
</
template
>
</el-table-column>
>
<!--<el-table-column label="巡检时间" align="center" prop="inspectionDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<
el
-
table
-
column
label
=
"巡检路线"
align
=
"center"
prop
=
"inspectionRoute"
/>
<
el
-
table
-
column
label
=
"问题描述"
align
=
"center"
prop
=
"problemDescription"
/>
<el-table-column label="巡检路线" align="center" prop="inspectionRoute" />
-->
<
!--<
el-table-column label="问题描述" align="center" prop="problemDescription" />
<el-table-column label="问题图片" align="center" prop="pictureUrl" style="text-align:center;">
<template slot-scope="scope">
<img :src="scope.row.iconUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(scope.row)"/>
<el-image :ref="'a'+scope.row.workId" :src="scope.row.iconUrl" v-show="false" :preview-src-list="[scope.row.iconUrl]" v-if="scope.row.iconUrl != '' && scope.row.iconUrl != null"></el-image>
</template>
<
/el-table-column
>
</el-table-column>
-->
<!--<el-table-column label="图片路径" align="center" prop="iconUrl" />-->
<
el
-
table
-
column
label
=
"整改方案"
align
=
"center"
prop
=
"rectificationPlan"
/>
<
el
-
table
-
column
label
=
"整改结果"
align
=
"center"
prop
=
"rectificationResult"
/>
<!--
<el-table-column label="整改方案" align="center" prop="rectificationPlan" />
<el-table-column label="整改结果" align="center" prop="rectificationResult" />
-->
<el-table-column
label=
"责任单位"
align=
"center"
prop=
"responsibleUnit"
/>
<el-table-column
label=
"责任人员"
align=
"center"
prop=
"responsiblePerson"
/>
<el-table-column
label=
"截止日期"
align=
"center"
prop=
"expiryDate"
width=
"180"
>
...
...
@@ -110,22 +123,14 @@
<span>
{{
parseTime
(
scope
.
row
.
expiryDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
min
-
width
=
"150%"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
v
-
if
=
"'admin'==$store.state.user.roles[0] && scope.row.workAssignMan == null && scope.row.workStatus == '1'"
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['system:order:edit']"
>
任务下发
<
/el-button
>
<
el
-
button
v
-
if
=
"'admin'==$store.state.user.roles[0] && scope.row.workStatus == '1'"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['system:order:edit']"
>
接单
<
/el-button
>
@
click
=
"workDetail(scope.row)"
>
详情
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
...
...
@@ -140,6 +145,30 @@
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['system:order:remove']"
>
删除
<
/el-button
>
<
el
-
button
v
-
if
=
"'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '1'"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"workIssue(scope.row)"
>
任务下发
<
/el-button
>
<
el
-
button
v
-
if
=
" 'inpector'== roleType && scope.row.workStatus == '1'"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"takingOrder(scope.row)"
>
接单
<
/el-button
>
<
el
-
button
v
-
if
=
"'zhengfu'!= roleType && scope.row.workStatus == '2'"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"feedbookWork(scope.row)"
>
反馈
<
/el-button
>
<
el
-
button
v
-
if
=
"'zhengfu'!= roleType && scope.row.workStatus == '3'"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"sortWork(scope.row)"
>
归档
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -154,16 +183,134 @@
<!--
添加或修改燃气任务对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"900px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务标题"
prop
=
"workTitle"
>
<
el
-
input
v
-
model
=
"form.workTitle"
placeholder
=
"请输入任务标题"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务类型"
prop
=
"workType"
>
<
el
-
select
v
-
model
=
"form.workType"
placeholder
=
"请选择任务类型"
style
=
"width: 350px"
@
change
=
"selectWorkType($event)"
:
disabled
=
"isDetail"
>
<
el
-
option
label
=
"入户安检"
value
=
"1"
/>
<
el
-
option
label
=
"巡检"
value
=
"2"
/>
<
el
-
option
label
=
"报警巡查"
value
=
"3"
/>
<
el
-
option
label
=
"其他"
value
=
"4"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"任务内容"
>
<
editor
v
-
model
=
"form.workContent"
:
min
-
height
=
"192"
:
readOnly
=
"isDetail"
/>
<
/el-form-item
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"指派单位"
prop
=
"workAssignEnterproseName"
>
<!--
<
el
-
input
v
-
model
=
"form.workAssignEnterproseName"
placeholder
=
"请输入指派单位名称"
/>-->
<
el
-
select
v
-
model
=
"form.workAssignEnterproseId"
placeholder
=
"请选择指派单位名称"
style
=
"width: 350px"
@
change
=
"selectworkAssignEnterprose($event)"
:
disabled
=
"isDetail"
>
<
el
-
option
v
-
for
=
"item in enterprises"
:
key
=
"item.enterpriseId"
:
label
=
"item.enterpriseName"
:
value
=
"item.enterpriseId"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"指派人"
prop
=
"workAssignManId"
>
<!--
<
el
-
input
v
-
model
=
"form.workAssignManId"
placeholder
=
"请输入指派人"
/>-->
<
el
-
select
v
-
model
=
"form.workAssignManId"
placeholder
=
"请输入指派人"
style
=
"width: 350px"
@
change
=
"selectInspection($event)"
:
disabled
=
"isDetail"
>
<
el
-
option
v
-
for
=
"item in inspectors"
:
key
=
"item.userId "
:
label
=
"item.userName"
:
value
=
"item.userId "
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"创建单位"
prop
=
"inspectionDate"
>
<
el
-
input
v
-
model
=
"form.workCreateEnterpriseName"
placeholder
=
"请输入创建单位名称"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"巡检时间"
prop
=
"inspectionDate"
v
-
show
=
inspectorInfoIsShow
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.inspectionDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择巡检时间"
style
=
"width: 350px"
:
disabled
=
"isDetail"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"巡检路线"
prop
=
"inspectionRoute"
v
-
show
=
inspectorInfoIsShow
>
<
el
-
input
v
-
model
=
"form.inspectionRoute"
type
=
"textarea"
placeholder
=
"请输入巡检路线"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"问题描述"
prop
=
"problemDescription"
>
<
el
-
input
v
-
model
=
"form.problemDescription"
type
=
"textarea"
placeholder
=
"请输入问题描述"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"问题图片"
prop
=
"iconUrl"
>
<
MyFileUpload
listType
=
"picture-card"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
:
readOnly
=
"isDetail"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<
/el-form-item
>
<!--
<
el
-
form
-
item
label
=
"整改方案"
prop
=
"rectificationPlan"
>
<
el
-
input
v
-
model
=
"form.rectificationPlan"
type
=
"textarea"
placeholder
=
"请输入整改方案"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改结果"
prop
=
"rectificationResult"
>
<
el
-
input
v
-
model
=
"form.rectificationResult"
type
=
"textarea"
placeholder
=
"请输入整改结果"
/>
<
/el-form-item>--
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"责任单位"
prop
=
"responsibleUnit"
>
<
el
-
input
v
-
model
=
"form.responsibleUnit"
placeholder
=
"请输入责任单位"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"责任人员"
prop
=
"responsiblePerson"
>
<
el
-
input
v
-
model
=
"form.responsiblePerson"
placeholder
=
"请输入责任人员"
:
disabled
=
"isDetail"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"截止日期"
prop
=
"expiryDate"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.expiryDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择截止日期"
style
=
"width: 350px"
:
disabled
=
"isDetail"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<!--
任务下发
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"workOpen"
width
=
"900px"
append
-
to
-
body
>
<
el
-
form
ref
=
"workForm"
:
model
=
"workForm"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务标题"
prop
=
"workTitle"
>
<
el
-
input
v
-
model
=
"
form.workTitle"
placeholder
=
"请输入任务标题"
/>
<
el
-
input
v
-
model
=
"
workForm.workTitle"
placeholder
=
"请输入任务标题"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务类型"
prop
=
"workType"
>
<
el
-
select
v
-
model
=
"
form.workType"
placeholder
=
"请选择任务类型"
style
=
"width: 350px
"
>
<
el
-
select
v
-
model
=
"
workForm.workType"
placeholder
=
"请选择任务类型"
style
=
"width: 350px"
@
change
=
"selectWorkType($event)
"
>
<
el
-
option
label
=
"入户安检"
value
=
"1"
/>
<
el
-
option
label
=
"巡检"
value
=
"2"
/>
<
el
-
option
label
=
"报警巡查"
value
=
"3"
/>
...
...
@@ -172,72 +319,77 @@
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"任务内容"
>
<
editor
v
-
model
=
"form.workContent"
:
min
-
height
=
"192"
/>
<
/el-form-item
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"指派单位"
prop
=
"workAssignEnterproseName"
>
<
el
-
input
v
-
model
=
"form.workAssignEnterproseName"
placeholder
=
"请输入指派单位名称"
/>
<!--
<
el
-
input
v
-
model
=
"form.workAssignEnterproseName"
placeholder
=
"请输入指派单位名称"
/>-->
<
el
-
select
v
-
model
=
"workForm.workAssignEnterproseId"
placeholder
=
"请选择指派单位名称"
style
=
"width: 350px"
@
change
=
"selectworkAssignEnterprose($event)"
>
<
el
-
option
v
-
for
=
"item in enterprises"
:
key
=
"item.enterpriseId"
:
label
=
"item.enterpriseName"
:
value
=
"item.enterpriseId"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"指派人"
prop
=
"workAssignManId"
>
<
el
-
input
v
-
model
=
"form.workAssignManId"
placeholder
=
"请输入指派人"
/>
<!--
<
el
-
input
v
-
model
=
"form.workAssignManId"
placeholder
=
"请输入指派人"
/>-->
<
el
-
select
v
-
model
=
"workForm.workAssignManId"
placeholder
=
"请输入指派人"
style
=
"width: 350px"
@
change
=
"selectInspection($event)"
>
<
el
-
option
v
-
for
=
"item in inspectors"
:
key
=
"item.userId "
:
label
=
"item.userName"
:
value
=
"item.userId "
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"巡检时间"
prop
=
"inspectionDate"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.inspectionDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择巡检时间"
style
=
"width: 350px"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"巡检路线"
prop
=
"inspectionRoute"
>
<
el
-
input
v
-
model
=
"form.inspectionRoute"
type
=
"textarea"
placeholder
=
"请输入巡检路线"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"问题描述"
prop
=
"problemDescription"
>
<
el
-
input
v
-
model
=
"form.problemDescription"
type
=
"textarea"
placeholder
=
"请输入问题描述"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"问题图片"
prop
=
"iconUrl"
>
<
MyFileUpload
listType
=
"picture-card"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改方案"
prop
=
"rectificationPlan"
>
<
el
-
input
v
-
model
=
"form.rectificationPlan"
type
=
"textarea"
placeholder
=
"请输入整改方案"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"整改结果"
prop
=
"rectificationResult"
>
<
el
-
input
v
-
model
=
"form.rectificationResult"
type
=
"textarea"
placeholder
=
"请输入整改结果"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<!--
反馈
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"feedBookOpen"
width
=
"900px"
append
-
to
-
body
>
<
el
-
form
ref
=
"feedBookForm"
:
model
=
"feedBookForm"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"
责任单位"
prop
=
"responsibleUnit
"
>
<
el
-
input
v
-
model
=
"f
orm.responsibleUnit"
placeholder
=
"请输入责任单位"
/>
<
el
-
form
-
item
label
=
"
任务标题"
prop
=
"workTitle
"
>
<
el
-
input
v
-
model
=
"f
eedBookForm.workTitle"
placeholder
=
"请输入任务标题"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"责任人员"
prop
=
"responsiblePerson"
>
<
el
-
input
v
-
model
=
"form.responsiblePerson"
placeholder
=
"请输入责任人员"
/>
<
el
-
form
-
item
label
=
"任务类型"
prop
=
"workType"
>
<
el
-
select
v
-
model
=
"feedBookForm.workType"
placeholder
=
"请选择任务类型"
style
=
"width: 350px"
@
change
=
"selectWorkType($event)"
>
<
el
-
option
label
=
"入户安检"
value
=
"1"
/>
<
el
-
option
label
=
"巡检"
value
=
"2"
/>
<
el
-
option
label
=
"报警巡查"
value
=
"3"
/>
<
el
-
option
label
=
"其他"
value
=
"4"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
form
-
item
label
=
"截止日期"
prop
=
"expiryDate"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.expiryDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择截止日期"
style
=
"width: 350px"
>
<
/el-date-picker
>
<
el
-
form
-
item
label
=
"反馈图片"
prop
=
"iconUrl"
>
<
MyFileUpload
listType
=
"picture-card"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
:
readOnly
=
"isDetail"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"反馈信息"
prop
=
"rectificationResult"
>
<
el
-
input
v
-
model
=
"form.rectificationResult"
type
=
"textarea"
placeholder
=
"反馈信息"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
...
...
@@ -251,6 +403,8 @@
import
{
listOrder
,
getOrder
,
delOrder
,
addOrder
,
updateOrder
,
exportOrder
}
from
"@/api/operationMonitor/order"
;
import
Editor
from
'@/components/Editor'
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
{
enterpriseLists
}
from
"@/api/regulation/info"
;
import
{
getInspectionUsers
}
from
"@/api/system/user"
;
export
default
{
name
:
"Order"
,
components
:
{
...
...
@@ -263,6 +417,8 @@ export default {
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
detailDialogVisible
:
false
,
workForm
:
{
}
,
// 选中数组
ids
:
[],
// 非单个禁用
...
...
@@ -279,8 +435,14 @@ export default {
title
:
""
,
// 是否显示弹出层
open
:
false
,
//企业选项
enterprises
:
[],
//巡检员
inspectors
:[],
// 上传文件列表
fileList
:
[],
//详情
isDetail
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -311,11 +473,27 @@ export default {
form
:
{
}
,
// 表单校验
rules
:
{
}
}
,
inspectorInfoIsShow
:
false
,
roleType
:
"zhengfu"
,
workForm
:{
}
,
workOpen
:
false
,
feedBookForm
:
{
}
,
feedBookOpen
:
false
}
;
}
,
created
()
{
this
.
getList
();
let
enterpriseId
=
this
.
$store
.
state
.
user
.
enterpriseId
;
let
post
=
this
.
$store
.
state
.
user
.
posts
.
find
(
item
=>
item
.
postCode
===
"se"
);
if
(
-
2
!=
enterpriseId
){
if
(
post
){
this
.
roleType
=
"inpector"
;
}
else
{
this
.
roleType
=
"enterprise"
;
}
}
}
,
methods
:
{
/** 查询燃气任务列表 */
...
...
@@ -385,16 +563,19 @@ export default {
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加燃气任务"
;
this
.
getEnterpriseLists
();
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
workId
=
row
.
workId
||
this
.
ids
this
.
isDetail
=
false
;
getOrder
(
workId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改燃气任务"
;
}
);
this
.
getEnterpriseLists
();
}
,
/** 提交按钮 */
submitForm
()
{
...
...
@@ -454,6 +635,89 @@ export default {
}
,
showPicture
(
row
){
this
.
$refs
[
'a'
+
row
.
workId
].
showViewer
=
true
;
}
,
//指派单位
getEnterpriseLists
(){
enterpriseLists
().
then
(
response
=>
{
this
.
enterprises
=
response
.
rows
;
}
);
}
,
//获取巡检员
getInspectionUserList
(
enterpriseId
){
getInspectionUsers
(
enterpriseId
,
"se"
).
then
(
response
=>
{
this
.
inspectors
=
response
.
data
;
}
)
}
,
//选择指派单位
selectworkAssignEnterprose
(
enterpriseId
){
this
.
form
.
workAssignManId
=
""
;
this
.
workForm
.
workAssignManId
=
""
;
this
.
getInspectionUserList
(
enterpriseId
);
let
enterpriseName
=
this
.
enterprises
.
find
(
val
=>
val
.
enterpriseId
==
enterpriseId
).
enterpriseName
;
this
.
form
.
workAssignEnterproseName
=
enterpriseName
;
}
,
//获取指派人
selectInspection
(
userId
){
let
userName
=
this
.
inspectors
.
find
(
val
=>
val
.
userId
==
userId
).
userName
;
this
.
form
.
workAssignMan
=
userName
;
}
,
//选择任务类型
selectWorkType
(
workType
){
if
(
"2"
==
workType
){
this
.
inspectorInfoIsShow
=
true
;
}
else
{
this
.
inspectorInfoIsShow
=
false
;
}
}
,
//详情
workDetail
(
row
){
this
.
open
=
true
;
this
.
title
=
"燃气任务详情"
;
this
.
isDetail
=
true
;
this
.
form
=
row
;
this
.
getEnterpriseLists
();
}
,
//任务下发
workIssue
(
row
){
this
.
title
=
"任务下发"
;
this
.
workForm
=
row
;
this
.
workOpen
=
true
;
this
.
getEnterpriseLists
();
}
,
//接单
takingOrder
(
row
){
this
.
$confirm
(
'是否确认接单?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
/* this.exportLoading = true;
return exportOrder(queryParams);*/
}
).
then
(
response
=>
{
/* this.download(response.msg);
this.exportLoading = false;*/
}
).
catch
(()
=>
{
}
);
}
,
//反馈
feedbookWork
(
row
){
this
.
title
=
"反馈信息"
;
this
.
feedBookOpen
=
true
;
this
.
feedBookForm
=
row
;
this
.
getEnterpriseLists
();
}
,
//归档
sortWork
(
row
){
this
.
$confirm
(
'是否确认归档?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
/* this.exportLoading = true;
return exportOrder(queryParams);*/
}
).
then
(
response
=>
{
/* this.download(response.msg);
this.exportLoading = false;*/
}
).
catch
(()
=>
{
}
);
}
}
}
;
...
...
gassafetyprogress-web/src/views/system/user/index.vue
View file @
d2426e87
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
>
<!--部门数据-->
<el-col
:span=
"4"
:xs=
"24"
>
<!--
<el-col
:span=
"4"
:xs=
"24"
>
<div
class=
"head-container"
>
<el-input
v-model=
"deptName"
...
...
@@ -24,9 +24,9 @@
@
node-click=
"handleNodeClick"
/>
</div>
</el-col>
</el-col>
-->
<!--用户数据-->
<el-col
:span=
"2
0
"
:xs=
"24"
>
<el-col
:span=
"2
4
"
:xs=
"24"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"用户名称"
prop=
"userName"
>
<el-input
...
...
@@ -144,7 +144,7 @@
<el-table-column
label=
"用户编号"
align=
"center"
key=
"userId"
prop=
"userId"
v-if=
"columns[0].visible"
/>
<el-table-column
label=
"用户名称"
align=
"center"
key=
"userName"
prop=
"userName"
v-if=
"columns[1].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
key=
"nickName"
prop=
"nickName"
v-if=
"columns[2].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"
部门"
align=
"center"
key=
"deptName"
prop=
"dept.dept
Name"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"
所属单位"
align=
"center"
key=
"enterpriseName"
prop=
"enterprise
Name"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"手机号码"
align=
"center"
key=
"phonenumber"
prop=
"phonenumber"
v-if=
"columns[4].visible"
width=
"120"
/>
<el-table-column
label=
"状态"
align=
"center"
key=
"status"
v-if=
"columns[5].visible"
>
<template
slot-scope=
"scope"
>
...
...
@@ -214,8 +214,16 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"归属部门"
prop=
"deptId"
>
<treeselect
v-model=
"form.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
/>
<el-form-item
label=
"所属单位"
prop=
"deptId"
>
<!--<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />-->
<el-select
v-model=
"form.deptId"
placeholder=
"请选择"
@
change=
"selectWorkUnit($event)"
>
<el-option
v-for=
"item in enterprises"
:key=
"item.enterpriseId"
:label=
"item.enterpriseName"
:value=
"item.enterpriseId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -349,12 +357,15 @@ import { getToken } from "@/utils/auth";
import
{
treeselect
}
from
"@/api/system/dept"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
enterpriseLists
}
from
"@/api/regulation/info"
;
import
{
optionselect
}
from
"@/api/system/post"
;
export
default
{
name
:
"User"
,
components
:
{
Treeselect
},
data
()
{
return
{
zzz
:
''
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -389,8 +400,11 @@ export default {
sexOptions
:
[],
// 岗位选项
postOptions
:
[],
//企业选项
enterprises
:
[],
// 角色选项
roleOptions
:
[],
// 表单参数
form
:
{},
defaultProps
:
{
...
...
@@ -467,7 +481,9 @@ export default {
},
created
()
{
this
.
getList
();
this
.
getTreeselect
();
this
.
getPosts
();
//this.getTreeselect();
//this.getEnterpriseLists();
this
.
getDicts
(
"sys_normal_disable"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
});
...
...
@@ -563,9 +579,10 @@ export default {
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
getTreeselect
();
//this.getTreeselect();
this
.
getEnterpriseLists
();
getUser
().
then
(
response
=>
{
this
.
postOptions
=
response
.
posts
;
//
this.postOptions = response.posts;
this
.
roleOptions
=
response
.
roles
;
this
.
open
=
true
;
this
.
title
=
"添加用户"
;
...
...
@@ -575,11 +592,13 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
this
.
getTreeselect
();
//this.getTreeselect();
this
.
getEnterpriseLists
();
const
userId
=
row
.
userId
||
this
.
ids
;
getUser
(
userId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
postOptions
=
response
.
posts
;
this
.
getPosts
();
//this.postOptions = response.posts;
this
.
roleOptions
=
response
.
roles
;
this
.
form
.
postIds
=
response
.
postIds
;
this
.
form
.
roleIds
=
response
.
roleIds
;
...
...
@@ -587,6 +606,7 @@ export default {
this
.
title
=
"修改用户"
;
this
.
form
.
password
=
""
;
});
},
/** 重置密码按钮操作 */
handleResetPwd
(
row
)
{
...
...
@@ -674,7 +694,50 @@ export default {
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
//查询所属单位
getEnterpriseLists
(){
enterpriseLists
().
then
(
response
=>
{
this
.
enterprises
=
response
.
rows
;
this
.
enterprises
.
push
({
enterpriseId
:
-
2
,
enterpriseName
:
"政府部门"
,
isDel
:
null
})
});
},
//选取所属单位
selectWorkUnit
(
val
){
this
.
getPosts
();
},
//获取岗位
getPosts
(){
this
.
postOptions
=
[];
console
.
log
(
this
.
form
.
deptId
,
'dkdfsdfkfkfkfkfdkfdkfkfkdkdfk'
)
if
(
this
.
form
.
deptId
==
"-2"
){
this
.
postOptions
.
push
(
{
"searchValue"
:
null
,
"createBy"
:
"admin"
,
"createTime"
:
"2022-01-10 16:22:37"
,
"updateBy"
:
null
,
"updateTime"
:
null
,
"remark"
:
""
,
"params"
:
{},
"postId"
:
1
,
"postCode"
:
"zhengfu"
,
"postName"
:
"县级指挥"
,
"postSort"
:
"1"
,
"status"
:
"0"
,
"flag"
:
false
}
)
return
;
}
optionselect
().
then
(
response
=>
{
this
.
postOptions
=
response
.
data
;
})
}
}
};
</
script
>
\ No newline at end of file
</
script
>
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