对接问题反馈接口
This commit is contained in:
parent
8047298f59
commit
dc0df3c420
44
src/api/problemFeedback.js
Normal file
44
src/api/problemFeedback.js
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取问题反馈列表
|
||||||
|
export function busProblemFeedbackPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/busProblemFeedback/getBusProblemFeedbackPage',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增问题
|
||||||
|
export function addSysReaddBusProblemFeedbackgion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/busProblemFeedback/addBusProblemFeedback',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改问题
|
||||||
|
export function updateBusProblemFeedback(data) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/busProblemFeedback/updateBusProblemFeedback',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取问题详情
|
||||||
|
export function getBusProblemFeedback(feedbackId) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/busProblemFeedback/getBusProblemFeedback/' + feedbackId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除问题
|
||||||
|
export function deleteBusProblemFeedback(feedbackId) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/busProblemFeedback/deleteBusProblemFeedback/' + feedbackId,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
|
@ -1161,6 +1161,28 @@ h6 {
|
||||||
// min-width: 34px;
|
// min-width: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.myFeedBackForm .el-input__inner {
|
||||||
|
font-family: Microsoft YaHei;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #525252;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myFeedBackForm .el-input__clear {
|
||||||
|
color: #B8B8B8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myFeedBackForm .el-input__clear:hover {
|
||||||
|
color: #B8B8B8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myFeedBackForm .el-input__inner::placeholder {
|
||||||
|
font-family: Microsoft YaHei;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #B8B8B8;
|
||||||
|
}
|
||||||
|
|
||||||
.myFeedBackForm .el-textarea__inner {
|
.myFeedBackForm .el-textarea__inner {
|
||||||
font-family: Microsoft YaHei;
|
font-family: Microsoft YaHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
|
@ -39,8 +39,11 @@
|
||||||
:destroy-on-close="true" :close-on-click-modal="false">
|
:destroy-on-close="true" :close-on-click-modal="false">
|
||||||
<el-form ref="feedBackRef" :model="form" :rules="rules" label-width="120px" label-position="top"
|
<el-form ref="feedBackRef" :model="form" :rules="rules" label-width="120px" label-position="top"
|
||||||
class="myFeedBackForm">
|
class="myFeedBackForm">
|
||||||
<el-form-item label="输入反馈内容" prop="menuName">
|
<el-form-item label="反馈人" prop="feedbackUser">
|
||||||
<el-input v-model="form.menuName" style="width: 100%" :rows="12" type="textarea"
|
<el-input v-model="form.feedbackUser" placeholder="请输入反馈人姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="输入反馈内容" prop="content">
|
||||||
|
<el-input v-model="form.content" style="width: 100%" :rows="12" type="textarea"
|
||||||
placeholder="欢迎提出您在使用过程中遇到的问题或宝贵建议" />
|
placeholder="欢迎提出您在使用过程中遇到的问题或宝贵建议" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -64,6 +67,7 @@ import TopNav from '@/components/TopNav'
|
||||||
import useAppStore from '@/store/modules/app'
|
import useAppStore from '@/store/modules/app'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import useSettingsStore from '@/store/modules/settings'
|
import useSettingsStore from '@/store/modules/settings'
|
||||||
|
import { addSysReaddBusProblemFeedbackgion } from "@/api/problemFeedback"
|
||||||
|
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
@ -103,11 +107,11 @@ const openFeedBack = ref(false)
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
menuName: [{ required: true, message: "反馈内容不能为空", trigger: "blur" }]
|
content: [{ required: true, message: "反馈内容不能为空", trigger: "blur" }]
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
const { form, rules } = toRefs(data)
|
||||||
const handleFeedBack = () => {
|
const handleFeedBack = () => {
|
||||||
openFeedBack.value = true
|
openFeedBack.value = true
|
||||||
}
|
}
|
||||||
|
@ -118,12 +122,15 @@ const cancel = () => {
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
proxy.$refs["feedBackRef"].validate(valid => {
|
proxy.$refs["feedBackRef"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
openFeedBack.value = false
|
addSysReaddBusProblemFeedbackgion(form.value).then(response => {
|
||||||
// addMenu(form.value).then(response => {
|
proxy.$modal.msgSuccess("反馈成功")
|
||||||
// proxy.$modal.msgSuccess("新增成功")
|
openFeedBack.value = false
|
||||||
// open.value = false
|
form.value = {
|
||||||
// getList()
|
feedbackUser: undefined,
|
||||||
// })
|
content: undefined
|
||||||
|
}
|
||||||
|
proxy.resetForm("feedBackRef")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
<div class="searchPanel">
|
<div class="searchPanel">
|
||||||
<el-form :inline="true" v-show="showSearch" class="searchPanelForm">
|
<el-form :inline="true" v-show="showSearch" class="searchPanelForm">
|
||||||
<el-form-item label="反馈时间:" prop="postName" style="width: 330px">
|
<el-form-item label="反馈时间:" prop="postName" style="width: 330px">
|
||||||
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
<el-date-picker v-model="dateRange" @change="handleDateChange" value-format="YYYY-MM-DD"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
type="daterange" range-separator="-" start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form :inline="true" class="searchInputForm">
|
<el-form :inline="true" class="searchInputForm">
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入反馈人" :prefix-icon="Search"
|
<el-input v-model="queryParams.feedbackUser" placeholder="请输入反馈人" :prefix-icon="Search"
|
||||||
style="width: 300px;" />
|
style="width: 300px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -32,8 +33,8 @@
|
||||||
{{ scope.$index + 1 }}
|
{{ scope.$index + 1 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="反馈内容" align="center" prop="postId" />
|
<el-table-column label="反馈内容" align="center" prop="content" />
|
||||||
<el-table-column label="反馈人" align="center" prop="postCode" width="150" />
|
<el-table-column label="反馈人" align="center" prop="feedbackUser" width="150" />
|
||||||
<el-table-column label="反馈时间" align="center" prop="createTime" width="210">
|
<el-table-column label="反馈时间" align="center" prop="createTime" width="210">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
@ -49,86 +50,133 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
<pagination :total="total" v-model:page="queryParams.pageIndex" v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList" />
|
@pagination="getBusProblemFeedbackPage" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 添加反馈对话框 -->
|
||||||
|
<el-dialog title="修改问题反馈" v-model="open" width="800px" align-center class="my_dialog" append-to-body
|
||||||
|
:destroy-on-close="true" :close-on-click-modal="false">
|
||||||
|
<el-form ref="feedBackRef" :model="form" :rules="rules" label-width="120px" label-position="top"
|
||||||
|
class="myFeedBackForm">
|
||||||
|
<el-form-item label="反馈人" prop="feedbackUser">
|
||||||
|
<el-input v-model="form.feedbackUser" placeholder="请输入反馈人姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="输入反馈内容" prop="content">
|
||||||
|
<el-input v-model="form.content" style="width: 100%" :rows="12" type="textarea"
|
||||||
|
placeholder="欢迎提出您在使用过程中遇到的问题或宝贵建议" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button class="my-cancel-btn" @click="cancel">取 消</el-button>
|
||||||
|
<el-button class="my-confirm-btn" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Post">
|
<script setup name="Post">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { listPost, addPost, delPost, getPost, updatePost } from "@/api/system/post"
|
import { busProblemFeedbackPage, updateBusProblemFeedback, getBusProblemFeedback, deleteBusProblemFeedback } from "@/api/problemFeedback"
|
||||||
import { useBackgroundStore } from '@/store/modules/background'
|
import { useBackgroundStore } from '@/store/modules/background'
|
||||||
import otherbg from '@/assets/images/otherbg.png'
|
import otherbg from '@/assets/images/otherbg.png'
|
||||||
const bgStore = useBackgroundStore()
|
const bgStore = useBackgroundStore()
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
|
||||||
|
|
||||||
const postList = ref([])
|
const feedbackList = ref([])
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
const ids = ref([])
|
|
||||||
const single = ref(true)
|
|
||||||
const multiple = ref(true)
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const title = ref("")
|
|
||||||
const dateRange = ref([])
|
const dateRange = ref([])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
postCode: undefined,
|
feedbackUser: undefined,
|
||||||
postName: undefined,
|
startDate: undefined,
|
||||||
status: undefined
|
endDate: undefined
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
postName: [{ required: true, message: "岗位名称不能为空", trigger: "blur" }],
|
content: [{ required: true, message: "反馈内容不能为空", trigger: "blur" }]
|
||||||
postCode: [{ required: true, message: "岗位编码不能为空", trigger: "blur" }],
|
|
||||||
postSort: [{ required: true, message: "岗位顺序不能为空", trigger: "blur" }],
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
const { queryParams, form, rules } = toRefs(data)
|
||||||
|
// 处理日期变化
|
||||||
/** 查询岗位列表 */
|
const handleDateChange = (val) => {
|
||||||
function getList() {
|
dateRange.value = val;
|
||||||
|
queryParams.value.startDate = val[0]
|
||||||
|
queryParams.value.endDate = val[1]
|
||||||
|
};
|
||||||
|
/** 查询反馈问题列表 */
|
||||||
|
const getBusProblemFeedbackPage = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
listPost(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
busProblemFeedbackPage(queryParams.value).then(response => {
|
||||||
postList.value = response.rows
|
feedbackList.value = response.rows
|
||||||
total.value = response.total
|
total.value = response.total
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageIndex = 1
|
||||||
getList()
|
getBusProblemFeedbackPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
const resetQuery = () => {
|
||||||
queryParams.value = {
|
queryParams.value = {
|
||||||
pageNum: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
postCode: undefined,
|
feedbackUser: undefined,
|
||||||
postName: undefined,
|
startDate: undefined,
|
||||||
status: undefined
|
endDate: undefined
|
||||||
}
|
}
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改问题
|
||||||
|
const handleUpdate = (row) => {
|
||||||
|
form.value = {
|
||||||
|
feedbackUser: undefined,
|
||||||
|
content: undefined
|
||||||
|
}
|
||||||
|
getBusProblemFeedback(row.id).then(res => {
|
||||||
|
form.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const cancel = () => {
|
||||||
|
open.value = false
|
||||||
|
form.value = {}
|
||||||
|
}
|
||||||
|
const submitForm = () => {
|
||||||
|
proxy.$refs["feedBackRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
updateBusProblemFeedback(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功")
|
||||||
|
open.value = false
|
||||||
|
form.value = {}
|
||||||
|
proxy.resetForm("feedBackRef")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
const handleDelete = (row) => {
|
||||||
const postIds = row.postId || ids.value
|
proxy.$modal.confirm('是否确认删除该问题吗?').then(function () {
|
||||||
proxy.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function () {
|
return deleteBusProblemFeedback(row.id)
|
||||||
return delPost(postIds)
|
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList()
|
getBusProblemFeedbackPage()
|
||||||
proxy.$modal.msgSuccess("删除成功")
|
proxy.$modal.msgSuccess("删除成功")
|
||||||
}).catch(() => { })
|
}).catch(() => { })
|
||||||
}
|
}
|
||||||
|
@ -136,6 +184,6 @@ function handleDelete(row) {
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
bgStore.setBgImage(otherbg)
|
bgStore.setBgImage(otherbg)
|
||||||
getList()
|
getBusProblemFeedbackPage()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user