From 8cbff341795316159b808505f0668ad9834fa402 Mon Sep 17 00:00:00 2001 From: shawnzhang Date: Wed, 27 Feb 2019 09:05:01 +0800 Subject: [PATCH] =?UTF-8?q?2/26=E6=97=A5=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BB=A5=E5=8F=8A=E8=A7=A3=E5=86=B3=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 969d3471..db3e10ae 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,19 @@ # ERP -##work for nwow +##work for nwow ###ERP project ####2019/2/12 add topmenu -#### 2019/2/26 遇到的一些问题以及解决方案 +#### 2019/2/25 遇到的一些问题以及解决方案 #####tagsview的页面关闭操作 -```const view = { path: '/EmployeeInformation/NewEmployeeInformation', name: 'NewEmployeeInformation', fullPath: '/EmployeeInformation/NewEmployeeInformation', title: 'NewEmployeeInformation' } this.$store.dispatch('delView', view).then(({ visitedViews }) => {})``` +``` +const view = { +path: '/EmployeeInformation/NewEmployeeInformation', + name: 'NewEmployeeInformation', + fullPath: '/EmployeeInformation/NewEmployeeInformation', + title: 'NewEmployeeInformation' + } + +this.$store.dispatch('delView', view).then(({ visitedViews }) => {}) +``` #####拼接json 方法 ```extend(jsonbject1, jsonbject2) { @@ -15,5 +24,22 @@ for (const attr in jsonbject2) { resultJsonObject[attr] = jsonbject2[attr] } - return resultJsonObject - }``` \ No newline at end of file + return resultJsonObject} +``` + + +#### 2019/2/26 遇到的一些问题以及解决方案 +##### axios 向后端发送请求数据时如果为空或者underfined时判断一下 +```export function getemplist(query) { + var params = new URLSearchParams() + // 判断是否为空值 + if (query.jobnumber !== '') { + params.append('jobnumber', query.jobnumber) // 你要传给后台的参数值 key/value + } + return request({ + url: 'xxxx', + method: 'post', + data: params + }) + } +```