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
HireTest
VueElementTemplate
Commits
5687315d
Commit
5687315d
authored
7 years ago
by
杨柠瑞
Browse files
Options
Browse Files
Download
Plain Diff
coding
parents
eda9d17f
c3638ac0
master
storybook
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
211 additions
and
88 deletions
+211
-88
HmFullCalendar.vue
src/views/haomo/components/calendar/HmFullCalendar.vue
+21
-2
HmComplexForm.vue
src/views/haomo/components/forms/HmComplexForm.vue
+155
-76
index.vue
src/views/haomo/components/forms/index.vue
+35
-10
No files found.
src/views/haomo/components/calendar/HmFullCalendar.vue
View file @
5687315d
...
...
@@ -2,9 +2,14 @@
<div
class=
"calender"
>
<i
class=
"el-icon-date"
@
click=
"dialogTableVisible = true"
></i>
<el-dialog
:visible
.
sync=
"dialogTableVisible"
>
<full-calendar
:events=
"fcEvents"
locale=
"en"
></full-calendar>
<full-calendar
:events=
"fcEvents"
lang=
"zh"
@
change-month=
"changeMonth"
@
event-click=
"eventClick"
@
day-click=
"dayClick"
></full-calendar>
</el-dialog>
</div>
</
template
>
...
...
@@ -31,6 +36,11 @@
required
:
false
}
},
zh
:
{
weekNames
:
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
],
monthNames
:
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
,
'10月'
,
'11月'
,
'12月'
],
titleFormat
:
'yyyy年MM月'
},
data
()
{
return
{
fcEvents
:
[],
...
...
@@ -62,6 +72,15 @@
})
console
.
log
(
self
.
fcEvents
)
})
},
changeMonth
(
start
,
end
,
current
)
{
console
.
log
(
'changeMonth'
,
start
.
format
(),
end
.
format
(),
current
.
format
())
},
eventClick
(
event
,
jsEvent
,
pos
)
{
console
.
log
(
'eventClick'
,
event
,
jsEvent
,
pos
)
},
dayClick
(
day
,
jsEvent
)
{
console
.
log
(
'dayClick'
,
day
,
jsEvent
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/haomo/components/forms/HmComplexForm.vue
View file @
5687315d
This diff is collapsed.
Click to expand it.
src/views/haomo/components/forms/index.vue
View file @
5687315d
<
template
>
<!--:tableId="tableId"-->
<div>
<hm-complex-form
:schema=
"schema['HmUser']"
:columns=
"showUserColumns"
:buttons=
"showUserButtons"
:layout=
"layout"
:tableId=
"tableId"
>
>
</hm-complex-form>
</div>
</
template
>
...
...
@@ -25,17 +26,33 @@
return
{
// widgetType值 1:普通input 2:下拉框 (如果是下拉框 再传一个options表示下拉框选项)3:复选框 4:文本域 5:富文本 6:日期 7:单选框
showUserColumns
:
[
{
name
:
'用户名称'
,
codeCamel
:
'username'
,
widgetType
:
1
},
{
name
:
'电子邮件'
,
codeCamel
:
'email'
,
widgetType
:
5
},
{
name
:
'选择类型'
,
codeCamel
:
'type'
,
widgetType
:
2
,
options
:
[
'选项1'
,
'选项2'
]
},
{
name
:
'选择头像'
,
codeCamel
:
'avatar'
,
widgetType
:
3
,
options
:
[
'美女'
,
'帅哥'
]
},
{
codeCamel
:
'password'
,
widgetType
:
4
},
{
name
:
'新建时间'
,
codeCamel
:
'createTime'
,
widgetType
:
6
,
dateType
:
'datetime'
,
dateFormate
:
'yyyy-MM-dd HH:mm:ss'
},
{
name
:
'登陆id'
,
codeCamel
:
'loginid'
,
widgetType
:
7
,
options
:
[
'会员'
,
'访客'
]
}
{
name
:
'用户名称'
,
codeCamel
:
'username'
,
widgetType
:
1
,
disabled
:
false
,
change
:
this
.
inputChange
// rule: { required: true, message: '用户名不能为空', trigger: 'blur' }
},
{
name
:
'电子邮件'
,
codeCamel
:
'email'
,
widgetType
:
5
,
disabled
:
false
,
change
:
this
.
inputChange
// rule: [
// { required: true, message: '请输入邮箱地址', trigger: 'blur' },
// { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur,change' }
// ]
},
{
name
:
'选择类型'
,
codeCamel
:
'type'
,
widgetType
:
2
,
multiple
:
false
,
change
:
this
.
inputChange
,
options
:
[
{
value
:
1
,
label
:
'企业'
},
{
value
:
3
,
label
:
'代理商'
}
]
},
{
name
:
'部门ID'
,
codeCamel
:
'departmentId'
,
widgetType
:
3
,
options
:
[
'美女'
,
'帅哥'
],
change
:
this
.
inputChange
},
{
codeCamel
:
'password'
,
widgetType
:
4
,
change
:
this
.
inputChange
},
{
name
:
'新建时间'
,
codeCamel
:
'createTime'
,
widgetType
:
6
,
dateType
:
'datetime'
,
dateFormate
:
'yyyy-MM-dd HH:mm:ss'
,
change
:
this
.
inputChange
},
{
name
:
'登陆id'
,
codeCamel
:
'loginid'
,
widgetType
:
7
,
options
:
[
'会员'
,
'访客'
],
change
:
this
.
inputChange
},
{
name
:
'选择头像'
,
codeCamel
:
'avatar'
,
widgetType
:
8
,
change
:
this
.
inputChange
}
],
// 要显示按钮
showUserButtons
:
[
{
text
:
'确定'
,
type
:
1
,
method
:
this
.
method1
},
{
text
:
'确定'
,
type
:
1
,
method
:
this
.
method1
,
beforeSubmit
:
this
.
processData
},
{
text
:
'重置'
,
type
:
2
,
method
:
this
.
method2
},
{
text
:
'取消'
,
type
:
3
,
method
:
this
.
method3
}
],
...
...
@@ -51,9 +68,17 @@
created
()
{
this
.
schema
=
schema
// console.log(this.schema)
this
.
tableId
=
'
0e26566e953449a7a7500c34be39fd26
'
this
.
tableId
=
'
1efff63125954583b0ac5a9c252b9041
'
},
methods
:
{
inputChange
(
val
)
{
// console.log(event)
console
.
log
(
val
)
},
processData
(
object
)
{
console
.
log
(
object
)
return
object
},
method1
()
{
console
.
log
(
'method1'
)
},
...
...
This diff is collapsed.
Click to expand it.
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