Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project
Project
Details
Activity
Releases
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
中汽测评-信息安全测评系统
web
Commits
0a109fa5
Commit
0a109fa5
authored
Mar 07, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: bug(70429前端、70425)
parent
7974c929
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
46 deletions
+86
-46
index.vue
src/views/task/new/index.vue
+60
-31
index.vue
src/views/task/task-detail/index.vue
+26
-15
No files found.
src/views/task/new/index.vue
View file @
0a109fa5
...
...
@@ -169,7 +169,12 @@
<el-table-column
label=
"姓名"
align=
"left"
prop=
"nickName"
>
<template
slot-scope=
"
{ row }">
<span
v-if=
"row.userId !== ''"
>
{{
row
.
nickName
}}
</span>
<el-select
v-else
v-model=
"userId"
placeholder=
"请选择"
>
<el-select
v-else
v-model=
"userId"
placeholder=
"请选择"
@
change=
"handleNameChange"
>
<el-option
v-for=
"(item, index) in userList"
:key=
"index"
...
...
@@ -213,13 +218,14 @@
>
<
template
slot-scope=
"scope"
>
<div
class=
"actions-container"
>
<page-button
v-show=
"scope.row.userId === ''"
icon=
"hard-disk-one"
title=
"保存"
class=
"button-item"
@
click
.
native=
"handleSavePeople(scope.row)"
></page-button>
<span
v-show=
"scope.row.userId === ''"
>
-
</span>
<!--
<page-button-->
<!-- v-show="scope.row.userId === ''"-->
<!-- icon="hard-disk-one"-->
<!-- title="保存"-->
<!-- class="button-item"-->
<!-- @click.native="handleSavePeople(scope.row)"-->
<!-- >
</page-button>
-->
<page-button
v-show=
"scope.row.userId !== ''"
icon=
"edit"
...
...
@@ -235,13 +241,13 @@
class=
"button-item"
@
click
.
native=
"handleDelete(scope.row)"
></page-button>
<
page-button
v-show=
"scope.row.userId === ''"
icon=
"delete"
title=
"取消"
class=
"button-item"
@
click
.
native=
"handleCancelPeople()"
></page-button
>
<
!--
<page-button-->
<!-- v-show="scope.row.userId === ''"-->
<!-- icon="delete"-->
<!-- title="取消"-->
<!-- class="button-item"-->
<!-- @click.native="handleCancelPeople()"-->
<!-- >
</page-button>
--
>
</div>
</
template
>
</el-table-column>
...
...
@@ -575,11 +581,12 @@ export default {
this
.
$refs
.
form
.
validateField
(
'inspectionItemList'
)
}
console
.
log
(
'model.inspectionItemList'
,
newValue
)
if
(
newValue
.
includes
(
2
))
{
if
(
newValue
.
includes
(
'trfis'
))
{
this
.
rules
.
testScenarioList
[
0
].
required
=
true
}
else
{
this
.
rules
.
testScenarioList
[
0
].
required
=
false
}
this
.
rules
.
inspectionItemList
[
0
].
required
=
true
if
(
newValue
.
length
===
1
&&
newValue
.
includes
(
'trfis'
))
{
this
.
testScenarioShow
=
true
}
else
{
...
...
@@ -957,27 +964,49 @@ export default {
})
})
},
/**
* 保存人员
* @param row
*/
handleSavePeople
(
row
)
{
const
obj
=
this
.
userList
.
find
(
item
=>
item
.
userId
===
this
.
userId
)
const
currentData
=
this
.
tableData
.
find
(
item
=>
item
.
userId
===
row
.
userId
)
currentData
.
userId
=
this
.
userId
currentData
.
nickName
=
obj
.
nickName
currentData
.
dept
=
obj
.
dept
handleNameChange
(
value
)
{
console
.
log
(
'value'
,
value
)
this
.
userId
=
value
const
selectData
=
this
.
userList
.
find
(
item
=>
item
.
userId
===
value
)
this
.
tableData
.
forEach
(
data
=>
{
if
(
data
.
userId
===
''
)
{
data
.
nickName
=
selectData
.
nickName
data
.
userId
=
selectData
.
userId
data
.
dept
=
selectData
.
dept
}
})
// 已被选择的人做禁用
this
.
userList
.
find
(
item
=>
item
.
userId
===
this
.
userId
).
disabled
=
true
this
.
userId
=
''
this
.
leaderTop
()
if
(
this
.
tableData
.
length
===
1
)
{
currentData
.
isLeader
=
1
this
.
tableData
[
0
]
.
isLeader
=
1
}
else
{
currentData
.
isLeader
=
0
this
.
tableData
[
this
.
tableData
.
length
-
1
]
.
isLeader
=
0
}
},
/**
* 保存人员
* @param row
*/
handleSavePeople
(
row
)
{
console
.
log
(
'保存小组有'
,
row
)
// const obj = this.userList.find(item => item.userId === this.userId)
// const currentData = this.tableData.find(
// item => item.userId === row.userId
// )
// currentData.userId = this.userId
// currentData.nickName = obj.nickName
// currentData.dept = obj.dept
// // 已被选择的人做禁用
// this.userList.find(item => item.userId === this.userId).disabled = true
// this.userId = ''
// this.leaderTop()
// if (this.tableData.length === 1) {
// currentData.isLeader = 1
// } else {
// currentData.isLeader = 0
// }
console
.
log
(
'现在的对象'
,
this
.
tableData
)
},
/**
...
...
@@ -1231,7 +1260,7 @@ export default {
}
}
.check-test-scenario
{
width
:
2
37
px
;
width
:
2
28
px
;
height
:
32px
;
border
:
1px
solid
#1a6fd7
;
background-color
:
#e3eefc
;
...
...
src/views/task/task-detail/index.vue
View file @
0a109fa5
...
...
@@ -56,10 +56,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row
v-show=
"model.inspectionItemList.includes('trfis')"
:gutter=
"20"
>
<el-row
v-show=
"testScenarioShow"
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"请选择测试场景(可多选)"
...
...
@@ -495,7 +492,8 @@ export default {
}
],
// 任务详情
taskDetail
:
{}
taskDetail
:
{},
testScenarioShow
:
false
}
},
watch
:
{
...
...
@@ -584,16 +582,29 @@ export default {
this
.
tableData
=
this
.
taskDetail
.
auditors
// 整车样品信息
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
0
})
if
(
this
.
carInfoArr
.
length
>
0
)
{
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
0
})
}
// 零件样品信息
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
1
})
if
(
this
.
partInfoArr
.
length
>
0
)
{
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
1
})
}
if
(
this
.
taskDetail
.
taskList
.
split
(
','
).
length
===
1
&&
this
.
taskDetail
.
taskList
.
split
(
','
).
includes
(
'trfis'
)
)
{
this
.
testScenarioShow
=
true
}
else
{
this
.
testScenarioShow
=
false
}
console
.
log
(
'哈哈哈'
,
this
.
testScenarioShow
)
console
.
log
(
'零件样品信息'
,
this
.
partInfoArr
)
console
.
log
(
'model'
,
this
.
model
)
})
...
...
@@ -811,7 +822,7 @@ export default {
display
:
flex
;
flex-wrap
:
wrap
;
.test-scenario
{
width
:
2
37
px
;
width
:
2
28
px
;
height
:
32px
;
border
:
1px
solid
#dcdfe6
;
background-color
:
#ffffff
;
...
...
@@ -823,7 +834,7 @@ export default {
}
}
.check-test-scenario
{
width
:
2
37
px
;
width
:
2
28
px
;
height
:
32px
;
border
:
1px
solid
#1a6fd7
;
background-color
:
#e3eefc
;
...
...
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