Commit 95a33c91 by 无尘

fix: 修改用户反馈

parent 68ee6a09
......@@ -23,7 +23,7 @@ import replyDialog from '@/components/suggest/reply-dialog.vue'
</el-select>
</el-form-item>
<el-form-item label="反馈内容:" prop="message">
<limit-textarea :inputWidth="448" :inputValue.sync="templateData.message" :holder="'请输入反馈内容'" :getByType="'word'" :maxLength="100"> </limit-textarea>
<limit-textarea :inputWidth="448" :inputValue.sync="formData.message" :holder="'请输入反馈内容'" :getByType="'word'" :maxLength="100"> </limit-textarea>
</el-form-item>
</el-form>
</div>
......@@ -67,6 +67,13 @@ export default {
}
},
data() {
let validMessage = (rule, value, callback) => {
if (this.formData.message === '') {
callback(new Error('请输入反馈内容'));
} else {
callback();
}
};
return {
customDialog: false, // 弹框显示
formData: {
......@@ -86,7 +93,7 @@ export default {
message: ''
},
rules: {
message: [{ required: true, message: '请输入反馈内容', trigger: 'blur' }]
message: [{ required: true, validator: validMessage, trigger: 'blur' }]
},
statusOptions: [],
typeOptions: []
......@@ -98,6 +105,7 @@ export default {
*/
handleClose(done) {
const that = this;
that.$refs['publishForm'].resetFields();
done();
that.hideDialog();
},
......@@ -107,6 +115,7 @@ export default {
*/
customCancel() {
const that = this;
that.$refs['publishForm'].resetFields();
that.hideDialog();
},
......@@ -114,9 +123,10 @@ export default {
const that = this;
that.customDialog = false;
that.$emit('hidePublishDialog');
/* that.$nextTick(() => {
that.formData.classifyName = '';
}); */
that.templateData = {
templateType: '',
message: ''
}
},
/**
* 改变模板
......@@ -126,7 +136,7 @@ export default {
that.typeOptions.forEach(ele => {
if (ele.templateType == e) {
that.templateData.message = ele.templateDetail;
that.formData.message = ele.templateDetail;
that.$set(that.formData, 'message',that.templateData.message )
}
});
},
......@@ -136,6 +146,8 @@ export default {
*/
customConfirm(formName) {
const that = this;
that.formData.message = that.templateData.message;
that.$set(that.formData, 'message',that.templateData.message )
that.$refs[formName].validate(valid => {
if (valid) {
that.postEditData();
......@@ -173,6 +185,10 @@ export default {
*/
setData(list) {
const that = this;
that.templateData = {
templateType: '',
message: ''
}
that.$emit('hidePublishDialog', true);
},
/**
......
......@@ -79,7 +79,7 @@
<div class="reply-list">
<div class="reply-title font-14 color-303133">回复内容</div>
<template v-for="(item, index) in replyList">
<div class="flex flex-space-between relpy-cell" :key="index + 'reply'">
<div class="flex flex-start relpy-cell" :key="index + 'reply'">
<div class="reply-list-left"><img :src="item.userImageUrl" alt="" /></div>
<div class="reply-list-right">
<div class="flex flex-column flex-space-between">
......@@ -91,9 +91,9 @@
<span v-if="item.issueStatus == 2" class="">【已解决】</span>
</div>
</div>
<div class="flex flex-space-between">
<div class="flex flex-space-between m-t-8">
<div class="reply-content font-14 color-606266">{{ item.message }}</div>
<div class="reply-date">{{ createTime | formatTimeStamp }}</div>
<div class="reply-date">{{ item.createTime | formatTimeStamp }}</div>
</div>
</div>
</div>
......@@ -104,6 +104,9 @@
</div>
</div>
</el-form>
<div class="reply-btn">
<el-button type="primary" @click="toReply">快速回复</el-button>
</div>
</div>
<reply-dialog :editRow="editRow" :publishShow="publishShow" @hidePublishDialog="hidePublishDialog"> </reply-dialog>
</div>
......@@ -191,10 +194,10 @@ export default {
/**
* 快速回复
*/
toReply(index, row) {
toReply() {
const that = this;
that.publishShow = true;
that.editRow = row;
that.editRow = that.formData;
},
hidePublishDialog(flag) {
const that = this;
......@@ -238,6 +241,7 @@ export default {
.then(res => {
let data = res.data;
if (data.errorCode == 0) {
that.total = data.totalCount;
that.replyList = data.result || [];
} else {
that.$message.error(data.message);
......@@ -310,10 +314,12 @@ export default {
}
.relpy-cell {
padding: 20px 0;
border-bottom: 1px solid #d6e0f0;
}
.reply-list-left {
width: 48px;
height: 48px;
margin-right: 17px;
border-radius: 2px;
background: #ecf1f5;
img {
......@@ -323,6 +329,14 @@ export default {
}
}
.reply-list-right {
width: calc(100% - 65px);
height: 48px;
.reply-content {
max-width: 720px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.reply-status {
font-size: 13px;
color: #faad14;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment