提交
This commit is contained in:
parent
b98ae8fbe3
commit
17dbef0aab
|
|
@ -10,6 +10,12 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>1701;1702;1591,8603,8602,8604,8600,8618</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="Controllers\Business\**" />
|
||||
<Content Remove="Controllers\Business\**" />
|
||||
<EmbeddedResource Remove="Controllers\Business\**" />
|
||||
<None Remove="Controllers\Business\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ZR.CodeGenerator\ZR.CodeGenerator.csproj" />
|
||||
|
|
@ -29,7 +35,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\Business\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -72,4 +72,19 @@ namespace ZR.LiveForum.Model.Liveforum.Dto
|
|||
[ExcelColumn(Name = "反馈状态")]
|
||||
public string? StatusLabel { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 反馈回复对象
|
||||
/// </summary>
|
||||
public class T_FeedbackReplyDto
|
||||
{
|
||||
[Required(ErrorMessage = "Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "回复内容不能为空")]
|
||||
public string Reply { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "反馈状态不能为空")]
|
||||
public int Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ namespace ZR.Service.Liveforum.ILiveforumService
|
|||
T_Feedbacks AddT_Feedbacks(T_Feedbacks parm);
|
||||
int UpdateT_Feedbacks(T_Feedbacks parm);
|
||||
|
||||
int Reply(T_FeedbackReplyDto parm);
|
||||
|
||||
PagedInfo<T_FeedbacksDto> ExportList(T_FeedbacksQueryDto parm);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using ZR.LiveForum.Model.Liveforum.Dto;
|
||||
using ZR.LiveForum.Model.Liveforum;
|
||||
|
|
@ -100,5 +100,10 @@ namespace ZR.Service.Liveforum
|
|||
predicate = predicate.AndIF(parm.UserId != null, it => it.UserId == parm.UserId);
|
||||
return predicate;
|
||||
}
|
||||
|
||||
public int Reply(T_FeedbackReplyDto parm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,18 @@ export function updatetfeedbacks(data) {
|
|||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复反馈记录
|
||||
* @param data
|
||||
*/
|
||||
export function replytfeedbacks(data) {
|
||||
return request({
|
||||
url: 'liveforum/tfeedbacks/reply',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取反馈记录详情
|
||||
* @param {Id}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
<template #default="scope">
|
||||
<el-button type="primary" size="small" icon="view" title="详情" @click="handlePreview(scope.row)"></el-button>
|
||||
<el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['tfeedbacks:edit']" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button type="info" size="small" icon="chat-dot-square" title="回复" v-hasPermi="['tfeedbacks:reply']" @click="handleReply(scope.row)"></el-button>
|
||||
<el-button type="danger" size="small" icon="delete" title="删除" v-hasPermi="['tfeedbacks:delete']" @click="handleDelete(scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -166,13 +167,40 @@
|
|||
<el-button type="primary" :loading="state.submitLoading" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="replyTitle" :lock-scroll="false" v-model="replyOpen">
|
||||
<el-form ref="replyFormRef" :model="replyForm" :rules="replyRules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24">
|
||||
<el-form-item label="回复内容" prop="reply">
|
||||
<el-input type="textarea" v-model="replyForm.reply" placeholder="请输入回复内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="24">
|
||||
<el-form-item label="反馈状态" prop="status">
|
||||
<el-select v-model="replyForm.status" placeholder="请选择反馈状态">
|
||||
<el-option
|
||||
v-for="item in options.liveforum_feedback_status"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="parseInt(item.dictValue)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button text @click="cancelReply">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="replySubmitLoading" @click="submitReply">{{ $t('btn.submit') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="tfeedbacks">
|
||||
import { listtfeedbacks,
|
||||
addtfeedbacks, deltfeedbacks,
|
||||
updatetfeedbacks,gettfeedbacks,
|
||||
updatetfeedbacks,gettfeedbacks, replytfeedbacks,
|
||||
}
|
||||
from '@/api/liveforum/tfeedbacks.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
|
@ -284,6 +312,23 @@ liveforum_feedback_status: [],
|
|||
|
||||
const { form, rules, options, single, multiple } = toRefs(state)
|
||||
|
||||
const replyFormRef = ref()
|
||||
const replyState = reactive({
|
||||
open: false,
|
||||
submitLoading: false,
|
||||
form: {
|
||||
id: null,
|
||||
reply: '',
|
||||
status: null,
|
||||
},
|
||||
rules: {
|
||||
reply: [{ required: true, message: "回复内容不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "反馈状态不能为空", trigger: "change" , type: "number" }],
|
||||
},
|
||||
})
|
||||
const replyTitle = ref('反馈回复')
|
||||
const { open: replyOpen, submitLoading: replySubmitLoading, form: replyForm, rules: replyRules } = toRefs(replyState)
|
||||
|
||||
// 关闭dialog
|
||||
function cancel(){
|
||||
open.value = false
|
||||
|
|
@ -308,6 +353,15 @@ function reset() {
|
|||
proxy.resetForm("formRef")
|
||||
}
|
||||
|
||||
function resetReplyForm() {
|
||||
replyForm.value = {
|
||||
id: null,
|
||||
reply: '',
|
||||
status: null,
|
||||
}
|
||||
proxy.resetForm("replyFormRef")
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
* @param {*} row
|
||||
|
|
@ -354,6 +408,22 @@ function handleUpdate(row) {
|
|||
})
|
||||
}
|
||||
|
||||
function handleReply(row) {
|
||||
resetReplyForm()
|
||||
const id = row.id
|
||||
gettfeedbacks(id).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
replyOpen.value = true
|
||||
replyForm.value = {
|
||||
id: data.id,
|
||||
reply: data.reply || '',
|
||||
status: data.status,
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 添加&修改 表单提交
|
||||
function submitForm() {
|
||||
proxy.$refs["formRef"].validate((valid) => {
|
||||
|
|
@ -404,6 +474,33 @@ function handleDelete(row) {
|
|||
})
|
||||
}
|
||||
|
||||
function cancelReply() {
|
||||
replyOpen.value = false
|
||||
resetReplyForm()
|
||||
}
|
||||
|
||||
function submitReply() {
|
||||
proxy.$refs["replyFormRef"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
replyState.submitLoading = true
|
||||
replytfeedbacks({
|
||||
id: replyForm.value.id,
|
||||
reply: replyForm.value.reply,
|
||||
status: replyForm.value.status,
|
||||
})
|
||||
.then(() => {
|
||||
proxy.$modal.msgSuccess("回复成功")
|
||||
replyOpen.value = false
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
replyState.submitLoading = false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 导出按钮操作
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user