version/v2
wangdong 6 months ago
parent 9f59bac136
commit 4d77c2c59b
  1. 21872
      package-lock.json
  2. 9
      public/config.js
  3. 31
      src/api/feedback/index.js
  4. 5
      src/config/router.config.js
  5. 122
      src/views/dataCenter/feedback/index.vue
  6. 171
      src/views/dataCenter/feedback/modules/Edit.vue
  7. 15
      src/views/store/index.vue
  8. 16
      src/views/store/modules/CreateForm.vue
  9. 23373
      yarn.lock

21872
package-lock.json generated

File diff suppressed because it is too large Load Diff

9
public/config.js vendored

@ -4,15 +4,16 @@ window.serverConfig = {
// 必填: api地址, 换成自己的域名即可
// 例如: https://www.你的域名.com/index.php?s=/admin
// BASE_API: 'https://www.saas.njrenzhou.com/index.php?s=/admin',
BASE_API: 'https://www.royaum.com.cn/index.php?s=/admin',
// BASE_API: 'https://www.royaum.com.cn/index.php?s=/admin',
BASE_API: 'https://test-www.royaum.com.cn/index.php?s=/admin',
// 必填: store模块的入口地址
// 例如: https://www.你的域名.com/store
// STORE_URL: 'https://www.saas.njrenzhou.com/store',
STORE_URL: 'https://www.royaum.com.cn/store',
STORE_URL: 'https://test-www.royaum.com.cn/store',
// 图片文件上传大小 (单位mb)
// 图片文件上传大小 (单位mb)
uploadImageSize: 2,
// 视频文件上传大小 (单位mb)
uploadVideoSize: 20,
uploadVideoSize: 20
}

@ -0,0 +1,31 @@
import { axios } from '@/utils/request'
// api接口列表
const api = {
feedbackList: '/feedback/list',
editFeedback: '/feedback/edit'
}
/**
* 反馈列表
* @param {*} data
*/
export function feedbackList (data) {
return axios({
url: api.feedbackList,
method: 'get',
data
})
}
/**
* 编辑反馈
* @param {*} data
*/
export function editFeedback (data) {
return axios({
url: api.editFeedback,
method: 'post',
data
})
}

@ -129,6 +129,11 @@ export const asyncRouterMap = [
component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/import/Batch'),
meta: { title: '商品导入', pageTitle: '商品批量导入', keepAlive: false },
hidden: true
},
{
path: '/feedback/index',
component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/feedback/index'),
meta: { title: '意见反馈', keepAlive: false, permission: ['access'] }
}
]
},

@ -0,0 +1,122 @@
<template>
<a-card :bordered="false">
<content-header title="意见反馈"></content-header>
<a-table
rowKey="feedback_id"
:columns="columns"
:dataSource="feedbackList"
:defaultExpandAllRows="true"
:expandIconColumnIndex="1"
:pagination="pagination"
:loading="isLoading"
>
<span slot="type" slot-scope="text, item">
{{ typeList[item.type - 1] }}
</span>
<span slot="status" slot-scope="text, item">
<a-tag :color="item.answer ? '#52BC8C' : '#FB6569'">{{ item.answer ? '已完成' : '受理中' }}</a-tag>
</span>
<span slot="store_id" slot-scope="text, item">
{{ item.store.store_name }}
</span>
<span slot="action" slot-scope="text, item">
<template>
<a style="margin-right: 8px" @click="handleEdit(item)">编辑</a>
</template>
</span>
</a-table>
<EditForm ref="EditForm" @handleSubmit="handleRefresh" />
</a-card>
</template>
<script>
import * as Api from '@/api/feedback'
import { ContentHeader, STable } from '@/components'
import EditForm from './modules/Edit.vue'
export default {
components: {
ContentHeader,
STable,
EditForm
},
data () {
return {
typeList: [
'功能异常:系统功能异常或不可用',
'系统建议:用的不爽,我有建议',
'功能新增:我想用的功能,希望能开发新增',
'服务建议:服务商服务不到位,我有建议'
],
feedbackList: [],
//
columns: [
{
title: '反馈类型',
dataIndex: 'type',
scopedSlots: { customRender: 'type' }
},
{
title: '建议',
dataIndex: 'suggest'
},
{
title: '状态',
dataIndex: 'status',
scopedSlots: { customRender: 'status' }
},
{
title: '反馈时间',
dataIndex: 'create_time'
},
{
title: '来源商城',
dataIndex: 'store_id',
scopedSlots: { customRender: 'store_id' }
},
{
title: '处理时间',
dataIndex: 'deal_time'
},
{
title: '回复内容',
dataIndex: 'answer'
},
{
title: '操作',
dataIndex: 'action',
width: '180px',
scopedSlots: { customRender: 'action' }
}
]
}
},
created () {
//
this.getFeedbackList()
},
methods: {
//
async handleEdit (record) {
//
this.$refs.EditForm.add(record)
},
//
handleRefresh () {
//
this.getFeedbackList()
},
//
getFeedbackList () {
this.isLoading = true
Api.feedbackList()
.then((result) => {
console.log(result)
this.feedbackList = result.data.data
this.isLoading = false
})
.finally(() => (this.isLoading = false))
}
}
}
</script>

