Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
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
JIRA
JIRA
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
黄瑜
VueElementTemplate
Commits
d9cb780b
Commit
d9cb780b
authored
Mar 27, 2018
by
王康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form
parent
5a90bcd1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
HmComplexForm.vue
src/views/haomo/components/forms/HmComplexForm.vue
+19
-12
No files found.
src/views/haomo/components/forms/HmComplexForm.vue
View file @
d9cb780b
...
@@ -89,11 +89,14 @@
...
@@ -89,11 +89,14 @@
</el-radio-group>
</el-radio-group>
<!-- 8 文件 -->
<!-- 8 文件 -->
<el-upload
v-else-if=
"column.widgetType === 8"
<el-upload
v-else-if=
"column.widgetType === 8"
class=
"upload-demo
"
name=
"picture
"
action=
"/api/upload"
action=
"/api/upload"
:on-remove=
"handleRemove"
:on-remove=
"handleRemove"
multiple
:file-list=
"fileList"
:file-list=
"fileList"
:on-exceed=
"handleExceed"
>
multiple
ref=
"upload"
:data-code=
"column.codeCamel"
:on-success=
"uploadSuccess"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
:disabled=
"column.disabled"
>
选取文件
</el-button>
:disabled=
"column.disabled"
>
选取文件
</el-button>
</el-upload>
</el-upload>
...
@@ -336,7 +339,8 @@
...
@@ -336,7 +339,8 @@
}
}
}]
}]
},
},
fileList
:
[]
fileList
:
[],
// 上传文件列表
fileCode
:
''
// 上传组件对应的数据库字段
}
}
},
},
...
@@ -353,11 +357,13 @@
...
@@ -353,11 +357,13 @@
handlePreview
(
file
)
{
handlePreview
(
file
)
{
console
.
log
(
file
)
console
.
log
(
file
)
},
},
handleExceed
(
files
,
fileList
)
{
uploadSuccess
(
response
,
file
,
fileList
)
{
console
.
log
(
`当前限制选择 3 个文件,本次选择了
${
files
.
length
}
个文件,共选择了
${
files
.
length
+
fileList
.
length
}
个文件`
)
console
.
log
(
'上传成功'
)
},
console
.
log
(
response
)
beforeRemove
(
file
,
fileList
)
{
// console.log(file)
console
.
log
(
this
.
$confirm
(
`确定移除$ { file.name } ?`
))
// console.log(fileList)
this
.
fileList
=
fileList
this
.
formModel
[
this
.
fileCode
]
=
fileList
},
},
// inputChange(val) {
// inputChange(val) {
// // console.log(event)
// // console.log(event)
...
@@ -465,7 +471,7 @@
...
@@ -465,7 +471,7 @@
self
.
$set
(
self
.
showUserColumns
,
index
,
tmp
)
// 顺序
self
.
$set
(
self
.
showUserColumns
,
index
,
tmp
)
// 顺序
}
}
})
})
console
.
log
(
self
.
showUserColumns
)
//
console.log(self.showUserColumns)
// 提取v-model绑定的变量
// 提取v-model绑定的变量
_
.
each
(
self
.
showUserColumns
,
function
(
item
)
{
_
.
each
(
self
.
showUserColumns
,
function
(
item
)
{
if
(
item
.
widgetType
===
3
&&
item
.
options
&&
item
.
options
.
length
>
0
)
{
if
(
item
.
widgetType
===
3
&&
item
.
options
&&
item
.
options
.
length
>
0
)
{
...
@@ -500,6 +506,7 @@
...
@@ -500,6 +506,7 @@
console
.
log
(
'点击了提交函数'
)
console
.
log
(
'点击了提交函数'
)
// console.log(self.formModel)
// console.log(self.formModel)
self
.
formModel
=
processData
?
processData
(
self
.
formModel
)
:
self
.
formModel
// 对表单数据进行处理
self
.
formModel
=
processData
?
processData
(
self
.
formModel
)
:
self
.
formModel
// 对表单数据进行处理
_
.
each
()
console
.
log
(
self
.
formModel
)
console
.
log
(
self
.
formModel
)
// if (self.isEmpty(self.formModel)) return
// if (self.isEmpty(self.formModel)) return
self
.
$refs
.
form
.
validate
((
valid
)
=>
{
self
.
$refs
.
form
.
validate
((
valid
)
=>
{
...
...
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