Commit 2de7ef32 authored by huai.li's avatar huai.li

修改

parent 15d6dbcc
...@@ -5,11 +5,15 @@ import { ...@@ -5,11 +5,15 @@ import {
export default { export default {
data () { data () {
return { return {
createdByArray: [] retNewArray: []
} }
}, },
computed: { computed: {
createdByArray () {
let ret = this.retNewArray.find(item => item.key === this.selectKeyFormat('created_by'))
return ret && [].concat(ret.value)
}
}, },
methods: { methods: {
...@@ -27,10 +31,7 @@ export default { ...@@ -27,10 +31,7 @@ export default {
getNewArray () { getNewArray () {
requestWithJsonAPI(api.getSaveNew) requestWithJsonAPI(api.getSaveNew)
.then((res) => { .then((res) => {
return res.options this.retNewArray = res.options
}).then((opt) => {
let ret = opt.find(item => item.key === this.selectKeyFormat('created_by'))
this.createdByArray = ret && [].concat(ret.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