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 {
return Api.post(`${workflowUrl}/instance/getpaged`, params);
},
planorderstatuscount(params) {
return Api.post(`${PlanUrl}/mesplan/planorderstatuscount`, params);
return Api.post(`${PlanUrl}/mesplan/planorderstatuscount`, params);//年度计划各产品类型总数量和各状态数量
},
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
......@@ -70,8 +70,8 @@ export default {
{
fieldName: "status",
fieldValue: "1",
conditionalType: "Equal"
}
conditionalType: "Equal",
},
];
let data = {
conditions: conditions,
......@@ -88,7 +88,7 @@ export default {
this.braking = {
xAxis: {
// type: "category",
data: ['计划数量',],
data: ["计划数量", "已完成", "执行中", "暂停中", "未开工"],
axisTick: {
show: false,
},
......@@ -138,7 +138,8 @@ export default {
{
data: [
{
value: allTotal,
// name:'计划数量',
value: 331,
itemStyle: {
normal: {
color: "#2680EB",
......@@ -147,7 +148,7 @@ export default {
},
},
{
value: listData[0].count,
value: 112,
itemStyle: {
normal: {
color: "#0DD78D",
......@@ -156,7 +157,7 @@ export default {
},
},
{
value: listData[1].count,
value: 112,
itemStyle: {
normal: {
color: "#FFA000",
......@@ -165,7 +166,7 @@ export default {
},
},
{
value: listData[2].count,
value: 152,
itemStyle: {
normal: {
color: "#FE7777",
......@@ -173,6 +174,15 @@ export default {
},
},
},
{
value: 24,
itemStyle: {
normal: {
color: "#515A6E",
barBorderRadius: [30, 30, 0, 0],
},
},
},
],
type: "bar",
barWidth: 10, //柱图宽度
......@@ -190,12 +200,11 @@ export default {
Api.orderstatuscount(data).then((r) => {
let listData = [];
let name = [];
let allTotal=[]
let allTotal = [];
listData = r.result;
r.result.map((e) => {
name.push(e.name);
allTotal.push(e.allTotal)
allTotal.push(e.allTotal);
});
this.braking1 = {
......@@ -268,7 +277,7 @@ export default {
type: "bar",
barWidth: 20, //柱图宽度
barGap: "100%", //柱图间距
data:allTotal,
data: allTotal,
},
{
name: "已完成",
......
......@@ -14,61 +14,40 @@
<Col :span="2">
<div></div>
</Col>
<Col :span="6">{{index+1}}&nbsp&nbsp {{item.name}}</Col>
<Col :span="8">
{{item.data}}
<Col :span="6">{{index+1}}&nbsp&nbsp {{item.creator}}</Col>
<Col :span="9">
{{item.title}}
<Icon type="md-link" />
</Col>
<Col :span="8">{{item.Date}}</Col>
<Col :span="7">{{item.creationTime}}</Col>
</Row>
</div>
</Card>
</template>
<script>
import Api from "../api";
export default {
name: "UnreadMessage",
data() {
return {
imgUrl: iconImg,
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"
}
]
listTask: [],
};
},
mounted() {
this.getInfo();
},
methods: {
link() {
console.log("路径");
}
}
},
getInfo() {
let conditions = [];
Api.list({ conditions: conditions }).then((r) => {
this.listTask = r.result;
});
},
},
};
</script>
<style lang="less" scoped>
......
......@@ -2,13 +2,14 @@
<div class="home">
<div class="card-user">
<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 class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p>
<p>你好:{{userData.userName}},欢迎登录MES系统!</p>
<p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp
<span>工艺技术员</span>
<span>{{userData.departmentTitle}}</span> &nbsp &nbsp
<span>{{userData.roleTitles}}</span>
</p>
</div>
<div class="incon-carousel">
......@@ -79,7 +80,7 @@
</Col>
</Row>
<div class="table">
<StaChart/>
<StaChart />
</div>
</div>
</template>
......@@ -93,28 +94,49 @@ export default {
components: {
Approval,
UnreadMessage,
StaChart
StaChart,
},
data() {
return {
listTask: [],
imgUrl: iconImg,
userData: {},
avatorPath: "",
imgPath: true,
};
},
created() {
this.get();
this.getUserInfoFn();
},
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() {
let list = [];
let url = `${systemUrl}/backlog/get`;
this.$api.get(url).then(r => {
this.$api.get(url).then((r) => {
list = r.result;
list.forEach(data => {
list.forEach((data) => {
// console.log(data.totalUrl)
let ulrt = `http://${address}:` + data.totalUrl;
data.totalUrl = 0;
this.$api.get(ulrt).then(r => {
this.$api.get(ulrt).then((r) => {
return (data.totalUrl = r.result);
});
});
......@@ -125,8 +147,8 @@ export default {
goPage(u) {
// alert(u.menuUrl)
this.$router.push(u.menuUrl);
}
}
},
},
};
</script>
<style lang="less" scoped>
......@@ -142,13 +164,13 @@ export default {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.16);
border-radius: 8px;
.img-header {
margin-top: -8px;
margin-top: -10px;
float: left;
}
.user-text {
float: left;
p {
margin: 10px;
margin: 10px 20px;
}
}
.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