first commit

This commit is contained in:
仲么了
2023-11-16 15:13:28 +08:00
commit 6023eac4fe
209 changed files with 34095 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/* 主体开始 */
.steadyIndex-block{
background:#F9F9F9;
padding-top: 20rpx;
}
/* 基础信息开始 */
.index-block{
display: flex;
flex-direction: column;
justify-content: flex-start;
background: #FFFFFF;
}
.index-title{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
height: 102rpx;
}
.index-title-left{
width: 6rpx;
height: 34rpx;
margin-left: 40rpx;
}
.index-title-right{
height: 42rpx;
font-size: 30rpx;
color: #000000;
margin-left: 20rpx;
}
.index-content{
height: 424rpx;
width: 670rpx;
margin: 20rpx 40rpx 56rpx 40rpx;
}
.index-content-pic{
height: 424rpx;
width: 670rpx;
}
/* 基础信息结束 */
/* 重试页面开始 */
.error-block{
height: 60%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: absolute;
top: -10%;
margin-top: 300rpx;
}
.retry_button{
margin-top: 10rpx;
border-radius: 10%;
}
/* 重试页面结束 */
/* 主体结束 */

View File

@@ -0,0 +1,143 @@
<template>
<view class="">
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
<view class="steadyIndex-block" v-if="errorFlag==0">
<!-- 指标类型 -->
<view class="index-block">
<view class="index-title">
<image src="/static/pic/rectangle.png" class="index-title-left"></image>
<view class="index-title-right">
{{typeName}}
</view>
</view>
<view class="index-content">
<image :src="steadyTargetPicUrl" class="index-content-pic" @click="previewPic(steadyTargetPicUrl)"></image>
</view>
</view>
</view>
<view class="error-block" v-else>
<view class="error-text">
网络出错请重试
</view>
<button class="retry_button" @click="retry">重试</button>
</view>
</view>
</template>
<script>
import back from '../../components/back.vue';
export default {
data() {
return {
pageNameFlag:1,
pageName:'越限监测点详情',
radioFlag:0,
timeID:'',
typeCode:'',
lineIndex:'',
steadyTargetPicUrl:'',
errorFlag:0,
typeName:''
}
},
methods: {
steadyTargetUrl(){
var that = this;
uni.request({
url: that.serverUrl+'/steadymsg/steadyTargetUrl',
method: 'POST',
data: {
lineIndex: that.lineIndex,
timeID:that.timeID,
typeCode:that.typeCode
},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
sslVerify: false,
success: (res) => {
uni.hideLoading();
if (res.data.resultCode == '10000') {
that.steadyTargetPicUrl = eval(res.data.data).steadyPath;
} else {
that.errorFlag = 1
}
},
fail: (re) => {
that.errorFlag = 1
}
});
},
previewPic(url) {
if(url==null||url==undefined||url==''||url.length==0){
return
}
uni.previewImage({
urls: [url],
current:0,
longPressActions: {
itemList: ['保存图片'],
success: function(data) {
if (data.tapIndex == 0) {
uni.showLoading({
title: "图片保存中"
});
uni.downloadFile({
url: url,
success(result) {
var tempFilePath = result.tempFilePath;
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {
uni.showToast({
icon: "success",
title: "保存成功",
duration: 2000
})
}
})
},
complete() {
uni.hideLoading();
}
})
}
},
fail: function(err) {
uni.showModal({
title: '保存失败',
content: err.errMsg,
showCancel:false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
});
},
retry(){
this.errorFlag=0;
this.steadyTargetUrl();
}
},
onLoad(e) {
this.lineIndex=e.lineIndex;
this.typeCode=e.typeCode;
this.timeID=e.timeID;
this.typeName=e.typeName;
this.steadyTargetUrl();
},
components:{
back
}
}
</script>
<style>
@import url("steadyIndex.css");
</style>