diff --git a/src/mixins/view-module.js b/src/mixins/view-module.js
index b139641e..ebde6a3e 100644
--- a/src/mixins/view-module.js
+++ b/src/mixins/view-module.js
@@ -63,6 +63,11 @@ export default {
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
+ this.dataList.forEach(item => {
+ if (item.gender) {
+ item.gender = item.gender == '0' ? '女' : item.gender == '1' ? '男' : item.gender
+ }
+ })
}).catch(() => {
this.dataListLoading = false
})
diff --git a/src/views/modules/plugins/rent/rentblacklist-add-or-update.vue b/src/views/modules/plugins/rent/rentblacklist-add-or-update.vue
index e7047362..7d13084c 100644
--- a/src/views/modules/plugins/rent/rentblacklist-add-or-update.vue
+++ b/src/views/modules/plugins/rent/rentblacklist-add-or-update.vue
@@ -163,12 +163,10 @@ export default {
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
- console.log(this.dataForm)
- return
if (!valid) {
return false
}
- this.$http[!this.dataForm.id ? 'post' : 'put']('/pli/power/rentBlacklist/', this.dataForm).then(({ data: res }) => {
+ this.$http[!this.dataForm.id ? 'post' : 'put']('/pli/power/rentBlacklist/save', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
diff --git a/src/views/modules/plugins/rent/rentblacklist.vue b/src/views/modules/plugins/rent/rentblacklist.vue
index f62bad8d..8d0ddabc 100644
--- a/src/views/modules/plugins/rent/rentblacklist.vue
+++ b/src/views/modules/plugins/rent/rentblacklist.vue
@@ -58,8 +58,9 @@
- {{ $t('update') }}
- {{ $t('delete') }}
+ 解除黑名单
+
@@ -74,6 +75,16 @@
+
+
+
+
@@ -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(() => {})
+ }
}
}
+
\ No newline at end of file