Commit 5091a54b authored by 仇晓婷's avatar 仇晓婷

home页

parent a909b458
import Api from '@/plugins/request'
export default {
getUserInfo(params) {
return Api.get(`${systemUrl}/user/getuserinfo`, params);
},
// 获取打你审批数据
getpaged(params) {
return Api.post(`${workflowUrl}/instance/getpaged`, params);
},
}
\ No newline at end of file
<template>
<div>
<Card class="todolist">
<p class="row_head">
<Icon type="md-contact" class="f20" />
<span class="ml10">待审批</span>
<a class="row_more fr" @click="toivew">更多</a>
</p>
<div class="row_card_body">
<Table border :columns="columns1" :data="data1" height="230"></Table>
</div>
</Card>
<Modal v-model="viewModal" width="800" title="详情">
<Row class="mo_cont">
<Col span="12" class="label">
<span class="title">编号:</span>
{{viewData.code}}
</Col>
<Col span="12" class="label">
<span class="title">审批类型:</span>
{{viewData.schemaName}}
</Col>
<Col span="12" class="label">
<span class="title">当前环节:</span>
{{viewData.currentNodeName}}
</Col>
<Col span="12" class="label">
<span class="title">下一环节:</span>
{{viewData.nextNodeName}}
</Col>
<Col span="12" class="label">
<span class="title">创建人:</span>
{{viewData.creator}}
</Col>
<Col span="12" class="label">
<span class="title">创建时间:</span>
{{viewData.creationTime}}
</Col>
</Row>
</Modal>
</div>
</template>
<script>
import Api from "../api";
export default {
name: "Approval",
data() {
return {
imgUrl: iconImg,
viewModal: false, //详情弹框
viewData: {}, //详情数据
columns1: [
{ type: "index", title: "序号", width: 70, align: "center" },
{ key: "schemaName", title: "类别", align: "center", width: 150 },
{ key: "currentNodeName", title: "环节", align: "center" },
{ key: "nextNodeName", title: "下一环节", align: "center" },
{ key: "creationTime", title: "创建时间", align: "center", width: 170 },
{
key: "id",
title: "操作",
align: "center",
width: 90,
render: (h, parmse) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: {
oprate: "add"
},
on: {
click: () => {
this.viewRow(parmse.row);
}
}
},
"查看"
)
]);
}
}
],
data1: []
};
},
created() {
this.getlaoed();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
getlaoed() {
let parme = {
pageIndex: 1,
pageSize: 20,
conditions: [
{ fieldName: "type", fieldValue: 2, conditionalType: "Equal" }
]
};
Api.getpaged(parme).then(res => {
let arry = res.result.items;
let arr = arry.slice(0, 4);
this.data1 = arr;
});
},
viewRow(rowData) {
this.viewModal = true;
this.viewData = rowData;
},
toivew() {
var info = { id: "123", message: "成功" };
this.$router.push({ name: "handle", params: info });
// tab(1)
}
},
mounted() {}
};
</script>
<style lang="less" scoped>
.row_head {
height: 30px;
color: #249e91;
a {
color: #249e91;
}
}
.mo_cont {
border-top: 1px solid #ddd;
border-left: 1px solid #ddd;
.label {
display: table-cell;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
// margin: 0 0 -1px -1px;
line-height: 30px;
box-sizing: border-box;
.title {
background: #e8eaf1;
display: inline-block;
width: 100px;
text-align: right;
padding: 0 5px;
}
}
}
</style>
\ No newline at end of file
<template>
<Card class="todolist">
<p class="row_head">
<Icon type="ios-chatbubbles" class="f20" />
<Badge :count="3" :offset="[9,-5]">
<span class="ml10">未读消息</span>
</Badge>
<a href class="row_more fr">更多</a>
</p>
<div class="msg">
<Row v-for="(item,index) in listTask" :key="index" class="row-text">
<Col :span="2">
<div></div>
</Col>
<Col :span="6">{{index+1}}&nbsp&nbsp {{item.name}}</Col>
<Col :span="8">
{{item.data}}
<Icon type="md-link" />
</Col>
<Col :span="8">{{item.Date}}</Col>
</Row>
</div>
</Card>
</template>
<script>
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"
}
]
};
},
methods: {
link() {
console.log("路径");
}
}
};
</script>
<style lang="less" scoped>
.row_head {
height: 35px;
line-height: 30px;
color: #0099ff;
}
.msg {
height: 225px;
overflow-y: auto;
.row-text {
height: 40px;
line-height: 40px;
border-top: 1px solid #eee;
}
}
</style>
\ No newline at end of file
<template>
<div class="home">
<Card class="card-user">
<div class="img-header">
<img src="@/assets/images/home/user.png" />
</div>
<div class="user-text">
<p>你好:张飞,欢迎登陆MES系统!</p>
<p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp
<span>工艺技术员</span>
</p>
</div>
<div class="incon-carousel">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg1">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg bg2">
<Icon type="md-map" />
<p>站内邮件</p>
</div>
<div class="bg bg3">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg1">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg bg2">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div>
</div>
</Card>
<div class="card-list">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<Card
v-for="(item,index) in listTask"
:key="index"
:class="item.name=='物料复验' ? 'img_bg02':(item.name=='产品合格证' ? 'img_bg03':(item.name=='生产执行' ? 'img_bg04' : 'img_bg01'))"
@click.native="goPage(item)"
>
<div class="leftIco">
<img class="img_icon" src="@/assets/imgicon/u1640.png" alt />
</div>
<div class="text-p">
<p>{{item.totalUrl}}</p>
<p>{{item.name}}</p>
</div>
</Card>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div>
</div>
<Row class="table" :gutter="16">
<Col :span="12">
<Approval ref="approval" />
</Col>
<Col :span="12">
<UnreadMessage />
</Col>
</Row>
<div class="url-img"></div>
</div>
</template>
<script>
import Api from "./api";
import Approval from "./component/approval";
import UnreadMessage from "./component/unreadMessage";
export default {
components: {
Approval,
UnreadMessage
},
data() {
return {
listTask: [],
imgUrl: iconImg
};
},
created() {
this.get();
},
methods: {
get() {
let list = [];
let url = `${systemUrl}/backlog/get`;
this.$api.get(url).then(r => {
list = r.result;
list.forEach(data => {
// console.log(data.totalUrl)
let ulrt = `http://${address}:` + data.totalUrl;
data.totalUrl = 0;
this.$api.get(ulrt).then(r => {
return (data.totalUrl = r.result);
});
});
console.log(list);
this.listTask = list;
});
},
goPage(u) {
// alert(u.menuUrl)
this.$router.push(u.menuUrl);
}
}
};
</script>
<style lang="less" scoped>
.home {
padding: 10px 0;
.card-user {
height: 100px;
.img-header {
margin-top: -8px;
float: left;
}
.user-text {
float: left;
p {
margin: 10px;
}
}
.incon-carousel {
float: right;
// margin-top: 8px;
width: 800px;
.bg-b {
float: left;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg-l {
float: right;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg {
text-align: center;
width: 100px;
float: left;
.ivu-icon {
font-size: 35px;
}
p {
margin-top: 8px;
}
}
.bg0 {
.ivu-icon {
color: #ffc300;
}
}
.bg1 {
.ivu-icon {
color: #0099ff;
}
}
.bg2 {
.ivu-icon {
color: #ff7a8b;
}
}
.bg3 {
.ivu-icon {
color: #ffc300;
}
}
}
}
.card-list {
display: flex;
display: -webkit-flex;
margin-top: 15px;
justify-content: space-around;
.bg-b {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.bg-l {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.img_bg01 {
background-color: #ff9100;
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #ff9100, #ffcf87);
}
.img_bg02 {
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #003fd4, #8ac7fc);
}
.img_bg03 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #fe1b1b, #fc9c92);
}
.img_bg04 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #249e91, #79ece0);
}
.img_icon {
width: 24px;
margin: 23% 0 0 0;
}
.text-p {
text-align: center;
color: #fff;
p:first-child {
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
}
}
.url-img {
width: 100%;
height: 370px;
background: url("../../assets/images/home/echars.png") no-repeat;
background-size: 100% 100%;
}
.table {
margin-top: 15px;
}
}
</style>
\ No newline at end of file
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