<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="HandheldFriendly" content="true" />
|
<meta name="MobileOptimized" content="320" />
|
<title>新凯迪制造云平台</title>
|
|
<!-- 引入样式文件 -->
|
<link rel="stylesheet" href="../../css/vant.css" />
|
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
<script src="../../js/vue.min.js"></script>
|
<script src="../../js/vant.min.js"></script>
|
|
<script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script>
|
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
<script type="text/javascript" src="../../js/http.js"></script>
|
|
<script type="text/javascript" src="../../js/global.js"></script>
|
<link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
|
|
</head>
|
<body>
|
<div id="app">
|
|
<div class="body">
|
|
<van-sticky>
|
<van-nav-bar title="消息列表" @click-right="onClickRight" left-arrow @click-left="onClickleft">
|
<template #right>
|
<van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
|
trigger="click" :actions="actions" @select="onSelect">
|
<template #reference>
|
<van-icon name="bars" size='20' color='#fff' />
|
</template>
|
</van-popover>
|
</template>
|
</van-nav-bar>
|
</van-sticky>
|
|
|
|
<div v-if="messageArr.length===0">
|
<div class="sacnBody">
|
<div class="box">
|
<div class="boxImg"></div>
|
</div>
|
<div class="scanText">暂无消息</div>
|
</div>
|
</div>
|
<div v-else class="head">
|
<div class="head_block">
|
<div class="head_left">
|
<div class="head_bar"></div>
|
<div class="head_title">
|
消息列表
|
</div>
|
</div>
|
</div>
|
|
<van-steps :active='messageArr.length' direction="vertical" center active-color='red'
|
style="margin-left: 5px;">
|
<van-step v-for='(item,index) in messageArr'>
|
<div slot="finish-icon">
|
<div class="messageIndex">{{index+1}}</div>
|
</div>
|
<div style="margin-left: 5px;">工位名称:{{item.eqp_name}}</div>
|
<div style="margin-left: 5px;">生产车间:{{item.wkshp_name}}</div>
|
<div style="margin-left: 5px;">呼叫类型:{{item.typename}}</div>
|
<div style="margin-left: 5px;">发起人员:{{item.start_user}}</div>
|
<div style="margin-left: 5px;">发起时间:{{item.start_date}}</div>
|
</van-step>
|
</van-steps>
|
</div>
|
|
|
</div>
|
|
|
<van-overlay :show="overlayShow" @click="overlayShow=false" />
|
|
|
</div>
|
</body>
|
<script>
|
var app = new Vue({
|
el: '#app',
|
data: function() {
|
return {
|
overlayShow: false,
|
showPopover: false,
|
actions: [
|
// {
|
// icon: 'description',
|
// text: '操作指导'
|
// }, {
|
// icon: 'award-o',
|
// text: '成品追溯'
|
// },
|
{
|
icon: 'revoke',
|
text: '退出登录'
|
},
|
],
|
messageArr: []
|
|
|
}
|
},
|
created() {
|
|
},
|
mounted() {
|
this.getLoginAppAnDonMessage()
|
},
|
methods: {
|
async getLoginAppAnDonMessage() {
|
const data = {
|
userid: localStorage.getItem('userid'),
|
usercode: localStorage.getItem('usercode'),
|
username: localStorage.getItem('username'),
|
usertype: localStorage.getItem('usertype'),
|
}
|
|
const res = await post('Login/LoginAppAnDonMessage' + formatParams(data))
|
this.messageArr = res.data
|
},
|
onClickleft() {
|
history.back()
|
},
|
onClickRight() {
|
this.overlayShow = true
|
},
|
onSelect(action) {
|
if (action.text === '操作指导') {
|
topPopoverClick('操作指导')
|
} else if (action.text === '成品追溯') {
|
topPopoverClick('成品追溯')
|
} else if (action.text === '退出登录') {
|
topPopoverClick('退出登录')
|
}
|
this.overlayShow = false
|
},
|
}
|
})
|
</script>
|
<style type="text/css">
|
@import url('../../css/global.css');
|
|
.messageIndex {
|
color: red;
|
width: 20px;
|
height: 20px;
|
border-radius: 50%;
|
background-color: #fff;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border: 1px solid red;
|
}
|
</style>
|
</html>
|