| | |
| | | class="adduser_list_item_ipt1_upload" |
| | | v-for="(item, i) in submitFileList" |
| | | :key="i" |
| | | ><image :src="item.fileurlFull" mode="widthFix"></image |
| | | ><image |
| | | v-if="item.type == 0" |
| | | :src="item.fileurlFull" |
| | | mode="widthFix" |
| | | ></image |
| | | ><video |
| | | v-if="item.type == 1" |
| | | :src="item.fileurlFull" |
| | | ></video |
| | | ></view> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="upload_line" style="padding: 15px 0 0;"> |
| | | <view class="name" style="margin-bottom: 10rpx;"> |
| | | <text style="color: #e42d2d;">*</text> |
| | | <view class="upload_line" style="padding: 15px 0 0"> |
| | | <view class="name" style="margin-bottom: 10rpx"> |
| | | <text style="color: #e42d2d">*</text> |
| | | <text>情况说明</text> |
| | | </view> |
| | | <view class="value" |
| | | ><textarea |
| | | <view class="value"> |
| | | <textarea |
| | | placeholder="请详细描述现场情况,不少于10个字" |
| | | minlength="10" |
| | | v-model="param.content" |
| | | placeholder-style="color: #999999;" |
| | | /></view> |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | | <view class="line"> |
| | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option && option.id) { |
| | | this.$set(this.param, 'checkUserId', option.id) |
| | | this.$set(this.param, 'applyCheckUserId', option.id) |
| | | this.$set(this.param, 'checkorName', option.name) |
| | | } |
| | | this.initConfig() |
| | | const userInfo = uni.getStorageSync('userInfo') || {} |
| | | this.$set(this.param, 'memberName', userInfo.realname) |
| | | this.$set(this.param, 'memberPhone', userInfo.mobile) |
| | | this.$set(this.param, 'memberId', userInfo.id) |
| | | this.$set(this.param, 'submitTime', dayjs().format('YYYY-MM-DD HH:mm:ss')) |
| | | }, |
| | | mounted() { |
| | | this.$eventBus.$on('snapshotSel', (option) => { |
| | | this.$set(this.param, 'checkUserId', option.id) |
| | | this.$set(this.param, 'applyCheckUserId', option.id) |
| | | this.$set(this.param, 'checkorName', option.name) |
| | | }) |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | |
| | | uploadImage() { |
| | | this.showUpload = false |
| | | uni.chooseImage({ |
| | | count: 6, |
| | | count: 1, |
| | | success: (chooseImageRes) => { |
| | | console.log('chooseImageRes.tempFilePaths', chooseImageRes.tempFilePaths) |
| | | uni.showLoading({ title: '上传中', mask: true }) |
| | |
| | | uni.chooseVideo({ |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: '上传中', mask: true }) |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('uploadFileRes', res) |
| | | let obj = { type: '1' } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | that.submitFileList.push(obj) |
| | | console.log(that.submitFileList) |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading() |
| | | } |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | filePath: chooseImageRes.tempFilePath, |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('res', res) |
| | | let obj = { |
| | | type: '1' |
| | | } |
| | | }) |
| | | } |
| | | obj.fileurl = res.data.halfPath |
| | | obj.fileurlFull = res.data.addr |
| | | this.submitFileList.push(obj) |
| | | }, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | } |
| | | .upload_line { |
| | | padding: 30rpx 0; |
| | | .wrap{ |
| | | .wrap { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | video { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |