pad-app/pages/shipWork/documentList.vue

145 lines
2.5 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>
2023-07-18 17:37:15 +08:00
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)">
2023-07-11 15:28:40 +08:00
<view class="round"></view>
2023-07-12 17:46:47 +08:00
<p>{{item.name}}</p]>
2023-07-18 17:37:15 +08:00
</view>
</view>
2023-07-11 15:28:40 +08:00
<p class="title">其他作业</p>
2023-07-18 17:37:15 +08:00
<view class="ul">
<view class="li" v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)">
2023-07-11 15:28:40 +08:00
<view class="round"></view>
2023-07-12 17:46:47 +08:00
<p>{{item.name}}</p>
2023-07-18 17:37:15 +08:00
</view>
</view>
2023-07-11 15:28:40 +08:00
</view>
</view>
</template>
<script>
2023-08-03 15:36:23 +08:00
import sqlite from "../../common/sqlite.js"
2023-07-11 15:28:40 +08:00
export default {
data() {
return {
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
},
{
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-18 17:37:15 +08:00
mounted() {
2023-08-03 15:36:23 +08:00
this.executeSql1('shipOption')
2023-07-17 17:10:05 +08:00
},
2023-07-11 15:28:40 +08:00
methods: {
2023-08-03 15:36:23 +08:00
// 查
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// 在resolve时执行的回调函数
console.log(value)
}).catch((error) => {
// 在reject时执行的回调函数
console.error(error);
});
},
2023-07-11 15:28:40 +08:00
toGo(url) {
uni.navigateTo({
2023-07-18 17:37:15 +08:00
url: `/pages/shipWork/${url}`
2023-07-11 15:28:40 +08:00
})
2023-07-18 17:37:15 +08:00
},
2023-08-01 09:32:45 +08:00
onBackPress(event) {
uni.navigateTo({
url: '/pages/shipWork/index'
})
return true;
},
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;
}
2023-07-18 17:37:15 +08:00
.ul {
2023-07-11 15:28:40 +08:00
display: flex;
flex-wrap: wrap;
padding: 20px;
margin-bottom: 20px;
2023-07-18 17:37:15 +08:00
.li {
2023-07-11 15:28:40 +08:00
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>