Procházet zdrojové kódy

Merge branch 'test' into lb

pull/46/head
lb před 11 měsíci
rodič
revize
a7e81ad8fb
22 změnil soubory, kde provedl 426 přidání a 190 odebrání
  1. +1
    -1
      .env.dev
  2. +1
    -1
      package.json
  3. +8
    -1
      src/api/core/base/lineBindProductLog.js
  4. +15
    -0
      src/assets/icons/svg/changelogo.svg
  5. +1
    -1
      src/views/core/analysis/LineChart.vue
  6. +7
    -3
      src/views/core/analysis/balanceAnalysis/index.vue
  7. +13
    -5
      src/views/core/analysis/yieldAnalysis/index.vue
  8. +32
    -20
      src/views/core/base/factory/add-or-updata.vue
  9. +2
    -2
      src/views/core/base/factory/index.vue
  10. +12
    -16
      src/views/core/base/lineBindProduct/index.vue
  11. +5
    -3
      src/views/core/base/lineBindProduct/selectProduct.vue
  12. +2
    -6
      src/views/core/base/lineBindProductLog/index.vue
  13. +14
    -19
      src/views/core/base/product/index.vue
  14. +17
    -25
      src/views/core/base/productionLine/index.vue
  15. +40
    -28
      src/views/core/base/workshopSection/add-or-updata.vue
  16. +15
    -21
      src/views/core/base/workshopSection/index.vue
  17. +6
    -3
      src/views/core/monitoring/auto/index.vue
  18. +6
    -3
      src/views/core/monitoring/data/index.vue
  19. +13
    -12
      src/views/core/monitoring/data24/index.vue
  20. +6
    -3
      src/views/core/monitoring/sectionStatistics/index.vue
  21. +19
    -17
      src/views/core/monitoring/sectionStatisticsSearch/index.vue
  22. +191
    -0
      src/views/equipment/timing-diagram/components/gantt.js

+ 1
- 1
.env.dev Zobrazit soubor

@@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-09-18 10:44:07
# @LastEditTime: 2023-10-16 09:22:52
# @LastEditors: DY
# @Description:
###


+ 1
- 1
package.json Zobrazit soubor

@@ -75,7 +75,7 @@
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.8",
"vue-meta": "^2.4.0",
"vue-plugin-hiprint": "^0.0.54-fix",
"vue-plugin-hiprint": "0.0.54-fix",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.4.9",
"vue-video-player": "^5.0.2",


+ 8
- 1
src/api/core/base/lineBindProductLog.js Zobrazit soubor

