人效管理-绩效管理-绩效模板维护-新增排序

dev-scheduling
ysn 1 month ago
parent 156eee2f89
commit dd7ec45029
  1. 48
      src/views/personnelEfficiencyManagement/performanceManagement/templateMaintenance.vue

@ -17,16 +17,40 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@sort-change="sortChange"
> >
<template #menu-left> <template #menu-left>
<el-button type="primary" @click="handleAdd" v-if="permission.performanceAllocation_add">新增绩效</el-button> <el-button type="primary" @click="handleAdd" v-if="permission.performanceAllocation_add">
新增绩效
</el-button>
<!-- <el-button type="danger" @click="batchDelete">删除</el-button> --> <!-- <el-button type="danger" @click="batchDelete">删除</el-button> -->
<!-- <el-button type="primary" @click="maintenanceContents">绩效内容维护</el-button> --> <!-- <el-button type="primary" @click="maintenanceContents">绩效内容维护</el-button> -->
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="primary" text v-if="permission.performanceAllocation_edit" @click="editRow(scope.row)">修改</el-button> <el-button
<el-button type="primary" text v-if="permission.performanceAllocation_delete" @click="deleteRow(scope.row)">删除</el-button> type="primary"
<el-button type="primary" text v-if="permission.performanceAllocation_issue" @click="taskAssignment(scope.row)">下发</el-button> text
v-if="permission.performanceAllocation_edit"
@click="editRow(scope.row)"
>
修改
</el-button>
<el-button
type="primary"
text
v-if="permission.performanceAllocation_delete"
@click="deleteRow(scope.row)"
>
删除
</el-button>
<el-button
type="primary"
text
v-if="permission.performanceAllocation_issue"
@click="taskAssignment(scope.row)"
>
下发
</el-button>
</template> </template>
</avue-crud> </avue-crud>
<batchAddPerf <batchAddPerf
@ -249,7 +273,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters([ 'permission']), ...mapGetters(['permission']),
}, },
mounted() {}, mounted() {},
methods: { methods: {
@ -376,6 +400,20 @@ export default {
this.selectionList = []; this.selectionList = [];
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}, },
//
sortChange({ prop, order }) {
if (!prop) {
//
this.query.orderByField = undefined;
this.query.isAsc = undefined;
} else {
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
this.query.orderByField = orderByField;
this.query.isAsc = order === 'ascending' ? true : false;
}
// //
this.onLoad();
},
onLoad() { onLoad() {
this.loading = true; this.loading = true;
pageBsEfficiencyTemp({ pageBsEfficiencyTemp({

Loading…
Cancel
Save