Commit b582466d authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 2171ff1e 9600a798
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
this.messageList = this.messages.filter((u) => { this.messageList = this.messages.filter((u) => {
return true; return true;
}); });
console.log("message", this.messageList); // console.log("message", this.messageList);
}, },
handleClear(tab) { handleClear(tab) {
......
<template> <template>
<Card class="todolist-u"> <Card class="todolist-u">
<p class="row_head"> <p class="row_head">
<Icon type="ios-chatbubbles" class="f20" /> <Icon type="ios-chatbubbles" class="f20" />
<Badge :count="3" :offset="[9,-5]"> <Badge :count="unreadMessage" :offset="[9,-5]">
<span class="ml10">未读消息</span> <span class="ml10">未读消息</span>
</Badge> </Badge>
<a href class="row_more fr">更多</a> <a href class="row_more fr" @click="link">更多</a>
</p> </p>
<div class="msg"> <div class="msg">
<Row v-for="(item,index) in listTask" :key="index" class="row-text"> <Row v-for="(item,index) in messageList" :key="index" class="row-text">
<Col :span="2"> <Col :span="1">{{index+1}}</Col>
<div></div> <Col :span="8">
</Col> <Icon :type="item.icon||'md-mail'" :style="{color:item.color||'#2680eb'}" />
<Col :span="6">{{index+1}}&nbsp&nbsp {{item.creator}}</Col> &nbsp;
<Col :span="9">
{{item.title}} {{item.title}}
<Icon type="md-link" />
</Col> </Col>
<Col :span="7">{{item.creationTime}}</Col> <Col :span="7" class="sender">
<User :value="item.senderId" />
</Col>
<Col :span="8" class="sender-time">{{item.creationTime}}</Col>
</Row> </Row>
</div> </div>
</Card> </Card>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../api";
import { mapState } from "vuex";
export default { export default {
name: "UnreadMessage", name: "UnreadMessage",
data() { data() {
return { return {
imgUrl: iconImg, imgUrl: iconImg,
listTask: [], // listTask: [],
messageList: [],
}; };
}, },
async fetch({ store, params }) {
await store.dispatch("loadMessages"); // 加载数据字典
},
mounted() { mounted() {
this.getInfo(); // this.getInfo();
this.load();
setInterval(this.load, 90 * 1000);
}, },
methods: { computed: {
link() { ...mapState({ messages: "messages" }),
console.log("路径"); unreadMessage() {
let unread = 0;
this.messageList.forEach((item) => {
if (item.status != 1) unread++;
});
return unread;
}, },
getInfo() { },
let conditions = []; methods: {
Api.list({ conditions: conditions }).then((r) => { load() {
this.listTask = r.result; this.$store.dispatch("loadMessages");
this.messageList = this.messages.filter((u) => {
return true;
}); });
// console.log("message55", this.messageList);
},
link() {
this.$router.push("/home/msgRecord");
}, },
// getInfo() {
// let conditions = [];
// Api.list({ conditions: conditions }).then((r) => {
// this.listTask = r.result;
// });
// },
}, },
}; };
</script> </script>
...@@ -73,6 +97,16 @@ export default { ...@@ -73,6 +97,16 @@ export default {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
.sender {
text-align: center;
}
.sender-time {
text-align: right;
padding-right: 15px;
}
// .ivu-icon {
// color: #2680eb;
// }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -13,7 +13,13 @@ ...@@ -13,7 +13,13 @@
</p> </p>
</div> </div>
<div class="incon-carousel"> <div class="incon-carousel">
<Icon type="ios-arrow-back" class="bg-b" @click="clickLeft" :class="num1<0?'bg-b1':'bg-b'" /> <Icon
type="ios-arrow-back"
class="bg-b"
@click="clickLeft"
:class="num1<0?'bg-b1':'bg-b'"
v-if="collect.length>0"
/>
<div class="list-shoucang" :style="{'margin-left': num1 * 230 + 'px',width :'990px',}"> <div class="list-shoucang" :style="{'margin-left': num1 * 230 + 'px',width :'990px',}">
<div class="bg" v-for="(item,i) in collect" :key="i" @click="toPage(item)"> <div class="bg" v-for="(item,i) in collect" :key="i" @click="toPage(item)">
<Icon :type="item.icon||'md-mail'" /> <Icon :type="item.icon||'md-mail'" />
...@@ -25,9 +31,10 @@ ...@@ -25,9 +31,10 @@
class="bg-l" class="bg-l"
@click="clickRight" @click="clickRight"
:class="collect.length>8 && showIcon ?'bg-l1':'bg-l'" :class="collect.length>8 && showIcon ?'bg-l1':'bg-l'"
v-if="collect.length>0"
/> />
<a class="down-delete" @click="setDelete"> <a class="down-delete" @click="setDelete">
<Icon type="md-settings" class="f20" /> <Icon type="md-settings" class="f20" v-if="collect.length>0" />
</a> </a>
</div> </div>
</div> </div>
......
...@@ -193,6 +193,7 @@ export default { ...@@ -193,6 +193,7 @@ export default {
row.productingPreparationPeople; row.productingPreparationPeople;
this.child.orderIds = row.id; this.child.orderIds = row.id;
this.child.count = row.quantity; this.child.count = row.quantity;
this.child.mesCode = row.mesCode;
this.title = "工艺列表"; this.title = "工艺列表";
this.detail = () => import("./set"); this.detail = () => import("./set");
this.modal = true; this.modal = true;
......
...@@ -47,6 +47,7 @@ export default { ...@@ -47,6 +47,7 @@ export default {
curId: Number, curId: Number,
productingPreparationPeople: Number, productingPreparationPeople: Number,
orderIds: Number, orderIds: Number,
mesCode: String,
}, },
}, },
data() { data() {
...@@ -274,6 +275,7 @@ export default { ...@@ -274,6 +275,7 @@ export default {
productingPreparationPeople: this.eid.productingPreparationPeople, productingPreparationPeople: this.eid.productingPreparationPeople,
orderIds: this.eid.orderIds, orderIds: this.eid.orderIds,
routingList: this.routingList, routingList: this.routingList,
orderCodes: this.eid.mesCode,
}; };
Api.routingset(data).then((r) => { Api.routingset(data).then((r) => {
if (r.success) { if (r.success) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment