diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js
index 20d3bde3..72a187c8 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -49,7 +50,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js
index 9b87d206..1c74307d 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -28,7 +29,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -71,7 +73,8 @@ export default {
method: 'post',
data: data,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
});
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js
index 09a34acd..58ab53c7 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
index 9c82e36c..c9fbbe0c 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 获取油罐
tankList: function(params) {
@@ -8,7 +8,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -29,7 +30,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -51,7 +53,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -70,7 +73,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js
index c048e6b2..feffb8ab 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 获取原料
inventoryList: function(params) {
@@ -8,7 +8,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -21,7 +22,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -44,7 +46,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -63,7 +66,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js
index 18041138..ab4a0ea6 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -28,7 +29,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js
index 5af15e7d..1003730f 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js
@@ -1,5 +1,6 @@
import request from '@/utils/request'
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +10,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js
index 50fac6ce..c9ac3283 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js
@@ -1,5 +1,6 @@
import request from '@/utils/request'
+let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@@ -9,7 +10,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
@@ -51,7 +53,8 @@ export default {
method: 'post',
data: params,
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'token': tokens
}
})
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js
index dba15f70..5ba06bd2 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js
@@ -2,6 +2,22 @@ import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
+// 登录
+export function doLogin(data) {
+ return request({
+ url: '/cyf/sys/doLogin',
+ method: 'post',
+ data: data,
+ headers: { 'Content-Type': 'application/json' }
+ })
+}
+// 获取登录人员信息
+ export function getUserById(sid) {
+ return request({
+ url: '/cyf/sys/getUserById/' + sid
+ })
+
+ }
// 登录
export function login(data) {
return request({
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg
new file mode 100644
index 00000000..209287ae
Binary files /dev/null and b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg differ
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue
index a15bb217..ce084f0d 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue
@@ -19,18 +19,12 @@
export default {
data() {
return {
- Orgname: '',
- departmentName: '',
name: '',
year:'',
- pNameAndDepartmentNameAndPostName:''
}
},
mounted() {
- this.Orgname = window.sessionStorage.getItem('Orgname')
- this.departmentName = window.sessionStorage.getItem('departmentName')
- this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('defaultOrgPathName')
- this.name = window.sessionStorage.getItem('name')
+ this.name = window.sessionStorage.getItem('userName')
var nowDate = new Date()
this.year = nowDate.getFullYear()
},
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
index 85eee04e..a166b139 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
@@ -20,7 +20,7 @@ export const constantRoutes = [{
},
{
path: '/',
- redirect: 'index'
+ redirect: 'login'
}, {
path: '/login',
component: () => import('@/views/login/login.vue')
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js
index 12093fa6..194f41dc 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js
@@ -1,7 +1,13 @@
import axios from 'axios'
-import { MessageBox, Message } from 'element-ui'
+import {
+ MessageBox,
+ Message
+} from 'element-ui'
import store from '@/store'
-import { getToken, getStorage } from '@/utils/auth'
+import {
+ getToken,
+ getStorage
+} from '@/utils/auth'
// create an axios instance
const service = axios.create({
@@ -51,7 +57,7 @@ service.interceptors.response.use(
response => {
const res = response.data
const statusCode = response.status
-
+ console.log('statusCode>>>' + statusCode)
// if the custom code is not 20000, it is judged as an error.
if (statusCode !== 200) {
Message({
@@ -62,7 +68,8 @@ service.interceptors.response.use(
})
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
- if (statusCode === 401 || res.code === '5000' || res.code === 5000 || res.code === 50012 || res.code === 50014) {
+ if (statusCode === 401 || res.code === '5000' || res.code === 5000 || res.code === 50012 || res.code ===
+ 50014) {
// to re-login
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
confirmButtonText: '重新登录',
@@ -77,7 +84,7 @@ service.interceptors.response.use(
}
return Promise.reject(new Error(res.message || 'Error'))
} else {
- if (!res.success) {
+ if (!res.success && res.success !== null && res.success !== undefined) {
Message({
message: res.msg || 'Error',
type: 'error',
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue
index ea1e53d3..f2344a5f 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue
@@ -37,6 +37,7 @@
贷后监管体系
+醇油坊进销存管理平台