123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <template>
- <view style=" background-color: #FFF2CC;">
- <!--pages/handleSuggest/handleSuggest.wxml-->
-
- <!-- 建议信息 -->
- <view class="suggestHead">
- <text>投诉号</text>
- <text class="suggestHeadDetail">{{complaint.id}}</text>
- </view>
- <view class="suggestHead">
- <text>投诉人UID</text>
- <text class="suggestHeadId">{{complaint.fromUid}}</text>
- </view>
- <view class="suggestHead">
- <text>处理人UID</text>
- <text class="suggestHeadId">{{complaint.processorUid}}</text>
- </view>
- <view class="suggestHead">
- <text>投诉日期</text>
- <text class="suggestHeadDetail">{{complaint.fistDatetime}}</text>
- </view>
- <!-- 建议标题 -->
- <view class="suggestTitle">
- <text class="suggestTitleText">投诉标题</text>
- <text class="suggestTitleDetail">{{complaint.complaintTitle}}</text>
- </view>
- <!-- 建议内容 -->
- <view class="suggestTitle">
- <text class="suggestTitleText">投诉内容</text>
- <text class="suggestTitleDetail">{{complaint.complaintDetail}}</text>
- </view>
- <!-- 结案日期 -->
- <view class="handleDate">
- <text>结案日期</text>
- <text class="handleDateDetail">{{complaint.closetime}}</text>
- </view>
- <!-- 处理状态 -->
- <view class="handleStatus">
- <text>状态</text>
- <text class="handleStatusDetail">{{complaint.status}}</text>
- </view>
- <!-- 处理结果 -->
- <view class="handleResult">
- <view class="handleResultTitle">处理结果</view>
- <!-- 未处理 -->
- <view>
- <textarea v-model="result" class="handleDetail" maxlength="512" placeholder="不超过512个字"></textarea>
- </view>
-
- </view>
- <!-- 底部按钮 -->
- <view class="handleEnd">
- <text class="handleClosed" @click="toHandle">结案</text>
- </view>
-
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- complaint: {},
- result: ""
- };
- },
- onLoad(opt){
- this.complaint = JSON.parse(opt.item);
- if(this.complaint.processorUid==null){
- this.complaint.processorUid = " ";
- }
- },
- methods:{
- toHandle(){
-
- var head = '^[ ]+$';
-
- var re = new RegExp(head);
- if (re.test(this.result)) {
- uni.showModal({
- title: '',
- content: '结果不能为空'
- })
- }
- else if(this.result==null || this.result==""){
- uni.showModal({
- title: '',
- content: '结果不能为空'
- })
- }
- else{
- uni.request({
- url: 'http://localhost:8222/education/my-complaint/handleComplaint',
- data: {
- "id": this.complaint.id,
- "result": this.result
- },
- header: {
- token: uni.getStorageSync('token')
- },
- method: 'POST',
- success: res => {
- // this.isLoading = false
- console.log(res)
-
-
- uni.$showMsg(res.data.message)
- /* setTimeout(() => {
- uni.navigateBack()
- }, 1000) */
-
- uni.navigateBack({
- delta: 2,
- })
- }
- })
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- /* pages/handleSuggest/handleSuggest.wxss */
- /* 设置页面背景 */
- page{
- padding: 20rpx;
- height: 100%;
- background-color: #FFF2CC;
- }
- /* 顶部的建议信息 */
- .suggestHead{
- margin-top: 20rpx;
- }
- /* 顶部建议信息详情、结案日期详情、状态处理详情 */
- .suggestHeadDetail,
- .suggestHeadId,
- .handleDateDetail,
- .handleStatusDetail{
- margin-left: 20rpx;
- font-weight: bold;
- }
- .suggestHeadId{
- color: #00B0F0;
- text-decoration: underline;
- }
- /* 建议详情 */
- .suggestTitle{
- margin-top: 30rpx;
- display: flex;
- flex-direction: column;
- }
- /* 标题 */
- .suggestTitleText{
- text-align: center;
- font-weight: bold;
- margin-bottom: 10rpx;
- }
- /* 内容 */
- .suggestTitleDetail{
- width: 94%;
- }
- /* 结案日期 */
- .handleDate{
- margin-top: 40rpx;
- }
- /* 处理状态 */
- .handleStatus{
- margin-top: 40rpx;
- }
- .handleStatusDetail{
- color: red;
- }
- /* 处理结果 */
- .handleResult{
- display: flex;
- flex-direction: column;
- }
- .handleResultTitle{
- text-align: center;
- margin: 20rpx 0;
- font-weight: bold;
- }
- /* 处理结果详情 */
- .handleDetail{
- padding: 10rpx;
- background-color: #fff;
- border: 1rpx solid gray;
- border-radius: 20rpx;
- width: 93%;
- margin: auto;
- //margin-bottom: 40rpx;
- }
- .handleResultDetail{
- min-height: 200rpx;
- padding: 10rpx;
- background-color: #fff;
- border-radius: 20rpx;
- width: 93%;
- margin-bottom: 40rpx;
- }
- /* 结案 */
- .handleEnd{
- display: flex;
- justify-content: center;
- margin-bottom: 40rpx;
- }
- .handleClosed{
- background-color: #8FAADC;
- font-size: 40rpx;
- padding: 10rpx 30rpx;
- border-radius: 40rpx;
- color: white;
- }
- </style>
|