Merge remote-tracking branch 'origin/master'

master
wws 10 months ago
commit 692bf0b939

@ -0,0 +1,56 @@
import request from '@/utils/request'
// 获取工厂下拉列表
export function getBoardFactory(data) {
return request({
url: 'http://192.168.202.34:30000/prod-api/mes/wcsInterface/getBoardFactory',
method: 'post',
data: data
});
}
// 获取班次
export function getBoardShifts(data) {
return request({
url: '/mes/wcsInterface/getBoardShifts',
method: 'post',
data: data
});
}
// 获取待维修的维修工单接口
export function getRepairWorkOrder(data) {
return request({
url: '/device/deviceInterface/getRepairWorkOrder',
method: 'get',
params: data,
});
}
// 获取设备信息接口
export function getEquipmentInfo(data) {
return request({
url: '/device/deviceInterface/getEquipmentInfo',
method: 'get',
params: data
});
}
// 获取维修质量信息TOP10接口
export function getRepairQuantity(data) {
return request({
url: '/device/deviceInterface/getRepairQuantity',
method: 'get',
params: data
});
}
// 完好设备占比
export function equipmentIntactRate(data) {
return request({
url: '/device/deviceInterface/equipmentIntactRate',
method: 'get',
params: data
});
}// 设备稳定性
export function equipmentStability(data) {
return request({
url: '/device/deviceInterface/equipmentStability',
method: 'get',
params: data
});
}

