Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-app
Commits
3ff9cfa6
Commit
3ff9cfa6
authored
Jul 07, 2023
by
yf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改详情页,增加选择组织组件
parent
0c0c17b9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1037 additions
and
640 deletions
+1037
-640
src/components/selectDept/index.vue
src/components/selectDept/index.vue
+308
-0
src/components/selectPerson/index.vue
src/components/selectPerson/index.vue
+0
-0
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+692
-614
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+27
-16
vue.config.js
vue.config.js
+10
-10
No files found.
src/components/selectDept/index.vue
0 → 100644
View file @
3ff9cfa6
<
template
>
<div
style=
"width:100%"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 搜索 -->
<div
class=
"content-wrap"
>
<!--
<div
class=
"search-wrap"
>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
/>
</div>
-->
<div
class=
"upStep"
v-show=
"showPre"
>
<van-cell-group>
<div
class=
"upStep-content"
>
{{
deptName
}}
</div>
<div
class=
"upStep-btn"
><span
@
click=
"goBack"
>
返回上级
</span></div>
</van-cell-group>
</div>
<!-- 部门列表 -->
<div
class=
"dept-list-wrap"
>
<van-cell-group>
<van-radio-group
v-model=
"result"
@
change=
"changeRadio"
>
<van-cell
style=
"display:flex"
v-for=
"item in deptList"
clickable
:key=
"item.deptId"
>
<van-radio
:name=
"item.deptId"
@
click=
"selectDept(item)"
>
<span>
{{
item
.
deptName
}}
</span>
</van-radio>
<template
#right-icon
>
<van-icon
name=
"arrow"
class=
"arrow-icon"
@
click=
"nextDept(item)"
/>
</
template
>
</van-cell>
</van-radio-group>
</van-cell-group>
</div>
</div>
<!-- 底部信息 -->
<footer
class=
"footer"
>
<van-cell-group>
<div
class=
"selected"
>
<span
class=
"selected-title"
>
已选择 ({{ result ? 1 : 0 }}) :
</span>
<label>
{{ resultName }}
</label>
</div>
<!-- <div class="operate">
<van-button
size="small"
ttype="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5;"
@click.native="cancel"
>取消
</van-button>
<van-button
size="small"
type="info"
native-type="button"
style="margin:0 10px 0 20px;border-radius: 5px;"
@click.native="save"
>保存
</van-button>
</div> -->
</van-cell-group>
</footer>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table
"
;
import
{
getUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
debounce
}
from
"
@/utils/common.js
"
;
import
{
Toast
}
from
"
vant
"
;
export
default
{
name
:
"
select-people
"
,
components
:
{
LHeader
},
created
()
{
this
.
getInsideUser
(
getUserInfo
().
secondaryUnit
);
},
data
()
{
return
{
text
:
"
选择组织
"
,
personName
:
""
,
deptId
:
0
,
// 部门id
storageList
:
[],
// 存储上级部门
deptName
:
""
,
showPre
:
false
,
result
:
""
,
resultName
:
""
,
dutyList
:
[],
searchVal
:
""
,
deptList
:
[],
// 部门
allDeptList
:
[],
// 部门
isFirstSearch
:
true
};
},
methods
:
{
changeRadio
()
{
this
.
resultName
=
this
.
allDeptList
.
find
(
item
=>
item
.
deptId
==
this
.
result
).
deptName
;
},
// 查询内部人员
getInsideUser
(
id
,
val
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
"
/risk/plan/dept/list
"
).
then
(
res
=>
{
this
.
allDeptList
=
res
.
data
;
this
.
deptList
=
this
.
allDeptList
.
filter
(
item
=>
item
.
parentId
==
0
);
console
.
log
(
res
.
data
);
});
},
// // 待搜索框内容发生变化
// onInput: debounce(function() {
// if (this.isFirstSearch) {
// this.getInsideUser(getUserInfo().secondaryUnit, this.searchVal);
// } else {
// this.getInsideUser(this.deptId, this.searchVal);
// }
// }, 500),
nextDept
(
data
)
{
var
depts
=
this
.
allDeptList
.
filter
(
item
=>
item
.
parentId
==
data
.
deptId
);
if
(
!
depts
||
depts
.
length
<=
0
)
{
Toast
({
message
:
"
组织下暂无数据
"
,
position
:
"
top
"
});
return
;
}
this
.
deptList
=
depts
;
if
(
data
.
deptId
!=
0
)
this
.
showPre
=
true
;
else
this
.
showPre
=
false
;
this
.
deptName
=
data
.
deptName
;
this
.
deptId
=
data
.
deptId
;
console
.
log
(
this
.
deptList
);
// this.deptId = data.deptId;
// this.searchVal = "";
// this.deptName = data.deptName;
// this.isFirstSearch = false; // 如果点击过部门,则不必再用死deptId了
// this.storageList.push({ deptId: data.parentId, deptName: data.deptName });
// this.getInsideUser(this.deptId);
},
goBack
()
{
var
parentId
=
this
.
allDeptList
.
find
(
item
=>
item
.
deptId
==
this
.
deptId
)
.
parentId
;
console
.
log
(
parentId
);
if
(
parentId
!=
0
)
{
this
.
showPre
=
true
;
var
dept
=
this
.
allDeptList
.
find
(
item
=>
item
.
deptId
==
parentId
);
this
.
nextDept
(
dept
);
}
else
{
this
.
deptList
=
this
.
allDeptList
.
filter
(
item
=>
item
.
parentId
==
0
);
this
.
showPre
=
false
;
}
},
selectDept
(
data
)
{
// 先把数组清空 然后再放
this
.
dutyList
=
[];
this
.
dutyList
.
push
({
userId
:
data
.
userId
,
userName
:
data
.
userName
});
},
save
()
{
// 把数据存到 session 的内部人员数组中
// 先取出session中的值
let
obj
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
personObj
"
));
obj
.
user
=
this
.
dutyList
;
// 再次存到session中
sessionStorage
.
setItem
(
"
personObj
"
,
JSON
.
stringify
(
obj
));
// 可以见一个公共的字段 存储以后需要的人的信息
history
.
go
(
-
1
);
},
cancel
()
{
this
.
$router
.
go
(
-
1
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
// 搜索
.content-wrap {
padding-bottom: 2.666667rem;
background-color: #f0f1f5;
width: 100%;
}
.search-wrap {
margin: 0.26667rem;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
text-align: center;
span {
width: 1.866667rem;
background-color: #1989fa;
text-align: center;
display: inline-block;
color: white;
height: 0.8rem;
line-height: 0.8rem;
font-size: 0.346667rem;
border-radius: 0.08rem;
}
}
.upStep-content {
width: 75%;
height: 0.8rem;
line-height: 0.8rem;
padding-left: 0.42667rem;
box-sizing: border-box;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.dept-list-wrap {
margin-top: 0.266667rem;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
display: flex;
align-items: center;
}
.dept-name {
margin-left: 10px;
font-size: 12px;
color: #a3a4a6;
margin-top: 1px;
}
}
.footer {
width: 100%;
height: 2.4rem;
z-index: 9;
position: fixed;
bottom: 0px;
box-shadow: 0px 8px 15px #000;
.van-cell-group {
height: 100%;
.selected {
height: 1.066667rem;
display: flex;
align-items: center;
padding-left: 10px;
border-bottom: 1px solid #cacbcb;
.selected-title {
color: #4187f7;
}
.selected-content {
width: 80%;
padding-left: 10px;
box-sizing: border-box;
}
}
.operate {
height: 1.333333rem;
display: flex;
justify-content: flex-end;
align-items: center;
.van-button {
width: 1.6rem;
}
}
}
}
</
style
>
src/components/selectPerson/index.vue
0 → 100644
View file @
3ff9cfa6
src/views/riskProject/add/index.vue
View file @
3ff9cfa6
...
@@ -7,8 +7,14 @@
...
@@ -7,8 +7,14 @@
:show-error=
"false"
:show-error=
"false"
validate-trigger=
"onSubmit"
validate-trigger=
"onSubmit"
>
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
服务项目信息
服务项目信息
</div>
</div>
<van-field
<van-field
...
@@ -67,21 +73,48 @@
...
@@ -67,21 +73,48 @@
@
click=
"getRiskList()"
@
click=
"getRiskList()"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
/>
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
任务组织与分配
任务组织与分配
</div>
</div>
<van-field
required
clickable
name=
"deptId"
:value=
"form.deptId"
label=
"评估小组选择"
placeholder=
"请选择"
@
click=
"selectDept()"
:rules=
"[
{ required: true, message: '评估小组不能为空' }]"
/>
<van-field
<van-field
required
required
clickable
clickable
name=
"leaderUserName"
name=
"leaderUserName"
:value=
"form.leaderUserName"
:value=
"form.leaderUserName"
label=
"项目负责人
"
label=
"评估小组组长
"
placeholder=
"请选择"
placeholder=
"请选择"
@
click=
"getLeaderUserList('leaderUser')"
@
click=
"getLeaderUserList('leaderUser')"
:rules=
"[
{ required: true, message: '项目负责人
不能为空' }]"
:rules=
"[
{ required: true, message: '评估小组组长
不能为空' }]"
/>
/>
<van-field
clickable
required
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"评估小组成员"
placeholder=
"请选择"
@
click=
"getExecuteUser()"
:rules=
"[
{ required: true, message: '评估小组成员不能为空' }]"
/>
<van-field
<van-field
:value=
"form.startTime"
:value=
"form.startTime"
...
@@ -104,16 +137,6 @@
...
@@ -104,16 +137,6 @@
:rules=
"[
{ required: true, message: '任务结束时间不能为空' }]"
:rules=
"[
{ required: true, message: '任务结束时间不能为空' }]"
/>
/>
<van-field
clickable
required
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"执行人员"
placeholder=
"请选择"
@
click=
"getExecuteUser()"
:rules=
"[
{ required: true, message: '执行人员不能为空' }]"
/>
<!--
<van-popup
v-model=
"showControl"
position=
"bottom"
>
<!--
<van-popup
v-model=
"showControl"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
...
@@ -123,7 +146,7 @@
...
@@ -123,7 +146,7 @@
/>
/>
</van-popup>
-->
</van-popup>
-->
<van-field
<!--
<van-field
required
required
clickable
clickable
name=
"approveUserName"
name=
"approveUserName"
...
@@ -132,7 +155,7 @@
...
@@ -132,7 +155,7 @@
placeholder=
"请选择"
placeholder=
"请选择"
@
click=
"getLeaderUserList('approveUser')"
@
click=
"getLeaderUserList('approveUser')"
:rules=
"[
{ required: true, message: '事审批负责人不能为空' }]"
:rules=
"[
{ required: true, message: '事审批负责人不能为空' }]"
/>
/>
-->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
...
@@ -147,13 +170,34 @@
...
@@ -147,13 +170,34 @@
<!--
<selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople>
-->
<!--
<selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople>
-->
</van-popup>
</van-popup>
<van-popup
v-model=
"riskModel"
position=
"bottom"
:style=
"
{ height: '100%' }">
<van-popup
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
v-model=
"riskModel"
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"riskModel = false"
>
取消
</button
position=
"bottom"
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"onRiskList(riskList)"
>
确认
</button>
:style=
"
{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"riskModel = false"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"onRiskList(riskList)"
>
确认
</button>
</div>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<div
style=
"display:flex;margin-top: 44px;"
>
<van-checkbox-group
v-model=
"riskList"
style=
"width: 100%;font-size: 18px;"
>
<van-checkbox-group
v-model=
"riskList"
style=
"width: 100%;font-size: 18px;"
>
<van-checkbox
<van-checkbox
shape=
"square"
shape=
"square"
style=
"margin: 10px 0px;justify-content: center;"
style=
"margin: 10px 0px;justify-content: center;"
...
@@ -165,6 +209,36 @@
...
@@ -165,6 +209,36 @@
</van-checkbox-group>
</van-checkbox-group>
</div>
</div>
</van-popup>
</van-popup>
<!-- 选择项目小组 -->
<van-popup
v-model=
"projectDept"
position=
"bottom"
:style=
"
{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"projectDept = false"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"colseDept(riskList)"
>
确认
</button>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<selectDept></selectDept>
</div>
</van-popup>
<!-- 选择时间弹出层 -->
<!-- 选择时间弹出层 -->
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
...
@@ -192,9 +266,14 @@
...
@@ -192,9 +266,14 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getUserInfo
,
getLocalUserInfo
,
setLocalUserInfo
}
from
'
@/utils/userInfo
'
import
{
getUserInfo
,
getLocalUserInfo
,
setLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// import {
// getFormList,
// getFormList,
...
@@ -209,10 +288,10 @@ export default {
...
@@ -209,10 +288,10 @@ export default {
name
:
"
risk-add
"
,
name
:
"
risk-add
"
,
components
:
{
components
:
{
LHeader
,
LHeader
,
selectDept
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
}
next
();
next
();
},
},
...
@@ -221,8 +300,8 @@ export default {
...
@@ -221,8 +300,8 @@ export default {
taskId
:
""
,
taskId
:
""
,
text
:
"
创建任务
"
,
text
:
"
创建任务
"
,
id
:
""
,
id
:
""
,
form
:
{
form
:
{
name
:
''
name
:
""
},
},
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
...
@@ -231,8 +310,9 @@ export default {
...
@@ -231,8 +310,9 @@ export default {
timeName
:
""
,
//
timeName
:
""
,
//
userPrefix
:
""
,
//
userPrefix
:
""
,
//
showProjectName
:
false
,
showProjectName
:
false
,
projectDept
:
false
,
riskModel
:
false
,
riskModel
:
false
,
filedName
:
''
,
filedName
:
""
,
currentDate
:
new
Date
(),
currentDate
:
new
Date
(),
minDate
:
new
Date
(),
minDate
:
new
Date
(),
showTime
:
false
,
showTime
:
false
,
...
@@ -272,25 +352,28 @@ export default {
...
@@ -272,25 +352,28 @@ export default {
urgent
:
""
,
//应急措施文字
urgent
:
""
,
//应急措施文字
urgentImg
:
[],
//应急措施图片
urgentImg
:
[],
//应急措施图片
returnCause
:
""
,
// 退回原因
returnCause
:
""
,
// 退回原因
isShowreturnCause
:
false
,
isShowreturnCause
:
false
};
};
},
},
created
()
{
created
()
{
var
userInfo
=
getUserInfo
()
var
userInfo
=
getUserInfo
();
this
.
form
.
userId
=
userInfo
.
userId
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
nickName
this
.
form
.
userName
=
userInfo
.
nickName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptId
=
userInfo
.
dept
.
deptId
this
.
form
.
deptId
=
userInfo
.
dept
.
deptId
;
getFun
(
`/risk/plan/project/list`
).
then
((
res
)
=>
{
getFun
(
`/risk/plan/project/list`
).
then
(
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
});
);
// this.getList();
// this.getList();
},
},
methods
:
{
methods
:
{
// 确定时间的方法
// 确定时间的方法
onConTime
(
date
)
{
onConTime
(
date
)
{
console
.
log
(
'
%c [ date ]-293
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
date
)
console
.
log
(
"
%c [ date ]-293
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
date
);
let
time
=
timestampToTime
(
date
,
"
DT1
"
,
true
);
let
time
=
timestampToTime
(
date
,
"
DT1
"
,
true
);
this
.
form
[
this
.
timeName
]
=
time
;
this
.
form
[
this
.
timeName
]
=
time
;
this
.
showTime
=
false
;
this
.
showTime
=
false
;
...
@@ -298,23 +381,23 @@ export default {
...
@@ -298,23 +381,23 @@ export default {
// 计划开始时间
// 计划开始时间
selectBeginTime
(
val
)
{
selectBeginTime
(
val
)
{
this
.
showTime
=
true
;
this
.
showTime
=
true
;
this
.
timeName
=
val
this
.
timeName
=
val
;
this
.
currentDate
=
new
Date
();
this
.
currentDate
=
new
Date
();
},
},
getLeaderUserList
(
e
)
{
getLeaderUserList
(
e
)
{
if
(
!
this
.
form
.
projectId
)
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
请选择关联项目!
"
,
message
:
"
请选择关联项目!
"
});
});
return
false
return
false
;
}
}
this
.
userPrefix
=
e
this
.
userPrefix
=
e
;
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -322,41 +405,54 @@ export default {
...
@@ -322,41 +405,54 @@ export default {
// 对数据进行赋值
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
showTrouble
=
true
;
this
.
showTrouble
=
true
;
}
else
{
}
else
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
}
}
});
});
},
},
onRiskList
(
value
)
{
onRiskList
(
value
)
{
console
.
log
(
'
%c [ value ]-331
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
console
.
log
(
if
(
this
.
filedName
==
'
nickName
'
){
"
%c [ value ]-331
"
,
this
.
form
.
workUserIds
=
this
.
filterField
(
"
userId
"
,
value
).
join
()
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
this
.
form
.
workUserNames
=
this
.
filterField
(
"
nickName
"
,
value
).
join
()
value
console
.
log
(
'
%c [ this.form.workUserNames ]-334
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
this
.
form
.
workUserNames
)
);
}
else
{
if
(
this
.
filedName
==
"
nickName
"
)
{
this
.
form
.
buildingIds
=
this
.
filterField
(
"
id
"
,
value
).
join
()
this
.
form
.
workUserIds
=
this
.
filterField
(
"
userId
"
,
value
).
join
();
this
.
form
.
buildingNames
=
this
.
filterField
(
"
name
"
,
value
).
join
()
this
.
form
.
workUserNames
=
this
.
filterField
(
"
nickName
"
,
value
).
join
();
console
.
log
(
"
%c [ this.form.workUserNames ]-334
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
this
.
form
.
workUserNames
);
}
else
{
this
.
form
.
buildingIds
=
this
.
filterField
(
"
id
"
,
value
).
join
();
this
.
form
.
buildingNames
=
this
.
filterField
(
"
name
"
,
value
).
join
();
}
}
this
.
riskList
=
[]
this
.
riskList
=
[];
this
.
riskModel
=
false
;
this
.
riskModel
=
false
;
// this.form[this.fieldName] = value.join();
// this.form[this.fieldName] = value.join();
},
},
selectDept
()
{
this
.
projectDept
=
true
;
},
colseDept
()
{
this
.
projectDept
=
false
;
},
getExecuteUser
()
{
getExecuteUser
()
{
if
(
!
this
.
form
.
projectId
)
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
请选择关联项目!
"
,
message
:
"
请选择关联项目!
"
});
});
return
false
return
false
;
}
}
this
.
filedName
=
'
nickName
'
this
.
filedName
=
"
nickName
"
;
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -364,26 +460,25 @@ export default {
...
@@ -364,26 +460,25 @@ export default {
// 对数据进行赋值
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
riskModel
=
true
;
this
.
riskModel
=
true
;
}
else
{
}
else
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
}
}
});
});
},
},
getRiskList
()
{
getRiskList
()
{
if
(
!
this
.
form
.
projectId
)
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
请选择关联项目!
"
,
message
:
"
请选择关联项目!
"
});
});
return
false
return
false
;
}
}
this
.
filedName
=
'
name
'
this
.
filedName
=
"
name
"
;
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
getFun
(
`/risk/plan/building/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
getFun
(
`/risk/plan/building/list/
${
this
.
form
.
projectId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -391,18 +486,17 @@ export default {
...
@@ -391,18 +486,17 @@ export default {
// 对数据进行赋值
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
riskModel
=
true
;
this
.
riskModel
=
true
;
}
else
{
}
else
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
}
}
});
});
},
},
filterField
(
value
,
arr
)
{
filterField
(
value
,
arr
)
{
var
arrs
=
[]
var
arrs
=
[];
arr
.
forEach
(
item
=>
{
arr
.
forEach
(
item
=>
{
arrs
.
push
(
item
[
value
])
arrs
.
push
(
item
[
value
]);
})
});
return
arrs
return
arrs
;
},
},
async
deleteFile
(
val
,
detail
,
key
)
{
async
deleteFile
(
val
,
detail
,
key
)
{
// console.log(val,detail)
// console.log(val,detail)
...
@@ -414,7 +508,7 @@ export default {
...
@@ -414,7 +508,7 @@ export default {
console
.
log
(
res
);
console
.
log
(
res
);
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
删除成功!
"
,
message
:
"
删除成功!
"
});
});
}
else
{
}
else
{
console
.
log
(
"
删除失败
"
);
console
.
log
(
"
删除失败
"
);
...
@@ -427,15 +521,15 @@ export default {
...
@@ -427,15 +521,15 @@ export default {
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
let
url
=
"
/risk/plan
"
;
let
url
=
"
/risk/plan
"
;
postFun
(
url
,
this
.
form
)
postFun
(
url
,
this
.
form
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
message
:
"
提交成功
"
,
duration
:
2000
,
duration
:
2000
});
});
history
.
go
(
-
1
);
history
.
go
(
-
1
);
})
})
...
@@ -452,10 +546,10 @@ export default {
...
@@ -452,10 +546,10 @@ export default {
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
getFormList
(
"
/riskMain/add
"
)
getFormList
(
"
/riskMain/add
"
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
columnsProjectName
=
res
.
data
.
projectInformations
;
this
.
columnsProjectName
=
res
.
data
.
projectInformations
;
this
.
columnsFactor
=
res
.
data
.
riskInventories
;
this
.
columnsFactor
=
res
.
data
.
riskInventories
;
...
@@ -473,73 +567,57 @@ export default {
...
@@ -473,73 +567,57 @@ export default {
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
// 定级方式
// 定级方式
this
.
urgentImg
=
(
res
.
data
.
imgsysFiles2
||
[]).
map
(
this
.
urgentImg
=
(
res
.
data
.
imgsysFiles2
||
[]).
map
(
item
=>
{
(
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
,
file
:
new
File
([],
item
[
"
fileName
"
],
{}),
file
:
new
File
([],
item
[
"
fileName
"
],
{})
};
};
}
});
);
this
.
administrationImg
=
(
res
.
data
.
imgsysFiles1
||
[]).
map
(
item
=>
{
this
.
administrationImg
=
(
res
.
data
.
imgsysFiles1
||
[]).
map
(
(
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
,
file
:
new
File
([],
item
[
"
fileName
"
],
{}),
file
:
new
File
([],
item
[
"
fileName
"
],
{})
};
};
}
});
);
this
.
technologyImg
=
(
res
.
data
.
imgsysFiles0
||
[]).
map
(
item
=>
{
this
.
technologyImg
=
(
res
.
data
.
imgsysFiles0
||
[]).
map
(
(
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
,
file
:
new
File
([],
item
[
"
fileName
"
],
{}),
file
:
new
File
([],
item
[
"
fileName
"
],
{})
};
};
}
});
);
this
.
setRankModeImg
=
(
res
.
data
.
imgsysFiles3
||
[]).
map
(
item
=>
{
this
.
setRankModeImg
=
(
res
.
data
.
imgsysFiles3
||
[]).
map
(
(
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
,
file
:
new
File
([],
item
[
"
fileName
"
],
{}),
file
:
new
File
([],
item
[
"
fileName
"
],
{})
};
};
}
});
);
// 请求人员列表
// 请求人员列表
let
formdata
=
new
FormData
();
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
data
.
responsibilityDept
);
formdata
.
append
(
"
organizationId
"
,
data
.
responsibilityDept
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
(
res
)
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
mainDutyPeopLe
=
this
.
mainDutyPeopLe
=
this
.
columnsMainDutyPeopLe
.
filter
(
item
=>
{
this
.
columnsMainDutyPeopLe
.
filter
((
item
)
=>
{
return
item
[
"
userId
"
]
==
data
.
responsibilityMember
;
return
(
item
[
"
userId
"
]
==
data
.
responsibilityMember
);
})[
0
][
"
userName
"
];
})[
0
][
"
userName
"
];
}
});
);
// console.log(data)
// console.log(data)
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
returnCause
=
res
.
data
.
reason
;
this
.
returnCause
=
res
.
data
.
reason
;
//请求风险源
//请求风险源
postHdSource
(
`/risk/plan/project/list`
).
then
(
postHdSource
(
`/risk/plan/project/list`
).
then
(
res
=>
{
(
res
)
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
});
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
@@ -568,7 +646,7 @@ export default {
...
@@ -568,7 +646,7 @@ export default {
this
.
trouble
=
""
;
this
.
trouble
=
""
;
// 请求风险源
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
(
res
)
=>
{
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
}
);
);
...
@@ -591,7 +669,7 @@ export default {
...
@@ -591,7 +669,7 @@ export default {
}
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
userId
;
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
userId
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
nickName
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
nickName
;
console
.
log
(
'
this.form :>>
'
,
this
.
form
);
console
.
log
(
"
this.form :>>
"
,
this
.
form
);
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
},
},
// 风险定级
// 风险定级
...
@@ -602,7 +680,7 @@ export default {
...
@@ -602,7 +680,7 @@ export default {
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
matrix-grad
"
,
name
:
"
matrix-grad
"
});
});
}
}
},
},
...
@@ -634,7 +712,7 @@ export default {
...
@@ -634,7 +712,7 @@ export default {
// 请求主责人员
// 请求主责人员
let
formdata
=
new
FormData
();
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
((
res
)
=>
{
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
});
},
},
...
@@ -651,17 +729,17 @@ export default {
...
@@ -651,17 +729,17 @@ export default {
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
this
.
peopleName
=
val
;
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onClose
()
{
onClose
()
{
this
.
show
=
false
;
this
.
show
=
false
;
},
},
onSave
(
e
)
{
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
this
.
show
=
false
;
},
}
},
},
watch
:
{
watch
:
{
setRank
(
newVal
,
oldVal
)
{
setRank
(
newVal
,
oldVal
)
{
...
@@ -670,8 +748,8 @@ export default {
...
@@ -670,8 +748,8 @@ export default {
}
else
{
}
else
{
this
.
showSetRankMode
=
false
;
this
.
showSetRankMode
=
false
;
}
}
},
}
},
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/riskProject/add/taskList.vue
View file @
3ff9cfa6
...
@@ -34,15 +34,15 @@
...
@@ -34,15 +34,15 @@
</van-grid-item>
</van-grid-item>
</van-grid>
</van-grid>
<van-steps
<van-steps
:active=
"
activ
e"
:active=
"
phas
e"
active-icon=
"success"
active-icon=
"success"
active-color=
"#38f"
active-color=
"#38f"
style=
"margin: 0.26rem 0;"
style=
"margin: 0.26rem 0;"
>
>
<van-step>
任务发起
</van-step>
<van-step
name=
"1"
>
任务发起
</van-step>
<van-step>
风险评估
</van-step>
<van-step
name=
"2"
>
风险评估
</van-step>
<van-step>
评估审核
</van-step>
<van-step
name=
"3"
>
评估审核
</van-step>
<van-step>
项目完成
</van-step>
<van-step
name=
"4"
>
项目完成
</van-step>
</van-steps>
</van-steps>
<van-tabs
<van-tabs
v-model=
"active"
v-model=
"active"
...
@@ -100,13 +100,31 @@
...
@@ -100,13 +100,31 @@
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
/>
/>
<van-field
readonly
name=
"deptId"
:value=
"form.deptId"
label=
"评估小组选择"
input-align=
"right"
:rules=
"[
{ required: true, message: '评估小组不能为空' }]"
/>
<van-field
<van-field
readonly
readonly
name=
"leaderUserName"
name=
"leaderUserName"
:value=
"form.leaderUserName"
:value=
"form.leaderUserName"
label=
"
项目负责人
"
label=
"
评估小组组长
"
input-align=
"right"
input-align=
"right"
:rules=
"[
{ required: true, message: '事故类型不能为空' }]"
:rules=
"[
{ required: true, message: '评估小组组长不能为空' }]"
/>
<van-field
clickable
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"评估成员"
input-align=
"right"
:rules=
"[
{ required: true, message: '评估成员不能为空' }]"
/>
/>
<van-field
<van-field
...
@@ -136,15 +154,6 @@
...
@@ -136,15 +154,6 @@
input-align="right"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
/>
<van-field
clickable
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"执行人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
</van-form>
</van-tab>
</van-tab>
<van-tab
title=
"风险清单"
>
</van-tab>
<van-tab
title=
"风险清单"
>
</van-tab>
...
@@ -283,6 +292,7 @@ export default {
...
@@ -283,6 +292,7 @@ export default {
Loop
:
""
,
// 定时器
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
active
:
0
,
phase
:
1
,
form
:
{},
form
:
{},
tabs
:
[]
tabs
:
[]
};
};
...
@@ -329,6 +339,7 @@ export default {
...
@@ -329,6 +339,7 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
this
.
messageList
=
res
.
data
||
res
.
rows
;
console
.
log
(
this
.
messageList
);
this
.
form
=
this
.
messageList
.
detailsDto
;
this
.
form
=
this
.
messageList
.
detailsDto
;
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
;
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
;
})
})
...
...
vue.config.js
View file @
3ff9cfa6
...
@@ -3,7 +3,7 @@ module.exports = {
...
@@ -3,7 +3,7 @@ module.exports = {
devServer
:
{
devServer
:
{
open
:
true
,
open
:
true
,
host
:
'
localhost
'
,
host
:
'
localhost
'
,
port
:
808
0
,
port
:
808
1
,
https
:
false
,
https
:
false
,
//以上的ip和端口是我们本机的;下面为需要跨域的
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy
:
{
//配置跨域
proxy
:
{
//配置跨域
...
@@ -11,7 +11,7 @@ module.exports = {
...
@@ -11,7 +11,7 @@ module.exports = {
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
target
:
'
http://
192.168.10.36
:8080/
'
,
//这里是后台的地址
target
:
'
http://
localhost
:8080/
'
,
//这里是后台的地址
ws
:
true
,
ws
:
true
,
changOrigin
:
true
,
//允许跨域
changOrigin
:
true
,
//允许跨域
// logLevel: 'debug', // 显示代理调试信息
// logLevel: 'debug', // 显示代理调试信息
...
...
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