factoryDetail.vue
8.5 KB
1
2
3
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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<template>
<view>
<!-- 头部区域 -->
<view class="topWrap">
<view class="topItem">
<view class="topLeft">
状态
</view>
<view class="topRight">
<image v-if="checkAll == false" class="topImg" src="../../../static/image/icon_daiducha.png" mode=""></image>
<image v-if="checkAll == true" class="topImg" src="../../../static/image/icon_yiducha.png" mode=""></image>
</view>
</view>
<view class="topItem">
<view class="topLeft">
检查时间<span>*</span>
</view>
<view class="topRight" @tap="visibleMinute=true">
<text>{{checkTime}}</text>
<image class="rightImg" src="../../../static/image/icon_arrow.png" mode=""></image>
</view>
</view>
<w-picker
:visible.sync="visibleMinute"
mode="date"
:current="true"
fields="day"
@confirm="onConfirm($event,'minute')"
@cancel="onCancel"
:disabled-after="false"
ref="date"
>检查时间</w-picker>
<view class="topItem">
<view class="topLeft">
检查人员<span>*</span>
</view>
<view class="topRight">
普通用户
</view>
</view>
</view>
<!-- 底部区域 -->
<view style="height: 24rpx;"></view>
<view v-for="(item,index) in keyList" :key="index">
<view class="bottomWrap">
<view class="bottomItem" @click="showSubCheck(index)" :class="{bottomLine:item.show == 0 && (index+1) != keyList.length}">
<view class="bottomLeft">
<view class="completeImg">
<image v-if="item.complete == 1" src="../../../static/image/icon_complete2.png" mode=""></image>
</view>
{{item.title}}
</view>
<view class="bottomRight">
<image v-if="item.show == 0" src="../../../static/image/icon_arrow.png" mode=""></image>
<image v-if="item.show == 1" src="../../../static/image/icon_arrow_up.png" mode=""></image>
</view>
</view>
</view>
<view class="subCheckWrap" v-if="item.show == 1" v-for="(subItem,subIndex) in item.subKeyList" :key="subIndex">
<navigator class="subCheckItem" :url="'checkDetail?param='+subItem.param+'&companyid='+companyid" hover-class="none">
{{subItem.title}}
<image src="../../../static/image/icon_arrow.png" mode=""></image>
</navigator>
</view>
</view>
<!-- 按钮区域 -->
<view class="btnWrap">
<view class="title">
已督查企业记录需确认归档,确认归档后,信息将不可修改
</view>
<view class="btn" @click="archive" :class="{active:checkAll}">
确认归档
</view>
</view>
<!-- 归档成功弹窗 -->
<view class="archiveAlertWrap" v-if="showArchiveAlert">
<view class="archiveAlert">
<view class="archiveImg">
<image src="../../../static/image/icon_complete2.png" mode=""></image>
</view>
<view class="archiveTxt">
已归档成功
</view>
<view class="bottomTxt" @click="showArchiveAlert = false">
我知道了
</view>
</view>
</view>
</view>
</template>
<script>
import wPicker from "@/components/w-picker/w-picker.vue"
export default {
data() {
return {
companyid:'',
showArchiveAlert:false,
visibleMinute:false,
checkTime:'请选择',
keyList:[
{
title:'一.基本情况',
param:{code:'jbqk',type:'1'},
complete:1,
show:0,
subKeyList:[]
},
{
title:'二.产排污环节对应排放口及其排放限量',
complete:1,
show:0,
subKeyList:[
{
title:'1.水污染情况',
param:JSON.stringify({code:'swrqk',pdoType:'0'})
},
{
title:'2.大气污染情况',
param:JSON.stringify({code:'dqwrqk',pdoType:'1'})
},
{
title:'3.噪声排放',
param:JSON.stringify({code:'zspf'})
},
{
title:'4.固体废物排放',
param:JSON.stringify({code:'gtfwpf',pdoType:'2'})
}
]
},
{
title:'三.自行监测',
complete:0,
show:0,
subKeyList:[
{
title:'1.废水',
param:JSON.stringify({code:'fs'})
},
{
title:'2.废气',
param:JSON.stringify({code:'fq'})
}
]
},
{
title:'四.环境管理台账',
// code:'hjgltz',
param:{code:'hjgltz',type:'4'},
complete:0,
show:0,
subKeyList:[]
},
{
title:'五.执行报告',
param:{code:'zxbg',type:'5'},
complete:0,
show:0,
subKeyList:[]
},
{
title:'六.信息公开',
param:{code:'xxgk',type:'6'},
complete:0,
show:0,
subKeyList:[]
},
{
title:'七.修改落实情况',
param:{code:'xglsqk',type:'7'},
complete:0,
show:0,
subKeyList:[]
},
{
title:'八.其他许可内容',
param:{code:'qtxknr',type:'8'},
complete:0,
show:0,
subKeyList:[]
}
]
}
},
components:{
wPicker
},
computed:{
checkAll(){
for(var i = 0; i < this.keyList.length; i ++){
if(this.keyList[i].complete == 0){
return false
}
}
return true
}
},
onLoad(option) {
console.log('option',option)
this.companyid = option.companyid
uni.setNavigationBarTitle({
title: option.factoryName //这是修改后的导航栏文字
})
this.getData()
},
methods: {
getData(){
uni.request({
url:this.apiUrl + 'license/step',
data:{companyId:this.companyid},
success: (res) => {
console.log('步骤是否保存获取',res)
}
})
},
onConfirm(e,pickerType){
this.checkTime = e.result
},
showSubCheck(index){
if(this.keyList[index].complete == 0){
this.keyList[index].complete = 1
}else{
this.keyList[index].complete = 0
}
if(this.keyList[index].subKeyList.length > 0){
if(this.keyList[index].show == 0){
this.keyList[index].show = 1
}else{
this.keyList[index].show = 0
}
}else{
uni.navigateTo({
url:'checkDetail?param='+JSON.stringify(this.keyList[index].param)+'&companyid='+this.companyid
})
}
},
archive(){
if(!this.checkAll){
uni.showToast({
title:'请填完所有项 再归档',
icon:'none'
})
return
}
if(this.checkTime == '请选择'){
uni.showToast({
title:'请选择检查时间',
icon:'none'
})
return
}
this.showArchiveAlert = true
}
}
}
</script>
<style lang="scss">
page{background: #f7f8fa;}
/* 头部区域 */
.topWrap{padding: 0 32rpx;background: #fff;}
.topWrap .topItem{display: flex;justify-content: space-between;align-items: center;height: 104rpx;font-size: 30rpx;border-top: 2rpx solid #f2f3f5;}
.topItem .topLeft{color: #646566;}
.topLeft span{color: red;}
.topItem .topRight{display: flex;align-items: center;}
.topRight text{color: #c8c9cc;}
.topRight .topImg{width: 104rpx;height: 104rpx;}
.topRight .rightImg{width: 32rpx;height: 32rpx;}
/* 底部区域 */
.bottomWrap{padding: 0 32rpx;background: #fff;}
.bottomWrap .bottomItem{display: flex;justify-content: space-between;align-items: center;height: 104rpx;font-size: 30rpx;}
.bottomItem.bottomLine{border-bottom: 2rpx solid #f2f3f5;}
.bottomItem .bottomLeft{display: flex;align-items: center;}
.bottomLeft .completeImg{width: 60rpx;display: flex;align-items: center;}
.completeImg image{width: 40rpx;height: 40rpx;}
.bottomRight image{width: 32rpx;height: 32rpx;}
.subCheckWrap{padding: 0 32rpx 0 64rpx;}
.subCheckWrap .subCheckItem{display: flex;justify-content: space-between;align-items: center;height: 96rpx;color: #646566;font-size: 28rpx;}
.subCheckItem image{width: 32rpx;height: 32rpx;}
/* 按钮区域 */
.btnWrap{padding: 16rpx 60rpx;background: #fff;margin-top: 32rpx;}
.btnWrap .title{color: #ff8f56;font-size: 24rpx;}
.btnWrap .btn{height: 100rpx;background: #dcdee0;border-radius: 28rpx;text-align: center;line-height: 100rpx;color: #fff;font-size: 34rpx;margin-top: 16rpx;}
.btn.active{background: $theme-color;}
// 归档成功弹窗
.archiveAlertWrap{position: fixed;top: 0;bottom: 0;left: 0;right: 0;background: rgba(0,0,0,0.5);justify-content: center;display: flex;align-items: center;}
.archiveAlertWrap .archiveAlert{width: 622rpx;background: #fff;border-radius: 30rpx;}
.archiveAlert .archiveImg{padding-top: 48rpx;display: flex;justify-content: center;}
.archiveAlert .archiveTxt{padding: 32rpx 0 48rpx;text-align: center;font-size: 32rpx;border-bottom: 2rpx solid #ebedf0;}
.archiveImg image{width: 128rpx;height: 128rpx;}
.archiveAlert .bottomTxt{height: 96rpx;text-align: center;line-height: 96rpx;color: $theme-color;font-size: 32rpx;}
</style>