|
|
@ -3,19 +3,19 @@ |
|
|
|
<div class="block"> |
|
|
|
<div class="textarea"> |
|
|
|
<van-field |
|
|
|
required |
|
|
|
v-model="eventContent" |
|
|
|
autosize |
|
|
|
label="事件描述" |
|
|
|
placeholder="不超过500字" |
|
|
|
type="textarea" |
|
|
|
maxlength="500" |
|
|
|
placeholder="不超过500字" |
|
|
|
required |
|
|
|
rows="6" |
|
|
|
autosize |
|
|
|
type="textarea" |
|
|
|
> |
|
|
|
<template #extra> |
|
|
|
<div class="speech"> |
|
|
|
<Audio :audioSrc="audio" v-show="audio.duration" /> |
|
|
|
<Recording @change="setAudio" :isFile="isFile" /> |
|
|
|
<Audio v-show="audio.duration" :audioSrc="audio"/> |
|
|
|
<Recording :isFile="isFile" @change="setAudio"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-field> |
|
|
@ -25,21 +25,21 @@ |
|
|
|
<div class="block"> |
|
|
|
<van-cell title="上传图片"> |
|
|
|
<template #label> |
|
|
|
<van-uploader v-model="fileList" :max-size="10 * 1024 * 1024" :after-read="afterRead" :max-count="3" /> |
|
|
|
<van-uploader v-model="fileList" :after-read="afterRead" :max-count="3" :max-size="10 * 1024 * 1024"/> |
|
|
|
</template> |
|
|
|
</van-cell> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="block"> |
|
|
|
<van-cell title="发生地点" @click="$refs.map.show = true" is-link> |
|
|
|
<van-cell is-link title="发生地点" @click="$refs.map.show = true"> |
|
|
|
<div>{{ address }}</div> |
|
|
|
</van-cell> |
|
|
|
</div> |
|
|
|
<div class="block"> |
|
|
|
<!-- <div class="block"> |
|
|
|
<van-field required v-model="name" label="联系人" placeholder="请输入联系人" /> |
|
|
|
<van-field required type="number" maxlength="11" v-model="phone" label="联系电话" placeholder="请输入联系电话" /> |
|
|
|
</div> |
|
|
|
<van-button round block @click="submit" color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button> |
|
|
|
</div>--> |
|
|
|
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round @click="submit">提交</van-button> |
|
|
|
|
|
|
|
<Perfect/> |
|
|
|
<Map ref="map" @locationChange="locationChange"/> |
|
|
@ -55,6 +55,7 @@ import Map from '@/components/Map' |
|
|
|
import {uploadvariedfile} from '@/api/basic' |
|
|
|
import {saveOfficialAccountEvent} from '@/api/event' |
|
|
|
import {mapKey} from '@/config' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'event', |
|
|
|
components: {Recording, Audio, Perfect, Map}, |
|
|
@ -112,7 +113,8 @@ export default { |
|
|
|
errorPosition() { |
|
|
|
console.log('定位失败,再次进行定位') |
|
|
|
}, |
|
|
|
clickUpload() {}, |
|
|
|
clickUpload() { |
|
|
|
}, |
|
|
|
setAudio(val) { |
|
|
|
console.log(val, 'this.val') |
|
|
|
this.isFile = false |
|
|
@ -141,7 +143,7 @@ export default { |
|
|
|
this.$toast.fail('请输入描述') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.name) { |
|
|
|
/*if (!this.name) { |
|
|
|
this.$toast.fail('请输入姓名') |
|
|
|
return |
|
|
|
} |
|
|
@ -152,7 +154,7 @@ export default { |
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.phone)) { |
|
|
|
this.$toast.fail('请输入正确的联系电话') |
|
|
|
return |
|
|
|
} |
|
|
|
}*/ |
|
|
|
saveOfficialAccountEvent({ |
|
|
|
duration: this.audio.duration, |
|
|
|
serverId: this.audio.serverId, |
|
|
@ -160,8 +162,8 @@ export default { |
|
|
|
latitude: this.latitude, |
|
|
|
longitutd: this.longitude, |
|
|
|
address: this.address, |
|
|
|
name: this.name, |
|
|
|
phone: this.phone, |
|
|
|
/* name: this.name, |
|
|
|
phone: this.phone,*/ |
|
|
|
eventContent: this.eventContent, |
|
|
|
userId: this.$store.state.app.userInfo.userId, |
|
|
|
customerId: this.$store.state.app.userInfo.customerId |
|
|
@ -174,6 +176,6 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="less"> |
|
|
|
<style lang="less" scoped> |
|
|
|
@import './index'; |
|
|
|
</style> |
|
|
|