瀏覽代碼

对公务用车 的 后台界面json上传 进行调整

zhanghao 1 月之前
父節點
當前提交
504de14406
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 2 2
      src/api/zcustom/public.js
  2. 3 2
      src/views/zcustom/public/index.vue

+ 2 - 2
src/api/zcustom/public.js

@@ -57,9 +57,9 @@ export function uploadJson(type, json) {
   return request({
   return request({
     url: '/zcustom/public/upload',
     url: '/zcustom/public/upload',
     params: {
     params: {
-      type: type,
-      json: json
+      type: type
     },
     },
+    data: json,
     method: 'post'
     method: 'post'
   })
   })
 }
 }

+ 3 - 2
src/views/zcustom/public/index.vue

@@ -262,7 +262,7 @@ export default {
           label: '监控管理-未带工单预警、超速预警数、节假日预警数'
           label: '监控管理-未带工单预警、超速预警数、节假日预警数'
         }
         }
       ],
       ],
-      json: "",
+      json: undefined,
       op:false,
       op:false,
       // 根路径
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
       baseURL: process.env.VUE_APP_BASE_API,
@@ -414,7 +414,8 @@ export default {
   },
   },
   methods: {
   methods: {
     sure(){
     sure(){
-      const jsonString = encodeURIComponent(JSON.stringify(this.json));
+      const jsonString = JSON.parse(this.json)
+      console.log(jsonString)
       uploadJson(this.value, jsonString).then(res => {
       uploadJson(this.value, jsonString).then(res => {
 
 
       })
       })