Commit 7307c7e6 authored by 王康's avatar 王康

form

parent 417ecb34
......@@ -504,7 +504,7 @@
// 下拉框多选时将字符串转为数组
_.each(self.columns, function(item, index) {
if (item.widgetType === 2) {
if (item.widgetType === 2 && item.multiple === true) {
_.forEach(self.formModel, function(value, key) {
if (item.codeCamel === key) {
// console.log(11111, self.formModel[key])
......@@ -605,10 +605,10 @@
transformRequest:
function(obj) {
var str = []
// 删除空值的属性
obj = _.omitBy(obj, function(value) {
return !value
})
// // 删除空值的属性
// obj = _.omitBy(obj, function(value) {
// return !value
// })
for (var p in obj) {
str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]))
}
......
......@@ -6,6 +6,7 @@
:buttons="showUserButtons"
:layout="layout"
:tips="tips"
:tableId="tableId"
:refers="judgeRefers">
</hm-complex-form>
</div>
......@@ -43,7 +44,7 @@
// ]
},
// 2下拉框
{ name: '用户名称', codeCamel: 'username', widgetType: 2, multiple: true,
{ name: '用户名称', codeCamel: 'username', widgetType: 2, multiple: false,
change: this.inputChange, // default: [1], 如果开启多选,默认选中项用数组[1]、[1,2,3]
options: [
{ value: '1', label: '企业' }, // 下拉框的label是选项文字,value是选中值
......
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