2019-02-12 18:03:39 +08:00
|
|
|
# ERP
|
2019-02-27 09:09:53 +08:00
|
|
|
## work for nwow
|
|
|
|
### ERP project
|
|
|
|
#### 2019/2/12 add topmenu
|
2019-02-27 09:05:01 +08:00
|
|
|
#### 2019/2/25 遇到的一些问题以及解决方案
|
2019-02-27 09:09:53 +08:00
|
|
|
##### tagsview的页面关闭操作
|
2019-02-27 09:05:01 +08:00
|
|
|
```
|
|
|
|
const view = {
|
|
|
|
path: '/EmployeeInformation/NewEmployeeInformation',
|
|
|
|
name: 'NewEmployeeInformation',
|
|
|
|
fullPath: '/EmployeeInformation/NewEmployeeInformation',
|
|
|
|
title: 'NewEmployeeInformation'
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$store.dispatch('delView', view).then(({ visitedViews }) => {})
|
|
|
|
```
|
2019-02-26 09:30:44 +08:00
|
|
|
|
2019-02-27 09:09:53 +08:00
|
|
|
##### 拼接json 方法
|
2019-02-26 09:30:44 +08:00
|
|
|
```extend(jsonbject1, jsonbject2) {
|
|
|
|
var resultJsonObject = {}
|
|
|
|
for (const attr in jsonbject1) {
|
|
|
|
resultJsonObject[attr] = jsonbject1[attr]
|
|
|
|
}
|
|
|
|
for (const attr in jsonbject2) {
|
|
|
|
resultJsonObject[attr] = jsonbject2[attr]
|
|
|
|
}
|
2019-02-27 09:05:01 +08:00
|
|
|
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
|
|
|
|
})
|
|
|
|
}
|
|
|
|
```
|