更新
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@select-changed="handleSearchBarChanged"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
@@ -23,8 +24,14 @@ import basicPage from '../../mixins/basic-page';
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { getLineBindProcessLogPage } from '@/api/core/base/lineBindProcess';
|
||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||
import { getPdList } from '@/api/core/monitoring/auto';
|
||||
import { getFactoryPage } from '@/api/core/base/factory';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂'
|
||||
},
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线',
|
||||
@@ -49,15 +56,24 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
optionArrUrl: [getProductionLinePage],
|
||||
optionArrUrl: [getFactoryPage,getProductionLinePage],
|
||||
listQuery: {
|
||||
productionLineId: [],
|
||||
},
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工厂',
|
||||
selectOptions: [],
|
||||
param: 'factoryId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'productionLineId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
multiple: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -99,6 +115,13 @@ export default {
|
||||
this.getArr();
|
||||
},
|
||||
methods: {
|
||||
handleSearchBarChanged({ param, value }) {
|
||||
this.listQuery.productionLineId = [];
|
||||
this.$refs.searchBarForm.formInline.productionLineId = undefined;
|
||||
getPdList(value).then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || [];
|
||||
});
|
||||
},
|
||||
getArr() {
|
||||
const params = {
|
||||
page: 1,
|
||||
@@ -115,7 +138,8 @@ export default {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productionLineId = val.productionLineId;
|
||||
this.listQuery.factoryId = val.factoryId || undefined;
|
||||
this.listQuery.productionLineId = val.productionLineId || [];
|
||||
this.listQuery.processDict = val.processDict;
|
||||
this.listQuery.recordTime = val.startTime
|
||||
? [val.startTime[0], val.startTime[1].substr(0, 10) + ' 23:59:59']
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@select-changed="handleSearchBarChanged"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
@@ -24,8 +25,14 @@ import { parseTime } from '../../mixins/code-filter';
|
||||
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
|
||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||
import { getProductPage } from '@/api/core/base/product';
|
||||
import { getFactoryPage } from '@/api/core/base/factory';
|
||||
import { getPdList } from '@/api/core/monitoring/auto';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂'
|
||||
},
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
label: '产线',
|
||||
@@ -55,15 +62,24 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
optionArrUrl: [getProductionLinePage, getProductPage],
|
||||
listQuery: {
|
||||
productionLineId: [],
|
||||
},
|
||||
optionArrUrl: [getFactoryPage,getProductionLinePage, getProductPage],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工厂',
|
||||
selectOptions: [],
|
||||
param: 'factoryId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'productionLineId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
multiple: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -104,6 +120,13 @@ export default {
|
||||
this.getArr();
|
||||
},
|
||||
methods: {
|
||||
handleSearchBarChanged({ param, value }) {
|
||||
this.listQuery.productionLineId = [];
|
||||
this.$refs.searchBarForm.formInline.productionLineId = undefined;
|
||||
getPdList(value).then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || [];
|
||||
});
|
||||
},
|
||||
getArr() {
|
||||
const params = {
|
||||
page: 1,
|
||||
@@ -120,7 +143,8 @@ export default {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productionLineId = val.productionLineId;
|
||||
this.listQuery.factoryId = val.factoryId || undefined;
|
||||
this.listQuery.productionLineId = val.productionLineId || [];
|
||||
this.listQuery.productId = val.productId;
|
||||
this.listQuery.startTime = val.startTime ? val.startTime : null;
|
||||
this.getDataList();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@select-changed="handleSearchBarChanged"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
@@ -46,6 +47,8 @@ import {
|
||||
getWorkshopSectionPage,
|
||||
exportWorkshopSectionExcel
|
||||
} from "@/api/core/base/workshopSection";
|
||||
import { getPdList } from '@/api/core/monitoring/auto';
|
||||
import { getFactoryPage } from '@/api/core/base/factory';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@@ -56,6 +59,10 @@ const tableProps = [
|
||||
prop: 'name',
|
||||
label: '工段名称'
|
||||
},
|
||||
{
|
||||
prop: 'factoryName',
|
||||
label: '工厂'
|
||||
},
|
||||
{
|
||||
prop: 'productionLineName',
|
||||
label: '产线'
|
||||
@@ -99,8 +106,25 @@ export default {
|
||||
}
|
||||
: undefined,
|
||||
].filter((v)=>v),
|
||||
listQuery: {
|
||||
lineId: [],
|
||||
},
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '工厂',
|
||||
selectOptions: [],
|
||||
param: 'factoryId',
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: [],
|
||||
param: 'lineId',
|
||||
multiple: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工段名称',
|
||||
@@ -146,14 +170,37 @@ export default {
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
this.getPdLineList();
|
||||
},
|
||||
methods: {
|
||||
getPdLineList() {
|
||||
getPdList().then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || [];
|
||||
});
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
};
|
||||
getFactoryPage(params).then((res) => {
|
||||
this.formConfig[0].selectOptions = res.data.list || [];
|
||||
});
|
||||
},
|
||||
handleSearchBarChanged({ param, value }) {
|
||||
this.listQuery.lineId = [];
|
||||
this.$refs.searchBarForm.formInline.lineId = undefined;
|
||||
getPdList(value).then((res) => {
|
||||
this.formConfig[1].selectOptions = res.data || [];
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.factoryId = val.factoryId || undefined;
|
||||
this.listQuery.lineId = val.lineId || [];
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2025-01-07 10:53:31
|
||||
* @LastEditTime: 2025-01-14 09:53:23
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
@@ -30,7 +30,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import { getLineAuto, getPdList } from '@/api/core/monitoring/auto';
|
||||
import { getFactoryPage } from '@/api/core/base/factory';
|
||||
// import codeFilter from '../../mixins/code-filter'
|
||||
|
||||
Reference in New Issue
Block a user