projects/mesxc-zjl #204

Merged
juzi merged 3 commits from projects/mesxc-zjl into projects/mesxc-test 2024-02-23 17:13:39 +08:00
55 changed files with 750 additions and 290 deletions
Showing only changes of commit 842b863561 - Show all commits

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-02-01 16:49:38 # @LastEditTime: 2024-02-23 16:03:51
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@ -23,15 +23,11 @@ VUE_APP_TITLE = MES系统
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.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# dcs地址
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# socket地址 # 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.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080' VUE_APP_JIMU_API = 'http://10.70.2.22:8080'

View File

@ -16,6 +16,9 @@ VUE_APP_BASE_API = '/prod-api'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.2:8080' 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,6 +14,8 @@ VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082' VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 根据服务器或域名修改 # 根据服务器或域名修改

View File

@ -8,6 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <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="stylesheet" type="text/css" media="print" href="<%= BASE_URL %>print-lock.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico" /> <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> <title>
<%= webpackConfig.name %> <%= webpackConfig.name %>
</title> </title>

View File

@ -0,0 +1,35 @@
/*
* @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

@ -0,0 +1,18 @@
<?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

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,24 @@
<?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

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,24 @@
<?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

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

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

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:35:10 * @LastEditTime: 2024-02-23 16:11:33
* @Description: * @Description:
--> -->
<template> <template>
@ -29,13 +29,13 @@
<el-row class="container-main flex-col" type="flex"> <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-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'5_1'" :back="'energy'"> <base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'task'" :back="'energy'">
<base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps" <base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
:table-data="qualityYearList" /> :table-data="qualityYearList" />
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'5_3'" :back="'energy'"> <base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -87,7 +87,7 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1"> <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'5_5'" <base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'productLine'"
:back="'energy'"> :back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
@ -110,7 +110,7 @@
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'5_4'" <base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'info'"
:back="'energy'"> :back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
@ -757,6 +757,9 @@ export default {
this.init() this.init()
this.getTimes() this.getTimes()
this.windowWidth(document.documentElement.clientWidth) this.windowWidth(document.documentElement.clientWidth)
setTimeout(() => {
window.location.reload()
}, 86400000)
}, },
mounted() { mounted() {
const _this = this; const _this = this;
@ -989,11 +992,11 @@ export default {
min-height: 10px; min-height: 10px;
} }
.el-input__inner { // .el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29); // background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29); // border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue; // color: aliceblue;
} // }
.el-divider--vertical { .el-divider--vertical {
height: 174px; height: 174px;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-29 16:50:26 * @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-02-01 15:35:43 * @LastEditTime: 2024-02-23 16:11:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -394,6 +394,9 @@ export default {
// this.fetchList('order-process') // this.fetchList('order-process')
// this.fetchList('line-chart-data') // this.fetchList('line-chart-data')
this.init() this.init()
setTimeout(() => {
window.location.reload()
}, 86400000)
}, },
destroyed() { destroyed() {
this.funInitWebSocket() this.funInitWebSocket()
@ -718,17 +721,17 @@ export default {
let cutArr = this.cutWsData.productHourData.map((item, index) => [ let cutArr = this.cutWsData.productHourData.map((item, index) => [
// console.log(item) // console.log(item)
` `
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} <span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
</span>`, </span>`,
// formatDate(item.planStartTime) || '', // formatDate(item.planStartTime) || '',
` `
<span style="color:rgba(255,255,255,0.5)" >${item.lineName || ''} <span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.formatTime(item.time) || ''}</span>`, `<span style="color:rgba(255,255,255,0.7)">${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.7)">${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.7)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.wasteArea + '㎡' || ''}</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.5)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div> `<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>
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : '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 this.cutConfig.data = cutArr
@ -981,7 +984,7 @@ background: linear-gradient(to bottom,rgba(60,
height: 290px; height: 290px;
width: 1px; width: 1px;
position: absolute; position: absolute;
left: 66.2%; left: 66.3%;
top: 12%; top: 12%;
background: linear-gradient(to bottom, rgba(60, background: linear-gradient(to bottom, rgba(60,
231, 231,
@ -1033,11 +1036,11 @@ background: linear-gradient(to bottom,rgba(60,
min-height: 10px; min-height: 10px;
} }
.el-input__inner { // .el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29); // background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29); // border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue; // color: aliceblue;
} // }
.el-divider--vertical { .el-divider--vertical {
height: 174px; height: 174px;

View File

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

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-01-19 15:58:17 * @Date: 2022-01-19 15:58:17
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:25:14 * @LastEditTime: 2024-02-22 10:26:59
* @Description: file content * @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
--> -->
@ -157,35 +157,58 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.base-container { .base-container {
color: #fff; color: #fff;
width: 100%; width: 100%;
// background-color: rgba($color: #061027, $alpha: 0.15); // background-color: rgba($color: #061027, $alpha: 0.15);
position: relative; position: relative;
opacity: calc(.8);
// border: 2px solid; // border: 2px solid;
// background: url('../../../../assets/img/energy.png') no-repeat; // background: url('../../../../assets/img/energy.png') no-repeat;
// background-size: 100% 100%; // background-size: 100% 100%;
&__small { &__small {
background: url(../../../../assets/img/short.png) no-repeat; background: url(../../../../assets/img/short.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
// background-position: 0 0; backdrop-filter: blur(5px);
} }
// &__small::after {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// filter: blur(20px);
// z-index: -1;
// }
&__middle { &__middle {
background: url(../../../../assets/img/middle.png) no-repeat; background: url(../../../../assets/img/middle.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
// background-position: 0 0; backdrop-filter: blur(5px);
} }
&__large { &__large {
background: url(../../../../assets/img/high.png) no-repeat; background: url(../../../../assets/img/high.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
// background-position: 0 0; backdrop-filter: blur(5px);
} }
&__eqStatus { &__eqStatus {
background: url(../../../../assets/img/short.png) no-repeat; background: url(../../../../assets/img/high.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
backdrop-filter: blur(5px);
} }
// &::after {
// content: " ";
// // display: block;
// position: absolute;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// // background: inherit;
// /* filter */
// backdrop-filter: blur(5px);
// z-index: -1;
// }
// border-radius: 40px 0px 40px 0px; // border-radius: 40px 0px 40px 0px;
// border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2; // border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
// .line { // .line {
@ -272,4 +295,9 @@ export default {
border: none; border: none;
} }
} }
// .base-container::after{
// z-index: -1;
// width: 100%;
// filter: blur(2px);
// }
</style> </style>

View File

@ -141,7 +141,8 @@ export default {
} }
} }
}, },
data: passRateList // data: passRateList
data: []
} }
] ]
// const colors = ['#5470C6', '#91CC75', '#EE6666'] // const colors = ['#5470C6', '#91CC75', '#EE6666']

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-27 13:54:52 * @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-01-25 14:08:27 * @LastEditTime: 2024-02-21 14:38:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -91,43 +91,78 @@ export default {
}, },
methods: { methods: {
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) { initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
let rawData = []
rawData.push(passRateList,wasteList)
// console.log(1) // console.log(1)
this.chart = echarts.init(document.getElementById(this.id)) const totalData = [];
let series = [ for (let i = 0; i < rawData[0].length; ++i) {
{ let sum = 0;
// for (let j = 0; j < rawData.length; ++j) {
name: '良品', sum += rawData[j][i];
type: 'bar',
stack: 'total',
// silent: true,
// itemStyle: {
color: '#0fdedb',
// },
// 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,
// },
// },
// },
} }
] 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,
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
// },
// {
// 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++) { // for (i = 0; i < 5; i++) {
// series.push({ // series.push({
@ -137,6 +172,7 @@ export default {
legend: { legend: {
// top: '2.5%', // top: '2.5%',
// right: '20px', // right: '20px',
icon: 'rect',
textStyle: { textStyle: {
color: '#ffffff' color: '#ffffff'
} }

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:35:29 * @LastEditTime: 2024-02-23 16:11:48
* @Description: * @Description:
--> -->
<template> <template>
@ -610,6 +610,9 @@ export default {
// this.fetchList('order-process') // this.fetchList('order-process')
// this.fetchList('line-chart-data') // this.fetchList('line-chart-data')
this.init() this.init()
setTimeout(() => {
window.location.reload()
}, 86400000)
}, },
destroyed () { destroyed () {
this.websocketClose() this.websocketClose()
@ -1102,11 +1105,11 @@ export default {
min-height: 10px; min-height: 10px;
} }
.el-input__inner { // .el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29); // background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29); // border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue; // color: aliceblue;
} // }
.el-divider--vertical { .el-divider--vertical {
height: 174px; height: 174px;

View File

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

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2023-11-21 18:59:54 * @LastEditTime: 2024-02-18 13:53:09
* @Description: * @Description:
--> -->
<template> <template>
@ -12,18 +12,6 @@
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmit()" @keyup.enter.native="dataFormSubmit()"
label-width="100px"> 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-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工厂名称" prop="factoryId"> <el-form-item label="工厂名称" prop="factoryId">
@ -41,6 +29,36 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <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-form-item label="产线TT值(h)" prop="tvalue">
<el-input <el-input
v-model.number="dataForm.tvalue" v-model.number="dataForm.tvalue"
@ -92,11 +110,13 @@ export default {
tvalue: 0, tvalue: 0,
factoryId: undefined, factoryId: undefined,
remark: undefined, remark: undefined,
roomNameDict: undefined
}, },
factoryList: [], factoryList: [],
dataRule: { dataRule: {
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }], code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }], name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }] factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
} }
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

