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
af983df9
Commit
af983df9
authored
May 30, 2022
by
11528
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不良定义长度限制
parent
db6b361f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
7 deletions
+51
-7
badDefinition.js
src/api/badDefinition.js
+9
-0
badDefinition.vue
src/views/productionInfo/badDefinition.vue
+42
-7
No files found.
src/api/badDefinition.js
View file @
af983df9
...
...
@@ -67,3 +67,12 @@ export function addBad(data) {
}
})
}
// 导出不良定义
export
function
exportBad
(
query
)
{
return
request
({
url
:
'/nltdisadvantage/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/views/productionInfo/badDefinition.vue
View file @
af983df9
...
...
@@ -238,7 +238,7 @@
<div
class=
"labelName"
>
不良编号
</div>
<div
class=
"labelName"
>
Reject Code
</div>
</div>
<el-input
v-model=
"form.rejectCode"
placeholder=
"请输入不良编号"
/>
<el-input
v-model=
"form.rejectCode"
:maxlength=
"30"
placeholder=
"请输入不良编号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -265,7 +265,7 @@
<div
class=
"labelName"
>
不良描述
</div>
<div
class=
"labelName"
>
Reject Description
</div>
</div>
<el-input
v-model=
"form.rejectDescription"
placeholder=
"请输入"
/>
<el-input
v-model=
"form.rejectDescription"
:maxlength=
"200"
placeholder=
"请输入"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -289,7 +289,7 @@
<div
class=
"labelName"
>
Specific Explanation
</div>
</div>
<el-col
v-for=
"(item, index) in form.specificExplanation"
:key=
"item"
:span=
"18"
style=
"width: 70%"
>
<el-input
v-model=
"item.specificExplanation"
type=
"textarea"
maxlength=
"1
00"
placeholder=
""
style=
"width: 70%;margin-bottom: 10px"
/>
<el-input
v-model=
"item.specificExplanation"
:maxlength=
"2
00"
placeholder=
""
style=
"width: 70%;margin-bottom: 10px"
/>
<el-link
v-if=
"form.specificExplanation.length > 1"
type=
"primary"
style=
"width: 20%"
@
click
.
prevent=
"removeUpdate(item,index)"
>
删除
</el-link>
</el-col>
<el-col
:span=
"6"
>
...
...
@@ -310,7 +310,7 @@
</template>
<
script
>
import
{
listBad
,
listPost
,
deleteLogical
,
updateStatus
,
addBad
,
updateData
}
from
'@/api/badDefinition'
import
{
listBad
,
listPost
,
deleteLogical
,
updateStatus
,
addBad
,
updateData
,
exportBad
}
from
'@/api/badDefinition'
export
default
{
name
:
'BadDefinition'
,
...
...
@@ -326,9 +326,7 @@ export default {
page
:
1
,
rows
:
10
,
rejectCode
:
undefined
,
rejectDescription
:
undefined
,
specificExplanation
:
undefined
,
position
:
undefined
rejectDescription
:
undefined
},
openBad
:
false
,
openBadOne
:
false
,
...
...
@@ -365,7 +363,22 @@ export default {
positionOption
:
[]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
})
next
()
},
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
this
.
queryParams
=
{
...
param
}
}
this
.
getList
()
},
methods
:
{
...
...
@@ -553,6 +566,28 @@ export default {
return
false
}
this
.
form
.
specificExplanation
.
splice
(
index
,
1
)
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
this
.
$confirm
(
'是否确认导出所有用户信息?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportBad
(
queryParams
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'用户信息'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg);
})
})
}
}
}
...
...
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