linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
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
<template>
    <view class="container">
 
        <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
            <view class="box-title">
                <box-title title="基础信息"></box-title>
            </view>
            <view class="event-info">
                <u-form-item class="form-item" labelWidth="100" label="当前位置:" required prop="location">
                    <u--input border="none" v-model="form.location" placeholder="请输入当前位置">
                    </u--input>
                </u-form-item>
 
                <u-form-item class="form-item" labelWidth="100" label="事件标题:" required prop="title">
                    <u--input border="none" v-model="form.title" placeholder="请输入事件标题">
                    </u--input>
                </u-form-item>
 
                <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="事件类型:" required
                    prop="type">
                    <u--input border="none" v-model="typeName" disabled disabledColor="#ffffff" placeholder="请选择事件类型">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
 
                <u-form-item class="form-item" labelWidth="100" label="事件描述:" required prop="description">
                    <u--input border="none" v-model="form.description" placeholder="请输入事件描述">
                    </u--input>
                </u-form-item>
            </view>
 
            <view class="box-title">
                <box-title title="事件照片"></box-title>
            </view>
 
            <view class="event-pic">
 
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                </u-upload>
            </view>
        </u-form>
 
        <view class="btn-group">
            <view class="btn">
                <u-button @click="submit" type="primary" text="提交"></u-button>
            </view>
            <view class="btn">
                <u-button @click="navigator" type="primary" :plain="true" text="我上报的事件"></u-button>
            </view>
 
            <view class="btn">
                <u-button @click="navigator" type="primary" :plain="true" text="返回"></u-button>
            </view>
        </view>
 
 
 
        <!-- 事件类型下拉框 -->
        <my-select v-if="typeShow" :show="typeShow" v-model="form.type" type="radio" popupTitle="请选择事件类型"
            :dataLists="typeList" @cancel="typeShow = false" @submit="typeSelect">
        </my-select>
 
    </view>
</template>
 
<script>
    import mySelect from "@/subPackage/bs/components/my-select.vue"
    import uploadMixin from "@/mixin/uploadMixin";
    export default {
        components: {
            mySelect
        },
        mixins: [uploadMixin],
        data() {
            return {
                typeName: "",
                form: {
                    location: "",
                    title: "",
                    type: "",
                    description: "",
                },
                rules: {},
 
                typeShow: false,
                typeList: [{
                        value: "1",
                        name: "物业保修",
                    },
                    {
                        value: "2",
                        name: "矛盾纠纷",
                    }
                ],
            }
        },
        created() {
            this.getHeader()
        },
        mounted() {
 
        },
        onLoad(option) {
 
        },
        onShow() {
 
        },
        methods: {
            //类型选择确认
            typeSelect(item) {
                this.typeName = item.name
                this.form.type = item.value
                this.typeShow = !this.typeShow
            },
 
            //表单提交
            submit() {
 
            },
 
            //跳转到报事列表
            navigator() {
                this.$u.func.globalNavigator("/subPackage/bs/views/bsList")
            },
        }
    }
</script>
 
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
 
        .box-title {
            padding: 10px 0;
        }
 
        .event-info {
 
            .form-item {
                background-color: #ffffff;
                padding: 5px 10px;
                border-bottom: 1px solid #eff1f3;
            }
 
        }
 
        .event-pic {
            background-color: #ffffff;
            padding: 40rpx 30rpx;
        }
 
        .btn-group {
            padding: 30rpx;
            position: absolute;
            bottom: 28rpx;
            width: calc(100% - 60rpx);
 
            .btn {
                margin-bottom: 30rpx;
            }
        }
 
 
    }
</style>