Commit 52ef41127fee96dbd0726fbd201d4afe78c42dd3
1 parent
61f89c44
提交登陆
Showing
4 changed files
with
185 additions
and
77 deletions
src/api/mysuggest.js
0 → 100644
1 | +import request from '@/utils/request' | |
2 | + | |
3 | + | |
4 | +/** | |
5 | + * 分页查询-投诉建议 | |
6 | + * @param params | |
7 | + */ | |
8 | +export function queryFeedbackAndSuggestForPage(params){ | |
9 | + return request({ | |
10 | + url: '/personPc/suggest/queryFeedbackAndSuggestForPage', | |
11 | + method: 'post', | |
12 | + data:params | |
13 | + }) | |
14 | +} | |
15 | + | |
16 | + | |
17 | +/** | |
18 | + * 问题类型 | |
19 | + * @param params | |
20 | + */ | |
21 | +export function getFeedbackType(params){ | |
22 | + return request({ | |
23 | + url: '/personPc/suggest/getFeedbackType', | |
24 | + method: 'post', | |
25 | + data:params | |
26 | + }) | |
27 | +} | |
28 | + | |
29 | + | |
30 | +/** | |
31 | + * 问题类型 | |
32 | + * @param params | |
33 | + */ | |
34 | +export function saveFeedbackAndSuggest(params){ | |
35 | + return request({ | |
36 | + url: '/personPc/suggest/saveFeedbackAndSuggest', | |
37 | + method: 'post', | |
38 | + data:params | |
39 | + }) | |
40 | +} | |
41 | + | |
42 | + | |
43 | + | |
44 | + | |
45 | + | |
46 | + | ... | ... |
src/router/index.js
... | ... | @@ -123,11 +123,6 @@ export const constantRoutes = [ |
123 | 123 | meta: { title: '个人资料' } |
124 | 124 | }, |
125 | 125 | { |
126 | - path: 'settings', | |
127 | - component: () => import('@/views/settings/index'), | |
128 | - meta: { title: '账户设置' }, | |
129 | - }, | |
130 | - { | |
131 | 126 | path: 'myevaluate', |
132 | 127 | component: () => import('@/views/myevaluate/index'), |
133 | 128 | meta: { title: '我的评价' } | ... | ... |
src/views/information/index.vue
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <!--卡片--> |
4 | 4 | <el-row :gutter="16" class=""> |
5 | 5 | <el-col :span="8"> |
6 | - <el-card class="box-card"> | |
6 | + <el-card class="box-card" style="height: 364px"> | |
7 | 7 | <el-form status-icon :rules="rules" ref="fileUploadForm"> |
8 | 8 | <el-upload |
9 | 9 | class="avatar-uploader text-center" |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | </el-form> |
19 | 19 | <!--<el-button class="text-center" size="small" type="primary">点击上传</el-button>--> |
20 | 20 | <!--<div slot="tip" class="el-upload__tip"></div>--> |
21 | - <div class="common-color text-center" style="line-height: 30px">{{userPhone}}</div> | |
21 | + <div class="common-color text-center" style="line-height: 60px;font-size: 24px">{{userPhone}}</div> | |
22 | 22 | |
23 | 23 | <div class="font-size12 text-center" style="line-height: 30px">支持JPG格式且小于5MB</div> |
24 | 24 | <div class="font-size12 text-center" style="height: 146px"></div> | ... | ... |
src/views/myevaluate/index.vue
... | ... | @@ -5,22 +5,14 @@ |
5 | 5 | <el-form ref="form" :model="form" label-width="60px" label-position="left"> |
6 | 6 | <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1"> |
7 | 7 | <el-form-item label="问题类型"> |
8 | - <el-select v-model="form.region" placeholder="请选择问题类型"> | |
9 | - <el-option label="问题类型1" value="1"/> | |
10 | - <el-option label="问题类型2" value="2"/> | |
11 | - </el-select> | |
12 | - </el-form-item> | |
13 | - </el-col> | |
14 | - <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1"> | |
15 | - <el-form-item label="状态"> | |
16 | - <el-select v-model="form.region" placeholder="请选择状态"> | |
17 | - <el-option label="状态1" value="11"/> | |
18 | - <el-option label="状态2" value="22"/> | |
8 | + <el-select v-model="form.feedbackId" placeholder="请选择问题类型"> | |
9 | + <el-option v-for="item in problemTpyeSelectData" :label="item.name" :value="item.code"/> | |
10 | + | |
19 | 11 | </el-select> |
20 | 12 | </el-form-item> |
21 | 13 | </el-col> |
22 | - <el-col :xs="16" :sm="6" :md="3" :lg="3" :xl="1"> | |
23 | - <el-button type="primary" @click="onSubmit">查询</el-button> | |
14 | + <el-col :xs="16" :sm="6" :md="3" :lg="3" :xl="1" :offset="12"> | |
15 | + <el-button type="primary" @click="queryBtn">查询</el-button> | |
24 | 16 | </el-col> |
25 | 17 | </el-form> |
26 | 18 | </el-row> |
... | ... | @@ -29,120 +21,195 @@ |
29 | 21 | <el-card shadow="always" class="card-second-top"> |
30 | 22 | <div slot="header" class="clearfix" style="line-height: 32px;"> |
31 | 23 | <span>详细记录</span> |
32 | - <el-button type="primary" size="small" style="float: right" @click="dialogFormVisible = true">评价</el-button> | |
24 | + <el-button type="primary" size="small" style="float: right" @click="dialogOpen">评价</el-button> | |
33 | 25 | </div> |
34 | 26 | <el-table |
35 | 27 | :data="orderData" |
36 | 28 | style="width: 100%;" |
37 | 29 | :show-overflow-tooltip="true"> |
38 | 30 | <el-table-column |
39 | - prop="parkName" | |
31 | + prop="feedbackCode" | |
40 | 32 | label="问题类型" |
33 | + :formatter="formatProblemType" | |
41 | 34 | :show-overflow-tooltip="true"> |
42 | 35 | </el-table-column> |
43 | 36 | <el-table-column |
44 | - prop="license" | |
37 | + prop="suggestDesc" | |
45 | 38 | label="问题内容" |
46 | 39 | :show-overflow-tooltip="true"> |
47 | 40 | </el-table-column> |
48 | 41 | <el-table-column |
49 | - prop="inTime" | |
42 | + prop="createDate" | |
50 | 43 | label="提交时间" |
44 | + :formatter="formatCreateDate" | |
51 | 45 | :show-overflow-tooltip="true"> |
52 | 46 | </el-table-column> |
53 | 47 | <el-table-column |
54 | - prop="status" | |
55 | - label="状态"> | |
48 | + prop="userPhone" | |
49 | + :formatter="formatserPhone" | |
50 | + label="用户手机号"> | |
56 | 51 | </el-table-column> |
57 | 52 | </el-table> |
58 | 53 | <el-pagination |
59 | - :page-size="10" | |
60 | - :pager-count="11" | |
54 | + :page-size="pageSize" | |
55 | + :pager-count="currentPage" | |
61 | 56 | layout="prev, pager, next" |
57 | + @current-change="handleCurrentChange" | |
62 | 58 | :total="total"> |
63 | 59 | </el-pagination> |
64 | 60 | </el-card> |
65 | 61 | |
66 | 62 | <el-dialog title="提交问题" :visible.sync="dialogFormVisible"> |
67 | - <el-form :model="problemform"> | |
63 | + <el-form :model="problemform" :rules="rules" ref="problemform"> | |
68 | 64 | <el-form-item label=""> |
69 | 65 | <el-radio-group v-model="problemform.resource" size=""> |
70 | - <el-radio border label="APP问题"></el-radio> | |
71 | - <el-radio border label="支付问题"></el-radio> | |
72 | - <el-radio border label="车场问题"></el-radio> | |
73 | - <el-radio border label="服务投诉"></el-radio> | |
74 | - <el-radio border label="改进建议"></el-radio> | |
75 | - <el-radio border label="其他问题"></el-radio> | |
66 | + <el-radio border v-for="item in problemTpyeSelectData" :label="item.code">{{item.name}}</el-radio> | |
76 | 67 | </el-radio-group> |
77 | 68 | </el-form-item> |
78 | - <el-form-item label="问题内容"> | |
79 | - <el-input type="textarea" v-model="problemform.desc"></el-input> | |
69 | + <el-form-item label="问题内容" style="margin-top: 16px" prop="desc"> | |
70 | + <el-input type="textarea" v-model="problemform.desc" style="width:400px"></el-input> | |
80 | 71 | </el-form-item> |
81 | 72 | </el-form> |
82 | 73 | <div slot="footer" class="dialog-footer"> |
83 | 74 | <el-button @click="dialogFormVisible = false">取 消</el-button> |
84 | - <el-button type="primary" @click="dialogFormVisible = false">提交</el-button> | |
75 | + <el-button type="primary" @click="executeDialog('problemform')">提交</el-button> | |
85 | 76 | </div> |
86 | 77 | </el-dialog> |
87 | 78 | </div> |
88 | 79 | </template> |
89 | 80 | |
90 | 81 | <script> |
82 | + import {queryFeedbackAndSuggestForPage,getFeedbackType,saveFeedbackAndSuggest} from '@/api/mysuggest.js'; | |
83 | + import {timeFormatter} from '@/utils/utils.js' | |
91 | 84 | export default { |
92 | 85 | data() { |
93 | 86 | return { |
94 | 87 | form: { |
95 | - name: '', | |
96 | - region: '', | |
97 | - date1: '', | |
98 | - date2: '', | |
99 | - delivery: false, | |
100 | - type: [], | |
101 | - resource: '', | |
102 | - desc: '' | |
88 | + feedbackId:'' | |
103 | 89 | }, |
90 | + problemTpyeSelectData:[], | |
104 | 91 | problemform: { |
105 | - desc: '' | |
92 | + resource: '1', | |
93 | + desc:'' | |
106 | 94 | }, |
107 | 95 | dialogFormVisible: false, |
108 | - total: 55, | |
96 | + total: 10, | |
109 | 97 | currentPage: 1, |
110 | 98 | pageSize: 10, |
111 | - orderData: [ | |
112 | - { | |
113 | - parkName: 'APP问题', | |
114 | - license: '任你停APP闪退', | |
115 | - inTime: '2019/03/07', | |
116 | - status: '已受理' | |
117 | - }, | |
118 | - { | |
119 | - parkName: '支付问题', | |
120 | - license: '建议开通银联支付', | |
121 | - inTime: '2019/06/02', | |
122 | - status: '已受理' | |
123 | - }, | |
124 | - { | |
125 | - parkName: '改进建议', | |
126 | - license: '建议减免电动车停车费', | |
127 | - inTime: '2019/06/02', | |
128 | - status: '未受理' | |
129 | - }, | |
130 | - ] | |
99 | + orderData: [], | |
100 | + rules:{ | |
101 | + desc:[ | |
102 | + {required: true, message: '请输入问题内容', trigger: 'blur'}, | |
103 | + {min: 1, max: 10, message: '长度在 3 到 128 个字符', trigger: 'blur'} | |
104 | + ] | |
105 | + } | |
131 | 106 | } |
132 | 107 | }, |
133 | 108 | methods: { |
134 | - onSubmit() { | |
135 | - this.$message('提交!') | |
109 | + queryBtn() { | |
110 | + let that =this; | |
111 | + let userInfo = this.$store.state.user.userInfo; | |
112 | + let req ={ | |
113 | + baseRequest:{ | |
114 | + pageNum:that.currentPage, | |
115 | + pageSize:that.pageSize | |
116 | + }, | |
117 | + feedbackCode:this.form.feedbackId, | |
118 | + custId:userInfo.custId, | |
119 | + sysCode:'1000' | |
120 | + }; | |
121 | + queryFeedbackAndSuggestForPage(req).then(response =>{ | |
122 | + if(response.code='8888'){ | |
123 | + that.orderData=response.data.rows; | |
124 | + that.total=response.data.total; | |
125 | + } | |
126 | + }); | |
127 | + }, | |
128 | + /**格式化问题类型.*/ | |
129 | + formatProblemType:function(row, column, cellValue, index){ | |
130 | + let value=""; | |
131 | + if(cellValue == null || cellValue == '' ){ | |
132 | + return value; | |
133 | + }else{ | |
134 | + this.problemTpyeSelectData.forEach(item =>{ | |
135 | + if(cellValue ==item.code){ | |
136 | + value =item.name; | |
137 | + } | |
138 | + }); | |
139 | + } | |
140 | + return value; | |
141 | + }, | |
142 | + /**格式化时间*/ | |
143 | + formatCreateDate:function (row, column, cellValue, index) { | |
144 | + return timeFormatter(cellValue,7) | |
136 | 145 | }, |
137 | - problemonSubmit() { | |
138 | - this.$message('提交成功!') | |
146 | + /**问题类型查询*/ | |
147 | + getFeedbackType:function(){ | |
148 | + getFeedbackType().then(response =>{ | |
149 | + if(response.code='8888'){ | |
150 | + this.problemTpyeSelectData = response.data; | |
151 | + } | |
152 | + }); | |
139 | 153 | }, |
140 | - onCancel() { | |
141 | - this.$message({ | |
142 | - message: 'cancel!', | |
143 | - type: 'warning' | |
144 | - }) | |
154 | + /**格式化手机号*/ | |
155 | + formatserPhone:function (row, column, cellValue, index) { | |
156 | + if(cellValue == null || cellValue == undefined || cellValue == ''){ | |
157 | + return "-" | |
158 | + }else{ | |
159 | + return cellValue.substr(0, 3)+"****"+cellValue.substr(7, 4) | |
160 | + } | |
145 | 161 | }, |
162 | + /**页面改变.*/ | |
163 | + handleCurrentChange:function (value) { | |
164 | + this.currentPage=value; | |
165 | + this.queryBtn(); | |
166 | + }, | |
167 | + | |
168 | + dialogOpen:function(){ | |
169 | + let problemform= { | |
170 | + resource: '1', | |
171 | + desc:'' | |
172 | + }; | |
173 | + this.dialogFormVisible=true; | |
174 | + }, | |
175 | + /**提交.*/ | |
176 | + executeDialog:function(formName){ | |
177 | + let that =this; | |
178 | + let userInfo = this.$store.state.user.userInfo; | |
179 | + let feedbackCode=that.problemform.resource; | |
180 | + let suggestDesc =that.problemform.desc; | |
181 | + | |
182 | + this.$refs[formName].validate((valid) => { | |
183 | + if (valid) { | |
184 | + let req ={ | |
185 | + custId:userInfo.custId, | |
186 | + userPhone:userInfo.userPhone, | |
187 | + feedbackCode:feedbackCode, | |
188 | + suggestDesc:suggestDesc, | |
189 | + sysCode:'1001' | |
190 | + } | |
191 | + saveFeedbackAndSuggest(req).then(response =>{ | |
192 | + if(response.code='8888'){ | |
193 | + this.dialogFormVisible=false; | |
194 | + this.$message({ | |
195 | + type: 'success', | |
196 | + message: '问题提交成功!' | |
197 | + }); | |
198 | + that.queryBtn(); | |
199 | + }else{ | |
200 | + this.$message({ | |
201 | + type: 'error', | |
202 | + message: '问题提交失败!' | |
203 | + }); | |
204 | + } | |
205 | + }); | |
206 | + } | |
207 | + }); | |
208 | + } | |
209 | + }, | |
210 | + mounted:function () { | |
211 | + this.queryBtn(); | |
212 | + this.getFeedbackType(); | |
146 | 213 | } |
147 | 214 | } |
148 | 215 | </script> | ... | ... |