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({