Compare commits

..

No commits in common. "ff19047729e4c5e04a3533687db73e7e232a1675" and "0eae057ddc93e27ac4a6a44be95361385a2bd6e9" have entirely different histories.

84 changed files with 458 additions and 2662 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-02-21 18:47:20
# @LastEditors: DY
# @LastEditTime: 2024-01-29 16:29:24
# @LastEditors: zhp
# @Description:
###
# 开发环境配置
@ -15,22 +15,25 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.0.30:8888'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# dcs地址
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# socket地址
# VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
# VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'

View File

@ -16,9 +16,6 @@ VUE_APP_BASE_API = '/prod-api'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
# socket地址
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 根据服务器或域名修改

View File

@ -14,8 +14,6 @@ VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 根据服务器或域名修改

View File

@ -8,10 +8,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<link rel="stylesheet" type="text/css" media="print" href="<%= BASE_URL %>print-lock.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<title>
<%= webpackConfig.name %>
</title>

View File

@ -59,15 +59,6 @@ export function listEnabled() {
})
}
// 获得可用的排班列表(根据车间筛选)
export function listEnabledByRoom(query) {
return request({
url: '/base/group-team/listEnabledByRoom',
method: 'get',
params: query
})
}
// 获得班组组员信息分页
export function groupTeamPage(query) {
return request({

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-12-04 14:10:37
* @LastEditTime: 2024-01-31 09:56:09
* @LastEditTime: 2024-01-29 16:48:40
* @LastEditors: zhp
* @Description:
*/
@ -19,7 +19,7 @@ export function createQualityInspectionBoxBtn(data) {
// 更新安灯按钮16键对应
export function updateQualityInspectionBoxBtn(data) {
return request({
url: '/base/quality-inspection-box-btn-auth/update',
url: '/base/quality-inspection-box-btn/updateBatch',
method: 'put',
data: data
})
@ -28,7 +28,7 @@ export function updateQualityInspectionBoxBtn(data) {
// 删除安灯按钮16键对应
export function deleteQualityInspectionBoxBtn(id) {
return request({
url: 'base/quality-inspection-box-btn-auth/delete?userId=' + id,
url: '/base/quality-inspection-box-btn/delete?id=' + id,
method: 'delete'
})
}
@ -36,7 +36,7 @@ export function deleteQualityInspectionBoxBtn(id) {
// 获得安灯按钮16键对应
export function getQualityInspectionBoxBtn(id) {
return request({
url: 'base/quality-inspection-box-btn-auth/get?userId=' + id,
url: '/base/quality-inspection-box-btn/get?id=' + id,
method: 'get'
})
}

View File

@ -1,35 +0,0 @@
/*
* @Author: Do not edit
* @Date: 2024-02-21 13:43:02
* @LastEditTime: 2024-02-21 15:00:17
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 获得关联表名
export function getplcAllList(query) {
return request({
url: '/base/equipment-plc/listAll',
method: 'get',
params: query
})
}
// 获得设备
export function getEquipmentList(query) {
return request({
url: '/base/core-equipment/page',
method: 'get',
params: query
})
}
// 根据产线获得工段
export function listByParentId(query) {
return request({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
params: query
})
}

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="25px" height="26px" viewBox="0 0 25 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>库位信息</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-996.000000, -618.000000)">
<g id="编组-26备份-3" transform="translate(972.000000, 596.000000)">
<g id="库位信息" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="信息" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<polygon id="路径" fill="#59D0E2" points="6.87951585 6.64119413 10.014693 6.64119413 10.014693 10.0613874 6.87951585 10.0613874"></polygon>
<path d="M19.42625,1.5 L4.57625,1.5 C3.45125001,1.5 2.51375,2.43750001 2.51375,3.56250001 L2.51375,20.4375 C2.51375,21.5625 3.45125001,22.5 4.57625,22.5 L19.46375,22.5 C20.58875,22.5 21.52625,21.5625 21.52625,20.4375 L21.52625,3.56250001 C21.48875,2.43750001 20.58875,1.5 19.42625,1.5 Z M5.66375,6.9375 C5.66375,6.1125 6.33875,5.4375 7.16375,5.4375 L9.63875,5.4375 C10.46375,5.4375 11.13875,6.1125 11.13875,6.9375 L11.13875,9.6375 C11.13875,10.4625 10.46375,11.1375 9.63875,11.1375 L7.16375,11.1375 C6.33875,11.1375 5.66375,10.4625 5.66375,9.6375 L5.66375,6.9375 Z M17.58875,18.5625 L6.41375001,18.5625 C6.00125002,18.5625 5.66375,18.225 5.66375,17.8125 C5.66375,17.4 6.00125,17.0625 6.41375001,17.0625 L17.55125,17.0625 C17.96375,17.0625 18.30125,17.4 18.30125,17.8125 C18.30125,18.225 18.00125,18.5625 17.58875,18.5625 Z M17.58875,15.1875 L6.41375001,15.1875 C6.00125002,15.1875 5.66375,14.85 5.66375,14.4375 C5.66375,14.025 6.00125,13.6875 6.41375001,13.6875 L17.55125,13.6875 C17.96375,13.6875 18.30125,14.025 18.30125,14.4375 C18.30125,14.85 18.00125,15.1875 17.58875,15.1875 Z M17.58875,10.65 L13.83875,10.65 C13.42625,10.65 13.08875,10.3125 13.08875,9.90000001 C13.08875,9.48750002 13.42625,9.14999999 13.83875,9.14999999 L17.58875,9.14999999 C18.00125,9.14999999 18.33875,9.48749999 18.33875,9.90000001 C18.33875,10.3125 18.00125,10.65 17.58875,10.65 Z M17.58875,7.425 L13.83875,7.425 C13.42625,7.425 13.08875,7.08750001 13.08875,6.675 C13.08875,6.26249998 13.42625,5.925 13.83875,5.925 L17.58875,5.925 C18.00125,5.925 18.33875,6.2625 18.33875,6.675 C18.33875,7.08749999 18.00125,7.425 17.58875,7.425 Z" id="形状" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>搬运任务</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-64.000000, -149.000000)">
<g id="编组-26" transform="translate(40.000000, 127.000000)">
<g id="搬运任务" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="异常" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="1" width="17" height="17"></rect>
<g>
<rect id="矩形" fill="#000000" opacity="0" x="5" y="6" width="13" height="13"></rect>
<g id="数量_面性">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="2" width="16" height="16"></rect>
<path d="M11.5012639,11 C11.3917412,11 11.2835161,10.977151 11.184033,10.9329979 L0.441155372,6.16366481 C0.172262497,6.04432342 -1.77635684e-15,5.78507176 -1.77635684e-15,5.49973467 C-1.77635684e-15,5.21439758 0.172262497,4.95514592 0.441155372,4.83580453 L11.184033,0.066471464 C11.3846433,-0.0221571547 11.6153567,-0.0221571547 11.815967,0.066471464 L22.5588446,4.83580453 C22.8277375,4.95514592 23,5.21439758 23,5.49973467 C23,5.78507176 22.8277375,6.04432342 22.5588446,6.16366481 L11.815967,10.9329979 C11.7172585,10.9768087 11.6099339,10.9996587 11.5012639,11 L11.5012639,11 Z M22,14 L11.5,18.4986025 L1,14 L1,15.5733794 L11.1785976,19.935011 C11.3818459,20.021663 11.6155931,20.021663 11.8188415,19.935011 L22,15.5733794 L22,14 Z" id="形状" fill="#59D0E2"></path>
<path d="M22,9 L11.5,13.4953318 L1,9 L1,10.5789585 L11.1785976,14.9350754 C11.3818459,15.0216415 11.6155931,15.0216415 11.8188415,14.9350754 L22,10.5789585 L22,9 Z" id="路径" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>搬运任务</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-64.000000, -149.000000)">
<g id="编组-26" transform="translate(40.000000, 127.000000)">
<g id="搬运任务" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="异常" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="1" width="17" height="17"></rect>
<g>
<rect id="矩形" fill="#000000" opacity="0" x="5" y="6" width="13" height="13"></rect>
<g id="数量_面性">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="2" width="16" height="16"></rect>
<path d="M11.5012639,11 C11.3917412,11 11.2835161,10.977151 11.184033,10.9329979 L0.441155372,6.16366481 C0.172262497,6.04432342 -1.77635684e-15,5.78507176 -1.77635684e-15,5.49973467 C-1.77635684e-15,5.21439758 0.172262497,4.95514592 0.441155372,4.83580453 L11.184033,0.066471464 C11.3846433,-0.0221571547 11.6153567,-0.0221571547 11.815967,0.066471464 L22.5588446,4.83580453 C22.8277375,4.95514592 23,5.21439758 23,5.49973467 C23,5.78507176 22.8277375,6.04432342 22.5588446,6.16366481 L11.815967,10.9329979 C11.7172585,10.9768087 11.6099339,10.9996587 11.5012639,11 L11.5012639,11 Z M22,14 L11.5,18.4986025 L1,14 L1,15.5733794 L11.1785976,19.935011 C11.3818459,20.021663 11.6155931,20.021663 11.8188415,19.935011 L22,15.5733794 L22,14 Z" id="形状" fill="#59D0E2"></path>
<path d="M22,9 L11.5,13.4953318 L1,9 L1,10.5789585 L11.1785976,14.9350754 C11.3818459,15.0216415 11.6155931,15.0216415 11.8188415,14.9350754 L22,10.5789585 L22,9 Z" id="路径" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -88,12 +88,10 @@ export default {
visitedViews(newVal, oldVal){
let num = 0
newVal && newVal.map(item => {
console.log(item)
if (item.path === '/databoard/kiln' || item.path === '/databoard/whole-plant' || item.path === '/databoard/deep-processing') {
num++
}
})
this.$nextTick(() => {
if (num > 0) {
if(!this.wsIsOpen) {
getDcsMsg()
@ -107,7 +105,6 @@ export default {
console.log('关闭============')
}
}
})
}
},
mounted() {

View File

@ -96,7 +96,6 @@ export const DICT_TYPE = {
TIME_DIM: 'time_dim',
TABLE_NAME: 'table_name',
METHOD: 'method',
PUSH: 'push',
// ============== ORDER - 订单模块 =============
ORDER_STATUS: 'order_status',
@ -110,10 +109,7 @@ export const DICT_TYPE = {
FAULT_LEVEL: 'fault-level',
// ============== ENVIRONMENTAL - 环保模块 =============
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
// ============== GROUP - 班组模块 =============
WORK_SHOP: 'workshop'
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit'
}
/**

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-02-18 08:54:06
* @LastEditTime: 2024-01-19 16:31:53
* @Description:
-->
<template>
@ -29,13 +29,13 @@
<el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'task'" :back="'energy'">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'5_1'" :back="'energy'">
<base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
:table-data="qualityYearList" />
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'5_3'" :back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
</div> -->
@ -87,7 +87,7 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'productLine'"
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'5_5'"
:back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
@ -110,7 +110,7 @@
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'info'"
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'5_4'"
:back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
@ -757,9 +757,6 @@ export default {
this.init()
this.getTimes()
this.windowWidth(document.documentElement.clientWidth)
setTimeout(() => {
window.location.reload()
}, 86400000)
},
mounted() {
const _this = this;
@ -881,7 +878,6 @@ export default {
background-size: 100% 100%;
color: #00fff0;
text-align: center;
word-spacing:8px;
position: relative;
.unit{
position: absolute;

View File

@ -1,15 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-02-20 15:05:31
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-01-29 17:05:37
* @LastEditTime: 2024-01-29 15:00:30
* @Description:
-->
<template>
@ -149,13 +142,12 @@ import screenfull from 'screenfull'
import alarmLevel from './components/alarmLevel'
import pileBarChart from './components/pileBarChart'
import colorDiv from './components/colorDiv'
import moment from "moment";
// import axios from '@/utils/request'
import doubleYChart from './components/coldDoubleYChart'
import { parseTime } from '../core/mixins/code-filter';
import ISRAChart from './components/ISRAChart.vue';
import { getDcsMsg, closeDcsMsg } from "./wsInterface"
import { getDcsMsg, closeDcsMsg } from "@/websocket/wsInterface"
import LinearBarChart from './components/linearBarChart'
const qualityYearTableProps= []
const EqMonitoringPropsFun = [
@ -394,9 +386,6 @@ export default {
// this.fetchList('order-process')
// this.fetchList('line-chart-data')
this.init()
setTimeout(() => {
window.location.reload()
}, 86400000)
},
destroyed() {
this.funInitWebSocket()
@ -409,7 +398,6 @@ export default {
}
},
mounted() {
console.log(moment(this.logoutTime - 28800000).format('HH:mm:ss'));
this.funInitWebSocket()
// if (num > 0) {
if (!this.wsIsOpen) {
@ -721,17 +709,17 @@ export default {
let cutArr = this.cutWsData.productHourData.map((item, index) => [
// console.log(item)
`
<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
<span style="color:rgba(255,255,255,0.5)" >${item.lineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:rgba(255,255,255,0.7)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
`<span style="color:rgba(255,255,255,0.5)">${this.formatTime(item.time) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.wasteArea + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:rgba(255,255,255,0.5)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
])
this.cutConfig.data = cutArr
@ -882,7 +870,6 @@ export default {
</script>
<style lang="scss" scoped>
.visual-container {
width: 1920px;
height: 1080px;
@ -896,7 +883,7 @@ export default {
background-size: 100% 100%;
color: rgba(0, 255, 247, 1);
text-align: center;
word-spacing: 8px;
.unit {
position: absolute;
left: 260px;
@ -984,7 +971,7 @@ background: linear-gradient(to bottom,rgba(60,
height: 290px;
width: 1px;
position: absolute;
left: 66.3%;
left: 66.2%;
top: 12%;
background: linear-gradient(to bottom, rgba(60,
231,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-02-18 14:20:01
* @LastEditTime: 2024-01-29 14:56:38
* @LastEditors: zhp
* @Description:
-->
@ -85,11 +85,11 @@ export default {
},
},
legend: {
bottom: '10%',
bottom: '2%',
left: 'center',
itemWidth: 20,
itemHeight:12,
icon: 'rect',
itemWidth: 18,
itemHeight:18,
icon: 'circle',
textStyle: {
color: '#fff'
},

View File

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2024-02-20 15:25:02
* @LastEditTime: 2024-01-29 15:35:37
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
@ -162,8 +162,6 @@ export default {
width: 100%;
// background-color: rgba($color: #061027, $alpha: 0.15);
position: relative;
// filter: blur(.5px);
opacity: calc(.8);
// border: 2px solid;
// background: url('../../../../assets/img/energy.png') no-repeat;
// background-size: 100% 100%;
@ -252,12 +250,12 @@ export default {
width: 100%;
color: #ffffff;
font-size: 24px;
padding: 0.67em 0.67em 0.3em 0.67em;
padding: 0.67em;
display: flex;
}
.bar-content {
padding: .5em 1em 1em 1em;
padding: 1em;
flex: 1 auto;
position: relative;
}
@ -274,9 +272,4 @@ export default {
border: none;
}
}
// .base-container::after{
// z-index: -1;
// width: 100%;
// filter: blur(2px);
// }
</style>

View File

@ -1,13 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-02-01 15:52:41
* @LastEditTime: 2024-01-29 15:14:40
* @LastEditors: zhp
* @Description:
-->
<template>
<div style="height: 400px;">
<div :id="id" class="productChart" :style="{ height: '420px', width: width }" />
<div>
<div :id="id" class="productChart" :style="{ height: '390px', width: width }" />
</div>
</template>
@ -15,7 +15,7 @@
import * as echarts from 'echarts';
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
// import resize from './../mixins/resize'
export default {
name: 'OverviewBar',
mixins: [resize],
@ -67,18 +67,12 @@ export default {
}]
}
},
// mounted() {
// console.log('mounted')
// console.log('borderRadius: ', this.borderRadius)
// // this.$nextTick(() => {
// // this.initChart()
// // })
// },
mounted() {
this.$el.addEventListener('resize', () => {
console.log('resziing.....');
});
this.initChart()
console.log('mounted')
console.log('borderRadius: ', this.borderRadius)
// this.$nextTick(() => {
// this.initChart()
// })
},
beforeDestroy() {
if (!this.chart) {
@ -141,8 +135,7 @@ export default {
}
}
},
// data: passRateList
data: []
data: passRateList
}
]
// const colors = ['#5470C6', '#91CC75', '#EE6666']
@ -155,11 +148,15 @@ export default {
type: 'cross'
}
},
grid: { top: 90, right: 60, bottom: 20, left: 90 },
grid: {
left: "6%",
right: "6%",
bottom: "3%",
containLabel: true
},
legend: {
itemWidth: 10,
itemHeight: 10,
top: '0%',
right: '20px',
data: ['产线产量', '产线良品率'],
textStyle: {
@ -177,12 +174,9 @@ export default {
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
// textStyle: {
// color: 'rgba(255,255,255,0.5)' //
// }
textStyle: {
color: 'rgba(255,255,255,0.5)' //
}
},
splitLine: {
lineStyle: {
@ -220,11 +214,10 @@ export default {
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
textStyle: {
color: '#ced1d5', //
formatter: '{value}%'
// }
}
},
splitLine: {
lineStyle: {
@ -248,7 +241,7 @@ export default {
// },
scale: true,
type: 'value',
name: '产量/', // y
name: '产量/', // y
nameTextStyle: {
color: "#fff",
// fontSize: 10,
@ -265,13 +258,10 @@ export default {
}
},
axisLabel: {
// textStyle: {
// color: 'rgba(255,255,255,0.5)', //
color: "#fff",
fontSize: 12,
// formatter: '{value}'
textStyle: {
color: 'rgba(255,255,255,0.5)', //
formatter: '{value} 片'
// }
}
},
splitLine: {
lineStyle: {
@ -295,9 +285,6 @@ export default {
</script>
<style>
.productChart{
position: absolute;
height: 100%;
width: 100%;
top: -30px;
top: -40px;
}
</style>

View File

@ -150,9 +150,9 @@ export default {
}
},
axisLabel: {
color: "#fff",
fontSize: 12,
// formatter: '{value}'
textStyle: {
color: 'rgba(255,255,255,0.5)' //
}
},
splitLine: {
lineStyle: {
@ -162,30 +162,26 @@ export default {
data: this.nameList
},
yAxis: {
name: '单位kwh',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
type: 'value',
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: '{value}/kwh'
},
axisLine: {
show: true,
lineStyle: {
color: "#213259",
type: 'solid',
color: '#213259', // 线
width: '1' // 线
}
},
axisLabel: {
show: true, // y
textStyle: {
color: 'rgba(255,255,255,0.5)' //
}
},
splitLine: {
lineStyle: {
color: "#213259a0",
},
color: '#213259'
}
},
type: 'value'
},
// legend: {
// itemHeight: 10,
// itemWidth: 10,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-02-21 14:38:54
* @LastEditTime: 2024-01-25 14:08:27
* @LastEditors: zhp
* @Description:
-->
@ -91,78 +91,43 @@ export default {
},
methods: {
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
let rawData = []
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);
}
let colors = ['#0fdedb', '#2359ec' ]
console.log('total', totalData);
this.chart = echarts.init(document.getElementById(this.id))
const series = [
'良品',
'废品',
// 'Affiliate Ad',
// 'Video Ad',
// 'Search Engine'
].map((name, sid) => {
// console.log(sid)
return {
name,
let series = [
{
//
name: '良品',
type: 'bar',
stack: 'total',
barWidth: 10,
label: {
show: true,
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
},
color:colors[sid],
data: rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : d / totalData[did]
)
};
});
// let series = [
// {
// //
// name: '',
// type: 'bar',
// stack: 'total',
// // silent: true,
// // itemStyle: {
// color: '#0fdedb',
// // },
// // barCategoryGap: '10%',
// barWidth: 10,
// data: passRateList
// silent: true,
// itemStyle: {
color: '#0fdedb',
// },
// {
// type: 'bar',
// stack: 'total',
// name: '',
// // barCategoryGap: '10%',
// data: wasteList,
// // barWidth: 10,
// // barWidth: 15,
// // label: {
// // position: [10, 10],
// // normal: {
// // position: [800, -24],
// // show: true,
// // textStyle: {
// // color: '#2359ec',
// // fontSize: 16,
// // },
// // },
// // },
// }
// ]
// barCategoryGap: '10%',
barWidth: 10,
data: passRateList
},
{
type: 'bar',
stack: 'total',
name: '废品',
// barCategoryGap: '10%',
data: wasteList,
// barWidth: 10,
// barWidth: 15,
// label: {
// position: [10, 10],
// normal: {
// position: [800, -24],
// show: true,
// textStyle: {
// color: '#2359ec',
// fontSize: 16,
// },
// },
// },
}
]
// for (i = 0; i < 5; i++) {
// series.push({
@ -172,7 +137,6 @@ export default {
legend: {
// top: '2.5%',
// right: '20px',
icon: 'rect',
textStyle: {
color: '#ffffff'
}

View File

@ -1,62 +0,0 @@
/*
* @Author: zhp
* @Date: 2024-02-01 15:39:22
* @LastEditTime: 2024-02-01 15:39:23
* @LastEditors: zhp
* @Description:
*/
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null,
$_resizeHandler: null
}
},
mounted() {
this.$_resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
this.$_initResizeEvent()
this.$_initSidebarResizeEvent()
},
beforeDestroy() {
this.$_destroyResizeEvent()
this.$_destroySidebarResizeEvent()
},
// to fixed bug when cached by keep-alive
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
activated() {
this.$_initResizeEvent()
this.$_initSidebarResizeEvent()
},
deactivated() {
this.$_destroyResizeEvent()
this.$_destroySidebarResizeEvent()
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_initResizeEvent() {
window.addEventListener('resize', this.$_resizeHandler)
},
$_destroyResizeEvent() {
window.removeEventListener('resize', this.$_resizeHandler)
},
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.$_resizeHandler()
}
},
$_initSidebarResizeEvent() {
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
$_destroySidebarResizeEvent() {
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
}
}
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:35:29
* @LastEditTime: 2024-01-29 16:17:04
* @Description:
-->
<template>
@ -109,7 +109,7 @@
<top-radio-group />
</div> -->
<!-- 像下面这样表格里的limit值也许可以用js动态计算出来 -->
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="359" :show-legend="true" />
</base-container>
</el-col>
</el-row>
@ -610,28 +610,12 @@ export default {
// this.fetchList('order-process')
// this.fetchList('line-chart-data')
this.init()
setTimeout(() => {
window.location.reload()
}, 86400000)
},
destroyed () {
this.websocketClose()
this.SJGWebsocketClose()
},
mounted() {
let eqArr = this.qualityYearList.map((item, index) => [
`<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.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
@ -685,7 +669,8 @@ export default {
'get',
).then((res) => {
// console.log('11111', res);
let processArr = qualityMonthList.map((item, index) => [
if (res.data.length !==0) {
let processArr = res.data.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
@ -699,8 +684,8 @@ export default {
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
if (res.data.length !==0) {
let processArr = res.data.map((item, index) => [
} else {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
@ -865,6 +850,22 @@ export default {
// console.log(this.EnergyMonitoringList)
// this.$nextTick(() => {
this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} else {
console.log(this.qualityYearList);
let eqArr = this.qualityYearList.map((item,index) => [
`<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.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
}
},
//
@ -993,7 +994,6 @@ export default {
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
word-spacing: 8px;
text-align: center;
.unit {
position: absolute;

View File

@ -1,183 +0,0 @@
/*
* @Author: zhp
* @Date: 2024-01-29 17:05:25
* @LastEditTime: 2024-01-29 17:05:25
* @LastEditors: zhp
* @Description:
*/
/**
* 发起websocket请求函数
* @param {string} url ws连接地址
* @param {Object} agentData 传给后台的参数
* @param {function} successCallback 接收到ws数据对数据进行处理的回调函数
* @param {function} errCallback ws连接错误的回调函数
*/
export function WsConnect(url, agentData, successCallback, errCallback) {
this.wsUrl = url;
this.wsObj = null;
// 是否执行重连 true/不执行 false/执行
this.lockReconnect = false;
// 重连定时器
this.wsCreateHandler = null;
// 连接成功,执行回调函数
this.messageCallback = successCallback;
// 连接失败,执行回调函数
this.errorCallback = errCallback;
// 发送给后台的数据
this.sendDatas = agentData;
// 创建ws函数
this.createWebSoket = () => {
if (typeof WebSocket === "undefined") {
writeToScreen("您的浏览器不支持WebSocket无法获取数据");
return false;
}
try {
this.wsObj = new WebSocket(url);
initWsEventHandle();
} catch (e) {
writeToScreen("连接异常,开始重连");
reconnect();
}
};
// 手动关闭websocket 这里手动关闭会执行onclose事件
this.closeWebsocket = () => {
if (this.wsObj) {
writeToScreen("手动关闭websocket");
this.wsObj.close(); // 关闭websocket
// this.wsObj.onclose() // 关闭websocket(如果上面的关闭不生效就加上这一条)
// 关闭重连
this.lockReconnect = true;
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
// 关闭心跳检查
// heartCheck.stop();
}
};
const initWsEventHandle = () => {
try {
// 连接成功
this.wsObj.onopen = (event) => {
onWsOpen(event);
// heartCheck.start();
};
// 监听服务器端返回的信息
this.wsObj.onmessage = (event) => {
onWsMessage(event);
// heartCheck.start();
};
this.wsObj.onclose = (event) => {
writeToScreen("onclose执行关闭事件");
onWsClose(event);
};
this.wsObj.onerror = (event) => {
writeToScreen("onerror执行error事件开始重连");
onWsError(event);
reconnect();
};
} catch (err) {
writeToScreen("绑定事件没有成功,开始重连");
reconnect();
}
};
const onWsOpen = (event) => {
writeToScreen("CONNECT");
// // 客户端与服务器端通信
// wsObj.send('我发送消息给服务端');
// 添加状态判断当为OPEN时发送消息
if (this.wsObj.readyState === this.wsObj.OPEN) {
// wsObj.OPEN = 1
// 发给后端的数据需要字符串化
this.wsObj.send(JSON.stringify(this.sendDatas));
}
if (this.wsObj.readyState === this.wsObj.CLOSED) {
// wsObj.CLOSED = 3
writeToScreen("wsObj.readyState=3, ws连接异常开始重连");
reconnect();
this.errorCallback(event);
}
};
const onWsMessage = (event) => {
const jsonStr = event.data;
// writeToScreen("onWsMessage接收到服务器的数据: ", jsonStr);
this.messageCallback(jsonStr);
};
const onWsClose = (event) => {
writeToScreen("DISCONNECT");
// e.code === 1000 表示正常关闭。 无论为何目的而创建, 该链接都已成功完成任务。
// e.code !== 1000 表示非正常关闭。
console.log("onclose event: ", event);
if (event && event.code !== 1000) {
writeToScreen("非正常关闭");
this.errorCallback(event);
// 如果不是手动关闭,这里的重连会执行;如果调用了手动关闭函数,这里重连不会执行
reconnect();
}
};
const onWsError = (event) => {
writeToScreen("onWsError: ", event.data);
this.errorCallback(event);
};
const writeToScreen = (massage) => {
console.log(massage);
};
// 重连函数
const reconnect = () => {
if (this.lockReconnect) {
return;
}
writeToScreen("3秒后重连");
this.lockReconnect = true;
// 没连接上会一直重连,设置延迟避免请求过多
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
this.wsCreateHandler = setTimeout(() => {
writeToScreen("重连..." + this.wsUrl);
this.createWebSoket();
this.lockReconnect = false;
writeToScreen("重连完成");
}, 3000);
};
// 心跳检查看看websocket是否还在正常连接中
// let heartCheck = {
// timeout: 15000,
// timeoutObj: null,
// serverTimeoutObj: null,
// // 重启
// reset() {
// clearTimeout(this.timeoutObj);
// clearTimeout(this.serverTimeoutObj);
// this.start();
// },
// // 停止
// stop() {
// clearTimeout(this.timeoutObj);
// clearTimeout(this.serverTimeoutObj);
// },
// // 开启定时器
// start() {
// this.timeoutObj && clearTimeout(this.timeoutObj);
// this.serverTimeoutObj && clearTimeout(this.serverTimeoutObj);
// // 15s之内如果没有收到后台的消息则认为是连接断开了需要重连
// this.timeoutObj = setTimeout(() => {
// writeToScreen("心跳检查发送ping到后台");
// try {
// const datas = { ping: true };
// this.wsObj.send(JSON.stringify(datas));
// } catch (err) {
// writeToScreen("发送ping异常");
// }
// console.log("内嵌定时器this.serverTimeoutObj: ", this.serverTimeoutObj);
// // 内嵌定时器
// this.serverTimeoutObj = setTimeout(() => {
// writeToScreen("没有收到后台的数据,重新连接");
// reconnect();
// }, this.timeout);
// }, this.timeout);
// },
// };
}

View File

@ -1,51 +0,0 @@
import { WsConnect } from './websocket'
import store from "@/store";
// 创建websocket链接
const timestr = new Date().getTime()
// ISRA
const mesIsra = new WsConnect(
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
'',
(data) => {
// console.log('mes ISRA成功的回调函数, 接收到的data数据: ', 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})
break;
}
default:
}
},
(err) => {
console.log('失败的回调函数', err)
}
)
export const getDcsMsg = () => {
// dcsConn.createWebSoket()
mesIsra.createWebSoket()
// mesMA.createWebSoket()
// mesEN.createWebSoket()
// mesGAS.createWebSoket()
// mesIS.createWebSoket()
// mesSJG.createWebSoket()
// mesOV.createWebSoket()
// mesCUTTING.createWebSoket()
}
export const closeDcsMsg = () => {
// dcsConn.closeWebsocket()
mesIsra.closeWebsocket()
// mesMA.closeWebsocket()
// mesEN.closeWebsocket()
// mesGAS.closeWebsocket()
// mesIS.closeWebsocket()
// mesSJG.closeWebsocket()
// mesOV.closeWebsocket()
// mesCUTTING.closeWebsocket()
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 09:04:48
* @LastEditTime: 2024-01-08 16:11:03
* @Description:
-->
<template>
@ -27,7 +27,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产品名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail || isedit" clearable placeholder="请输入产品名称" />
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -35,7 +35,7 @@
<el-input
v-model="dataForm.code"
clearable
:disabled="isdetail || isedit"
:disabled="isdetail"
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
@ -44,12 +44,12 @@
<el-select
v-model="dataForm.materialType"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="(dict, index) in getDictDatas('material_type')"
:key="index"
v-for="dict in getDictDatas('material_type')"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -62,12 +62,12 @@
<el-select
v-model="dataForm.productType"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择产品类型">
<el-option
v-for="(dict, index) in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="index"
v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -78,12 +78,12 @@
<el-select
v-model="dataForm.unit"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择单位">
<el-option
v-for="(dict, index) in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="index"
v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -91,24 +91,24 @@
</el-col>
<el-col :span="8">
<el-form-item label="单位平方数" prop="area">
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入单位平方数" />
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="规格" prop="specifications">
<el-input v-model="dataForm.specifications" :disabled="isdetail || isedit" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
<el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产节拍(S)" prop="processTime">
<el-form-item label="产线生产单位用时(S)" prop="processTime">
<el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="重量" prop="weight">
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入重量" />
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
</el-form-item>
</el-col>
</el-row>
@ -241,7 +241,7 @@ export default {
productType: undefined,
area: undefined,
specifications: undefined,
processTime: undefined,
processTime: 0,
remark: undefined,
unit: undefined,
weight: undefined
@ -249,14 +249,14 @@ export default {
productAttrList: [],
visible: false,
isdetail: false,
isedit: false,
idAttrShow: false,
dataRule: {
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
}
};
},
@ -326,8 +326,6 @@ export default {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.isedit = id ? true : false;
console.log('你好', this.isedit)
this.visible = true;
if (id) {
this.idAttrShow = true
@ -345,9 +343,10 @@ export default {
// this.dataForm.area = response.data.area || 0
// this.dataForm.weight = response.data.weight || 0
// this.dataForm.specifications = response.data.specifications || undefined
// if (this.dataForm.unit !== undefined) {
// this.dataForm.unit = String(this.dataForm.unit)
// }
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.materialType !== undefined) {
this.dataForm.materialType = String(this.dataForm.materialType)
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-18 13:53:09
* @LastEditTime: 2023-11-21 18:59:54
* @Description:
-->
<template>
@ -12,6 +12,18 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工厂名称" prop="factoryId">
@ -29,36 +41,6 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车间名称" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="产线TT值(h)" prop="tvalue">
<el-input
v-model.number="dataForm.tvalue"
@ -110,13 +92,11 @@ export default {
tvalue: 0,
factoryId: undefined,
remark: undefined,
roomNameDict: undefined
},
factoryList: [],
dataRule: {
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
}
};

View File

@ -47,7 +47,6 @@ import {
} from '@/api/base/coreProductionLine';
import { getStatus } from '@/api/core/base/productionLine';
import codeFilter from '../../core/mixins/code-filter';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
@ -59,11 +58,6 @@ const tableProps = [
prop: 'factoryName',
label: '工厂'
},
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop')
},
{
prop: 'name',
label: '产线名称'
@ -77,10 +71,10 @@ const tableProps = [
label: '当前状态',
filter: codeFilter('lineStatus')
},
// {
// prop: 'tvalue',
// label: '线TT(h)'
// },
{
prop: 'tvalue',
label: '产线TT值(h)'
},
{
prop: 'description',
label: '描述'
@ -88,7 +82,7 @@ const tableProps = [
{
prop: 'remark',
label: '备注'
}
},
];
export default {

View File

@ -116,22 +116,6 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span='8'>
<el-form-item label="负责车间" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span='8'>
<el-form-item label="关联产线" prop="productLineIds">
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
@ -196,7 +180,6 @@ export default {
productLineIds: [],
type: '',
workers: '',
roomNameDict: '',
status: 1
},
rules: {
@ -204,7 +187,6 @@ export default {
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
},
productList: [],
@ -282,19 +264,19 @@ export default {
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
// this.$confirm('使?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// console.log('121', this.dataForm.name)
// this.$emit("refreshDataList", {
// id: response.data,
// name: this.dataForm.name
// });
// }).catch(() => {
// this.$emit("refreshDataList");
// });
this.$confirm('是否添加预使用主原料信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log('121', this.dataForm.name)
this.$emit("refreshDataList", {
id: response.data,
name: this.dataForm.name
});
}).catch(() => {
this.$emit("refreshDataList");
});
});
});
},

View File

@ -60,7 +60,6 @@ import {
getConOrderList,
getCoreWOList
} from '@/api/base/coreWorkOrder';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
@ -83,13 +82,6 @@ const tableProps = [
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'roomNameDict',
label: '负责车间',
minWidth: 120,
filter: publicFormatter('workshop'),
showOverflowtooltip: true
},
{
prop: 'workers',
label: '负责人',
@ -109,7 +101,7 @@ const tableProps = [
{
prop: 'status',
label: '工单状态',
filter: (val) => ['', '等待', '激活', '暂停', '完成', '作废', '终止'][val]
filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val]
},
{
prop: 'planFinishTime',
@ -231,20 +223,6 @@ export default {
]
}
},
{
type: 'stop',
btnName: '终止',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 2
}
]
}
},
this.$auth.hasPermi(`base:core-work-order:detail`)
? {
type: 'detail',
@ -311,8 +289,7 @@ export default {
{ id: 2, name: '激活' },
{ id: 3, name: '暂停' },
{ id: 4, name: '完成' },
{ id: 5, name: '作废' },
{ id: 6, name: '终止' }
{ id: 9, name: '作废' }
],
param: 'status',
clearable: true
@ -424,17 +401,13 @@ export default {
opration = '暂停'
}
if (val.type === 'nullify') {
param.status = 5
opration = '废'
param.status = 9
opration = '废'
}
if (val.type === 'finish') {
param.status = 4
opration = '完成'
}
if (val.type === 'stop') {
param.status = 6
opration = '终止'
}
console.log('22',val)
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 09:41:39
* @LastEditTime: 2023-12-04 15:10:11
* @Description:
-->
<template>
@ -59,7 +59,7 @@
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="dict in getDictDatas('material_type')"
v-for="dict in materialList"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
@ -238,7 +238,7 @@ export default {
remark: undefined,
unit: ''
},
// materialList: [],
materialList: [],
supplierList: [],
materialAttrList: [],
unitList: [],
@ -258,18 +258,17 @@ export default {
methods: {
async getDict() {
//
// const res = await listData({
// pageNo: 1,
// pageSize: 99,
// dictType: 'material_type',
// });
// this.materialList = res.data.list
// this.materialList = res.data.list.map(item => {
// return {
// label: item.label,
// value: Number(item.value)
// }
// });
const res = await listData({
pageNo: 1,
pageSize: 99,
dictType: 'material_type',
});
this.materialList = res.data.list.map(item => {
return {
label: item.label,
value: Number(item.value)
}
});
//
const supplierRes = await getSupplierList();
this.supplierList = supplierRes.data;
@ -349,9 +348,6 @@ export default {
if (this.dataForm.unit) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.type) {
this.dataForm.type = String(this.dataForm.type)
}
});
//
this.getList();

View File

@ -89,7 +89,7 @@
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px">
<el-form-item label="新审批人" prop="assigneeUserId">
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%">
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
</el-form>

View File

@ -41,7 +41,7 @@
</el-form-item>
<el-form-item v-if="form.type === 10" label="指定角色" prop="roleIds">
<el-select v-model="form.roleIds" multiple clearable style="width: 100%">
<el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in roleOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item v-if="form.type === 20 || form.type === 21" label="指定部门" prop="deptIds">
@ -50,17 +50,17 @@
</el-form-item>
<el-form-item v-if="form.type === 22" label="指定岗位" prop="postIds">
<el-select v-model="form.postIds" multiple clearable style="width: 100%">
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in postOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item v-if="form.type === 30 || form.type === 31 || form.type === 32" label="指定用户" prop="userIds">
<el-select v-model="form.userIds" multiple clearable style="width: 100%">
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item v-if="form.type === 40" label="指定用户组" prop="userGroupIds">
<el-select v-model="form.userGroupIds" multiple clearable style="width: 100%">
<el-option v-for="item in userGroupOptions" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in userGroupOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item v-if="form.type === 50" label="指定脚本" prop="scripts">

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:36:50
* @LastEditTime: 2023-12-05 15:41:39
* @Description:
-->
<template>
@ -44,7 +44,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -246,7 +246,9 @@ export default {
.map((_, index) => {
const today = new Date();
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date(
dtimestamp
).getDate()}`;}).reverse()
}else if (this.chartTime == "月") {
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
days = 31;

View File

@ -93,12 +93,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否推送" prop="push">
<el-switch v-model="form.push"></el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="form.description"></el-input>
</el-form-item>
@ -154,8 +149,7 @@ export default {
code: '',
nuit: '',
pricingMethod: 2,
leaderName: '',
push: false
leaderName: ''
},
isEdit: false, //
rules: {
@ -184,24 +178,18 @@ export default {
this.form.id = id
getEnergyType( id ).then((res) => {
if (res.code === 0) {
this.form.name = res.data.name
this.form.code = res.data.code
this.form.nuit = res.data.nuit
this.form.pricingMethod = res.data.pricingMethod
this.form.leaderName = res.data.leaderName
this.form.push = res.data.push ? true : false
this.form = res.data
switch(this.form.pricingMethod) {
case 0:
this.tableData1 = this.form.segPriceList || []
this.tableData1 = this.form.segPriceList
break;
case 1:
this.tableData2 = this.form.usedPriceList || []
this.tableData2 = this.form.usedPriceList
break;
default:
}
}
})
console.log(this.form)
} else {
this.isEdit = false
this.form.id = ''
@ -300,7 +288,6 @@ export default {
return false
}
}
console.log(this.form)
if (this.isEdit) {
//
updateEnergyType({
@ -313,8 +300,7 @@ export default {
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
push:this.form.push ? 1 : 0
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
}).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
@ -331,8 +317,7 @@ export default {
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
push:this.form.push ? 1 : 0
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
}).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");

View File

@ -52,8 +52,7 @@ const tableProps = [
{
prop: 'code',
label: '类型编码',
showOverflowtooltip: true,
minWidth: 150
showOverflowtooltip: true
},
{
prop: 'name',
@ -68,11 +67,6 @@ const tableProps = [
prop: 'pricingMethod',
label: '计价方式'
},
{
prop: 'push',
label: '是否推送',
filter: publicFormatter('push')
},
{
prop: 'price',
label: '价格(元)',

View File

@ -45,10 +45,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<!-- <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> -->
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit" />
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog>
<!-- 抽屉 详情 -->
@ -126,12 +123,11 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http';
import BasicDrawer from './components/BasicDrawer.vue';
import { publicFormatter } from '@/utils/dict';
import AddOrUpdate from './add-or-updata';
export default {
name: 'EquipmentPlcConnect',
mixins: [basicPageMixin],
components: { BasicDrawer, AddOrUpdate },
components: { BasicDrawer },
data() {
return {
searchBarKeys: ['equipmentId', 'plcId'],
@ -347,10 +343,6 @@ export default {
this.initSearchOptions();
},
methods: {
successSubmit() {
this.cancel()
this.getList()
},
async getEquipmentOptions() {
const res = await this.$axios({
url: '/base/core-equipment/listAll',
@ -477,7 +469,26 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs.addOrUpdate.dataFormSubmit()
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
},
//

View File

@ -1,149 +0,0 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 18:31:44
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-form-item label="设备" prop="equipmentId">
<el-cascader
placeholder="请选择设备"
v-model="dataForm.equipmentId"
:options="plLineList"
:props="{value: 'id', label: 'name', children: 'children'}"
filterable />
</el-form-item>
<el-form-item label="关联表名" prop="plcId">
<el-select
v-model="dataForm.plcId"
filterable
placeholder="请选择关联表"
style="width: 100%">
<el-option
v-for="dict in plcList"
:key="dict.id"
:label="dict.plcTableName"
:value="dict.id" />
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from '../../../../core/mixins/basic-add';
import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createCorePL,
updateURL: updateCorePL,
infoURL: getCorePL,
},
dataForm: {
id: undefined,
equipmentId: undefined,
plcId: undefined
},
plcList: [],
plLineList: [],
dataRule: {
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
plcId: [{ required: true, message: "关联表名不能为空", trigger: "blur" }]
},
options: [{
value: 'zhinan',
label: '指南',
children: [{
value: 'shejiyuanze',
label: '设计原则',
children: [{
value: 'yizhi',
label: '一致'
}, {
value: 'fankui',
label: '反馈'
}, {
value: 'xiaolv',
label: '效率'
}, {
value: 'kekong',
label: '可控'
}]
}, {
value: 'daohang',
label: '导航'
}]
}]
};
},
created() {
this.getDict()
},
methods: {
async getDict() {
//
const res = await getplcAllList();
this.plcList = res.data;
// 线
const res1 = await getCorePLList();
this.plLineList = res1.data;
this.plLineList.forEach(item => {
listByParentId({ id: item.id }).then(resp => {
if (resp.data.length > 0) {
// item.children = resp.data
this.$set(item, 'children', resp.data)
// this.$forceUpdate()
}
})
})
console.log('你好', this.plLineList)
},
//
dataFormSubmit() {
console.log('11', this.dataForm.equipmentId)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
updateEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
createEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length - 1],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>

View File

@ -51,7 +51,6 @@ export default {
list: {
handler(val) {
if (val) {
// console.log(val);
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
}
},
@ -61,7 +60,6 @@ export default {
currentSelect: {
handler(val) {
// val: string
console.log(val)
this.selected = val;
this.randomKey = Math.random();
//
@ -77,7 +75,6 @@ export default {
},
methods: {
handleChange(bomItem, selected) {
console.log(selected);
this.list__inner = this.list__inner.map((item) => ({
...item,
disabled: selected ? item.id !== bomItem.id : false,

View File

@ -119,9 +119,7 @@ export default {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId);
this.selected = val
console.log(this.materialsBomList)
// console.log(this.selectedEquipments)
this.selected = val;
}
},
deep: true,

View File

@ -262,7 +262,6 @@ export default {
// id
eq.materialsBom.equipmentId = eq.id;
eq.valuesBom.equipmentId = eq.id;
console.log(this.selectedBoms)
return eq;
});
} else {

View File

@ -1,30 +1,18 @@
<template>
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
<el-row>
<el-col :span="12">
<el-form-item label="车间名称" prop="roomNameDict">
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" filterable>
<el-option
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班次名称" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="编码" prop="code">
<el-input v-model="form.code" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="生效时间" prop="enableTime">
<el-date-picker
@ -37,8 +25,6 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="失效时间" prop="disableTime">
<el-date-picker
@ -51,6 +37,8 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班次开始时间" prop="startTime">
<el-time-picker
@ -63,8 +51,6 @@
</el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班次结束时间" prop="endTime">
<el-time-picker
@ -77,6 +63,13 @@
</el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否跨天" prop="daySpan">
<el-select v-model="form.daySpan" placeholder="请选择" disabled style="width: 100%;">
@ -86,13 +79,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
@ -103,7 +89,6 @@ export default {
return {
form: {
id: '',
roomNameDict: '',
name: '',
code: '',
enableTime: '',
@ -115,7 +100,6 @@ export default {
},
isEdit: false, //
rules: {
roomNameDict:[{ required: true, message: '请选择车间名称', trigger: 'select' }],
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
enableTime: [{ required: true, message: '请选择班次开始时间', trigger: 'change' }],
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
@ -134,8 +118,6 @@ export default {
this.form = res.data
this.form.name = res.data.name
this.form.code = res.data.code
// this.form.roomNameDict = (res.data.roomNameDict || res.data.roomNameDict===0) ? String(res.data.roomNameDict) : ''
this.$set(this.form, 'roomNameDict',(res.data.roomNameDict || res.data.roomNameDict===0) ? String(res.data.roomNameDict) : '')
this.form.enableTime = res.data.enableTime
// this.form.disableTime = res.data.disableTime || null
this.$set(this.form, 'disableTime', res.data.disableTime || null)

View File

@ -46,21 +46,14 @@
<script>
import { getGroupClassesPage, deleteGroupClasses, updateGroupClasses } from "@/api/base/groupClasses";
import GroupClassAdd from './components/groupClassAdd'
import GroupClassAdd from './components/groupClassAdd.vue'
import { formatDate } from '@/utils'
import { publicFormatter } from '@/utils/dict'
const tableProps = [
{
prop: 'enableTimeStr',
label: '生效时段',
minWidth: 300
},
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop'),
minWidth: 100
},
{
prop: 'name',
label: '班次名称'

View File

@ -1,30 +1,18 @@
<template>
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
<el-row>
<el-col :span="12">
<el-form-item label="车间名称" prop="roomNameDict">
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" filterable>
<el-option
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班组名称" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班组编码" prop="code">
<el-input v-model="form.code" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班组组长" prop="leaderId">
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" filterable @change="selectLeader">
@ -37,8 +25,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="手机号" prop="telephone">
<el-input v-model="form.telephone" disabled></el-input>
@ -59,12 +45,10 @@ export default {
name: '',
code: '',
leaderId: '',
telephone: '',
roomNameDict: ''
telephone: ''
},
isEdit: false, //
rules: {
roomNameDict: [{ required: true, message: '请选择车间名称', trigger: 'select' }],
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
code: [{ required: true, message: '请输入班组编码', trigger: 'blur' }],
leaderId: [{ required: true, message: '请选择组长', trigger: 'select' }]
@ -80,11 +64,7 @@ export default {
this.form.id = id
getGroupTeam( id ).then((res) => {
if (res.code === 0) {
this.form.name = res.data.name
this.form.code = res.data.code
this.form.leaderId = res.data.leaderId
this.form.telephone = res.data.telephone
this.form.roomNameDict = (res.data.roomNameDict || res.data.roomNameDict===0) ? String(res.data.roomNameDict) : ''
this.form = res.data
this.selectLeader()
}
})

View File

@ -54,7 +54,6 @@ import GroupTeamAdd from './components/groupTeamAdd'
import StatusBtn from './components/statusBtn'
import WorkerOperate from './components/workerOperate'
import WorkerEdit from './components/workerEdit'
import { publicFormatter } from '@/utils/dict'
const tableProps = [
{
prop: 'createTime',
@ -62,11 +61,6 @@ const tableProps = [
filter: parseTime,
minWidth: 160
},
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop')
},
{
prop: 'name',
label: '班组名称'

View File

@ -1,108 +0,0 @@
<template>
<div class="topTab">
<div class="arr leftArr" @click='toLeft'></div>
<div class="arr rightArr" @click='toRight'></div>
<el-scrollbar ref="groupTeamScroll" :vertical="false" class="scrollTab">
<ul class="tabBox">
<li :class="{'active':roomNameDict===item.value}" v-for="(item, index) in getDictDatas('workshop')" :key='index' @click='toggleName(item.value)'>{{item.label}}</li>
</ul>
</el-scrollbar>
</div>
</template>
<script>
export default {
name: 'TopTab',
data() {
return {
}
},
props:['roomNameDict'],
computed: {
scrollWrapper() {
return this.$refs.groupTeamScroll.$refs.wrap
}
},
methods:{
toLeft() {
const container = this.scrollWrapper
container.scrollLeft-=100
},
toRight() {
const container = this.scrollWrapper
container.scrollLeft+=100
},
toggleName(val) {
this.$emit('emitFun',val)
}
}
}
</script>
<style lang="scss" scoped>
.topTab {
height: 56px;
padding: 0px 48px 0px 56px;
position: relative;
.arr {
position: absolute;
width: 48px;
height: 48px;
line-height: 48px;
background-color: #fff;
border-radius: 8px;
cursor: pointer;
}
.leftArr{
left: 0;
padding-left: 10px;
}
.leftArr::before{
display: inline-block;
content: '';
width: 0;
height: 0;
border-width: 8px;
border-style: solid;
border-color: transparent #0B58FF transparent transparent;
}
.rightArr{
right: 0;
top:0;
padding-left: 22px;
}
.rightArr::before{
display: inline-block;
content: '';
width: 0;
height: 0;
border-width: 8px;
border-style: solid;
border-color: transparent transparent transparent #0B58FF;
}
.scrollTab{
white-space: nowrap;
overflow: hidden;
font-size: 16px;
width: 100%;
height: 100%;
ul,li{
list-style: none;
margin: 0;
padding: 0;
}
.tabBox >.active {
border-bottom: 4px solid #0B58FF;
}
.tabBox>li {
display: inline-block;
height: 48px;
line-height: 48px;
background: #FFFFFF;
border-radius: 8px;
padding: 0px 10px;
margin-right: 8px;
cursor: pointer;
}
}
}
</style>

View File

@ -1,6 +1,5 @@
<template>
<div class="groupTeamScheduling">
<TopTab :roomNameDict='roomNameDict' @emitFun='toggleName'/>
<div class="operationArea">
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
@ -88,15 +87,13 @@
<script>
import { getPreset, createOrUpdateList, autoSet } from "@/api/base/groupTeamScheduling";
import { listEnabledByRoom } from "@/api/base/groupTeam";
import { listEnabled } from "@/api/base/groupTeam";
import moment from 'moment';
import TopTab from './components/topTab'
export default {
name: "GroupTeamScheduling",
data() {
return {
roomNameDict:null,
startDay: '',//
year: '',// 2023
month: '',//
@ -111,9 +108,7 @@ export default {
autoScheduling: false //
};
},
components:{ TopTab },
created() {
this.roomNameDict = this.getDictDatas('workshop')[0].value
this.startDay = new Date()
//
this.settingBtn()
@ -122,22 +117,6 @@ export default {
this.getList()
},
methods: {
//
toggleName(val) {
this.roomNameDict = val
//
if (this.showSetting) {
this.showSetting = !this.showSetting
}
//
if (!this.jumpDisabled) {
this.clearChoose()
}
//
this.getTeamList()
//
this.getList()
},
//
selectMonth() {
if (this.startDay) {
@ -154,10 +133,7 @@ export default {
},
//
getTeamList() {
console.log(this.roomNameDict)
listEnabledByRoom({
room: this.roomNameDict
}).then(res => {
listEnabled().then(res => {
this.teamList = res.data || []
})
},
@ -167,8 +143,7 @@ export default {
let month = moment(this.startDay).format('M')
getPreset({
year: year,
month: month,
roomNameDict: this.roomNameDict
month: month
}).then(res => {
let obj = res.data || {}
if (obj) {
@ -181,7 +156,6 @@ export default {
}
}
this.list = obj
this.settingBtnDis = false
}).catch(() => {
this.list = {}
this.settingBtnDis = true //
@ -272,8 +246,7 @@ export default {
// console.log(moment(this.startDay).format("YYYY-MM-DD"))
autoSet({
year: this.year,
month: moment(this.startDay).month() + 1,
roomNameDict: this.roomNameDict
month: moment(this.startDay).month() + 1
}).then(res => {
this.list = res.data || {}
})
@ -377,8 +350,6 @@ export default {
padding: 14px 10px 0 20px;
background-color: #fff;
border-radius: 8px;
height: calc(100vh - 255px);
overflow-y: auto;
.el-calendar__body {
padding: 10px 16px 16px 0;
}

View File

@ -7,10 +7,6 @@
<p class="boldTitle">工单名称</p>
<p class="lightText">{{ queryParams.workOrderName ? queryParams.workOrderName : '-' }}</p>
</el-col>
<el-col :span="6">
<p class="boldTitle">车间名称</p>
<p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? getDictDataLabel('workshop',queryParams.roomNameDict) : '-' }}</p>
</el-col>
<el-col :span="6">
<p class="boldTitle">班组名称</p>
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>

View File

@ -31,15 +31,7 @@
import { getByWorkOrder } from '@/api/monitoring/groupTeamView'
import { workOrderList } from '@/api/base/workOrder'
import GroupTeamViewDetail from './components/groupTeamViewDetail.vue'
import { publicFormatter } from '@/utils/dict'
const tableProps = [
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop'),
showOverflowtooltip: true,
minWidth: 100
},
{
prop: 'name',
label: '班组名称'
@ -142,7 +134,6 @@ export default {
})
params.workOrderId = this.queryParams.workOrderId
params.workOrderName = this.workOrderName
params.roomNameDict = val.data.roomNameDict
this.$nextTick(() => {
this.$refs.groupTeamViewDetail.init(params)
})

View File

@ -37,21 +37,13 @@
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
import { parseTime } from '@/utils/ruoyi'
import TeamProductionDetail from './components/teamProductionDetail'
import { publicFormatter } from '@/utils/dict'
const tableProps = [
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop'),
showOverflowtooltip: true,
minWidth: 100
prop: 'createTime',
label: '排班创建时间',
filter: parseTime,
minWidth: 160
},
// {
// prop: 'createTime',
// label: '',
// filter: parseTime,
// minWidth: 160
// },
{
prop: 'startDay',
label: '上班日期',

View File

@ -86,18 +86,18 @@
:model="loginForm"
:rules="LoginRules"
class="login-form">
<!-- <el-form-item prop="tenantName" v-if="tenantEnable">
<el-form-item prop="tenantName" v-if="tenantEnable">
<el-input
v-model="loginForm.tenantName"
type="text"
auto-complete="off"
placeholder="租户">
<svg-icon
<!-- <svg-icon
slot="prefix"
icon-class="tree"
class="el-input__icon input-icon" />
class="el-input__icon input-icon" /> -->
</el-input>
</el-form-item> -->
</el-form-item>
<!-- 账号密码登录 -->
<div>
<el-form-item prop="username">
@ -244,25 +244,25 @@ export default {
trigger: 'blur',
},
],
// tenantName: [
// { required: true, trigger: 'blur', message: '' },
// {
// validator: (rule, value, callback) => {
// // debugger
// getTenantIdByName(value).then((res) => {
// const tenantId = res.data;
// if (tenantId && tenantId >= 0) {
// //
// setTenantId(tenantId);
// callback();
// } else {
// callback('');
// }
// });
// },
// trigger: 'blur',
// },
// ],
tenantName: [
{ required: true, trigger: 'blur', message: '租户不能为空' },
{
validator: (rule, value, callback) => {
// debugger
getTenantIdByName(value).then((res) => {
const tenantId = res.data;
if (tenantId && tenantId >= 0) {
//
setTenantId(tenantId);
callback();
} else {
callback('租户不存在');
}
});
},
trigger: 'blur',
},
],
},
loading: false,
redirect: undefined,

View File

@ -32,7 +32,7 @@ SOFTWARE.
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -33,7 +33,7 @@ SOFTWARE.
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -31,7 +31,7 @@ SOFTWARE.
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -33,7 +33,7 @@ SOFTWARE.
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -32,7 +32,7 @@ SOFTWARE.
<el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item>

View File

@ -6,7 +6,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<!-- TODO 等待处理 -->

View File

@ -6,7 +6,7 @@
<el-form ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="accountId" @change="getSummary">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item label="时间范围" prop="date">

View File

@ -6,7 +6,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item label="标签名称" prop="name">

View File

@ -6,7 +6,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item label="用户标识" prop="openid">

View File

@ -1,124 +0,0 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:54:51
* @LastEditTime: 2024-02-01 14:46:19
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
<el-checkbox :label="item.name" :checked="item.choose" @change="(e) => handleChange(item, e)"
class="sl__body-item"></el-checkbox>
</div>
</div>
</template>
<script>
export default {
name: 'BomSelection',
components: {},
// model: {
// prop: 'selected',
// event: 'update',
// },
props: {
currentSelect: {
type: Array,
default: ()=>[],
},
list: {
type: Array,
default: () => [],
},
equipmentId: {
type: String,
default: '',
},
},
data() {
return {
list__inner: [],
selected: null,
randomKey: Math.random(),
};
},
watch: {
list: {
handler(val) {
console.log(val)
if (val) {
this.list__inner = val.map((item) => ({ ...item, choose: false }));
}
},
deep: true,
immediate: true,
},
currentSelect: {
handler(val) {
console.log(val)
// val: string
this.selected = val;
this.randomKey = Math.random();
//
if (val) {
this.list__inner.forEach((item,index) => {
val.forEach((ele) => {
console.log(ele)
if (item.id == ele.id) item.choose = true;console.log(ele.id)
// else item.choose = false;
})
});
}
},
immediate: true,
},
},
methods: {
handleChange(bomItem, selected) {
this.list__inner = this.list__inner.map((item) => ({
...item,
disabled: selected ? item.id !== bomItem.id : false,
}));
if (selected) this.selected = null;
this.$emit('change', this.equipmentId, bomItem.id, selected);
this.$nextTick(() => {
this.$forceUpdate();
});
},
clearSelected() {
console.log('clearSelected');
this.selected = null;
this.randomKey = Math.random();
// this.$emit('update', null);
// this.$nextTick(() => {
// this.$forceUpdate();
// });
},
},
};
</script>
<style scoped lang="scss">
.bom-selection {
display: flex;
flex-direction: column;
gap: 6px;
padding: 6px;
}
.sl__body-item {
margin: 0;
padding: 3px 6px;
border-radius: 4px;
transition: background 0.3s ease-in-out;
&:hover {
background: #0001;
}
}
</style>

View File

@ -1,294 +0,0 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:53:32
* @LastEditTime: 2024-02-01 14:47:03
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="bom-selector">
<el-row v-if="filteredBomList.length" style="border: 1px solid #ccc; display: flex">
<el-col :span="12">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">选择产线</span>
<span>
{{ selectedEquipments.length }}/{{ filteredBomList.length }}
</span>
</div>
<div class="sl__body">
<div class="sl__body-item" v-for="eq in filteredBomList" :key="eq.id + refreshKey">
<el-checkbox :key="refreshKey" :checked="selectedEquipments.includes(eq.id)"
@change="(e) => handleEquipmentChange(eq, e)" class=""></el-checkbox>
<span :key="'label' + refreshKey" @click.stop="() => handleLoadDom(eq)">
{{ eq.name }}
</span>
</div>
</div>
</div>
</el-col>
<el-col :span="12" style="border-left: 1px solid #ccc">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">选择工序</span>
</div>
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
:current-select="currentSelectedIdList" @change="handleMaterialBomChange" />
</div>
</el-col>
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
<span style="">参数BOM</span>
</div>
<BomSelection
ref="valuesBomList"
:key="valuesBomList.equipmentId + 'valuesBomList'"
:list="valuesBomList"
:equipment-id="valuesBomList.equipmentId"
:current-select="currentSelectedValueBomId"
@change="handleValueBomChange" />
</div>
</el-col> -->
</el-row>
<div class="no-data-bg" v-else></div>
</div>
</template>
;
<script>
import { thisTypeAnnotation } from '@babel/types';
import BomSelection from './BomSelection.vue';
export default {
name: 'BomSelector',
components: { BomSelection },
model: {
prop: 'value',
event: 'update',
},
props: {
bomList: {
type: Array,
default: () => [],
},
value: {
type: Array,
default: () => [],
},
chooseList: {
type: Array,
default:() => []
}
},
data() {
return {
searchText: '',
selectedEquipments: [],
selected: [],
bomArr:[],
materialsBomList: [],
// valuesBomList: [],
refreshKey: Math.random(),
currentSelectedIdList: [],
currentSelectedValueBomId: null,
};
},
watch: {
value: {
handler(val) {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId)
console.log(this.selectedEquipments)
this.selected = val;
}
},
deep: true,
immediate: true,
},
},
computed: {
filteredBomList() {
return this.bomList.filter((item) => {
// console.log(item)
return item.name.includes(this.searchText);
});
},
},
mounted () {
// this.getList()
},
methods: {
commit() {
this.$emit('update', this.selected);
},
// getList() {
// this.selectedEquipments = this.chooseList
// console.log(this.selectedEquipments)
// console.log(this.chooseList);
// },
handleLoadDom(eq) {
// dom
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom;
console.log(this.materialsBomList)
// this.valuesBomList = eq.valuesBom;
// bom
if (this.selectedEquipments.includes(eq.id)) {
const selectedItem = this.selected.find(
(item) => item.equipmentId == eq.id
)
// console.log(selectedItem)
let arr = []
console.log(selectedItem.children);
selectedItem.children.forEach((ele) => {
console.log(ele)
arr.push({ id: ele.id })
})
// console.log(arr)
this.currentSelectedIdList = arr
console.log(this.currentSelectedIdList);
// selectedItem.equMaterialBomId ?? null;
// this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
}
},
handleEquipmentChange(eq, selected) {
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom
console.log(this.value)
this.valuesBomList = eq.valuesBom;
if (selected) {
console.log(selected)
this.selectedEquipments.push(eq.id);
this.selected.push({
equipmentId: eq.id,
// equValueBomId: null,
children: [],
});
// this.$emit('update', this.selected);
} else {
//
this.selectedEquipments = this.selectedEquipments.filter(
(id) => id !== eq.id
);
// this.$refs.materialsBomList.clearSelected();
// this.$refs.valuesBomList.clearSelected();
this.currentSelectedMaterialBomId = null;
this.currentSelectedValueBomId = null;
this.selected = this.selected.filter(
(item) => item.equipmentId !== eq.id
);
// this.$emit('update', this.selected);
}
},
handleMaterialBomChange(equipmentId, bomId, selected) {
// console.log(this.chooseList)
const selectedItem = this.selected.find(
(item) => item.equipmentId == equipmentId
);
this.bomArr.push(bomId)
// console.log(this.selected);
// arr.push(bomId)
// console.log(arr);
// console.log(selectedItem)
if (selected) {
//
this.selectedEquipments.push(equipmentId);
console.log(this.selected.indexOf(equipmentId))
this.selected.forEach((ele,index) => {
if (ele.equipmentId === equipmentId ) {
this.selected[index].children.push({ id: bomId })
}
})
// this.selected.push({
// equipmentId,
// // equValueBomId: null,
// equMaterialBomId: bomId,
// });
// ''
this.refreshKey = Math.random();
// this.$emit('update', this.selected);
return;
} else {
console.log(selected);
this.selected.forEach((ele, index) => {
ele.children.forEach((e, i) => {
console.log(e)
if (ele.equipmentId === equipmentId && e.id == bomId) {
this.selected[index].children.splice(i,1)
}
})
})
}
// this.$emit('getData', this.dataForm)
// selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
// this.currentSelectedMaterialBomId = selected ? bomId : null;
console.log(this.selected)
},
// handleValueBomChange(equipmentId, bomId, selected) {
// const selectedItem = this.selected.find(
// (item) => item.equipmentId == equipmentId
// );
// if (selected && !selectedItem) {
// //
// this.selectedEquipments.push(equipmentId);
// this.selected.push({
// equipmentId,
// equValueBomId: bomId,
// equMaterialBomId: null,
// });
// this.refreshKey = Math.random();
// // this.$emit('update', this.selected);
// return;
// }
// selectedItem && (selectedItem.equValueBomId = selected ? bomId : null);
// this.currentSelectedValueBomId = selected ? bomId : null;
// // this.$emit('update', this.selected);
// },
},
};
</script>
<style scoped lang="scss">
.bom-selector {
min-height: 200px;
}
.sl__body {
display: flex;
flex-direction: column;
gap: 6px;
padding: 6px;
}
.sl__body-item {
margin: 0;
padding: 3px 6px;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s ease-in-out;
display: flex;
align-items: center;
gap: 8px;
> span {
flex: 1;
}
&:hover {
background: #0001;
}
}
.sl__header {
border-bottom: 1px solid #ccc;
}
</style>

View File

@ -1,443 +0,0 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:52:01
* @LastEditTime: 2024-02-01 14:43:53
* @LastEditors: zhp
* @Description:
-->
<template>
<section class="process-bom">
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
<div
class="btns"
style="
text-align: right;
position: absolute;
top: 20px;
right: 20px;
display: flex;
">
<el-button
type="primary"
plain
:disabled="currentDet == null"
class="btn-create"
@click="handleAddEquipment"
icon="el-icon-plus">
分配设备
</el-button>
<el-input
icon="el-icon-search"
placeholder="搜索"
v-model="searchText"
:disabled="currentDet == null"
@change="handleSearchTextChange"
clearable
style="margin-left: 20px">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</div> -->
<!-- 列表 -->
<!-- <base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table> -->
<!-- 分页组件 -->
<!-- <pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" /> -->
<base-dialog dialogTitle="选择产线工序" :dialogVisible="open" width="45%" @close="cancel" @cancel="cancel"
@confirm="submitForm">
<el-row>
<el-form ref="dataForm" :model="dataForm" label-width="120px" :inline="true" class="demo-form-inline">
<el-col :span="12">
<el-form-item label="用户名" prop="userId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.userId" placeholder="用户名" filterable @change="handleProductlineChange">
<el-option v-for="opt in userList" :key="opt.id" :label="opt.name" :value="opt.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户昵称" prop="nickname" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input v-model="dataForm.nickname">
<!-- <el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" /> -->
</el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<BomSelector ref="bomSelector" v-if="open" :bom-list="bomList" :value="selectedBoms"
@update="selectedBoms = $event" />
<el-row slot="footer">
<el-button size="small" @click="cancel">取消</el-button>
<el-button type="primary" size="small" @click="submitForm" :loading="btnLoading">
确定
</el-button>
</el-row>
</base-dialog>
</section>
</template>
<script>
import BomSelector from './BomSelector.vue';
import {
getUserList,
getQualityInspectionBoxBtn,
} from '@/api/base/qualityInspectionBoxPermissions';
// import {
// createQualityInspectionBoxBtn,
// updateQualityInspectionBoxBtn,
// deleteQualityInspectionBoxBtn,
// getPage,
// exportQualityInspectionBoxBtnExcel,
// getUserList
// } from '@/api/base/qualityInspectionBoxPermissions';
export default {
name: 'ProcessBom',
components: { BomSelector },
props: {
currentDet: {
type: Object,
default: null,
},
},
data() {
return {
btnLoading: false,
open: false,
eqList: [],
bomList: [],
finalList: [],
choosedEquipments: [],
searchBarFormConfig: [{ label: '工序下设备' }],
tableProps: [
{ prop: 'equName', label: '设备名称' },
{ prop: 'materialName', label: '物料BOM' },
{ prop: 'valueName', label: '参数BOM' },
],
list: [],
total: 0,
tableBtn: [],
chooseList:[],
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentName: '',
},
dataForm: {
userId: null,
nickname: null,
list: [],
},
userList: [],
data:{},
searchText: '',
selectedBoms: {},
timer: null,
};
},
// watch: {
// currentDet: {
// handler(val) {
// console.log('currentDet', val);
// if (val != null) {
// this.getList(val);
// } else {
// this.clearList();
// }
// },
// immediate: true,
// deep: true,
// },
// },
methods: {
getDict() {
getUserList({
pageNo: 1,
pageSize: 999
}).then((res) => {
this.userList = res.data.map((item) => {
return {
id: item.id,
name: item.username,
nickname: item.nickname
}
})
})
},
async handleProductlineChange(id) {
this.userList.forEach((ele) => {
if (ele.id === id) {
this.dataForm.nickname = ele.nickname
}
})
},
handleEmitFun() { },
getData() {
this.selectedBoms = [];
// bom
this.http('base/quality-inspection-box-btn-auth/getQualityAuthTree', 'get',
// {
// sectionId,
// flowDetId: detId,
// }
)
.then(({ code, data }) => {
console.log(data)
if (code == 0) {
this.bomList = data.map((eq) => {
eq.materialsBom = eq.children || [];
// eq.valuesBom = eq.valuesBom || [];
//
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
// eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
if (
eq.equChose ||
eq.materialsBom.chosen
// eq.valuesBom.chosen
) {
// this.selectedBoms.push({
// equipmentId: eq.id,
// equMaterialBomId: eq.materialsBom.chosen,
// // equValueBomId: eq.valuesBom.chosen,
// });
}
// id
eq.materialsBom.equipmentId = eq.id;
// eq.valuesBom.equipmentId = eq.id;
return eq;
});
} else {
this.bomList.splice(0);
}
})
.catch((err) => {
this.bomList.splice(0);
this.selectedBoms = [];
});
},
handleTableBtnClick() {},
handleSearchTextChange(val) {
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
console.log('geting list.......');
this.queryParams.equipmentName = val;
this.$nextTick(() => {
this.getList(this.currentDet);
});
}, 300);
},
put(payload) {
return this.http(this.updateUrl, 'put', payload);
},
post(payload) {
return this.http(this.addUrl, 'post', payload);
},
recv(payload) {
return this.http(this.pageUrl, 'get', payload);
},
info(payload) {
return this.http(this.infoUrl, 'get', payload);
},
http(url, method, payload) {
return this.$axios({
url,
method,
params: method === 'get' ? payload : null,
data: method !== 'get' ? payload : null,
});
},
submitForm() {
this.btnLoading = true;
//
this.$refs.bomSelector.commit();
//
this.$nextTick(async () => {
console.log('selectedBoms', this.selectedBoms);
// console.log('selectedBoms', this.data);
this.dataForm.list = this.selectedBoms.map((ele) => {
return {
id: ele.equipmentId,
children: ele.children
}
})
console.log(this.dataForm);
if (!this.dataForm.userId) {
const { code, data } = await this.http(
'base/quality-inspection-box-btn-auth/create',
'post',
this.dataForm
);
if (code == 0) {
this.$message.success('操作成功');
// this.getList(this.currentDet);
this.btnLoading = false;
this.$emit('getList')
this.cancel();
} else {
this.btnLoading = false;
this.$message.error('操作失败');
}
} else {
const { code, data } = await this.http(
'base/quality-inspection-box-btn-auth/update',
'put',
this.dataForm
);
if (code == 0) {
this.$message.success('操作成功');
// this.getList(this.currentDet);
this.btnLoading = false;
this.$emit('getList')
this.cancel();
} else {
this.btnLoading = false;
this.$message.error('操作失败');
}
}
});
},
// async getList({
// detId,
// detName,
// detDesc,
// flowId,
// sectionName,
// sectionId,
// } = {}) {
// console.log('get list', detId, detName, flowId);
// const { data, code } = await this.http(
// '/extend/process-flow-det-equipment/page',
// 'get',
// { flowDetId: detId, ...this.queryParams }
// );
// if (code == 0) {
// this.list = data.list;
// this.total = data.total;
// } else {
// this.list.splice(0);
// this.total = 0;
// }
// // this.selectedBoms = [];
// // // bom
// // this.http('base/quality-inspection-box-btn-auth/getQualityAuthTree', 'get',
// // // {
// // // sectionId,
// // // flowDetId: detId,
// // // }
// // )
// // .then(({ code, data }) => {
// // console.log(data)
// // if (code == 0) {
// // this.bomList = data.map((eq) => {
// // eq.materialsBom = eq.materialsBom || [];
// // eq.valuesBom = eq.valuesBom || [];
// // //
// // eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
// // eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
// // if (
// // eq.equChose ||
// // eq.materialsBom.chosen ||
// // eq.valuesBom.chosen
// // ) {
// // this.selectedBoms.push({
// // equipmentId: eq.id,
// // equMaterialBomId: eq.materialsBom.chosen,
// // equValueBomId: eq.valuesBom.chosen,
// // });
// // }
// // // id
// // eq.materialsBom.equipmentId = eq.id;
// // eq.valuesBom.equipmentId = eq.id;
// // return eq;
// // });
// // } else {
// // this.bomList.splice(0);
// // this.selectedBoms = [];
// // }
// // })
// // .catch((err) => {
// // this.bomList.splice(0);
// // this.selectedBoms = [];
// // });
// },
async handleAddEquipment(userId) {
this.open = true
this.selectedBoms = []
this.getData()
this.getDict()
if (userId) {
getQualityInspectionBoxBtn(userId).then((res) => {
// console.log(res)
this.$nextTick(() => {
this.dataForm.userId = userId
this.dataForm.nickname = res.data.nickName
this.dataList = res.data.datas
let arr = []
res.data.datas.forEach((item) => {
// console.log(item.children);
// item.children.forEach((ele) => {
// console.log(ele)
this.selectedBoms.push({
equipmentId: item.id,
children: Object.keys(item).length > 0 ? item.children.map((ele) => {
console.log(ele)
return {
id: ele.id
}
}) : []
})
// })
})
})
// console.log(arr)
// this.chooseList = arr
// console.log(this.chooseList)
})
}
},
cancel() {
this.open = false
this.bomList = []
this.selectedBoms = []
this.$refs.dataForm.resetFields();
},
clearList() {
this.list = [];
},
},
};
</script>
<style scoped lang="scss">
.process-bom {
position: relative;
flex: 1;
padding: 12px 20px;
background: #fff;
border-radius: 8px;
}
</style>

View File

@ -1,173 +0,0 @@
/*
* @Author: zhp
* @Date: 2024-01-30 18:05:04
* @LastEditTime: 2024-01-30 18:06:16
* @LastEditors: zhp
* @Description:
*/
/*
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2024-01-30 18:00:53
* @Description:
*/
export default {
data() {
/* eslint-disable */
return {
urlOptions: {
getDataListURL: '',
deleteURL: '',
statusUrl: '',
exportURL: ''
},
tableData: [],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 1,
},
exportLoading: false,
dataListLoading: false,
addOrEditTitle: '',
addOrUpdateVisible: false,
}
},
created() {
},
mounted() {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
// 每页数
sizeChangeHandle(val) {
this.listQuery.pageSize = val;
this.listQuery.pageNo = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.listQuery.pageNo = val;
this.getDataList();
},
// 新增 / 修改
addOrUpdateHandle() {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
},
cancel(id) {
this.$refs["popover-" + id].showPopper = false;
},
//改变状态
changeStatus(id) {
this.$http
.post(this.urlOptions.statusUrl, { id })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$refs["popover-" + id].showPopper = false;
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList();
},
});
})
.catch(() => { });
},
//tableBtn点击
handleClick(val) {
if (val.type === "edit") {
this.$nextTick(() => {
this.$refs.addOrUpdate.handleAddEquipment(val.data.userId);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
// 删除
deleteHandle(id, name, index) {
this.$confirm(`确定对${name ? '[名称=' + name + ']' : '[序号=' + index + ']'}进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => { });
},
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.xm1 = val.xm1;
this.listQuery.xm2 = val.xm2;
this.listQuery.pageNo = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
handleCancel() {
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
},
handleConfirm() {
this.$refs.addOrUpdate.dataFormSubmit()
},
successSubmit() {
this.handleCancel()
this.getDataList()
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '工厂.xls');
this.exportLoading = false;
}).catch(() => { });
}
}
}

