Commit 30bdd2ea authored by 周远喜's avatar 周远喜

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

parents 44e56964 abbc0ce0
...@@ -8,9 +8,18 @@ export default { ...@@ -8,9 +8,18 @@ export default {
return Api.post(`${workflowUrl}/instance/getpaged`, params); return Api.post(`${workflowUrl}/instance/getpaged`, params);
}, },
planorderstatuscount(params) { planorderstatuscount(params) {
return Api.post(`${PlanUrl}/mesplan/planorderstatuscount`, params); return Api.post(`${PlanUrl}/mesplan/planorderstatuscount`, params);//年度计划各产品类型总数量和各状态数量
}, },
orderstatuscount(params) { orderstatuscount(params) {
return Api.post(`${PlanUrl}/mesorders/orderstatuscount`, params); //订单各车间下各状态的数量 return Api.post(`${PlanUrl}/mesorders/orderstatuscount`, params); //订单各车间下各状态的数量
}, },
// waitdistributecount(params) {
// return Api.post(`${PlanUrl}/mesplan/waitdistributecount`, params); //待派发订单数量
// },
// getwaitdocount(params) {
// return Api.get(`${PlanUrl}/orderquotation/getwaitdocount`, params); //获取待报价的代办数量
// },
list(params) {
return Api.post(`${systemUrl}/newmessage/list`, params); //获取列表信息
},
} }
\ No newline at end of file
...@@ -68,10 +68,10 @@ export default { ...@@ -68,10 +68,10 @@ export default {
statistics() { statistics() {
let conditions = [ let conditions = [
{ {
fieldName: "status", fieldName: "status",
fieldValue: "1", fieldValue: "1",
conditionalType: "Equal" conditionalType: "Equal",
} },
]; ];
let data = { let data = {
conditions: conditions, conditions: conditions,
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
this.braking = { this.braking = {
xAxis: { xAxis: {
// type: "category", // type: "category",
data: ['计划数量',], data: ["计划数量", "已完成", "执行中", "暂停中", "未开工"],
axisTick: { axisTick: {
show: false, show: false,
}, },
...@@ -138,7 +138,8 @@ export default { ...@@ -138,7 +138,8 @@ export default {
{ {
data: [ data: [
{ {
value: allTotal, // name:'计划数量',
value: 331,
itemStyle: { itemStyle: {
normal: { normal: {
color: "#2680EB", color: "#2680EB",
...@@ -147,7 +148,7 @@ export default { ...@@ -147,7 +148,7 @@ export default {
}, },
}, },
{ {
value: listData[0].count, value: 112,
itemStyle: { itemStyle: {
normal: { normal: {
color: "#0DD78D", color: "#0DD78D",
...@@ -156,7 +157,7 @@ export default { ...@@ -156,7 +157,7 @@ export default {
}, },
}, },
{ {
value: listData[1].count, value: 112,
itemStyle: { itemStyle: {
normal: { normal: {
color: "#FFA000", color: "#FFA000",
...@@ -165,7 +166,7 @@ export default { ...@@ -165,7 +166,7 @@ export default {
}, },
}, },
{ {
value: listData[2].count, value: 152,
itemStyle: { itemStyle: {
normal: { normal: {
color: "#FE7777", color: "#FE7777",
...@@ -173,6 +174,15 @@ export default { ...@@ -173,6 +174,15 @@ export default {
}, },
}, },
}, },
{
value: 24,
itemStyle: {
normal: {
color: "#515A6E",
barBorderRadius: [30, 30, 0, 0],
},
},
},
], ],
type: "bar", type: "bar",
barWidth: 10, //柱图宽度 barWidth: 10, //柱图宽度
...@@ -190,12 +200,11 @@ export default { ...@@ -190,12 +200,11 @@ export default {
Api.orderstatuscount(data).then((r) => { Api.orderstatuscount(data).then((r) => {
let listData = []; let listData = [];
let name = []; let name = [];
let allTotal=[] let allTotal = [];
listData = r.result; listData = r.result;
r.result.map((e) => { r.result.map((e) => {
name.push(e.name); name.push(e.name);
allTotal.push(e.allTotal) allTotal.push(e.allTotal);
}); });
this.braking1 = { this.braking1 = {
...@@ -268,7 +277,7 @@ export default { ...@@ -268,7 +277,7 @@ export default {
type: "bar", type: "bar",
barWidth: 20, //柱图宽度 barWidth: 20, //柱图宽度
barGap: "100%", //柱图间距 barGap: "100%", //柱图间距
data:allTotal, data: allTotal,
}, },
{ {
name: "已完成", name: "已完成",
......
...@@ -14,61 +14,40 @@ ...@@ -14,61 +14,40 @@
<Col :span="2"> <Col :span="2">
<div></div> <div></div>
</Col> </Col>
<Col :span="6">{{index+1}}&nbsp&nbsp {{item.name}}</Col> <Col :span="6">{{index+1}}&nbsp&nbsp {{item.creator}}</Col>
<Col :span="8"> <Col :span="9">
{{item.data}} {{item.title}}
<Icon type="md-link" /> <Icon type="md-link" />
</Col> </Col>
<Col :span="8">{{item.Date}}</Col> <Col :span="7">{{item.creationTime}}</Col>
</Row> </Row>
</div> </div>
</Card> </Card>
</template> </template>
<script> <script>
import Api from "../api";
export default { export default {
name: "UnreadMessage", name: "UnreadMessage",
data() { data() {
return { return {
imgUrl: iconImg, imgUrl: iconImg,
listTask: [ listTask: [],
{
name: "张飞",
data: "生产订单缺料",
Date: "2020-03-12 11.30"
},
{
name: "张飞",
data: "送审订单待审批",
Date: "2020-03-12 11.30"
},
{
name: "张飞",
data: "排产未完成",
Date: "2020-03-12 11.30"
},
{
name: "张飞",
data: "物料补料中",
Date: "2020-03-12 11.30"
},
{
name: "张飞",
data: "物料补料中",
Date: "2020-03-12 11.30"
},
{
name: "张飞",
data: "物料补料中",
Date: "2020-03-12 11.30"
}
]
}; };
}, },
mounted() {
this.getInfo();
},
methods: { methods: {
link() { link() {
console.log("路径"); console.log("路径");
} },
} getInfo() {
let conditions = [];
Api.list({ conditions: conditions }).then((r) => {
this.listTask = r.result;
});
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<div class="home"> <div class="home">
<div class="card-user"> <div class="card-user">
<div class="img-header"> <div class="img-header">
<img src="@/assets/images/home/user.png" /> <img :src="avatorPath" width="90px" height="90px" v-if="imgPath" />
<img src="@/assets/images/home/user.png" width="90px" height="90px" v-else />
</div> </div>
<div class="user-text"> <div class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p> <p>你好:{{userData.userName}},欢迎登录MES系统!</p>
<p> <p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp <span>{{userData.departmentTitle}}</span> &nbsp &nbsp
<span>工艺技术员</span> <span>{{userData.roleTitles}}</span>
</p> </p>
</div> </div>
<div class="incon-carousel"> <div class="incon-carousel">
...@@ -79,7 +80,7 @@ ...@@ -79,7 +80,7 @@
</Col> </Col>
</Row> </Row>
<div class="table"> <div class="table">
<StaChart/> <StaChart />
</div> </div>
</div> </div>
</template> </template>
...@@ -93,28 +94,49 @@ export default { ...@@ -93,28 +94,49 @@ export default {
components: { components: {
Approval, Approval,
UnreadMessage, UnreadMessage,
StaChart StaChart,
}, },
data() { data() {
return { return {
listTask: [], listTask: [],
imgUrl: iconImg, imgUrl: iconImg,
userData: {},
avatorPath: "",
imgPath: true,
}; };
}, },
created() { created() {
this.get(); this.get();
this.getUserInfoFn();
}, },
methods: { methods: {
getUserInfoFn() {
let userId = this.$store.state.userInfo.userId;
Api.getUserInfo({ id: userId }).then((res) => {
if (res.success) {
this.userData = res.result;
if (res.result) {
this.avatorPath = fileUrlDown + res.result.avatarUrl;
this.imgPath = true;
} else {
this.avatorPath = "";
this.imgPath = false;
}
} else {
this.$Message.error("查询失败!");
}
});
},
get() { get() {
let list = []; let list = [];
let url = `${systemUrl}/backlog/get`; let url = `${systemUrl}/backlog/get`;
this.$api.get(url).then(r => { this.$api.get(url).then((r) => {
list = r.result; list = r.result;
list.forEach(data => { list.forEach((data) => {
// console.log(data.totalUrl) // console.log(data.totalUrl)
let ulrt = `http://${address}:` + data.totalUrl; let ulrt = `http://${address}:` + data.totalUrl;
data.totalUrl = 0; data.totalUrl = 0;
this.$api.get(ulrt).then(r => { this.$api.get(ulrt).then((r) => {
return (data.totalUrl = r.result); return (data.totalUrl = r.result);
}); });
}); });
...@@ -125,8 +147,8 @@ export default { ...@@ -125,8 +147,8 @@ export default {
goPage(u) { goPage(u) {
// alert(u.menuUrl) // alert(u.menuUrl)
this.$router.push(u.menuUrl); this.$router.push(u.menuUrl);
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -142,13 +164,13 @@ export default { ...@@ -142,13 +164,13 @@ export default {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.16); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.16);
border-radius: 8px; border-radius: 8px;
.img-header { .img-header {
margin-top: -8px; margin-top: -10px;
float: left; float: left;
} }
.user-text { .user-text {
float: left; float: left;
p { p {
margin: 10px; margin: 10px 20px;
} }
} }
.incon-carousel { .incon-carousel {
......
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