@ -0,0 +1,149 @@
<!--
* @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

@ -86,18 +86,18 @@
:model="loginForm" :model="loginForm"
:rules="LoginRules" :rules="LoginRules"
class="login-form"> class="login-form">
<el-form-item prop="tenantName" v-if="tenantEnable"> <!-- <el-form-item prop="tenantName" v-if="tenantEnable">
<el-input <el-input
v-model="loginForm.tenantName" v-model="loginForm.tenantName"
type="text" type="text"
auto-complete="off" auto-complete="off"
placeholder="租户"> placeholder="租户">
<!-- <svg-icon <svg-icon
slot="prefix" slot="prefix"
icon-class="tree" icon-class="tree"
class="el-input__icon input-icon" /> --> class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item> -->
<!-- 账号密码登录 --> <!-- 账号密码登录 -->
<div> <div>
<el-form-item prop="username"> <el-form-item prop="username">
@ -244,25 +244,25 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
tenantName: [ // tenantName: [
{ required: true, trigger: 'blur', message: '租户不能为空' }, // { required: true, trigger: 'blur', message: '' },
{ // {
validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
// debugger // // debugger
getTenantIdByName(value).then((res) => { // getTenantIdByName(value).then((res) => {
const tenantId = res.data; // const tenantId = res.data;
if (tenantId && tenantId >= 0) { // if (tenantId && tenantId >= 0) {
// // //
setTenantId(tenantId); // setTenantId(tenantId);
callback(); // callback();
} else { // } else {
callback('租户不存在'); // callback('');
} // }
}); // });
}, // },
trigger: 'blur', // trigger: 'blur',
}, // },
], // ],
}, },
loading: false, loading: false,
redirect: undefined, 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 :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号"> <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号"> <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号"> <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号"> <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="accountId" placeholder="请选择公众号"> <el-select v-model="accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<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 :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公众号" prop="accountId"> <el-form-item label="公众号" prop="accountId">
<el-select v-model="queryParams.accountId" placeholder="请选择公众号"> <el-select v-model="queryParams.accountId" placeholder="请选择公众号">
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" /> <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- TODO 等待处理 --> <!-- TODO 等待处理 -->