View File

@ -9,28 +9,30 @@
<el-form ref="dataForm" :model="dataForm" label-width="120px" v-loading="formLoading" label-position="top">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="用户名" prop="userId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.userId" placeholder="用户名" filterable @change="handleProductlineChange">
<el-option v-for="opt in userList" :key="opt.id" :label="opt.name" :value="opt.id" />
<el-form-item label="产线" prop="productionLineId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable
@change="handleProductlineChange">
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户昵称" prop="nickname" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input v-model="dataForm.nickname">
<!-- <el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" /> -->
</el-input>
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" filterable @change="$emit('update', dataForm)">
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检测内容" prop="inspectionDetIdList"
:rules="[{ required: true, message: '不能为空', trigger: 'change' }]">
<div class="itemDet" v-for="item in treeData" :key="item.typeId" style="padding: 0 20px;">
<div>{{ item.name}} </div>
<div class="itemDet" v-for="item in inspectionDetList" :key="item.typeId" style="padding: 0 20px;">
<div>{{ item.typeName}} </div>
<!-- <div>{{ item.data }} </div> -->
<div class="content">
<el-checkbox-group v-model="dataForm.inspectionDetIdList" @change="handleCheckedCitiesChange">
<el-checkbox v-for="i in item.children" :key="i.id" :label="i.id">{{ i.bane }}
<el-checkbox v-for="i in item.data" :key="i.content" :label="i.detId">{{ i.content }}
</el-checkbox>
</el-checkbox-group>
</div>
@ -83,15 +85,13 @@
</template>
<script>
import { children } from '@antv/x6-common/lib/dom/elem';
import basicAdd from '../../mixins/basic-add';
import {
createQualityInspectionBoxBtn,
updateQualityInspectionBoxBtn,
getQualityInspectionBoxBtn,
getListByLineSection,
getUserList
} from '@/api/base/qualityInspectionBoxPermissions';
getListByLineSection
} from '@/api/base/qualityInspectionBoxBtn';
export default {
mixins: [basicAdd],
data() {
@ -105,20 +105,10 @@ export default {
},
dataForm: {
// id: null,
userId: null,
nickname:null,
// productionLineId: null,
list: [
// children:[],
],
sectionId: null,
productionLineId: null,
inspectionDetIdList:[],
},
treeData: [],
props: {
label: "name",
children: "children"
},
defaultProps: [],
userList:[],
formLoading: true,
productionLineList: [],
inspectionDetList:[],
@ -128,9 +118,6 @@ export default {
mounted() {
this.getProductionLineList()
this.getQualityInspectionDetList()
this.getData()
this.getDict()
// this.getList()
// this.getWorksectionList();
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
@ -149,116 +136,7 @@ export default {
immediate: true
},
},
methods: {
getInfo() {
const getC = this.$refs.tree.getCheckedNodes();
const getHC = this.$refs.tree.getHalfCheckedNodes();
let selected_nodes = getHC.concat(getC);
let selected_ids = new Set(); // tree_id
let used_ids = new Set(); //
// selected_ids
for (let node of selected_nodes) {
selected_ids.add(node.$treeNodeId);
}
// ,
let root_node = {
treeNodeId: -1,
children: [],
};
// parent_node node
// :node tree
// parent_node
function AddNode(node, parent_node) {
if (
!selected_ids.has(node.$treeNodeId) ||
used_ids.has(node.$treeNodeId)
) {
return;
}
used_ids.add(node.$treeNodeId); // used_ids
let real_node = {
treeNodeId: node.$treeNodeId,
children: [],
label: node.name,
desc: node.desc,
grade: node.grade,
//
};
// //
if (node.children) {
for (let child_node of node.children) {
AddNode(child_node, real_node);
}
}
if (real_node.children.length === 0) {
delete real_node.children;
}
if (!real_node.grade) {
delete real_node.grade;
}
if (!real_node.desc) {
delete real_node.desc;
}
parent_node.children.push(real_node);
}
for (let node of selected_nodes) {
AddNode(node, root_node);
}
let result = root_node.children;
console.log(result);
},
handleCheck(checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys) {
// console.log(checkedNodes, checkedKeys)
// checkedKeys.checkedNodes.forEach((ele) => {
// this.dataForm.list.push()
// })
// checkedKeys.checkedNodes.forEach((item) => {
// // if(this.dataForm.list)
// // this.dataForm.list.push(item)
// })
// console.log(this.dataForm.list);
},
handleCheckChange(data, checked, indeterminate) {
var checkedNodes = this.$refs.tree.getCheckedNodes(true)
var menuIds = []
checkedNodes.forEach(nodes => {
menuIds.push(nodes.id, nodes.id)
})
// set, Array.form Set
// this.roleForm.menuIds = Array.from(new Set(menuIds))
console.log(menuIds);
let arr = this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys());
console.log(arr)
// console.log(data, checked, indeterminate)
// if (checked === true && this.dataForm.list.indexOf(data.productionLineId) === -1) {
// } else {
// this.dataForm.list[this.dataForm.list.indexOf(data.productionLineId)].children.push(data.id)
// }
},
getDict() {
getUserList({
pageNo: 1,
pageSize: 999
}).then((res) => {
this.userList = res.data.map((item) => {
return {
id: item.id,
name: item.username,
nickname: item.nickname
}
})
})
},
http(url, method, payload) {
return this.$axios({
url,
method,
params: method === 'get' ? payload : null,
data: method !== 'get' ? payload : null,
});
},
init(obj) {
// console.log(productionLineId);
console.log(obj);
@ -297,23 +175,6 @@ export default {
}
});
},
getData() {
this.http('base/quality-inspection-box-btn-auth/getQualityAuthTree', 'get',
// {
// sectionId,
// flowDetId: detId,
// }
)
.then(({ code, data }) => {
console.log(data)
if (code == 0) {
this.treeData = data
} else {
// this.bomList.splice(0);
// this.selectedBoms = [];
}
})
},
/** 模拟透传 ref */
handleCheckedCitiesChange(value) {
;console.log(value);
@ -396,26 +257,11 @@ export default {
}
this.formLoading = false;
},
// getDict() {
// getUserList({
// pageNo: 1,
// pageSize: 999
// }).then((res) => {
// this.userList = res.data.map((item) => {
// return {
// id: item.id,
// name: item.username,
// nickname: item.nickname
// }
// })
// })
// },
async handleProductlineChange(id) {
this.userList.forEach((ele) => {
if (ele.id === id) {
this.dataForm.nickname = ele.nickname
}
})
await this.getWorksectionList(id);
this.dataForm.sectionId = null;
this.$emit('update', this.dataForm);
},
// async getCode(url) {

View File

@ -14,30 +14,31 @@
@pagination="getDataList" /> -->
<!-- 对话框(添加 / 修改) -->
<!-- <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel"
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog> -->
<ProcessBomList ref="addOrUpdate" style="margin-top: 16px" @getList="getDataList" />
</base-dialog>
</div>
</template>
<script>
import {
createQualityInspectionBoxBtn,
updateQualityInspectionBoxBtn,
deleteQualityInspectionBoxBtn,
getQualityInspectionBoxBtn,
getPage,
exportQualityInspectionBoxBtnExcel,
getUserList
} from '@/api/base/qualityInspectionBoxPermissions';
import basicPage from './basic-page';
import basicPage from '../../mixins/basic-page';
import moment from 'moment';
import addOrUpdate from './dialogForm.vue';
import ProcessBomList from './ProcessBomList.vue';
export default {
name: 'QualityInspectionBoxBtn',
mixins: [basicPage],
components: { addOrUpdate, ProcessBomList },
components: { addOrUpdate },
data() {
return {
urlOptions: {
@ -98,15 +99,15 @@ export default {
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{
prop: 'userName',
prop: 'productionLineName',
label: '用户名',
},
{
prop: 'nickName',
prop: 'sectionName',
label: '用户昵称',
},
{
prop: 'datas',
prop: 'inspectionInfoList',
label: '产线及工段',
}
],
@ -133,37 +134,31 @@ export default {
};
},
created() {
this.getDict()
// this.getDict()
},
methods: {
getDict() {
getUserList({
pageNo: 1,
pageSize:999
}).then((res) => {
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
return {
id: item.id,
name:item.username
}
})
})
},
// getDict() {
// // getUserList({
// // pageNo: 1,
// // pageSize:999
// // }).then((res) => {
// // this.searchBarFormConfig[0].selectOptions = res.data
// // })
// },
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(res => {
this.tableData = res.data.list.map((item) => {
this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.map((item) => {
// console.log(item);
return {
datas: item.strList.toString(),
nickName: item.nickName,
userName: item.userName,
userId: item.userId
// sectionId: item.sectionId,
// sectionName: item.sectionName
inspectionInfoList: item.inspectionInfoList.toString(),
productionLineId:item.productionLineId,
productionLineName:item.productionLineName,
sectionId: item.sectionId,
sectionName: item.sectionName
}
})
console.log(this.tableData);
this.listQuery.total = res.data.total;
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
@ -180,15 +175,13 @@ export default {
this.resetForm('form');
},
deleteHandle(id, name, index, data) {
console.log(data)
// console.log(data)
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
this.$confirm(`确认要删除产线名为${data.productionLineName}的数据项?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(data.userId).then(({ data }) => {
this.urlOptions.deleteURL(id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
@ -211,11 +204,11 @@ export default {
this.getDataList()
break;
case 'add':
// this.addOrEditTitle = '';
// this.addOrUpdateVisible = true;
this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true;
// this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.handleAddEquipment();
this.$refs.addOrUpdate.init();
});
break;
case 'export':

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2024-01-30 18:00:53
* @LastEditTime: 2023-12-14 09:36:05
* @Description:
*/
export default {
@ -92,7 +92,7 @@ export default {
this.$refs.addOrUpdate.init(val.data);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-02-18 14:07:08
* @LastEditTime: 2023-11-21 14:11:18
* @LastEditors: zhp
* @Description:
-->
@ -102,11 +102,11 @@ export default {
sourceList: [
{
id: 1,
name: '平板端',
name: '手动',
},
{
id: 2,
name: '网页端',
name: '自动',
}
],
dataForm: {

View File

@ -130,9 +130,8 @@ export default {
AddOrUpdate,
DetailOrUpdate
},
mounted() {
created() {
this.getDict()
this.getDataList()
},
methods: {
otherMethods(val) {
@ -215,7 +214,7 @@ export default {
pageNo: 1,
total: 1,
};
this.getDataList()
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2024-02-20 08:46:05
* @LastEditTime: 2023-12-06 14:08:00
* @Description:
-->
<template>
@ -69,11 +69,6 @@ const tableProps = [
prop: 'productionOutputTime',
label: '深加工下片时间',
filter: parseTime
},
{
prop: 'scrapDetail',
label: '详情',
filter: parseTime
}
];
@ -88,20 +83,18 @@ export default {
// },
tableProps,
// tableBtn: [
// // this.$auth.hasPermi(`base:packaging-print-log:update`)
// // ?
// {
// this.$auth.hasPermi(`base:packaging-print-log:update`)
// ? {
// type: 'edit',
// btnName: '',
// },
// // : undefined,
// // this.$auth.hasPermi(`base:packaging-print-log:delete`)
// // ?
// {
// }
// : undefined,
// this.$auth.hasPermi(`base:packaging-print-log:delete`)
// ? {
// type: 'delete',
// btnName: '',
// }
// // : undefined,
// : undefined,
// ].filter((v) => v),
list: [],

View File

@ -47,10 +47,8 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="检测人员" prop="checkPerson">
<el-select v-model="innerDataForm.checkPerson" placeholder="请选择检测人员" clearable filterable multiple
@change="$emit('update', innerDataForm)">
<el-option v-for="opt in userList" :key="opt.value" :label="opt.label" :value="opt.label" />
</el-select>
<el-input v-model="innerDataForm.checkPerson" clearable @change="$emit('update', innerDataForm)"
placeholder="请输入检测人员" />
</el-form-item>
</el-col>
@ -67,8 +65,8 @@
<el-select v-model="innerDataForm.source" placeholder="请选择来源" filterable clearable
@change="$emit('update', innerDataForm)">
<el-option v-for="opt in [
{ label: '平板端', value: 1 },
{ label: '网页端', value: 2 },
{ label: '手动', value: 1 },
{ label: '自动', value: 2 },
]" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
@ -106,14 +104,13 @@ export default {
inspectionDetList: [],
productionLineList: [],
sectionList: [],
userList:[],
workOrderList:[],
innerDataForm: {},
cacheInspectionDetList: null,
};
},
mounted() {
Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList(),this.getUserList()]).then(
Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList()]).then(
() => {
this.formLoading = false;
}
@ -183,17 +180,6 @@ export default {
value: item.id,
}));
},
async getUserList() {
const response = await this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
pageNo: 1,
pageSize: 999
})
console.log(response);
this.userList = response.data.map((item) => ({
label: item.username,
value: item.id,
}));
},
//
async getInspectionDetList() {

View File

@ -155,15 +155,6 @@ export default {
selectOptions: [],
param: 'inspectionDetContent',
filterable: true
},
{
type: 'select',
label: '检测人员',
placeholder: '请选择检测人员',
selectOptions: [],
param: 'checkPerson',
filterable: true,
multiple:true,
},
{
type: 'datePicker',
@ -226,27 +217,17 @@ export default {
// width: 128,
prop: 'workOrderName',
label: '工单名称',
},
{
// width: 128,
prop: 'productionLineName',
label: '产线',
},
{
// width: 128,
prop: 'sectionName',
label: '工段',
},
{
// width: 128,
prop: 'inspectionDetContent',
label: '检测内容',
},
// {
// // width: 128,
// prop: 'productionLineName',
// label: '线',
// },
{
// width: 128,
prop: 'productionLineName',
label: '产线',
},
{
// width: 128,
prop: 'checkPerson',
@ -263,11 +244,11 @@ export default {
width: 90,
prop: 'source',
label: '来源',
filter: (val) => ['平板端', '网页端'][val],
filter: (val) => ['未知', '手动', '自动'][val],
},
],
// keys, queryParams pageNo, pageSize key
searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId','checkPerson'],
searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId'],
form: {
id: undefined,
// workOrderId:undefined,
@ -289,7 +270,6 @@ export default {
workOrderId:null,
inspectionDetContent: null,
checkTime: [],
checkPerson:undefined,
// productionLineId: null,
},
};
@ -371,24 +351,12 @@ export default {
};
}
);
})
this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
pageNo: 1,
pageSize: 999
}).then((res) => {
// console.log(response);
this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({
name: item.username,
id: item.username,
}));
})
});
},
/** 查询列表 */
getList() {
this.loading = true;
//
let str = this.queryParams.checkPerson ? this.queryParams.checkPerson.join() :undefined
this.queryParams.checkPerson = str
getQualityInspectionRecordPage(this.queryParams).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
@ -457,8 +425,6 @@ export default {
return;
}
//
let str = this.form.checkPerson.join()
this.form.checkPerson = str
if (this.form.id != null) {
updateQualityInspectionRecord(this.form).then((response) => {
this.$modal.msgSuccess('修改成功');

View File

@ -9,8 +9,8 @@
<div class="itemBox">
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
<div class="itemSub">
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
<p class="itemDescribe" :title="item.name">
<p class="itemNum">{{item.checkValue}}</p>
<p class="itemDescribe">
<img src="./../../../../../assets/images/detectionData.png" alt="">
{{item.name}}</p>
</div>
@ -123,9 +123,6 @@ export default {
.itemDescribe {
font-size: 16px;
text-align: right;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 添加省略号 */
}
}
}

View File

@ -9,8 +9,8 @@
<div class="itemBox">
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
<div class="itemSub">
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
<p class="itemDescribe" :title="item.name">
<p class="itemNum">{{item.checkValue}}</p>
<p class="itemDescribe">
<img src="./../../../../../assets/images/detectionData.png" alt="">
{{item.name}}</p>
</div>
@ -123,9 +123,6 @@ export default {
.itemDescribe {
font-size: 16px;
text-align: right;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 添加省略号 */
}
}
}

View File

@ -8,8 +8,8 @@
<div class="itemBox">
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
<div class="itemSub">
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
<p class="itemDescribe" :title="item.name">
<p class="itemNum">{{item.checkValue}}</p>
<p class="itemDescribe">
<img src="./../../../../../assets/images/detectionData.png" alt="">
{{item.name}}</p>
</div>
@ -120,9 +120,6 @@ export default {
.itemDescribe {
font-size: 16px;
text-align: right;
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 添加省略号 */
}
}
}

View File

@ -76,7 +76,7 @@
<el-col :span="12">
<el-form-item label="负责人" prop="leaderUserId">
<el-select v-model="form.leaderUserId" placeholder="请输入负责人" clearable style="width: 100%">
<el-option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id" />
<el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
</el-col>

View File

@ -117,7 +117,7 @@
</el-form-item>
<el-form-item label="接收人" prop="userId">
<el-select v-model="sendNotifyForm.userId" placeholder="请输入接收人" clearable style="width: 100%">
<el-option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id" />
<el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item v-for="param in sendNotifyForm.params" :key="param" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">

View File

@ -415,9 +415,9 @@
<el-select v-model="form.roleIds" multiple placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.id"
:key="parseInt(item.id)"
:label="item.name"
:value="item.id"></el-option>
:value="parseInt(item.id)"></el-option>
</el-select>
</el-form-item>
</el-form>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:32:47
* @LastEditTime: 2023-11-23 15:27:55
* @Description:
-->
<template>
@ -51,7 +51,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:33:00
* @LastEditTime: 2023-11-23 15:27:47
* @Description:
-->
<template>
@ -51,7 +51,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:33:09
* @LastEditTime: 2023-11-23 15:27:37
* @Description:
-->
<template>
@ -51,7 +51,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:32:38
* @LastEditTime: 2023-11-23 15:27:28
* @Description:
-->
<template>
@ -51,7 +51,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -51,7 +51,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:34:54
* @LastEditTime: 2023-11-23 15:14:37
* @Description:
-->
<template>
@ -77,7 +77,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 13:52:10
* @LastEditors: zwq
* @LastEditTime: 2024-02-19 09:34:05
* @LastEditTime: 2023-12-05 14:05:08
* @Description:
-->
<template>
@ -47,7 +47,7 @@
v-for="item in urlOptions.dictList.dict0"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -63,7 +63,7 @@
v-for="item in urlOptions.dictList.dict1"
:key="item.id"
:label="item.label"
:value="item.value"></el-option>
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>