5.24宁夏权限修改
This commit is contained in:
parent
23c99c7cb8
commit
c9d8962e93
11
apis/http.js
11
apis/http.js
|
|
@ -3,7 +3,7 @@ class HttpConfig {
|
||||||
baseUrl = "/api"
|
baseUrl = "/api"
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
baseUrl = "http://112.29.103.165:21624"
|
// baseUrl = "http://112.29.103.165:21624"
|
||||||
// baseUrl = "http://192.168.0.14:21624"
|
// baseUrl = "http://192.168.0.14:21624"
|
||||||
// baseUrl = "http://112.29.103.165:21626"
|
// baseUrl = "http://112.29.103.165:21626"
|
||||||
// baseUrl = "http://172.20.10.3:8080"
|
// baseUrl = "http://172.20.10.3:8080"
|
||||||
|
|
@ -11,16 +11,17 @@ class HttpConfig {
|
||||||
// baseUrl = "http://10.40.92.52:28080"
|
// baseUrl = "http://10.40.92.52:28080"
|
||||||
// baseUrl = "http://10.40.92.81:8080"
|
// baseUrl = "http://10.40.92.81:8080"
|
||||||
// baseUrl = "https://z.csgmall.com.cn/gl"
|
// baseUrl = "https://z.csgmall.com.cn/gl"
|
||||||
|
baseUrl = "http://10.40.92.141:28080"
|
||||||
// #endif
|
// #endif
|
||||||
// 基地址
|
// 基地址
|
||||||
authPath = `${this.baseUrl}/dev-api/auth`
|
/* authPath = `${this.baseUrl}/dev-api/auth`
|
||||||
systemPath = `${this.baseUrl}/dev-api/system`
|
systemPath = `${this.baseUrl}/dev-api/system`
|
||||||
basePath = `${this.baseUrl}/dev-api/base`
|
basePath = `${this.baseUrl}/dev-api/base`
|
||||||
materialPath = `${this.baseUrl}/dev-api/material`
|
materialPath = `${this.baseUrl}/dev-api/material` */
|
||||||
/* authPath = `${this.baseUrl}/auth`
|
authPath = `${this.baseUrl}/auth`
|
||||||
systemPath = `${this.baseUrl}/system`
|
systemPath = `${this.baseUrl}/system`
|
||||||
basePath = `${this.baseUrl}/base`
|
basePath = `${this.baseUrl}/base`
|
||||||
materialPath = `${this.baseUrl}/material` */
|
materialPath = `${this.baseUrl}/material`
|
||||||
// 短链
|
// 短链
|
||||||
serviceUrl = {
|
serviceUrl = {
|
||||||
login: {
|
login: {
|
||||||
|
|
|
||||||
|
|
@ -680,9 +680,14 @@ import { basePath } from '../../public'
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log(that.roles);
|
console.log(that.roles);
|
||||||
|
that.roles.forEach(item => {
|
||||||
|
console.log(item);
|
||||||
|
if (item == 'em01' || item == 'em02') item = 'jjfgs'
|
||||||
|
if (item == 'dm01' || item == 'dm02') item = 'tsfgs'
|
||||||
|
})
|
||||||
if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs']
|
if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs']
|
||||||
that.initFetch()
|
that.initFetch()
|
||||||
that.getRoles()
|
// that.getRoles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ import { basePath } from '../../public';
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ableUseArr: ['admin', 'em04', 'me02', 'dm03']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -265,11 +266,19 @@ import { basePath } from '../../public';
|
||||||
},
|
},
|
||||||
|
|
||||||
async formSubmit () {
|
async formSubmit () {
|
||||||
|
let that = this
|
||||||
|
let nowRole = uni.getStorageSync('userInfo').roles.join(',')
|
||||||
await this.getgreementId()
|
await this.getgreementId()
|
||||||
if(this.deptFormData.deptName = ''){
|
if(this.deptFormData.deptName = ''){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let that = this
|
if (!that.ableUseArr.includes(nowRole)) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '当前角色没有操作权限!'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// console.log(1);
|
||||||
that.$refs.deptForm.validate().then(formData => {
|
that.$refs.deptForm.validate().then(formData => {
|
||||||
console.log(formData, that.totalGoods);
|
console.log(formData, that.totalGoods);
|
||||||
that.totalGoods = that.totalGoods.map((item) => {
|
that.totalGoods = that.totalGoods.map((item) => {
|
||||||
|
|
@ -324,6 +333,7 @@ import { basePath } from '../../public';
|
||||||
})
|
})
|
||||||
that.$refs.popup.close()
|
that.$refs.popup.close()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deptChange (e) {
|
deptChange (e) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -410,6 +420,7 @@ import { basePath } from '../../public';
|
||||||
})
|
})
|
||||||
} */
|
} */
|
||||||
// 初始化查询全部部门
|
// 初始化查询全部部门
|
||||||
|
console.log(uni.getStorageSync('userInfo').roles.join(','))
|
||||||
that.$api.fetchMaterial.getDeptList().then(res => {
|
that.$api.fetchMaterial.getDeptList().then(res => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
that.deptRange = res.data.data.map((item) => {
|
that.deptRange = res.data.data.map((item) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue