fix: BUG修改

This commit is contained in:
”Rain“ 2024-05-28 21:03:58 +08:00
parent fc76daca2c
commit b16b2e8cd2
3 changed files with 27 additions and 21 deletions

View File

@ -66,15 +66,16 @@
<view class="type flex3"> <view class="type flex3">
<view class="name">现场视频</view> <view class="name">现场视频</view>
<view v-if="item.videoFileList && item.videoFileList.length>0"> <view v-if="item.videoFileList && item.videoFileList.length>0">
<view class="imgBox flex2 imgBoxVideo" v-for="(item,index) in item.videoFileList" :key="index"> <view class="imgBox flex2 imgBoxVideo" v-for="(item,index) in item.videoFileList"
:key="index">
<view <view
style="color: #4181FE;width: 100%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;" style="color: #4181FE;width: 100%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;"
@click="playVideo(item.url,'video')"> @click="playVideo(item.url,'video')">
{{item.name}} {{item.name}}
<!-- url_config+'image/'+ --> <!-- url_config+'image/'+ -->
</view> </view>
<view @click="deleteImg(item,2,eIndex,index)" <view @click="deleteImg(item,2,eIndex,index)" style="margin: 5px;color: gray;"
style="margin: 5px;color: gray;" class="deleteImg">× class="deleteImg">×
</view> </view>
</view> </view>
</view> </view>
@ -86,7 +87,7 @@
<view class="type flex3"> <view class="type flex3">
<view class="name">处置说明</view> <view class="name">处置说明</view>
<textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent" <textarea class="textarea" maxlength="-1" placeholder-class="cl" name="inspectContent"
v-model="item.addedDescription" placeholder="请输入"></textarea> v-model="item.addedDescription" placeholder="请输入"></textarea>
</view> </view>
<view class="rescue-item_delete" @click="deleteRescue(eIndex)"> <view class="rescue-item_delete" @click="deleteRescue(eIndex)">
X X
@ -95,7 +96,7 @@
<view class="rescue-item_add" @click="addRescue()"> <view class="rescue-item_add" @click="addRescue()">
<image src="/static/icon-add.png" class="icon-add"></image> 新增救援记录 <image src="/static/icon-add.png" class="icon-add"></image> 新增救援记录
</view> </view>
<view class="addSaveBtn" @click="addSaveBtn">提交保存</view> <view class="addSaveBtn" @click="addSaveBtn" v-if="btnAuth">提交保存</view>
</view> </view>
</view> </view>
</view> </view>
@ -131,7 +132,7 @@
base64Image: '', base64Image: '',
imgIndex: -1, imgIndex: -1,
pointList: [], pointList: [],
pageTitle: '新增检查', pageTitle: '新增检查',
projectSn: '', projectSn: '',
checkType: 1, // 1 6 checkType: 1, // 1 6
@ -145,21 +146,26 @@
id: "", id: "",
emergencyDetail: {}, emergencyDetail: {},
btnAuth: true,
} }
}, },
onLoad(option) { onLoad(option) {
this.btnAuth = this.checkBtnPermission({
key: 'emergencyDisposal_add',
menuPath: '/project/emergencyDisposal/emergencyDisposal'
})
this.id = option.id; this.id = option.id;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
this.pageTitle = option.type == 'add' ? '新增检查' : '编辑检查'; this.pageTitle = option.type == 'add' ? '新增检查' : '编辑检查';
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
this.userInfo = JSON.parse(uni.getStorageSync('userInfo')); this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
console.log('111111', this.userInfo); console.log('111111', this.userInfo);
console.log(dateformat(new Date()), 777888) console.log(dateformat(new Date()), 777888)
this.getEmergencyRecordQueryById(); this.getEmergencyRecordQueryById();
}, },
onShow() { onShow() {
}, },
methods: { methods: {
// //
@ -201,7 +207,7 @@
videoFileList: [], videoFileList: [],
addedDescription: "", addedDescription: "",
}); });
console.log(this.rescueList,888999) console.log(this.rescueList, 888999)
}, },
// //
deleteRescue(index) { deleteRescue(index) {
@ -253,7 +259,7 @@
if (type == 'startTime2') { if (type == 'startTime2') {
// this.form.changeLimitTime = e.f3; // this.form.changeLimitTime = e.f3;
this.rescueList[eIndex].changeLimitTime = e.f3; this.rescueList[eIndex].changeLimitTime = e.f3;
} }
}, },
// //
uploadImg(type, rowIndex) { uploadImg(type, rowIndex) {
@ -274,8 +280,8 @@
url: that.url_config + 'image/' + JSON.parse(uploadFileRes url: that.url_config + 'image/' + JSON.parse(uploadFileRes
.data).data[0].imageUrl .data).data[0].imageUrl
}; };
console.log(rowIndex,777888) console.log(rowIndex, 777888)
console.log(that.rescueList,777888) console.log(that.rescueList, 777888)
that.rescueList[rowIndex].imgFileList.push(data) that.rescueList[rowIndex].imgFileList.push(data)
uni.getImageInfo({ uni.getImageInfo({
src: tempFilePaths[0], src: tempFilePaths[0],
@ -385,7 +391,7 @@
// //
uploadVideo(eIndex) { uploadVideo(eIndex) {
var that = this; var that = this;
uni.chooseVideo({ uni.chooseVideo({
count: 1, count: 1,
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
@ -732,7 +738,7 @@
} }
} }
.imgBoxVideo { .imgBoxVideo {
width: 342rpx; width: 342rpx;
} }

View File

@ -163,7 +163,7 @@
<text>{{item.disposalCompletionTime}}</text> <text>{{item.disposalCompletionTime}}</text>
</view> </view>
</view> </view>
<view class="addSaveBtn" v-if="emergencyDetail.incidentClosedStatus == 1 && btnAuth" <view class="addSaveBtn" v-if="emergencyDetail.incidentClosedStatus == 1"
@click="getnavigateTo(`./ImmediateRescue?id=${emergencyDetail.id}`)"> @click="getnavigateTo(`./ImmediateRescue?id=${emergencyDetail.id}`)">
立即救援 立即救援
</view> </view>
@ -228,7 +228,6 @@
emergencyTypeList: [], emergencyTypeList: [],
emergencyInfo: {}, emergencyInfo: {},
statusBarHeight: "", statusBarHeight: "",
btnAuth: true,
btnEditAuth: true btnEditAuth: true
} }
}, },
@ -236,10 +235,6 @@
}, },
onLoad(options) { onLoad(options) {
this.btnAuth = this.checkBtnPermission({
key: 'emergencyDisposal_add',
menuPath: '/project/emergencyDisposal/emergencyDisposal'
})
this.btnEditAuth = this.checkBtnPermission({ this.btnEditAuth = this.checkBtnPermission({
key: 'emergencyDisposal_edit', key: 'emergencyDisposal_edit',
menuPath: '/project/emergencyDisposal/emergencyDisposal' menuPath: '/project/emergencyDisposal/emergencyDisposal'

View File

@ -172,7 +172,7 @@
<view class="title"> <view class="title">
处置报告 处置报告
</view> </view>
<view v-if="this.imgList && this.imgList.length > 0" <view v-if="this.imgList && this.imgList.length > 0 && btnAuth"
style="color: #5181f6; cursor: pointer; height: 88rpx; justify-content: center; align-items: center;display: flex;" style="color: #5181f6; cursor: pointer; height: 88rpx; justify-content: center; align-items: center;display: flex;"
@click="downloadReport(imgList)"> @click="downloadReport(imgList)">
下载处置报告 下载处置报告
@ -203,12 +203,17 @@
imgList: [], imgList: [],
emergencyTypeList: [], emergencyTypeList: [],
emergencyInfo: {}, emergencyInfo: {},
btnAuth: true
} }
}, },
mounted() { mounted() {
}, },
onLoad(options) { onLoad(options) {
this.btnAuth = this.checkBtnPermission({
key: 'reliefApprove_download',
menuPath: '/project/emergencyDisposal/reliefApprove'
})
this.id = options.id; this.id = options.id;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight; this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;