|
@@ -44,9 +44,6 @@ import {
|
|
|
getAllocationStatistics,
|
|
|
saveAllocation
|
|
|
} from '@/api/bonus'
|
|
|
-import {
|
|
|
- getOrganizationTree
|
|
|
-} from '@/utils/dict'
|
|
|
import { STATUS_LIST } from '../utils'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
@@ -68,12 +65,11 @@ export default {
|
|
|
query: {},
|
|
|
employeeCategoryItems: [],
|
|
|
totalGrantPerformanceSalary: 0,
|
|
|
- deptItems: [],
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['employeeInfo']),
|
|
|
+ ...mapGetters(['employeeInfo', 'organizationTree']),
|
|
|
totalAllocationPerformanceSalary () {
|
|
|
return Object.values(this.values).reduce((r, v) => {
|
|
|
return new Decimal(r).plus(v || 0)
|
|
@@ -103,7 +99,7 @@ export default {
|
|
|
options: {
|
|
|
clearable: true,
|
|
|
placeholder: '请选择部门',
|
|
|
- options: this.deptItems,
|
|
|
+ options: this.organizationTree,
|
|
|
showAllLevels: false,
|
|
|
props: {
|
|
|
emitPath: false,
|
|
@@ -128,7 +124,6 @@ export default {
|
|
|
},
|
|
|
async created () {
|
|
|
this.loading = true
|
|
|
- this.onGetDept()
|
|
|
await this.getEmployeeCategoryItems()
|
|
|
this.searchValues.organizationNo = this.employeeInfo.organizationNo
|
|
|
this.query = { ...this.searchValues }
|
|
@@ -159,13 +154,6 @@ export default {
|
|
|
// // this.$set(this.values, e.employeePerformanceId, e.allocationPerformanceSalary || null)
|
|
|
// })
|
|
|
},
|
|
|
- async onGetDept () {
|
|
|
- const data = await getOrganizationTree()
|
|
|
- if (!data) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.deptItems = data
|
|
|
- },
|
|
|
async getEmployeeCategoryItems () {
|
|
|
try {
|
|
|
const { data } = await getAllocationEmployeeCategory({
|