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
a455e6c4
Commit
a455e6c4
authored
Mar 05, 2024
by
mzx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
5c82e18d
db32413d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
22 deletions
+114
-22
task.js
src/api/task/task.js
+9
-0
index.vue
src/views/setting/sample/index.vue
+7
-1
index.vue
src/views/task/new/index.vue
+98
-21
No files found.
src/api/task/task.js
View file @
a455e6c4
...
@@ -146,6 +146,15 @@ export function updateTask(data) {
...
@@ -146,6 +146,15 @@ export function updateTask(data) {
})
})
}
}
// 任务暂存编辑
export
function
editTemporaryStorage
(
data
)
{
return
request
({
url
:
'/task/editTemporaryStorage'
,
method
:
'post'
,
data
})
}
/// 任务删除
/// 任务删除
export
function
removeTask
(
data
)
{
export
function
removeTask
(
data
)
{
return
request
({
return
request
({
...
...
src/views/setting/sample/index.vue
View file @
a455e6c4
...
@@ -209,6 +209,7 @@
...
@@ -209,6 +209,7 @@
<el-input
<el-input
v-model=
"editParamsForm.identificationCode"
v-model=
"editParamsForm.identificationCode"
placeholder=
"请输入车辆识别码"
placeholder=
"请输入车辆识别码"
maxlength=
"50"
clearable
clearable
style=
"width: 90%"
style=
"width: 90%"
/>
/>
...
@@ -217,6 +218,7 @@
...
@@ -217,6 +218,7 @@
<el-input
<el-input
v-model=
"editParamsForm.sampleNumber"
v-model=
"editParamsForm.sampleNumber"
placeholder=
"请输入样品编号"
placeholder=
"请输入样品编号"
maxlength=
"50"
clearable
clearable
style=
"width: 90%"
style=
"width: 90%"
/>
/>
...
@@ -225,6 +227,7 @@
...
@@ -225,6 +227,7 @@
<el-input
<el-input
v-model=
"editParamsForm.sampleName"
v-model=
"editParamsForm.sampleName"
placeholder=
"请输入样品名称"
placeholder=
"请输入样品名称"
maxlength=
"50"
clearable
clearable
style=
"width: 90%"
style=
"width: 90%"
/>
/>
...
@@ -233,6 +236,7 @@
...
@@ -233,6 +236,7 @@
<el-input
<el-input
v-model=
"editParamsForm.sampleSender"
v-model=
"editParamsForm.sampleSender"
placeholder=
"请输入送样者"
placeholder=
"请输入送样者"
maxlength=
"50"
clearable
clearable
style=
"width: 90%"
style=
"width: 90%"
/>
/>
...
@@ -270,6 +274,7 @@
...
@@ -270,6 +274,7 @@
v-model=
"editParamsForm.manufacturingEnterprise"
v-model=
"editParamsForm.manufacturingEnterprise"
placeholder=
"请输入生产企业"
placeholder=
"请输入生产企业"
clearable
clearable
maxlength=
"50"
style=
"width: 90%"
style=
"width: 90%"
/>
/>
</el-form-item>
</el-form-item>
...
@@ -405,7 +410,8 @@ export default {
...
@@ -405,7 +410,8 @@ export default {
{
required
:
true
,
message
:
'请输入送样者'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入送样者'
,
trigger
:
'blur'
}
],
],
numberOfSamples
:
[
numberOfSamples
:
[
{
required
:
true
,
message
:
'请输入样品数量'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入样品数量'
,
trigger
:
'blur'
},
{
pattern
:
/^
\d
*$/
,
message
:
'只能输入数字'
,
trigger
:
'blur'
}
],
],
deliveryDate
:
[
deliveryDate
:
[
{
required
:
true
,
message
:
'请选择送样日期'
,
trigger
:
'change'
}
{
required
:
true
,
message
:
'请选择送样日期'
,
trigger
:
'change'
}
...
...
src/views/task/new/index.vue
View file @
a455e6c4
...
@@ -302,6 +302,7 @@ import { selectSamplePage } from '@/api/system/sample'
...
@@ -302,6 +302,7 @@ import { selectSamplePage } from '@/api/system/sample'
import
{
getUserByRole
}
from
'@/api/system/user'
import
{
getUserByRole
}
from
'@/api/system/user'
import
{
import
{
createTask
,
createTask
,
editTemporaryStorage
,
getTaskById
,
getTaskById
,
getTemporaryStorage
,
getTemporaryStorage
,
temporaryTask
,
temporaryTask
,
...
@@ -550,7 +551,9 @@ export default {
...
@@ -550,7 +551,9 @@ export default {
label
:
'车企五'
label
:
'车企五'
}
}
],
],
taskId
:
undefined
taskId
:
undefined
,
// 暂存数据
taskTemporaryStorage
:
null
}
}
},
},
watch
:
{
watch
:
{
...
@@ -630,7 +633,6 @@ export default {
...
@@ -630,7 +633,6 @@ export default {
item
.
check
=
true
item
.
check
=
true
}
}
})
})
debugger
console
.
log
(
'检验项目'
,
this
.
inspectionItemList
)
console
.
log
(
'检验项目'
,
this
.
inspectionItemList
)
// 把detail转到model里(任务信息)
// 把detail转到model里(任务信息)
for
(
const
key
in
this
.
taskDetail
)
{
for
(
const
key
in
this
.
taskDetail
)
{
...
@@ -656,17 +658,21 @@ export default {
...
@@ -656,17 +658,21 @@ export default {
console
.
log
(
'小组table'
,
this
.
tableData
)
console
.
log
(
'小组table'
,
this
.
tableData
)
console
.
log
(
'this.userList'
,
this
.
userList
)
console
.
log
(
'this.userList'
,
this
.
userList
)
// 整车样品信息
// 整车样品信息
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
if
(
this
.
taskDetail
.
completeVehicleSample
!==
null
)
{
this
.
carInfoArr
.
forEach
(
item
=>
{
this
.
carInfoArr
=
this
.
taskDetail
.
completeVehicleSample
item
.
sampleId
=
item
.
id
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
flag
=
0
item
.
sampleId
=
item
.
id
})
item
.
flag
=
0
})
}
// 零件样品信息
// 零件样品信息
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
if
(
this
.
taskDetail
.
partVehicleSample
!==
null
)
{
this
.
partInfoArr
.
forEach
(
item
=>
{
this
.
partInfoArr
=
this
.
taskDetail
.
partVehicleSample
item
.
sampleId
=
item
.
id
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
flag
=
1
item
.
sampleId
=
item
.
id
})
item
.
flag
=
1
})
}
console
.
log
(
'零件样品信息'
,
this
.
partInfoArr
)
console
.
log
(
'零件样品信息'
,
this
.
partInfoArr
)
console
.
log
(
'model'
,
this
.
model
)
console
.
log
(
'model'
,
this
.
model
)
})
})
...
@@ -691,7 +697,7 @@ export default {
...
@@ -691,7 +697,7 @@ export default {
this
.
rules
.
testScenarioList
[
0
].
required
=
false
this
.
rules
.
testScenarioList
[
0
].
required
=
false
}
else
{
}
else
{
// this.$route.meta.title = '发起新任务'
// this.$route.meta.title = '发起新任务'
this
.
getTemporaryStorage
()
//
this.getTemporaryStorage()
}
}
})
})
},
},
...
@@ -699,6 +705,57 @@ export default {
...
@@ -699,6 +705,57 @@ export default {
getTemporaryStorage
()
{
getTemporaryStorage
()
{
getTemporaryStorage
().
then
(
response
=>
{
getTemporaryStorage
().
then
(
response
=>
{
console
.
log
(
'暂存数据'
,
response
)
console
.
log
(
'暂存数据'
,
response
)
if
(
response
.
data
!==
null
)
{
this
.
taskTemporaryStorage
=
response
.
data
// 任务信息-(检验依据、检验项目)
this
.
model
.
standardId
=
this
.
taskTemporaryStorage
.
standardId
this
.
taskTemporaryStorage
.
taskList
=
this
.
taskTemporaryStorage
.
taskList
.
split
(
','
)
this
.
model
.
inspectionItemList
=
this
.
taskTemporaryStorage
.
taskList
this
.
inspectionItemList
.
forEach
(
item
=>
{
if
(
this
.
taskTemporaryStorage
.
taskList
.
includes
(
item
.
value
))
{
item
.
check
=
true
}
})
console
.
log
(
'检验项目'
,
this
.
inspectionItemList
)
// 把detail转到model里(任务信息)
for
(
const
key
in
this
.
taskTemporaryStorage
)
{
// eslint-disable-next-line no-prototype-builtins
if
(
this
.
model
.
hasOwnProperty
(
key
))
{
this
.
model
[
key
]
=
this
.
taskTemporaryStorage
[
key
]
}
}
// 小组信息
this
.
tableData
=
this
.
taskTemporaryStorage
.
auditors
console
.
log
(
'ddd'
,
this
.
tableData
)
this
.
tableData
.
forEach
(
item
=>
{
item
.
nickName
=
item
.
name
item
.
dept
=
{
deptName
:
item
.
deptName
}
item
.
disabled
=
true
// 为下拉框做准备
this
.
userList
.
forEach
(
user
=>
{
if
(
user
.
userId
.
toString
()
===
item
.
userId
.
toString
())
{
user
.
disabled
=
true
}
})
})
// 整车样品信息
if
(
this
.
taskTemporaryStorage
.
completeVehicleSample
!==
null
)
{
this
.
carInfoArr
=
this
.
taskTemporaryStorage
.
completeVehicleSample
this
.
carInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
0
})
}
// 零件样品信息
if
(
this
.
taskTemporaryStorage
.
partVehicleSample
!==
null
)
{
this
.
partInfoArr
=
this
.
taskTemporaryStorage
.
partVehicleSample
this
.
partInfoArr
.
forEach
(
item
=>
{
item
.
sampleId
=
item
.
id
item
.
flag
=
1
})
}
}
})
})
},
},
getUserByRole
()
{
getUserByRole
()
{
...
@@ -991,6 +1048,13 @@ export default {
...
@@ -991,6 +1048,13 @@ export default {
})
})
}
else
{
}
else
{
this
.
taskCreateRequest
.
id
=
this
.
taskId
this
.
taskCreateRequest
.
id
=
this
.
taskId
// 去除样品信息多余属性
this
.
taskCreateRequest
.
sample
.
forEach
(
item
=>
{
delete
item
.
id
})
this
.
taskCreateRequest
.
partSample
.
forEach
(
item
=>
{
delete
item
.
id
})
updateTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
updateTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
this
.
$modal
.
msgSuccess
(
'修改成功'
)
this
.
$modal
.
msgSuccess
(
'修改成功'
)
...
@@ -1041,14 +1105,27 @@ export default {
...
@@ -1041,14 +1105,27 @@ export default {
this
.
taskCreateRequest
.
sample
=
this
.
currentVehicleSampleInformation
this
.
taskCreateRequest
.
sample
=
this
.
currentVehicleSampleInformation
this
.
taskCreateRequest
.
partSample
=
this
.
currentPartSampleInformation
this
.
taskCreateRequest
.
partSample
=
this
.
currentPartSampleInformation
console
.
log
(
'暂存'
,
this
.
taskCreateRequest
)
console
.
log
(
'暂存'
,
this
.
taskCreateRequest
)
temporaryTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
if
(
this
.
taskTemporaryStorage
!==
null
)
{
if
(
response
.
code
===
200
)
{
// 暂存有数据再次暂存走编辑
this
.
$modal
.
msgSuccess
(
'暂存成功'
)
this
.
taskCreateRequest
.
id
=
this
.
taskTemporaryStorage
.
id
this
.
$router
.
push
({
editTemporaryStorage
(
this
.
taskCreateRequest
).
then
(
response
=>
{
path
:
'/task/on'
if
(
response
.
code
===
200
)
{
})
this
.
$modal
.
msgSuccess
(
'暂存成功'
)
}
this
.
$router
.
push
({
})
path
:
'/task/on'
})
}
})
}
else
{
temporaryTask
(
this
.
taskCreateRequest
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$modal
.
msgSuccess
(
'暂存成功'
)
this
.
$router
.
push
({
path
:
'/task/on'
})
}
})
}
})
})
// 假装跳转详情页
// 假装跳转详情页
// this.$router.push({
// this.$router.push({
...
...
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