| | |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>接受人</text> |
| | | <text>接收人</text> |
| | | </view> |
| | | <view class="value" @click="selMember"> |
| | | <text |
| | |
| | | title: '请选择隐患类型', |
| | | icon: 'none' |
| | | }) |
| | | if (!param.content) return uni.showToast({ |
| | | title: '请输入情况说明', |
| | | icon: 'none' |
| | | }) |
| | | if (param.content.length < 10) return uni.showToast({ |
| | | title: '情况说明不得小于10个字', |
| | | icon: 'none' |
| | | }) |
| | | |
| | | DangerCreate({ |
| | | ...param, |
| | |
| | | this.isShowType = false |
| | | }, |
| | | seletedSafety(e) { |
| | | |
| | | |
| | | }, |
| | | seletedDate(e) { |
| | | this.$set(this.param, 'submitTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')) |
| | |
| | | }) |
| | | }, |
| | | selMember() { |
| | | if(!this.param.areaId) return uni.showToast({ |
| | | title: '请先选择隐患区域', |
| | | icon: 'none' |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/memberSel' |
| | | url: '/pages/staff/memberSel?areaId=' + this.param.areaId |
| | | }) |
| | | }, |
| | | fileDel(i) { |
| | |
| | | }, |
| | | uploadImage() { |
| | | this.showUpload = false |
| | | let token = uni.getStorageSync('token') || '' |
| | | uni.chooseImage({ |
| | | count: 4, |
| | | success: (chooseImageRes) => { |
| | | console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths) |
| | | uni.showLoading({ title: '上传中', mask: true }) |
| | | const tempFilePaths = chooseImageRes.tempFilePaths |
| | | let imgs = tempFilePaths.map((value, index) => { |
| | |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | header: { |
| | | Dm_user_token: token |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | |
| | | uploadVideo() { |
| | | this.showUpload = false |
| | | let that = this |
| | | let token = uni.getStorageSync('token') || '' |
| | | uni.chooseVideo({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: '上传中', mask: true }) |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePath, |
| | | header: { |
| | | Dm_user_token: token |
| | | }, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | |
| | | |
| | | <style lang="scss"> |
| | | .main_wrap { |
| | | padding-bottom: 200rpx; |
| | | .line { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | position: absolute; |
| | | right: -20rpx; |
| | | top: -20rpx; |
| | | z-index: 9999; |
| | | } |
| | | image { |
| | | width: 100%; |
| | |
| | | } |
| | | video { |
| | | width: 100%; |
| | | max-height: 160rpx; |
| | | max-height: 120rpx; |
| | | } |
| | | } |
| | | } |