From 130bb5a11735acaea5295dbda3c81d95bd85fba4 Mon Sep 17 00:00:00 2001 From: ChuShiZ Date: Fri, 23 Aug 2024 19:18:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/carManageForm.vue | 89 ++++++++++++++++++++++++++++---------- pages/rescue/initiate.vue | 52 +++++++++++++++++----- 2 files changed, 106 insertions(+), 35 deletions(-) diff --git a/pages/my/carManageForm.vue b/pages/my/carManageForm.vue index 026382b..a905650 100644 --- a/pages/my/carManageForm.vue +++ b/pages/my/carManageForm.vue @@ -365,29 +365,72 @@ }) }, async getDictList() { - request({ - url: "/system/dict/data/type/car_use_nature", - method: 'get', - }).then(res => { - - this.carUseNature.push(res.data) - }) - - request({ - url: "/system/dict/data/type/jyc_type", - method: 'get', - }).then(res => { - this.jycType.push(res.data) - - }) - - request({ - url: "/system/dict/data/type/car_license_color", - method: 'get', - }).then(res => { - this.licenseColor.push(res.data) - - }) + request({ + url: '/system/dict-data/page?pageNo=1&pageSize=100&dictType=car_use_nature', + method: 'get' + }).then(res => { + console.log('res: ',res); + if (res.data && res.data.list && res.data.list.length > 0) { + const data = res.data.list.map(m => { + return { + dictValue: m.value, + dictLabel: m.label + } + }) + this.carUseNature.push(data) + } + }) + // request({ + // url: "/system/dict/data/type/car_use_nature", + // method: 'get', + // }).then(res => { + // + // this.carUseNature.push(res.data) + // }) + request({ + url: '/system/dict-data/page?pageNo=1&pageSize=100&dictType=jyc_type', + method: 'get' + }).then(res => { + console.log('res: ',res); + if (res.data && res.data.list && res.data.list.length > 0) { + const data = res.data.list.map(m => { + return { + dictValue: m.value, + dictLabel: m.label + } + }) + this.jycType.push(data) + } + }) + // request({ + // url: "/system/dict/data/type/jyc_type", + // method: 'get', + // }).then(res => { + // this.jycType.push(res.data) + // + // }) + request({ + url: '/system/dict-data/page?pageNo=1&pageSize=100&dictType=car_license_color', + method: 'get' + }).then(res => { + console.log('res: ',res); + if (res.data && res.data.list && res.data.list.length > 0) { + const data = res.data.list.map(m => { + return { + dictValue: m.value, + dictLabel: m.label + } + }) + this.licenseColor.push(data) + } + }) + // request({ + // url: "/system/dict/data/type/car_license_color", + // method: 'get', + // }).then(res => { + // this.licenseColor.push(res.data) + // + // }) }, } } diff --git a/pages/rescue/initiate.vue b/pages/rescue/initiate.vue index cf3255f..ec2cb56 100644 --- a/pages/rescue/initiate.vue +++ b/pages/rescue/initiate.vue @@ -246,21 +246,49 @@ methods: { newtwo() { request({ - url: '/system/dict/data/type/fee_type', - method: 'get', - - }).then((res) => { - this.manei = res.data - console.log(res); + url: '/system/dict-data/page?pageNo=1&pageSize=100&dictType=fee_type', + method: 'get' + }).then(res => { + console.log('res: ',res); + if (res.data && res.data.list && res.data.list.length > 0) { + this.manei = res.data.list.map(m => { + return { + dictValue: m.value, + dictLabel: m.label + } + }) + } }) + // request({ + // url: '/system/dict/data/type/fee_type', + // method: 'get', + + // }).then((res) => { + // this.manei = res.data + // console.log(res); + // }) request({ - url: '/system/dict/data/type/rescue_car_type', - method: 'get', - - }).then((res) => { - this.car = res.data - console.log(res); + url: '/system/dict-data/page?pageNo=1&pageSize=100&dictType=rescue_car_type', + method: 'get' + }).then(res => { + console.log('res: ',res); + if (res.data && res.data.list && res.data.list.length > 0) { + this.car = res.data.list.map(m => { + return { + dictValue: m.value, + dictLabel: m.label + } + }) + } }) + // request({ + // url: '/system/dict/data/type/rescue_car_type', + // method: 'get', + + // }).then((res) => { + // this.car = res.data + // console.log(res); + // }) }, kcdd() { request({