Files
dvcp_v2_webapp/project/fengdu/AppOutSource/AppMarkRate/components/Detail.vue

182 lines
4.7 KiB
Vue
Raw Normal View History

2024-06-23 18:06:40 +08:00
<template>
2024-06-24 09:21:06 +08:00
<ai-detail class="detail">
<template slot="title">
<ai-title title="评价详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper>
2024-06-25 16:36:01 +08:00
<ai-info-item label="门店名称" :value="info.shopName"></ai-info-item>
<ai-info-item label="门店地址" :value="info.address"></ai-info-item>
2024-06-26 16:48:30 +08:00
<ai-info-item label="经营者姓名" :value="info.shopPerson"></ai-info-item>
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
2024-06-26 11:56:47 +08:00
<ai-info-item label="评价人" :value="info.evaluator"></ai-info-item>
<ai-info-item label="评价人电话" :value="info.evaluatorPhone"></ai-info-item>
<ai-info-item label="评价时间" :value="info.evaluationTime"></ai-info-item>
2024-06-26 16:48:30 +08:00
<ai-info-item label="评价人类型" :value="$dict.getLabel('evaluatorType',info.evaluatorType)"></ai-info-item>
<ai-info-item label="评价类型" isLine :value="info.assessType"></ai-info-item>
2024-06-26 11:56:47 +08:00
<ai-info-item label="评语" isLine :value="info.remark"></ai-info-item>
2024-06-26 16:48:30 +08:00
<ai-info-item label="现场图片" isLine>
2024-06-28 17:05:28 +08:00
<div class="files" v-if="info.pictureUrl">
2024-06-24 09:21:06 +08:00
<ai-uploader
:instance="instance"
fileType="img"
2024-06-26 16:48:30 +08:00
v-model="info.fileList"
2024-06-24 09:21:06 +08:00
acceptType=".jpg,.png,.jpeg,.JPG,.PNG,.JPEG"
:limit="9" :disabled="true">
</ai-uploader>
</div>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="打分细则">
<label class="aibar-left">1正面清单</label>
<ai-table
class="mt-16"
:tableData="tableData1"
:is-show-pagination="false"
2024-06-27 17:02:06 +08:00
:col-configs="colConfigs">
2024-06-24 09:21:06 +08:00
</ai-table>
<label class="aibar-left">2负面清单</label>
<ai-table
class="mt-16"
:tableData="tableData2"
:is-show-pagination="false"
2024-06-27 17:02:06 +08:00
:col-configs="colConfigs">
2024-06-24 09:21:06 +08:00
</ai-table>
</ai-card>
</template>
</ai-detail>
2024-06-23 18:06:40 +08:00
</template>
<script>
export default {
name: "Detail",
2024-06-24 09:21:06 +08:00
props: {
instance: Function,
dict: Object,
params: Object
},
2024-06-23 18:06:40 +08:00
data() {
2024-06-24 09:21:06 +08:00
return {
2024-06-26 16:48:30 +08:00
info: {
2024-06-27 17:02:06 +08:00
fileList: []
2024-06-26 16:48:30 +08:00
},
2024-06-27 17:02:06 +08:00
tableData1: [],
colConfigs: [
{prop: 'listType', label: '清单类型', align: 'center'},
{
prop: 'status', label: '状态', align: 'center', render: (h, {row}) => {
if (row.status === '1') {
return h('i', {
class: "el-icon-circle-check",
style: 'font-size:18px'
})
}
return ''
}
},
{prop: 'score', label: '分数', align: 'center'},
2024-06-24 09:21:06 +08:00
],
2024-06-27 17:02:06 +08:00
tableData2: [],
2024-06-24 09:21:06 +08:00
}
},
2024-06-25 15:43:43 +08:00
created() {
2024-06-27 17:02:06 +08:00
this.$dict.load('evaluatorType').then(() => {
2024-06-26 16:48:30 +08:00
this.getDetail()
2024-06-27 17:02:06 +08:00
this.getList()
2024-06-26 16:48:30 +08:00
})
2024-06-25 15:43:43 +08:00
},
2024-06-24 09:21:06 +08:00
methods: {
2024-06-27 17:02:06 +08:00
async getList() {
2024-06-25 15:43:43 +08:00
try {
2024-06-27 17:02:06 +08:00
const {code, data: {records}} = await this.instance.post('/app/appscoredetails/list', null, {
params: {
shopId: this.params.shopId,
pages: 1000
2024-06-25 15:43:43 +08:00
}
})
2024-06-27 17:02:06 +08:00
if (code === 0 && records) {
this.tableData1 = records?.filter(item => item.type === '1')
this.tableData2 = records?.filter(item => item.type === '0')
2024-06-25 15:43:43 +08:00
}
2024-06-27 17:02:06 +08:00
} catch (e) {
2024-06-25 15:43:43 +08:00
console.error(e)
}
},
2024-06-27 17:02:06 +08:00
async getDetail() {
2024-06-25 15:43:43 +08:00
try {
2024-06-27 17:02:06 +08:00
const {code, data} = await this.instance.post('/app/appshopassess/queryDetailById', null, {
params: {
id: this.params.id
2024-06-25 15:43:43 +08:00
}
})
2024-06-27 17:02:06 +08:00
if (code === 0) {
2024-06-25 15:43:43 +08:00
this.info = data
2024-06-27 17:02:06 +08:00
this.info.fileList = data.pictureUrl?.split(',')?.map(item => {
2024-06-26 16:48:30 +08:00
return {
2024-06-27 17:02:06 +08:00
url: item
2024-06-26 16:48:30 +08:00
}
})
2024-06-25 15:43:43 +08:00
}
2024-06-27 17:02:06 +08:00
} catch (e) {
2024-06-25 15:43:43 +08:00
console.error(e)
}
},
2024-06-24 09:21:06 +08:00
cancel() {
this.$emit('change', {
type: 'List',
isRefresh: true
})
}
2024-06-23 18:06:40 +08:00
},
}
</script>
<style lang="scss" scoped>
2024-06-27 17:02:06 +08:00
.detail {
2024-06-24 09:21:06 +08:00
.files {
display: flex;
align-items: center;
flex-wrap: wrap;
.file-item {
width: 118px;
height: 118px;
margin: 0 20px 20px 0;
img, video {
width: 100%;
height: 100%;
object-fit: cover;
}
2024-06-23 18:06:40 +08:00
2024-06-24 09:21:06 +08:00
img {
cursor: pointer;
transition: all ease 0.3s;
&:hover {
opacity: 0.7;
}
}
}
}
2024-06-27 17:02:06 +08:00
.aibar-left {
2024-06-24 09:21:06 +08:00
color: #222;
font-size: 16px;
font-weight: 700;
}
2024-06-27 17:02:06 +08:00
.mt-16 {
2024-06-24 09:21:06 +08:00
margin-top: 16px;
}
}
2024-06-23 18:06:40 +08:00
</style>