290144e9
易尊强
第一次
|
1
|
<template>
|
5bbfac44
易尊强
28号下午提交
|
2
|
<!-- 管理员查看页面 -->
|
6c679290
易尊强
3/6a上午
|
3
|
<view class="page" v-if="isAdmin">
|
5bbfac44
易尊强
28号下午提交
|
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!-- <zb-tab
:activeStyle="{
fontWeight: 'bold',
transform: 'scale(1.1)'
}"
:data="list"
v-model="active"
></zb-tab> -->
<view class="item-box" v-for="(it,index) in appealList" :key="index" @click="toReponse(it.id)">
<view class="lef">
{{it.content}}
</view>
<view class="rig">
<view class="status" v-if="it.status == null" style="color: red;">
未处理
</view>
<view class="status" v-else>
{{it.status}}
</view>
<view class="button">
<button >查看/处理</button>
</view>
</view>
</view>
</view>
<!-- 普通用户页面 -->
<view class="page" v-else>
|
290144e9
易尊强
第一次
|
31
32
33
34
35
36
37
38
|
<!-- 反馈内容 -->
<view class="feedback-data">
<view class="titleall-box">
<view class="titleall-left"><view class="titleall-left-line"></view>填写诉求</view>
</view>
<view class="content">
<textarea v-model="requires" placeholder="请填写您的诉求..." />
</view>
|
9b1c150c
“wangming”
1
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<uni-section title="表单校验" type="line">
<view class="example">
<!-- 基础表单校验 -->
<uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData" style="width: 95%;margin: 0 auto;">
<uni-forms-item label="企业名称">
<uni-easyinput v-model="valiFormData.companyName" placeholder="请输入企业名称" />
</uni-forms-item>
<uni-forms-item label="联系人" required name="contactPeople">
<uni-easyinput v-model="valiFormData.contactPeople" placeholder="请输入联系人名字" />
</uni-forms-item>
<uni-forms-item label="联系人电话" required name="contactPhone">
<uni-easyinput v-model="valiFormData.contactPhone" placeholder="请输入联系人电话" />
</uni-forms-item>
</uni-forms>
<!-- <button type="primary" @click="submit('valiForm')">提交</button> -->
</view>
</uni-section>
<!-- <view class="voucher-img">
|
290144e9
易尊强
第一次
|
57
58
59
60
61
62
63
64
65
|
<view class="list">
<image src="/static/voucher_bg.png"></image>
</view>
<view class="list">
<image src="/static/img/yf_01.png"></image>
</view>
<view class="list">
<image src="/static/img/yf_01.png"></image>
</view>
|
9b1c150c
“wangming”
1
|
66
|
</view> -->
|
290144e9
易尊强
第一次
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
</view>
<!-- 选择反馈类型 -->
<view class="feedback-type">
<view class="feedback-type-left">隶属类别</view>
<view class="feedback-type-right">
<view class="title">
<text>{{TypeArray[TypeIndex]}}</text>
</view>
<view class="picker">
<picker @change="FeedbackTypeCh" :value="TypeIndex" :range="TypeArray">
<view class="uni-input">{{TypeArray[TypeIndex]}}</view>
</picker>
</view>
<view class="more">
<image src="../../static/down1.png"></image>
</view>
</view>
</view>
<!-- 提交 -->
|
9b1c150c
“wangming”
1
|
86
|
<view class="submit-btn" @click="submitContent('valiForm')">
|
290144e9
易尊强
第一次
|
87
88
89
|
<text>提交</text>
</view>
</view>
|
5bbfac44
易尊强
28号下午提交
|
90
91
|
|
290144e9
易尊强
第一次
|
92
93
94
95
96
|
</template>
<script>
import { data } from '../../uview-ui/libs/mixin/mixin';
import request from '@/utils/request.js'
|
5bbfac44
易尊强
28号下午提交
|
97
|
import { use } from 'echarts';
|
290144e9
易尊强
第一次
|
98
99
100
101
102
103
104
105
|
export default {
data() {
return {
TypeArray: ['行政审批', '生产运营', '金融服务', '其他'],
TypeIndex: 0,
// 填写诉求内容
requires:'',
type:"",
|
5bbfac44
易尊强
28号下午提交
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
lastModifyUserId:'',
userCode:'',
list:[{
name: '未处理',
value: 0,
}, {
name: '已处理',
value: 1,
}, {
name: '忽略',
value: 2,
}, {
name: '无效',
value: 3,
}],
|
6c679290
易尊强
3/6a上午
|
121
122
|
appealList:[],
isAdmin:false,
|
9b1c150c
“wangming”
1
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
valiFormData: {
title: '',
subTitle: '',
bodyContent: '',
post: '',
phone:'',
companyName:'',
contactPeople:'',
contactPhone:''
},
rules: {
title: {
rules: [{
required: true,
errorMessage: '企业名称不能为空'
}]
},
post: {
rules: [{
required: true,
errorMessage: '岗位名不能为空'
}]
},
subTitle: {
rules: [{
required: true,
errorMessage: '介绍不能为空'
}]
},
contactPeople: {
rules: [{
required: true,
errorMessage: '联系人不能为空'
}]
},
contactPhone: {
rules: [{
required: true,
errorMessage: '联系人电话不能为空'
}]
},
},
|
290144e9
易尊强
第一次
|
165
166
167
|
};
},
|
6c679290
易尊强
3/6a上午
|
168
|
onShow() {
|
290144e9
易尊强
第一次
|
169
170
171
|
this.getUser()
let user = uni.getStorageSync('user')
this.lastModifyUserId = user.userInfo.userId
|
5bbfac44
易尊强
28号下午提交
|
172
|
this.getAppealList()
|
290144e9
易尊强
第一次
|
173
|
},
|
6c679290
易尊强
3/6a上午
|
174
175
176
177
178
179
|
// onLoad() {
// this.getUser()
// let user = uni.getStorageSync('user')
// this.lastModifyUserId = user.userInfo.userId
// this.getAppealList()
// },
|
9b1c150c
“wangming”
1
|
180
181
182
183
184
185
186
|
// onLoad() {
// if (uni.getStorageSync('user')) {
// let userCode = uni.getStorageSync('user')
// // console.log("用户的code", this.userCode)
// console.log('用户信息',userCode)
// }
// },
|
290144e9
易尊强
第一次
|
187
|
methods:{
|
6c679290
易尊强
3/6a上午
|
188
|
// 获取用户信息判断是否有诉求管理的ID,权限判断authority = 359968822326723845
|
290144e9
易尊强
第一次
|
189
190
|
getUser(){
if (uni.getStorageSync('user')) {
|
6c679290
易尊强
3/6a上午
|
191
|
let userCode = uni.getStorageSync('user')
|
5bbfac44
易尊强
28号下午提交
|
192
193
|
console.log('this.userCode',userCode)
this.userCode = userCode
|
290144e9
易尊强
第一次
|
194
195
|
// this.userInfo = this.userCode.userAccount
// this.userInfo = '123456'
|
6c679290
易尊强
3/6a上午
|
196
|
let authorityID = userCode.permissionList
|
9b1c150c
“wangming”
1
|
197
|
this.valiFormData.companyName = this.userCode.userInfo.userName
|
6c679290
易尊强
3/6a上午
|
198
|
this.isAdmin = authorityID.some(it => it.modelId === '359968822326723845')
|
9b1c150c
“wangming”
1
|
199
200
201
202
203
204
|
// if(!this.isAdmin){
// uni.showToast({
// icon:"error",
// title:"您无该权限!"
// })
// }
|
6c679290
易尊强
3/6a上午
|
205
206
|
console.log('是否有诉求管理权限',this.isAdmin)
console.log(userCode)
|
290144e9
易尊强
第一次
|
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
console.log('用户已登录!')
} else {
uni.showToast({
title: '请登录',
icon: 'none'
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index'
})
})
}
},
// 提交内容
|
9b1c150c
“wangming”
1
|
221
|
submitContent(ref){
|
290144e9
易尊强
第一次
|
222
|
let that = this
|
9b1c150c
“wangming”
1
|
223
224
|
this.$refs[ref].validate().then(res => {
let query = {
|
290144e9
易尊强
第一次
|
225
226
227
228
|
content:this.requires,
type:this.TypeArray[this.TypeIndex],
creatorUserId:this.lastModifyUserId,
lastModifyUserId:this.lastModifyUserId,
|
9b1c150c
“wangming”
1
|
229
230
231
232
|
plate:'诉求模块',
companyName:this.valiFormData.companyName,
userName:this.valiFormData.contactPeople,
userPhone:this.valiFormData.contactPhone
|
290144e9
易尊强
第一次
|
233
|
}
|
9b1c150c
“wangming”
1
|
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
console.log(query)
request({
url: '/api/Extend/baseappealinformation',
method: 'post',
data: {
content:this.requires,
type:this.TypeArray[this.TypeIndex],
creatorUserId:this.lastModifyUserId,
lastModifyUserId:this.lastModifyUserId,
plate:'诉求模块',
companyName:this.valiFormData.companyName,
userName:this.valiFormData.contactPeople,
userPhone:this.valiFormData.contactPhone
},
}).then(res=>{
console.log(res)
if(res.code === 200){
uni.showToast({
icon:"success",
title:"提交成功"
})
}else{
uni.showToast({
icon:"error",
title:'提交失败'
})
}
})
|
290144e9
易尊强
第一次
|
262
263
264
265
266
267
268
269
270
|
})
},
/**
* 反馈类型
* @param {Object} val
*/
FeedbackTypeCh(val){
console.log(val);
this.TypeIndex = val.detail.value;
|
5bbfac44
易尊强
28号下午提交
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
},
// 获取诉求列表
getAppealList(){
request({
url:'/api/Extend/baseappealinformation',
method:'get',
data:{
pageSize:10000,
// status:status
}
}).then(res=>{
console.log(res)
if(res.code === 200){
this.appealList = res.data.list
}
})
},
// 跳转到查看和修改页面
toReponse(id){
uni.navigateTo({
url:'/pages/Feedback/reponseAppeal/reponseAppeal?data=' + JSON.stringify(id)
})
},
|
290144e9
易尊强
第一次
|
294
295
296
297
298
299
300
|
}
}
</script>
<style scoped lang="scss">
@import 'Feedback.scss';
</style>
|