Merge branch 'projects/mes-test' into projects/mes-dy
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
<template>
|
||||
<div class="app-container allow-overflow">
|
||||
<!-- 搜索工作栏 -->
|
||||
<small-title
|
||||
<!-- <small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
设备运行状态
|
||||
</small-title>
|
||||
</small-title> -->
|
||||
|
||||
<div
|
||||
class="graph"
|
||||
@@ -22,7 +22,8 @@
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
">
|
||||
<div class="blue-title">各设备加工数量</div>
|
||||
<!-- <div class="blue-title">各设备加工数量</div> -->
|
||||
<div class="blue-title">设备运行状态</div>
|
||||
<div class="legend">
|
||||
<div class="legend-item">
|
||||
<span class="icon blue"></span>
|
||||
@@ -41,22 +42,17 @@
|
||||
<span class="text">速度开动率</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="graph-grid">
|
||||
<div v-if="list.length" class="graph-grid">
|
||||
<div class="bg-grid grid-line">
|
||||
<div
|
||||
class="grid-item"
|
||||
v-for="item in list.length"
|
||||
:key="item"></div>
|
||||
<div class="grid-item" v-for="item in list.length" :key="item"></div>
|
||||
</div>
|
||||
|
||||
<div class="bg-grid grid-charts">
|
||||
<pie-chart
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
:value="item" />
|
||||
<pie-chart v-for="item in list" :key="item.id" :value="item" />
|
||||
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-data-bg" v-else></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -202,7 +202,9 @@ export default {
|
||||
];
|
||||
this.config.series[1].data = [
|
||||
{ name: '速度开动率', value: peEfficiency },
|
||||
{ name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
{ name: '', value: 100 },
|
||||
// { name: '速度开动率', value: peEfficiency },
|
||||
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||
];
|
||||
//
|
||||
this.textData = {
|
||||
|
||||
@@ -21,18 +21,15 @@ export default {
|
||||
chart: null,
|
||||
};
|
||||
},
|
||||
// watch: {
|
||||
// list: {
|
||||
// handler(listdata) {
|
||||
// if (listdata && listdata.length) {
|
||||
// console.log('[linechart] list changed', listdata);
|
||||
// const option = this.handleList(listdata);
|
||||
// this.setOption(option);
|
||||
// }
|
||||
// },
|
||||
// immediate: true,
|
||||
// },
|
||||
// },
|
||||
watch: {
|
||||
list: {
|
||||
handler(listdata) {
|
||||
this.setOption();
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
const opt = [];
|
||||
@@ -55,7 +52,7 @@ export default {
|
||||
},
|
||||
formatter: (params) => {
|
||||
const name = params[0].name;
|
||||
const goodRate = opt.find((item) => item[0] == name)[4];
|
||||
const goodRate = opt.find((item) => item[0] == name)[4] || '0';
|
||||
return `
|
||||
<h1 style="font-size: 18px; letter-spacing: 1px;">${
|
||||
params[0].axisValue
|
||||
@@ -109,6 +106,9 @@ export default {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisTick: { show: false },
|
||||
axisLabel: {
|
||||
rotate: 45,
|
||||
},
|
||||
data: opt.map((item) => item[0]),
|
||||
},
|
||||
yAxis: {
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="app-container" style="flex: 1; height: 1px; display: flex; flex-direction: column;">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<el-row>
|
||||
<el-col class="custom-tabs">
|
||||
<el-row type="flex" style="flex: 1;">
|
||||
<el-col class="custom-tabs" style="flex: 1;">
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
:stretch="true"
|
||||
@@ -32,7 +32,7 @@
|
||||
<div
|
||||
v-if="activeName == 'graph'"
|
||||
class="graph"
|
||||
style="height: 40vh; display: flex; flex-direction: column">
|
||||
style="height: 100%; display: flex; flex-direction: column">
|
||||
<div class="blue-title">各设备加工数量</div>
|
||||
<LineChart v-if="list && list.length" :list="list" />
|
||||
<div v-else class="no-data-bg"></div>
|
||||
@@ -63,13 +63,13 @@ export default {
|
||||
activeName: 'table', // defaults to 'table'
|
||||
searchBarFormConfig: [
|
||||
// 产品
|
||||
{
|
||||
__index: 'product',
|
||||
type: 'select',
|
||||
label: '产品',
|
||||
placeholder: '请选择产品',
|
||||
param: 'productId',
|
||||
},
|
||||
// {
|
||||
// __index: 'product',
|
||||
// type: 'select',
|
||||
// label: '产品',
|
||||
// placeholder: '请选择产品',
|
||||
// param: 'productId',
|
||||
// },
|
||||
// 产线
|
||||
{
|
||||
__index: 'line',
|
||||
@@ -156,17 +156,17 @@ export default {
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'inQuantity',
|
||||
label: '进片数量',
|
||||
label: '加工数量',
|
||||
},
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'outQuantity',
|
||||
label: '出片数量',
|
||||
label: '合格数量',
|
||||
},
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'nokQuantity',
|
||||
label: '破损/不合格数',
|
||||
label: '不合格数量',
|
||||
},
|
||||
{
|
||||
// width: 160,
|
||||
@@ -377,6 +377,9 @@ export default {
|
||||
}
|
||||
|
||||
:deep(.custom-tabs) {
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
}
|
||||
.el-tabs__header {
|
||||
margin-bottom: 8px;
|
||||
display: inline-block;
|
||||
@@ -389,6 +392,14 @@ export default {
|
||||
line-height: 36px !important;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
|
||||
#pane-graph {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.blue-title {
|
||||
|
||||
@@ -7,27 +7,30 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="alarm-handle">
|
||||
<DialogForm
|
||||
ref="orderForm"
|
||||
key="orderForm"
|
||||
v-model="orderForm"
|
||||
:disabled="readOnly"
|
||||
:has-files="false"
|
||||
label-position="top"
|
||||
:rows="orderFormRows" />
|
||||
<el-skeleton v-if="loading" />
|
||||
<div v-else>
|
||||
<DialogForm
|
||||
ref="orderForm"
|
||||
key="orderForm"
|
||||
v-model="orderForm"
|
||||
:disabled="readOnly"
|
||||
:has-files="false"
|
||||
label-position="top"
|
||||
:rows="orderFormRows" />
|
||||
|
||||
<small-title style="margin: 16px 0" :no-padding="true" size="sm">
|
||||
处理方式
|
||||
</small-title>
|
||||
<small-title style="margin: 16px 0" :no-padding="true" size="sm">
|
||||
处理方式
|
||||
</small-title>
|
||||
|
||||
<DialogForm
|
||||
key="handleMethodForm"
|
||||
ref="handleMethodForm"
|
||||
v-model="handleMethodForm"
|
||||
:disabled="readOnly"
|
||||
:has-files="true"
|
||||
label-position="top"
|
||||
:rows="handleMethodFormRows" />
|
||||
<DialogForm
|
||||
key="handleMethodForm"
|
||||
ref="handleMethodForm"
|
||||
v-model="handleMethodForm"
|
||||
:disabled="readOnly"
|
||||
:has-files="true"
|
||||
label-position="top"
|
||||
:rows="handleMethodFormRows" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -43,6 +46,7 @@ export default {
|
||||
components: { SmallTitle, DialogForm, Editor },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
orderForm: {
|
||||
id: null,
|
||||
equipment: null,
|
||||
@@ -82,6 +86,9 @@ export default {
|
||||
label: '处理人',
|
||||
prop: 'hander',
|
||||
url: '/base/core-worker/listAll',
|
||||
bind: {
|
||||
multiple: true,
|
||||
},
|
||||
rules: [
|
||||
{ required: true, message: '类型名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
@@ -122,9 +129,14 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDict().then(() => {
|
||||
this.init();
|
||||
});
|
||||
this.loading = true;
|
||||
this.getDict()
|
||||
.then(() => {
|
||||
this.init();
|
||||
})
|
||||
.catch((err) => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -139,8 +151,9 @@ export default {
|
||||
* 初始化
|
||||
*/
|
||||
async init() {
|
||||
this.initTop();
|
||||
this.initDown();
|
||||
await this.initTop();
|
||||
await this.initDown();
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -172,16 +185,19 @@ export default {
|
||||
this.$msgError('缺少报警日志id');
|
||||
this.$emit('close');
|
||||
}
|
||||
const url = '/base/equipment-alarm-hand/get';
|
||||
const url = '/base/equipment-alarm-hand/page'; // 经沟通,此处采用page接口的第一个返回值
|
||||
const { data, code } = await this.$axios({
|
||||
url: url,
|
||||
method: 'get',
|
||||
params: {
|
||||
id: this.logId,
|
||||
logId: this.logId,
|
||||
},
|
||||
});
|
||||
if (code == 0) {
|
||||
this.handleMethodForm = data;
|
||||
this.handleMethodForm = {
|
||||
...data.list[0],
|
||||
hander: data.list[0]?.hander?.split(',') || '',
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -213,7 +229,11 @@ export default {
|
||||
const { code, data } = await this.$axios({
|
||||
url: url + (this.handleMethodForm.id ? '/update' : '/create'),
|
||||
method: this.handleMethodForm.id ? 'put' : 'post',
|
||||
data: { ...this.handleMethodForm, logId: this.logId },
|
||||
data: {
|
||||
...this.handleMethodForm,
|
||||
hander: this.handleMethodForm.hander?.join(',') || '',
|
||||
logId: this.logId,
|
||||
},
|
||||
});
|
||||
if (code == 0) {
|
||||
return true;
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
:dataForm="form"
|
||||
:rows="formRows" /> -->
|
||||
|
||||
<el-row v-if="mode.includes('detail')" style="margin-bottom: 24px">
|
||||
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
|
||||
<el-row style="margin-bottom: 24px">
|
||||
<el-col :span="8">
|
||||
<div
|
||||
class="title"
|
||||
@@ -62,7 +63,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else style="margin-bottom: 24px" :gutter="20">
|
||||
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
|
||||
<el-form ref="form" :model="form">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
@@ -85,7 +86,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -132,8 +133,8 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="!mode.includes('detail')"
|
||||
@click="handleSave">
|
||||
保存
|
||||
@click="handleCancel">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user