Commit 4d5adf1c by liuzhanxin

fix

parent 03e8028f
<template> <template>
<view class="top-container" > <view class="top-container">
<view class="detailtext"><text class="titletext">整改项详情</text><text class="contenttext">{{description}}</text></view> <view class="detailtext"><text class="titletext">整改项详情</text><text class="contenttext">{{description}}</text></view>
<view class="detailtext"><text class="titletext">位置</text><text class="contenttext">{{roomName}}</text></view> <view class="detailtext"><text class="titletext">位置</text><text class="contenttext">{{roomName}}</text></view>
<view class="detailtext"><text class="titletext">实验室</text><text class="contenttext">{{roomName}}</text></view> <view class="detailtext"><text class="titletext">实验室</text><text class="contenttext">{{roomName}}</text></view>
<view class="detailtext"><text class="titletextlong">整改项照片</text></view> <view class="detailtext"><text class="titletextlong">整改项照片</text></view>
<view v-if="imgUrl.length==0" class="detailtext"><text class="remind">未上传整改项照片</text></view> <view v-if="imgUrl.length==0" class="detailtext"><text class="remind">未上传整改项照片</text></view>
<view style="width: 100%;display: flex;align-items: flex-start; justify-content: flex-start;margin-top: 30rpx;flex-direction: row;"> <view style="width: 100%;display: flex;align-items: flex-start; justify-content: flex-start;margin-top: 30rpx;flex-direction: row;">
<view style="margin-right: 30rpx;" v-for="(item,index) in imgUrl" :key="index"> <view style="margin-right: 30rpx;" v-for="(item,index) in imgUrl" :key="index">
<button class="camera-button"> <button class="camera-button">
<image mod="scaleToFill" class="camera-button" :src="item" /> <image mod="scaleToFill" class="camera-button" :src="item" />
</button> </button>
</view> </view>
</view>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
imgUrl:[], imgUrl: [],
roomName:"", roomName: "",
description:"", description: "",
detailData:{} detailData: {}
} }
}, },
methods: { methods: {
onLoad() { onLoad() {
var that = this var that = this
uni.$on('rectificationListData',function(data){ uni.$on('rectificationListData', function(data) {
console.log("@@@@@@@@@@@@@@@"+JSON.stringify(data)) console.log("@@@@@@@@@@@@@@@" + JSON.stringify(data))
var detailData = data[0] var detailData = data[0]
that.roomName = JSON.parse(detailData.room).name that.roomName = JSON.parse(detailData.room).name
that.description = detailData.description; that.description = detailData.description;
that.detailData = detailData; that.detailData = detailData;
that.imgUrl = JSON.parse(detailData.images) that.imgUrl = JSON.parse(detailData.images)
that.$forceUpdate(); that.$forceUpdate();
}) })
}, },
onUnload(){ onUnload() {
uni.$off('rectificationListData',function(data){ uni.$off('rectificationListData', function(data) {
}) })
}, },
/*下拉刷新的回调 */ /*下拉刷新的回调 */
downCallback() { downCallback() {
this.mescroll.endSuccess(); this.mescroll.endSuccess();
}, },
/*上拉加载的回调 */ /*上拉加载的回调 */
upCallback(page) { upCallback(page) {
}, },
onNavigationBarButtonTap(){ onNavigationBarButtonTap() {
uni.navigateTo({ uni.navigateTo({
url:"../Security-Check/index?mod=put" url: "../Security-Check/index?mod=put"
}) })
uni.$emit("rectificationEdit",[this.detailData]) uni.$emit("rectificationEdit", [this.detailData])
}, },
} }
} }
</script> </script>
<style> <style>
.top-container { .top-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
padding-left: 20rpx; padding-left: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.title {
font-size: 16px; .title {
color: #333333; font-size: 16px;
} color: #333333;
.containter{ }
display: flex;
width: 100%; .containter {
background-color: #F5F5F5; display: flex;
padding: 20rpx; width: 100%;
} background-color: #F5F5F5;
.statuspic{ padding: 20rpx;
width:80rpx; }
height:80rpx;
} .statuspic {
.titletext{ width: 80rpx;
font-size:28rpx; height: 80rpx;
color: #666666; }
margin-right: 78rpx;
flex:1 .titletext {
} font-size: 28rpx;
.titletextlong{ color: #666666;
font-size:28rpx; margin-right: 78rpx;
color: #666666; flex: 1
margin-right: 50rpx; }
flex:1
} .titletextlong {
.contenttext{ font-size: 28rpx;
font-size:28rpx; color: #666666;
color: #333333; margin-right: 50rpx;
flex:3 flex: 1
} }
.pic {
width:80rpx; .contenttext {
height:80rpx; font-size: 28rpx;
} color: #333333;
.remind { flex: 3
font-size:32rpx; }
color: #CDCDCD;
} .pic {
.detailtext { width: 80rpx;
display: flex; height: 80rpx;
flex-direction: row; }
margin-top: 20rpx;
} .remind {
.camera-button { font-size: 32rpx;
display:flex; color: #CDCDCD;
flex-direction: row; }
align-items: center;
justify-content: center; .detailtext {
width:200rpx; display: flex;
height: 200rpx; flex-direction: row;
padding: 0; margin-top: 20rpx;
}
.camera-button {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 200rpx;
height: 200rpx;
padding: 0;
} }
</style> </style>
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
} }
}, },
methods:{ methods:{
clickSubmit(){ clickSubmit(){
uni.navigateTo({ uni.navigateTo({
url:"../Security-Submit/index" url:"../Security-Submit/index"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment