Commit 3cb02a8a authored by renjintao's avatar renjintao

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

parents 8dcaad64 8adc8d73
...@@ -363,6 +363,10 @@ export default { ...@@ -363,6 +363,10 @@ export default {
}, },
shoucang() { shoucang() {
if (this.showStar) { if (this.showStar) {
this.$Modal.confirm({
title: "取消收藏",
content: "<p>您确定要取消收藏吗</p>",
onOk: () => {
let url = `${systemUrl}/favorite/delete`; let url = `${systemUrl}/favorite/delete`;
let menuId = []; let menuId = [];
menuId.push(this.menuId); menuId.push(this.menuId);
...@@ -373,6 +377,11 @@ export default { ...@@ -373,6 +377,11 @@ export default {
this.content = "收藏"; this.content = "收藏";
} }
}); });
},
onCancel: () => {
// this.$Message.info("Clicked cancel");
},
});
} else { } else {
let url = `${systemUrl}/favorite/create`; let url = `${systemUrl}/favorite/create`;
this.$api.post(url, { menuId: this.menuId }).then((r) => { this.$api.post(url, { menuId: this.menuId }).then((r) => {
......
<template> <template>
<div class="stachart" :style="setStatistics?{width:'620px',height:'300px'}:{width:'100%',height:'100%'}"> <div class="stachart">
<div :gutter="16" class="row_head" v-if="setStatistics?false:true"> <div :gutter="16" class="row_head" v-if="setStatistics?false:true">
<Icon type="ios-images" class="f20" /> <Icon type="ios-images" class="f20" />
<span class="ml10">物料相关统计</span> <span class="ml10">物料相关统计</span>
</div> </div>
<div class="echarts-map"> <div class="echarts-map">
<v-chart :options="braking" /> <v-chart :options="braking" style="width:'100%',height:'100%'" />
</div> </div>
</div> </div>
</template> </template>
......
...@@ -7,10 +7,8 @@ ...@@ -7,10 +7,8 @@
<span class="ml10">年度计划各产品类型总数量和各状态数量</span> <span class="ml10">年度计划各产品类型总数量和各状态数量</span>
</div> </div>
<div class="echarts-map"> <div class="echarts-map">
<v-chart <!-- :style="setStatistics?{width:'400px',height:'270px'}:{width:'100%',height:'100%'}" -->
:options="braking" <v-chart :options="braking" style="width:'100%',height:'100%'" />
:style="setStatistics?{width:'400px',height:'270px'}:{width:'100%',height:'100%'}"
/>
</div> </div>
</Col> </Col>
<Col :span="16" style="padding-right:20px;"> <Col :span="16" style="padding-right:20px;">
......
<template> <template>
<div <div
class="stachart" class="stachart"
:style="setStatistics?{width:'620px',height:'280px'}:{width:'100%',height:'100%'}" style="width:'100%',height:'100%'"
> >
<div class="row_head" v-if="setStatistics?false:true"> <div class="row_head" v-if="setStatistics?false:true">
<Icon type="ios-images" class="f20" /> <Icon type="ios-images" class="f20" />
......
...@@ -7,10 +7,7 @@ ...@@ -7,10 +7,7 @@
<Row :gutter="16"> <Row :gutter="16">
<Col :span="8" style="padding-right:50px;"> <Col :span="8" style="padding-right:50px;">
<div class="echarts-map"> <div class="echarts-map">
<v-chart <v-chart :options="braking" style="width:'100%',height:'100%'" />
:options="braking"
:style="setStatistics?{width:'380px',height:'280px'}:{width:'100%',height:'100%'}"
/>
</div> </div>
</Col> </Col>
<Col :span="16"> <Col :span="16">
......
<template> <template>
<div <div
class="stachart" class="stachart"
:style="setStatistics?{width:'620px',height:'280px'}:{width:'100%',height:'100%'}" style="width:'100%',height:'100%'"
> >
<div :gutter="16" class="row_head" v-if="setStatistics?false:true"> <div :gutter="16" class="row_head" v-if="setStatistics?false:true">
<Icon type="ios-images" class="f20" /> <Icon type="ios-images" class="f20" />
......
...@@ -13,25 +13,27 @@ ...@@ -13,25 +13,27 @@
</p> </p>
</div> </div>
<div class="incon-carousel"> <div class="incon-carousel">
<div class="bg-b"> <Icon type="ios-arrow-back" class="bg-b" @click="clickLeft" :class="num1<0?'bg-b1':'bg-b'" />
<Icon type="ios-arrow-back" /> <div
</div> class="list-shoucang"
:style="{'margin-left': num1 * 230 + 'px','transition': 'all .3s ease-out .1s',}"
>
<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'" />
<p>{{item.title}}</p> <p>{{item.title}}</p>
</div> </div>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div> </div>
<Icon
type="ios-arrow-forward"
class="bg-l"
@click="clickRight"
:class="collect.length>8 && showIcon ?'bg-l1':'bg-l'"
/>
</div> </div>
</div> </div>
<div class="card-list"> <div class="card-list">
<!-- <div class="bg-b"> --> <Icon type="ios-arrow-back" @click="leftmove" :class="shuliang<=5?'bg-b1':'bg-b'" />
<Icon type="ios-arrow-back" class="bg-b" /> <div class="list-c" :style="{width:'98%','margin-left': num * 740 + 'px',}">
<!-- </div> -->
<div class="list-c">
<div <div
v-for="(item,index) in listTask" v-for="(item,index) in listTask"
:key="index" :key="index"
...@@ -47,9 +49,7 @@ ...@@ -47,9 +49,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="bg-l"> --> <Icon type="ios-arrow-forward" :class="shuliang>5?'bg-l1':'bg-l'" @click="rightmove" />
<Icon type="ios-arrow-forward" class="bg-l" />
<!-- </div> -->
</div> </div>
<Row class="table" :gutter="16"> <Row class="table" :gutter="16">
<Col :span="15"> <Col :span="15">
...@@ -91,49 +91,51 @@ ...@@ -91,49 +91,51 @@
<MaterielChart /> <MaterielChart />
</Col> </Col>
</Row> </Row>
<Modal v-model="modal1" title="统计列表显示设置" width="1200" footer-hide> <Modal v-model="modal1" title="统计列表显示设置" width="900" footer-hide>
<Divider> <Divider>
<span style="color: #2680eb;"> <span style="color: #2680eb;">
生产计划状态监控 生产计划状态监控
<Icon :type="show?'md-eye':'md-eye-off'" @click="clickEye" /> <Icon :type="show?'md-eye':'md-eye-off'" @click="clickEye" />
</span> </span>
</Divider> </Divider>
<StaChart :setStatistics="setStatistics" /> <div class="set-img">
<div class="divider-t"> <img src="@/assets/images/home/user-img1.png" style="width:630px;height:165px" />
</div>
<Divider> <Divider>
<span style="color: #2680eb;"> <span style="color: #2680eb;">
不合格品审理单统计 不合格品审理单统计
<Icon :type="show1?'md-eye':'md-eye-off'" @click="clickEye1" /> <Icon :type="show1?'md-eye':'md-eye-off'" @click="clickEye1" />
</span> </span>
</Divider> </Divider>
<UnqualifiedEcharts :setStatistics="setStatistics" /> <div class="set-img">
<img src="@/assets/images/home/user-img2.png" style="width:630px;height:165px" />
</div> </div>
<div class="divider-t">
<Divider> <Divider>
<span style="color: #2680eb;"> <span style="color: #2680eb;">
班组工单监控 班组工单监控
<Icon :type="show2?'md-eye':'md-eye-off'" @click="clickEye2" /> <Icon :type="show2?'md-eye':'md-eye-off'" @click="clickEye2" />
</span> </span>
</Divider> </Divider>
<WorkChart :setStatistics="setStatistics" /> <div class="set-img">
<img src="@/assets/images/home/user-img3.png" style="width:310px;height:165px" />
</div> </div>
<div class="divider-t">
<Divider> <Divider>
<span style="color: #2680eb;"> <span style="color: #2680eb;">
暂停任务统计 暂停任务统计
<Icon :type="show3?'md-eye':'md-eye-off'" @click="clickEye3" /> <Icon :type="show3?'md-eye':'md-eye-off'" @click="clickEye3" />
</span> </span>
</Divider> </Divider>
<SuspendChart :setStatistics="setStatistics" /> <div class="set-img">
<img src="@/assets/images/home/user-img4.png" style="width:310px;height:165px" />
</div> </div>
<div class="divider-t">
<Divider> <Divider>
<span style="color: #2680eb;"> <span style="color: #2680eb;">
物料相关统计 物料相关统计
<Icon :type="show4?'md-eye':'md-eye-off'" @click="clickEye4" /> <Icon :type="show4?'md-eye':'md-eye-off'" @click="clickEye4" />
</span> </span>
</Divider> </Divider>
<MaterielChart :setStatistics="setStatistics" /> <div class="set-img">
<img src="@/assets/images/home/user-img5.png" style="width:310px;height:165px" />
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -169,12 +171,19 @@ export default { ...@@ -169,12 +171,19 @@ export default {
avatorPath: "", avatorPath: "",
imgPath: true, imgPath: true,
setStatistics: true, setStatistics: true,
show: true, show: true,
show1: false, show1: false,
show2: false, show2: false,
show3: false, show3: false,
show4: false, show4: false,
num: 0,
num1: 0,
shuliang: 0,
showIcon: true,
// listdatas: [],
// index: 0,
// collectNum: this.$store.state.collect.length,
// collectNum1: this.$store.state.collect.length,
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -183,13 +192,64 @@ export default { ...@@ -183,13 +192,64 @@ export default {
created() { created() {
this.get(); this.get();
this.getUserInfoFn(); this.getUserInfoFn();
console.log(this.$store.state.collect); this.listdatas = this.collect;
// console.log(this.$store.state.collect);
// this.getList(); // this.getList();
}, },
computed: { computed: {
...mapState({ collect: "collect" }), ...mapState({ collect: "collect" }),
// newList() {
// var arr = [];
// let data = this.listdatas;
// arr = data.slice(0, 8);
// return arr;
// },
}, },
methods: { methods: {
clickLeft() {
if (this.num1 < 0) {
this.num1 += 1;
}
alert(this.num1);
},
clickRight() {
alert("----:" + this.num1);
alert("----:" + this.collect.length);
if (this.num1 + this.collect.length > 8) {
this.num1 -= 1;
// if (this.num1 + this.collect.length == 8) {
// this.showIcon = true;
// return false;
// }
// } else if (
// this.num1 < -(this.collect.length + this.num1) &&
// -(this.collect.length + this.num1) != -0
// ) {
// if (this.num1 + this.collect.length == 8) {
// this.showIcon = true;
// return false;
// }
alert("-====:" + this.num1);
} else {
this.showIcon = false;
}
alert(this.num1);
},
leftmove() {
if (this.shuliang <= 5) {
if (this.num < 0) {
this.num += 1;
this.shuliang += 1;
}
}
},
rightmove() {
if (this.shuliang > 5) {
this.num -= 1;
this.shuliang -= 1;
}
},
getUserInfoFn() { getUserInfoFn() {
let userId = this.$store.state.userInfo.userId; let userId = this.$store.state.userInfo.userId;
Api.getUserInfo({ id: userId }).then((res) => { Api.getUserInfo({ id: userId }).then((res) => {
...@@ -213,7 +273,7 @@ export default { ...@@ -213,7 +273,7 @@ export default {
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) => {
...@@ -221,6 +281,7 @@ export default { ...@@ -221,6 +281,7 @@ export default {
}); });
}); });
this.listTask = list; this.listTask = list;
this.shuliang = this.listTask.length;
}); });
}, },
goPage(u) { goPage(u) {
...@@ -263,40 +324,71 @@ export default { ...@@ -263,40 +324,71 @@ export default {
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
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;
display: flex;
display: -webkit-flex;
.img-header { .img-header {
margin-top: -10px; margin-top: -10px;
float: left;
} }
.ivu-avatar > img { .ivu-avatar > img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.user-text { .user-text {
float: left; width: 43%;
p { p {
margin: 10px 20px; margin: 10px 20px;
} }
} }
.incon-carousel { .incon-carousel {
float: right; width: 980px;
// margin-top: 8px; position: relative;
width: 800px; text-align: center;
.bg-b { .bg-b {
float: left;
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: #dcdfe6; color: #dcdfe6;
position: absolute;
top: 13px;
left: 0;
}
.bg-b1 {
margin-top: 10px;
font-size: 30px;
color: #a7b8cc;
cursor: pointer;
position: absolute;
top: 13px;
left: 0;
} }
.bg-l { .bg-l {
float: right; float: right;
margin-top: 10px; margin-top: 10px;
font-size: 30px; font-size: 30px;
color: #dcdfe6; color: #dcdfe6;
position: absolute;
top: 13px;
right: 0;
}
.bg-l1 {
float: right;
margin-top: 10px;
font-size: 30px;
color: #a7b8cc;
cursor: pointer;
position: absolute;
top: 13px;
right: 0;
}
.list-shoucang {
width: 960px;
display: -webkit-inline-box;
display: inline-box;
transition: margin-left 1s;
} }
.bg { .bg {
text-align: center; text-align: center;
width: 120px; width: 120px;
float: left;
.ivu-icon { .ivu-icon {
font-size: 35px; font-size: 35px;
color: #2680eb; color: #2680eb;
...@@ -320,14 +412,20 @@ export default { ...@@ -320,14 +412,20 @@ export default {
top: 45px; top: 45px;
left: 0; left: 0;
} }
.bg-b1 {
font-size: 30px;
color: #a7b8cc;
width: 35px;
position: absolute;
top: 45px;
left: 0;
cursor: pointer;
}
.list-c { .list-c {
// display: flex; transition: margin-left 1s;
// display: -webkit-flex;
// justify-content: space-around;
width: 98%;
margin: 0 auto; margin: 0 auto;
display: -webkit-inline-box; display: -webkit-inline-box;
overflow-x: hidden; display: inline-box;
} }
.bg-l { .bg-l {
position: absolute; position: absolute;
...@@ -337,6 +435,15 @@ export default { ...@@ -337,6 +435,15 @@ export default {
right: 0; right: 0;
width: 35px; width: 35px;
} }
.bg-l1 {
position: absolute;
font-size: 30px;
color: #a7b8cc;
top: 45px;
right: 0;
width: 35px;
cursor: pointer;
}
.img_bg01 { .img_bg01 {
background-color: #ff9100; background-color: #ff9100;
width: 290px; width: 290px;
...@@ -412,7 +519,9 @@ export default { ...@@ -412,7 +519,9 @@ export default {
margin: 0 auto; margin: 0 auto;
} }
} }
.divider-t { .set-img {
padding-top: 25px; width: 100%;
text-align: center;
margin-bottom: 25px;
} }
</style> </style>
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