@@ -1,3 +1,10 @@
/*
* @Author: Do not edit
* @Date: 2023-08-28 15:30:53
* @LastEditTime: 2023-10-13 17:08:33
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'

// 创建产线目前生产产品表 主要为更新
@@ -39,7 +46,7 @@ export function getLineBindProductLogPage(data) {
return request({
url: '/base/line-bind-product-log/page',
method: 'post',
data
data: data
})
}



+ 15
- 0
src/assets/icons/svg/changelogo.svg Zobrazit soubor

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>状态切换备份 3</title>
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon和插图" transform="translate(-877.000000, -246.000000)">
<g id="状态切换备份-3" transform="translate(885.000000, 254.000000) rotate(-270.000000) translate(-885.000000, -254.000000) translate(877.000000, 246.000000)">
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="15" height="15"></rect>
<g id="错误" transform="translate(0.000000, 0.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="6.4293957e-15" width="16" height="16"></rect>
<path d="M8,1 C11.85,1 15,4.15 15,8 C15,11.85 11.85,15 8,15 C4.15,15 1,11.85 1,8 C1,4.15 4.15,1 8,1 Z M8,2.19926499 C4.80249503,2.19926499 2.18635461,4.80959575 2.18635461,8 C2.18635461,11.1904043 4.80249503,13.800735 8,13.800735 C11.197505,13.800735 13.8136454,11.1904043 13.8136454,8 C13.8136454,4.80959575 11.197505,2.19926499 8,2.19926499 Z M9.18342887,4.39602962 C9.42080763,4.39602962 9.61773566,4.56921978 9.65474747,4.7961346 L9.66099805,4.87359881 L9.66052938,9.97276858 L10.1621026,9.47231604 C10.3071657,9.32725295 10.5223305,9.29501672 10.6985498,9.37560733 L10.7713701,9.41705393 L10.837514,9.47231606 C11.0033004,9.63810246 11.0217211,9.89545015 10.8927761,10.0815835 L10.837514,10.1477274 L9.52115984,11.4640816 C9.38457467,11.600698 9.17913638,11.6415719 9.00066062,11.5676398 C8.84450229,11.5029526 8.73591407,11.3615296 8.71120699,11.1977853 L8.70585968,11.1264012 L8.70585968,4.87359881 C8.70585968,4.60984463 8.91967469,4.39602962 9.18342887,4.39602962 Z M6.99933939,4.43236016 C7.15549771,4.49704738 7.26408594,4.63847045 7.28879302,4.80221473 L7.29414032,4.87359881 L7.29414032,11.1264012 C7.29414032,11.2530604 7.24382515,11.374532 7.15426356,11.4640936 C7.06470196,11.5536552 6.94323037,11.6039704 6.81657114,11.6039704 C6.68991191,11.6039704 6.56844032,11.5536552 6.47887872,11.4640936 C6.40722945,11.3924443 6.36069788,11.3003726 6.34495123,11.2015604 L6.33900196,11.1264012 L6.33858601,6.02634681 L5.83789738,6.52768395 C5.69283427,6.67274705 5.47766955,6.70498329 5.30145018,6.62439268 L5.22862992,6.58294608 L5.162486,6.52768394 C4.9966996,6.36189754 4.97827889,6.10454984 5.10722387,5.91841648 L5.162486,5.85227257 L6.47884017,4.53591839 C6.61542534,4.39930202 6.82086362,4.35842813 6.99933939,4.43236016 Z" id="形状结合" fill="#0B58FF"></path>
</g>
</g>
</g>
</g>
</svg>

+ 1
- 1
src/views/core/analysis/LineChart.vue Zobrazit soubor

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


+ 7
- 3
src/views/core/analysis/balanceAnalysis/index.vue Zobrazit soubor

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


+ 13
- 5
src/views/core/analysis/yieldAnalysis/index.vue Zobrazit soubor

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


+ 32
- 20
src/views/core/base/factory/add-or-updata.vue Zobrazit soubor

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



+ 2
- 2
src/views/core/base/factory/index.vue Zobrazit soubor

@@ -29,7 +29,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="70%">
width="50%">
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit"></add-or-update>
@@ -51,7 +51,7 @@ const tableProps = [
{
prop: 'code',
label: '工厂编码'
},
},
{
prop: 'name',
label: '工厂名称'


+ 12
- 16
src/views/core/base/lineBindProduct/index.vue Zobrazit soubor

@@ -2,15 +2,14 @@
* @Author: zwq
* @Date: 2023-08-02 15:12:42
* @LastEditors: DY
* @LastEditTime: 2023-10-10 16:49:03
* @LastEditTime: 2023-10-13 16:35:03
* @Description:
-->
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
:formConfigs="[{ label: '产线在制产品', type: 'title' }]"
ref="searchBarForm" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
@@ -36,20 +35,17 @@ import { getProductPage } from '@/api/core/base/product';
const tableProps = [
{
prop: 'lineName',
label: '产线',
align: 'center',
label: '产线'
},
{
prop: 'productName',
label: '在制产品',
align: 'center',
list: [],
subcomponent: selectProduct,
},
{
prop: 'recordTime',
label: '开始时间',
align: 'center',
filter: parseTime,
},
];
@@ -63,14 +59,14 @@ export default {
},
tableProps,
tableData: [],
formConfig: [
{
type: 'button',
btnName: '同步',
name: 'search',
color: 'primary',
},
],
// formConfig: [
// {
// type: 'button',
// btnName: '同步',
// name: 'search',
// color: 'primary',
// },
// ],
};
},
components: {},


+ 5
- 3
src/views/core/base/lineBindProduct/selectProduct.vue Zobrazit soubor

@@ -2,12 +2,11 @@
* @Author: zwq
* @Date: 2023-08-03 14:09:18
* @LastEditors: DY
* @LastEditTime: 2023-10-11 11:20:51
* @LastEditTime: 2023-10-13 16:47:25
* @Description:
-->
<template>
<div class="tableInner">
<el-input readonly v-model="list.productName" style="width: 50%;" ></el-input>
<el-popover
placement="top"
title="切换在制产品"
@@ -28,8 +27,11 @@
确定
</el-button>
</div>
<el-button type="text" slot="reference">切换</el-button>
<el-button type="text" slot="reference">
<svg-icon icon-class="changelogo"/>
</el-button>
</el-popover>
<el-input readonly v-model="list.productName" style="width: 50%;margin-left: 5px" ></el-input>
</div>
</template>
<script>


+ 2
- 6
src/views/core/base/lineBindProductLog/index.vue Zobrazit soubor

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


+ 14
- 19
src/views/core/base/product/index.vue Zobrazit soubor

@@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zwq
* @LastEditTime: 2023-08-03 15:22:53
* @LastEditors: DY
* @LastEditTime: 2023-10-13 10:27:00
* @Description:
-->
<template>
@@ -50,30 +50,25 @@ import {
const tableProps = [
{
prop: 'code',
label: '产品编码',
align: 'center',
label: '产品编码'
},
{
prop: 'name',
label: '产品名称',
align: 'center',
label: '产品名称'
},
{
prop: 'specifications',
label: '规格',
align: 'center',
label: '规格'
},
{
prop: 'unitDictValue',
label: '单位',
align: 'center',
subcomponent: unitDict,
},
{
prop: 'createTime',
label: '创建时间',
align: 'center',
filter: parseTime,
filter: parseTime
},
];

@@ -127,14 +122,14 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},


+ 17
- 25
src/views/core/base/productionLine/index.vue Zobrazit soubor

@@ -52,45 +52,37 @@ import {
const tableProps = [
{
prop: 'code',
label: '产线编码',
align: 'center',
label: '产线编码'
},
{
prop: 'name',
label: '产线名称',
align: 'center',
label: '产线名称'
},
{
prop: 'factoryName',
label: '工厂',
align: 'center',
label: '工厂'
},
{
prop: 'externalCode',
label: '额外编码',
align: 'center',
label: '额外编码'
},
{
prop: 'status',
label: '当前状态',
align: 'center',
filter: codeFilter('lineStatus'),
},
{
prop: 'description',
label: '描述',
align: 'center',
label: '描述'
},
{
prop: 'remark',
label: '备注',
align: 'center',
label: '备注'
},
{
prop: 'createTime',
label: '创建时间',
align: 'center',
filter: parseTime,
filter: parseTime
},
];

@@ -132,14 +124,14 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},
@@ -173,7 +165,7 @@ export default {
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
this.total = response.data.total;
this.listQuery.total = response.data.total;
this.getStatus(response.data.list);
this.dataListLoading = false;
});
@@ -195,7 +187,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;.7
this.listQuery.pageSize = 10;
this.listQuery.name = val.name;
this.getDataList();
break;


+ 40
- 28
src/views/core/base/workshopSection/add-or-updata.vue Zobrazit soubor

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


+ 15
- 21
src/views/core/base/workshopSection/index.vue Zobrazit soubor

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

@@ -119,14 +113,14 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
// {
// type: 'separate',
// },
// {
// type: 'button',
// btnName: '重置',
// name: 'reset',
// },
{
type: 'separate',
},


+ 6
- 3
src/views/core/monitoring/auto/index.vue Zobrazit soubor

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


+ 6
- 3
src/views/core/monitoring/data/index.vue Zobrazit soubor

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


+ 13
- 12
src/views/core/monitoring/data24/index.vue Zobrazit soubor

@@ -11,13 +11,14 @@
ref="search-bar" />
<el-skeleton v-if="initing" :rows="6" animated />
<!-- :span-method="mergeColumnHandler" -->
<div v-else :class="{ 'no-data-bg': !tableData || tableData.length == 0 }">
<base-table
v-else
v-if="tableData && tableData.length > 0"
:table-props="tableProps"
:table-data="tableData"
@emitFun="handleEmitFun"></base-table>
<!-- :page="queryParams.pageNo"
:limit="queryParams.pageSize" -->
@emitFun="handleEmitFun"
/>
</div>
</div>
</template>

@@ -65,10 +66,10 @@ export default {
label: times.slice(0, 10) + ' ' + times.slice(11),
align: 'center',
children: [
{ prop: times + '_in', label: '投入数量', align: 'center' },
{ prop: times + '_out', label: '产出数量', align: 'center' },
{ prop: times + '_junk', label: '报废数量', align: 'center' },
{ prop: times + '_area', label: '产出面积', align: 'center' }
{ prop: times + '_in', label: '投入数量' },
{ prop: times + '_out', label: '产出数量' },
{ prop: times + '_junk', label: '报废数量' },
{ prop: times + '_area', label: '产出面积' }
]
}
this.arr.push(subprop)
@@ -149,14 +150,14 @@ export default {
{
prop: 'proLineName',
label: '生产线',
align: 'center',
fixed: 'left'
fixed: 'left',
showOverflowTooltip: true
},
{
prop: 'spec',
label: '产品规格',
align: 'center',
fixed: 'left'
fixed: 'left',
showOverflowTooltip: true
}
]
this.buildProps(res.data.nameData);


+ 6
- 3
src/views/core/monitoring/sectionStatistics/index.vue Zobrazit soubor

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


+ 19
- 17
src/views/core/monitoring/sectionStatisticsSearch/index.vue Zobrazit soubor

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

@@ -134,15 +131,20 @@ export default {
},
{
type: 'button',
btnName: '搜索',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '导出',
name: 'export',
},
color: 'primary',
plain: true
}
],
};
},


+ 191
- 0
src/views/equipment/timing-diagram/components/gantt.js Zobrazit soubor

@@ -0,0 +1,191 @@

// filename: gantt.vue
// author: liubin
// date: 2023 -09 - 25 14: 28: 12
// description: 甘特图


import * as echarts from 'echarts';

/**
*
* @param {*} params
* @param {*} api
*
* https://echarts.apache.org/zh/option.html#series-custom.renderItem.arguments.params
*/
// function renderItem(params, api) { }

