Authored by 陈峰

dev

<template>
<div>
<a :href="productUrl" target="_blank">
<img class="cell-img" :src="src">
<img class="cell-img" :src="src" target = "_blank">
</a>
</div>
</template>
... ...
... ... @@ -25,9 +25,8 @@
padding: 10px;
a {
display: block;
text-decoration: underline;
color: #999;
text-decoration: underline;
}
}
</style>
... ...
... ... @@ -7,16 +7,16 @@
咨询回复
</p>
<div style="text-align: center">
<filter-item>
<Input
type = "textarea"
:rows = "10"
placeholder="请输入文字内容"
v-model="answer"
@on-enter="submit"/>
</filter-item>
<Input
type = "textarea"
:rows = "10"
placeholder="请输入文字内容"
:maxlength="250"
v-model="answer"/>
</div>
<div style="text-align: right">
<span style="color: #999; font-size: 10px; margin-top: 2px;">{{textMsg}}</span>
</div>
<div slot="footer" style="text-align: center">
<Button type="primary" size="large" :loading="modal_loading" @click="submit">回复</Button>
<Button type="default" size="large" @click="cancel">取消</Button>
... ... @@ -42,7 +42,15 @@ export default {
answer: ''
};
},
computed: {
textMsg() {
if (this.answer) {
let num = 250 - this.answer.length;
return `还能输${num >= 0 ? num : 0}个字`;
}
}
},
methods: {
show(row) {
this.reset();
... ... @@ -79,6 +87,9 @@ export default {
};
</script>
<<<<<<< HEAD
<style lang="scss">
</style>
=======
>>>>>>> feature/suggestDev
... ...
... ... @@ -37,6 +37,7 @@
<Date-picker v-model="filters.answerTimeStr.model"
type="datetimerange"
placeholder="选择日期和时间"
placement="bottom-end"
@on-change="answerTimeChange">
</Date-picker>
</filter-item>
... ... @@ -94,6 +95,10 @@
this.filters.answerEndTime.model = '';
this.filters.askTimeStr.model = '';
this.filters.answerTimeStr.model = '';
this.filters.sort.first.model = null;
this.filters.sort.second.model = null;
this.filters.sort.third.model = null;
this.categoryValue = [];
this.pageData.current = 1;
this.list();
... ... @@ -113,7 +118,7 @@
middleSortId = fts.sort.second.model,
smallSortId = fts.sort.third.model,
brandId = fts.brandId.model === '' || fts.brandId.model === null ?
null : fts.brandId.model,
null : fts.brandId.model,
askStartTime = fts.askStartTime.model,
askEndTime = fts.askEndTime.model,
answerStartTime = fts.answerStartTime.model,
... ...
... ... @@ -7,6 +7,7 @@ import CellInfo from 'components/cell/cell-info';
export default function() {
return {
categoryValue: [],
tableCols: [
{
title: 'SKN',
... ... @@ -58,13 +59,29 @@ export default function() {
},
{
title: '回复内容',
key: 'answer',
align: 'center'
align: 'center',
render: (h, params) => {
let answer = params.row.answer;
if (answer.length > 0) {
return answer;
} else {
return '—';
}
}
},
{
title: '回复人',
key: 'answerUserName',
align: 'center',
render: (h, params) => {
let answerUserName = params.row.answerUserName;
if (answerUserName) {
return params.row.answerUserName;
} else {
return '—';
}
},
},
{
title: '咨询及回复时间',
... ... @@ -75,10 +92,10 @@ export default function() {
const infoItems = [
{
label: '咨询',
value: row.askTimeStr
value: row.askTimeStr.length > 0 ? row.askTimeStr : '—'
}, {
label: '回复',
value: row.answerTimeStr
value: row.answerTimeStr.length > 0 ? row.answerTimeStr : '—'
}
];
... ... @@ -102,7 +119,7 @@ export default function() {
return (
<div class="cell-action-row">
<i-button type="error" size="small"
onClick={() => this.editAnswer(row)}>
onClick={() => this.editAnswer(row)}>
修改
</i-button>
</div>
... ... @@ -111,7 +128,7 @@ export default function() {
return (
<div class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.editAnswer(row)}>
onClick={() => this.editAnswer(row)}>
回复
</i-button>
</div>
... ...
... ... @@ -68,8 +68,9 @@
this.filters.productName.model = null;
this.filters.hasImage.model = null;
this.filters.brand.model = null;
this.filters.beginTime = null;
this.filters.endTime = null;
this.filters.createTime.model = '';
this.filters.beginTime.model = '';
this.filters.endTime.model = '';
this.pageData.current = 1;
this.list();
... ... @@ -86,7 +87,7 @@
productName = fts.productName.model,
hasImage = fts.hasImage.model,
brand_id = fts.brand.model === '' || fts.brand.model === null ?
null : fts.brand.model,
null : fts.brand.model,
beginTime = fts.beginTime.model,
endTime = fts.endTime.model;
... ... @@ -177,9 +178,3 @@
}
};
</script>
<style lang="scss">
.cell-img {
width: 80px;
background-size: 100%;
}
</style>
... ...
... ... @@ -5,6 +5,7 @@
*/
import CellInfo from 'components/cell/cell-info';
import CellImage from 'components/cell/cell-image';
import _ from 'lodash';
export default function() {
return {
... ... @@ -33,7 +34,7 @@ export default function() {
},
{
label: 'SKN',
value: row.erpSkuId
value: row.productSkn
},
{
label: '品牌',
... ... @@ -71,15 +72,15 @@ export default function() {
{
title: '评价图片',
key: 'image',
width: 150,
align: 'center',
render: (h, params) => {
let url = params.row.url;
let urlNew = _.replace(url, 'w/800/h/800', 'w/80/h/80');
if (url.length > 0 && url.length !== 1) {
return h(CellImage, {
props: {
imageSrc: url,
imageSrc: urlNew,
productUrl: url
}
});
... ...