Commit 7667d67e authored by 周远喜's avatar 周远喜

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

parents 966046cc 32d9468a
......@@ -16,7 +16,7 @@
}
.dispatch_part{
border: 1px solid #ccc;
height: 100%;
// height: 100%;
.dispatch_part_top{
height: 50px;
line-height: 50px;
......
......@@ -25,8 +25,8 @@
</RadioGroup>
</span>
</p>
<h4 class="tc" v-if="this.listTask.length==0">暂无数据</h4>
<div class="dispatch_part_body" v-if="listShow == '订单'" :style="{height:byheight}">
<h4 class="tc" v-if="this.listTask.length==0">暂无数据</h4>
<!-- {{ids}} -->
<!-- <Collapse simple> -->
<div v-for="(item,index) in listOrder" :key="index" :name="item.mesCode">
......@@ -75,6 +75,7 @@
<!--</Collapse> -->
</div>
<div class="dispatch_part_body" v-else-if="listShow == '工单'" :style="{height:byheight}">
<h4 class="tc" v-if="this.listTask.length==0">暂无数据</h4>
<Row :gutter="15" class="card_body01">
<Col span="8" class="dispatch_card" v-for="(item,index) in listTask" :key="index">
<Card>
......@@ -376,10 +377,10 @@ export default {
},
created() {
this.getUserInfoFn();
this.byheight = window.innerHeight - 208 + "px";
this.byheight = window.innerHeight - 178 + "px";
},
mounted() {
this.byheight = window.innerHeight - 208 + "px";
this.byheight = window.innerHeight - 178 + "px";
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......
import Api from '@/plugins/request'
export default {
index: `${PlanUrl}/mesorder/planpaged`,
// 获取当前登录用户信息
getUserInfo(params) {
return Api.get(`${systemUrl}/user/getuserinfo`, params);
},
// 获取人员列表信息
getUser(params) {
return Api.post(`${systemUrl}/user/getselectuser`, params);
},
// 获取用户所在车间
getUserDepartment(params){
return Api.get(`${systemUrl}/user/getuserdepartment`, params);
},
// 获取用户所有设备
getlistall(params){
return Api.get(`${systemUrl}/equipinfo/getlistall`, params);
},
// 获取用户班组工单
getEntryList(params){
return Api.get(`${PlanUrl}/teamsdispatchs/getentrylist`, params);
},
// 派工接口(保存)
saveTeamentry(params){
return Api.post(`${PlanUrl}/teamsdispatchs/saveteamentry`, params);
},
// 删除拆分项
deleteItem(params){
return Api.get(`${PlanUrl}/teamsdispatchs/deldispatch`, params);
},
//删除:
delete(params) {
return Api.delete(`${PlanUrl}/mesorder/delete`, {
params: params
});
},
}
\ No newline at end of file
<style lang="less" scoped>
@import "./dispatch.less";
</style>
<template>
<div>
数据传输
<div class="dispatch myBug">
<Row :gutter="20">
<Col span="10">
<div class="dispatch_part">
<p class="dispatch_part_top">
<b class="mr10">设备列表</b>
{{listTask.length}}
</p>
<div class="dispatch_part_body" v-if="listShow == '订单'" :style="{height:byheight}">
<h4 class="tc" v-if="this.listTask.length==0">暂无数据</h4>
<div v-for="(item,index) in listOrder" :key="index" :name="item.mesCode">
<h3 class="h3_bg">
订单号:{{item[0].mesCode}}
<Tag class="h3_tag">{{item.length}}</Tag>
</h3>
<p slot="content">
<Row :gutter="15" class="card_body01">
<Col span="8" class="dispatch_card" v-for="(li,index) in item" :key="li.id">
<Card>
<p slot="title" class="card_top">
<Checkbox v-model="li.checked" :disabled="li.status!=-1">
<Icon type="ios-pricetags" />
工序{{li.process_seq}}{{li.process_name}}
</Checkbox>
</p>
<div class="h60">
<p class="g_title">{{li.productName}}--{{li.equipCode}}</p>
<p>
产品数量:{{li.quantity}}
<op
title="拆分"
type="icon"
icon="md-cut"
v-if="li.quantity > 1 && li.pid == 0 && li.status==-1"
@click="setChai(li,index)"
></op>
<op
title="删除"
type="icon"
icon="md-close-circle"
v-else-if="li.dispatchStatus!=2 && li.pid != 0"
@click="removeDetail(li,index)"
></op>
</p>
<p>{{li.beginTime}}--{{li.endTime}}</p>
<p>人员 :{{li.userNames}}</p>
</div>
</Card>
</Col>
</Row>
</p>
</div>
</div>
</div>
</Col>
<Col span="14">
<div class="dispatch_part">
<p class="dispatch_part_top">
<b class="mr10">程序列表</b>
<span >{{listSheBei.length}}</span>
</p>
<div class="dispatch_part_body" :style="{height:byheight}">
<h4 class="tc" v-if="listSheBei.length==0">暂无数据</h4>
<div class="shebei">
<Row :gutter="15">
<span style="display:none">{{shebeiId}}</span>
<Col
span="12"
class="dispatch_card"
v-for="(item,index) in listSheBei"
:key="index"
>
<Card class="card">
<p slot="title" class="card_top">
<label @click="setShebeiId(item.id)" class="label">
<Icon
type="ios-disc"
size="18"
:color="item.id==shebeiId?'#2d8cf0':'#fff'"
/>
<input
name="shebei"
:value="item.equip_id"
type="radio"
style="display:none"
/>
设备编号:{{item.equip_id}}
</label>
</p>
<div class="h60">
<p class="g_title">{{item.equip_name}}</p>
<p>资源主操:{{item.operatorUsers}}</p>
<p>位置:{{item.locationx}}</p>
<p>状态:{{item.equip_status}}</p>
</div>
</Card>
</Col>
</Row>
</div>
</div>
</div>
</Col>
</Row>
<!-- 拆分 fenModel -->
<Modal
v-model="chaiModal"
title="拆分工序"
:width="400"
:mask-closable="false"
ok-text="拆分"
@on-ok="okChai()"
> 拆分数量:
<Tag>{{chaiNum}}</Tag>
<Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider>
</Modal>
<!-- 底部 -->
<FooterToolbar style="height:65px" v-show="showOperate&&footerToolbar">
<Button class="span ml20" type="primary" @click="openDrawer">下载</Button>
<!-- <Button class="span ml20" type="primary" @click="openDrawer">文本对比</Button> -->
<Button @click="footerToolbar=false">取消</Button>
</FooterToolbar>
<Drawer title="排产设置盘" v-model="facilityModal" width="820" class="drawer_box">
<Form ref="formValidate" :model="entity" :rules="ruleValidate" :label-width="100">
<Row>
<Col span="24">
<FormItem label="工时" prop="taskTime">
<DatePicker
v-model="entity.taskTime"
type="datetimerange"
placement="bottom-start"
:options="dateRange"
@on-change="handleChange"
placeholder="请选择时间段"
style="width: 330px"
></DatePicker>
</FormItem>
</Col>
<Col span="24">
<FormItem label="选择人员" prop="userIds" style="width:100%">
<UserSelect
ref="userSelected"
v-model="entity.userIds"
:multiple="true"
style="width: 500px"
/><!-- :type="3" -->
</FormItem>
</Col>
<Col span="24" class="drawer_midell">
<p class="drawer_center">
<Icon type="ios-stats" class="color" />数据分析图表
</p>
</Col>
<Col span="24">
<FormItem label="备注" style="width:100%">
<Input
maxlength="200"
v-model="entity.remark"
type="textarea"
:autosize="{minRows: 3,maxRows: 5}"
show-word-limit
class="drawer_row_textarea"
/>
</FormItem>
</Col>
</Row>
<FormItem>
<Button style="margin-right: 8px" @click="cancle">取消</Button>
<Button type="primary" @click="sendSheBei">派工</Button>
</FormItem>
</Form>
</Drawer>
</div>
</template>
<script>
import Api from "./api";
export default {
components: {},
data() {
return {
action: Api.index,
toheight: "500px",
byheight: "450px",
button1: "全部",
button2: "设备",
listShow: "订单",
shebei: "",
curTask:null,
dateRange: {//禁选工时时间区间
disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000;
}
},
shebeiId: -1,
footerToolbar: false,
status: "1", //排产状态
footerMore: true, //CheckItem!=null&&CheckItem!=''
footerModel: false, //底部按钮
facilityModal: false, //设备抽屉
listSheBei: [], //设备列表
listMan: [], //人员列表
listTask: [], //工单列表数据
listTitle: [], //订单号列表
newList: [], //选中数据
chaiModal: false, //拆分弹框
chaiNum: 1, //拆分数量
maxnum: 1,
rowIndex: 0, //多选项的index
chaiId: 0,
entity: {
taskTime: "", //工时
userIds: null, //选中人员
remark: "" //备注
},
ruleValidate: {
taskTime: [
{
required: true,
type: "array",
message: "请选择工时时间段",
trigger: "blur",
fields: {
0: { type: "date", required: true, message: "请选择工时时间段" },
1: { type: "date", required: true, message: "请选择工时时间段" }
}
}
],
userIds: [
{
required: true,
message: "请选择人员!",
trigger: "blur",
type: "array"
}
]
},
pentity: {
taskTime: "", //工时
remark: "" //备注
},
rulepepole: {
taskTime: [
{
required: true,
type: "array",
message: "请选择工时时间段",
trigger: "blur",
fields: {
0: { type: "date", required: true, message: "请选择工时时间段" },
1: { type: "date", required: true, message: "请选择工时时间段" }
}
}
]
}
};
},
created() {
this.getUserInfoFn();
this.byheight = window.innerHeight - 178 + "px";
},
mounted() {
this.byheight = window.innerHeight - 178 + "px";
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
getUserInfoFn() {
let userId = this.$store.state.userInfo.userId;
let infoid, departId;
Api.getUserDepartment({ userId: userId }).then(res => {
if (res.success) {
infoid = res.result.id;
} else {
infoid = [];
this.$Message.error("查询失败!");
}
});
Api.getUserInfo({ id: userId }).then(res => {
if (res.success) {
departId = res.result.departmentId;
this.getEntryList(departId);
this.getselectuser(departId);
this.getlistall(departId);
} else {
departId = "";
this.$Message.error("查询失败!");
}
});
},
setShebeiId(id) {
this.shebeiId = id;
this.footerToolbar = true;
},
// 获取查询人员
getselectuser(id) {
let parme = { departmentId: id, type: "2" };
Api.getUser(parme).then(res => {
res.result.map(u => {
u.checked = false;
});
this.listMan = res.result;
});
},
// 获取查询设备
getlistall(id) {
let parme = { shopid: id };
Api.getlistall(parme).then(res => {
res.result.map(u => {
u.checked = false;
});
this.listSheBei = res.result;
});
},
// 获取用户工单 JSON.stringify(parme)
getEntryList(id) {
let parme = { departmentId: id, DispatchStatus: this.status };
Api.getEntryList(parme).then(res => {
var savedUl = [];
var pid;
res.result.map(u => {
if (u.pid) {
pid = u.pid;
} else { pid = 0;}
let detailnew = {
beginTime: u.beginTime, //开始时间
dispatchStatus: u.dispatchStatus, //
endTime: u.endTime, //
equipCode: u.equipCode, //
equipId: u.equipId, //
executeId: u.executeId, //
id: u.id, //
mesCode: u.mesCode, //
order_id: u.order_id, //
process_content: u.process_content, //
process_name: u.process_name, //
process_seq: u.process_seq, //
productName: u.productName, //
quantity: u.quantity, //
routingDetailId: u.routingDetailId, //
routingHeaderId: u.routingHeaderId, //
status: u.status, //
userIds: u.userIds, //
userNames: u.userNames,
pid: pid //拆分项id
};
savedUl.push(detailnew);
});
this.listTask = savedUl;
});
},
// 时间改变方法
handleChange(daterange) {
this.newList.map(u => {
u.beginTime = daterange[0];
u.endTime = daterange[1];
});
},
handleChangeTime(time) {
this.newList.map(u => {
u.beginTime = time[0];
u.endTime = time[1];
});
},
// 过滤条件
changeStatus(a) {
this.getUserInfoFn();
},
// 打开抽屉
openDrawer() {
let chekids = this.ids;
let formData = this.listTask;
let timebegin = formData[0].beginTime;
let timend = formData[0].endTime;
this.newList = [];
chekids.forEach(v => {
var item = formData.filter(u => {
return u.id == v;
});
if (item && item[0]) {
this.newList.push(item[0]);
}
});
if (this.button2 == "设备") {
this.entity.taskTime = [timebegin, timend];
this.facilityModal = true;
} else {
this.pentity.taskTime = [timebegin, timend];
}// console.log("选中的数据", this.newList);
},
// 设备派工
sendSheBei() {
let item = this.newList;
item.map(u => {
u.userIds = this.entity.userIds;
u.remark = this.entity.remark;
u.equipId = this.shebeiId;
});
this.$refs["formValidate"].validate(valid => {
if (valid) {
let params = {
isDispatch: 1, //派工是1,保存是0
entryList: item
};
Api.saveTeamentry(params).then(res => {
if (res.success) {
this.$Message.success("设备派工成功。");
this.getUserInfoFn();
this.facilityModal = false;
} else {
this.$Message.error("设备派工失败...");
}
});
} else {
this.$Message.error("校验不通过...");
}
});
},
// 人员派工
sendUser() {
let item = this.newList;
item.map(u => {
u.userIds = this.peploeId;
u.remark = this.pentity.remark;
});
this.$refs["formpepole"].validate(valid => {
if (valid) {
let params = {
isDispatch: 1, //派工是1,保存是0
entryList: item
};
Api.saveTeamentry(params).then(res => {
if (res.success) {
this.$Message.success("人员派工成功。");
this.getUserInfoFn();
} else {
this.$Message.error("人员派工失败...");
}
});
} else {
this.$Message.error("校验不通过...");
}
});
},
// 拆分方法
setChai(item, index) {
this.curTask=item;
this.chaiModal = true;
this.chaiNum = 1;
this.maxnum = item.quantity - 1;
this.rowIndex = index;
},
// 拆分保存
okChai() {
var old = this.$u.clone(this.curTask);
var add = this.$u.clone(this.curTask);
old.quantity -= this.chaiNum;
add.quantity = this.chaiNum;
add.id = 0;
add.pid = old.id;
let params = {
isDispatch: 0, //派工是1,保存是0
entryList: [old, add]
};
Api.saveTeamentry(params).then(res => {
if (res.success) {
this.getUserInfoFn();
this.$Message.success("拆分成功。");
} else {
this.$Message.error("拆分失败...");
}
});
},
// 删除行
removeDetail(item, index) {
let delid = { id: item.id };
Api.deleteItem(delid).then(res => {
if (res.success) {
this.$Message.success("拆分项已删除。");
this.getUserInfoFn();
} else {
this.$Message.error("拆分项删除失败!");
}
});
},
//取消
cancle() {
this.facilityModal = false;
this.footerToolbar = false;
}
},
computed: {
ids() {
let ids = [];
this.listTask.map(u => {
if (u.checked) { ids.push(u.id);}
});
if (ids.length > 0) {this.footerToolbar = true;}
return ids;
},
listOrder() {
let orders = this.$u.group(this.listTask, u => {
return u.mesCode;
});// console.warn("listOrder", orders);
return orders;
},
peploeId() {
let peploeId = [];
this.listMan.map(u => {
if (u.checked) {
peploeId.push(u.id);
}
});
this.footerToolbar = true;
return peploeId;
},
showOperate() {
return (
this.ids.length > 0 && (this.shebeiId > 0 || this.peploeId.length > 0)
);
}
},
}
watch: {}
};
</script>
\ No newline at end of file
.dispatch{
padding: 12px 5px;
.footer02 {
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 0;
box-shadow: 0px -5px 6px rgba(0,0,0,0.3);
width: 98%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
}
.dispatch_part{
border: 1px solid #ccc;
// height: 100%;
.dispatch_part_top{
height: 50px;
line-height: 50px;
padding: 0 0 0 12px;
background: #F5F6FA;
.check{
position: absolute;
top: 0;
right: 24px;
}
}
.dispatch_part_body{
padding: 10px;
overflow-y: auto;
.h3_bg{
background: #a5adbf;
padding: 0 0 0 10px;
.h3_tag{
margin-left: 15px!important;
}
}
.dispatch_card{
margin: 10px 0;
.card{
.card_top{
.label{
cursor: pointer;
}
}
.ivu-card-head{
background: #2d8cf0!important;
}
}
.g_title{
color: #2d8cf0;
}
}
.dispatch_card02{
margin: 10px 0;
// padding-left: 0!important;
// padding-right: 0!important;
.man_body{
max-width: 185px;
.checkUser{
border-radius: 24px;
width: 100%;
height: 50px;
line-height: 47px;
span{
height: 50px;
}
.svg_name{
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
white-space:nowrap;
display: block;
float: right;
width: 82%;
}
.svg{
width: 70px;
}
}
}
}
}
}
.drawer_midell{
.drawer_center{
text-align: center;
padding: 10px;
color: #2d8cf0;
.color{
color: #2d8cf0;
}
}
}
.drawer_box{
.drawer_row_title{
width: 100px;
height: 40px;
float: left;
margin: 2px 0 0;
font-weight: 600;
}
.drawer_midell{
// height: 120px;
// margin: 20px 0;
.drawer_center{
text-align: center;
padding: 10px;
color: #2d8cf0;
.color{
color: #2d8cf0;
}
}
}
.drawer_row_textarea{
width: 550px;
textarea{
max-height: 200px;
}
}
.drawer_footer{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
}
\ No newline at end of file
<template>
<div class="dnc_box">
<!-- 数据传输 -->
<DataGrid :columns="columns" ref="grid" :action="action" :data="data" :high="false"></DataGrid>
<!-- 数据传输:action="action" 接口数据 -->
<DataGrid :columns="columns" ref="grid" :data="data" :high="false">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字班次名称" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="buttons">
<Button type="primary" >新增</Button>
</template>
</DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800">
<!-- <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" /> -->
</Modal>
</div>
</template>
<script>
......@@ -9,6 +26,10 @@ export default {
components: {},
data() {
return {
editModal: false,
easySearch: {
keys: { op: 'projectNo', value: null }
},
columns: [
{
key: "projectNo",
......@@ -91,7 +112,7 @@ export default {
notse: "适用于MDF设备"
},
{
projectNo: "1102347890",
projectNo: "12366588",
id:2,
lingNo: "dd4.rt5.991",
lingName: "轴承",
......@@ -105,7 +126,7 @@ export default {
notse: "适用于MDF设备"
},
{
projectNo: "1102347890",
projectNo: "2536898",
id:3,
lingNo: "dd4.rt5.991",
lingName: "轴承",
......@@ -119,7 +140,7 @@ export default {
notse: "适用于MDF设备"
},
{
projectNo: "1102347890",
projectNo: "35653248",
id:4,
lingNo: "dd4.rt5.991",
lingName: "轴承",
......@@ -137,9 +158,13 @@ export default {
},
created() {},
mounted() {
this.loadDuration();
// this.loadDuration();
},
methods: {
search() {
this.$Message.success("搜索查询")
// this.$refs.grid.reload(this.easySearch)
},
edit(rowData){
console.log(rowData)
},
......
<template>
<div>数据分析表
<Echart1 ></Echart1>
</div>
</template>
<script>
import Echart1 from './compose/echart1'
export default {
components: {
Echart1,
},
data() {
return {
// echarts选项
option: {
title: {
text: '折线图堆叠'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['在用率', '运行率', '故障率', '停机率'],
right: '50px' ,
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
},
yAxis: {
type: 'value'
},
series: [
{
name: '在用率',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '运行率',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '故障率',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '停机率',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
]
},
};
},
methods: {},
};
</script>
<template>
<div>
<div id="myChart" style="width:1200px;height:410px;margin:0 auto;top: -40px;"></div>
</div>
</template>
<script>
export default {
name: 'Echart1',
data() {
return {
disabled: false
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
loadEchart() {
// 基于准备好的dom,初始化echarts实例
var myChart = this.$echarts.init(document.getElementById('myChart'))
var option = {
title: {
text:
'Total: 115 SampleSize: 5 Groups: 23 Max: 0.966 Min: 0.91 Dev: 0.022003 CPK: 1.34 PPK: 1.36 Ca: 0.1 Cp: 1.49 Pp: 1.51',
subtext: '',
textStyle: {
fontWeight: 'normal',
fontSize:'12px',
color: '#515A6E' //legend颜色
},
left: 'center',
top: 'bottom'
},
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#739ADD' // 0% 处的颜色
},
{
offset: 1,
color: '#739ADD' // 100% 处的颜色
}
],
global: false // 缺省为 false
},
tooltip: {
trigger: 'axis',
axisPointer: {
animation: false
}
},
xAxis: {
type: 'category',
data: [
'2019',
'2020',
'2021',
'2022',
'2023',
'2024',
'2025',
'2026',
'2027',
'2028',
'2029',
'2030'
]
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} ‰'
}
},
series: [
{
data: [1.6, 2.8, 3.2, 1.6, 0.2, 4.7, 1.5, 4.9, 2.5, 5.4, 6.2, 1.5],
type: 'line',
markLine: {
data: [
{
type: 'max',
label: {
formatter: '2020目标值 6 ‰'
},
lineStyle: {
//警戒线的样式 ,虚实 颜色
type: 'dashed',
color: '#0B5813',
width: 2
}
},
{
type: 'min',
label: {
formatter: '2030目标值 0.2 ‰'
},
lineStyle: {
//警戒线的样式 ,虚实 颜色
type: 'dashed',
color: '#E99224',
width: 2
}
}
]
}
}
]
}
// 绘制图表
myChart.setOption(option)
}
},
mounted() {
this.loadEchart()
}
}
</script>
<template>
<div class="dnc_box">
设备监控
<div class="mnc_box">
<DataGrid
:columns="columnsDuration"
ref="gridDuration"
:data="data"
:columns="columns"
ref="grid"
:batch="false"
:high="false"
:page="false"
:batch="false"
:easy="false"
:type="typeInfo"
:span="6" :data="comondata"
:set="false"
:height="400"
:tool="false"
></DataGrid>
:gutter="40"
>
<!-- :conditions="easySearch" :action="action" -->
<template slot="easySearch">
<div class="search_box">
<div class="search_item" @click="filterData()">
<img src="../image/guan.png" alt="">
<div class="top_text">
<p>关机状态</p>
<p><b>123</b></p>
</div>
</div>
<div class="search_item search_item02" @click="filterData()">
<img src="../image/kong.png" alt="">
<div class="top_text">
<p>空闲状态</p>
<p><b>123</b></p>
</div>
</div>
<div class="search_item search_item03" @click="filterData()">
<img src="../image/guz.png" alt="">
<div class="top_text">
<p>故障状态</p>
<p><b>123</b></p>
</div>
</div>
<div class="search_item search_item04" @click="filterData()">
<img src="../image/stay.png" alt="">
<div class="top_text">
<p>运行状态</p>
<p><b>123</b></p>
</div>
</div>
</div>
</template>
<template slot="searchForm">
<!-- <Search /> -->
</template>
<template slot="buttons">
<!-- <Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button> -->
<div class="top_btn">
<img src="../image/fenx.png" alt="">
<div class="top_btnt">
<a @click="gotoTable()">查看数据分析图表</a>
</div>
</div>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" v-for="i of 15" :key="i">
<Row class="title-i">
<Col :span="16" class="order-code">
<Ellipsis :text="row.productName+i" :lines="1" tooltip transfer />
</Col>
<Col :span="4" class="order-code">
<a>查看详情</a>
</Col>
<Col :span="4">
<div class="statuBg" :style="tdStyle(row.statu)"></div>
<div class="boxTitle">
<div class="text">
{{row.statu}}
</div>
</div>
</Col>
</Row>
<div class="panel-text">
<Row>
<Col span="8">
<a @click="getImagpage()" >
<img
:src="getUrl(row.productUrl)"
width="120" title="设备监控详情"
height="120"
style="border:#cacbd0 dashed 1px"
/></a>
<!-- :title="row.productUrl" -->
</Col>
<Col span="16" class="row">
<p>机床类型:{{row.MachineType}}</p>
<p>机床编码:{{row.MachineCode}}</p>
<p>机床IP:{{row.MachineIp}}</p>
<p>系统信息:{{row.information}}</p>
</Col>
</Row>
</div>
</div>
</template>
</DataGrid>
</div>
</template>
<script>
// import Api from "./api";
// import Search from "./search";
export default {
components: {},
name: "starOrder",
components: {
// Search
},
data() {
return {
columnsDuration: []
// action: Api.index,
easySearch: {
keys: {
op: "mesCode,productName,drawnNumber",
value: null
}
},
downUrl: fileUrlDown,
columns: [],
comondata:[
{
productName: "德玛吉235550",
statu: "空闲",
productUrl:"shebei.png",
MachineType: "V1-256-16331",
MachineCode: "JCBM-06221",
MachineIp: "1231-111-26012",
information: "V-5633-12112",
},{
productName: "德玛吉235536",
statu: "关机",
productUrl:"shebei.png",
MachineType: "V1-256-16332",
MachineCode: "JCBM-06222",
MachineIp: "1231-111-26012",
information: "V-5633-12112",
},{
productName: "德玛吉235537",
statu: "故障",
productUrl:"shebei.png",
MachineType: "V1-256-16333",
MachineCode: "JCBM-06223",
MachineIp: "1231-111-26012",
information: "V-5633-12112",
},{
productName: "德玛吉235537",
statu: "运行中",
productUrl:"shebei.png",
MachineType: "V1-256-16334",
MachineCode: "JCBM-06224",
MachineIp: "1231-111-26012",
information: "V-5633-12112",
},
],
typeInfo: "card",
iconInfo: "md-apps",
titleInfo: "卡片模式",
nowTime: new Date().getTime() //页面当前打开时间
};
},
created() {},
created() {
let oldStr = localStorage.getItem("admin");
let userlist = this.$store.getters.getUser(2);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.loadDuration();
this.search();
},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
},
toExecute(
id,
orderId,
executeId,
headid,
routingDetailId,
quantity,
status
) {
//跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({
path: "/produce/execute",
query: {
id: id, //工单ID
orderId: orderId, //订单id
executeId: executeId, //订单执行表id
headid: headid, //工艺规程id
routid: routingDetailId, //工序ID
quantity: quantity, //派工数量
dispatchStatus: status
}
});
},
tdStyle(val) {
//动态根据状态值加载状态值对应的颜色
// let temDic = this.$store.getters.dictionaryByKey("taskList.status");
let temColor = "#515a6e5c";
if(val=="空闲"){
temColor = "#0DD78D";
}
if(val=="故障"){
temColor = "#FE7777";
}
if(val=="运行中"){
temColor = "#2680EB";
}
// temDic.forEach(data => {
// if (Number(data.code) == val) {
// temColor = data.color;
// }
// });
var style = {};
style["border-top"] = " solid 38px " + temColor;
return style;
},
changeShwo() {
//显示模式切换
if (this.typeInfo == "card") {
this.typeInfo = "table";
this.iconInfo = "md-list";
this.titleInfo = "列表模式";
} else {
this.typeInfo = "card";
this.iconInfo = "md-apps";
this.titleInfo = "卡片模式";
}
},
compareTime(dateStart) {
//比较当前时间和计划完成时间
let planEndTime = new Date(dateStart).getTime();
let res = true;
if (this.nowTime - planEndTime > 0) {
res = true;
} else {
res = false;
}
return res;
},
getTimes(dateStart) {
//返回计划完成时间和当前时间的差值
let planEndTime = new Date(dateStart).getTime();
let res = 0;
if (this.nowTime - planEndTime > 0) {
res = 0;
} else {
res = (this.nowTime - planEndTime) / 1000;
}
return res;
},
getStatus(status) {
//根据状态返回未开工、执行中、暂停状态的bool值
let res = true;
if (status == 12 || status == 14 || status == 5) {
res = true;
} else {
res = false;
}
return res;
},
filterData(){
this.$Message.success("过滤数据...")
},
getUrl(url) {
//返回img需要显示的src值
let tempUrl = "";
if (url && url.length > 0) {
// tempUrl = this.downUrl + url;
tempUrl = iconImg + url;
} else {
tempUrl = iconImg + "noPic_product.png";
}
return tempUrl;
},
getImagpage(){
this.$router.push("/dncmnc/mnc/monitoring");
},
gotoTable(){
//跳转到数据分析表页面 获取id:this.$route.query.id
this.$router.push("/dncmnc/mnc/analysis");
},
methods: {},
computed: {},
watch: {}
// l(key) {
// let vkey = "order_list" + "." + key;
// return this.$t(vkey) || key;
// }
}
};
</script>
<style lang="less" scope>
.mnc_box {
height: calc(100vh - 110px);
.table-content .table-tools .btns{
min-width: 300px;
padding: 20px;
.top_btn{
border-left: 1px solid #cccccc;
text-align: left;
height: 100px;
line-height: 100px;
padding-left: 30px;
.top_btnt{
display: inline-block;
padding: 0 0 0 5px;
}
}
}
.search_box{
padding: 20px 0;
// height: 140px;
display: -webkit-flex; /* Safari */
display: flex;
justify-content: space-between;
.search_item{
display: inline-block;
width: calc(20% - 5px);
min-width: 240px;
height: 100px;
background: #515a6e5c;
color: #515A6E;
text-align: center;
padding: 28px 0 0;
border-radius: 4px;
cursor: pointer;
img {
margin: 0 30px 0 0;
}
.top_text {
width: 100px;
height: 50px;
line-height: 24px;
font-size: 16px;
display: inline-block;
b{
font-weight: 800;
}
}
}
.search_item02{
background: #0dd78d30;
color: #0DD78D;
}
.search_item03{
background: #fe777747;
color: #FE7777;
}
.search_item04{
background: #2680eb47;
color: #2680EB;
}
}
.body {
background: white;
border-radius: 4px 0 4px 4px;
border: #cacbd0 solid 1px;
margin-bottom: 30px;
.title-i {
padding: 0 0 0 8px;
height: 38px;
line-height: 38px;
color: #2680eb;
font-size: 14px;
font-weight: bold;
border-bottom: #cacbd0 dotted 1px;
.btn-click {
text-align: right;
a {
color: #fff;
}
a:hover {
color: #249e91;
}
}
}
.panel-text {
padding: 5px 8px;
.row {
color: #666666;
padding-left: 10px;
p {
line-height: 30px;
}
}
}
}
.body:hover {
// cursor: pointer;
box-shadow: 0 0 10px #888888;
}
}
.statuBg {
height: 0px;
width: 0;
border-left: solid 50px transparent;
float: right;
margin-right: -1px;
}
.boxTitle {
color: white;
float: right;
margin-top: -42px;
/* Rotate div */
transform: rotate(37deg);
-ms-transform: rotate(37deg); /* Internet Explorer */
-moz-transform: rotate(37deg); /* Firefox */
-webkit-transform: rotate(37deg); /* Safari 和 Chrome */
-o-transform: rotate(37deg); /* Opera */
.text {
font-size: 8px;
font-weight: normal;
}
}
.rowBottom .ivu-col-span-10 {
height: 24px;
padding-right: 10px;
}
</style>
.set_card{
padding: 30px 30px 0;
.set_card_box{
border: 1px solid #CACBD0;
border-radius: 4px;
margin: 0 0 30px 0;
.set_top{
text-align: center;
background: #267feb42;
line-height: 38px;
color: #2680EB;
font-weight: bold;
}
.set_card_body{
padding: 10px;
.set_img{
min-width: 150px;
min-height: 120px;
text-align: center;
}
.bao_code{
line-height: 32px;
font-size: 16px;
font-weight: bold;
border-right: 1px solid #ccc;
padding: 30px 0 0 0;
margin: 0 10px 0 0;
}
.set_masage{
min-height: 125px;
}
}
}
}
\ No newline at end of file
<style lang="less" scoped>
@import "./mnc.less";
</style>
<template>
<div>
<a class="back_href" @click="goView">
<Icon type="ios-undo-outline" size="24" />返回设备监控
</a>
<div class="set_card">
<Row :gutter="30">
<Col span="6">
<div class="set_card_box">
<p class="set_top">设备属性</p>
<div class="set_card_body">
<Row>
<Col span="10">
<img class="set_img" src="../image/shebei.png" alt=""/>
</Col>
<Col span="14">
<div class="set_masage">
<p>机床名称:德玛吉235537</p>
<p>机床类型:V1-256-16334</p>
<p>机床编码:JCBM-06224</p>
<p>机床IP:1231-111-26012</p>
<p>系统信息:V-5633-12112</p>
</div>
</Col>
</Row>
</div>
</div>
</Col>
<Col span="6">
<div class="set_card_box">
<p class="set_top">当前任务信息</p>
<div class="set_card_body">
<div class="set_masage">
<p>当前程序号:德玛吉235537</p>
<p>零件号:V1-256-16334</p>
<p>加工工序号:JCBM-06224</p>
<p>当前任务号:RWBH-0617-001</p>
<p>工步卡号:GBKH-222-2011</p>
</div>
</div>
</div>
</Col>
<Col span="12">
<div class="set_card_box">
<p class="set_top">设备报警信息</p>
<div class="set_card_body">
<Row>
<Col span="5">
<div class="set_img bao_code">
<p>报警码</p>
<p>13366133</p>
</div>
</Col>
<Col span="19">
<div class="set_masage">
<p><b>报警原因:</b></p>
<p>磨损所致。 异常操作所致。 非法改变其功能所致。 超负荷使用。 设计上潜在不良因素。 维护手法欠佳。
设备故障一般是指设备失去或降低其规定功能的事件或现象,表现为设备生产运行异常,
指设备的某些零件失去原有的精度或性能,使设备不能正常运行、技术性能降低,致使设备中断生产或效率</p>
</div>
</Col>
</Row>
</div>
</div>
</Col>
</Row>
<Row :gutter="30">
<Col span="6" class="set_bottom">
<div class="set_card_box">
<p class="set_top">设备状态</p>
<div class="set_card_body">
<div class="set_img">
<img src="../image/guz.png" alt="">
<p>故障</p>
</div>
<div class="set_masage">
<p>当前状态开始时间:</p>
<p class="time_bg">11:45:05</p>
<p>当前状态持续时间:</p>
<p class="time_bg">11:55:25</p>
</div>
</div>
</div>
<div class="set_card_box">
<p class="set_top">加工状态统计</p>
<div class="center">
图表
</div>
</div>
</Col>
<Col span="18">
<div class="set_card_box">
<p class="set_top">加工状态实时信息</p>
<div class="center">
图表
</div>
</div>
</Col>
</Row>
</div>
</div>
</template>
<script>
export default {
data(){
return{
};
},
methods:{
goView(){
//返回设备监控页面 获取id:this.$route.query.id
this.$router.push("/dncmnc/mnc");
},
},
}
</script>
\ No newline at end of file
......@@ -25,7 +25,7 @@
<Filed :span="12" name="问题原因">{{entity.reason}}</Filed>
<Filed :span="12" name="责任归属">{{entity.personLiableId}}</Filed>
<Filed :span="24" name="不合格产品">{{entity.productIds}}</Filed>
<Filed :span="24" name="审理单号">{{entity.code}}</Filed>
<!-- <Filed :span="24" name="审理单号">{{entity.code}}</Filed> -->
</Row>
</div>
</template>
......
......@@ -135,6 +135,18 @@ export default {
// align: "center",
// slot: "result"
// },
{
title: "属性类型",
key: "dataType",
align: "center",
slot: "dataType"
},
{
title: "单位",
key: "company",
align: "center",
slot: "company"
},
{
title: "必填",
key: "required",
......@@ -183,7 +195,11 @@ export default {
}
];
Api.listTable({ conditions: conditions ,sortBy:'id',isDesc:false}).then(r => {
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
if (r.result) {
var arr = r.result;
this.checkList = arr.filter(function(item) {
......
......@@ -122,6 +122,7 @@ export default {
methods: {
clickItem(val) {
this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId);
this.cityList.forEach(e => {
if (val == e.id) {
......
......@@ -29,4 +29,7 @@ export default {
categoryList(params){
return Api.post(`${systemUrl}/actionlog/list`,params);
},
batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
},
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ export default {
entity: {},
easySearch: {
keys: { op: "title", value: "" },
table: { op: "Equal", value: "material" },
tableTitle: { op: "Equal", value: "material" },
tId: {
op: "Equal",
value: this.$route.query.id
......
......@@ -8,6 +8,7 @@
:initsearch="sets"
:high="false"
:height="tableHeight"
@on-selection-change="onSelect"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -24,19 +25,29 @@
</FormItem>
</Form>
</template>
<!-- <template slot="searchForm">
<Search />
</template>-->
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
<template slot="batch">
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false">
<Modal
v-model="modal"
:title="title"
width="1000"
footer-hide
:mask-closable="false"
:fullscreen="fullscreen"
>
<component
:is="detail"
:eid="curId"
:rowsTable="rowsTable"
:nodeInfo="nodeInfo"
@on-close="cancel"
@on-cancel="cancel"
@on-ok="ok"
ref="chlidren"
/>
......@@ -59,6 +70,9 @@ export default {
modal: false,
title: "新增",
curId: 0,
selectRows: [],
rowsTable: [],
fullscreen: false,
detail: null,
sets: v => {
v.categoryId = this.nodeInfo.categoryId;
......@@ -72,12 +86,11 @@ export default {
}
},
columns: [
// {
// key: "index",
// title: "#",
// align: "left",
// width: 60
// },
{
type: "selection",
width: 70,
align: "center"
},
{
key: "code",
title: "编码",
......@@ -196,6 +209,18 @@ export default {
};
},
methods: {
onSelect(a, b) {
//批量选择
this.selectRows = a;
},
modalSchedule() {
this.fullscreen = true;
this.rowsTable = this.selectRows;
this.title = "物料送审";
this.curId = 0;
this.detail = () => import("./submit");
this.modal = true;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
......@@ -283,6 +308,14 @@ export default {
}
});
},
send(row) {
this.fullscreen = true;
this.curId = row.id;
this.title = "物料送审";
this.detail = () => import("./submit");
this.rowsTable = [];
this.modal = true;
},
ok() {
this.$refs.grid.reload(this.easySearch);
this.modal = false;
......@@ -291,8 +324,7 @@ export default {
cancel() {
this.curId = 0;
this.modal = false;
},
send(row) {}
}
},
watch: {
nodeInfo: {
......
<template>
<div class="submit" :style="{ height: divHeight }">
<div class="body-procee">
<div class="new-detail" v-if="osrOneList1">
<Row>
<Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" name="状态:">
<State code="materail.category.status" :value="parseInt(entity.status)" />
</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述:">{{entity.description}}</Filed>
</Row>
</div>
<Table
:loading="loading"
border
:columns="columns"
:data="dataList"
class="tableCommon"
v-if="osrOneList2"
></Table>
<Process ref="userProcess" schemaIdVal="b6303ddc-8b5e-40a3-a51b-294657d1d913" />
<div slot="footer">
<Button @click="modalInfo">取消</Button>
<Button type="primary" @click="upSave">确定送审</Button>
</div>
<!-- 信息提示 -->
<Modal
v-model="ModalInfo"
title="信息提示"
width="600"
:mask-closable="false"
:scrollable="true"
ok-text="确定"
cancel-text="取消"
>
{{ metCodesStrTxt }}
<div slot="footer">
<Button @click="ModalInfo = false">取消</Button>
<Button type="primary" @click="modalInfoOk">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Process from "@/components/orderOperator/process";
import Api from "./api";
export default {
name: "orderSendReview",
components: {
Process
},
props: ["eid", "rowsTable"],
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
rowId: "",
entity: {},
metCodesStrTxt: "",
results: {},
loading: false,
ModalInfo: false,
divHeight: "300px",
osrOneList1: false, //一条数据显示
osrOneList2: false,
info: true,
ruleValidate: {},
orderSearchForm: {
reviewUser: "" //订单名称
},
dataList: [],
dataListRetrun: [], //确定后返回数据
dataListRetrunNew: {
schemaId: "b6303ddc-8b5e-40a3-a51b-294657d1d913", //合格证流程id:schemaId
idList: [], //合格证id List
codeList: [], //合格证编号List
operatorIdList: [] //操作员id
}, //确定后返回数据
columns: [
{
key: "code",
title: "编码",
align: "left",
render: (h, params) => {
return h(
"a",
{
props: {},
on: {
click: () => this.details(params.row.id)
}
},
params.row.code
);
}
},
{
key: "name",
title: "名称",
align: "left"
},
{
key: "status",
title: "状态",
align: "left",
render: (h, params) => {
return h("state", {
props: {
code: "materail.category.status",
type: "text",
value: params.row.status + ""
}
});
}
},
{
key: "version",
title: "版本",
align: "left"
},
{
key: "description",
title: "描述",
align: "left"
}
]
};
},
created() {
var theight = window.innerHeight - 120 + "px";
this.divHeight = theight;
if (this.eid !== 0) {
this.osrOneList1 = true;
this.osrOneList2 = false;
this.getDetails(this.eid);
} else {
this.osrOneList1 = false;
this.osrOneList2 = true;
this.dataList = this.rowsTable;
}
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 120 + "px";
})();
};
},
methods: {
getDetails(v) {
Api.get({ id: v }).then(r => {
if (r.result) {
this.entity = r.result;
}
});
},
returnDataList() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
alert(JSON.stringify(this.dataListRetrunNew));
// //返回审批数据
return this.dataListRetrunNew;
},
upSave() {
let codeList = [];
let idList = [];
idList.push(this.rowId);
codeList.push(this.entity.code);
if (this.eid !== 0) {
idList.push(this.rowId);
codeList.push(this.entity.code);
} else {
this.rowsTable.forEach(e => {
idList.push(e.id);
codeList.push(e.code);
});
}
this.dataListRetrunNew.idList = idList;
this.dataListRetrunNew.codeList = codeList;
let metCodesStr = JSON.stringify(codeList)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定物料 " + metCodesStr + "?";
this.ModalInfo = true;
alert(this.dataListRetrunNew.idList);
alert(this.dataListRetrunNew.codeList);
},
modalInfoOk() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
Api.batchstart(this.dataListRetrunNew).then(r => {
if (r.success) {
this.ModalInfo = false;
this.$Message.success("送审成功");
this.$emit("on-close");
this.$emit("on-ok");
}
});
},
modalInfo() {
this.$emit("on-close");
}
}
};
</script>
<style lang="less">
.submit {
.body-procee {
width: 80%;
margin: 0 auto;
}
}
</style>
......@@ -28,12 +28,12 @@
</RadioGroup>
</FormItem>
</Col>
<Col span="12">
<Col span="8">
<FormItem :label="l('capabilityValue')">
<InputNumber v-model="entity.capabilityValue"></InputNumber>
</FormItem>
</Col>
<Col span="4">
<Col span="8">
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
</FormItem>
......@@ -308,8 +308,6 @@ export default {
.form-row {
width: 600px;
margin-left: 50px;
margin-top: -45px;
.ivu-form-item-label {
color: #fff !important;
}
......
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