提交 5ff09657 authored 作者: matian's avatar matian

chore:新增投诉建议管理模块

上级 d40826b4
......@@ -153,6 +153,12 @@ export const menus: IMenuItem[] = [
icon: Picture,
name: '封面管理',
path: '/system/cover'
},
{
tag: 'v1-backend-cover-list',
icon: Picture,
name: ' 投诉建议管理',
path: '/system/question'
}
]
},
......
import httpRequest from '@/utils/axios'
// 获取视频列表
export function getVideoList(params?: { type?: string; page?: number; ['per-page']?: number }) {
return httpRequest.get('/api/resource/backend/video/index', { params })
}
// 获取字典列表
export function getDictionaryList(params?: {
name?: string
key?: string
status?: string
created_time_start?: string
created_time_end?: string
page?: number
['per-page']?: number
}) {
return httpRequest.get('/api/resource/v1/backend/data-dictionary/list', { params })
}
// 新增字典
export function createDictionary(data: {
name: string
key: string
status?: string
remark?: string
can_edit?: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/create', data)
}
// 更新字典
export function updateDictionary(data: {
id: string
name: string
key: string
status?: string
remark?: string
can_edit?: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/update', data)
}
// 删除字典
export function delDictionary(data: { id: string }) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/delete', data)
}
// 获取字典的值的列表
export function getDictionaryItemList(params?: { data_dictionary_id: string; page?: number; page_size?: number }) {
return httpRequest.get('/api/resource/v1/backend/data-dictionary/value-list', { params })
}
// 新增字典的值
export function createDictionaryItem(data: {
data_dictionary_id: string
label: string
value: string
sort: string
remark: string
can_edit: string
status: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-create', data)
}
// 更新字典的值
export function updateDictionaryItem(data: {
id: any
data_dictionary_id: string
label: string
value: string
sort: string
remark: string
can_edit: string
status: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-update', data)
}
// 删除字典的值
export function delDictionaryItem(data: { id: string }) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-delete', data)
}
<script lang="ts" setup>
import type { FormInstance } from 'element-plus'
const emit = defineEmits<Emits>()
const ruleFormRef = ref<FormInstance>()
// 封面类型
// 封面状态
const form = reactive({
desc: '',
detail: '',
answer: ''
})
defineProps({
isShowDialog: {
type: Boolean,
required: true
}
})
interface Emits {
(e: 'update:isShowDialog', isShowDialog: boolean): void
(e: 'updatePage'): void
}
// 取消
const handleCancel = () => {
emit('update:isShowDialog', false)
}
// 确定
const handleConfirm = () => {
emit('update:isShowDialog', false)
}
</script>
<template>
<el-dialog :model-value="isShowDialog" draggable :before-close="handleCancel" width="50%">
<el-form :model="form" ref="ruleFormRef" label-width="100px">
<el-row>
<el-col :span="10"> <el-form-item label="封面类型:" prop="type"> 投诉建议人:lisi </el-form-item></el-col>
<el-col :span="10"> <el-form-item label="封面类型:" prop="type"> 提交时间:2022-07-19 </el-form-item></el-col>
</el-row>
<el-divider border-style="desdashedc" />
<el-form-item label="问题描述:" prop="desc">
<el-input v-model="form.desc" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item>
<el-form-item label="问题详情:" prop="detail">
<el-input v-model="form.detail" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item>
<el-form-item label="相关附件:" prop="type">
<a href="1">11</a>
</el-form-item>
<el-divider border-style="dashed" />
<el-form-item label="我的答复:" prop="answer">
<el-input v-model="form.answer" autosize type="textarea" placeholder="Please input" />
</el-form-item>
</el-form>
<template #footer>
<span>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</span>
</template>
</el-dialog>
</template>
import type { RouteRecordRaw } from 'vue-router'
import AppLayout from '@/components/layout/Index.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/system/question',
component: AppLayout,
children: [{ path: '', component: () => import('./views/List.vue') }]
}
]
<script setup lang="ts">
import DealDialog from '../components/DealDialog.vue'
const appList = ref()
const isShowDialog = ref(false)
// 状态
//表单每行数据
const listOptions = $computed(() => {
return {
remote: {
// httpRequest: getDictionaryList,
params: {
status: '',
type: '',
created_time_start: '',
created_time_end: ''
}
},
filters: [
{ type: 'input', prop: 'name', label: '字典名称:', placeholder: '请输入字典名称' },
{ type: 'input', prop: 'key', label: '字典类型:', placeholder: '请输入字典类型' }
],
columns: [
{ label: '序号', type: 'index', align: 'center' },
{ label: '问题描述', prop: 'name', align: 'center' },
{ label: '投诉人', prop: 'complaint_name', align: 'center' },
{
label: '投诉时间',
prop: 'complaint_time',
align: 'center'
},
{ label: '处理人', prop: 'deal_operator', align: 'center' },
{ label: '处理时间', prop: 'deal_time', align: 'center' },
{ label: '处理状态', prop: 'status', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 }
],
data: [{ name: 111 }]
}
})
const handleDeal = () => {
isShowDialog.value = true
}
</script>
<template>
<AppCard title="投诉建议管理">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #table-operate>
<el-space>
<el-link type="primary" plain @click="handleDeal">查看</el-link>
</el-space>
</template></AppList
>
</AppCard>
<DealDialog v-if="isShowDialog === true" v-model:isShowDialog="isShowDialog" />
</template>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论