我喜欢的音乐
This commit is contained in:
@@ -69,23 +69,28 @@
|
||||
v-hasPermi="['system:feedback:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:feedback:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="唯一标识符" align="center" prop="id" />
|
||||
<el-table-column label="反馈内容" align="center" prop="feedbackContent" />
|
||||
<el-table-column label="反馈内容" align="center" prop="feedbackContent" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
:content="scope.row.feedbackContent"
|
||||
placement="top"
|
||||
:disabled="!scope.row.feedbackContent"
|
||||
:show-after="300"
|
||||
:hide-after="0"
|
||||
effect="dark"
|
||||
:max-width="400">
|
||||
<div class="feedback-content">
|
||||
{{ scope.row.feedbackContent }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户姓名" align="center" prop="userName" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="联系方式类型" align="center" prop="contactType" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="联系方式信息" align="center" prop="contactInfo" :show-overflow-tooltip="true" width="150" />
|
||||
@@ -227,19 +232,41 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除用户反馈编号为"' + ids + '"的数据项?').then(function() {
|
||||
let confirmMessage = ''
|
||||
|
||||
if (row && row.feedbackContent) {
|
||||
// 单个删除,显示反馈内容
|
||||
const content = row.feedbackContent.length > 50
|
||||
? row.feedbackContent.substring(0, 50) + '...'
|
||||
: row.feedbackContent
|
||||
confirmMessage = `是否确认删除以下反馈内容?\n"${content}"`
|
||||
} else {
|
||||
// 批量删除,显示选中的反馈内容
|
||||
const selectedFeedbacks = this.feedbackList.filter(item => this.ids.includes(item.id))
|
||||
if (selectedFeedbacks.length === 1) {
|
||||
const content = selectedFeedbacks[0].feedbackContent
|
||||
const displayContent = content && content.length > 50
|
||||
? content.substring(0, 50) + '...'
|
||||
: content
|
||||
confirmMessage = `是否确认删除以下反馈内容?\n"${displayContent}"`
|
||||
} else {
|
||||
const contents = selectedFeedbacks.map(item => {
|
||||
const content = item.feedbackContent
|
||||
return content && content.length > 30
|
||||
? content.substring(0, 30) + '...'
|
||||
: content
|
||||
}).join('\n')
|
||||
confirmMessage = `是否确认删除以下${selectedFeedbacks.length}条反馈内容?\n${contents}`
|
||||
}
|
||||
}
|
||||
|
||||
this.$modal.confirm(confirmMessage).then(function() {
|
||||
return delFeedback(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/feedback/export', {
|
||||
...this.queryParams
|
||||
}, `feedback_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 获取状态标签 */
|
||||
getStatusLabel(status) {
|
||||
const statusMap = {
|
||||
@@ -299,4 +326,29 @@ export default {
|
||||
.el-dropdown-menu__item i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* 反馈内容样式 */
|
||||
.feedback-content {
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
line-height: 1.4;
|
||||
padding: 4px 0;
|
||||
display: block;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.feedback-content:hover {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
/* 自定义tooltip样式 */
|
||||
:deep(.el-tooltip__popper) {
|
||||
max-width: 400px !important;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -162,7 +162,8 @@
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择计划发送时间">
|
||||
placeholder="请选择计划发送时间"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -328,6 +329,13 @@ export default {
|
||||
sendTime: [
|
||||
{ required: true, message: "计划发送时间不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
// 日期选择器配置
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
// 禁用今天之前的日期
|
||||
return time.getTime() < Date.now() - 8.64e7; // 减去一天的毫秒数,确保今天可选
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -402,6 +410,8 @@ export default {
|
||||
const id = row.id || this.ids
|
||||
getNotifications(id).then(response => {
|
||||
this.form = response.data
|
||||
// 编辑时清空计划发送时间,让用户重新选择
|
||||
this.form.sendTime = null
|
||||
this.open = true
|
||||
this.title = "修改通知"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user