This commit is contained in:
helloDy 2023-10-16 15:47:31 +08:00
parent 4a67e226e1
commit 2b355aaf8f
14 changed files with 161 additions and 123 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-09-18 10:44:07 # @LastEditTime: 2023-10-16 09:22:52
# @LastEditors: DY # @LastEditors: DY
# @Description: # @Description:
### ###
@ -12,9 +12,9 @@ ENV = 'development'
VUE_APP_TITLE = 产线监控系统 VUE_APP_TITLE = 产线监控系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48080' VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# VUE_APP_BASE_API = 'http://192.168.1.188:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080'
# 路由懒加载 # 路由懒加载

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-09-13 09:02:25 * @Date: 2023-09-13 09:02:25
* @LastEditTime: 2023-10-08 15:39:38 * @LastEditTime: 2023-10-16 14:56:58
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->

View File

@ -1,8 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<div v-if="tableData.length">
<base-table v-loading="dataListLoading" :span-method="mergeColumnHandler" :table-props="tableProps" :table-data="tableData" /> <base-table v-loading="dataListLoading" :span-method="mergeColumnHandler" :table-props="tableProps" :table-data="tableData" />
<SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" />
<balance-chart ref="lineChart" /> <balance-chart ref="lineChart" />
</div>
<div v-else class="no-data-bg"></div>
<!-- <pagination <!-- <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -89,7 +93,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
} }

View File

