Commit 5687315d authored by 杨柠瑞's avatar 杨柠瑞

coding

parents eda9d17f c3638ac0
......@@ -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)
}
}
}
......
<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')
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment