首页、角色新增、编辑bug修改
This commit is contained in:
@@ -242,9 +242,18 @@ export default {
|
|||||||
if (this.personalData.length === 0) {
|
if (this.personalData.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let strData = JSON.stringify(this.personalData)
|
let strData = this.personalData
|
||||||
strData = strData.replaceAll('principalName', 'name').replaceAll('comeAllMoney', 'value')
|
let arr = []
|
||||||
let arr = JSON.parse(strData)
|
strData.forEach(item => {
|
||||||
|
item.name = item.principalName
|
||||||
|
item.value = item.comeAllMoney
|
||||||
|
arr.push(item)
|
||||||
|
})
|
||||||
|
// IE不兼容的代码
|
||||||
|
// let strData = JSON.stringify(this.personalData)
|
||||||
|
// console.log(typeof strData)
|
||||||
|
// strData = strData.replaceAll('principalName', 'name').replaceAll('comeAllMoney', 'value')
|
||||||
|
// let arr = JSON.parse(strData)
|
||||||
arr.filter(tt => tt.value = Number(tt.value))
|
arr.filter(tt => tt.value = Number(tt.value))
|
||||||
let legendData = []
|
let legendData = []
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
@@ -267,9 +276,17 @@ export default {
|
|||||||
if (this.departData.length === 0) {
|
if (this.departData.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let strData = JSON.stringify(this.departData)
|
let strData = this.departData
|
||||||
strData = strData.replaceAll('departName', 'name').replaceAll('comeAllMoney', 'value')
|
let arr = []
|
||||||
let arr = JSON.parse(strData)
|
strData.forEach(item => {
|
||||||
|
item.name = item.departName
|
||||||
|
item.value = item.comeAllMoney
|
||||||
|
arr.push(item)
|
||||||
|
})
|
||||||
|
// IE不兼容的代码
|
||||||
|
// let strData = JSON.stringify(this.departData)
|
||||||
|
// strData = strData.replaceAll('departName', 'name').replaceAll('comeAllMoney', 'value')
|
||||||
|
// let arr = JSON.parse(strData)
|
||||||
arr.filter(tt => tt.value = Number(tt.value))
|
arr.filter(tt => tt.value = Number(tt.value))
|
||||||
let legendData = []
|
let legendData = []
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
@@ -292,9 +309,17 @@ export default {
|
|||||||
if (this.workingGroupData.length === 0) {
|
if (this.workingGroupData.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let strData = JSON.stringify(this.workingGroupData)
|
let strData = this.workingGroupData
|
||||||
strData = strData.replaceAll('workGroup', 'name').replaceAll('comeAllMoney', 'value')
|
let arr = []
|
||||||
let arr = JSON.parse(strData)
|
strData.forEach(item => {
|
||||||
|
item.name = item.workGroup
|
||||||
|
item.value = item.comeAllMoney
|
||||||
|
arr.push(item)
|
||||||
|
})
|
||||||
|
// IE不兼容的代码
|
||||||
|
// let strData = JSON.stringify(this.workingGroupData)
|
||||||
|
// strData = strData.replaceAll('workGroup', 'name').replaceAll('comeAllMoney', 'value')
|
||||||
|
// let arr = JSON.parse(strData)
|
||||||
arr.filter(tt => tt.value = Number(tt.value))
|
arr.filter(tt => tt.value = Number(tt.value))
|
||||||
let legendData = []
|
let legendData = []
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
@@ -317,14 +342,23 @@ export default {
|
|||||||
if (this.companyData.length === 0) {
|
if (this.companyData.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let strData = JSON.stringify(this.companyData)
|
let strData = this.companyData
|
||||||
strData = strData.replaceAll('chargeCompanyName', 'name').replaceAll('comeAllMoney', 'value')
|
let arr = []
|
||||||
let arr = JSON.parse(strData)
|
strData.forEach(item => {
|
||||||
|
item.name = item.chargeCompanyName
|
||||||
|
item.value = item.comeAllMoney
|
||||||
|
arr.push(item)
|
||||||
|
})
|
||||||
|
// IE不兼容的代码
|
||||||
|
// let strData = JSON.stringify(this.companyData)
|
||||||
|
// strData = strData.replaceAll('chargeCompanyName', 'name').replaceAll('comeAllMoney', 'value')
|
||||||
|
// let arr = JSON.parse(strData)
|
||||||
arr.filter(tt => tt.value = Number(tt.value))
|
arr.filter(tt => tt.value = Number(tt.value))
|
||||||
let legendData = []
|
let legendData = []
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
legendData.push(item.name)
|
legendData.push(item.name)
|
||||||
})
|
})
|
||||||
|
console.log(arr)
|
||||||
let option = this.option
|
let option = this.option
|
||||||
option.series[0].data = arr
|
option.series[0].data = arr
|
||||||
option.legend.data = legendData
|
option.legend.data = legendData
|
||||||
@@ -397,10 +431,14 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
& > img {
|
& > img {
|
||||||
max-width: 100%;
|
display: inline-block;
|
||||||
|
max-height: 68px;
|
||||||
|
max-width: 68px;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-text {
|
&-text {
|
||||||
|
max-width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -409,6 +447,7 @@ export default {
|
|||||||
font-family: PingFang SC, PingFang SC-Regular;
|
font-family: PingFang SC, PingFang SC-Regular;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
* 查询所有角色
|
* 查询所有角色
|
||||||
* */
|
* */
|
||||||
initAllRole() {
|
initAllRole() {
|
||||||
getAction('/sys/role/treeListPage').then(res => {
|
getAction('/sys/role/treeListPage', {pageSize: -1}).then(res => {
|
||||||
this.roleList = res.result.records
|
this.roleList = res.result.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user