提交修改

dev
dsh 12 months ago
parent dc8f9c988e
commit 491d7b00cc

@ -18,11 +18,16 @@
</el-table-column>
<!-- Actions Column -->
<el-table-column v-if="actions.length > 0" label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column v-if="actions.length > 0 && modalType !== 'score'" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-for="(action, index) in filteredActions(scope.row.applyStatus)" :key="index" size="mini" type="text" :icon="action.icon" @click="action.handler(scope.row)">{{ action.text }}</el-button>
</template>
</el-table-column>
<el-table-column v-else label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-for="(action, index) in actions" :key="index" size="mini" type="text" :icon="action.icon" @click="action.handler(scope.row)">{{ action.text }}</el-button>
</template>
</el-table-column>
</el-table>
</div>
@ -63,6 +68,9 @@ export default {
applyType:{
type:String,
default:'',
},
modalType:{
type:String,
}
},
data(){

@ -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);
}
}
})

Loading…
Cancel
Save