|
@@ -30,18 +30,13 @@ export default {
|
|
|
created () {
|
|
|
const _this = this
|
|
|
// console.log(_this.code, '_this.code')
|
|
|
- Promise.all([listLookUp({ code: '' }), getLookUpData({
|
|
|
+ getLookUpData({
|
|
|
pageNo: 1,
|
|
|
pageSize: 1000,
|
|
|
lookupCode: _this.code
|
|
|
- })]).then(results => {
|
|
|
- const _all = results[0]
|
|
|
- const _data = results[1]
|
|
|
- if (_all.status + '' === '200' && _data.status + '' === '200') {
|
|
|
- _this.dataList = _data.data.list
|
|
|
- const a = _.find(_all.data, ['code', _this.code])
|
|
|
- // console.log(a)
|
|
|
- _this.placeholderText = '请选择' + (a != undefined ? a.name : '')
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.dataList = res.data.list
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -79,8 +74,8 @@ export default {
|
|
|
|
|
|
const on = {
|
|
|
change: obj => {
|
|
|
- this.$emit('change', obj, _.find(this.dataList, ['code', obj]))
|
|
|
this.$emit('input', obj)
|
|
|
+ this.$emit('change', obj, _.find(this.dataList, ['code', obj]))
|
|
|
}
|
|
|
}
|
|
|
if (this.showType === 'tabs') {
|