export default class Gantt {
constructor(el) {
this.chart = echarts.init(el);
let options = {
series: [
{
type: 'custom',
coordinateSystem: 'cartesian2d',
renderItem: renderItem,
}
]
}
this.chart.setOption(options);
}

update(options) {
this.chart.setOption(options);
}

resize() {
// todo
}

destroy() {
this.chart.dispose();
}
}



var data = [];
var categories = ['设备1', '设备2', '设备3'];
var types = [
{ name: '运行', color: '#7b9ce1' },
{ name: '故障', color: '#bd6d6c' },
{ name: '停机', color: '#75d874' },
];
// return new Date(new Date(timestamp).toLocaleDateString()).getTime()
// })(1691568181000))
function getStartTime(timestamp) {
return new Date(new Date(timestamp).toLocaleDateString()).getTime()
}


data.push({
name: 'running',
value: [0, 1691568181000, 1691568181000 + 60 * 60 * 1000, 60],
itemStyle: {
normal: {
color: types[0].color
}
}
})



function renderItem(params, api) {
var categoryIndex = api.value(0);
var start = api.coord([api.value(1), categoryIndex]);
var end = api.coord([api.value(2), categoryIndex]);
var height = api.size([0, 1])[1] * 0.8;
var rectShape = echarts.graphic.clipRectByRect(
{
x: start[0],
y: start[1] - height / 2,
width: end[0] - start[0],
height: height
},
{
x: params.coordSys.x,
y: params.coordSys.y,
width: params.coordSys.width,
height: params.coordSys.height
}
);
return (
rectShape && {
type: 'rect',
transition: ['shape'],
shape: rectShape,
style: api.style()
}
);
}

