feat: 门店评价
This commit is contained in:
60
project/fengdu/AppOutSource/AppMarkRate/AppMarkRate.vue
Normal file
60
project/fengdu/AppOutSource/AppMarkRate/AppMarkRate.vue
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-mark-rate">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||||
|
</keep-alive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Detail from './components/Detail.vue'
|
||||||
|
import List from './components/List.vue'
|
||||||
|
export default {
|
||||||
|
name: "AppMarkRate",
|
||||||
|
label:'门店评价',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
components:{Detail,List},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
component: 'List',
|
||||||
|
params: {},
|
||||||
|
include: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange (data) {
|
||||||
|
if (data.type === 'Add') {
|
||||||
|
this.component = 'Add'
|
||||||
|
this.params = data.params
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.type === 'Detail') {
|
||||||
|
this.component = 'Detail'
|
||||||
|
this.params = data.params
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.type === 'List') {
|
||||||
|
this.component = 'List'
|
||||||
|
this.params = data.params
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (data.isRefresh) {
|
||||||
|
this.$refs.component.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-mark-rate{
|
||||||
|
height: 100%;
|
||||||
|
background: #F3F6F9;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
Detail
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Detail",
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
278
project/fengdu/AppOutSource/AppMarkRate/components/List.vue
Normal file
278
project/fengdu/AppOutSource/AppMarkRate/components/List.vue
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="app-mark-list">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="门店评价" isShowBottomBorder>
|
||||||
|
</ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar class="search-bar">
|
||||||
|
<template #left>
|
||||||
|
<el-input placeholder="请输入门店名称" size="small" clearable></el-input>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.applyItemId"
|
||||||
|
@change="(search.current = 1), getList()"
|
||||||
|
placeholder="评价人员类型"
|
||||||
|
:selectList="dictList">
|
||||||
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.applyItemId"
|
||||||
|
@change="(search.current = 1), getList()"
|
||||||
|
placeholder="所属片区"
|
||||||
|
:selectList="dictList">
|
||||||
|
</ai-select>
|
||||||
|
<ai-search label="评价时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="search.createTimeStart"
|
||||||
|
type="date"
|
||||||
|
size="small"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择开始日期"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</el-date-picker>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="search.createTimeEnd"
|
||||||
|
type="date"
|
||||||
|
size="small"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择结束日期"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</el-date-picker>
|
||||||
|
</ai-search>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.status"
|
||||||
|
@change="(search.current = 1), getList()"
|
||||||
|
placeholder="分数区间"
|
||||||
|
:selectList="$dict.getDict('appIntegralApplyEventStatus')">
|
||||||
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.status"
|
||||||
|
@change="(search.current = 1), getList()"
|
||||||
|
placeholder="评价类型"
|
||||||
|
:selectList="$dict.getDict('appIntegralApplyEventStatus')">
|
||||||
|
</ai-select>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<el-input
|
||||||
|
v-model="search.createUserName"
|
||||||
|
class="search-input"
|
||||||
|
size="small"
|
||||||
|
v-throttle="() => {search.current = 1, getList()}"
|
||||||
|
placeholder="请输入身份证、姓名、联系电话"
|
||||||
|
clearable
|
||||||
|
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||||
|
suffix-icon="iconfont iconSearch">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-search-bar class="search-bar">
|
||||||
|
<template #left>
|
||||||
|
<el-button icon="iconfont iconDelete" @click="handleDelBatch">删除</el-button>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<ai-download :instance="instance" url="/app/appintegraluser/girdIntegralExport" :params="search" fileName="门店评价"
|
||||||
|
:disabled="tableData.length == 0">
|
||||||
|
</ai-download>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:total="total"
|
||||||
|
style="margin-top: 6px;"
|
||||||
|
:current.sync="search.current"
|
||||||
|
:size.sync="search.size"
|
||||||
|
@getList="getList">
|
||||||
|
|
||||||
|
<el-table-column slot="options" width="180px" fixed="right" label="操作" align="center">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<div class="table-options">
|
||||||
|
<el-button type="text" @click="toDetail(row)">详情</el-button>
|
||||||
|
<el-button type="text" @click="handleDelete(row)">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { MessageBox } from 'element-ui'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
areaId: '',
|
||||||
|
applyItemId: '',
|
||||||
|
girdId: '',
|
||||||
|
createTimeStart: '',
|
||||||
|
createTimeEnd: '',
|
||||||
|
girdName: ''
|
||||||
|
},
|
||||||
|
userList: [],
|
||||||
|
dictList: [],
|
||||||
|
total: 10,
|
||||||
|
colConfigs: [
|
||||||
|
{type: "selection"},
|
||||||
|
{ prop: 'integralUserName', label: '门店名称', align: 'center' },
|
||||||
|
{ prop: 'areaName', label: '评价人', align: 'center' },
|
||||||
|
{ prop: 'girdName', label: '评价时间', align: 'center' },
|
||||||
|
{ prop: 'createTime', label: '联系电话', align: 'center' },
|
||||||
|
{ prop: 'status', label: '评价人类型', align: 'center'},
|
||||||
|
{ prop: 'auditUserName', label: '评价类型', align: 'center' },
|
||||||
|
{ prop: 'auditUserName', label: '门店地址', align: 'center' },
|
||||||
|
{ prop: 'auditUserName', label: '分数', align: 'center' },
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dateList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
|
||||||
|
hideLevel () {
|
||||||
|
return this.user.info.areaList?.length || 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
this.search.areaId = this.user.info.areaId
|
||||||
|
this.$dict.load('appIntegralApplyEventStatus', 'appIntegralApplyEventPushStatus').then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.getRulesList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
handleAdd(){
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Add',
|
||||||
|
params: {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelBatch(){
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getRulesList () {
|
||||||
|
this.instance.post(`/app/appintegralrule/listByAppletFD?current=1&size=3000`).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.dictList = res.data.records.map(v => {
|
||||||
|
return {
|
||||||
|
dictName: v.ruleName,
|
||||||
|
dictValue: v.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getList () {
|
||||||
|
this.instance.post(`/app/appintegraluserapply/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
changeArea () {
|
||||||
|
this.search.current = 1
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
push (id) {
|
||||||
|
MessageBox.confirm('是否将精选内容对全体居民公开,选则否将只对本村/社区居民公开。', '推送精选', {
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
confirmButtonText: '是',
|
||||||
|
type: 'warning',
|
||||||
|
closeOnClickModal: false,
|
||||||
|
center: true,
|
||||||
|
customClass: 'AiConfirm',
|
||||||
|
cancelButtonText: '否'
|
||||||
|
}).then(() => {
|
||||||
|
this.instance.post(`/app/appintegraluserapply/pushById?id=${id}&status=1`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.getList()
|
||||||
|
this.$message.success('推送成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch((e) => {
|
||||||
|
e === 'cancel' && this.instance.post(`/app/appintegraluserapply/pushById?id=${id}&status=0`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.getList()
|
||||||
|
this.$message.success('推送成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove (id) {
|
||||||
|
this.$confirm('确定删除该帖子?').then((e) => {
|
||||||
|
this.instance.post(`/app/appintegraluserapply/delete?id=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toDetail ({id}) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Detail',
|
||||||
|
params: {
|
||||||
|
id: id || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit({id}){
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Add',
|
||||||
|
params: {
|
||||||
|
id: id || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete({id}){
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toAdd(id) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Add',
|
||||||
|
params: {
|
||||||
|
id: id || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app-mark-list{
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user