This commit is contained in:
parent
96bff20959
commit
b924fb5af6
|
@ -864,6 +864,17 @@ const routes = [
|
|||
},
|
||||
"component": "wpm/mlog_dept6"
|
||||
},
|
||||
{
|
||||
"name": "mlogDept6Detail",
|
||||
"path": "/pm/mlogDept6Detail",
|
||||
"meta": {
|
||||
"title": "6车间",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mlog_dept6"],
|
||||
"hidden":true
|
||||
},
|
||||
"component": "wpm/mlog_dept6_detail"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -2242,37 +2253,124 @@ const routes = [
|
|||
"icon": "el-icon-histogram",
|
||||
"perms": ["bigScreenP"],
|
||||
},
|
||||
children:[
|
||||
"children": [
|
||||
//生产统计
|
||||
{
|
||||
"path": "/product_statistics",
|
||||
"name": "product_statistics",
|
||||
"name": "statistic",
|
||||
"path": "/statistic1",
|
||||
"meta": {
|
||||
"title": "生产统计",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"perms": ["bigScreenP"],
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/product_statistics.vue"
|
||||
"children": [
|
||||
{
|
||||
"name": "pass_num",
|
||||
"path": "/statistic/pass_num",
|
||||
"meta": {
|
||||
"title": "合格数统计",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/pass_num.vue"
|
||||
},
|
||||
{
|
||||
"name": "task_rate",
|
||||
"path": "/statistic/task_rate",
|
||||
"meta": {
|
||||
"title": "任务进度",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/task_rate.vue"
|
||||
},
|
||||
{
|
||||
"name": "ppass_num",
|
||||
"path": "/statistic/ppass_num",
|
||||
"meta": {
|
||||
"title": "工序合格数",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/ppass_num.vue"
|
||||
},
|
||||
]
|
||||
},
|
||||
//检验统计
|
||||
{
|
||||
"path": "/quality_statistics",
|
||||
"name": "quality_statistics",
|
||||
"name": "statistic",
|
||||
"path": "/statistic2",
|
||||
"meta": {
|
||||
"title": "质量统计",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"perms": ["bigScreenP"],
|
||||
"title": "检验统计",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/quality_statistics.vue"
|
||||
},
|
||||
{
|
||||
"path": "/sale_statistics",
|
||||
"name": "sale_statistics",
|
||||
"meta": {
|
||||
"title": "销售统计",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"perms": ["bigScreenP"],
|
||||
},
|
||||
"component": "statistics/sale_statistics.vue"
|
||||
"children": [
|
||||
{
|
||||
"name": "product_check",
|
||||
"path": "/statistic/product_check",
|
||||
"meta": {
|
||||
"title": "生产检验统计",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/product_check.vue"
|
||||
},
|
||||
{
|
||||
"name": "product_check2",
|
||||
"path": "/statistic/product_check2",
|
||||
"meta": {
|
||||
"title": "生产检验统计(粗加工)",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/product_check2.vue"
|
||||
},
|
||||
{
|
||||
"name": "inm_check",
|
||||
"path": "/statistic/inm_check",
|
||||
"meta": {
|
||||
"title": "库存检验统计",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/inm_check.vue"
|
||||
},
|
||||
{
|
||||
"name": "good_check",
|
||||
"path": "/statistic/good_check",
|
||||
"meta": {
|
||||
"title": "成品检验统计",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/good_check.vue"
|
||||
},
|
||||
{
|
||||
"name": "behavior_check",
|
||||
"path": "/statistic/behavior_check",
|
||||
"meta": {
|
||||
"title": "性能检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/behavior_check.vue"
|
||||
},
|
||||
{
|
||||
"name": "enter_check",
|
||||
"path": "/statistic/enter_check",
|
||||
"meta": {
|
||||
"title": "入厂检验",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["mtm"]
|
||||
},
|
||||
"component": "statistics/enter_check.vue"
|
||||
},
|
||||
]
|
||||
},
|
||||
//物料统计
|
||||
{
|
||||
"path": "/material_statistics",
|
||||
"name": "material_statistics",
|
||||
|
@ -2283,7 +2381,71 @@ const routes = [
|
|||
},
|
||||
"component": "statistics/material_statistics.vue"
|
||||
},
|
||||
//人员统计
|
||||
{
|
||||
"path": "/user_statistics",
|
||||
"name": "user_statistics",
|
||||
"meta": {
|
||||
"title": "人员统计",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"perms": ["bigScreenP"],
|
||||
},
|
||||
"component": "statistics/user_statistics.vue"
|
||||
},
|
||||
//主库存统计
|
||||
{
|
||||
"path": "/inm_statistics",
|
||||
"name": "inm_statistics",
|
||||
"meta": {
|
||||
"title": "主库存统计",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"perms": ["bigScreenP"],
|
||||
},
|
||||
"component": "statistics/inm_statistics.vue"
|
||||
},
|
||||
],
|
||||
// children:[
|
||||
// {
|
||||
// "path": "/product_statistics",
|
||||
// "name": "product_statistics",
|
||||
// "meta": {
|
||||
// "title": "生产统计",
|
||||
// "icon": "el-icon-trend-charts",
|
||||
// "perms": ["bigScreenP"],
|
||||
// },
|
||||
// "component": "statistics/product_statistics.vue"
|
||||
// },
|
||||
// {
|
||||
// "path": "/quality_statistics",
|
||||
// "name": "quality_statistics",
|
||||
// "meta": {
|
||||
// "title": "质量统计",
|
||||
// "icon": "el-icon-trend-charts",
|
||||
// "perms": ["bigScreenP"],
|
||||
// },
|
||||
// "component": "statistics/quality_statistics.vue"
|
||||
// },
|
||||
// {
|
||||
// "path": "/sale_statistics",
|
||||
// "name": "sale_statistics",
|
||||
// "meta": {
|
||||
// "title": "销售统计",
|
||||
// "icon": "el-icon-trend-charts",
|
||||
// "perms": ["bigScreenP"],
|
||||
// },
|
||||
// "component": "statistics/sale_statistics.vue"
|
||||
// },
|
||||
// {
|
||||
// "path": "/material_statistics",
|
||||
// "name": "material_statistics",
|
||||
// "meta": {
|
||||
// "title": "物料统计",
|
||||
// "icon": "el-icon-trend-charts",
|
||||
// "perms": ["bigScreenP"],
|
||||
// },
|
||||
// "component": "statistics/material_statistics.vue"
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
//报表
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<!-- <el-alert title="生产统计" type="success" style="margin-bottom:20px;"></el-alert> -->
|
||||
<el-row :gutter="10">
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
|
@ -19,17 +18,17 @@
|
|||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
<scEcharts height="300px" :option="option4"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
<scEcharts height="300px" :option="option5"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
<scEcharts height="300px" :option="option6"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -55,8 +54,8 @@
|
|||
return {
|
||||
option: {
|
||||
title: {
|
||||
text: '本周生产数量',
|
||||
// subtext: '生产数量',
|
||||
text: '管棒日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
|
@ -84,7 +83,7 @@
|
|||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '本月生产数量',
|
||||
text: 'AVG日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
|
@ -111,7 +110,7 @@
|
|||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '车间生产统计',
|
||||
text: '棒不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
|
@ -136,92 +135,84 @@
|
|||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: 'Radar Demo',
|
||||
subtext: '基础雷达(属性)图',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
radar: {
|
||||
radius: 100,
|
||||
center: ['50%', '55%'],
|
||||
indicator: [
|
||||
{ name: '销售', max: 100},
|
||||
{ name: '管理', max: 100},
|
||||
{ name: '信息技术', max: 100},
|
||||
{ name: '客服', max: 100},
|
||||
{ name: '研发', max: 100},
|
||||
{ name: '市场', max: 100}
|
||||
]
|
||||
},
|
||||
series: [{
|
||||
name: "SCUI",
|
||||
type: 'radar',
|
||||
areaStyle: {},
|
||||
data: [
|
||||
{
|
||||
value: [74, 90, 95, 65, 80, 31],
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: 'Kline Demo',
|
||||
subtext: '基础K线图',
|
||||
text: '管棒月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
data: ['2017-10-23', '2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27', '2017-10-28', '2017-10-29', '2017-10-30'],
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
scale: true,
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
type: 'k',
|
||||
data: [
|
||||
[2213.19,2199.31,2191.85,2224.63],
|
||||
[2203.89,2177.91,2173.86,2210.58],
|
||||
[2170.78,2174.12,2161.14,2179.65],
|
||||
[2179.05,2205.5,2179.05,2222.81],
|
||||
[2212.5,2231.17,2212.5,2236.07],
|
||||
[2227.86,2235.57,2219.44,2240.26],
|
||||
[2242.39,2246.3,2235.42,2255.21],
|
||||
[2246.96,2232.97,2221.38,2247.86]
|
||||
]
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: 'AVG月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option6: {
|
||||
title: {
|
||||
text: 'Gauge Demo',
|
||||
subtext: '基础仪表盘',
|
||||
text: '管不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
series: [{
|
||||
center: ['50%', '60%'],
|
||||
type: 'gauge',
|
||||
anchor: {
|
||||
show: true,
|
||||
showAbove: true,
|
||||
size: 20,
|
||||
itemStyle: {
|
||||
borderWidth: 5
|
||||
}
|
||||
},
|
||||
progress: {
|
||||
show: true
|
||||
},
|
||||
data: [{
|
||||
value: 70
|
||||
}]
|
||||
}]
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option4"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option5"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option6"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
option: {
|
||||
title: {
|
||||
text: '管棒日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: 'AVG日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '棒不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: '管棒月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: 'AVG月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option6: {
|
||||
title: {
|
||||
text: '管不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-row :gutter="15">
|
||||
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option1"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
option1: {
|
||||
title: {
|
||||
text: '预制棒',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '预制管',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,193 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option4"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option5"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
option: {
|
||||
title: {
|
||||
text: '主要原材料消耗',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '办公用品统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '成品统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: '入库统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: '辅助材料统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -1,45 +1,22 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
<scEcharts height="300px" :option="option1"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option4"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option5"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
|
@ -47,9 +24,9 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
option: {
|
||||
option1: {
|
||||
title: {
|
||||
text: '主要原材料消耗',
|
||||
text: '采购统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
|
@ -78,59 +55,7 @@
|
|||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '办公用品统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '成品统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: '入库统计',
|
||||
text: '消耗统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
|
@ -157,33 +82,6 @@
|
|||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: '辅助材料统计',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,249 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="query.type" clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option4"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query:{type:'',
|
||||
search:''
|
||||
},
|
||||
typeOptions:['周','月','年'],
|
||||
option: {
|
||||
title: {
|
||||
text: '预制棒(7车间)',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '预制棒(10车间)',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: 'AVG',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: '6车间',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
stack: 'Ad',
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
tableData:[
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-1',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-2',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-3',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-4',count_ok:200},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,99 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="query.type" clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<!-- <el-alert title="生产统计" type="success" style="margin-bottom:20px;"></el-alert> -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="工序" prop="process">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品编号" prop="number">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:'周',
|
||||
search:''
|
||||
},
|
||||
typeOptions:['周','月','年'],
|
||||
option: {
|
||||
title: {
|
||||
text: '本周生产数量',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
tableData:[
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-1',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-2',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-3',count_ok:200},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-4',count_ok:200},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="query.type" clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-card shadow="never" style="margin-bottom: 8px;">
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<scEcharts height="300px" :option="option1"></scEcharts>
|
||||
</el-col>
|
||||
<el-col :lg="16">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="出料数" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因及数量" align="center">
|
||||
<el-table-column label="炸纹" prop="count_n_zw">
|
||||
</el-table-column>
|
||||
<el-table-column label="条纹" prop="count_n_tw">
|
||||
</el-table-column>
|
||||
<el-table-column label="气泡" prop="count_n_qp">
|
||||
</el-table-column>
|
||||
<el-table-column label="弯曲" prop="count_n_wq">
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" prop="count_n_qt">
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" prop="count_n_qt">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card shadow="never" style="margin-bottom: 8px;">
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-col>
|
||||
<el-col :lg="16">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="出料数" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因及数量" align="center">
|
||||
<el-table-column label="椭圆/弯曲" prop="count_n_wq">
|
||||
</el-table-column>
|
||||
<el-table-column label="条纹" prop="count_n_tw">
|
||||
</el-table-column>
|
||||
<el-table-column label="断裂" prop="count_n_dl">
|
||||
</el-table-column>
|
||||
<el-table-column label="偏壁" prop="count_n_pb">
|
||||
</el-table-column>
|
||||
<el-table-column label="大小头" prop="count_n_dxt">
|
||||
</el-table-column>
|
||||
<el-table-column label="结石气绒" prop="count_n_jsqx">
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" prop="count_n_qt">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card shadow="never" style="margin-bottom: 8px;">
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="8">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-col>
|
||||
<el-col :lg="16">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="出料数" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因及数量" align="center">
|
||||
<el-table-column label="椭圆/弯曲" prop="count_n_wq">
|
||||
</el-table-column>
|
||||
<el-table-column label="条纹" prop="count_n_tw">
|
||||
</el-table-column>
|
||||
<el-table-column label="断裂" prop="count_n_dl">
|
||||
</el-table-column>
|
||||
<el-table-column label="偏壁" prop="count_n_pb">
|
||||
</el-table-column>
|
||||
<el-table-column label="大小头" prop="count_n_dxt">
|
||||
</el-table-column>
|
||||
<el-table-column label="结石气绒" prop="count_n_jsqx">
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" prop="count_n_qt">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query:{type:'',
|
||||
search:''
|
||||
},
|
||||
typeOptions:['周','月','年'],
|
||||
option1: {
|
||||
title: {
|
||||
text: '7车间',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '7车间预制棒',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 500, name: '合格数'},
|
||||
{value: 5, name: '炸纹'},
|
||||
{value: 2, name: '条纹'},
|
||||
{value: 6, name: '气泡'},
|
||||
{value: 3, name: '弯曲'},
|
||||
{value: 2, name: '其他'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '10车间',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '10车间预制管',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 300, name: '合格数'},
|
||||
{value: 2, name: '条纹'},
|
||||
{value: 5, name: '断裂'},
|
||||
{value: 6, name: '偏壁'},
|
||||
{value: 3, name: '大小头'},
|
||||
{value: 2, name: '结石气绒'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '退火',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '退火预制管',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 300, name: '合格数'},
|
||||
{value: 5, name: '椭圆/弯曲'},
|
||||
{value: 2, name: '条纹'},
|
||||
{value: 6, name: '断裂'},
|
||||
{value: 3, name: '偏壁'},
|
||||
{value: 2, name: '大小头'},
|
||||
{value: 3, name: '结石气绒'},
|
||||
{value: 4, name: '箱中破'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
tableData:[
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-1',count:300,count_ok:200,count_rate:66},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-2',count:300,count_ok:200,count_rate:66},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-3',countk:300,count_ok:200,count_rate:66},
|
||||
{id:1,date:'2023-12-11',name:'ZJ2-4',count:300,count_ok:200,count_rate:66},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,233 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-row :gutter="15">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option6"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="date">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
option: {
|
||||
title: {
|
||||
text: '管棒日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: 'AVG日合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '棒不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option4: {
|
||||
title: {
|
||||
text: '管棒月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'bar',
|
||||
barWidth: '15px',
|
||||
}]
|
||||
},
|
||||
option5: {
|
||||
title: {
|
||||
text: 'AVG月合格率',
|
||||
// subtext: '',
|
||||
},
|
||||
grid: {
|
||||
top: '80px'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
data: [110, 180, 120, 120, 60, 90, 110],
|
||||
type: 'line',
|
||||
}]
|
||||
},
|
||||
option6: {
|
||||
title: {
|
||||
text: '管不合格统计',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 1048, name: '搜索引擎'},
|
||||
{value: 735, name: '直接访问'},
|
||||
{value: 580, name: '邮件营销'},
|
||||
{value: 484, name: '联盟广告'},
|
||||
{value: 300, name: '视频广告'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,183 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="query.type" clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<!-- <el-alert title="生产统计" type="success" style="margin-bottom:20px;"></el-alert> -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option1"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option2"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="300px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="count_rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="count_rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="count_rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scEcharts from '@/components/scEcharts';
|
||||
|
||||
/**
|
||||
* 引入组件 @/components/scEcharts
|
||||
* 组件内部会自动加载主题 @/components/scEcharts/echarts-theme-T.js
|
||||
* 支持props包括 height,width,option
|
||||
* 组件export百度Echarts所有方法,使用方式: new scEcharts[fun]
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'chart',
|
||||
components: {
|
||||
scEcharts
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query:{type:'',
|
||||
search:''
|
||||
},
|
||||
typeOptions:['周','月','年'],
|
||||
option1: {
|
||||
title: {
|
||||
text: '7车间',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
color:['rgb(64,158,255)','orange'],
|
||||
series: [
|
||||
{
|
||||
name: '7车间完成率',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 20, name: '已完成'},
|
||||
{value: 3, name: '未完成'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option2: {
|
||||
title: {
|
||||
text: '10车间完成率',
|
||||
// subtext: '',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
color:['rgb(64,158,255)','orange'],
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 10, name: '已完成'},
|
||||
{value: 3, name: '未完成'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
option3: {
|
||||
title: {
|
||||
text: '6车间完成率',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
color:['rgb(64,158,255)','orange'],
|
||||
series: [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
center: ['50%', '60%'],
|
||||
label: false,
|
||||
data: [
|
||||
{value: 15, name: '已完成'},
|
||||
{value: 3, name: '未完成'},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
tableData:[
|
||||
{id:1,number:'20231210',count:300,count_rate:83,count_ok:250},
|
||||
{id:1,number:'20231211',count:300,count_rate:66,count_ok:200},
|
||||
{id:1,number:'20231212',count:300,count_rate:93,count_ok:280},
|
||||
{id:1,number:'20231213',count:300,count_rate:0,count_ok:0},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -273,6 +273,18 @@
|
|||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="合计">
|
||||
<el-input-number
|
||||
v-model="form.count_notok"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
placeholder="合计"
|
||||
disabled
|
||||
>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
|
@ -428,36 +440,43 @@ export default {
|
|||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
if (this.mode == "add") {
|
||||
this.form.mtask = this.mtask;
|
||||
this.form.handle_date = this.handledate;
|
||||
this.$API.wpm.mlog.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.mode == "edit") {
|
||||
this.$API.wpm.mlog.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
let sun = this.form.count_ok+this.form.count_notok;
|
||||
if(sun==this.form.count_real){
|
||||
if (this.mode == "add") {
|
||||
this.form.mtask = this.mtask;
|
||||
this.form.handle_date = this.handledate;
|
||||
this.$API.wpm.mlog.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.mode == "edit") {
|
||||
this.$API.wpm.mlog.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
}else{
|
||||
this.isSaveing = false;
|
||||
this.$message.error("合格总数与不合格总数与加工数量不对等");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,222 +1,125 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-aside style="width: 50%">
|
||||
<el-container>
|
||||
<!-- 当天任务列表 -->
|
||||
<el-header style="height:50%; padding: 0">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" />
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination
|
||||
@row-click="rowClick" hideDo>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="material">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.specification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="material">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" prop="start_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state !== 40">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-header>
|
||||
<!-- 各工序进度 -->
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<span style="font-size: 14px">各工序进度</span>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="tableprocess" row-key="id" stripe :hideDo="hideDo" :data="processList" @row-click="itemClick">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期" prop="start_date" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<!-- 当天任务列表 -->
|
||||
<el-header style="height:50%; padding: 0">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" />
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination
|
||||
@row-click="rowClick" hideDo>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="material">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.specification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="material">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" prop="start_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state !== 40">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-header>
|
||||
<!-- 各工序进度 -->
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<!-- 任务信息&&日志 -->
|
||||
<el-header style="height: 60%; padding: 0">
|
||||
<el-aside style="width: 50%">
|
||||
<el-container>
|
||||
<!-- 任务信息 -->
|
||||
<el-header style="height: 20%; padding: 0">
|
||||
<el-card style="width: 100%; height: 100%">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>任务信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">
|
||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">
|
||||
<span v-if="currentMtask.material_out_">{{currentMtask.material_out_.specification}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划数量">{{ currentMtask.count}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划日期">{{ currentMtask.start_date}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<span style="font-size: 14px">各工序进度</span>
|
||||
</div>
|
||||
</el-header>
|
||||
<!-- 日志 -->
|
||||
<el-main style="padding: 0;">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20">新增</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable ref="mtaskMlogs" :apiObj="apiObjMlog" row-key="id" :params="paramsMlog" stripe
|
||||
hidePagination hideDo>
|
||||
<el-table-column label="工序" prop="mgroup_name"></el-table-column>
|
||||
<el-table-column label="产品编号">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{scope.row.material_out_.number}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工设备" prop="equipment_name"></el-table-column>
|
||||
<el-table-column label="领用数量" prop="count_use"> </el-table-column>
|
||||
<el-table-column label="加工数量" prop="count_real"> </el-table-column>
|
||||
<el-table-column label="合格数量" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="不合格数量" align="center">
|
||||
<el-table-column prop="count_n_wq" label="弯曲"/>
|
||||
<el-table-column prop="count_n_zw" label="炸纹"/>
|
||||
<el-table-column prop="count_n_tw" label="条纹"/>
|
||||
<el-table-column prop="count_n_qp" label="气泡"/>
|
||||
<el-table-column prop="count_n_dl" label="断裂"/>
|
||||
<el-table-column prop="count_n_pb" label="偏壁"/>
|
||||
<el-table-column prop="count_n_dxt" label="大小头"/>
|
||||
<el-table-column prop="count_n_jsqx" label="结石气绒"/>
|
||||
<el-table-column prop="count_n_qt" label="其他"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="table_edit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link type="success" @click="table_show(scope.row)">
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main>
|
||||
<scTable ref="tableprocess" row-key="id" stripe :hideDo="hideDo" :data="processList" @row-click="itemClick">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期" prop="start_date" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-header>
|
||||
<!-- 车间库存 -->
|
||||
<el-main style="padding: 0;">
|
||||
</el-aside>
|
||||
<el-main class="nopadding">
|
||||
<!-- 车间库存 -->
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<span style="font-size: 14px">车间库存</span>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button>
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">入库</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe
|
||||
hidePagination hideDo>
|
||||
<el-table-column label="物料名" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.specification}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.model}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||
<el-table-column label="数量" prop="count" width="80">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<span style="font-size: 14px">车间库存</span>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button>
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">入库</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe
|
||||
hidePagination hideDo>
|
||||
<el-table-column label="物料名" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.specification}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="material">
|
||||
<template #default="scope">
|
||||
{{scope.row.material_.model}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" prop="batch"> </el-table-column>
|
||||
<el-table-column label="数量" prop="count" width="80">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<save-dialog
|
||||
v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mtask="mtask"
|
||||
:mgroup="mgroup"
|
||||
:handledate="handledate"
|
||||
:material_out="material_out"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"
|
||||
></save-dialog>
|
||||
<showDrawer ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
@closed="visibleDrawer = false">
|
||||
</showDrawer>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./mlog6_form.vue";
|
||||
import showDrawer from "./mlog_drawer.vue";
|
||||
export default {
|
||||
components: {
|
||||
saveDialog,showDrawer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
|
@ -229,8 +132,6 @@ export default {
|
|||
belong_dept_name: '6车间',
|
||||
date: '2023-10-24'
|
||||
},
|
||||
tableData: [],
|
||||
selection: [],
|
||||
processList: [],//工序进度
|
||||
state_: {
|
||||
10: '创建中',
|
||||
|
@ -239,18 +140,13 @@ export default {
|
|||
40: '已提交',
|
||||
},
|
||||
hideDo: true,
|
||||
currentMtask:{},
|
||||
apiObjWm: this.$API.wpm.wmaterial.list,
|
||||
apiObjMlog:null,
|
||||
paramsMlog:{
|
||||
mtask:''
|
||||
},
|
||||
paramsWm: {
|
||||
belong_dept__name: '6车间'
|
||||
},
|
||||
handledate:'',
|
||||
dialogSave:false,
|
||||
visibleDrawer:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -262,12 +158,6 @@ export default {
|
|||
tomio() {
|
||||
this.$router.push({ name: "mio" });
|
||||
},
|
||||
table_show(row) {
|
||||
this.visibleDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDrawer.open();
|
||||
});
|
||||
},
|
||||
//点击任务
|
||||
rowClick(row) {
|
||||
let that = this;
|
||||
|
@ -277,56 +167,22 @@ export default {
|
|||
},
|
||||
//工序详情
|
||||
itemClick(row){
|
||||
this.currentMtask = row;
|
||||
this.mgroup = row.mgroup;
|
||||
this.mtask = row.id;
|
||||
this.material_out = row.material_out_.id;
|
||||
this.handledate = row.start_date;
|
||||
this.paramsMlog.mtask = this.mtask;
|
||||
this.apiObjMlog = this.$API.wpm.mlog.list;
|
||||
// this.currentMtask = row;
|
||||
// this.mgroup = row.mgroup;
|
||||
// this.mtask = row.id;
|
||||
// this.material_out = row.material_out_.id;
|
||||
// this.handledate = row.start_date;
|
||||
// this.paramsMlog.mtask = this.mtask;
|
||||
// this.apiObjMlog = this.$API.wpm.mlog.list;
|
||||
this.$router.push({
|
||||
name: "mlogDept6Detail",
|
||||
query: { mtaskId: row.id }
|
||||
|
||||
});
|
||||
},
|
||||
handleQueryMtask(){
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//添加
|
||||
addMlog() {
|
||||
let that = this;
|
||||
if (that.currentMtask && that.currentMtask.id) {
|
||||
that.mgroup = that.currentMtask.mgroup;
|
||||
that.material_out = that.currentMtask.material_out;
|
||||
that.dialogSave = true;
|
||||
that.$nextTick(() => {
|
||||
that.$refs.saveDialog.open("add");
|
||||
});
|
||||
} else {
|
||||
that.$message.warning("请选择任务");
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialogSave = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.pm.mtask.delete.req(row.id).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.mtaskMlogs.refresh();
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
|
|
|
@ -0,0 +1,215 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<!-- 任务信息 -->
|
||||
<el-header style="height: 20%; padding: 0">
|
||||
<el-card style="width: 100%; height: 100%">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>任务信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">
|
||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">
|
||||
<span v-if="currentMtask.material_out_">{{currentMtask.material_out_.specification}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="计划数量">{{ currentMtask.count}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划日期">{{ currentMtask.start_date}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
<!-- 日志 -->
|
||||
<el-main style="padding: 0;">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20">新增</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable ref="mtaskMlogs" :apiObj="apiObj" row-key="id" :params="params" stripe
|
||||
hidePagination hideDo>
|
||||
<el-table-column label="工序" prop="mgroup_name"></el-table-column>
|
||||
<el-table-column label="产品编号">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{scope.row.material_out_.number}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工设备" prop="equipment_name"></el-table-column>
|
||||
<el-table-column label="领用数量" prop="count_use"> </el-table-column>
|
||||
<el-table-column label="加工数量" prop="count_real"> </el-table-column>
|
||||
<el-table-column label="合格数量" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="不合格数量" align="center">
|
||||
<el-table-column prop="count_n_wq" label="弯曲"/>
|
||||
<el-table-column prop="count_n_zw" label="炸纹"/>
|
||||
<el-table-column prop="count_n_tw" label="条纹"/>
|
||||
<el-table-column prop="count_n_qp" label="气泡"/>
|
||||
<el-table-column prop="count_n_dl" label="断裂"/>
|
||||
<el-table-column prop="count_n_pb" label="偏壁"/>
|
||||
<el-table-column prop="count_n_dxt" label="大小头"/>
|
||||
<el-table-column prop="count_n_jsqx" label="结石气绒"/>
|
||||
<el-table-column prop="count_n_qt" label="其他"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="table_edit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link type="success" @click="table_show(scope.row)">
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<save-dialog
|
||||
v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mtask="mtask"
|
||||
:mgroup="mgroup"
|
||||
:handledate="handledate"
|
||||
:material_out="material_out"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"
|
||||
></save-dialog>
|
||||
<showDrawer ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
@closed="visibleDrawer = false">
|
||||
</showDrawer>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./mlog6_form.vue";
|
||||
import showDrawer from "./mlog_drawer.vue";
|
||||
export default {
|
||||
components: {
|
||||
saveDialog,showDrawer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
state_: {
|
||||
10: '创建中',
|
||||
20: '已下达',
|
||||
30: '生产中',
|
||||
40: '已提交',
|
||||
},
|
||||
hideDo: true,
|
||||
currentMtask:{},
|
||||
apiObj:null,
|
||||
params:{
|
||||
mtask:''
|
||||
},
|
||||
handledate:'',
|
||||
dialogSave:false,
|
||||
visibleDrawer:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.mtaskId = this.$route.query.mtaskId;
|
||||
console.log(this.$route.query)
|
||||
debugger;
|
||||
this.getMtask(this.mtaskId);
|
||||
},
|
||||
methods: {
|
||||
getMtask(id){
|
||||
let that = this;
|
||||
this.$API.pm.mtask.item.req(id).then(res => {
|
||||
that.currentMtask = res;
|
||||
this.mgroup = res.mgroup;
|
||||
this.mtask = res.id;
|
||||
this.material_out = res.material_out_.id;
|
||||
this.handledate = res.start_date;
|
||||
|
||||
this.params.mtask = this.mtaskId;
|
||||
this.apiObj = this.$API.wpm.mlog.list;
|
||||
})
|
||||
},
|
||||
table_show(row) {
|
||||
this.visibleDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDrawer.open();
|
||||
});
|
||||
},
|
||||
|
||||
handleQueryMtask(){
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//添加
|
||||
addMlog() {
|
||||
let that = this;
|
||||
that.mgroup = that.currentMtask.mgroup;
|
||||
that.material_out = that.currentMtask.material_out;
|
||||
that.dialogSave = true;
|
||||
that.$nextTick(() => {
|
||||
that.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialogSave = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.pm.mtask.delete.req(row.id).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.mtaskMlogs.refresh();
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.tabsHeader {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
margin-top: 4px;
|
||||
z-index: 100
|
||||
}
|
||||
|
||||
.right-panel>*+* {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-main.nopadding {
|
||||
padding: 0 20px 0 20px
|
||||
}
|
||||
|
||||
.tableTitle {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
</style>
|
|
@ -1238,8 +1238,6 @@ export default {
|
|||
},
|
||||
//提交
|
||||
submit() {
|
||||
console.log(this.form);
|
||||
debugger;
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
|
@ -1286,42 +1284,42 @@ export default {
|
|||
});
|
||||
this.form.mlogb = newArr;
|
||||
}
|
||||
// let sun = this.form.count_ok+this.form.count_notok;
|
||||
// if(sun==this.form.count_real){
|
||||
|
||||
// }else{
|
||||
// this.isSaveing = false;
|
||||
// this.$message.error("合格总数与不合格总数与出管总数不对等");
|
||||
// }
|
||||
if (this.mode == "add") {
|
||||
this.$API.wpm.mlog.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.mode == "edit") {
|
||||
this.$API.wpm.mlog.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
let sun = this.form.count_ok+this.form.count_notok;
|
||||
if ((this.activeType == "7车间"||this.activeType == "10车间")&&sun!=this.form.count_real) {
|
||||
this.isSaveing = false;
|
||||
this.$message.error("合格总数与不合格总数与生产量/出管总数不对等");
|
||||
}else{
|
||||
if (this.mode == "add") {
|
||||
this.$API.wpm.mlog.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
} else if (this.mode == "edit") {
|
||||
this.$API.wpm.mlog.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue