diff --git a/src/components/CustomTable/CustomTable.vue b/src/components/CustomTable/CustomTable.vue index 711fd12..906df42 100644 --- a/src/components/CustomTable/CustomTable.vue +++ b/src/components/CustomTable/CustomTable.vue @@ -18,11 +18,16 @@ - + + + + @@ -63,6 +68,9 @@ export default { applyType:{ type:String, default:'', + }, + modalType:{ + type:String, } }, data(){ diff --git a/src/views/reward/score/index.vue b/src/views/reward/score/index.vue index ee324f0..0fdae03 100644 --- a/src/views/reward/score/index.vue +++ b/src/views/reward/score/index.vue @@ -30,6 +30,7 @@ :actions="tableActions" :query-params="queryParams" :apply-type="applyParam.applyType" + :modal-type="'score'" @handleQuery="handleQuery" @resetQuery="resetQuery" @handleView="handleView" @@ -292,11 +293,12 @@ export default { }, mounted() { this.$store.dispatch('GetInfo').then((res) => { + let filterData = this.tableActions if (res.user.userId === 1){ - let ratingIndex = this.tableActions.findIndex(action => action.text === '评分'); + let ratingIndex = filterData.findIndex(action => action.text === '评分'); if (ratingIndex !== -1) { // 使用 splice 方法将评分项从数组中删除 - this.tableActions.splice(ratingIndex, 1); + filterData.splice(ratingIndex, 1); } } })