@ -0,0 +1,171 @@
<template>
<a-modal
title="新增商户"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
:destroyOnClose="true"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="反馈类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group
v-decorator="['type', { rules: [{ required: true, message: '请选择反馈类型' }] }]"
>
<a-radio v-for="(item, index) in typeList" :key="index + 1" :value="index + 1">{{ item }}</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="建议" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea
v-decorator="['suggest', { rules: [{ required: true, message: '请输入建议' }] }]"
/>
</a-form-item>
<a-form-item label="反馈图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage
:multiple="true"
:defaultList="info.imgsInfo ? info.imgsInfo : []"
v-decorator="['imgs', { rules: [{ required: true, message: '请上传反馈图片' }] }]" />
</a-form-item>
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['name', { rules: [{ required: true, message: '请输入姓名' }] }]"
/>
</a-form-item>
<a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['phone', { rules: [{ required: true, message: '请输入电话' }] }]"
/>
</a-form-item>
<a-form-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['unit', { rules: [{ required: true, message: '请输入单位' }] }]"
/>
</a-form-item>
<a-form-item label="回复内容" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea
v-decorator="['answer', { rules: [{ required: true, message: '请输入回复内容' }] }]"
/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import * as Api from '@/api/feedback'
import { SelectImage } from '@/components'
export default {
components: {
SelectImage
},
props: {
//
},
data () {
return {
typeList: [
'功能异常:系统功能异常或不可用',
'系统建议:用的不爽,我有建议',
'功能新增:我想用的功能,希望能开发新增',
'服务建议:服务商服务不到位,我有建议'
],
accountList: [],
//
title: '',
//
labelCol: {
span: 7
},
//
wrapperCol: {
span: 13
},
// modal()
visible: false,
// modal() loading
confirmLoading: false,
//
form: this.$form.createForm(this),
info: {}
}
},
methods: {
//
add (info) {
//
this.visible = true
//
this.info = info
//
this.setFieldsValue()
},
//
setFieldsValue () {
const {
form: { setFieldsValue }
} = this
//
this.$nextTick(() => {
setFieldsValue(
// eslint-disable-next-line no-undef
_.pick(this.info, [
'type',
'suggest',
'imgs',
'name',
'phone',
'unit',
'answer'
])
)
})
},
//
handleSubmit (e) {
e.preventDefault()
//
const {
form: { validateFields }
} = this
validateFields((errors, values) => {
// api
if (!errors) {
this.onFormSubmit(values)
}
})
},
//
handleCancel () {
this.visible = false
this.form.resetFields()
},
// api
onFormSubmit (values) {
this.confirmLoading = true
Api.editFeedback({ form: { feedback_id: this.info['feedback_id'], ...values, imgs: (values.imgs && (Array.isArray(values.imgs) ? values.imgs.join(',') : values.imgs)) || '' } })
.then((result) => {
//
this.$message.success(result.message, 1.5)
//
this.handleCancel()
//
this.$emit('handleSubmit', values)
})
.finally((result) => {
this.confirmLoading = false
})
}
}
}
</script>
<style>
.ant-form textarea {
height: 120px!important;
}
</style>

@ -12,6 +12,9 @@
:data="loadData"
:pagination="pagination"
>
<span slot="is_data_service_provider" slot-scope="text, item">
{{ item.is_data_service_provider == 1 ? '是' : '否' }}
</span>
<span class="actions" slot="action" slot-scope="text, item">
<a @click="getPlatFormItem(item)">数据授权</a>
<a @click="handleInto(item)">进入商城</a>
@ -23,7 +26,6 @@
<ModuleForm ref="ModuleForm" @handleSubmit="handleRefresh" />
<a-modal v-model:open="open" title="数据授权" @ok="handleOk">
<div>
<a-checkbox-group @change="onChange" :value="checkedList">
<a-row>
<a-col :span="24">
@ -31,10 +33,8 @@
{{item.name}}
</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</div>
</a-modal>
</a-card>
@ -68,6 +68,15 @@ export default {
title: '商城名称',
dataIndex: 'store_name'
},
{
title: '商城版本',
dataIndex: 'store_version'
},
{
title: '是否数据服务商',
dataIndex: 'is_data_service_provider',
scopedSlots: { customRender: 'is_data_service_provider' }
},
{
title: '排序',
dataIndex: 'sort'

@ -10,6 +10,22 @@
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="商城版本" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group
v-decorator="['store_version', { rules: [{ required: true, message: '请选择商城版本' }] }]"
>
<a-radio value="单商户">单商户</a-radio>
<a-radio value="多商户">多商户</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="是否数据服务商" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group
v-decorator="['is_data_service_provider', { rules: [{ required: true, message: '请选择' }] }]"
>
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="商城名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['store_name', {rules: [{required: true, min: 3, message: '请输入至少3个字符'}]}]"

23373
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save