|
|
@ -58,8 +58,9 @@ |
|
|
|
<el-table-column prop="joinReason" label="原因" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
|
<el-button type="text" size="small" @click="removeBlacklist(scope.row.id)">解除黑名单</el-button> |
|
|
|
<!-- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> --> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -74,6 +75,16 @@ |
|
|
|
</el-pagination> |
|
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
|
<el-dialog |
|
|
|
title="解除黑名单的原因" |
|
|
|
:visible.sync="blacklistVisible" |
|
|
|
width="40%"> |
|
|
|
<textarea v-model="blacklistReason" placeholder="请输入解除黑名单的原因" class="blacklist-reason"></textarea> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="blacklistVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="confirmRemoveBlacklist">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</template> |
|
|
@ -94,7 +105,10 @@ export default { |
|
|
|
timeRange: '', |
|
|
|
dataForm: { |
|
|
|
id: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
blacklistVisible: false, // 解除黑名单 |
|
|
|
blacklistReason: '', // 解除黑名单原因 |
|
|
|
removeId: '', // 解除黑名单的人员信息id |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -106,10 +120,48 @@ export default { |
|
|
|
this.dataForm.startTime = ""; |
|
|
|
this.dataForm.endTime = ""; |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
AddOrUpdate |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
removeBlacklist (id) { |
|
|
|
this.blacklistVisible = true |
|
|
|
this.blacklistReason = '' |
|
|
|
this.removeId = id |
|
|
|
}, |
|
|
|
confirmRemoveBlacklist () { |
|
|
|
const params = { |
|
|
|
id: this.removeId, |
|
|
|
removeReason: this.blacklistReason |
|
|
|
} |
|
|
|
this.$http.post('/pli/power/rentBlacklist/update', params).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.blacklistVisible = false |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.blacklist-reason { |
|
|
|
width: 100%; |
|
|
|
height: 80px; |
|
|
|
border: 1px solid #e4e4e4; |
|
|
|
border-radius: 4px; |
|
|
|
resize: none; |
|
|
|
padding: 8px; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
</style> |