@ -1,8 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<div v-if="tableData.length">
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData" /> <base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData" />
<SearchBar :formConfigs="[{ label: '产品产量对比图', type: 'title' }]" />
<line-chart ref="lineChart" /> <line-chart ref="lineChart" />
</div>
<div v-else class="no-data-bg"></div>
<!-- <pagination <!-- <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -82,7 +86,7 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
} }
@ -101,6 +105,8 @@ export default {
this.optionArrUrl.forEach((item, index) => { this.optionArrUrl.forEach((item, index) => {
item(params).then((response) => { item(params).then((response) => {
this.formConfig[index].selectOptions = response.data.list this.formConfig[index].selectOptions = response.data.list
// this.formConfig[0].defaultSelect = response.data.list[0].id
this.$set(this.formConfig[0], 'defaultSelect', response.data.list[0].id)
}); });
}); });
}, },
@ -112,11 +118,13 @@ export default {
let arr = [ let arr = [
{ {
prop: 'lineName', prop: 'lineName',
label: '产线' label: '产线',
fixed: 'left'
}, },
{ {
prop: 'sum', prop: 'sum',
label: '合计' label: '合计',
fixed: 'left'
}, },
{ {
prop: res.data ? res.data.nameData[0].name : undefined, prop: res.data ? res.data.nameData[0].name : undefined,

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: DY
* @LastEditTime: 2023-08-01 16:59:06 * @LastEditTime: 2023-10-16 11:16:48
* @Description: * @Description:
--> -->
<template> <template>
@ -12,21 +12,30 @@
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="80px"> label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工厂编码" prop="code"> <el-form-item label="工厂编码" prop="code">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
clearable clearable
placeholder="请输入工厂编码" /> placeholder="请输入工厂编码" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工厂名称" prop="name"> <el-form-item label="工厂名称" prop="name">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
clearable clearable
placeholder="请输入工厂名称" /> placeholder="请输入工厂名称" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="地址" prop="address"> <el-form-item label="地址" prop="address">
<el-input v-model="dataForm.address" clearable placeholder="请输入地址" /> <el-input v-model="dataForm.address" clearable placeholder="请输入地址" />
</el-form-item> </el-form-item>
</el-col>
<!-- <el-form-item label="启用状态" prop="enabled"> <!-- <el-form-item label="启用状态" prop="enabled">
<el-select <el-select
v-model="dataForm.enabled" v-model="dataForm.enabled"
@ -38,9 +47,12 @@
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-col :span="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" /> <el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>

View File

@ -29,7 +29,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="70%"> width="50%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>

View File

@ -28,24 +28,20 @@ import { getProductPage } from '@/api/core/base/product';
const tableProps = [ const tableProps = [
{ {
prop: 'productionLineName', prop: 'productionLineName',
label: '产线', label: '产线'
align: 'center',
}, },
{ {
prop: 'productName', prop: 'productName',
label: '在制产品', label: '在制产品'
align: 'center',
}, },
{ {
prop: 'startTime', prop: 'startTime',
label: '开始时间', label: '开始时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
{ {
prop: 'endTime', prop: 'endTime',
label: '结束时间', label: '结束时间',
align: 'center',
filter: parseTime, filter: parseTime,
}, },
]; ];

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2023-09-21 10:48:54 * @LastEditTime: 2023-10-16 13:40:00
* @Description: * @Description:
--> -->
<template> <template>
@ -12,18 +12,26 @@
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="90px"> label-width="90px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工段编码" prop="code"> <el-form-item label="工段编码" prop="code">
<el-input <el-input
v-model="dataForm.code" v-model="dataForm.code"
clearable clearable
placeholder="请输入工段编码" /> placeholder="请输入工段编码" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工段名称" prop="name"> <el-form-item label="工段名称" prop="name">
<el-input <el-input
v-model="dataForm.name" v-model="dataForm.name"
clearable clearable
placeholder="请输入工段名称" /> placeholder="请输入工段名称" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="productionLineId" label="产线"> <el-form-item prop="productionLineId" label="产线">
<el-select <el-select
v-model="dataForm.productionLineId" filterable clearable placeholder="请选择产线"> v-model="dataForm.productionLineId" filterable clearable placeholder="请选择产线">
@ -36,9 +44,13 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="排序" prop="sort"> <el-form-item label="排序" prop="sort">
<el-input-number v-model="dataForm.sort" :min="1" :max="100" clearable placeholder="请输入排序" /> <el-input-number v-model="dataForm.sort" :min="1" :max="100" clearable placeholder="请输入排序" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" /> <el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
</el-form-item> </el-form-item>

View File

@ -29,7 +29,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width="70%"> width="50%">
<add-or-update <add-or-update
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update> @refreshDataList="successSubmit"></add-or-update>
@ -50,34 +50,28 @@ import {
const tableProps = [ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '工段编码', label: '工段编码'
align: 'center',
}, },
{ {
prop: 'name', prop: 'name',
label: '工段名称', label: '工段名称'
align: 'center',
}, },
{ {
prop: 'productionLineName', prop: 'productionLineName',
label: '产线', label: '产线'
align: 'center',
}, },
{ {
prop: 'sort', prop: 'sort',
label: '排序', label: '排序'
align: 'center',
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
align: 'center',
}, },
{ {
prop: 'createTime', prop: 'createTime',
label: '创建时间', label: '创建时间',
align: 'center', filter: parseTime
filter: parseTime,
}, },
]; ];
@ -119,14 +113,14 @@ export default {
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{ // {
type: 'separate', // type: 'separate',
}, // },
{ // {
type: 'button', // type: 'button',
btnName: '重置', // btnName: '',
name: 'reset', // name: 'reset',
}, // },
{ {
type: 'separate', type: 'separate',
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-08-29 14:59:29 * @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-10-13 11:03:11 * @LastEditTime: 2023-10-16 15:10:42
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -12,6 +12,7 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<base-table <base-table
v-if="showData.length"
class="right-aside" class="right-aside"
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="tableProps" :table-props="tableProps"
@ -22,6 +23,7 @@
@selection-change="selectChange" @selection-change="selectChange"
> >
</base-table> </base-table>
<div v-else class="no-data-bg"></div>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -195,7 +197,8 @@ export default {
type: 'button', type: 'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'warning', color: 'primary',
plain: true
} }
], ],
}; };

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-08-29 14:59:29 * @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-10-13 11:00:59 * @LastEditTime: 2023-10-16 15:18:23
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -12,6 +12,7 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<base-table <base-table
v-if="showData.length"
class="right-aside" class="right-aside"
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="tableProps" :table-props="tableProps"
@ -29,6 +30,7 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<div v-else class="no-data-bg"></div>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -145,7 +147,8 @@ export default {
type: 'button', type: 'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'warning', color: 'primary',
plain: true
} }
], ],
}; };

View File

