提交 bfb04db2 authored 作者: matian's avatar matian

投诉建议接口对接

上级 3f8eaea0
...@@ -45,19 +45,18 @@ const videoOptions = $computed(() => { ...@@ -45,19 +45,18 @@ const videoOptions = $computed(() => {
</div> </div>
</div> </div>
</div> </div>
<div style="padding-bottom: 20px; margin: 0 auto"> <div style="width: 100%; background: #000">
<div style="margin: 0 auto; width: 80%">
<AppVideoPlayer :isAdd="true" :options="videoOptions"></AppVideoPlayer> <AppVideoPlayer :isAdd="true" :options="videoOptions"></AppVideoPlayer>
</div> </div>
</div> </div>
</div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.center-video-box { .center-video-box {
padding: 20px 0; padding: 20px 0;
// display: flex;
.right-statistics { .right-statistics {
// max-width: 1200px;
margin: 0 auto; margin: 0 auto;
// flex: 1;
display: flex; display: flex;
padding-top: 15px; padding-top: 15px;
justify-content: space-between; justify-content: space-between;
......
...@@ -171,6 +171,7 @@ const props = defineProps(['data']) ...@@ -171,6 +171,7 @@ const props = defineProps(['data'])
color: #333; color: #333;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
margin-top: 8px; margin-top: 8px;
word-break: break-all;
&.active { &.active {
color: #1ab226; color: #1ab226;
} }
......
...@@ -6,8 +6,10 @@ const ruleFormRef = ref<FormInstance>() ...@@ -6,8 +6,10 @@ const ruleFormRef = ref<FormInstance>()
// 封面类型 // 封面类型
// 封面状态 // 封面状态
const form: any = reactive({ const form: any = reactive({
sso_id_name: '',
created_time: '',
title: '', title: '',
files: [], files: '',
content: '', content: '',
reply: '' reply: ''
}) })
...@@ -44,6 +46,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -44,6 +46,7 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
if (valid) { if (valid) {
replySuggestion({ id: props.id, reply: form.reply }).then(() => { replySuggestion({ id: props.id, reply: form.reply }).then(() => {
emit('update:isShowDialog', false) emit('update:isShowDialog', false)
emit('updatePage')
}) })
} }
}) })
...@@ -52,20 +55,25 @@ getSuggestionDetail({ id: props.id }).then(res => { ...@@ -52,20 +55,25 @@ getSuggestionDetail({ id: props.id }).then(res => {
Object.keys(form).forEach(key => { Object.keys(form).forEach(key => {
form[key] = res.data[key] form[key] = res.data[key]
}) })
form.files = JSON.parse(form.files)
}) })
</script> </script>
<template> <template>
<el-dialog :model-value="isShowDialog" draggable :before-close="handleCancel" width="30%"> <el-dialog
:model-value="isShowDialog"
draggable
:before-close="handleCancel"
width="35%"
:title="props.status === '1' ? '处理投诉建议' : '查看详情'"
>
<el-form :model="form" ref="ruleFormRef" :rules="rules" label-width="100px"> <el-form :model="form" ref="ruleFormRef" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="投诉建议人:" prop="type"> <el-form-item label="投诉建议人:" prop="sso_id_name">
{{ form.sso_id_name }} {{ form.sso_id_name }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="提交时间:" prop="type"> {{ form.created_time }} </el-form-item> <el-form-item label="提交时间:" prop="created_time"> {{ form.created_time }} </el-form-item>
</el-col> </el-col>
<el-divider border-style="dashed" /> <el-divider border-style="dashed" />
</el-row> </el-row>
...@@ -76,9 +84,9 @@ getSuggestionDetail({ id: props.id }).then(res => { ...@@ -76,9 +84,9 @@ getSuggestionDetail({ id: props.id }).then(res => {
<el-input v-model="form.content" autosize type="textarea" placeholder="Please input" disabled /> <el-input v-model="form.content" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item> </el-form-item>
<el-form-item label="相关附件:" prop="files"> <el-form-item label="相关附件:" prop="files">
<div v-for="(item, index) in form.files" :key="index"> <!-- <div v-for="(item, index) in form.files" :key="index"> -->
<a :href="item.url" style="color: #aa1941" target="_blank">{{ item.name }}</a> <a :href="form.files" style="color: #aa1941" target="_blank">{{ form.files }}</a>
</div> <!-- </div> -->
</el-form-item> </el-form-item>
<el-divider border-style="dashed" /> <el-divider border-style="dashed" />
<el-form-item label="我的答复:" prop="reply"> <el-form-item label="我的答复:" prop="reply">
...@@ -86,7 +94,7 @@ getSuggestionDetail({ id: props.id }).then(res => { ...@@ -86,7 +94,7 @@ getSuggestionDetail({ id: props.id }).then(res => {
v-model="form.reply" v-model="form.reply"
autosize autosize
type="textarea" type="textarea"
placeholder="Please input" placeholder="请输入我的答复"
:disabled="props.status !== '1'" :disabled="props.status !== '1'"
/> />
</el-form-item> </el-form-item>
......
<script setup lang="ts"> <script setup lang="ts">
import DealDialog from '../components/DealDialog.vue' import DealDialog from '../components/DealDialog.vue'
import { getUserList } from '../api' import { getSuggestionList, getUserList } from '../api'
// getSuggestionList
const appList = ref() const appList = ref()
const isShowDialog = ref(false) const isShowDialog = ref(false)
const id = ref('') const id = ref('')
...@@ -12,7 +11,7 @@ const userList: any = ref([]) ...@@ -12,7 +11,7 @@ const userList: any = ref([])
const listOptions = $computed(() => { const listOptions = $computed(() => {
return { return {
remote: { remote: {
// httpRequest: getSuggestionList, httpRequest: getSuggestionList,
params: { params: {
sso_id: [], sso_id: [],
created_time_start: '', created_time_start: '',
...@@ -24,6 +23,7 @@ const listOptions = $computed(() => { ...@@ -24,6 +23,7 @@ const listOptions = $computed(() => {
params.sso_id = params.sso_id[0].id params.sso_id = params.sso_id[0].id
return params return params
} }
return params
} }
}, },
filters: [ filters: [
...@@ -49,13 +49,6 @@ const listOptions = $computed(() => { ...@@ -49,13 +49,6 @@ const listOptions = $computed(() => {
{ label: '处理时间', prop: 'updated_time', align: 'center' }, { label: '处理时间', prop: 'updated_time', align: 'center' },
{ label: '处理状态', prop: 'status_name', align: 'center' }, { label: '处理状态', prop: 'status_name', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 } { label: '操作', slots: 'table-operate', align: 'center', width: 300 }
],
data: [
{
title: '1111',
id: '1234',
status: '1'
}
] ]
} }
}) })
...@@ -71,6 +64,9 @@ const handleGetUserList = (query: string) => { ...@@ -71,6 +64,9 @@ const handleGetUserList = (query: string) => {
userList.value = res.data userList.value = res.data
}) })
} }
const handleFresh = () => {
appList.value.refetch()
}
</script> </script>
<template> <template>
...@@ -86,6 +82,7 @@ const handleGetUserList = (query: string) => { ...@@ -86,6 +82,7 @@ const handleGetUserList = (query: string) => {
value-key="id" value-key="id"
:reserve-keyword="false" :reserve-keyword="false"
:remote-method="handleGetUserList" :remote-method="handleGetUserList"
placeholder="用户姓名"
> >
<el-option v-for="item in userList" :key="item.id" :label="item.username" :value="item" /> <el-option v-for="item in userList" :key="item.id" :label="item.username" :value="item" />
</el-select> </el-select>
...@@ -104,5 +101,11 @@ const handleGetUserList = (query: string) => { ...@@ -104,5 +101,11 @@ const handleGetUserList = (query: string) => {
</template> </template>
</AppList> </AppList>
</AppCard> </AppCard>
<DealDialog v-if="isShowDialog === true" v-model:isShowDialog="isShowDialog" :id="id" :status="status" /> <DealDialog
v-if="isShowDialog === true"
v-model:isShowDialog="isShowDialog"
:id="id"
:status="status"
@updatePage="handleFresh"
/>
</template> </template>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论