Compare commits
No commits in common. "1c0dba7dbb6fc945350ef808e4bf6b7499ca1940" and "21f7542695fdf952d99be074bac1a45c1019ff96" have entirely different histories.
1c0dba7dbb
...
21f7542695
4
.env.dev
4
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2024-03-25 15:59:53
|
||||
# @LastEditTime: 2024-03-22 14:18:33
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
# 积木报表指向地址
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 16:50:26
|
||||
* @LastEditTime: 2024-03-25 18:33:48
|
||||
* @LastEditTime: 2024-03-13 09:07:37
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -793,11 +793,11 @@ export default {
|
||||
// formatDate(item.planStartTime) || '',
|
||||
// `<span style="color:rgba(255,255,255,0.5)" >${item.line || ''}
|
||||
// </span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${ele.name || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.name || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${ele.run || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.run || ''}</span>`,
|
||||
// `<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
])
|
||||
]);
|
||||
}
|
||||
this.realEqConfig.data = this.realEqList
|
||||
this.$refs['realEqScrollBoard'].updateRows(this.realEqList)
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-03-25 18:34:58
|
||||
* @LastEditTime: 2024-01-29 15:39:59
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -158,7 +158,7 @@ export default {
|
||||
legend: {
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
top: '20',
|
||||
top: '1%',
|
||||
// right: '20px',
|
||||
data: ['产线产量', '产线良品率'],
|
||||
textStyle: {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: '420px', width: width }" />
|
||||
<div :id="id" :class="className" :style="{ height: height + 'px', width: width }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'enChart'
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initChart(nameList, dataList) {
|
||||
// console.log('1111', dataList);
|
||||
console.log('1111', dataList);
|
||||
// console.log(1)
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
// if (dataList.length !== 0) {
|
||||
@ -123,7 +123,13 @@ export default {
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||
grid: {
|
||||
top: 30,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
// legend: {
|
||||
// itemWidth: 10,
|
||||
// itemHeight: 10,
|
||||
@ -199,11 +205,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.enChart {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: -30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-27 13:54:52
|
||||
* @LastEditTime: 2024-03-25 18:37:26
|
||||
* @LastEditTime: 2024-03-13 09:04:11
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -92,20 +92,18 @@ export default {
|
||||
methods: {
|
||||
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
||||
let rawData = []
|
||||
let colors = ['#0fdedb', '#2359ec']
|
||||
if (passRateList && wasteList) {
|
||||
rawData.push(passRateList, wasteList)
|
||||
// console.log(1)
|
||||
const totalData = [];
|
||||
for (let i = 0; i < rawData[0].length; ++i) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < rawData.length; ++j) {
|
||||
sum += rawData[j][i];
|
||||
}
|
||||
totalData.push(sum);
|
||||
rawData.push(passRateList,wasteList)
|
||||
// console.log(1)
|
||||
const totalData = [];
|
||||
for (let i = 0; i < rawData[0].length; ++i) {
|
||||
let sum = 0;
|
||||
for (let j = 0; j < rawData.length; ++j) {
|
||||
sum += rawData[j][i];
|
||||
}
|
||||
console.log('total', totalData);
|
||||
totalData.push(sum);
|
||||
}
|
||||
let colors = ['#0fdedb', '#2359ec' ]
|
||||
console.log('total', totalData);
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
const series = [
|
||||
'良品',
|
||||
@ -125,9 +123,9 @@ export default {
|
||||
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
|
||||
},
|
||||
color:colors[sid],
|
||||
data: rawData.length != 0 ? rawData[sid].map((d, did) =>
|
||||
data: rawData[sid].map((d, did) =>
|
||||
totalData[did] <= 0 ? 0 : d / totalData[did]
|
||||
) : []
|
||||
)
|
||||
};
|
||||
});
|
||||
// let series = [
|
||||
@ -174,7 +172,6 @@ export default {
|
||||
legend: {
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
top:'10',
|
||||
icon: 'rect',
|
||||
textStyle: {
|
||||
color: '#ffffff'
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-25 16:54:49
|
||||
* @LastEditTime: 2024-03-21 16:07:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -605,7 +605,10 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
// this.fetchList('exception-alarm')
|
||||
// this.fetchList('inAndOutOfEachLine')
|
||||
// this.fetchList('order-process')
|
||||
// this.fetchList('line-chart-data')
|
||||
this.init()
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
@ -668,22 +671,6 @@ export default {
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
getData() {
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
},
|
||||
// getList() {
|
||||
// // this.$axios.get(
|
||||
// // 'base/core-production-line/listAll',
|
||||
@ -880,6 +867,20 @@ export default {
|
||||
// this.$nextTick(() => {
|
||||
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList)
|
||||
} else if (this.SJGInitWebSocket === 'inspection') {
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
}
|
||||
},
|
||||
// 数据发送
|
||||
|
@ -79,9 +79,10 @@ const tableProps = [
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
prop: 'enabledTime',
|
||||
label: '生效时间',
|
||||
width: 235,
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
|
@ -2,18 +2,42 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 新增 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
>
|
||||
<energy-plc-add ref="energyPlc" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
@ -26,8 +50,7 @@ import EnergyPlcAdd from './components/energyPlcAdd.vue'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'plcTableName',
|
||||
label: '关联表名',
|
||||
showOverflowtooltip: true
|
||||
label: '关联表名'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
@ -37,9 +60,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '标识名',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
label: '标识名'
|
||||
},
|
||||
{
|
||||
prop: 'enName',
|
||||
@ -88,21 +109,21 @@ export default {
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
collectionList: [
|
||||
{ value: 0, label: '否' },
|
||||
{ value: 1, label: '是' }
|
||||
{value: 0,label: '否'},
|
||||
{value: 1,label: '是'}
|
||||
],
|
||||
// 总条数
|
||||
total: 0,
|
||||
@ -146,7 +167,7 @@ export default {
|
||||
getList() {
|
||||
getEnergyPlcPage(this.queryParams).then(response => {
|
||||
let arr = response.data.list || [];
|
||||
arr && arr.map(item => {
|
||||
arr&&arr.map(item => {
|
||||
this.collectionList.map(i => {
|
||||
if (item.collection === i.value) {
|
||||
item.collection = i.label
|
||||
@ -167,7 +188,7 @@ export default {
|
||||
this.centervisible = true
|
||||
break
|
||||
default:
|
||||
this.handleDelete(val.data)
|
||||
this.handleDelete(val.data)
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
@ -184,13 +205,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除关联表名为"' + row.name + '"的数据项?').then(function () {
|
||||
return deleteEnergyPlc(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
this.$modal.confirm('是否确认删除关联表名为"' + row.name + '"的数据项?').then(function() {
|
||||
return deleteEnergyPlc(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,23 +2,47 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="160" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="160"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 新增 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width='30%'>
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width='30%'
|
||||
>
|
||||
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
<!-- 参数绑定/查看 -->
|
||||
<energy-plc-param v-if="paramVisible" ref="plcParam" @closeDrawer="closeDrawer"
|
||||
:energyTypeList="energyTypeList"></energy-plc-param>
|
||||
<energy-plc-param v-if="paramVisible" ref="plcParam" @closeDrawer="closeDrawer" :energyTypeList="energyTypeList"></energy-plc-param>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -39,20 +63,17 @@ const tableProps = [
|
||||
label: '对象编码'
|
||||
},
|
||||
{
|
||||
prop: 'plcTableName',
|
||||
prop: 'plcTableName',
|
||||
label: '关联表名'
|
||||
},
|
||||
{
|
||||
prop: 'plcTableCode',
|
||||
label: '关联表编码',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'cnName',
|
||||
label: '标识名',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
label: '标识名'
|
||||
},
|
||||
{
|
||||
prop: 'varNum',
|
||||
@ -92,9 +113,9 @@ export default {
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:energy-plc-connect:bind')
|
||||
? {
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
type: 'connect',
|
||||
btnName: '绑定'
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
@ -102,15 +123,15 @@ export default {
|
||||
},
|
||||
this.$auth.hasPermi('base:energy-plc-connect:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:energy-plc-connect:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
@ -209,13 +230,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function () {
|
||||
return deleteEnergyPlcConnect(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
this.$modal.confirm('是否确认删除对象为"' + row.objName + '"的数据项?').then(function() {
|
||||
return deleteEnergyPlcConnect(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
closeDrawer() {
|
||||
this.getList()
|
||||
|
@ -2,11 +2,11 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-22 17:11:55
|
||||
* @LastEditTime: 2024-03-20 09:18:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="false" class="drawer" size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@ -75,7 +75,7 @@
|
||||
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isdetail" class="drawer-body__footer">
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
@ -206,7 +206,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true;
|
||||
this.dataForm.id = res.data
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-25 14:07:31
|
||||
* @LastEditTime: 2024-03-22 09:01:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -289,7 +289,7 @@ export default {
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(res => {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
@ -297,7 +297,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(res => {
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true;
|
||||
this.dataForm.id = res.data
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 15:30:27
|
||||
* @LastEditTime: 2024-03-25 14:14:04
|
||||
* @LastEditTime: 2023-12-04 15:19:33
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
getProcessEquValueBomDet({
|
||||
id: this.dataForm.id,
|
||||
id: this.dataForm.id
|
||||
}).then((res) => {
|
||||
this.dataForm = res.data;
|
||||
const arr = []
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 14:00:52
|
||||
* @LastEditTime: 2024-03-25 14:09:33
|
||||
* @LastEditTime: 2023-11-09 09:59:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -25,24 +25,24 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// state: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
state() {
|
||||
return this.injectData.enabled === 1 ? true : false
|
||||
state: false
|
||||
}
|
||||
},
|
||||
// computed: {
|
||||
// readonly() {
|
||||
// return !!this.injectData.readonly
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
// this.mapToState()
|
||||
this.mapToState()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// mapToState() {
|
||||
// if (this.injectData.prop === 'enabled') {
|
||||
// this.state = this.injectData.enabled === 1 ? true : false
|
||||
// }
|
||||
// },
|
||||
mapToState() {
|
||||
if (this.injectData.prop === 'enabled') {
|
||||
this.state = this.injectData.enabled === 1 ? true : false
|
||||
}
|
||||
},
|
||||
changeHandler() {
|
||||
// let params = {}
|
||||
let payload = {}
|
||||
|
@ -2,18 +2,43 @@
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 新增 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width='50%'>
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width='50%'
|
||||
>
|
||||
<group-class-add ref="classList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
@ -60,7 +85,7 @@ const tableProps = [
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: "GroupClasses",
|
||||
name: "GroupClass",
|
||||
components: { GroupClassAdd },
|
||||
data() {
|
||||
return {
|
||||
@ -90,33 +115,33 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:group-classes:cancel')
|
||||
this.$auth.hasPermi('base:group-classes:cancel')
|
||||
? {
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
@ -188,7 +213,7 @@ export default {
|
||||
this.discard(val.data)
|
||||
break
|
||||
default:
|
||||
this.handleDelete(val.data)
|
||||
this.handleDelete(val.data)
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
@ -210,33 +235,33 @@ export default {
|
||||
obj.endTime = row.endTime
|
||||
obj.enableTime = row.enableTime
|
||||
obj.disableTime = Date.parse(new Date())
|
||||
this.$modal.confirm('是否确认作废班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
return updateGroupClasses({ ...obj })
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => { });
|
||||
this.$modal.confirm('是否确认作废班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
return updateGroupClasses({ ...obj })
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
let _this = this
|
||||
if (row.status === '可用') {// 可用
|
||||
_this.$modal.confirm('删除的班次"' + row.name + '"可能会影响交接班计划,请点取消再次确认!').then(function () {
|
||||
return _this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
_this.$modal.confirm('删除的班次"' + row.name + '"可能会影响交接班计划,请点取消再次确认!').then(function() {
|
||||
return _this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
})
|
||||
} else {
|
||||
_this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function() {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
} else {
|
||||
_this.$modal.confirm('是否确认删除班次名称为"' + row.name + '"的数据项?').then(function () {
|
||||
return deleteGroupClasses(row.id);
|
||||
}).then(() => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -299,14 +299,14 @@ export default {
|
||||
getCookie() {
|
||||
// const username = getUsername();
|
||||
// const password = getPassword();
|
||||
const rememberMe = getRememberMe()
|
||||
// const tenantName = getTenantName();
|
||||
// const rememberMe = getRememberMe();
|
||||
const tenantName = getTenantName();
|
||||
this.loginForm = {
|
||||
...this.loginForm,
|
||||
username: this.loginForm.username,
|
||||
password: this.loginForm.password,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
tenantName: this.loginForm.tenantName,
|
||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||
};
|
||||
},
|
||||
handleLogin(captchaParams) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span='4'>
|
||||
<div class="blodTip">产品名称</div>
|
||||
<div class="lightTip" :title='orderMsg.productName'>{{ orderMsg.productName }}</div>
|
||||
<div class="lightTip">{{ orderMsg.productName }}</div>
|
||||
</el-col>
|
||||
<el-col :span='4'>
|
||||
<div class="blodTip">产品规格</div>
|
||||
@ -282,9 +282,6 @@ export default {
|
||||
font-weight: 400;
|
||||
color: rgba(102, 102, 102, 0.75);
|
||||
margin-bottom: 12px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,38 @@
|
||||
<template>
|
||||
<div class="app-container orderMonitoring">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<el-tabs v-model="activeName" @tab-click="toggleTab">
|
||||
<el-tab-pane label="数据列表" name="dataList"></el-tab-pane>
|
||||
<el-tab-pane label="环形图" name="barChart"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 表 -->
|
||||
<div v-if="activeName === 'dataList'">
|
||||
<base-table :page="1" :limit="1000000000000" :table-props="tableProps" :table-data="list" :max-height="tableH"
|
||||
row-key="id" :tree-props="{ children: 'orderMonitorVOS', hasChildren: 'hasChildren' }">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table
|
||||
:page="1"
|
||||
:limit="1000000000000"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
row-key="id"
|
||||
:tree-props="{children: 'orderMonitorVOS', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
</div>
|
||||
<!-- 图 -->
|
||||
<monitoring-ring-charts ref='monitoringRingCharts' v-else :chart-list='chartList' />
|
||||
<monitoring-ring-charts ref='monitoringRingCharts' v-else :chart-list='chartList'/>
|
||||
<!-- <pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@ -151,65 +168,65 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
list: [],
|
||||
tableH: this.tableHeight(260),
|
||||
tableH: this.tableHeight(305),
|
||||
total: 0,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
||||
? {
|
||||
type: 'orderDetail',
|
||||
btnName: '详情',
|
||||
showTip: '订单/工单详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
type: 'orderDetail',
|
||||
btnName: '详情',
|
||||
showTip: '订单/工单详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet')
|
||||
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet')
|
||||
? {
|
||||
type: 'qualityDetail',
|
||||
btnName: '质量',
|
||||
showTip: '质量详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'woIdString',
|
||||
value: ''
|
||||
}
|
||||
]
|
||||
type: 'qualityDetail',
|
||||
btnName: '质量',
|
||||
showTip: '质量详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'more',
|
||||
name: 'orderNum',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'woIdString',
|
||||
value: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
: undefined
|
||||
// this.$auth.hasPermi('base:order-completion-monitoring:sendOut')
|
||||
// ? {
|
||||
// type: 'sendOutDetail',
|
||||
// btnName: '发货',
|
||||
// showTip: '发货详情',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'more',
|
||||
// name: 'workOrderNum',
|
||||
// value: 1
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// : undefined
|
||||
// this.$auth.hasPermi('base:order-completion-monitoring:sendOut')
|
||||
// ? {
|
||||
// type: 'sendOutDetail',
|
||||
// btnName: '发货',
|
||||
// showTip: '发货详情',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'more',
|
||||
// name: 'workOrderNum',
|
||||
// value: 1
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// : undefined
|
||||
].filter((v) => v),
|
||||
chartList: []
|
||||
}
|
||||
@ -217,7 +234,7 @@ export default {
|
||||
components: { MonitoringRingCharts },
|
||||
mounted() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
this.tableH = this.tableHeight(305)
|
||||
})
|
||||
let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
|
||||
let end = moment().format('yyyy-MM-DD')
|
||||
@ -228,10 +245,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getPage() {
|
||||
orderGroupMonitor({ ...this.queryParams }).then(res => {
|
||||
orderGroupMonitor({...this.queryParams}).then(res => {
|
||||
let arr = res.data || []
|
||||
if (arr.length > 0) {
|
||||
let color = ['#7164FF', '#288AFF', '#63BDFF', '#8EF0AB', '#FFCE6A']
|
||||
let color = ['#7164FF','#288AFF','#63BDFF','#8EF0AB','#FFCE6A']
|
||||
let arr2 = []
|
||||
arr.map(item => {
|
||||
item.orderType = '集团订单'//前端写死订单类型
|
||||
@ -244,11 +261,11 @@ export default {
|
||||
obj.num = item.planQuantity || 0
|
||||
let sunNum = 0
|
||||
if (item.orderMonitorVOS && item.orderMonitorVOS.length > 0) {
|
||||
for (let i = 0; i < item.orderMonitorVOS.length; i++) {
|
||||
for(let i = 0; i < item.orderMonitorVOS.length; i++) {
|
||||
item.orderMonitorVOS[i].orderType = '厂务订单'//前端写死订单类型
|
||||
item.orderMonitorVOS[i].id = item.orderMonitorVOS[i].orderid
|
||||
item.orderMonitorVOS[i].orderNum = item.orderMonitorVOS[i].workOrderNum
|
||||
woIdString += item.orderMonitorVOS[i].woIdString ? item.orderMonitorVOS[i].woIdString : ''
|
||||
woIdString+=item.orderMonitorVOS[i].woIdString?item.orderMonitorVOS[i].woIdString:''
|
||||
//==============图数据
|
||||
let subObj = {}
|
||||
subObj.value = item.orderMonitorVOS[i].actualquantity
|
||||
@ -256,9 +273,9 @@ export default {
|
||||
if (i < 5) {
|
||||
subObj.color = color[i]
|
||||
} else {
|
||||
subObj.color = color[i % 5]
|
||||
subObj.color = color[i%5]
|
||||
}
|
||||
sunNum += (item.orderMonitorVOS[i].actualquantity || 0)
|
||||
sunNum+=(item.orderMonitorVOS[i].actualquantity || 0)
|
||||
arr3.push(subObj)
|
||||
}
|
||||
}
|
||||
@ -278,7 +295,7 @@ export default {
|
||||
this.$refs.monitoringRingCharts.initChart()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
}else{
|
||||
// 显示无数据的图片
|
||||
this.chartList = []
|
||||
}
|
||||
@ -303,24 +320,24 @@ export default {
|
||||
case 'orderDetail':
|
||||
if (val.data.orderType === '集团订单') {
|
||||
this.$router.push({// 去厂务订单详情
|
||||
path: '/order/base/order-manage/order-detail-data?orderIdString=' + val.data.orderIds.join(',')
|
||||
path: '/order/base/order-manage/order-detail-data?orderIdString='+ val.data.orderIds.join(',')
|
||||
})
|
||||
} else {
|
||||
}else{
|
||||
this.$router.push({// 去工单详情
|
||||
path: '/core/core-work-order-detail?woIdString=' + val.data.woIdString
|
||||
path: '/core/core-work-order-detail?woIdString='+val.data.woIdString
|
||||
})
|
||||
}
|
||||
break
|
||||
case 'qualityDetail':
|
||||
this.$router.push({
|
||||
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString=' + val.data.woIdString
|
||||
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString='+val.data.woIdString
|
||||
})
|
||||
break
|
||||
default:
|
||||
// this.$router.push({
|
||||
// path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
|
||||
// })
|
||||
}
|
||||
// this.$router.push({
|
||||
// path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
|
||||
// })
|
||||
}
|
||||
},
|
||||
toggleTab() {
|
||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
||||
@ -329,7 +346,7 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
@ -343,39 +360,31 @@ export default {
|
||||
height: 2px;
|
||||
background-color: #e4e7ed;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.el-tabs__item:hover {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.el-tabs__item.is-active {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.searchBarBox {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.boxTitle {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin: 0 10px 16px 0;
|
||||
margin:0 10px 16px 0;
|
||||
}
|
||||
|
||||
.blueTitle {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-08 13:46:17
|
||||
* @LastEditTime: 2024-03-25 08:50:25
|
||||
* @LastEditTime: 2024-03-21 10:40:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -73,12 +73,12 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id">
|
||||
<el-col :span="6">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="成分">
|
||||
{{ item.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="8">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
|
||||
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
|
||||
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
|
||||
@ -92,12 +92,12 @@
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值">
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值">
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-22 17:13:16
|
||||
* @LastEditTime: 2024-03-20 09:38:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -10,7 +10,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单号" prop="workOrderId">
|
||||
<el-select filterable v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -58,13 +58,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="dataForm.source" placeholder="请选择来源" multiple>
|
||||
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-25 16:07:07
|
||||
* @LastEditTime: 2024-03-21 15:14:04
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -64,7 +64,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'source',
|
||||
label: '数据来源',
|
||||
filter: (val) => val == 1 ? '手动' : '自动'
|
||||
filter: (val) => val == 1 ? '内部' : '外部'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-24 15:15:24
|
||||
* @LastEditTime: 2024-03-22 17:05:51
|
||||
* @LastEditTime: 2024-03-22 10:14:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getDict()
|
||||
this.getDict()
|
||||
this.getTodayStartTimeAndEndTime()
|
||||
this.getDataList()
|
||||
},
|
||||
@ -104,8 +104,6 @@ export default {
|
||||
|
||||
},
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -137,9 +135,9 @@ export default {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -57,7 +57,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getCurrentMonthFirst()
|
||||
// this.getDict()
|
||||
this.getDict()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
@ -98,8 +98,6 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -131,9 +129,9 @@ export default {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -86,23 +86,23 @@ export default {
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this.getDict()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// const day = new Date().getDay()
|
||||
// console.log('周四', day)
|
||||
this.getCurrentWeekStartTimeAndEndTime()
|
||||
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
||||
this.getDict()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// async getDict() {
|
||||
// // 产线列表
|
||||
|
||||
|
||||
// },
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
await getCorePLList().then(res => {
|
||||
this.proLineList = res.data;
|
||||
// this.getDataList()
|
||||
});
|
||||
},
|
||||
getCurrentWeekStartTimeAndEndTime() {
|
||||
this.reportTime = new Date()
|
||||
var weekday = new Array(7);
|
||||
@ -187,8 +187,6 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -220,9 +218,9 @@ export default {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -53,7 +53,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getDict()
|
||||
this.getDict()
|
||||
},
|
||||
mounted () {
|
||||
this.getCurrentYearFirst()
|
||||
@ -98,8 +98,6 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
const res = await getCorePLList()
|
||||
this.proLineList = res.data;
|
||||
this.dataListLoading = true;
|
||||
if (this.listQuery.reportTime.length == 0) {
|
||||
this.$message({
|
||||
@ -131,9 +129,9 @@ export default {
|
||||
// item.dailyOutputTrend = null
|
||||
// }
|
||||
item.dailyOutputTrend = item.dailyOutputTrend && item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.actualProductTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.originalGlassPassTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
item.originalGlassStatisticsTrend = item.dailyOutputTrend && item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : null
|
||||
item.actualProductTrend = item.dailyOutputTrend && item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : null
|
||||
item.originalGlassPassTrend = item.dailyOutputTrend && item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : null
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -83,8 +83,8 @@ export default {
|
||||
captchaEnable: true,
|
||||
loginForm: {
|
||||
loginType: "uname",
|
||||
username: "",
|
||||
password: "",
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
rememberMe: false,
|
||||
captchaVerification: "",
|
||||
},
|
||||
@ -140,12 +140,12 @@ export default {
|
||||
this.$refs.verify.show()
|
||||
},
|
||||
getCookie() {
|
||||
// const username = getUsername();
|
||||
// const password = getPassword();
|
||||
const username = getUsername();
|
||||
const password = getPassword();
|
||||
const rememberMe = getRememberMe();
|
||||
this.loginForm = {
|
||||
username: this.loginForm.username,
|
||||
password: this.loginForm.password,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
loginType: this.loginForm.loginType,
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
this.lockReconnect = true;
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
// 关闭心跳检查
|
||||
heartCheck.stop();
|
||||
// heartCheck.stop();
|
||||
}
|
||||
};
|
||||
const initWsEventHandle = () => {
|
||||
@ -50,13 +50,13 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
// 连接成功
|
||||
this.wsObj.onopen = (event) => {
|
||||
onWsOpen(event);
|
||||
heartCheck.start();
|
||||
// heartCheck.start();
|
||||
};
|
||||
|
||||
// 监听服务器端返回的信息
|
||||
this.wsObj.onmessage = (event) => {
|
||||
onWsMessage(event);
|
||||
heartCheck.start();
|
||||
// heartCheck.start();
|
||||
};
|
||||
|
||||
this.wsObj.onclose = (event) => {
|
||||
@ -123,7 +123,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
if (this.lockReconnect) {
|
||||
return;
|
||||
}
|
||||
writeToScreen("5秒后重连");
|
||||
writeToScreen("3秒后重连");
|
||||
this.lockReconnect = true;
|
||||
// 没连接上会一直重连,设置延迟避免请求过多
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
@ -132,40 +132,10 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
this.createWebSoket();
|
||||
this.lockReconnect = false;
|
||||
writeToScreen("重连完成");
|
||||
}, 5000);
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
// 心跳检查(看看websocket是否还在正常连接中,不需要服务端返回,单向的)
|
||||
let _this = this
|
||||
let heartCheck = {
|
||||
timeout: 55000,
|
||||
timeoutObj: null,
|
||||
// 重启
|
||||
reset() {
|
||||
clearTimeout(this.timeoutObj);
|
||||
this.start();
|
||||
},
|
||||
// 停止
|
||||
stop() {
|
||||
clearTimeout(this.timeoutObj);
|
||||
},
|
||||
// 开启定时器
|
||||
start() {
|
||||
this.timeoutObj && clearTimeout(this.timeoutObj);
|
||||
this.timeoutObj = setTimeout(() => {
|
||||
writeToScreen("心跳检查,发送ping到后台");
|
||||
try {
|
||||
const datas = { ping: true };
|
||||
_this.wsObj.send(JSON.stringify(datas));
|
||||
} catch (err) {
|
||||
writeToScreen("发送ping异常");
|
||||
}
|
||||
}, this.timeout);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
// 心跳检查(看看websocket是否还在正常连接中,和服务端通信,双向的)
|
||||
// 心跳检查(看看websocket是否还在正常连接中)
|
||||
// let heartCheck = {
|
||||
// timeout: 15000,
|
||||
// timeoutObj: null,
|
||||
@ -190,7 +160,7 @@ export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
// writeToScreen("心跳检查,发送ping到后台");
|
||||
// try {
|
||||
// const datas = { ping: true };
|
||||
// _this.wsObj.send(JSON.stringify(datas));
|
||||
// this.wsObj.send(JSON.stringify(datas));
|
||||
// } catch (err) {
|
||||
// writeToScreen("发送ping异常");
|
||||
// }
|
||||
|
@ -6,33 +6,28 @@ import store from "@/store";
|
||||
const timestr = new Date().getTime()
|
||||
const dcsConn = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_Dcs_API + '/xc-screen/websocket/dcsmsg' + timestr,
|
||||
process.env.VUE_APP_Socket_Dcs_API + '/xc-screen/websocket/dcsmsg'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('dcs成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "FanFrequencyInfo": {
|
||||
store.dispatch({ type: "websocket/setFanFrequencyInfo", payload: msgData.data.FanFrequencyInfo })
|
||||
store.dispatch({type: "websocket/setFanFrequencyInfo", payload:msgData.data.FanFrequencyInfo})
|
||||
break;
|
||||
}
|
||||
case "KilnInfo": {
|
||||
store.dispatch({ type: "websocket/setKilnInfo", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setKilnInfo", payload: msgData.data})
|
||||
break;
|
||||
}
|
||||
case "GasInfo": {
|
||||
store.dispatch({ type: "websocket/setGasInfo", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setGasInfo", payload: msgData.data})
|
||||
break;
|
||||
}
|
||||
case "SumGasInfo": {
|
||||
store.dispatch({ type: "websocket/setSumGasInfo", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setSumGasInfo", payload: msgData.data})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -44,20 +39,16 @@ const dcsConn = new WsConnect(
|
||||
)
|
||||
// ISRA
|
||||
const mesIsra = new WsConnect(
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('mes ISRA成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
// console.log(msgData)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "israKiln": {
|
||||
store.dispatch({ type: "websocket/setIsraKiln", payload: msgData.detData.dayStatistic })
|
||||
store.dispatch({type: "websocket/setIsraKiln", payload:msgData.detData.dayStatistic})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -70,20 +61,15 @@ const mesIsra = new WsConnect(
|
||||
|
||||
// 原料 MA
|
||||
const mesMA = new WsConnect(
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=MA' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=MA'+timestr,
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('mes 原料成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "material": {
|
||||
store.dispatch({ type: "websocket/setMaterial", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setMaterial", payload:msgData.data})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -96,30 +82,25 @@ const mesMA = new WsConnect(
|
||||
// 能耗 EN
|
||||
const mesEN = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=ENERGY' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=ENERGY'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 能耗成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "EnergyInfo": {
|
||||
store.dispatch({ type: "websocket/setEnergyInfo", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setEnergyInfo", payload:msgData.data})
|
||||
break;
|
||||
}
|
||||
case "EnergyTrend": {
|
||||
store.dispatch({ type: "websocket/setEnergyTrend", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setEnergyTrend", payload:msgData.data})
|
||||
break;
|
||||
}
|
||||
case "EnergyMonitoring": {
|
||||
store.dispatch({ type: "websocket/setEnergyMonitoring", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setEnergyMonitoring", payload:msgData.data})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -133,30 +114,23 @@ const mesEN = new WsConnect(
|
||||
// 烟气 GAS
|
||||
const mesGAS = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=GAS' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=GAS'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 烟气成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "exhaustGas": {
|
||||
store.dispatch({ type: "websocket/setExhaustGasInfo", payload: msgData.realtime })
|
||||
store.dispatch({
|
||||
type: "websocket/setExhaustGasChart", payload: {
|
||||
dayTrend: msgData.dayTrend,
|
||||
weekTrend: msgData.weekTrend,
|
||||
monthTrend: msgData.monthTrend,
|
||||
yearTrend: msgData.yearTrend,
|
||||
}
|
||||
})
|
||||
store.dispatch({type: "websocket/setExhaustGasInfo", payload:msgData.realtime})
|
||||
store.dispatch({type: "websocket/setExhaustGasChart", payload:{
|
||||
dayTrend: msgData.dayTrend,
|
||||
weekTrend: msgData.weekTrend,
|
||||
monthTrend: msgData.monthTrend,
|
||||
yearTrend: msgData.yearTrend,
|
||||
}})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -171,30 +145,23 @@ const mesGAS = new WsConnect(
|
||||
// 缺陷分类/统计 IS
|
||||
const mesIS = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=IS' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=IS'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 缺陷成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "isra": {
|
||||
store.dispatch({
|
||||
type: "websocket/setDefectChart", payload: {
|
||||
checkType: msgData.detData.checkType,
|
||||
dayStatistic: msgData.detData.dayStatistic,
|
||||
weekStatistic: msgData.detData.weekStatistic,
|
||||
monthStatistic: msgData.detData.monthStatistic,
|
||||
yearStatistic: msgData.detData.yearStatistic,
|
||||
}
|
||||
})
|
||||
store.dispatch({type: "websocket/setDefectChart", payload:{
|
||||
checkType: msgData.detData.checkType,
|
||||
dayStatistic: msgData.detData.dayStatistic,
|
||||
weekStatistic: msgData.detData.weekStatistic,
|
||||
monthStatistic: msgData.detData.monthStatistic,
|
||||
yearStatistic: msgData.detData.yearStatistic,
|
||||
}})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -209,34 +176,29 @@ const mesIS = new WsConnect(
|
||||
// 深加工生产运行驾驶舱(除能源) SJG
|
||||
const mesSJG = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=SJG' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=SJG'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "productline": {
|
||||
store.dispatch({ type: "websocket/setProductline", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setProductline", payload:msgData.detData})
|
||||
break;
|
||||
}
|
||||
case "equipment": {
|
||||
store.dispatch({ type: "websocket/setSJGEq", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setSJGEq", payload:msgData.detData})
|
||||
break;
|
||||
}
|
||||
case "order": {
|
||||
store.dispatch({ type: "websocket/setWorkOrder", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setWorkOrder", payload:msgData.detData})
|
||||
break;
|
||||
}
|
||||
case "defectSum": {
|
||||
store.dispatch({ type: "websocket/setDefectSum", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setDefectSum", payload:msgData.detData})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -251,23 +213,18 @@ const mesSJG = new WsConnect(
|
||||
// 订单完成情况 OV
|
||||
const mesOV = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=OV' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=OV'+timestr,
|
||||
// 'ws://192.168.0.33:48082/websocket/message?userId=OV'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "order": {
|
||||
store.dispatch({ type: "websocket/setOrder", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setOrder", payload:msgData.detData})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -282,39 +239,35 @@ const mesOV = new WsConnect(
|
||||
// 本日生产良品率 CUTTING
|
||||
const mesCUTTING = new WsConnect(
|
||||
// websocket地址
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=CUTTING' + timestr,
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=CUTTING'+timestr,
|
||||
// 传递给后台的数据
|
||||
'',
|
||||
// 成功拿到后台返回的数据的回调函数
|
||||
(data) => {
|
||||
// console.log('mes 产线产量及良品率成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = {}
|
||||
try {
|
||||
msgData = JSON.parse(data)
|
||||
} catch (error) {
|
||||
console.log("websocket: [unable to msgData] : ", data);
|
||||
}
|
||||
let msgData = JSON.parse(data)
|
||||
if (msgData == null) return;
|
||||
console.log(msgData)
|
||||
switch (msgData?.type) {
|
||||
case "cutting": {
|
||||
if (msgData?.name === 'table') {
|
||||
store.dispatch({ type: "websocket/setYieldRateTable", payload: msgData.data })
|
||||
store.dispatch({type: "websocket/setYieldRateTable", payload:msgData.data})
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'day') {
|
||||
store.dispatch({ type: "websocket/setCutChartDay", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setCutChartDay", payload:msgData.detData})
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'weekly') {
|
||||
store.dispatch({ type: "websocket/setCutChartWeek", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setCutChartWeek", payload:msgData.detData})
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'month') {
|
||||
store.dispatch({ type: "websocket/setCutChartMonth", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setCutChartMonth", payload:msgData.detData})
|
||||
return
|
||||
}
|
||||
if (msgData?.dateType === 'year') {
|
||||
store.dispatch({ type: "websocket/setCutChartYear", payload: msgData.detData })
|
||||
store.dispatch({type: "websocket/setCutChartYear", payload:msgData.detData})
|
||||
return
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user