Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
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
张伯涛
NLT-e-cigarette
Commits
c194e224
Commit
c194e224
authored
May 29, 2022
by
11528
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不良定义新增
parent
10cdac96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
35 deletions
+50
-35
badDefinition.js
src/api/badDefinition.js
+1
-1
badDefinition.vue
src/views/productionInfo/badDefinition.vue
+49
-34
No files found.
src/api/badDefinition.js
View file @
c194e224
// 不良定义api
import
request
from
'@/utils/request'
import
Qs
from
"qs"
;
import
Qs
from
'qs'
// 分页查询列表
export
function
listBad
(
query
)
{
...
...
src/views/productionInfo/badDefinition.vue
View file @
c194e224
...
...
@@ -68,7 +68,7 @@
>
<el-table-column
type=
"selection"
width=
"50"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
align=
"center"
prop=
"rejectCode"
width=
"
12
0"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
prop=
"rejectCode"
width=
"
20
0"
:show-overflow-tooltip=
"true"
>
<template
slot=
"header"
>
<div>
不良编号
</div>
<div>
Reject Code
</div>
...
...
@@ -77,7 +77,7 @@
{{
scope
.
row
.
rejectCode
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"rejectDescription"
width=
"200"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
prop=
"rejectDescription"
:show-overflow-tooltip=
"true"
>
<
template
slot=
"header"
>
<div>
不良描述
</div>
<div>
Reject Description
</div>
...
...
@@ -95,15 +95,15 @@
{{
scope
.
row
.
positionName
||
'-'
}}
</
template
>
</el-table-column>
<
el-table-column
align=
"center"
prop=
"specificExplanation"
:show-overflow-tooltip=
"true"
>
<
template
slot=
"header"
>
<div>
具体解释
</div
>
<div>
Specific Explanation
</div
>
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
specificExplanation
||
'-'
}}
</
template
>
<
/el-table-column
>
<
!-- <el-table-column align="center" prop="specificExplanation" :show-overflow-tooltip="true">--
>
<!-- <template slot="header">--
>
<!-- <div>具体解释</div>--
>
<!-- <div>Specific Explanation</div>--
>
<!-- </template>--
>
<!-- <template slot-scope="scope">--
>
<!-- {{ scope.row.specificExplanation || '-' }}-->
<!-- </template>--
>
<
!-- </el-table-column>--
>
<el-table-column
align=
"center"
width=
"100"
prop=
"flag"
>
<
template
slot=
"header"
>
<div>
状态
</div>
...
...
@@ -166,8 +166,8 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
class=
"labelHeight"
label=
"工站"
prop=
"
Position
"
>
<div
slot=
"label"
class=
"labelClass"
>
<el-form-item
class=
"labelHeight"
label=
"工站"
prop=
"
positionName
"
>
<div
slot=
"label"
class=
"labelClass
Required
"
>
<div
class=
"labelName"
>
工站
</div>
<div
class=
"labelName"
>
Position
</div>
</div>
...
...
@@ -184,8 +184,8 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
class=
"labelHeight"
label=
"不良描述"
prop=
"
phone
"
>
<div
slot=
"label"
class=
"labelClass"
>
<el-form-item
class=
"labelHeight"
label=
"不良描述"
prop=
"
rejectDescription
"
>
<div
slot=
"label"
class=
"labelClass
Required
"
>
<div
class=
"labelName"
>
不良描述
</div>
<div
class=
"labelName"
>
Reject Description
</div>
</div>
...
...
@@ -193,7 +193,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
class=
"labelHeight"
label=
"状态"
prop=
"
email
"
>
<el-form-item
class=
"labelHeight"
label=
"状态"
prop=
"
flag
"
>
<div
slot=
"label"
class=
"labelClass"
>
<div
class=
"labelName"
>
状态
</div>
<div
class=
"labelName"
>
Status
</div>
...
...
@@ -212,9 +212,9 @@
<div
class=
"labelName"
>
具体解释
</div>
<div
class=
"labelName"
>
Specific Explanation
</div>
</div>
<el-col
v-for=
"(item, index) in form.specificExplanation
"
:key=
"item.specificExplanation
"
:span=
"18"
style=
"width: 70%"
>
<el-col
v-for=
"(item, index) in form.specificExplanation
s"
:key=
"item
"
:span=
"18"
style=
"width: 70%"
>
<el-input
v-model=
"item.specificExplanation"
placeholder=
""
style=
"width: 70%"
/>
<el-link
v-if=
"form.specificExplanation
.length > 1
"
style=
"width: 20%"
@
click
.
prevent=
"removeDomain(item,index)"
>
删除
</el-link>
<el-link
v-if=
"form.specificExplanation
s.length > 1"
type=
"primary
"
style=
"width: 20%"
@
click
.
prevent=
"removeDomain(item,index)"
>
删除
</el-link>
</el-col>
<el-col
:span=
"6"
>
<el-link
type=
"primary"
@
click=
"addDomain"
>
增加一行
</el-link>
...
...
@@ -328,27 +328,25 @@ export default {
form
:
{
explanationId
:
''
,
rejectCode
:
''
,
position
:
''
,
position
Id
:
''
,
rejectDescription
:
''
,
flag
:
''
,
specificExplanation
:
[
specificExplanation
s
:
[
{
specificExplanation
:
''
}
],
positionName
:
''
positionName
:
''
,
specificExplanation1
:
[]
},
// 表单校验
rules
:
{
rejectCode
:
[
{
required
:
true
,
message
:
'请输入不良编号'
,
trigger
:
'blur'
}
],
position
:
[
position
Name
:
[
{
required
:
true
,
message
:
'请输入工站'
,
trigger
:
'blur'
}
],
rejectDescription
:
[
{
required
:
true
,
message
:
'请输入不良描述'
,
trigger
:
'blur'
}
],
specificExplanation
:
[
{
required
:
false
,
message
:
'请输入具体解释'
,
trigger
:
'blur'
}
]
},
title
:
''
,
...
...
@@ -383,7 +381,7 @@ export default {
createBy
:
undefined
,
updateBy
:
undefined
,
remark
:
undefined
,
specificExplanation
:
[
specificExplanation
s
:
[
{
specificExplanation
:
''
}
]
}
...
...
@@ -479,13 +477,30 @@ export default {
}
})
}
else
{
addBad
(
this
.
form
).
then
(
response
=>
{
console
.
log
(
this
.
form
.
specificExplanations
)
this
.
form
.
specificExplanation1
=
[]
this
.
form
.
specificExplanations
.
forEach
(
item
=>
{
if
(
this
.
form
.
specificExplanations
.
length
<
1
)
{
this
.
form
.
specificExplanation1
.
push
(
item
.
specificExplanation
)
}
else
{
this
.
form
.
specificExplanation1
.
push
(
item
.
specificExplanation
)
}
})
console
.
log
(
this
.
form
.
specificExplanation1
)
addBad
({
rejectCode
:
this
.
form
.
rejectCode
,
rejectDescription
:
this
.
form
.
rejectDescription
,
flag
:
this
.
form
.
flag
,
positionName
:
this
.
form
.
positionName
,
specificExplanations
:
this
.
form
.
specificExplanation1
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$message
({
message
:
'新增成功'
,
type
:
'success'
})
this
.
open
=
false
this
.
openBad
=
false
this
.
reset
()
this
.
getList
()
}
})
...
...
@@ -494,16 +509,16 @@ export default {
})
},
addDomain
()
{
this
.
form
.
specificExplanation
.
push
({
specificExplanation
:
''
}
)
this
.
form
.
specificExplanation
s
.
push
(
{
specificExplanation
:
''
}
)
},
/** 新增弹窗的删除按钮 */
removeDomain
(
item
,
index
)
{
if
(
this
.
form
.
specificExplanation
.
length
<=
1
)
{
if
(
this
.
form
.
specificExplanation
s
.
length
<=
1
)
{
return
false
}
this
.
form
.
specificExplanation
.
splice
(
index
,
1
)
this
.
form
.
specificExplanation
s
.
splice
(
index
,
1
)
}
}
}
...
...
@@ -553,7 +568,7 @@ export default {
.badDialog
{
.labelHeight
{
.el-form-item__label
{
height
:
4
8
px
;
height
:
4
0
px
;
}
}
.el-form-item--small
.el-form-item__label
{
...
...
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