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
543bfad3
Commit
543bfad3
authored
Jul 07, 2023
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 创建任务,关联项目选择优化
parent
feb12cdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
246 additions
and
16 deletions
+246
-16
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+9
-16
src/views/riskProject/add/projectList.vue
src/views/riskProject/add/projectList.vue
+237
-0
No files found.
src/views/riskProject/add/index.vue
View file @
543bfad3
...
...
@@ -51,10 +51,10 @@
:value=
"form.projectName"
label=
"关联项目"
placeholder=
"请选择"
@
click=
"show
Source
= true"
@
click=
"show = true"
:rules=
"[
{ required: true, message: '关联项目不能为空' }]"
/>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<
!--
<
van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
...
...
@@ -62,7 +62,7 @@
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
</van-popup>
-->
<van-field
required
...
...
@@ -167,7 +167,7 @@
</van-popup>
<van-popup
v-model=
"show"
position=
"bottom"
:style=
"
{ height: '100%' }">
<
!--
<selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople>
--
>
<
selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople
>
</van-popup>
<van-popup
...
...
@@ -268,7 +268,7 @@
<
script
>
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/riskProject/add/projectList
.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getUserInfo
,
...
...
@@ -276,19 +276,12 @@ import {
setLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export
default
{
name
:
"
risk-add
"
,
components
:
{
LHeader
,
selectPeople
,
selectDept
},
beforeRouteLeave
(
to
,
from
,
next
)
{
...
...
@@ -742,8 +735,8 @@ export default {
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userN
ame
;
this
.
form
.
projectId
=
e
.
id
;
this
.
form
.
projectName
=
e
.
n
ame
;
this
.
show
=
false
;
}
},
...
...
src/views/riskProject/add/projectList.vue
0 → 100644
View file @
543bfad3
<
template
>
<div>
<!-- 搜索 -->
<div
class=
"content-wrap"
>
<div
class=
"search-wrap"
>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
@
input=
"onInput"
/>
</div>
</div>
<div
style=
"margin-bottom: 1.4rem;"
>
<van-radio-group
v-model=
"radio"
>
<van-list
v-model=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getInsideUser()"
>
<van-radio
v-for=
"item in projectList"
:name=
"item.id"
:key=
"item.id"
@
click=
"selData(item)"
>
<van-cell
:title=
"item.name"
/>
</van-radio>
</van-list>
</van-radio-group>
</div>
<!-- 底部信息 -->
<footer
class=
"footer"
>
<van-cell-group>
<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
"
;
export
default
{
name
:
"
select-people
"
,
components
:
{
// LHeader
},
created
()
{
},
data
()
{
return
{
text
:
"
选择人员
"
,
personName
:
""
,
searchVal
:
""
,
radio
:
""
,
pageSize
:
20
,
pageNum
:
1
,
loading
:
false
,
finished
:
false
,
projectList
:[],
itemSel
:{
}
};
},
methods
:
{
// 查询内部人员
getInsideUser
()
{
var
obj
=
{
name
:
this
.
searchVal
,
pageSize
:
this
.
pageSize
,
pageNum
:
this
.
pageNum
,
}
getFun
(
"
risk/plan/project/list
"
,
obj
)
.
then
(
res
=>
{
this
.
projectList
.
push
(...
res
.
rows
)
this
.
loading
=
false
;
if
(
this
.
projectList
.
length
>=
res
.
total
)
{
this
.
finished
=
true
;
}
if
(
!
(
this
.
pageNum
*
this
.
pageSize
-
this
.
total
>=
0
)){
this
.
pageNum
++
;
}
})
},
// 待搜索框内容发生变化
onInput
:
debounce
(
function
()
{
this
.
projectList
=
[]
this
.
pageNum
=
1
this
.
finished
=
false
this
.
loading
=
true
this
.
getInsideUser
();
},
800
),
selData
(
e
){
this
.
itemSel
=
e
},
save
()
{
this
.
$emit
(
'
onSave
'
,
this
.
itemSel
)
},
cancel
()
{
this
.
$emit
(
'
onClose
'
)
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
// 搜索
.content-wrap {
padding: 10px;
background-color: #f0f1f5;
}
.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;
display: flex;
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;
}
}
.footer {
width: 100%;
height: 1.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
>
\ No newline at end of file
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