flx:修改承包商样式

This commit is contained in:
X_Rian 2024-07-19 14:15:28 +08:00
parent 41d22399bd
commit 4ea559f518

View File

@ -51,9 +51,8 @@
<view class="property-item">
<view class="item-top">资质照片</view>
<view class="item-bottom" v-if="enterpriseInfo.enterpriseQualificationUrl">
<image :src="enterpriseInfo.enterpriseQualificationUrl"
@click="previewImage(enterpriseInfo.enterpriseQualificationUrl)"
class="icon-image"></image>
<image :src="enterpriseInfo.enterpriseQualificationUrl"
@click="previewImage(enterpriseInfo.enterpriseQualificationUrl)" class="icon-image"></image>
<!-- <image :src="enterpriseInfo.enterpriseQualificationUrl[0].url"
@click="previewImage(enterpriseInfo.enterpriseQualificationUrl[0].url)"
class="icon-image"></image> -->
@ -64,7 +63,7 @@
</view>
</scroll-view>
<scroll-view :scroll-y="true" class="scrollBox" :style="{height: scrollHeight + 'px'}" v-if="checked == 2">
<div v-for="item in conProjectList" :key="item.id">
<div class="conProjectItem" v-for="item in conProjectList" :key="item.id">
<view class="property-item">
<view class="item-top">承包商名称</view>
<view class="item-bottom">{{item.cbsName || '--'}}</view>
@ -194,39 +193,39 @@
methods: {
async getHeight() {
const query = uni.createSelectorQuery().in(this);
let fixedheaderHeight = 0
const fixedHeaderPromise = new Promise((resolve) => {
query.select('.fixedheader').boundingClientRect(data => {
fixedheaderHeight = data.height
console.log('fixedheaderHeight', data.height);
resolve();
}).exec();
});
let mobileTopHeight = 0
const systemInfoPromise = new Promise((resolve) => {
uni.getSystemInfo({
success(res) {
mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
resolve();
}
});
});
await fixedHeaderPromise;
await systemInfoPromise;
this.barBoxHeight = fixedheaderHeight + mobileTopHeight;
console.log('this.barBoxHeight', this.barBoxHeight);
let screenHeight = uni.getSystemInfoSync().screenHeight;
console.log('screenHeight', screenHeight);
this.scrollHeight = screenHeight - this.barBoxHeight -44;
console.log('this.scrollHeight', this.scrollHeight);
let fixedheaderHeight = 0
const fixedHeaderPromise = new Promise((resolve) => {
query.select('.fixedheader').boundingClientRect(data => {
fixedheaderHeight = data.height
console.log('fixedheaderHeight', data.height);
resolve();
}).exec();
});
let mobileTopHeight = 0
const systemInfoPromise = new Promise((resolve) => {
uni.getSystemInfo({
success(res) {
mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
resolve();
}
});
});
await fixedHeaderPromise;
await systemInfoPromise;
this.barBoxHeight = fixedheaderHeight + mobileTopHeight;
console.log('this.barBoxHeight', this.barBoxHeight);
let screenHeight = uni.getSystemInfoSync().screenHeight;
console.log('screenHeight', screenHeight);
this.scrollHeight = screenHeight - this.barBoxHeight - 44;
console.log('this.scrollHeight', this.scrollHeight);
},
handleTab(val){
handleTab(val) {
this.checked = val
},
supplierInfoList() {
@ -246,7 +245,7 @@
}
})
},
getDetailInfo(){
getDetailInfo() {
let data = {
enterpriseId: this.id,
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
@ -259,33 +258,35 @@
success: res => {
console.log("enterpriseInfo", res);
this.enterpriseInfo = res.result
if(this.enterpriseInfo.enterpriseQualificationUrl){
// pc
this.enterpriseInfo.enterpriseQualificationUrl =
res.result.enterpriseQualificationUrl && res.result.enterpriseQualificationUrl.split(',').length > 1 ?
res.result.enterpriseQualificationUrl.split(',').map(item => {
return {
name: item.split('*')[0],
url: that.url_config+'image/'+ item.split('*')[1],
}
}) : res.result.enterpriseQualificationUrl.indexOf('http://') >= 0 ? res.result.enterpriseQualificationUrl :
url_config+ 'image/' + res.result.enterpriseQualificationUrl;
console.log(this.enterpriseInfo.enterpriseQualificationUrl)
if (this.enterpriseInfo.enterpriseQualificationUrl) {
// pc
this.enterpriseInfo.enterpriseQualificationUrl =
res.result.enterpriseQualificationUrl && res.result.enterpriseQualificationUrl
.split(',').length > 1 ?
res.result.enterpriseQualificationUrl.split(',').map(item => {
return {
name: item.split('*')[0],
url: that.url_config + 'image/' + item.split('*')[1],
}
}) : res.result.enterpriseQualificationUrl.indexOf('http://') >= 0 ? res.result
.enterpriseQualificationUrl :
url_config + 'image/' + res.result.enterpriseQualificationUrl;
console.log(this.enterpriseInfo.enterpriseQualificationUrl)
}
//apppc
// if(this.enterpriseInfo.enterpriseQualificationUrl){
// this.enterpriseInfo.enterpriseQualificationUrl = this.enterpriseInfo.enterpriseQualificationUrl.split('*')[1]
// }
this.conProjectInfo = res.result.projectEnterprise
}
})
},
//
previewImage(url) {
console.log('url',url);
console.log('url', url);
uni.previewImage({
urls: [url]
})
@ -295,27 +296,38 @@
</script>
<style lang="scss" scoped>
.conProjectItem {
border: 2rpx solid #EBECF0;
border-radius: 20rpx;
padding: 20rpx;
margin-top: 20rpx;
}
.barBox {
// background-color: #5181F6;
background-color: #f6f6f6;
min-height: 100%;
height: 44px;
.fixedheader {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
.headerName {
z-index: 1;
}
}
}
.tabBox{
.tabBox {
width: 100%;
height: 44px;
display: flex;
.enterprise-tab{
.enterprise-tab {
width: 50%;
height: 100%;
border: 1rpx solid #e5e5e5;
@ -324,7 +336,8 @@
line-height: 44px;
text-align: center;
}
.project-tab{
.project-tab {
width: 50%;
height: 100%;
border: 1rpx solid #e5e5e5;
@ -333,32 +346,38 @@
line-height: 44px;
text-align: center;
}
.active-tab{
.active-tab {
background-color: #2b8df3;
color: #fff;
}
}
.scrollBox{
.scrollBox {
height: 100%;
width: calc(100% - 20px);
// background-color: darkred;
margin: 0 10px;
word-break: break-all;
.property-item{
.property-item {
// line-height: 25px;
margin-bottom: 15px;
.item-top{
.item-top {
color: #878787;
}
.item-bottom{
.item-bottom {
margin-top: 5px;
width: auto;
height: auto;
.icon-image{
.icon-image {
width: 50px;
height: 50px;
}
}
}
}
</style>
</style>