quanyawei
2024-06-27 e07b984728e0a97473b2954d097afac4a5c8b80a
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
<template>
    <view class="">
        <!-- 基础信息 -->
        <view class="workOrderDetail">
            <view class="headerCont">
                <p class="title">基本信息</p>
                <view style="display: flex;align-items: center;">
                    <p style="display: inline-block;padding-right: 10px;">单号:{{ basicInfor.allocationNum }}</p>
                    <p class="sharebut">
                        <button open-type="share" class="shareAn">
                        </button>
                        <u-icon name="share-square" label='分享' labelPos="bottom" bold size='18' color="#efb287"
                            labelColor="#efb287"></u-icon>
                    </p>
                </view>
            </view>
            <u-line color="#bbb" />
            <view>
                <view class="mainContent">
                    <p class="rowTip">
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">上报时间:</text>
                                <text class="rowTipContenetAll">
                                    {{ basicInfor.escalationTime ||'' }}
                                </text>
                            </view>
                        </view>
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">上报人:</text>
                                <text class="rowTipContenetAll">{{ basicInfor.escalationName ||'' }}</text>
                            </view>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">责任主体:</text>
                                <text class="rowTipContenetAll">
                                    {{ basicInfor.unitName }}
                                </text>
                            </view>
                        </view>
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">污染分类:</text>
                                <text class="rowTipContenetAll">
                                    {{ basicInfor.polluteTypeName }}
                                </text>
                            </view>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">排查方式:</text>
                                <!-- this.dictObj.investigationEnum[val.investigationType] -->
                                <text class="rowTipContenetAll">
                                    {{ dictObj.investigationEnum[basicInfor.investigationType] ||'' }}
                                </text>
                            </view>
                        </view>
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">整改类型:</text>
                                <text class="rowTipContenetAll">
                                    <text>{{ dictObj.changeEnum[basicInfor.changeType]||'' }}</text>
                                </text>
                            </view>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="rowTipContenet" v-if="basicInfor.changeDay">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">限期天数:</text>
                                <text class="rowTipContenetAll">
                                    {{ basicInfor.changeDay }}天 </text>
                            </view>
                        </view>
                        <view class="rowTipContenet">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">上报单位:</text>
                                <text class="rowTipContenetAll">
                                    {{ basicInfor.escalationUnitName }}
                                </text>
                            </view>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="wholeLine">
                            <text class="rowTipContenetLabel">污染位置:</text>
                            <text class="rowTipContenetAll">{{ basicInfor.pollutePosition ||'' }}</text>
                            <u-icon name="map" color="#2979ff" size="28" @tap="toNavigation()"
                                v-if="basicInfor.longitude !==null"></u-icon>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="rowTipContenet" style="width: 100%;">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">任务分类:</text>
                                <text class="rowTipContenetAll">
                                    <text>{{ dictObj.emphasisEnum[basicInfor.keyPoint]||'' }}</text>
                                </text>
                            </view>
                        </view>
                    </p>
                    <p class="rowTip">
                        <view class="rowTipContenet" style="width: 100%;">
                            <view class="wholeLine">
                                <text class="rowTipContenetLabel">问题描述:</text>
                                <text class="rowTipContenetAll" style="white-space: break-spaces;">
                                    {{ basicInfor.problemDescribe }}
                                </text>
                            </view>
                        </view>
                    </p>
                    <view class="formItemContent">
                        <u--form labelPosition="left" label-width="75" :border-bottom="false" ref="uForm">
                            <u-form-item border-bottom label="相关附件:" :border-bottom="false">
                                <view class="fileBox">
                                    <cl-upload v-if="fileList.length>0" v-model="fileList" :add="false" :action="`''`"
                                        cloud-type="other" :remove="false" />
                                </view>
                            </u-form-item>
                        </u--form>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        props: {
            basicInfor: {
                type: Object,
                default: () => {}
            },
        },
        data() {
            return {
                polluteList: [],
                unitList: [],
                dictObj: JSON.parse(uni.getStorageSync('dictObj') || '[]'),
                fileList: [],
                baseUrl: this.$storage.get('baseUrl'),
            }
        },
        computed: {},
        watch: {
            basicInfor: {
                handler: function(newValue, oldValue) {
                    // 响应数据变化
                    this.basicInfor = newValue
                },
                deep: true
            }
        },
        onLoad: function(option) {
            //option为object类型,会序列化上个页面传递的参数
            console.log(option) //打印出上个页面传递的参数。
        },
        created() {
            this.getUnitList()
        },
        mounted() {
            // 获取责任单位list
            console.log('this.basicInfor.fileBaseList', this.basicInfor.fileBaseList)
            if (this.basicInfor.fileBaseList && this.basicInfor.fileBaseList.length > 0) {
                this.basicInfor.fileBaseList.forEach(item => {
                    let name = item.fileType === 1 ? 'name.png' : ''
                    this.fileList.push(`${this.baseUrl}/file/preview/${item.fileId}?${name}`) // 原图
                })
                console.log('this.basicInfor.fileList', this.basicInfor.fileBaseList)
                console.log('this.fileList', this.fileList)
            }
        },
        methods: {
            //导航--传终点的坐标即可
            toNavigation: function() {
                //根据终点地址调起地图导航
                uni.openLocation({
                    longitude: parseFloat(this.basicInfor.longitude), // 经度,范围为-180~180,负数表示西经
                    latitude: parseFloat(this.basicInfor.latitude), // 纬度,范围为-90~90,负数表示南纬
                    scale: 28, // 缩放比例
                    name: this.basicInfor.name, //终点名称
                    address: this.basicInfor.address, //终点详细地址
                    success: function(res) {
                        console.log('success:', res)
                    }
                })
            },
            getUnitList() {
                this.$http.httpGet('/allocation/unit').then(res => {
                    this.unitList = res.data
                    this.getContaminateList()
                })
            },
            getContaminateList() {
                this.$http.httpGet('/allocation/contaminate').then(res => {
                    this.polluteList = res.data
                })
            },
        },
    }
</script>
<style scoped lang="scss">
    /deep/.u-line {
        margin: 19.23rpx 0px !important;
    }
 
    .workOrderDetail {
        border: 1px solid #bbb;
        border-radius: 5px;
        min-height: 288.46rpx;
        margin: 19.23rpx;
        padding: 19.23rpx;
        color: #101010;
        font-weight: 700;
        font-size: 30.77rpx;
 
        .headerCont {
            display: flex;
            justify-content: space-between;
            font-size: 30.77rpx;
            align-items: center;
        }
 
        .mainContent {
            margin-bottom: 10px;
            font-weight: 500;
 
            .rowTip {
                display: flex;
                padding: 5px 0;
                border-bottom: 1px dashed #bbb;
 
                .wholeLine {
                    display: flex;
                    width: 100%;
                    align-items: center;
 
                    .rowTipContenetLabel {
                        min-width: 144.23rpx;
                        font-size: 28.85rpx;
                        text-align: left;
                    }
 
                    .rowTipContenetAll {
                        font-size: 28.85rpx;
                        width: calc(100% - 144.23rpx);
                    }
                }
 
                .rowTipContenet {
                    width: 50%;
                    text-align: left;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
 
                    .butsName {
                        display: inline-block;
                        margin-left: 19.23rpx;
                        color: #1990ff;
                    }
                }
            }
 
            .rowTipContenet_right {
                text-align: right !important;
            }
        }
    }
 
    .sharebut {
        position: relative;
        display: inline-block;
 
        .shareAn {
            position: absolute;
            height: 36px;
            width: 30px;
            padding: 0;
            opacity: 0;
            z-index: 100;
        }
    }
</style>