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
05ca67eb
Commit
05ca67eb
authored
Mar 19, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 创建/修改任务 - 样品信息不允许删除最后一个
parent
2580123a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
index.vue
src/views/task/edit/index.vue
+13
-3
index.vue
src/views/task/new/index.vue
+2
-2
index.vue
src/views/task/task-detail/index.vue
+8
-2
No files found.
src/views/task/edit/index.vue
View file @
05ca67eb
...
@@ -668,7 +668,10 @@ export default {
...
@@ -668,7 +668,10 @@ export default {
console
.
log
(
'小组table'
,
this
.
tableData
)
console
.
log
(
'小组table'
,
this
.
tableData
)
console
.
log
(
'this.userList'
,
this
.
userList
)
console
.
log
(
'this.userList'
,
this
.
userList
)
// 整车样品信息
// 整车样品信息
if
(
this
.
taskDetail
.
completeVehicleSample
!==
null
)
{
if
(
this
.
taskDetail
.
completeVehicleSample
!==
null
&&
this
.
taskDetail
.
completeVehicleSample
.
length
>
0
)
{
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
this
.
carInfoArr
.
forEach
(
item
=>
{
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
sampleId
=
item
.
id
...
@@ -676,14 +679,21 @@ export default {
...
@@ -676,14 +679,21 @@ export default {
})
})
}
}
// 零件样品信息
// 零件样品信息
if
(
this
.
taskDetail
.
partVehicleSample
!==
null
)
{
if
(
this
.
taskDetail
.
partVehicleSample
!==
null
&&
this
.
taskDetail
.
partVehicleSample
.
length
>
0
)
{
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
this
.
partInfoArr
.
forEach
(
item
=>
{
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
sampleId
=
item
.
id
item
.
flag
=
1
item
.
flag
=
1
})
})
}
}
console
.
log
(
'零件样品信息'
,
this
.
partInfoArr
)
console
.
log
(
'零件样品信息'
,
this
.
taskDetail
.
partVehicleSample
,
this
.
partInfoArr
)
console
.
log
(
'model'
,
this
.
model
)
console
.
log
(
'model'
,
this
.
model
)
})
})
},
},
...
...
src/views/task/new/index.vue
View file @
05ca67eb
...
@@ -1107,13 +1107,13 @@ export default {
...
@@ -1107,13 +1107,13 @@ export default {
if
(
this
.
taskId
===
undefined
)
{
if
(
this
.
taskId
===
undefined
)
{
createTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
createTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
loading
.
close
()
this
.
$modal
.
msgSuccess
(
'发布成功'
)
this
.
$modal
.
msgSuccess
(
'发布成功'
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/task/on'
path
:
'/task/on'
})
})
}
}
})
})
loading
.
close
()
}
else
{
}
else
{
this
.
taskCreateRequest
.
id
=
this
.
taskId
this
.
taskCreateRequest
.
id
=
this
.
taskId
// 去除样品信息多余属性
// 去除样品信息多余属性
...
@@ -1125,13 +1125,13 @@ export default {
...
@@ -1125,13 +1125,13 @@ export default {
})
})
updateTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
updateTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
loading
.
close
()
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/task/on'
path
:
'/task/on'
})
})
}
}
})
})
loading
.
close
()
}
}
})
})
}
}
...
...
src/views/task/task-detail/index.vue
View file @
05ca67eb
...
@@ -562,7 +562,10 @@ export default {
...
@@ -562,7 +562,10 @@ export default {
// 小组信息
// 小组信息
this
.
tableData
=
this
.
taskDetail
.
auditors
this
.
tableData
=
this
.
taskDetail
.
auditors
// 整车样品信息
// 整车样品信息
if
(
this
.
taskDetail
.
completeVehicleSample
!==
null
)
{
if
(
this
.
taskDetail
.
completeVehicleSample
!==
null
&&
this
.
taskDetail
.
completeVehicleSample
.
length
>
0
)
{
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
this
.
carInfoArr
.
forEach
(
item
=>
{
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
sampleId
=
item
.
id
...
@@ -570,7 +573,10 @@ export default {
...
@@ -570,7 +573,10 @@ export default {
})
})
}
}
// 零件样品信息
// 零件样品信息
if
(
this
.
taskDetail
.
partVehicleSample
!==
null
)
{
if
(
this
.
taskDetail
.
partVehicleSample
!==
null
&&
this
.
taskDetail
.
partVehicleSample
.
length
>
0
)
{
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
this
.
partInfoArr
.
forEach
(
item
=>
{
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
sampleId
=
item
.
id
...
...
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