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,65 +266,74 @@ 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)) {
|
||||||
that.$refs.deptForm.validate().then(formData => {
|
uni.showToast({
|
||||||
console.log(formData, that.totalGoods);
|
icon: 'none',
|
||||||
that.totalGoods = that.totalGoods.map((item) => {
|
title: '当前角色没有操作权限!'
|
||||||
return {
|
})
|
||||||
id: item['id'],
|
} else {
|
||||||
|
// console.log(1);
|
||||||
|
that.$refs.deptForm.validate().then(formData => {
|
||||||
|
console.log(formData, that.totalGoods);
|
||||||
|
that.totalGoods = that.totalGoods.map((item) => {
|
||||||
|
return {
|
||||||
|
id: item['id'],
|
||||||
|
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||||
|
companyId: item['companyId'],
|
||||||
|
status: '0',
|
||||||
|
// createTime: that.formatDate(new Date().getTime()),
|
||||||
|
typeId: item['typeId'],
|
||||||
|
preNum: item['bookNum']
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.sendData = {
|
||||||
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
||||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||||
companyId: item['companyId'],
|
unitId: formData.deptName,
|
||||||
status: '0',
|
projectId: formData.projName,
|
||||||
|
agreementId: that.deptFormData.agreementId,
|
||||||
|
agreementCode: that.deptFormData.agreementCode,
|
||||||
|
taskType: 29,
|
||||||
|
taskStatus: 30,
|
||||||
// createTime: that.formatDate(new Date().getTime()),
|
// createTime: that.formatDate(new Date().getTime()),
|
||||||
typeId: item['typeId'],
|
leaseApplyInfo: {
|
||||||
preNum: item['bookNum']
|
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
|
||||||
|
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
|
||||||
|
},
|
||||||
|
leaseApplyDetails: that.totalGoods
|
||||||
}
|
}
|
||||||
|
console.log('that.sendData =================== ',that.sendData);
|
||||||
|
// 提交预约商品
|
||||||
|
that.$api.fetchMaterial.subCart(that.sendData).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.data.msg,
|
||||||
|
success: () => {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/orderCart/orderCart'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title:res.data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
that.$refs.popup.close()
|
||||||
})
|
})
|
||||||
that.sendData = {
|
}
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
|
||||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
|
||||||
unitId: formData.deptName,
|
|
||||||
projectId: formData.projName,
|
|
||||||
agreementId: that.deptFormData.agreementId,
|
|
||||||
agreementCode: that.deptFormData.agreementCode,
|
|
||||||
taskType: 29,
|
|
||||||
taskStatus: 30,
|
|
||||||
// createTime: that.formatDate(new Date().getTime()),
|
|
||||||
leaseApplyInfo: {
|
|
||||||
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
|
|
||||||
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
|
|
||||||
},
|
|
||||||
leaseApplyDetails: that.totalGoods
|
|
||||||
}
|
|
||||||
console.log('that.sendData =================== ',that.sendData);
|
|
||||||
// 提交预约商品
|
|
||||||
that.$api.fetchMaterial.subCart(that.sendData).then(res => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.data.code == 200) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: res.data.msg,
|
|
||||||
success: () => {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/orderCart/orderCart'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title:res.data.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
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