@ -24,6 +24,7 @@ const service = axios.create({
service.interceptors.request.use(config => {
if(localStorage.getItem('USER_POOL_NAME_CURRENT')){
config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT');
console.log(localStorage.getItem('USER_POOL_NAME_CURRENT'))
}
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
@ -34,6 +35,9 @@ service.interceptors.request.use(config => {
}
// get请求映射params参数
if (config.method === 'get' && config.params) {
if(config.params.poolName){
config.headers['poolName'] = config.params.poolName;
}
let url = config.url + '?' + tansParams(config.params);
url = url.slice(0, -1);
config.params = {};

@ -117,6 +117,24 @@
restore: {},
saveAsImage: {}
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
let result="";
for (let i = 0; i < params.length; i++) {
if(params[i].data!=0){
result+=params[i].marker + params[i].seriesName + '' + params[i].data + '<br>'
}
}
return params[0].name + '<br/>'
+ result
}
}
})
}

@ -22,14 +22,13 @@
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select>
</div>
<div class="selectborder selectborder1">
<!-- <div class="selectborder selectborder1">
<select v-model="selectxtclasses" class="select1" @change="selectline2(selectxtclasses)">
<option :key="index" :value="x.shiftId" v-for="(x, index) in classesList">
{{ x.shiftDesc }}
</option>
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select>
</div>
</div> -->
</div>
<div class="timebox">
<div class="time">
@ -58,13 +57,13 @@
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in getlist">
<td style="width: 8%;">1</td>
<td style="width: 18%;">测试设备</td>
<td style="width: 20%;">测试部门1</td>
<td style="width: 10%;">在用</td>
<td style="width: 12%;">10%</td>
<td style="width: 12%;">90%</td>
v-for="(n, index) in equipmentlist">
<td style="width: 8%;">{{index+1}}</td>
<td style="width: 18%;">{{n.equipmentName}}</td>
<td style="width: 20%;">{{n.department}}</td>
<td style="width: 10%;">{{n.equipmentStatus}}</td>
<td style="width: 12%;">{{n.failureRate !=null ?n.failureRate+'%':'--'}}</td>
<td style="width: 12%;">{{n.utilizationRatio !=null?n.utilizationRatio+'%':'--'}}</td>
</tr>
</tbody>
</table>
@ -95,15 +94,15 @@
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in getlist">
<td style="width: 8%;">1</td>
<td style="width: 12%;">测试设备</td>
<td style="width: 12%;">BM000001</td>
<td style="width: 12%;">位置1</td>
<td style="width: 12%;">故障原因1</td>
<td style="width: 12%;">维修组</td>
<td style="width: 10%;"></td>
<td style="width: 18%;">2023-11-07 08:30:33</td>
v-for="(n, index) in repairlist">
<td style="width: 8%;">{{index+1}}</td>
<td style="width: 12%;">{{n.equipmentName}}</td>
<td style="width: 12%;">{{n.equipmentCode}}</td>
<td style="width: 12%;">{{n.equipmentLocation}}</td>
<td style="width: 12%;">{{n.workFaultDesc}}</td>
<td style="width: 12%;">{{n.teamName}}</td>
<td style="width: 10%;">{{n.workHandle}}</td>
<td style="width: 18%;">{{n.workPlanTime}}</td>
</tr>
</tbody>
</table>
@ -122,7 +121,7 @@
<div class="box">
<div class="number">
<span class="number1">
24
{{equipmentinfo.totalEquipment}}
</span>
<span class="name1">
@ -134,22 +133,22 @@
</div>
<div class="box">
<div class="number">
<span class="number1">
24
<span class="number1" style="color: #FF4D4F;">
{{equipmentinfo.faultEquipment}}
</span>
<span class="name1">
</span>
</div>
<div class="name2">
设备总数
故障总数
</div>
</div>
</div>
</div>
</div>
<div class="itembottom">
<div class="item-table item-table1">
<!-- <div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">设备综合效率</div>
</div>
@ -164,7 +163,6 @@
</thead>
</table>
<div class="table-tbody">
<!-- <vue-seamless-scroll :data="getlistcx" :class-option="classOption" class="wrapscroll"> -->
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
@ -175,9 +173,8 @@
</tr>
</tbody>
</table>
<!-- </vue-seamless-scroll> -->
</div>
</div>
</div> -->
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">设备稳定性</div>
@ -197,10 +194,10 @@
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in getlist">
<td style="width: 8%;">1</td>
<td style="width: 12%;">测试设备</td>
<td style="width: 12%;">88%</td>
v-for="(n, index) in equipmentstabilizelist">
<td style="width: 8%;">{{index+1}}</td>
<td style="width: 12%;">{{n.equipmentCode}}</td>
<td style="width: 12%;">{{n.mtbf !=null ?n.mtbf+'%':'--'}}</td>
</tr>
</tbody>
</table>
@ -226,10 +223,10 @@
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in getlist">
<td style="width: 8%;">1</td>
<td style="width: 12%;">测试设备</td>
<td style="width: 12%;">88%</td>
v-for="(n, index) in equipmentrepairlist">
<td style="width: 8%;">{{index+1}}</td>
<td style="width: 12%;">{{n.equipmentName}}</td>
<td style="width: 12%;">{{n.rapairQuantity !=null ?n.rapairQuantity+'%':'--'}}</td>
</tr>
</tbody>
</table>
@ -249,7 +246,12 @@ import {
getBoardFactory,
getMesBoardEquProductionToday,
getBoardShifts,
} from "@/api/kanban/dailyoutput";
getRepairWorkOrder,
getEquipmentInfo,
getRepairQuantity,
equipmentIntactRate,
equipmentStability,
} from "@/api/kanban/equipment";
import * as echarts from "echarts";
import moment from "moment";
// import Echarts3D from "./echarts3d.vue";
@ -302,8 +304,193 @@ export default {
},
{
},
},
],
repairlist: [],
equipmentlist: [],
equipmentrepairlist: [],
equipmentstabilizelist: [],
equipmentinfo: [],
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "999",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1000",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1001",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1010",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "(OEM)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1011",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1020",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "西",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1030",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1040",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "(OEM)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1041",
// "children": []
// },
};
},
created() { },
@ -313,10 +500,10 @@ export default {
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone)
//console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectFactorylist();
this.gettime();
this.initChart1();
},
methods: {
back() {
@ -336,27 +523,61 @@ export default {
if (response.data) {
_this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName;
getBoardShifts({
factory: _this.selectxt,
}).then((response) => {
if (response.data) {
console.log(response.data);
_this.classesList = response.data;
_this.selectxtclasses = _this.classesList[0].shiftId;
_this.initChart1();
_this.time1 = setInterval(() => {
_this.initChart1();
}, 1000 * 60 * 1);
}
_this.getdatalist(_this.selectxt)
}
});
},
getdatalist(Name) {
const _this = this;
let poolName = 'ds_' + Name
getRepairWorkOrder({
poolName: poolName,
}).then((response) => {
if(response.data){
response.data.forEach((item) => {
item.workPlanTime = moment(item.workPlanTime).format('YYYY-MM-DD HH:mm:ss')
});
_this.repairlist = response.data
}
});
getEquipmentInfo({
poolName: poolName,
}).then((response) => {
if(response.data){
_this.equipmentlist = response.data
}
});
getRepairQuantity({
poolName: poolName,
}).then((response) => {
if(response.data){
_this.equipmentrepairlist = response.data
}
});
equipmentIntactRate({
poolName: poolName,
}).then((response) => {
if(response.data){
_this.equipmentinfo = response.data
_this.initChart1()
}
});
equipmentStability({
poolName: poolName,
}).then((response) => {
if(response.data){
_this.equipmentstabilizelist = response.data
}
});
},
initChart1() {
const _this = this
let intactRate = 0
let numberAngle = 180
if(_this.equipmentinfo.intactRate){
intactRate = _this.equipmentinfo.intactRate
numberAngle = parseInt(_this.equipmentinfo.intactRate)*1.8 - 180
}
var myChart1 = echarts.init(document.querySelector("#echart1"));
var option1 = {
//
@ -517,7 +738,7 @@ export default {
//
radius: 115,
// 090180
startAngle: 18,
startAngle: numberAngle,
//
endAngle: 0,
center: ["50%", "100%"],
@ -579,7 +800,6 @@ export default {
show: false,
},
},
{
//
color: "#fff",
@ -671,7 +891,7 @@ export default {
},
data: [
{
value: 10,
value: intactRate,
},
],
@ -686,20 +906,9 @@ export default {
this.optionDatalist2 = [];
this.optionDatalist3 = [];
this.optionDatalist4 = [];
getBoardShifts({
factory: _this.selectxt,
}).then((response) => {
if (response.data) {
console.log(response.data);
_this.classesList = response.data;
_this.selectxtclasses = _this.classesList[0].shiftId;
_this.initChart1();
}
});
},
selectline2() {
this.initChart1();
_this.getdatalist(_this.selectxt)
},
//
},
};
@ -827,6 +1036,7 @@ export default {
// width: 1775px;
margin: auto;
overflow-y: scroll;
table {
width: 100%;
@ -928,6 +1138,7 @@ export default {
margin-top: 19px;
display: flex;
justify-content: space-around;
.item-table {
width: 610px;
height: 292px;
@ -938,7 +1149,7 @@ export default {
box-sizing: border-box;
.table-thead {
width: 1197px;
width: 100%;
height: 44px;
margin: auto;
background: #0A1A33;
@ -978,13 +1189,18 @@ export default {
}
}
.item-table1:first-child {
margin-right: 10px;
}
.item-table1 {
flex: 1;
margin-top: 20px;
padding-top: 19px;
.table-thead {
width: 565.01px;
}
// .table-thead {
// width: 565.01px;
// }
.table-tbody {
height: 144px;
@ -1026,7 +1242,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-around;
width: 310px;
width: 350px;
margin-left: 50px;
}
@ -1140,6 +1356,7 @@ export default {
.active2 {
// background-color: #04060E;
}
::-webkit-scrollbar {
width: 3px;
height: 0px;
@ -1158,5 +1375,4 @@ export default {
border-radius: 8px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #0091ff;
}
</style>
}</style>

@ -7,7 +7,7 @@
<div class="head-container">
<el-input
v-model="groupName"
placeholder="请输入部门名称"
placeholder="请输入物料名称"
clearable
size="small"
prefix-icon="el-icon-search"

@ -109,10 +109,11 @@
<el-table-column label="标准值" align="center" prop="standardValue" />
<el-table-column label="上差值" align="center" prop="upperDiff" />
<el-table-column label="下差值" align="center" prop="downDiff" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="抽样比例" align="center" prop="sample" />
<el-table-column label="抽样数量" align="center" prop="sampleNum" />
<el-table-column
label="是否启用,0是1否"
label="是否启用"
align="center"
prop="status"
/>

Loading…
Cancel
Save