Blame view

pages/declaration/declarationList.vue 3.85 KB
883d6197   李宇   1
1
  <template>

1f3f2378   起风了   我的第一次
2
3
  	<view>

  		<view v-if="list.length>0">

d7d4c017   李宇   1
4
  			<view  class="top-box" v-for="(item,index) in list" :key="index" @click="gopath(type == '7'?'/pages/declaration/newDeclarationdetail?cent='+JSON.stringify(item):'/pages/declaration/declarationListdetail?type= '+type+'&cent='+JSON.stringify(item))">

1f3f2378   起风了   我的第一次
5
6
7
8
9
10
11
  				<view>{{item.name}}<span style="margin-left: 20rpx;"  :style="item.status=='已通过'?'color: #00D970;':item.status=='未通过'?'color: #FC4444;':'color: #547DFF;'">{{item.status?item.status:'待审核'}}</span></view>

  				<view class="top-box-img">

  					<image src="../../static/right2.png" mode="widthFix"></image>

  				</view>

  			</view>

  		</view>

  		<view v-else style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 30rpx;">

883d6197   李宇   1
12
  			暂无数据 

1f3f2378   起风了   我的第一次
13
  		</view>

883d6197   李宇   1
14
15
16
17
18
19
  	</view>

  </template>

  

  <script>

  	export default {

  		data() {

1f3f2378   起风了   我的第一次
20
  			return {

883d6197   李宇   1
21
  				type:null,

1f3f2378   起风了   我的第一次
22
23
24
  				list:[],

  				from:{

  					createdUser:uni.getStorageSync('USERS_KEY').userId,

883d6197   李宇   1
25
26
  				}

  			}

1f3f2378   起风了   我的第一次
27
28
29
30
31
32
33
34
35
  		},

  		onLoad() {

  			

  		},

  		onLoad(params) {

  			this.type = params.type

  

  			this.getlist()

  		

883d6197   李宇   1
36
  		},

1f3f2378   起风了   我的第一次
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
  		methods: {

  			getlist() {

  				if(this.type == '1') {

  					this.API.getCommunity(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].communityName

  						}

  						this.list = res.rows

  					})

  				} else if(this.type == '2') {

  					this.API.getstreet(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].originalName

  						}

  						this.list = res.rows

  					})

  				}else if(this.type == '3') {

  					this.API.getbuild(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].tallBuildName

  						}

  						this.list = res.rows

  					})

  				}else if(this.type == '4') {

  					this.API.getapplication(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].addressName

  							res.rows[i].status = res.rows[i].auditStatus

  						}

  						this.list = res.rows

  					})

  				}else if(this.type == '5') {

  					this.API.getdoorplate(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].communityName

  						}

  						this.list = res.rows

  					})

  				}else if(this.type == '6') {

  					this.API.getroadSign(this.from).then(res=>{

  						console.log(res);

  						this.list = res.rows

  					})

d7d4c017   李宇   1
85
86
87
88
89
90
91
92
  				}else if(this.type == '7') {

  					this.API.gettoponym(this.from).then(res=>{

  						console.log(res);

  						for (let i = 0; i < res.rows.length; i++) {

  							res.rows[i].name = res.rows[i].standardName

  						}

  						this.list = res.rows

  					})

1f3f2378   起风了   我的第一次
93
94
95
96
97
98
99
  				}

  

  			},

  			gopath(e) {

  				uni.navigateTo({

  					url: e

  				})

883d6197   李宇   1
100
101
102
103
104
  			},

  		}

  	}

  </script>

  

1f3f2378   起风了   我的第一次
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
  <style lang="scss">

  	.top-box {

  		display: flex;

  		justify-content: space-between;

  		margin: 30rpx;

  		font-size: 28rpx;

  		font-weight: bold;

  		background-color: #fff;

  		border-radius: 21rpx;

  		padding: 30rpx;

  	

  		.top-box-img {

  			image {

  				width: 30rpx;

  				// height: 40rpx;

  			}

  		}

883d6197   李宇   1
122
  	}

1f3f2378   起风了   我的第一次
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
  	.content{

  		padding: 20rpx;

  		.box_item{

  			background-color: #fff;

  			display: flex;

  			padding: 20rpx 40rpx;

  			border-radius: 20rpx;

  			align-items: center;

  			.box_left{

  				display: flex;

  				flex-direction: column;

  				justify-content: space-between;

  				width: 58%;

  				margin-right: 2%;

  				.f1{

  					font-size: 35rpx;

  					font-weight: 600;

  					display: block;

  					margin-bottom: 20rpx;

  				}

  				.f2{

  					color: #ababab;

  					display: -webkit-box;

  					-webkit-box-orient: vertical;

  					-webkit-line-clamp: 1;

  					overflow: hidden;

  				}

  			}

  			.box_right{

  				width: 40%;

  				text-align: right;

  			}

  		}

883d6197   李宇   1
156
157
  	}

  </style>