fix:修改APP承包商模块中文件根据后缀名显示常见的文件、修改承包商详情中基本信息的项目信息布局

This commit is contained in:
Vce 2024-07-17 16:55:26 +08:00
parent 15436558de
commit 69b796de23
16 changed files with 90 additions and 49 deletions

View File

@ -64,54 +64,56 @@
</view>
</scroll-view>
<scroll-view :scroll-y="true" class="scrollBox" :style="{height: scrollHeight + 'px'}" v-if="checked == 2">
<view class="property-item">
<view class="item-top">承包商名称</view>
<view class="item-bottom">{{conProjectInfo.cbsName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目施工区域</view>
<view class="item-bottom">{{conProjectInfo.projectBuildArea || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目经理</view>
<view class="item-bottom">{{conProjectInfo.projectManage || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目类型</view>
<view class="item-bottom">{{conProjectInfo.cbsProjectTypeName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">施工阶段</view>
<view class="item-bottom">{{conProjectInfo.constructionStageName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">经度位置</view>
<view class="item-bottom">{{conProjectInfo.longitude || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">纬度位置</view>
<view class="item-bottom">{{conProjectInfo.latitude || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目编号</view>
<view class="item-bottom">{{conProjectInfo.projectNumber || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">结构类型</view>
<view class="item-bottom">{{conProjectInfo.structureTypeName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目面积()</view>
<view class="item-bottom">{{conProjectInfo.projectAcreage ? conProjectInfo.projectAcreage + '㎡' : '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">工程状态</view>
<view class="item-bottom">{{
conProjectInfo.bulidStatus == 0 ? '未开工' :
conProjectInfo.bulidStatus == 1 ? '在建' :
conProjectInfo.bulidStatus == 2 ? '停工' :
conProjectInfo.bulidStatus == 3 ? '竣备' : '--'
}}</view>
<view class="project-list-item">
<view class="property-item">
<view class="item-top">承包商名称</view>
<view class="item-bottom">{{conProjectInfo.cbsName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目施工区域</view>
<view class="item-bottom">{{conProjectInfo.projectBuildArea || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目经理</view>
<view class="item-bottom">{{conProjectInfo.projectManage || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目类型</view>
<view class="item-bottom">{{conProjectInfo.cbsProjectTypeName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">施工阶段</view>
<view class="item-bottom">{{conProjectInfo.constructionStageName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">经度位置</view>
<view class="item-bottom">{{conProjectInfo.longitude || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">纬度位置</view>
<view class="item-bottom">{{conProjectInfo.latitude || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目编号</view>
<view class="item-bottom">{{conProjectInfo.projectNumber || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">结构类型</view>
<view class="item-bottom">{{conProjectInfo.structureTypeName || '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">项目面积()</view>
<view class="item-bottom">{{conProjectInfo.projectAcreage ? conProjectInfo.projectAcreage + '㎡' : '--'}}</view>
</view>
<view class="property-item">
<view class="item-top">工程状态</view>
<view class="item-bottom">{{
conProjectInfo.bulidStatus == 0 ? '未开工' :
conProjectInfo.bulidStatus == 1 ? '在建' :
conProjectInfo.bulidStatus == 2 ? '停工' :
conProjectInfo.bulidStatus == 3 ? '竣备' : '--'
}}</view>
</view>
</view>
</scroll-view>
</view>
@ -288,5 +290,31 @@
}
}
}
.project-list-item{
width: auto;
height: auto;
margin-top: 10px;
border: 1px solid #ebecf0;
border-radius: 10px;
.property-item{
margin: 15px 15px;
// margin-bottom: 15px;
.item-top{
color: #878787;
}
.item-bottom{
margin-top: 5px;
width: auto;
height: auto;
.icon-image{
width: 50px;
height: 50px;
}
}
}
}
.project-list-item:last-child{
margin-bottom: 10px;
}
}
</style>

View File

@ -21,7 +21,8 @@
<view class="itemBox">
<view class="file-info">
<image :src="item.logoUrl" class="icon-image" v-if="fileTypeCondition(item.logoUrl)"></image>
<image v-else src="/static/documentIcon/JPG.png" class="icon-image"></image>
<!-- <image v-else-if="getFileSuffix(item.logoUrl) == 'zip'" :src="'/static/documentIcon/ZIP.png'" class="icon-image"></image> -->
<image v-else :src="getFileSuffix(item.logoUrl)" class="icon-image"></image>
<view class="info">
<view class="info-inner">{{item.fileName}}</view>
<view class="info-inner">{{item.createTime}}</view>
@ -55,6 +56,7 @@
barBoxHeight: '',
scrollHeight:'',
listData: [],
};
},
onReady() {
@ -76,6 +78,17 @@
//
return imageExtensions.includes(extension);
},
getFileSuffix(fileName){
let suffixName = fileName.split('.').pop().toLowerCase()
if(suffixName == 'pdf') return '/static/documentIcon/pdf.png'
if(suffixName == 'ppt' || suffixName == 'pptx') return '/static/documentIcon/ppt.png'
if(suffixName == 'rar' || suffixName == 'zip') return '/static/documentIcon/rar.png'
if(suffixName == 'txt') return '/static/documentIcon/txt.png'
if(suffixName == 'mp4') return '/static/documentIcon/video.png'
if(suffixName == 'doc' || suffixName == 'docx') return '/static/documentIcon/word.png'
return '/static/documentIcon/null.png'
// return fileName.split('.').pop();
},
async getHeight() {
const query = uni.createSelectorQuery().in(this);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/documentIcon/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/documentIcon/mp3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB