Blame view

pages/my/userReponse/userReponse.vue 3.15 KB
5bbfac44   易尊强   28号下午提交
1
2
  <template>
  	<view class="page">
80d8fbe3   易尊强   2/29下午
3
  		<view class="page">
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
  			<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>
  </template>
  
  <script>
  	import request from '@/utils/request.js'
  	export default {
  		data() {
  			return {
  				TypeArray: ['行政审批', '生产运营', '金融服务', '其他'],
  				TypeIndex: 0,
  				// 填写诉求内容
  				requires:'',
  				type:"",
  				lastModifyUserId:'',
  				userCode:'',
  				list:[{
  				    name: '未处理',
  				    value: 0,
  				}, {
  				    name: '已处理',
  				    value: 1,
  				}, {
  				    name: '忽略',
  				    value: 2,
  				}, {
  				    name: '无效',
  				    value: 3,
  				}],
  				appealList:[],
  				isAdmin:false
  			}
  		},
  		onShow() {
  			this.getUser()
  			let user = uni.getStorageSync('user')
  			this.lastModifyUserId = user.userInfo.userId
  			if(this.isAdmin){
  				this.getAdminAppealList()
  			}else{
  				this.getAppealList()
  			}
  		},
  		// onLoad() {
  		// 	this.getUser()
  		// 	let user = uni.getStorageSync('user')
  		// 	this.lastModifyUserId = user.userInfo.userId
  		// 	if(this.isAdmin){
  		// 		this.getAdminAppealList()
  		// 	}else{
  		// 		this.getAppealList()
  		// 	}
  		// },
  		methods:{
  			// 获取用户信息
  			getUser(){
  				if (uni.getStorageSync('user')) {
  					let userCode = uni.getStorageSync('user').userInfo.userId
  					console.log('this.userCode',userCode)
  					this.userCode = userCode
  					if(this.userCode == 'admin'){
  						this.isAdmin = true
  					}
  					// this.userInfo = this.userCode.userAccount
  					// this.userInfo = '123456'
  					console.log('用户已登录!')
  				} else {
  					uni.showToast({
  						title: '请登录',
  						icon: 'none'
  					})
  					setTimeout(() => {
  						uni.reLaunch({
  							url: '/pages/login/index'
  						})
  					})
  				}
  			},
  			// 获取诉求列表
  			getAppealList(){
  				request({
  					url:'/api/Extend/baseappealinformation/GetListByCurrent',
  					method:'get',
  					data:{
  						pageSize:10000,
  						// status:status
  					}
  				}).then(res=>{
  					console.log(res)
  					if(res.code === 200){
  						this.appealList = res.data.list
  					}
  				})
  			},
  			// 获取诉求列表
  			getAdminAppealList(){
  				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){
80d8fbe3   易尊强   2/29下午
132
133
134
135
136
137
138
139
140
141
  				console.log("ssss")
  				if(!this.isAdmin){
  					uni.navigateTo({
  						url:'/pages/Feedback/userAppeal/userAppeal?data=' + JSON.stringify(id)
  					})
  				}else{
  					uni.navigateTo({
  						url:'/pages/Feedback/reponseAppeal/reponseAppeal?data=' + JSON.stringify(id)
  					})
  				}
5bbfac44   易尊强   28号下午提交
142
143
144
145
146
147
148
149
  			},
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'Feedback.scss';
  </style>