From efc04c07a0c3baf2ab60a41d6d274e8bb8c478b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 4 Apr 2023 11:30:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/feedback/feedback.js | 10 + ruoyi-ui/src/api/system/user.js | 3 +- ruoyi-ui/src/utils/request.js | 16 +- .../src/views/feedback/feedback/index.vue | 427 ++---------------- .../alarmSendingSettings/index.vue | 4 +- .../carMonitoring/index.vue | 6 +- .../views/system/user/profile/userAvatar.vue | 5 +- 7 files changed, 78 insertions(+), 393 deletions(-) create mode 100644 ruoyi-ui/src/api/feedback/feedback.js diff --git a/ruoyi-ui/src/api/feedback/feedback.js b/ruoyi-ui/src/api/feedback/feedback.js new file mode 100644 index 0000000..807a650 --- /dev/null +++ b/ruoyi-ui/src/api/feedback/feedback.js @@ -0,0 +1,10 @@ +import request from "@/utils/request"; + +export function uploadImg(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + data: data, + isNoLang:true, + }) +} diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index f2f76ef..5304dc9 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -105,7 +105,8 @@ export function uploadAvatar(data) { return request({ url: '/system/user/profile/avatar', method: 'post', - data: data + data: data, + isNoLang:true, }) } diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 3d89aae..3136544 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -55,13 +55,15 @@ service.interceptors.request.use(config => { config.url = url; } if (config.method === 'post') { - config.data = typeof config.data === 'object' ? JSON.stringify({ - ...config.data, - lang - }) : JSON.stringify({ - ...JSON.parse(config.data || '{}'), - lang - }); + if (!config.isNoLang) { + config.data = typeof config.data === 'object' ? JSON.stringify({ + ...config.data, + lang + }) : JSON.stringify({ + ...JSON.parse(config.data || '{}'), + lang + }); + } } if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { const requestObj = { diff --git a/ruoyi-ui/src/views/feedback/feedback/index.vue b/ruoyi-ui/src/views/feedback/feedback/index.vue index 5638739..ab0e535 100644 --- a/ruoyi-ui/src/views/feedback/feedback/index.vue +++ b/ruoyi-ui/src/views/feedback/feedback/index.vue @@ -1,127 +1,31 @@ - diff --git a/ruoyi-ui/src/views/realTimeMonitoring/alarmSendingSettings/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/alarmSendingSettings/index.vue index 358ab25..0b48ac0 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/alarmSendingSettings/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/alarmSendingSettings/index.vue @@ -97,7 +97,7 @@ const cascaderChange = (e) => { if (!nowClick) return getInfoById(nowClick) .then(val => { - console.log(val) + form.value = val.data }) } const handleQuery = (e) => { @@ -134,4 +134,4 @@ const handleQuery = (e) => { console.log(val) }) } - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue index 627aa9e..e3abc39 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue @@ -355,8 +355,10 @@ const getList = async () => { const tableChange = async (e) => { pageId.value = e.id const {data: info} = await getCarGpsList({id: pageId.value}) + console.log(info) cardInfo.value = { - carLicense: info.carLicense + carLicense: info.carLicense, + name:info.carQueue } let TireRow1 = info.cartype?.split('T')[1]?.split('|').filter(e => e !== '') || [] let title = [] @@ -556,4 +558,4 @@ onBeforeUnmount(() => { background-size: 100% 100%; background-image: url('@/assets/images/pressure.png') } - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 5a92374..5f701bb 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -122,8 +122,11 @@ function beforeUpload(file) { /** 上传图片 */ function uploadImg() { proxy.$refs.cropper.getCropBlob(data => { + console.log(data) let formData = new FormData(); formData.append("avatarfile", data); + setTimeout(() => {console.log(formData)},1) + console.log(formData) uploadAvatar(formData).then(response => { open.value = false; options.img = import.meta.env.VITE_APP_BASE_API + response.imgUrl; @@ -168,4 +171,4 @@ function closeDialog() { line-height: 110px; border-radius: 50%; } - \ No newline at end of file +