258 lines
6.1 KiB
Vue
258 lines
6.1 KiB
Vue
<template>
|
||
<view class="documentList">
|
||
<head-view :title="title"></head-view>
|
||
<uni-notice-bar show-icon single :text="noticeText" />
|
||
<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 {
|
||
title: "船名:海王星领袖 / 进口航次:29089473289 / 出口航次:12083772682998376",
|
||
noticeText: "uni-app 版正式发布,开发一次,同时发布iOS、Android、H5、微信小程序、支付宝小程序、百度小程序、头条小程序等7大平台。",
|
||
infoList: [{
|
||
name: "杂项作业单",
|
||
url: "mixWork",
|
||
imgUrl: "../../static/images/shipWork/zxzyd.png",
|
||
status: false,
|
||
tableName: "messageRespList",
|
||
},
|
||
{
|
||
name: "系解缆",
|
||
url: "untieCord",
|
||
imgUrl: "../../static/images/shipWork/zxzyd.png",
|
||
status: false,
|
||
tableName: "attachUnmoorRespList",
|
||
},
|
||
{
|
||
name: "供给",
|
||
url: "supply",
|
||
imgUrl: "../../static/images/shipWork/gj.png",
|
||
status: true,
|
||
tableName: "shipmentShipSupplyRespList",
|
||
},
|
||
{
|
||
name: "指导员作业布置",
|
||
url: "workAssign",
|
||
imgUrl: "../../static/images/shipWork/zybz.png",
|
||
status: true,
|
||
tableName: "shipmentAdviserLayoutRespList",
|
||
},
|
||
{
|
||
name: "船舶装卸通知单",
|
||
url: "notice",
|
||
imgUrl: "../../static/images/shipWork/tzd.png",
|
||
status: true,
|
||
tableName: "shipmentLoadUnloadNoticeRespList",
|
||
},
|
||
{
|
||
name: "质量意见征询",
|
||
url: "opinion",
|
||
imgUrl: "../../static/images/shipWork/zlyj.png",
|
||
status: true,
|
||
tableName: "shipmentQualityConsultationRespList",
|
||
},
|
||
{
|
||
name: "异常情况",
|
||
url: "abnormal",
|
||
imgUrl: "../../static/images/shipWork/yczk.png",
|
||
status: true,
|
||
tableName: "abnormalConditionRespList",
|
||
},
|
||
{
|
||
name: "MAFI清单",
|
||
url: "mafi",
|
||
imgUrl: "../../static/images/shipWork/mafiqd.png",
|
||
status: true,
|
||
tableName: "mafiListRespList",
|
||
}
|
||
],
|
||
otherListh: [{
|
||
name: "安全巡检",
|
||
url: "patrol",
|
||
imgUrl: "../../static/images/shipWork/aqxj.png",
|
||
tableName: "safetyInspectionRespList",
|
||
},
|
||
{
|
||
name: "船舶资料",
|
||
url: "shipInfo",
|
||
imgUrl: "../../static/images/shipWork/cbzl.png",
|
||
tableName: ""
|
||
},
|
||
{
|
||
name: "船舶计划",
|
||
url: "shipPlan",
|
||
imgUrl: "../../static/images/shipWork/cbjh.png",
|
||
tableName: ""
|
||
},
|
||
{
|
||
name: "作业查询",
|
||
url: "brandDetails",
|
||
imgUrl: "../../static/images/shipWork/zycx.png",
|
||
tableName: "shipmentShipLoadPlansRespList",
|
||
}
|
||
],
|
||
tableStatusList: [],
|
||
noticeList: [],
|
||
}
|
||
},
|
||
mounted() {
|
||
this.getTableStauts()
|
||
},
|
||
methods: {
|
||
getTableStauts() {
|
||
this.infoList.forEach((v, index) => {
|
||
this.executeSql(v.tableName)
|
||
})
|
||
this.executeSql("shipInfoTable")
|
||
},
|
||
// 查
|
||
executeSql(tableName) {
|
||
let sql = `select * from ${tableName}`
|
||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||
// 在resolve时执行的回调函数
|
||
if (tableName == "shipInfoTable") {
|
||
this.title = `船名:${value[0].vslCnname} / 航次:${value[0].vvyName}`
|
||
} else {
|
||
if (value.length == 0) {
|
||
this.tableStatusList.push(tableName)
|
||
}
|
||
value.forEach(v => {
|
||
if (v.webStatus == 0) {
|
||
this.tableStatusList.push(tableName)
|
||
}
|
||
})
|
||
this.tableStatusList = Array.from(new Set(this.tableStatusList))
|
||
let meg = ""
|
||
this.infoList.forEach((v, index) => {
|
||
this.tableStatusList.forEach(item => {
|
||
if (v.tableName == item) {
|
||
v.status = false
|
||
meg += `${v.name}、`
|
||
let megs = meg.substring(0, meg.length - 1)
|
||
this.noticeText = `${megs}单证未填写`
|
||
}
|
||
})
|
||
})
|
||
}
|
||
}).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> |