public-opinion/pagesA/feedback/feedback.vue

127 lines
3.7 KiB
Vue
Raw Normal View History

2022-07-30 16:05:50 +08:00
<template>
2022-07-31 17:43:52 +08:00
<view class="pad-x50" v-if="loading">
2022-07-30 16:05:50 +08:00
<view class="disac pad-zy20 pad-sx30">
<view class="cricle-box"></view>
<view class="fon36 mar-z20">处理反馈</view>
</view>
<view class="pad-zy20 fon30" style="background-color: #f5f5f5;">
2022-08-08 16:39:27 +08:00
<view class="col9 pad-sx30">{{detail.opinion.operateLog[0].operated_at || ''}}</view>
2022-07-30 16:05:50 +08:00
<view class="disjb bbot pad-x30">
<view class="">调查情况</view>
2022-08-08 16:39:27 +08:00
<view class="col9 tright" style="max-width: 50%;">{{detail.opinion.operateLog[0].operate_desc || '无'}}</view>
2022-07-30 16:05:50 +08:00
</view>
<view class="disjb bbot pad-sx30">
<view class="">处理结果</view>
2022-08-08 16:39:27 +08:00
<view class="col9 tright" style="max-width: 50%;">{{detail.opinion.operateLog[0].operate_result || '无'}}</view>
2022-07-30 16:05:50 +08:00
</view>
</view>
<view class="disac pad-zy20 pad-sx30">
<view class="cricle-box"></view>
<view class="fon36 mar-z20">历史反馈</view>
</view>
2022-08-08 16:39:27 +08:00
<view class="" v-if="detail.feedbackLog">
<view class="pad-zy20 fon30" style="background-color: #f5f5f5;" v-for="(item,index) in detail.opinion.feedbackLog" :key="index">
2022-07-31 17:43:52 +08:00
<view class="col9 pad-sx30">{{item.create_time}}</view>
<view class="disjb pad-x30">
<view class="">反馈意见{{['不满意','满意'][item.satisfied]}}</view>
<view class="col9 tright" style="max-width: 50%;">{{item.content}}</view>
</view>
2022-07-30 16:05:50 +08:00
</view>
</view>
<view class="disac pad-zy20 pad-sx30">
<view class="cricle-box"></view>
<view class="fon36 mar-z20">反馈提交</view>
</view>
<view class="disjcac pad-zy20">
<view @tap="chooseType" class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;">
<view class="col9 fon30">{{typeText}}</view>
2022-07-30 17:04:24 +08:00
<i class="icon icon-zsj colb fon24"></i>
2022-07-30 16:05:50 +08:00
</view>
</view>
<view class="disjcac pad-zy20 mar-s30">
<view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;">
2022-07-31 16:59:35 +08:00
<textarea class="col9 fon30" v-model="content" style="height: 272rpx;" placeholder="请输入反馈信息"></textarea>
2022-07-30 16:05:50 +08:00
</view>
</view>
<view class="disjcac mar-s70">
2022-07-31 17:43:52 +08:00
<view class="disjcac enter-btn" style="margin: 0;" @tap="setFeedBack"></view>
2022-07-30 16:05:50 +08:00
</view>
</view>
</template>
<script>
export default {
data() {
return {
typeList:['满意','不满意'],
2022-07-31 16:59:35 +08:00
typeText:'满意',
2022-07-31 17:43:52 +08:00
content:'',
id:'',
detail:'',
loading:false,
flag:true
2022-07-30 16:05:50 +08:00
}
},
2022-07-31 17:43:52 +08:00
onLoad(op) {
this.id = op.id;
this.getDetailEv(op.id);
},
2022-07-30 16:05:50 +08:00
methods: {
2022-07-31 17:43:52 +08:00
// 查询工单详情
getDetailEv(id){
this.$toolAll.tools.showToast('加载中...');
this.$requst.post('user/feedback-load',{id}).then(res => {
if(res.code==0){
this.detail = res.data;
this.loading = true;
uni.hideToast();
} else {
this.$toolAll.tools.showToast(res.msg);
}
uni.hideLoading();
this.isLoading = true;
})
},
2022-07-30 16:05:50 +08:00
// 选择类型
chooseType(){
uni.showActionSheet({
itemList:this.typeList,
success: (res) => {
this.typeText = this.typeList[res.tapIndex];
}
})
2022-07-31 16:59:35 +08:00
},
// 反馈提交
setFeedBack(){
2022-07-31 17:43:52 +08:00
if(this.flag){
this.flag = false;
let params = {
satisfied:this.typeText=="满意"?1:0,
content:this.content,
id:this.id
2022-07-31 16:59:35 +08:00
}
2022-07-31 17:43:52 +08:00
this.$toolAll.tools.showToast('正在提交...');
this.$requst.post('user/create-feedback',params).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('提交成功');
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},500)
}
})
2022-08-08 16:39:27 +08:00
setTimeout(()=>{
this.flag = true;
},2000)
2022-07-31 17:43:52 +08:00
} else {
this.$toolAll.tools.showToast('请勿重复提交');
}
2022-07-30 16:05:50 +08:00
}
}
}
</script>
<style>
</style>