diff --git a/src/pages/device/index.vue b/src/pages/device/index.vue index e0e37d8..1d6b638 100644 --- a/src/pages/device/index.vue +++ b/src/pages/device/index.vue @@ -443,11 +443,38 @@ }, }, onLoad() { + this.getSupplier(); + this.getProject(); this.queryDataList(); this.getDeviceTypes(); this.getAgriculturalBasic(); }, methods: { + getSupplier(){ + this.$http.get('/api/keywords',{params:{ + type_key:'device-supplier' + }}).then(({data})=>{ + this.supplierlist=data.data.map(e=>{ + return { + label:e.name, + value:e.key + } + }) + console.log(this.supplierlist); + }) + }, + getProject(){ + this.$http.get('/api/keywords',{params:{ + type_key:'device-project' + }}).then(({data})=>{ + this.projectlist=data.data.map(e=>{ + return { + label:e.name, + value:e.key + } + }) + }) + }, queryBtn(){ this.list = []; this.queryDataList(true);