pad-app/pages/shipWork/documentList.vue

138 lines
2.4 KiB
Vue
Raw Normal View History

2023-07-11 15:28:40 +08:00
<template>
<view class="documentList">
<view class="container">
<p class="title">作业单证</p>
<ul>
<li v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)">
<view class="round"></view>
2023-07-12 17:46:47 +08:00
<p>{{item.name}}</p]>
2023-07-11 15:28:40 +08:00
</li>
</ul>
<p class="title">其他作业</p>
<ul>
<li v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)">
<view class="round"></view>
2023-07-12 17:46:47 +08:00
<p>{{item.name}}</p>
2023-07-11 15:28:40 +08:00
</li>
</ul>
</view>
</view>
</template>
<script>
export default {
data() {
return {
2023-07-17 17:10:05 +08:00
// 当前船的信息
shipInfo: {},
2023-07-11 15:28:40 +08:00
infoList: [{
2023-07-17 17:10:05 +08:00
name: "杂项作业单",
url: "mixWork"
},
{
name: "系解缆",
url: "untieCord"
},
{
name: "供给",
url: "supply"
},
{
name: "指导员作业布置",
url: "workAssign"
},
{
name: "船舶装卸通知单",
url: "notice"
},
{
name: "质量意见征询",
url: "opinion"
},
{
name: "异常情况",
url: "abnormal"
},
{
name: "MAFI清单",
url: "mafi"
}
],
2023-07-11 15:28:40 +08:00
otherListh: [{
name: "安全巡检",
2023-07-12 17:46:47 +08:00
url: "patrol"
2023-07-11 15:28:40 +08:00
},
2023-07-12 17:46:47 +08:00
// {
// name: "船舶载货量",
// url: "mixWork"
// },
2023-07-11 15:28:40 +08:00
{
name: "船舶资料",
2023-07-12 17:46:47 +08:00
url: "shipInfo"
2023-07-11 15:28:40 +08:00
},
{
name: "船舶计划",
2023-07-12 17:46:47 +08:00
url: "shipPlan"
2023-07-11 15:28:40 +08:00
},
{
name: "作业查询",
2023-07-13 11:18:17 +08:00
url: "brandDetails"
2023-07-11 15:28:40 +08:00
}
],
}
},
2023-07-17 17:10:05 +08:00
onLoad(options) {
if ('params' in options) {
// 获取传递的对象参数使用decodeURIComponent解码并转为对象
this.shipInfo = JSON.parse(decodeURIComponent(options.params))
}
console.log(this.shipInfo)
},
2023-07-11 15:28:40 +08:00
methods: {
toGo(url) {
2023-07-17 17:10:05 +08:00
const params = encodeURIComponent(JSON.stringify(this.shipInfo));
2023-07-11 15:28:40 +08:00
uni.navigateTo({
2023-07-17 17:10:05 +08:00
url: `/pages/shipWork/${url}?params=${params}`
2023-07-11 15:28:40 +08:00
})
}
}
}
</script>
<style lang="less" scoped>
.documentList {
.container {
padding: 30px 20px;
.title {
font-size: 20px;
font-weight: bold;
}
ul {
display: flex;
flex-wrap: wrap;
padding: 20px;
margin-bottom: 20px;
li {
margin: 10px 20px;
.round {
width: 80px;
height: 80px;
background: #ccc;
border-radius: 50%;
margin: 10px auto;
}
2023-07-12 17:46:47 +08:00
p {
2023-07-11 15:28:40 +08:00
text-align: center;
font-size: 16px;
margin-top: 10px;
}
}
}
}
}
</style>