|
@@ -33,9 +33,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- EMPLOYEE_STATUS
|
|
|
-} from '@/utils/dict'
|
|
|
+import DICT from '@/utils/dict'
|
|
|
import {
|
|
|
getRosterList
|
|
|
} from '@/api/system'
|
|
@@ -46,6 +44,7 @@ export default {
|
|
|
drawer: false,
|
|
|
loading: false,
|
|
|
items: [],
|
|
|
+ employeeStatus: [],
|
|
|
headers: [
|
|
|
{ label: '上级机构', prop: 'parentOrganizationName' },
|
|
|
{ label: '部门', prop: 'deptName' },
|
|
@@ -56,8 +55,8 @@ export default {
|
|
|
label: '员工状态',
|
|
|
prop: 'employeeStatus',
|
|
|
handle: (v) => {
|
|
|
- const item = EMPLOYEE_STATUS.find(e => e.value === v)
|
|
|
- return item.text
|
|
|
+ const item = this.employeeStatus.find(e => +e.value === v)
|
|
|
+ return item.label
|
|
|
}
|
|
|
},
|
|
|
{ label: '人员类别', prop: 'personnelCategory' },
|
|
@@ -78,6 +77,7 @@ export default {
|
|
|
this.drawer = true
|
|
|
this.loading = true
|
|
|
this.items = []
|
|
|
+ await this.getEmployeeStatus()
|
|
|
try {
|
|
|
const { data } = await getRosterList({
|
|
|
page: { size: 9999, current: 1, orders: [{ column: 'create_date', asc: false }] },
|
|
@@ -92,6 +92,14 @@ export default {
|
|
|
} finally {
|
|
|
this.loading = false
|
|
|
}
|
|
|
+ },
|
|
|
+ async getEmployeeStatus () {
|
|
|
+ try {
|
|
|
+ const data = await DICT.get('EMPLOYEE_STATUS')
|
|
|
+ this.employeeStatus = data
|
|
|
+ } catch (error) {
|
|
|
+ this.$snackbar.error(error)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|