From 176abb9c7de4e481b1234ea40a97ef2cb5f674f0 Mon Sep 17 00:00:00 2001 From: ihzero Date: Tue, 30 Jan 2024 15:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/device/index.vue | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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);