提交应急

This commit is contained in:
”Rain“ 2024-05-22 00:12:45 +08:00
parent 36db958732
commit efeceec3fe
13 changed files with 250 additions and 105 deletions

View File

@ -6,8 +6,12 @@ import request from "@/utils/request.js"
export function deviceLogin(data) { export function deviceLogin(data) {
// 设备、人员登录 // 设备、人员登录
// return request.post({
// url: "/xmgl/base/device/login",
// data
// })
return request.post({ return request.post({
url: "/xmgl/base/device/login", url: "xmgl/workerInfo/selectWorkerInfoByIdCard",
data data
}) })
} }

View File

@ -5,7 +5,7 @@
应急警报 应急警报
</view> </view>
</headers> </headers>
<view class="item-boxs"> <view class="item-boxs" :style="{ 'margin-top': (statusBarHeight+52) + 'px' }">
<view class="item-box"> <view class="item-box">
<view class="title"> <view class="title">
应急类型 应急类型
@ -22,7 +22,7 @@
<view class="title"> <view class="title">
应急详情 应急详情
</view> </view>
<textarea class="textareaType" v-model="emergencyInfo.emergencyDetail" placeholder="请选择应急详情,描述当时情况" /> <textarea class="textareaType" maxlength="-1" v-model="emergencyInfo.emergencyDetail" placeholder="请选择应急详情,描述当时情况" />
</view> </view>
<view class="item-box"> <view class="item-box">
<view class="title"> <view class="title">
@ -32,27 +32,30 @@
<view class="uploadImg"> <view class="uploadImg">
<text>上传图片</text> <text>上传图片</text>
<view class="uni-form-input imgBox_wrap"> <view class="uni-form-input imgBox_wrap">
<view class="imgBox" v-show="imgFileList.length>0" v-for="(item,index) in imgFileList" <view v-show="imgFileList.length>0">
<view class="imgBox" v-for="(item,index) in imgFileList"
:key="index"> :key="index">
<image :src="url_config+'image/'+item.url" class="img" <image :src="url_config+'image/'+item.url" class="img"
@click="previewImage(url_config+'image/'+item.url)"> @click="previewImage(url_config+'image/'+item.url)">
</image> </image>
<view @click="deleteImg(item,1)" style="margin: 5px;" class="deleteImg">×</view> <view @click="deleteImg(item,1)" style="margin: 5px;" class="deleteImg">×</view>
</view> </view>
<view class="addImgBox" @click="uploadImg(1)" v-if="imgFileList.length<5"> </view>
<view class="addImgBox" @click="uploadImg(1)" v-if="imgFileList.length<1">
<image src="/static/icon-add.png" class="icon-add"></image> <image src="/static/icon-add.png" class="icon-add"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="uploadImg"> <view class="uploadImg">
<text>视频(mp4)附件</text> <text>视频(mp4)附件</text>
<view v-if="videoFileList.length>0" class="imgBox flex2" <view v-if="videoFileList.length>0" class="imgBox flex2">
v-for="(item,index) in videoFileList" :key="index"> <view style="overflow: hidden;" v-for="(item,index) in 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(url_config+'image/'+item.url,'video')"> @click="playVideo(url_config+'image/'+item.url,'video')">
{{item.name}} {{item.name}}
</view> </view>
</view>
<view @click="deleteImg(item,2)" style="margin: 5px;color: gray;right: 0%;" <view @click="deleteImg(item,2)" style="margin: 5px;color: gray;right: 0%;"
class="deleteImg">× class="deleteImg">×
</view> </view>
@ -66,7 +69,7 @@
<view class="item-box_address"> <view class="item-box_address">
<view class="address"> <view class="address">
<text>事发地</text> <text>事发地</text>
<input class="inputAddress" v-model="emergencyInfo.incidentSite" placeholder="请输入详细地址" /> <input class="inputAddress" readonly disabled v-model="emergencyInfo.incidentSite" placeholder="请获取地址" />
</view> </view>
<view class="getaddress" @click="getAddress()"> <view class="getaddress" @click="getAddress()">
<text class="round"></text> <text class="round"></text>
@ -116,7 +119,9 @@
}, },
onLoad(options) { onLoad(options) {
this.id = options.id; this.id = options.id;
this.projectSn = uni.getStorageSync('devInfoList')[0].projectSn; console.log(uni.getStorageSync('devInfoList'));
this.projectSn = uni.getStorageSync('devInfoList').projectSn;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
console.log(options); console.log(options);
emergencyRecordQueryById({ emergencyRecordQueryById({
projectSn: this.projectSn, projectSn: this.projectSn,
@ -152,6 +157,27 @@
methods: { methods: {
emergencyEdit() { emergencyEdit() {
var that = this; var that = this;
if(!this.emergencyInfo.emergencyTypeId){
uni.showToast({
title: "请输入类型",
icon: "none"
})
return
}
if(!this.emergencyInfo.emergencyDetail){
uni.showToast({
title: "请输入详情",
icon: "none"
})
return
}
if(!this.addressList){
uni.showToast({
title: "请输入事发地",
icon: "none"
})
return
}
emergencyRecordEdit({ emergencyRecordEdit({
id: this.id, id: this.id,
projectSn: this.projectSn, projectSn: this.projectSn,
@ -240,7 +266,7 @@
var that = this var that = this
if (type == 1) { if (type == 1) {
uni.chooseImage({ uni.chooseImage({
count: 5 - that.imgFileList.length, count: 1,
success(res) { success(res) {
const tempFilePaths = res.tempFilePaths; const tempFilePaths = res.tempFilePaths;
uni.uploadFile({ uni.uploadFile({
@ -418,7 +444,7 @@
} }
.emergencyalarm { .emergencyalarm {
padding: 88rpx 24rpx 120rpx 24rpx; padding: 0 24rpx 120rpx 24rpx;
.item-boxs { .item-boxs {
.item-box { .item-box {
@ -590,7 +616,7 @@
display: inline-flex; display: inline-flex;
position: relative; position: relative;
margin-right: 30rpx; margin-right: 30rpx;
margin-bottom: 16rpx; // margin-bottom: 16rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -603,7 +629,7 @@
.deleteImg { .deleteImg {
position: absolute; position: absolute;
right: -6rpx; right: -6rpx;
top: -36rpx; top: -24rpx;
font-size: 36rpx; font-size: 36rpx;
color: #fff; color: #fff;
} }

View File

@ -39,9 +39,8 @@
} }
}, },
onShow() { onShow() {
console.log(uni.getStorageSync('devInfoList')[0]) this.projectSn = uni.getStorageSync('devInfoList').projectSn;
this.projectSn = uni.getStorageSync('devInfoList')[0].projectSn; this.workerInfoId = uni.getStorageSync('devInfoList').id;
this.workerInfoId = uni.getStorageSync('devInfoList')[0].workerInfoId;
}, },
methods: { methods: {
goNavigateTo(url, type) { goNavigateTo(url, type) {

View File

@ -3,7 +3,7 @@
<u-icon :style="{ <u-icon :style="{
top: (statusBarHeight + 5) + 'px' top: (statusBarHeight + 5) + 'px'
}" @click="gotoback" name="arrow-left" size="40" class="back"></u-icon> }" @click="gotoback" name="arrow-left" size="40" class="back"></u-icon>
<view class="title">请选择您的登录方式</view> <!-- <view class="title">请选择您的登录方式</view> -->
<view class="loginBox"> <view class="loginBox">
<view class="tabs"> <view class="tabs">
<view class="tab" v-for="(item,index) in tabs" :key="index" :class="{active:current==index}" <view class="tab" v-for="(item,index) in tabs" :key="index" :class="{active:current==index}"
@ -28,9 +28,9 @@
</view> </view>
</view> </view>
<view class="submit" @click="submit">同意协议并登录</view> <view class="submit" @click="submit">同意协议并登录</view>
<view class="bottomTitle" @click="showModal=true"> <!-- <view class="bottomTitle" @click="showModal=true">
云服务器设置 云服务器设置
</view> </view> -->
<view class="modalBox" v-show="showModal" @click="showModal=false"> <view class="modalBox" v-show="showModal" @click="showModal=false">
<view class="modalContent" @click.stop="showModal=true"> <view class="modalContent" @click.stop="showModal=true">
<view class="modalTitle"> <view class="modalTitle">
@ -51,11 +51,14 @@
import { import {
deviceLogin deviceLogin
} from "@/api/index.js" } from "@/api/index.js"
import {
BASE_URL
} from "@/api/request.js"
export default { export default {
data() { data() {
return { return {
current: 0, current: 0,
tabs: ["人员登录", "设备登录"], tabs: ["人员登录"],
showModal: false, showModal: false,
ipPort: '', ipPort: '',
form: { form: {
@ -67,11 +70,15 @@
}, },
onLoad() { onLoad() {
let port = uni.getStorageSync('ipPort') let port = uni.getStorageSync('ipPort')
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
let devInfoList = uni.getStorageSync('devInfoList') let devInfoList = uni.getStorageSync('devInfoList')
if (port) { if (port) {
this.ipPort = port; this.ipPort = port;
Vue.prototype.url_config = port; Vue.prototype.url_config = port;
} }
uni.setStorageSync('ipPort', BASE_URL);
Vue.prototype.url_config = BASE_URL;
getApp().globalData.siteUrl = BASE_URL;
if (devInfoList) { if (devInfoList) {
// uni.reLaunch({ // uni.reLaunch({
// url: '/pages/personLocation/home/home' // url: '/pages/personLocation/home/home'
@ -136,7 +143,7 @@
// //
uni.setStorageSync("loginType","device"); uni.setStorageSync("loginType","device");
} }
uni.setStorageSync("devInfoList", result.result.devInfoList); uni.setStorageSync("devInfoList", result.result);
uni.redirectTo({ uni.redirectTo({
url: '/pages/personLocation/index/index' url: '/pages/personLocation/index/index'
}); });

View File

@ -6,7 +6,7 @@
</view> </view>
</headers> </headers>
<!-- 新增问题 --> <!-- 新增问题 -->
<view class="immediate-rescue"> <view class="immediate-rescue" :style="{ 'margin-top': (statusBarHeight+52) + 'px' }">
<view class="content"> <view class="content">
<!-- <view class="type flex"> <!-- <view class="type flex">
<view class="name"><text class="star">*</text>是否处理完毕</view> <view class="name"><text class="star">*</text>是否处理完毕</view>
@ -351,7 +351,7 @@
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
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'));
@ -752,7 +752,7 @@
}, },
// //
bindPickerChange(e, type,eIndex) { bindPickerChange(e, type, eIndex) {
console.log(e) console.log(e)
//type ==1 ;2;3;4 ;5; 6; 7; 8; //type ==1 ;2;3;4 ;5; 6; 7; 8;
if (type == 1) { if (type == 1) {
@ -1065,13 +1065,14 @@
// //
addSaveBtn() { addSaveBtn() {
// if (!data.regionId) { const everyTime = this.rescueList.every(item => item.changeLimitTime);
// uni.showToast({ if (!everyTime && this.rescueList.length != 0) {
// title: '', uni.showToast({
// icon: 'none' title: '处置完成时间有未填项',
// }) icon: 'none'
// return })
// } return
}
console.log(this.rescueList); console.log(this.rescueList);
this.sendRequest({ this.sendRequest({
url: 'xmgl/xzEmergencyRecord/edit', url: 'xmgl/xzEmergencyRecord/edit',
@ -1245,7 +1246,7 @@
.immediate-rescue { .immediate-rescue {
margin: 17% 4%; margin: 0 4%;
position: relative; position: relative;
} }

View File

@ -5,7 +5,7 @@
处置详情 处置详情
</view> </view>
</headers> </headers>
<view class="disposal-detail"> <view class="disposal-detail" :style="{ 'margin-top': (statusBarHeight+52) + 'px' }">
<view class="rescue"> <view class="rescue">
<view class="title"> <view class="title">
基本信息 基本信息
@ -86,7 +86,7 @@
</div> </div>
</view> </view>
</view> </view>
<view class="rescue"> <view class="rescue" v-if="emergencyInfo.emergencyTypeId != -1">
<view class="title"> <view class="title">
救援资料 救援资料
</view> </view>
@ -120,13 +120,13 @@
<text>处置人</text> <text>处置人</text>
<text>{{item.disposalPersonName}}</text> <text>{{item.disposalPersonName}}</text>
</view> </view>
<view style="flex-direction: column;"> <view>
<text>现场情况视频</text> <text>现场情况视频</text>
<view v-if="item.liveVideoSituation && JSON.parse(item.liveVideoSituation).length>0" <view v-if="item.liveVideoSituation && JSON.parse(item.liveVideoSituation).length>0"
class="imgBox flex2" v-for="(ele,index) in JSON.parse(item.liveVideoSituation)" class="imgBox flex2" v-for="(ele,index) in JSON.parse(item.liveVideoSituation)"
:key="index"> :key="index">
<view <view
style="color: #4181FE;width: 50%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;" style="color: #4181FE;width: 100%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;"
@click="playVideo(ele.url,'video')"> @click="playVideo(ele.url,'video')">
{{ele.name}} {{ele.name}}
</view> </view>
@ -185,7 +185,7 @@
</view> </view>
<view v-if="emergencyDetail.dispositionStatus == 3" <view v-if="emergencyDetail.dispositionStatus == 3"
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(this.imgList)"> @click="downloadReport(imgList)">
下载处置报告 下载处置报告
</view> </view>
</view> </view>
@ -211,6 +211,7 @@
imgList: [], imgList: [],
emergencyTypeList: [], emergencyTypeList: [],
emergencyInfo: {}, emergencyInfo: {},
statusBarHeight: "",
} }
}, },
mounted() { mounted() {
@ -218,6 +219,7 @@
}, },
onLoad(options) { onLoad(options) {
this.id = options.id; this.id = options.id;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
console.log(options); console.log(options);
@ -228,20 +230,53 @@
}, },
methods: { methods: {
downloadReport(row) { downloadReport(row) {
const url = row[0].url; const url = row && row != "null" && row[0].url;
const fileName = row[0].name; const fileName = row && row != "null" && row[0].name;
if (!url) {
fetch(url) uni.showToast({
.then(response => response.blob()) title: "暂无下载文件!",
.then(blob => { icon: "none"
const link = document.createElement('a'); })
link.href = URL.createObjectURL(blob); return
link.download = fileName; }
link.target = "_blank"; // uni.showLoading({
link.click(); title: "保存中..."
})
uni.downloadFile({
url: url, //
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath, //
success: res => { //
uni.hideLoading()
uni.showToast({
title: "保存成功!"
})
}
})
}
}
}); });
// fetch(url)
// .then(response => response.blob())
// .then(blob => {
// const link = document.createElement('a');
// link.href = URL.createObjectURL(blob);
// link.download = fileName;
// link.target = "_blank"; //
// link.click();
// });
}, },
addSaveBtn() { addSaveBtn() {
if (this.imgList == null||this.imgList.length == 0) {
uni.showToast({
title: "请提交处置报告",
icon: "none"
})
return
}
this.sendRequest({ this.sendRequest({
url: 'xmgl/xzEmergencyRecord/edit', url: 'xmgl/xzEmergencyRecord/edit',
method: 'post', method: 'post',
@ -269,6 +304,7 @@
canversList(e) { canversList(e) {
const that = this; const that = this;
console.log(e); console.log(e);
that.imgList = that.imgList == null ? [] : that.imgList;
uni.uploadFile({ uni.uploadFile({
url: that.url_config + 'upload/image', // url: that.url_config + 'upload/image', //
filePath: e.tempFilePaths[0], filePath: e.tempFilePaths[0],
@ -324,7 +360,7 @@
const find = that.emergencyTypeList.find(item => item.id == res.result const find = that.emergencyTypeList.find(item => item.id == res.result
.emergencyTypeId); .emergencyTypeId);
that.emergencyInfo = find ? find : {}; that.emergencyInfo = find ? find : {};
this.imgList = res.result.disposalReport && JSON.parse(res.result.disposalReport); this.imgList = (res.result.disposalReport && res.result.disposalReport != null) ? JSON.parse(res.result.disposalReport) : [];
} }
}) })
}, },
@ -442,8 +478,8 @@
} }
.disposal-detail { .disposal-detail {
margin: 88rpx 0; // margin: 88rpx 0;
padding: 0 30rpx; padding: 0 30rpx 30rpx;
position: relative; position: relative;
.rescue { .rescue {
@ -461,9 +497,9 @@
border-radius: 34rpx; border-radius: 34rpx;
padding: 24rpx 24rpx; padding: 24rpx 24rpx;
view { // view {
margin: 6rpx 0 !important; // margin: 6rpx 0 !important;
} // }
} }
.rescue-item>view:last-child { .rescue-item>view:last-child {
@ -560,4 +596,13 @@
} }
} }
} }
.imgBox_wrap,
.imgBox {
margin: 0 !important;
view {
margin: 0 !important;
}
}
</style> </style>

View File

@ -2,12 +2,12 @@
<view class="emergencyDisposal"> <view class="emergencyDisposal">
<headers class="fixedheader" :showBack="true"> <headers class="fixedheader" :showBack="true">
<view class="headerName"> <view class="headerName">
应急处置 {{this.getGoId == 2 ? '救援隐患审批' :'应急处置'}}
</view> </view>
</headers> </headers>
<view class="problemOverview"> <view class="problemOverview" :style="{ 'margin-top': (statusBarHeight+52) + 'px' }">
<view class="overFlex"> <view class="overFlex">
<view class="overLeft">问题概览</view> <view class="overLeft">{{this.getGoId == 2 ? '审批分析' :'处置分析'}}</view>
<view class="overRight">{{nowTime}}</view> <view class="overRight">{{nowTime}}</view>
</view> </view>
<view class="problemData"> <view class="problemData">
@ -18,7 +18,7 @@
<view class="num">{{statisticsValue.totalNum}}</view> <view class="num">{{statisticsValue.totalNum}}</view>
<view class="text">总数</view> <view class="text">总数</view>
</view> </view>
<view class="dataBox2 dataStyle"> <view class="dataBox2 dataStyle" v-if="this.getGoId != 2">
<!-- <view class="day" v-if="statisticsValue.oseNumDifferYesterday<0"> <!-- <view class="day" v-if="statisticsValue.oseNumDifferYesterday<0">
较昨日{{statisticsValue.oseNumDifferYesterday}}</view> 较昨日{{statisticsValue.oseNumDifferYesterday}}</view>
<view class="day" v-else> <view class="day" v-else>
@ -210,7 +210,8 @@
// //
getRecordList() { getRecordList() {
let data = { let data = {
projectSn: this.projectSn projectSn: this.projectSn,
inDispositionStatus:this.getGoId == 2 ? "2,3" : "1,2,3",
} }
this.sendRequest({ this.sendRequest({
url: 'xmgl/xzEmergencyRecord/statsDispositionStatus', url: 'xmgl/xzEmergencyRecord/statsDispositionStatus',
@ -335,7 +336,7 @@
// box-sizing: border-box; // box-sizing: border-box;
border-radius: 10px; border-radius: 10px;
// border: 3px solid #fafbfc; // border: 3px solid #fafbfc;
margin: 88rpx 2% 11% 2%; margin: 0 2% 11% 2%;
padding: 3% 3%; padding: 3% 3%;

View File

@ -2,8 +2,8 @@
<view> <view>
<view class="page-body"> <view class="page-body">
<view class="page-section page-section-gap"> <view class="page-section page-section-gap">
<map style="width: 100%; height: 100%;" :markers="markersArr" :latitude="latitude" <map style="width: 100%; height: 100vh;" :markers="markersArr" :latitude="latitude"
:longitude="longitude"> :longitude="longitude" @markertap="markTap">
</map> </map>
</view> </view>
</view> </view>
@ -26,29 +26,67 @@
this.latitude = option.latitude ? option.latitude : '39.909'; this.latitude = option.latitude ? option.latitude : '39.909';
this.longitude = option.longitude ? option.longitude : '116.39742'; this.longitude = option.longitude ? option.longitude : '116.39742';
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
this.getListData();
}, },
methods: { methods: {
markTap(e) {
console.log('ccccccc')
console.log(JSON.stringify(e))
console.log('ccccccc')
uni.openLocation({
//
latitude: e.target.latitude,
longitude: e.target.longitude,
//
success: function(res) {
console.log('调用成功:', res)
},
//
fail: function(res) {
console.log('调用失败:', res)
},
//
complete: function(res) {
console.log('调用完成:', res)
}
})
},
// //
getListData() { getListData() {
let that = this; let that = this;
// //
this.sendRequest({ this.sendRequest({
url: 'xmgl/xzEmergencyRecord/page', url: 'xmgl/xzEmergencyReliefGoods/list',
method: 'get', method: 'get',
data: { data: {
projectSn: this.projectSn, projectSn: this.projectSn,
}, },
success: res => { success: res => {
console.log(res) console.log(res)
that.markersArr = res.result.filter(item => item.longitude || item.latitude).map( const newResult = res.result.filter(item => item.longitude || item.latitude).map(
(item, index) => { (item, index) => {
return { return {
id: index + 1, id: index + 1,
latitude: item.latitude ? item.latitude : 0, latitude: item.latitude ? item.latitude : 0,
longitude: item.longitude ? item.longitude : 0, longitude: item.longitude ? item.longitude : 0,
title: item.goodsName title: item.goodsName,
label: {
content: item.goodsName,
textAlign:"center",
},
iconPath: '/static/address-logo1.png',
} }
}); });
that.markersArr = newResult.concat([{
id: res.result.length + 2,
latitude: that.latitude,
longitude: that.longitude,
// title: item.goodsName,
iconPath: '/static/address-logo2.png',
}])
} }
}) })
}, },
@ -56,6 +94,5 @@
} }
</script> </script>
<style> <style scoped>
</style> </style>

View File

@ -5,7 +5,7 @@
处置详情 处置详情
</view> </view>
</headers> </headers>
<view class="disposal-detail"> <view class="disposal-detail" :style="{ 'margin-top': (statusBarHeight+52) + 'px' }">
<view class="rescue"> <view class="rescue">
<view class="title"> <view class="title">
基本信息 基本信息
@ -120,13 +120,14 @@
<text>处置人</text> <text>处置人</text>
<text>{{item.disposalPersonName}}</text> <text>{{item.disposalPersonName}}</text>
</view> </view>
<view style="flex-direction: column;"> <!-- style="flex-direction: column;" -->
<view >
<text>现场情况视频</text> <text>现场情况视频</text>
<view v-if="item.liveVideoSituation && JSON.parse(item.liveVideoSituation).length>0" <view v-if="item.liveVideoSituation && JSON.parse(item.liveVideoSituation).length>0"
class="imgBox flex2" v-for="(ele,index) in JSON.parse(item.liveVideoSituation)" class="imgBox flex2" v-for="(ele,index) in JSON.parse(item.liveVideoSituation)"
:key="index"> :key="index">
<view <view
style="color: #4181FE;width: 50%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;" style="color: #4181FE;width: 100%;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;"
@click="playVideo(ele.url,'video')"> @click="playVideo(ele.url,'video')">
{{ele.name}} {{ele.name}}
</view> </view>
@ -167,7 +168,7 @@
</view> </view>
<view v-if="this.imgList && this.imgList.length > 0" <view v-if="this.imgList && this.imgList.length > 0"
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(this.imgList)"> @click="downloadReport(imgList)">
下载处置报告 下载处置报告
</view> </view>
</view> </view>
@ -203,6 +204,7 @@
}, },
onLoad(options) { onLoad(options) {
this.id = options.id; this.id = options.id;
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
console.log(options); console.log(options);
@ -213,17 +215,33 @@
}, },
methods: { methods: {
downloadReport(row) { downloadReport(row) {
const url = row[0].url; const url = row && row != "null" && row[0].url;
const fileName = row[0].name; const fileName = row && row != "null" && row[0].name;
if (!url) {
fetch(url) uni.showToast({
.then(response => response.blob()) title: "暂无下载文件!",
.then(blob => { icon: "none"
const link = document.createElement('a'); })
link.href = URL.createObjectURL(blob); return
link.download = fileName; }
link.target = "_blank"; // uni.showLoading({
link.click(); title: "保存中..."
})
uni.downloadFile({
url: url, //
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath, //
success: res => { //
uni.hideLoading()
uni.showToast({
title: "保存成功!"
})
}
})
}
}
}); });
}, },
onSubmitAll() { onSubmitAll() {
@ -276,6 +294,7 @@
canversList(e) { canversList(e) {
const that = this; const that = this;
console.log(e); console.log(e);
that.imgList = that.imgList == null ? [] : that.imgList;
uni.uploadFile({ uni.uploadFile({
url: that.url_config + 'upload/image', // url: that.url_config + 'upload/image', //
filePath: e.tempFilePaths[0], filePath: e.tempFilePaths[0],
@ -449,8 +468,7 @@
} }
.disposal-detail { .disposal-detail {
margin: 88rpx 0; padding: 0 30rpx 30rpx;
padding: 0 30rpx;
position: relative; position: relative;
.rescue { .rescue {
@ -468,9 +486,9 @@
border-radius: 34rpx; border-radius: 34rpx;
padding: 24rpx 24rpx; padding: 24rpx 24rpx;
view { // view {
margin: 6rpx 0 !important; // margin: 6rpx 0 !important;
} // }
} }
.rescue-item>view:last-child { .rescue-item>view:last-child {
@ -567,4 +585,11 @@
} }
} }
} }
.imgBox_wrap,.imgBox {
margin: 0 !important;
view {
margin: 0 !important;
}
}
</style> </style>

View File

@ -87,7 +87,7 @@
<view>特种验收</view> <view>特种验收</view>
</view> </view>
<view class="menu" @click="reliefApprove"> <view class="menu" @click="reliefApprove">
<image class="icon" style="width: 30px; height: 30px;" src="@/static/safeMange/danger_check.png"> <image class="icon" style="width: 30px; height: 30px;" src="@/static/reliefApprove.png">
</image> </image>
<view>新增隐患审批</view> <view>新增隐患审批</view>
</view> </view>

BIN
static/address-logo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/address-logo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/reliefApprove.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B