|
@@ -1,122 +1,19 @@
|
|
|
<template>
|
|
|
<div class="pa-3 white">
|
|
|
- <!-- <m-search class="mb-3" :items="searchItems" v-model="searchValues" @search="onSearch"></m-search> -->
|
|
|
- <m-table
|
|
|
- v-loading="loading"
|
|
|
- :items="items"
|
|
|
- :headers="headers"
|
|
|
- :page-size="pageInfo.size"
|
|
|
- :page-current="pageInfo.current"
|
|
|
- :total="total"
|
|
|
- @page-change="onPageChange"
|
|
|
- >
|
|
|
- <!-- <template #card-tools>
|
|
|
- <m-button type="orange" icon="el-icon-plus" @click="onAdd">新增</m-button>
|
|
|
- </template> -->
|
|
|
- <template #actions="{ row }">
|
|
|
- <m-button type="primary" text @click="onEdit(row)">编辑</m-button>
|
|
|
- </template>
|
|
|
- </m-table>
|
|
|
- <BonusSettingEdit ref="bonusSettingEditRefs" @success="onInit"></BonusSettingEdit>
|
|
|
+ <ParamsSetting></ParamsSetting>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- getBonusSettingPage
|
|
|
-} from '@/api/bonus'
|
|
|
-// import { mapGetters } from 'vuex'
|
|
|
-import BonusSettingEdit from './bonusSettingEdit.vue'
|
|
|
+import ParamsSetting from '@/components/ParamsSetting'
|
|
|
export default {
|
|
|
name: 'bonusSetting',
|
|
|
- components: { BonusSettingEdit },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- searchValues: {},
|
|
|
- headers: [
|
|
|
- // { label: '适用机构', prop: 'organizationName' },
|
|
|
- // { label: '适用岗位', prop: 'postName' },
|
|
|
- { label: '配置名称', prop: 'configurationTitle' },
|
|
|
- { label: '配置占比', prop: 'configurationValue' },
|
|
|
- { label: '操作', prop: 'actions', fixed: 'right', width: 300 }
|
|
|
- ],
|
|
|
- items: [],
|
|
|
- total: 0,
|
|
|
- orders: [],
|
|
|
- pageInfo: {
|
|
|
- current: 1,
|
|
|
- size: 10
|
|
|
- },
|
|
|
- loading: false
|
|
|
- }
|
|
|
- },
|
|
|
- // computed: {
|
|
|
- // ...mapGetters(['organizationTree']),
|
|
|
- // searchItems () {
|
|
|
- // return [
|
|
|
- // {
|
|
|
- // label: '机构',
|
|
|
- // prop: 'organizationNo',
|
|
|
- // type: 'cascader',
|
|
|
- // options: {
|
|
|
- // placeholder: '请选择机构',
|
|
|
- // options: this.organizationTree,
|
|
|
- // showAllLevels: false,
|
|
|
- // props: {
|
|
|
- // emitPath: false,
|
|
|
- // checkStrictly: true,
|
|
|
- // value: 'organizationNo',
|
|
|
- // label: 'organizationName',
|
|
|
- // children: 'child'
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- // },
|
|
|
- created () {
|
|
|
- this.onInit()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async onInit () {
|
|
|
- this.loading = true
|
|
|
- try {
|
|
|
- const { data } = await getBonusSettingPage({
|
|
|
- page: {
|
|
|
- ...this.pageInfo,
|
|
|
- orders: this.orders
|
|
|
- },
|
|
|
- entity: {
|
|
|
- ...this.searchValues,
|
|
|
- configurationCategory: '绩效奖金配置'
|
|
|
- }
|
|
|
- })
|
|
|
- this.items = data.records
|
|
|
- this.total = data.total
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error)
|
|
|
- } finally {
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- },
|
|
|
- onAdd () {
|
|
|
- this.$refs.bonusSettingEditRefs.open()
|
|
|
- },
|
|
|
- onEdit (item) {
|
|
|
- this.$refs.bonusSettingEditRefs.open(item)
|
|
|
- },
|
|
|
- onSearch () {
|
|
|
- this.pageInfo.current = 1
|
|
|
- this.onInit()
|
|
|
- },
|
|
|
- onPageChange (index) {
|
|
|
- this.pageInfo.current = index
|
|
|
- this.onInit()
|
|
|
- }
|
|
|
+ components: {
|
|
|
+ ParamsSetting
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- /* 自定义样式 */
|
|
|
+
|
|
|
</style>
|