Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-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
中汽研标准应用数据库
car-database-web
Commits
cccfb0f5
Commit
cccfb0f5
authored
Feb 18, 2025
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(定制检测方案): 添加
parent
0ab8053f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
60 deletions
+83
-60
plan.js
src/api/plan.js
+3
-2
checkInput.vue
src/components/CheckCoiumns/checkInput.vue
+54
-35
checkbox.vue
src/components/CheckCoiumns/checkbox.vue
+3
-3
inputUpload.vue
src/components/CheckCoiumns/inputUpload.vue
+1
-1
checkBuilder.vue
src/components/checkBuilder.vue
+2
-4
index.vue
src/views/plan/customized/index.vue
+20
-15
No files found.
src/api/plan.js
View file @
cccfb0f5
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
// 获取项目
// 获取项目
export
const
getObjectList
=
()
=>
{
export
const
getObjectList
=
(
data
)
=>
{
return
request
({
return
request
({
url
:
'/Object/Data/getList'
,
url
:
'/Object/Data/getList'
,
method
:
'post'
method
:
'post'
,
data
})
})
}
}
...
...
src/components/CheckCoiumns/checkInput.vue
View file @
cccfb0f5
<
template
>
<
template
>
<div
class=
"checkbox-input-box"
>
<div>
<div>
<div
v-for=
"(i, k) in items.options"
class=
"checkbox-item"
:key=
"k"
>
<div
v-for=
"(i, k) in items.options"
class=
"checkbox-item"
:key=
"k"
>
<el-checkbox
<el-checkbox
:disabled=
"status"
:disabled=
"status"
:model=
"i
.check"
v-model=
"model.list[k]
.check"
@
change=
"
@
change=
"
e =>
{
e =>
{
checkOne(i, e)
checkOne(i, e)
...
@@ -16,17 +17,20 @@
...
@@ -16,17 +17,20 @@
<el-input
<el-input
v-bind=
"items"
v-bind=
"items"
placeholder=
"请输入"
placeholder=
"请输入"
:disabled=
"!
list[k].check"
:disabled=
"!model.
list[k].check"
style=
"width: 10rem; margin: 0 10px"
style=
"width: 10rem; margin: 0 10px"
v-model=
"
list[k].value"
v-model=
"model.
list[k].value"
@
input=
"input"
@
input=
"input"
>
>
</el-input>
</el-input>
<div
style=
"width: 20rem; display: inline-block; vertical-align: middle"
>
<div
style=
"width: 20rem; display: inline-block; vertical-align: middle"
>
{{
i
.
object
}}
{{
i
.
object
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
...
@@ -55,16 +59,17 @@ export default {
...
@@ -55,16 +59,17 @@ export default {
return
{
return
{
model
:
{
model
:
{
value
:
''
,
value
:
''
,
list
:
[]
list
:
[]
,
}
}
}
}
},
},
created
()
{
created
()
{
this
.
value
=
this
.
defaultValue
this
.
reset
()
this
.
reset
()
},
},
watch
:
{
watch
:
{
defaultValue
(
newVal
)
{
defaultValue
(
newVal
)
{
// this.list
= newVal
this
.
model
.
value
=
newVal
},
},
status
(
newVal
)
{
status
(
newVal
)
{
this
.
reset
()
this
.
reset
()
...
@@ -75,8 +80,8 @@ export default {
...
@@ -75,8 +80,8 @@ export default {
mounted
()
{
mounted
()
{
if
(
this
.
defaultValue
)
{
if
(
this
.
defaultValue
)
{
this
.
model
=
this
.
defaultValue
this
.
model
=
this
.
defaultValue
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
model
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
result
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
model
})
}
else
{
}
else
{
this
.
reset
()
this
.
reset
()
}
}
...
@@ -112,37 +117,51 @@ export default {
...
@@ -112,37 +117,51 @@ export default {
})
})
return
arr
return
arr
},
},
checkOne
(
i
,
e
)
{
if
(
this
.
merge
)
{
this
.
$emit
(
'mergeVal'
,
{
name
:
e
,
flag
:
i
.
flag
?
i
.
flag
.
split
(
','
)
:
[]
})
}
},
input
(
val
)
{
input
(
val
)
{
let
arr
=
[]
let
arr
=
[]
this
.
mdoel
.
list
.
map
(
i
=>
{
console
.
log
(
this
.
model
)
this
.
model
.
list
.
map
(
i
=>
{
if
(
i
.
check
)
{
if
(
i
.
check
)
{
arr
.
push
(
i
.
useCaseNo
)
arr
.
push
(
i
.
useCaseNo
)
}
}
})
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
arr
.
join
(
','
)
})
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
arr
.
join
(
','
)
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
m
doel
.
list
})
this
.
$emit
(
'makeRecord'
,
{
name
:
this
.
prop
,
record
:
this
.
m
odel
})
},
},
reset
()
{
reset
()
{
this
.
model
.
list
=
[]
this
.
model
.
list
=
[]
this
.
items
.
options
.
map
(
i
=>
{
this
.
items
.
options
.
map
(
i
=>
{
this
.
model
.
list
.
push
({
this
.
model
.
list
.
push
({
value
:
''
,
value
:
''
,
id
:
i
.
id
,
check
:
false
,
check
:
false
,
useCaseNo
:
i
.
useCaseNo
,
useCaseNo
:
i
.
useCaseNo
,
key
:
i
.
value
,
key
:
i
.
value
,
id
:
i
.
id
,
flag
:
i
.
flag
flag
:
i
.
flag
})
})
})
})
}
}
,
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.checkbox-item
{
.checkbox-item
{
// display: flex;
// align-items: center;
// justify-content: flex-start;
margin-bottom
:
10px
;
}
.checkbox-input-box
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
flex-start
;
justify-content
:
space-between
;
margin-bottom
:
10px
;
}
}
</
style
>
</
style
>
src/components/CheckCoiumns/checkbox.vue
View file @
cccfb0f5
<
template
>
<
template
>
<div>
<div>
<div
v-if=
"prop == 'chcek
9
'"
style=
"display: inline flex"
>
<div
v-if=
"prop == 'chcek
10
'"
style=
"display: inline flex"
>
<span>
关键配置参数:
</span>
<span>
关键配置参数:
</span>
<el-checkbox-group
v-model=
"value"
:disabled=
"status"
@
change=
"input"
>
<el-checkbox-group
v-model=
"value"
:disabled=
"status"
@
change=
"input"
>
<el-checkbox
<el-checkbox
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<span></span>
<span></span>
</div>
</div>
<div
v-if=
"prop == 'chcek
9
'"
style=
"display: inline flex"
>
<div
v-if=
"prop == 'chcek
10
'"
style=
"display: inline flex"
>
<span>
标定参数:
</span>
<span>
标定参数:
</span>
<el-checkbox-group
v-model=
"value"
:disabled=
"status"
@
change=
"input"
>
<el-checkbox-group
v-model=
"value"
:disabled=
"status"
@
change=
"input"
>
<el-checkbox
<el-checkbox
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
<el-checkbox-group
<el-checkbox-group
v-if=
"prop != 'chcek
9
'"
v-if=
"prop != 'chcek
10
'"
v-model=
"value"
v-model=
"value"
:disabled=
"status"
:disabled=
"status"
@
change=
"input"
@
change=
"input"
...
...
src/components/CheckCoiumns/inputUpload.vue
View file @
cccfb0f5
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</div>
</div>
</el-upload>
</el-upload>
</div>
</div>
<div
v-if=
"prop=='chcek
5
'"
>
<div
v-if=
"prop=='chcek
6
'"
>
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
:action=
"uploadImgUrl"
:action=
"uploadImgUrl"
...
...
src/components/checkBuilder.vue
View file @
cccfb0f5
...
@@ -202,18 +202,16 @@ export default {
...
@@ -202,18 +202,16 @@ export default {
i
.
record
=
this
.
record
[
i
.
key
]
i
.
record
=
this
.
record
[
i
.
key
]
codes
.
push
(
this
.
form
[
i
.
key
])
codes
.
push
(
this
.
form
[
i
.
key
])
}
}
console
.
log
(
i
)
arr
.
push
(
i
)
arr
.
push
(
i
)
})
})
codes
=
codes
.
filter
(
item
=>
item
&&
item
!==
''
)
codes
=
codes
.
filter
(
item
=>
item
&&
item
!==
''
)
console
.
log
({
console
.
log
({
record
:
arr
,
record
:
JSON
.
stringify
(
arr
)
,
codes
:
codes
.
join
(
','
)
codes
:
codes
.
join
(
','
)
})
})
return
{
return
{
record
:
arr
,
record
:
JSON
.
stringify
(
arr
)
,
codes
:
codes
.
join
(
','
)
codes
:
codes
.
join
(
','
)
}
}
}
else
{
}
else
{
...
...
src/views/plan/customized/index.vue
View file @
cccfb0f5
...
@@ -100,6 +100,8 @@ export default {
...
@@ -100,6 +100,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
inspectionStandardId
:
''
,
modelInitial
:[],
model
:
[],
model
:
[],
loading
:
false
,
loading
:
false
,
form
:
{
form
:
{
...
@@ -131,10 +133,8 @@ export default {
...
@@ -131,10 +133,8 @@ export default {
'form.inspectionStandardId'
:
{
'form.inspectionStandardId'
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
if
(
newValue
)
{
// this.model.inspectionItem = []
console
.
log
(
newValue
)
this
.
getTaskType
(
newValue
)
this
.
getTaskType
(
newValue
)
this
.
handleLoad
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
(
'inspectionItem'
)
this
.
$refs
.
form
.
clearValidate
(
'inspectionItem'
)
})
})
...
@@ -160,11 +160,11 @@ export default {
...
@@ -160,11 +160,11 @@ export default {
if
(
this
.
$route
.
query
.
id
!==
undefined
)
{
if
(
this
.
$route
.
query
.
id
!==
undefined
)
{
this
.
getTaskDetail
(
this
.
$route
.
query
.
id
)
this
.
getTaskDetail
(
this
.
$route
.
query
.
id
)
}
else
{
}
else
{
this
.
handleLoad
()
this
.
form
=
{
this
.
form
=
{
inspectionStandardId
:
"1"
,
inspectionStandardId
:
"1"
,
inspectionItem
:
[
'trfis'
]
inspectionItem
:
[
'trfis'
]
}
}
this
.
handleLoad
()
}
}
})
})
},
},
...
@@ -180,6 +180,8 @@ export default {
...
@@ -180,6 +180,8 @@ export default {
this
.
form
=
res
.
data
this
.
form
=
res
.
data
this
.
form
.
inspectionItem
=
this
.
form
.
inspectionItem
.
split
(
','
)
this
.
form
.
inspectionItem
=
this
.
form
.
inspectionItem
.
split
(
','
)
this
.
model
=
JSON
.
parse
(
res
.
data
.
specifyPlan
)
this
.
model
=
JSON
.
parse
(
res
.
data
.
specifyPlan
)
this
.
modelInitial
=
JSON
.
parse
(
res
.
data
.
specifyPlan
)
this
.
inspectionStandardId
=
this
.
form
.
inspectionStandardId
this
.
form
.
id
=
undefined
this
.
form
.
id
=
undefined
}
}
})
})
...
@@ -191,7 +193,7 @@ export default {
...
@@ -191,7 +193,7 @@ export default {
if
(
form
.
inspectionItem
.
indexOf
(
'trfis'
)
!==
-
1
)
{
if
(
form
.
inspectionItem
.
indexOf
(
'trfis'
)
!==
-
1
)
{
const
res
=
await
this
.
$refs
.
check
.
getValidateVaule
()
const
res
=
await
this
.
$refs
.
check
.
getValidateVaule
()
form
.
specifyPlan
=
JSON
.
stringify
(
res
.
record
)
form
.
specifyPlan
=
res
.
record
form
.
useCaseNo
=
res
.
codes
form
.
useCaseNo
=
res
.
codes
}
}
form
.
inspectionItem
=
form
.
inspectionItem
.
join
(
','
)
form
.
inspectionItem
=
form
.
inspectionItem
.
join
(
','
)
...
@@ -251,8 +253,11 @@ export default {
...
@@ -251,8 +253,11 @@ export default {
})
})
},
},
handleLoad
()
{
handleLoad
()
{
getObjectList
().
then
(
res
=>
{
getObjectList
(
{
standardType
:
this
.
form
.
inspectionStandardId
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
this
.
$route
.
query
.
id
!==
undefined
&&
this
.
form
.
inspectionStandardId
===
this
.
inspectionStandardId
)
{
this
.
model
=
this
.
modelInitial
}
else
{
this
.
model
=
res
.
data
.
map
(
i
=>
{
this
.
model
=
res
.
data
.
map
(
i
=>
{
return
{
return
{
...
i
,
...
i
,
...
@@ -262,7 +267,7 @@ export default {
...
@@ -262,7 +267,7 @@ export default {
}
}
}
}
})
})
// this.$message.success('加载成功')
}
}
else
{
}
else
{
this
.
$message
.
error
(
'加载失败'
)
this
.
$message
.
error
(
'加载失败'
)
}
}
...
...
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