Commit 7c1ac607 authored by JingChao's avatar JingChao

selectList

parent a6faeefe
......@@ -144,7 +144,7 @@ export default {
let vm = this
if (!vm.disabled) {
let list = []
vum.forEach(vm.dataArray, (date, index, array) => {
vm.dataArray.forEach((date, index, array) => {
list.push({
value: date[vm.valueKey],
name: date[vm.valueName],
......
......@@ -152,7 +152,7 @@ export default {
rangeHandleHeight: 20,
sex: 0,
sexList: [{'code_value': 0, 'code_value_name': '女'}, {'code_value': 1, 'code_value_name': '男'}],
sexList: [{'code_value': 0, 'code_value_name': '女'}, {'code_value': 0, 'code_value_name': '女'},{'code_value': 0, 'code_value_name': '女'}],
nowDate: '2020-12-25',
}
......
......@@ -285,21 +285,18 @@ export default {
selectList: function (selectOption) {
if (typeof selectOption === 'object') {
let list = []
let length = selectOption.list.length
vum.forEach(selectOption.list, function (date, index, array) {
selectOption.list.forEach((data, index, array) => {
list.push({
value: date.code,
name: date.code_name,
parent: date.parent,
value: data.code,
name: data.code_name,
parent: data.parent,
})
if (index === (length - 1)) {
SelectPlugin.show({
list: list,
callBack: selectOption.returnItem,
code: selectOption.code,
object: selectOption.object,
})
}
})
SelectPlugin.show({
list: list,
callBack: selectOption.returnItem,
code: selectOption.code,
object: selectOption.object,
})
}
},
......
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