pad-app/pages/shipWork/documentList.vue

211 lines
4.4 KiB
Vue

<template>
<view class="documentList">
<view class="container">
<view class="workBox">
<view class="title">
<image src="../../static/images/shipWork/zydz.png" mode=""></image>
<text>作业单证</text>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)">
<image :src="item.imgUrl" mode=""></image>
<p>{{item.name}}</p>
<view class="uploadStatus" v-if="!item.status">
<text>未上传</text>
</view>
</view>
</view>
</view>
<view class="workBox">
<view class="title">
<image src="../../static/images/shipWork/qtzy.png" mode=""></image>
<text>其他作业</text>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)">
<image :src="item.imgUrl" mode=""></image>
<p>{{item.name}}</p>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import sqlite from "../../common/sqlite.js"
export default {
data() {
return {
infoList: [{
name: "杂项作业单",
url: "mixWork",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
},
{
name: "系解缆",
url: "untieCord",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
},
{
name: "供给",
url: "supply",
imgUrl: "../../static/images/shipWork/gj.png",
status: true,
},
{
name: "指导员作业布置",
url: "workAssign",
imgUrl: "../../static/images/shipWork/zybz.png",
status: true,
},
{
name: "船舶装卸通知单",
url: "notice",
imgUrl: "../../static/images/shipWork/tzd.png",
status: true,
},
{
name: "质量意见征询",
url: "opinion",
imgUrl: "../../static/images/shipWork/zlyj.png",
status: true,
},
{
name: "异常情况",
url: "abnormal",
imgUrl: "../../static/images/shipWork/yczk.png",
status: true,
},
{
name: "MAFI清单",
url: "mafi",
imgUrl: "../../static/images/shipWork/mafiqd.png",
status: true,
}
],
otherListh: [{
name: "安全巡检",
url: "patrol",
imgUrl: "../../static/images/shipWork/aqxj.png"
},
{
name: "船舶资料",
url: "shipInfo",
imgUrl: "../../static/images/shipWork/cbzl.png"
},
{
name: "船舶计划",
url: "shipPlan",
imgUrl: "../../static/images/shipWork/cbjh.png"
},
{
name: "作业查询",
url: "brandDetails",
imgUrl: "../../static/images/shipWork/zycx.png"
}
],
}
},
mounted() {
// this.executeSql1('shipOption')
},
methods: {
// 查
// executeSql1(tableName) {
// let sql = `select * from ${tableName}`
// sqlite.executeSqlCeshi(sql).then((value) => {
// // 在resolve时执行的回调函数
// console.log(value)
// }).catch((error) => {
// // 在reject时执行的回调函数
// console.error(error);
// });
// },
toGo(url) {
uni.navigateTo({
url: `/pages/shipWork/${url}`
})
},
onBackPress(event) {
uni.navigateTo({
url: '/pages/shipWork/index'
})
return true;
},
}
}
</script>
<style lang="less" scoped>
.documentList {
.container {
padding: 30px 20px;
.workBox {
background-color: #fff;
margin-bottom: 20px;
padding: 25px 16px;
}
.title {
display: flex;
image {
width: 18px;
height: 18px;
margin-top: 3px;
}
text {
margin-left: 10px;
font-size: 16px;
font-weight: bold;
}
}
.ul {
display: flex;
flex-wrap: wrap;
.li {
margin: 10px 20px;
width: 195px;
height: 70px;
line-height: 70px;
box-shadow: 1px 1px 6px 0 rgba(52, 52, 52, 0.20);
border-radius: 8px;
display: flex;
position: relative;
overflow: hidden;
image {
width: 38px;
height: 38px;
margin: 16px;
}
p {
color: #23262E;
font-size: 16px;
font-weight: bold;
}
.uploadStatus {
padding: 0 8px;
height: 20px;
line-height: 20px;
background: #FFF7EE;
border-radius: 4px;
color: #FC8300;
position: absolute;
right: 0;
top: 0;
}
}
}
}
}
</style>