5.24宁夏权限修改

This commit is contained in:
FrancisHu 2024-05-24 09:43:31 +08:00
parent 23c99c7cb8
commit c9d8962e93
3 changed files with 74 additions and 57 deletions

View File

@ -3,7 +3,7 @@ class HttpConfig {
baseUrl = "/api"
// #endif
// #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://112.29.103.165:21626"
// 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.81:8080"
// baseUrl = "https://z.csgmall.com.cn/gl"
baseUrl = "http://10.40.92.141:28080"
// #endif
// 基地址
authPath = `${this.baseUrl}/dev-api/auth`
/* authPath = `${this.baseUrl}/dev-api/auth`
systemPath = `${this.baseUrl}/dev-api/system`
basePath = `${this.baseUrl}/dev-api/base`
materialPath = `${this.baseUrl}/dev-api/material`
/* authPath = `${this.baseUrl}/auth`
materialPath = `${this.baseUrl}/dev-api/material` */
authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base`
materialPath = `${this.baseUrl}/material` */
materialPath = `${this.baseUrl}/material`
// 短链
serviceUrl = {
login: {

View File

@ -680,9 +680,14 @@ import { basePath } from '../../public'
onShow() {
let that = this
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']
that.initFetch()
that.getRoles()
// that.getRoles()
}
}
</script>

View File

@ -121,6 +121,7 @@ import { basePath } from '../../public';
]
}
},
ableUseArr: ['admin', 'em04', 'me02', 'dm03']
}
},
computed: {
@ -265,11 +266,19 @@ import { basePath } from '../../public';
},
async formSubmit () {
let that = this
let nowRole = uni.getStorageSync('userInfo').roles.join(',')
await this.getgreementId()
if(this.deptFormData.deptName = ''){
return;
}
let that = this
if (!that.ableUseArr.includes(nowRole)) {
uni.showToast({
icon: 'none',
title: '当前角色没有操作权限!'
})
} else {
// console.log(1);
that.$refs.deptForm.validate().then(formData => {
console.log(formData, that.totalGoods);
that.totalGoods = that.totalGoods.map((item) => {
@ -324,6 +333,7 @@ import { basePath } from '../../public';
})
that.$refs.popup.close()
})
}
},
deptChange (e) {
let that = this
@ -410,6 +420,7 @@ import { basePath } from '../../public';
})
} */
//
console.log(uni.getStorageSync('userInfo').roles.join(','))
that.$api.fetchMaterial.getDeptList().then(res => {
if (res.data.code == 200) {
that.deptRange = res.data.data.map((item) => {