shuishen
2024-01-05 f2e4a9d500d2ae2a0ca0fe9ff8cb050c90ccaa2e
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
<template>
    <div class="cur-container-box">
        <div v-if="applyType == 1">
            <div class="content-box">
                审核当前项
            </div>
            <div class="footer-btn-box">
                <el-button type="primary" size="small" @click="auditPass(2)">通 过</el-button>
                <el-button size="small" @click="auditPass(3)">驳 回</el-button>
            </div>
        </div>
 
        <avue-form v-else :option="option" v-model="form">
        </avue-form>
 
    </div>
</template>
<script>
import {
    getDetail,
    update
} from "@/api/task/bailReporting"
import website from '@/config/website'
export default {
    data () {
        return {
            form: {},
            applyType: '',
            option: {
                submitBtn: false,
                emptyBtn: false,
                column: [
                    {
                        // span: 10,
                        label: '申请人',
                        prop: 'checkUserName',
                        disabled: true,
                        span: 8,
                    }, {
                        // span: 12,
                        label: '申请人手机',
                        prop: 'checkTelephone',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '申请位置',
                        prop: 'location',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '审核时间',
                        prop: 'confirmTime',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '审核人',
                        prop: 'confirmUserName',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '审核意见',
                        prop: 'confirmNotion',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '审核状态',
                        prop: 'confirmFlag',
                        disabled: true,
                        span: 8,
                        type: 'select',
                        dicData: [{
                            label: '待审核',
                            value: '1'
                        }, {
                            label: '审核通过',
                            value: '2'
                        }, {
                            label: '审核不通过',
                            value: '3'
                        }]
                    }, {
                        label: '申请时间',
                        prop: 'applyTime',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '外出原因',
                        prop: 'applyName',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '身份证号',
                        prop: 'idCard',
                        disabled: true,
                        span: 8,
                    }, {
                        width: 110,
                        label: '位置图片',
                        fileType: 'img',
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
                        prop: 'locationImageUrls',
                        disabled: true,
                    }, {
                        label: '审核人电话',
                        prop: 'confirmUserTelephone',
                        disabled: true,
                        span: 8,
                    }, {
                        label: '出发-当前时间',
                        prop: 'startTime',
                        disabled: true,
                        span: 8,
                        labelWidth: 120,
                    }, {
                        label: '出发-报备位置',
                        prop: 'startLocation',
                        disabled: true,
                        span: 8,
                        labelWidth: 120,
                    }, {
                        width: 110,
                        label: '出发-位置图片',
                        fileType: 'img',
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
                        prop: 'startImageUrls',
                        disabled: true,
                        labelWidth: 120,
                    }, {
                        label: '到达-当前时间',
                        prop: 'reachTime',
                        disabled: true,
                        labelWidth: 120,
                        span: 8,
                    }, {
                        label: '到达-报备位置',
                        prop: 'reachLocation',
                        disabled: true,
                        span: 8,
                        labelWidth: 120,
                    }, {
                        width: 110,
                        label: '到达-位置图片',
                        fileType: 'img',
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
                        prop: 'reachImageUrls',
                        disabled: true,
                        labelWidth: 120,
                    }, {
                        label: '返回-当前时间',
                        prop: 'returnTime',
                        disabled: true,
                        labelWidth: 120,
                        span: 8,
                    }, {
                        label: '返回-报备位置',
                        prop: 'returnLocation',
                        disabled: true,
                        span: 8,
                        labelWidth: 120,
                    }, {
                        width: 110,
                        label: '返回-位置图片',
                        fileType: 'img',
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
                        prop: 'returnImageUrls',
                        labelWidth: 120,
                        disabled: true,
                    },]
            }
        }
    },
    methods: {
        auditPass (type) {
            update({
                confirmFlag: type,
                taskId: this.form.taskId,
                id: this.form.id
            }).then(() => {
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
                this.$emit('colseDetail')
            })
        },
        init (data, applyType) {
            this.applyType = applyType
            this.form = {}
            this.getTaskDetail(data.id)
        },
 
        getTaskDetail (taskId) {
            getDetail({
                taskId: taskId
            }).then((res) => {
                this.form = res.data.data
                if (this.form.reachImageUrls) {
                    this.form.reachImageUrls = website.minioUrl + this.form.reachImageUrls
                }
                if (this.form.returnImageUrls) {
                    this.form.returnImageUrls = website.minioUrl + this.form.returnImageUrls
                }
                if (this.form.startImageUrls) {
                    this.form.startImageUrls = website.minioUrl + this.form.startImageUrls
                }
                if (this.form.locationImageUrls) {
                    this.form.locationImageUrls = website.minioUrl + this.form.locationImageUrls
                }
                // console.table(this.form)
            })
        }
 
    }
}
</script>
 
<style lang="scss" scoped>
.cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
 
    .content-box {
        // margin: 0 4px;
        // padding: 0 16px;
        // height: 0;
        // flex: 1;
        // overflow: hidden;
        // overflow-y: auto;
    }
 
    .footer-btn-box {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
}
</style>