View File

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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-01-30 10:53:32 * @Date: 2024-01-30 10:53:32
* @LastEditTime: 2024-02-01 14:47:03 * @LastEditTime: 2024-02-23 15:16:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -203,8 +203,11 @@ export default {
// //
this.selectedEquipments.push(equipmentId); this.selectedEquipments.push(equipmentId);
console.log(this.selected.indexOf(equipmentId)) console.log(this.selected.indexOf(equipmentId))
console.log(equipmentId);
this.selected.forEach((ele, index) => { this.selected.forEach((ele, index) => {
console.log(ele);
if (ele.equipmentId === equipmentId) { if (ele.equipmentId === equipmentId) {
console.log(22222);
this.selected[index].children.push({ id: bomId }) this.selected[index].children.push({ id: bomId })
} }
}) })
@ -215,10 +218,11 @@ export default {
// }); // });
// '' // ''
this.refreshKey = Math.random(); this.refreshKey = Math.random();
console.log(this.selected)
// this.$emit('update', this.selected); // this.$emit('update', this.selected);
return; return;
} else { } else {
console.log(selected); console.log(selected)
this.selected.forEach((ele, index) => { this.selected.forEach((ele, index) => {
ele.children.forEach((e, i) => { ele.children.forEach((e, i) => {
console.log(e) console.log(e)
@ -228,10 +232,10 @@ export default {
}) })
}) })
} }
console.log(this.selected)
// this.$emit('getData', this.dataForm) // this.$emit('getData', this.dataForm)
// selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null); // selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
// this.currentSelectedMaterialBomId = selected ? bomId : null; // this.currentSelectedMaterialBomId = selected ? bomId : null;
console.log(this.selected)
}, },
// handleValueBomChange(equipmentId, bomId, selected) { // handleValueBomChange(equipmentId, bomId, selected) {

View File

@ -154,7 +154,7 @@ export default {
this.urlOptions.getDataListURL(this.listQuery).then(res => { this.urlOptions.getDataListURL(this.listQuery).then(res => {
this.tableData = res.data.list.map((item) => { this.tableData = res.data.list.map((item) => {
return { return {
datas: item.strList.toString(), datas: item.strList ? item.strList.toString() : null,
nickName: item.nickName, nickName: item.nickName,
userName: item.userName, userName: item.userName,
userId: item.userId userId: item.userId

View File

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

View File

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

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-12-06 14:08:00 * @LastEditTime: 2024-02-23 09:16:24
* @Description: * @Description:
--> -->
<template> <template>
@ -31,6 +31,11 @@ import {
} from '@/api/quality/rawMaterialTraceability'; } from '@/api/quality/rawMaterialTraceability';
const tableProps = [ const tableProps = [
{
prop: 'orderName',
label: '订单名称',
},
{ {
prop: 'workOrderName', prop: 'workOrderName',
label: '工单名称', label: '工单名称',
@ -48,7 +53,7 @@ const tableProps = [
label: '包装条码', label: '包装条码',
}, },
{ {
prop: '', prop: 'originalGlassLineName',
label: '原片产线', label: '原片产线',
}, },
{ {
@ -57,7 +62,7 @@ const tableProps = [
filter: parseTime filter: parseTime
}, },
{ {
prop: 'batch', prop: 'deepProcessingLineName',
label: '深加工产线', label: '深加工产线',
}, },
{ {
@ -69,7 +74,12 @@ const tableProps = [
prop: 'productionOutputTime', prop: 'productionOutputTime',
label: '深加工下片时间', label: '深加工下片时间',
filter: parseTime filter: parseTime
} },
// {
// prop: 'scrapDetail',
// label: '',
// filter: parseTime
// }
]; ];
export default { export default {
@ -83,18 +93,20 @@ export default {
// }, // },
tableProps, tableProps,
// tableBtn: [ // tableBtn: [
// this.$auth.hasPermi(`base:packaging-print-log:update`) // // this.$auth.hasPermi(`base:packaging-print-log:update`)
// ? { // // ?
// {
// type: 'edit', // type: 'edit',
// btnName: '', // btnName: '',
// } // },
// : undefined, // // : undefined,
// this.$auth.hasPermi(`base:packaging-print-log:delete`) // // this.$auth.hasPermi(`base:packaging-print-log:delete`)
// ? { // // ?
// {
// type: 'delete', // type: 'delete',
// btnName: '', // btnName: '',
// } // }
// : undefined, // // : undefined,
// ].filter((v) => v), // ].filter((v) => v),
list: [], list: [],

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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