wjt
2024-06-25 244d89b41c0e0e995d38f635a126a0959b9ba25b
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
<template>
    <view>
        <u-navbar placeholder bgColor="#1171E0FF" leftIconColor="white" :autoBack="true">
            <template slot="center">
                <view style="color: white;">申请详情</view>
            </template>
        </u-navbar>
        <view class="top-content"></view>
        <view class="main-page">
            <view class="status">
                {{mapStatus[details.checkStatus]}}
            </view>
            <view class="base-card">
                <view class="title">
                    <text>基本信息</text>
                </view>
                <view class="view-form">
                    <view class="view-form-item">
                        <view class="label">执法主题</view>
                        <view>{{details.enforceReason}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法对象</view>
                        <view>{{details.companyName}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法时间</view>
                        <view>{{details.planTime}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法类型</view>
                        <view>{{typeList}}</view>
                    </view>
                    
                    <template v-if="!details.executeUser">
                        <view class="view-form-item">
                            <view class="label">执法人员</view>
                            <view>{{details.applyUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">执法部门</view>
                            <view>{{details.applyDeptName}}</view>
                        </view>
                    </template>
                    <template v-else>
                        <view class="view-form-item">
                            <view class="label">执法人员</view>
                            <view>{{details.executeUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">执法部门</view>
                            <view>{{details.executeDeptName}}</view>
                        </view>
                    </template>
                    <view class="view-form-item" >
                        <view class="label">随行人员</view>
                        <view>
                            <view v-for="(item,index) in details.peers" :key="index">
                                {{item.peerUser}}({{item.peerDeptName}})
                            </view>
                        </view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">是否通知企业</view>
                        <view>{{details.isNoticeCompany == 0 ? '否': '是'}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">申请时间</view>
                        <view>{{details.applyTime}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">当前状态</view>
                        <view>{{mapStatus[details.checkStatus]}}</view>
                    </view>
                </view>
            </view>
            <view class="base-card">
                <view class="title">
                    <text>执法内容</text>
                </view>
                <view class="view-content">
                    {{ details.enforceContent }}
                </view>
            </view>
            <!-- <view class="base-card" v-if="judgeDetails.length">
                <view class="title">
                    <text>审批情况</text>
                </view>
                <view class="view-form">
                    <view v-for="(item,index) in judgeDetails" :key="index">
                        <view class="view-form-item">
                            <view class="label">审批结果</view>
                            <view v-if="item.checkStatus == 1" style="color: #3EB47A;">通过</view>
                            <view v-else style="color: red">拒绝</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批人</view>
                            <view>{{item.checkUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批部门</view>
                            <view>{{item.checkDeptName}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批时间</view>
                            <view>{{item.checkTime}}</view>
                        </view>
                    </view>
                </view>
            </view> -->
            <view class="base-card" v-if="(details.orderStatus == 3 || details.orderStatus == 4) && details.regionImgs && details.regionImgs.length">
                <view class="title">
                    <text>执法图片</text>
                </view>
                <view class="view-image">
                    <image :src="baseUrl+item" @click="previewImage(details.regionImgs, index)" mode="aspectFill" v-for="(item,index) in details.regionImgs" :key="index"></image>
                </view>
            </view>
            <view class="base-card">
                <view class="title">
                    <text>审批进度</text>
                </view>
                <view class="view-step">
                    <view class="step-content" :class="{none: index == nodeList.length - 1}" v-for="(item,index) in nodeList" :key="index">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix" v-if="!item.nodeReason"></image>
                        <image src="/static/policy/refject.png" mode="widthFix" class="icon" v-else></image>
                        <view class="top-title">
                            {{item.nodeName}}
                        </view>
                        <view class="down-tips">
                            <view class=" submit-per">提交人:<text>{{item.nodeUser}}</text></view>
                            <view class="time">{{item.nodeTime}}</view>
                        </view>
                    </view>
                    <!-- <view class="step-content">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image>
                        <view class="top-title">
                            审批通过
                        </view>
                        <view class="down-tips">
                            <view>提交人:<text>林小零</text></view>
                            <view class="time">2024-06-07 12:14</view>
                        </view>
                    </view>
                    <view class="step-content none">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image>
                        <image src="/static/policy/refject.png" mode="widthFix" class="icon"></image>
                        <view class="top-title">
                            提交申请
                        </view>
                        <view class="down-tips">
                            <view>提交人:<text>林小零</text></view>
                            <view class="time">2024-06-07 12:14</view>
                        </view>
                    </view> -->
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import {
        orderDetails,
        orderNodeList,
        enforceLogList
    } from '@/api/policy.js'
    import { getDicts } from '@/api/data.js'
    import { config } from '@/common/config'
    export default {
        data() {
            return {
                details: {},
                nodeList: [],
                mapStatus: {
                    // 1: '待审批',
                    // 2: "待执行",
                    // 3: "待上报",
                    // '-1':"已拒绝",
                    // 4: "已结束"
                    // -1拒绝,0待审批,1审批中,2通过
                    "-1": '已拒绝',
                    0: '待审批',
                    1: '审批中',
                    2: "已审批"
                },
                
                typeList: '',
                judgeDetails: [],
                baseUrl: config.baseUrl
            }
        },
        onLoad(options) {
            this.getDetails(options.id)
            this.orderNodeList(options.id)
            this.enforceLogList(options.id)
            if(options.setTitle) {
                uni.setNavigationBarTitle({
                    title: ''
                })
            }
        },
        methods: {
            getDetails(orderId) {
                orderDetails({
                    orderId
                }).then(val => {
                    this.details = val.data.data
                    if(this.details.regionImgs){
                         this.details.regionImgs = this.details.regionImgs.split(",")
                    }
                    this.getDicts()
                })
            },
            // 节点
            orderNodeList(orderId) {
                orderNodeList({orderId}).then(val => {
                    this.nodeList = val.data.data
                })
            },
            // 申请记录
            enforceLogList(orderId) {
                enforceLogList({orderId}).then(val => {
                    // console.log(val.data.rows)
                    this.judgeDetails = val.data.rows
                })
            },
            getDicts() {
                getDicts('enforce_type').then(val => {
                    const value = val.data.data.find(item => item.dictCode == this.details.enforceType)
                    this.typeList = value.dictLabel
                })
            },
            previewImage(list, index) {
                const data = list.map(item => this.baseUrl + item)
                console.log(data)
                uni.previewImage({
                    urls: data,
                    current: index
                })
            }
        }
    }
</script>
<style>
    page {
        background-color: #F4F4F4;
    }
</style>
<style lang="scss" scoped>
    @import "./judgeApply.scss";
</style>