pad-app/pages/index/index.vue

169 lines
3.5 KiB
Vue
Raw Normal View History

2023-07-03 17:49:29 +08:00
<template>
<view class="app">
<head-info></head-info>
<view class="container">
2023-07-05 10:56:11 +08:00
<side-bar path='1'></side-bar>
2023-07-03 17:49:29 +08:00
<view class="content">
<view class="form">
2023-07-06 17:08:59 +08:00
<view class="end">
2023-07-13 16:46:06 +08:00
<lm-combox label="所属项目" @setId=setId :candidatesMap="projectsMap" placeholder="请选择所属项目"
v-model="project"></lm-combox>
2023-07-06 17:08:59 +08:00
<uni-easyinput class="input" suffixIcon="search" v-model="value1" placeholder="港区"
@iconClick="iconClick">
</uni-easyinput>
<uni-easyinput class="input" suffixIcon="search" v-model="value2" placeholder="船名/航次"
@iconClick="iconClick">
</uni-easyinput>
</view>
2023-07-03 17:49:29 +08:00
</view>
<view class="itemList">
2023-07-06 17:08:59 +08:00
<view v-for="(item, index) in ltemList" :key="index" class="item" @click="toDetails">
<view class="title">
<view class="name">
海王星领袖
</view>
<view class="status">
<text v-if="item==1" class="green"> </text>
<text v-else> </text>
</view>
</view>
<view class="table">
<view class="row">
<view class="nitem">
航次: <text>735546</text>
</view>
<view class="nitem">
贸易类型: <text>内贸</text>
</view>
</view>
<view class="row">
<view class="nitem">
进出口: <text>进口</text>
2023-07-05 10:56:11 +08:00
</view>
2023-07-06 17:08:59 +08:00
<view class="nitem">
泊位: <text>一泊位</text>
</view>
</view>
</view>
2023-07-03 17:49:29 +08:00
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info';
export default {
data() {
return {
2023-07-06 17:08:59 +08:00
value1: '',
value2: '',
ltemList: [1, 1, 1, 1, 2, 1, 1, 1, 1],
2023-07-13 16:46:06 +08:00
projectsMap: {}, //项目集合map
projectId: '', //选中的项目id(通过子组件调用setId给父组件传值的方式获取)
2023-07-03 17:49:29 +08:00
}
},
onLoad() {
},
components: {
SideBar,
HeadInfo
},
methods: {
2023-07-06 17:08:59 +08:00
toDetails() {
uni.navigateTo({
url: '/pages/index/instruct'
})
2023-07-13 16:46:06 +08:00
},
setId(e) {
this.projectId = e; //将子组件通过setId传值给父组件的projectId
console.log("本次选中的项目id是" + e)
},
2023-07-03 17:49:29 +08:00
}
};
</script>
<style>
.container {
display: flex;
}
.content {
flex: 1;
padding: 20px;
.form {
display: flex;
justify-content: flex-end;
2023-07-06 17:08:59 +08:00
.end {
width: 500px;
display: flex;
justify-content: space-between;
.input {
width: 200px;
height: 35px;
line-height: 35px;
padding-left: 10px;
margin-left: 15px;
}
2023-07-03 17:49:29 +08:00
}
2023-07-06 17:08:59 +08:00
2023-07-03 17:49:29 +08:00
}
.itemList {
width: 100%;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
2023-07-06 17:08:59 +08:00
2023-07-03 17:49:29 +08:00
.item {
width: 32%;
margin-top: 15px;
margin-right: 2%;
2023-07-05 10:56:11 +08:00
height: 160px;
2023-07-03 17:49:29 +08:00
border: 1px solid #c9cacb;
2023-07-05 10:56:11 +08:00
padding: 22px 15px;
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.title {
display: flex;
justify-content: space-between;
font-size: 21px;
margin-bottom: 20px;
font-weight: 700;
}
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.status {
font-size: 16px;
font-weight: 400;
}
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.row {
display: flex;
justify-content: space-between;
font-size: 18px;
margin: 10px 0;
2023-07-06 17:08:59 +08:00
.nitem {
width: 46%;
text {
color: #929292;
}
2023-07-05 10:56:11 +08:00
}
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
}
2023-07-03 17:49:29 +08:00
}
2023-07-06 17:08:59 +08:00
2023-07-03 17:49:29 +08:00
.item:nth-child(3n) {
margin-right: 0;
}
}
}
2023-07-13 16:46:06 +08:00
</style>