Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
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
李苏
sgaqgl-vue
Commits
8bb09a77
Commit
8bb09a77
authored
Jan 12, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
反馈上传文件
parent
9bff3ea6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
3 deletions
+61
-3
sbbymx.js
src/api/equipment/sbbymx.js
+9
-0
ckxmEdit.vue
src/views/equipment/sbbymx/ckxmEdit.vue
+52
-3
No files found.
src/api/equipment/sbbymx.js
View file @
8bb09a77
...
@@ -45,4 +45,13 @@ data: query||{}
...
@@ -45,4 +45,13 @@ data: query||{}
})
})
}
}
/* 附件list */
export
function
attachmentList
(
query
)
{
return
request
({
url
:
'/aqgl/sbgl/sbbyjl/attachment/list'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/views/equipment/sbbymx/ckxmEdit.vue
View file @
8bb09a77
...
@@ -30,6 +30,29 @@
...
@@ -30,6 +30,29 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
style=
'padding-left: 120px;padding-bottom: 20px;'
>
<!-- 附件-->
<el-upload
:on-success=
"success"
:data=
"
{groupid:null}"
:headers='headers'
class="upload-demo"
:action="action"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="6"
:on-exceed="handleExceed"
:file-list="fileList">
<el-button
size=
"mini"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</el-col>
</el-row>
<!--
<el-row
:gutter=
"20"
>
<!--
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"上次保养记录ID"
ref=
"scbyjlid"
prop=
"scbyjlid"
>
<el-form-item
label=
"上次保养记录ID"
ref=
"scbyjlid"
prop=
"scbyjlid"
>
...
@@ -45,8 +68,8 @@
...
@@ -45,8 +68,8 @@
</div>
</div>
</DefaultDialog>
</DefaultDialog>
</
template
>
</
template
>
<
script
>
<
script
>
const
baseurl
=
process
.
env
.
VUE_APP_BASE_API
/* 引入需要的接口*/
/* 引入需要的接口*/
import
{
import
{
doQuery
,
doQuery
,
...
@@ -55,7 +78,8 @@
...
@@ -55,7 +78,8 @@
// doDelete
// doDelete
}
from
'@/api/equipment/sbbyjl.js'
;
}
from
'@/api/equipment/sbbyjl.js'
;
import
{
import
{
doSave
doSave
,
attachmentList
}
from
"@/api/equipment/sbbymx.js"
}
from
"@/api/equipment/sbbymx.js"
/* edit页面*/
/* edit页面*/
import
{
import
{
...
@@ -72,7 +96,12 @@ props:['app'],
...
@@ -72,7 +96,12 @@ props:['app'],
},
},
data
()
{
data
()
{
return
{
return
{
readonly
:
false
,
fileList
:[],
headers
:{
Gtoken
:
sessionStorage
.
getItem
(
'Gtoken'
)},
action
:
baseurl
+
'/aqgl/sbgl/sbbyjl/attachment/upload'
,
form
:
{
form
:
{
//ID
//ID
id
:
''
,
id
:
''
,
//设备ID
//设备ID
...
@@ -91,7 +120,26 @@ props:['app'],
...
@@ -91,7 +120,26 @@ props:['app'],
}
}
},
},
methods
:
{
methods
:
{
success
(
res
,
file
){
this
.
fileList
.
push
({
name
:
file
.
name
,
url
:
res
.
data
.
viewUrl
,
id
:
res
.
data
.
id
})
},
handleRemove
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
);
},
handlePreview
(
file
)
{
console
.
log
(
'点击上传列表'
,
file
,
this
.
fileList
);
},
handleExceed
(
files
,
fileList
)
{
this
.
$message
.
warning
(
`当前限制选择6个文件,本次选择了
${
files
.
length
}
个文件,共选择了
${
files
.
length
+
fileList
.
length
}
个文件`
);
},
beforeRemove
(
file
,
fileList
)
{
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
},
/* 基础查询*/
/* 基础查询*/
query
:
doQuery
,
query
:
doQuery
,
/* treeQuery */
/* treeQuery */
...
@@ -104,6 +152,7 @@ props:['app'],
...
@@ -104,6 +152,7 @@ props:['app'],
},
},
save
(){
save
(){
let
params
=
{
let
params
=
{
attachments
:
this
.
fileList
,
details
:[{
id
:
''
,
records
:[]}],
details
:[{
id
:
''
,
records
:[]}],
master
:{...
this
.
form
}
master
:{...
this
.
form
}
}
}
...
...
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