@ -11,13 +11,14 @@
ref="search-bar" /> ref="search-bar" />
<el-skeleton v-if="initing" :rows="6" animated /> <el-skeleton v-if="initing" :rows="6" animated />
<!-- :span-method="mergeColumnHandler" --> <!-- :span-method="mergeColumnHandler" -->
<div v-else :class="{ 'no-data-bg': !tableData || tableData.length == 0 }">
<base-table <base-table
v-else v-if="tableData && tableData.length > 0"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData"
@emitFun="handleEmitFun"></base-table> @emitFun="handleEmitFun"
<!-- :page="queryParams.pageNo" />
:limit="queryParams.pageSize" --> </div>
</div> </div>
</template> </template>
@ -65,10 +66,10 @@ export default {
label: times.slice(0, 10) + ' ' + times.slice(11), label: times.slice(0, 10) + ' ' + times.slice(11),
align: 'center', align: 'center',
children: [ children: [
{ prop: times + '_in', label: '投入数量', align: 'center' }, { prop: times + '_in', label: '投入数量' },
{ prop: times + '_out', label: '产出数量', align: 'center' }, { prop: times + '_out', label: '产出数量' },
{ prop: times + '_junk', label: '报废数量', align: 'center' }, { prop: times + '_junk', label: '报废数量' },
{ prop: times + '_area', label: '产出面积', align: 'center' } { prop: times + '_area', label: '产出面积' }
] ]
} }
this.arr.push(subprop) this.arr.push(subprop)
@ -149,14 +150,14 @@ export default {
{ {
prop: 'proLineName', prop: 'proLineName',
label: '生产线', label: '生产线',
align: 'center', fixed: 'left',
fixed: 'left' showOverflowTooltip: true
}, },
{ {
prop: 'spec', prop: 'spec',
label: '产品规格', label: '产品规格',
align: 'center', fixed: 'left',
fixed: 'left' showOverflowTooltip: true
} }
] ]
this.buildProps(res.data.nameData); this.buildProps(res.data.nameData);

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-08-29 14:59:29 * @Date: 2023-08-29 14:59:29
* @LastEditTime: 2023-10-13 11:03:43 * @LastEditTime: 2023-10-16 15:19:04
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -13,6 +13,7 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<base-table <base-table
v-if="showData.length"
class="right-aside" class="right-aside"
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="tableProps" :table-props="tableProps"
@ -30,6 +31,7 @@
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<div v-else class="no-data-bg"></div>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -188,7 +190,8 @@ export default {
type: 'button', type: 'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'warning', color: 'primary',
plain: true
} }
], ],
}; };

View File

@ -6,13 +6,17 @@
@select-changed="handleSearchBarChanged" @select-changed="handleSearchBarChanged"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<base-table <base-table
v-if="showData.length"
class="right-aside" class="right-aside"
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="tableProps" :table-props="tableProps"
:table-data="showData" :page="listQuery.pageNo"
:limit="listQuery.pageSize"
:selectWidth="55" :selectWidth="55"
:table-data="showData"
@selection-change="selectChange" @selection-change="selectChange"
/> />
<div v-else class="no-data-bg"></div>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
@ -46,38 +50,31 @@ import html2canvas from 'html2canvas'
const tableProps = [ const tableProps = [
{ {
prop: 'proLineName', prop: 'proLineName',
label: '产线名称', label: '产线名称'
align: 'center',
}, },
{ {
prop: 'sectionName', prop: 'sectionName',
label: '工段名称', label: '工段名称'
align: 'center',
}, },
{ {
prop: 'inputNum', prop: 'inputNum',
label: '进片数量/片', label: '进片数量/片'
align: 'center',
}, },
{ {
prop: 'outputNum', prop: 'outputNum',
label: '出片数量/片', label: '出片数量/片'
align: 'center',
}, },
{ {
prop: 'lossNum', prop: 'lossNum',
label: '损耗数量/片', label: '损耗数量/片'
align: 'center',
}, },
{ {
prop: 'lossArea', prop: 'lossArea',
label: '损耗面积/m²', label: '损耗面积/m²'
align: 'center',
}, },
{ {
prop: 'lossRate', prop: 'lossRate',
label: '损耗比例/%', label: '损耗比例/%'
align: 'center',
} }
]; ];
@ -134,15 +131,20 @@ export default {
}, },
{ {
type: 'button', type: 'button',
btnName: '搜索', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
}, },
{
type: 'separate',
},
{ {
type: 'button', type: 'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
}, color: 'primary',
plain: true
}
], ],
}; };
}, },