option = {
tooltip: {
// show: false,
formatter: function (params) {
return params.marker + params.name + ': ' + new Date(params.value[1]).toLocaleTimeString() + ' - ' + new Date(params.value[2]).toLocaleTimeString();
}
},
// title: {
// text: 'Profile',
// left: 'center'
// },
// dataZoom: [
// {
// type: 'slider',
// filterMode: 'weakFilter',
// showDataShadow: false,
// top: 400,
// labelFormatter: ''
// },
// {
// type: 'inside',
// filterMode: 'weakFilter'
// }
// ],
grid: {
height: 300
},
xAxis: {
type: 'time',
min: getStartTime(1691568181000),
max: getStartTime(1691568181000 + 3600 * 24 * 1000),
splitNumber: 10,
// interval: 60*3600*1000,
// scale: true,
axisLabel: {
// rotate: -15,
formatter: function (val) {
return new Date(val).toLocaleTimeString()
}
},
axisTick: {
show: true
},
splitLine: {
show: false,
}
},
yAxis: [{
axisLine: {
// show: false,
lineStyle: {
color: ''
}
},
axisLabel: {
fontSize: 14,
},
axisTick: {
show: false,
},
splitLine: {
show: true
},
data: categories
}, {
axisLine: {
// show: false,
lineStyle: {
color: ''
}
},
data: []
}],
series: [
{
type: 'custom',
renderItem: renderItem,
itemStyle: {
opacity: 0.8
},
encode: {
x: [1, 2],
y: 0
},
data: data
}
]
};

Načítá se…
Zrušit
Uložit