lilei 4 yıl önce
ebeveyn
işleme
7f277e1354
1 değiştirilmiş dosya ile 4 ekleme ve 10 silme
  1. 4 10
      src/components/Select/index.js

+ 4 - 10
src/components/Select/index.js

@@ -29,19 +29,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
       }
     })
   },