Compare commits
6 Commits
39aaf82345
...
009cf3b8e6
Author | SHA1 | Date | |
---|---|---|---|
|
009cf3b8e6 | ||
|
5098555a5e | ||
26bf5165df | |||
2a504a715f | |||
1bbd9b1e3a | |||
61b6ceb965 |
6
.env.dev
6
.env.dev
@ -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-01-30 16:17:03
|
# @LastEditTime: 2024-02-01 16:49:38
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
@ -14,7 +14,7 @@ VUE_APP_TITLE = MES系统
|
|||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
# 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://10.70.2.2:8080'
|
||||||
# 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.20: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.1.20:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||||
@ -22,7 +22,7 @@ VUE_APP_TITLE = MES系统
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.1.8: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.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||||
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'
|
||||||
|
|
||||||
|
@ -59,6 +59,15 @@ export function listEnabled() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得可用的排班列表(根据车间筛选)
|
||||||
|
export function listEnabledByRoom(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-team/listEnabledByRoom',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得班组组员信息分页
|
// 获得班组组员信息分页
|
||||||
export function groupTeamPage(query) {
|
export function groupTeamPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-04 14:10:37
|
* @Date: 2023-12-04 14:10:37
|
||||||
* @LastEditTime: 2024-01-30 18:06:48
|
* @LastEditTime: 2024-01-31 09:56:09
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -28,7 +28,7 @@ export function updateQualityInspectionBoxBtn(data) {
|
|||||||
// 删除安灯按钮16键对应
|
// 删除安灯按钮16键对应
|
||||||
export function deleteQualityInspectionBoxBtn(id) {
|
export function deleteQualityInspectionBoxBtn(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/quality-inspection-box-btn-auth/delete?id=' + id,
|
url: 'base/quality-inspection-box-btn-auth/delete?userId=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ export function deleteQualityInspectionBoxBtn(id) {
|
|||||||
// 获得安灯按钮16键对应
|
// 获得安灯按钮16键对应
|
||||||
export function getQualityInspectionBoxBtn(id) {
|
export function getQualityInspectionBoxBtn(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/quality-inspection-box-btn-auth/get?id=' + id,
|
url: 'base/quality-inspection-box-btn-auth/get?userId=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ export const DICT_TYPE = {
|
|||||||
TIME_DIM: 'time_dim',
|
TIME_DIM: 'time_dim',
|
||||||
TABLE_NAME: 'table_name',
|
TABLE_NAME: 'table_name',
|
||||||
METHOD: 'method',
|
METHOD: 'method',
|
||||||
|
PUSH: 'push',
|
||||||
|
|
||||||
// ============== ORDER - 订单模块 =============
|
// ============== ORDER - 订单模块 =============
|
||||||
ORDER_STATUS: 'order_status',
|
ORDER_STATUS: 'order_status',
|
||||||
@ -109,7 +110,10 @@ export const DICT_TYPE = {
|
|||||||
FAULT_LEVEL: 'fault-level',
|
FAULT_LEVEL: 'fault-level',
|
||||||
|
|
||||||
// ============== ENVIRONMENTAL - 环保模块 =============
|
// ============== ENVIRONMENTAL - 环保模块 =============
|
||||||
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit'
|
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
||||||
|
|
||||||
|
// ============== GROUP - 班组模块 =============
|
||||||
|
WORK_SHOP: 'workshop'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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-01-19 16:31:53
|
* @LastEditTime: 2024-02-01 15:35:10
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -878,6 +878,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
word-spacing:8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
.unit{
|
.unit{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-01-29 17:06:50
|
* @LastEditTime: 2024-02-01 15:35:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -879,6 +879,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -892,7 +893,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: rgba(0, 255, 247, 1);
|
color: rgba(0, 255, 247, 1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
word-spacing: 8px;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 260px;
|
left: 260px;
|
||||||
|
@ -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-01-29 15:35:37
|
* @LastEditTime: 2024-02-01 15:25:14
|
||||||
* @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
|
||||||
-->
|
-->
|
||||||
@ -250,12 +250,12 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding: 0.67em;
|
padding: 0.67em 0.67em 0.3em 0.67em;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-content {
|
.bar-content {
|
||||||
padding: 1em;
|
padding: .5em 1em 1em 1em;
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-01-29 15:14:40
|
* @LastEditTime: 2024-02-01 15:52:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="height: 400px;">
|
||||||
<div :id="id" class="productChart" :style="{ height: '390px', width: width }" />
|
<div :id="id" class="productChart" :style="{ height: '420px', width: width }" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import 'echarts/theme/macarons' // echarts theme
|
import 'echarts/theme/macarons' // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize'
|
||||||
|
// import resize from './../mixins/resize'
|
||||||
export default {
|
export default {
|
||||||
name: 'OverviewBar',
|
name: 'OverviewBar',
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -67,12 +67,18 @@ export default {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// mounted() {
|
||||||
|
// console.log('mounted')
|
||||||
|
// console.log('borderRadius: ', this.borderRadius)
|
||||||
|
// // this.$nextTick(() => {
|
||||||
|
// // this.initChart()
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted')
|
this.$el.addEventListener('resize', () => {
|
||||||
console.log('borderRadius: ', this.borderRadius)
|
console.log('resziing.....');
|
||||||
// this.$nextTick(() => {
|
});
|
||||||
// this.initChart()
|
this.initChart()
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
@ -148,15 +154,11 @@ export default {
|
|||||||
type: 'cross'
|
type: 'cross'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||||
left: "6%",
|
|
||||||
right: "6%",
|
|
||||||
bottom: "3%",
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
legend: {
|
||||||
itemWidth: 10,
|
itemWidth: 10,
|
||||||
itemHeight: 10,
|
itemHeight: 10,
|
||||||
|
top: '0%',
|
||||||
right: '20px',
|
right: '20px',
|
||||||
data: ['产线产量', '产线良品率'],
|
data: ['产线产量', '产线良品率'],
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@ -174,9 +176,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
}
|
// formatter: '{value}'
|
||||||
|
// textStyle: {
|
||||||
|
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -214,10 +219,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: '#ced1d5', // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
formatter: '{value}%'
|
// formatter: '{value}'
|
||||||
}
|
formatter: '{value}%'
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -241,7 +247,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
scale: true,
|
scale: true,
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '产量/㎡', // y轴上方的单位
|
name: '产量/片', // y轴上方的单位
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
// fontSize: 10,
|
// fontSize: 10,
|
||||||
@ -258,10 +264,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
// color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||||
formatter: '{value} 片'
|
color: "#fff",
|
||||||
}
|
fontSize: 12,
|
||||||
|
// formatter: '{value}'
|
||||||
|
formatter: '{value} 片'
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -285,6 +294,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.productChart{
|
.productChart{
|
||||||
top: -40px;
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
top: -30px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -150,9 +150,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
}
|
// formatter: '{value}'
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -162,25 +162,29 @@ export default {
|
|||||||
data: this.nameList
|
data: this.nameList
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLine: {
|
name: '单位kwh',
|
||||||
lineStyle: {
|
nameTextStyle: {
|
||||||
type: 'solid',
|
color: '#fff',
|
||||||
color: '#213259', // 左边线的颜色
|
fontSize: 10,
|
||||||
width: '1' // 坐标线的宽度
|
align: 'right',
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true, // 是否显示 y 轴
|
color: "#fff",
|
||||||
textStyle: {
|
fontSize: 12,
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
formatter: '{value}/kwh'
|
||||||
}
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#213259",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: "#213259a0",
|
||||||
}
|
},
|
||||||
},
|
}
|
||||||
type: 'value'
|
|
||||||
},
|
},
|
||||||
// legend: {
|
// legend: {
|
||||||
// itemHeight: 10,
|
// itemHeight: 10,
|
||||||
|
62
src/views/OperationalOverview/components/resize.js
Normal file
62
src/views/OperationalOverview/components/resize.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* @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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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-01-30 17:19:32
|
* @LastEditTime: 2024-02-01 15:35:29
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -103,13 +103,13 @@
|
|||||||
</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 :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'"
|
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'"
|
||||||
:title="'产线产量及良品率'" :title-icon="'productLine'">
|
:title="'产线产量及良品率'" :title-icon="'productLine'">
|
||||||
<!-- <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> -->
|
||||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||||
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="359" :show-legend="true" />
|
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -990,6 +990,7 @@ export default {
|
|||||||
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
|
word-spacing: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -93,7 +93,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<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-form-item label="描述" prop="description">
|
<el-form-item label="描述" prop="description">
|
||||||
<el-input v-model="form.description"></el-input>
|
<el-input v-model="form.description"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -149,7 +154,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
nuit: '',
|
nuit: '',
|
||||||
pricingMethod: 2,
|
pricingMethod: 2,
|
||||||
leaderName: ''
|
leaderName: '',
|
||||||
|
push: false
|
||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
@ -178,18 +184,24 @@ export default {
|
|||||||
this.form.id = id
|
this.form.id = id
|
||||||
getEnergyType( id ).then((res) => {
|
getEnergyType( id ).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
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
|
||||||
switch(this.form.pricingMethod) {
|
switch(this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = this.form.segPriceList
|
this.tableData1 = this.form.segPriceList || []
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.tableData2 = this.form.usedPriceList
|
this.tableData2 = this.form.usedPriceList || []
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(this.form)
|
||||||
} else {
|
} else {
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
this.form.id = ''
|
this.form.id = ''
|
||||||
@ -288,6 +300,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(this.form)
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
// 编辑
|
// 编辑
|
||||||
updateEnergyType({
|
updateEnergyType({
|
||||||
@ -300,7 +313,8 @@ export default {
|
|||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -317,7 +331,8 @@ export default {
|
|||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: []
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -52,7 +52,8 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '类型编码',
|
label: '类型编码',
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true,
|
||||||
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@ -67,6 +68,11 @@ const tableProps = [
|
|||||||
prop: 'pricingMethod',
|
prop: 'pricingMethod',
|
||||||
label: '计价方式'
|
label: '计价方式'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'push',
|
||||||
|
label: '是否推送',
|
||||||
|
filter: publicFormatter('push')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '价格(元)',
|
label: '价格(元)',
|
||||||
|
@ -51,7 +51,7 @@ export default {
|
|||||||
list: {
|
list: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
console.log(val);
|
// console.log(val);
|
||||||
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -60,7 +60,8 @@ export default {
|
|||||||
},
|
},
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
// val: string
|
// val: string
|
||||||
|
console.log(val)
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.randomKey = Math.random();
|
this.randomKey = Math.random();
|
||||||
// 更新选中状态
|
// 更新选中状态
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
filename: BomSelector.vue
|
filename: BomSelector.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
date: 2023-11-17 16:23:28
|
date: 2023-11-17 16:23:28
|
||||||
description:
|
description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -119,7 +119,9 @@ export default {
|
|||||||
console.log('value', val);
|
console.log('value', val);
|
||||||
if (val) {
|
if (val) {
|
||||||
this.selectedEquipments = val.map((item) => item.equipmentId);
|
this.selectedEquipments = val.map((item) => item.equipmentId);
|
||||||
this.selected = val;
|
this.selected = val
|
||||||
|
console.log(this.materialsBomList)
|
||||||
|
// console.log(this.selectedEquipments)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
filename: ProcessBomList.vue
|
filename: ProcessBomList.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
date: 2023-10-20 15:00:58
|
date: 2023-10-20 15:00:58
|
||||||
description:
|
description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -261,7 +261,8 @@ export default {
|
|||||||
}
|
}
|
||||||
// 设置设备id
|
// 设置设备id
|
||||||
eq.materialsBom.equipmentId = eq.id;
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
eq.valuesBom.equipmentId = eq.id;
|
eq.valuesBom.equipmentId = eq.id;
|
||||||
|
console.log(this.selectedBoms)
|
||||||
return eq;
|
return eq;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,18 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
||||||
<el-row>
|
<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-col :span="12">
|
||||||
<el-form-item label="班次名称" prop="name">
|
<el-form-item label="班次名称" prop="name">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="编码" prop="code">
|
<el-form-item label="编码" prop="code">
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
<el-input v-model="form.code" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="生效时间" prop="enableTime">
|
<el-form-item label="生效时间" prop="enableTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -25,6 +37,8 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="失效时间" prop="disableTime">
|
<el-form-item label="失效时间" prop="disableTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -37,8 +51,6 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班次开始时间" prop="startTime">
|
<el-form-item label="班次开始时间" prop="startTime">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
@ -51,6 +63,8 @@
|
|||||||
</el-time-picker>
|
</el-time-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班次结束时间" prop="endTime">
|
<el-form-item label="班次结束时间" prop="endTime">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
@ -63,13 +77,6 @@
|
|||||||
</el-time-picker>
|
</el-time-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :span="12">
|
||||||
<el-form-item label="是否跨天" prop="daySpan">
|
<el-form-item label="是否跨天" prop="daySpan">
|
||||||
<el-select v-model="form.daySpan" placeholder="请选择" disabled style="width: 100%;">
|
<el-select v-model="form.daySpan" placeholder="请选择" disabled style="width: 100%;">
|
||||||
@ -79,6 +86,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</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>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -89,6 +103,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
|
roomNameDict: '',
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
enableTime: '',
|
enableTime: '',
|
||||||
@ -100,6 +115,7 @@ export default {
|
|||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
|
roomNameDict:[{ required: true, message: '请选择车间名称', trigger: 'select' }],
|
||||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
||||||
enableTime: [{ required: true, message: '请选择班次开始时间', trigger: 'change' }],
|
enableTime: [{ required: true, message: '请选择班次开始时间', trigger: 'change' }],
|
||||||
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
|
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
|
||||||
@ -118,6 +134,8 @@ export default {
|
|||||||
this.form = res.data
|
this.form = res.data
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
this.form.code = res.data.code
|
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.enableTime = res.data.enableTime
|
||||||
// this.form.disableTime = res.data.disableTime || null
|
// this.form.disableTime = res.data.disableTime || null
|
||||||
this.$set(this.form, 'disableTime', res.data.disableTime || null)
|
this.$set(this.form, 'disableTime', res.data.disableTime || null)
|
||||||
|
@ -46,14 +46,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getGroupClassesPage, deleteGroupClasses, updateGroupClasses } from "@/api/base/groupClasses";
|
import { getGroupClassesPage, deleteGroupClasses, updateGroupClasses } from "@/api/base/groupClasses";
|
||||||
import GroupClassAdd from './components/groupClassAdd.vue'
|
import GroupClassAdd from './components/groupClassAdd'
|
||||||
import { formatDate } from '@/utils'
|
import { formatDate } from '@/utils'
|
||||||
|
import { publicFormatter } from '@/utils/dict'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'enableTimeStr',
|
prop: 'enableTimeStr',
|
||||||
label: '生效时段',
|
label: '生效时段',
|
||||||
minWidth: 300
|
minWidth: 300
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'roomNameDict',
|
||||||
|
label: '车间名称',
|
||||||
|
filter: publicFormatter('workshop'),
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '班次名称'
|
label: '班次名称'
|
||||||
|
@ -1,18 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||||
<el-row>
|
<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-col :span="12">
|
||||||
<el-form-item label="班组名称" prop="name">
|
<el-form-item label="班组名称" prop="name">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班组编码" prop="code">
|
<el-form-item label="班组编码" prop="code">
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
<el-input v-model="form.code" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班组组长" prop="leaderId">
|
<el-form-item label="班组组长" prop="leaderId">
|
||||||
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" filterable @change="selectLeader">
|
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" filterable @change="selectLeader">
|
||||||
@ -25,6 +37,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="手机号" prop="telephone">
|
<el-form-item label="手机号" prop="telephone">
|
||||||
<el-input v-model="form.telephone" disabled></el-input>
|
<el-input v-model="form.telephone" disabled></el-input>
|
||||||
@ -45,10 +59,12 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
leaderId: '',
|
leaderId: '',
|
||||||
telephone: ''
|
telephone: '',
|
||||||
|
roomNameDict: ''
|
||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
|
roomNameDict: [{ required: true, message: '请选择车间名称', trigger: 'select' }],
|
||||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
||||||
code: [{ required: true, message: '请输入班组编码', trigger: 'blur' }],
|
code: [{ required: true, message: '请输入班组编码', trigger: 'blur' }],
|
||||||
leaderId: [{ required: true, message: '请选择组长', trigger: 'select' }]
|
leaderId: [{ required: true, message: '请选择组长', trigger: 'select' }]
|
||||||
@ -64,7 +80,11 @@ export default {
|
|||||||
this.form.id = id
|
this.form.id = id
|
||||||
getGroupTeam( id ).then((res) => {
|
getGroupTeam( id ).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
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.selectLeader()
|
this.selectLeader()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -54,6 +54,7 @@ import GroupTeamAdd from './components/groupTeamAdd'
|
|||||||
import StatusBtn from './components/statusBtn'
|
import StatusBtn from './components/statusBtn'
|
||||||
import WorkerOperate from './components/workerOperate'
|
import WorkerOperate from './components/workerOperate'
|
||||||
import WorkerEdit from './components/workerEdit'
|
import WorkerEdit from './components/workerEdit'
|
||||||
|
import { publicFormatter } from '@/utils/dict'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@ -61,6 +62,11 @@ const tableProps = [
|
|||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
minWidth: 160
|
minWidth: 160
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'roomNameDict',
|
||||||
|
label: '车间名称',
|
||||||
|
filter: publicFormatter('workshop')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '班组名称'
|
label: '班组名称'
|
||||||
|
108
src/views/group/base/groupTeamScheduling/components/topTab.vue
Normal file
108
src/views/group/base/groupTeamScheduling/components/topTab.vue
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<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>
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="groupTeamScheduling">
|
<div class="groupTeamScheduling">
|
||||||
|
<TopTab :roomNameDict='roomNameDict' @emitFun='toggleName'/>
|
||||||
<div class="operationArea">
|
<div class="operationArea">
|
||||||
<el-form :inline="true" class="demo-form-inline">
|
<el-form :inline="true" class="demo-form-inline">
|
||||||
<span class="blue-block"></span>
|
<span class="blue-block"></span>
|
||||||
@ -87,13 +88,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPreset, createOrUpdateList, autoSet } from "@/api/base/groupTeamScheduling";
|
import { getPreset, createOrUpdateList, autoSet } from "@/api/base/groupTeamScheduling";
|
||||||
import { listEnabled } from "@/api/base/groupTeam";
|
import { listEnabledByRoom } from "@/api/base/groupTeam";
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import TopTab from './components/topTab'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "GroupTeamScheduling",
|
name: "GroupTeamScheduling",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
roomNameDict:null,
|
||||||
startDay: '',// 查询参数
|
startDay: '',// 查询参数
|
||||||
year: '',// 2023
|
year: '',// 2023
|
||||||
month: '',// 九月
|
month: '',// 九月
|
||||||
@ -108,7 +111,9 @@ export default {
|
|||||||
autoScheduling: false // 只有在当前日期后的月份才生效
|
autoScheduling: false // 只有在当前日期后的月份才生效
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components:{ TopTab },
|
||||||
created() {
|
created() {
|
||||||
|
this.roomNameDict = this.getDictDatas('workshop')[0].value
|
||||||
this.startDay = new Date()
|
this.startDay = new Date()
|
||||||
// 设置按钮是否置灰
|
// 设置按钮是否置灰
|
||||||
this.settingBtn()
|
this.settingBtn()
|
||||||
@ -117,6 +122,22 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 切换车间
|
||||||
|
toggleName(val) {
|
||||||
|
this.roomNameDict = val
|
||||||
|
// 如果当前在设置,则取消设置
|
||||||
|
if (this.showSetting) {
|
||||||
|
this.showSetting = !this.showSetting
|
||||||
|
}
|
||||||
|
// 如果红框选中,清除红框选中
|
||||||
|
if (!this.jumpDisabled) {
|
||||||
|
this.clearChoose()
|
||||||
|
}
|
||||||
|
// 获取班组列表
|
||||||
|
this.getTeamList()
|
||||||
|
// 重新获取日历数据
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
// 切换月份
|
// 切换月份
|
||||||
selectMonth() {
|
selectMonth() {
|
||||||
if (this.startDay) {
|
if (this.startDay) {
|
||||||
@ -133,7 +154,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取班组列表
|
// 获取班组列表
|
||||||
getTeamList() {
|
getTeamList() {
|
||||||
listEnabled().then(res => {
|
console.log(this.roomNameDict)
|
||||||
|
listEnabledByRoom({
|
||||||
|
room: this.roomNameDict
|
||||||
|
}).then(res => {
|
||||||
this.teamList = res.data || []
|
this.teamList = res.data || []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -143,7 +167,8 @@ export default {
|
|||||||
let month = moment(this.startDay).format('M')
|
let month = moment(this.startDay).format('M')
|
||||||
getPreset({
|
getPreset({
|
||||||
year: year,
|
year: year,
|
||||||
month: month
|
month: month,
|
||||||
|
roomNameDict: this.roomNameDict
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let obj = res.data || {}
|
let obj = res.data || {}
|
||||||
if (obj) {
|
if (obj) {
|
||||||
@ -156,6 +181,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.list = obj
|
this.list = obj
|
||||||
|
this.settingBtnDis = false
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.list = {}
|
this.list = {}
|
||||||
this.settingBtnDis = true // 禁用设置按钮
|
this.settingBtnDis = true // 禁用设置按钮
|
||||||
@ -246,7 +272,8 @@ export default {
|
|||||||
// console.log(moment(this.startDay).format("YYYY-MM-DD"))
|
// console.log(moment(this.startDay).format("YYYY-MM-DD"))
|
||||||
autoSet({
|
autoSet({
|
||||||
year: this.year,
|
year: this.year,
|
||||||
month: moment(this.startDay).month() + 1
|
month: moment(this.startDay).month() + 1,
|
||||||
|
roomNameDict: this.roomNameDict
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.list = res.data || {}
|
this.list = res.data || {}
|
||||||
})
|
})
|
||||||
@ -350,6 +377,8 @@ export default {
|
|||||||
padding: 14px 10px 0 20px;
|
padding: 14px 10px 0 20px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
height: calc(100vh - 255px);
|
||||||
|
overflow-y: auto;
|
||||||
.el-calendar__body {
|
.el-calendar__body {
|
||||||
padding: 10px 16px 16px 0;
|
padding: 10px 16px 16px 0;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
<p class="boldTitle">工单名称</p>
|
<p class="boldTitle">工单名称</p>
|
||||||
<p class="lightText">{{ queryParams.workOrderName ? queryParams.workOrderName : '-' }}</p>
|
<p class="lightText">{{ queryParams.workOrderName ? queryParams.workOrderName : '-' }}</p>
|
||||||
</el-col>
|
</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">
|
<el-col :span="6">
|
||||||
<p class="boldTitle">班组名称</p>
|
<p class="boldTitle">班组名称</p>
|
||||||
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
|
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
|
||||||
|
@ -31,7 +31,15 @@
|
|||||||
import { getByWorkOrder } from '@/api/monitoring/groupTeamView'
|
import { getByWorkOrder } from '@/api/monitoring/groupTeamView'
|
||||||
import { workOrderList } from '@/api/base/workOrder'
|
import { workOrderList } from '@/api/base/workOrder'
|
||||||
import GroupTeamViewDetail from './components/groupTeamViewDetail.vue'
|
import GroupTeamViewDetail from './components/groupTeamViewDetail.vue'
|
||||||
|
import { publicFormatter } from '@/utils/dict'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'roomNameDict',
|
||||||
|
label: '车间名称',
|
||||||
|
filter: publicFormatter('workshop'),
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '班组名称'
|
label: '班组名称'
|
||||||
@ -134,6 +142,7 @@ export default {
|
|||||||
})
|
})
|
||||||
params.workOrderId = this.queryParams.workOrderId
|
params.workOrderId = this.queryParams.workOrderId
|
||||||
params.workOrderName = this.workOrderName
|
params.workOrderName = this.workOrderName
|
||||||
|
params.roomNameDict = val.data.roomNameDict
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.groupTeamViewDetail.init(params)
|
this.$refs.groupTeamViewDetail.init(params)
|
||||||
})
|
})
|
||||||
|
@ -37,13 +37,21 @@
|
|||||||
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
|
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import TeamProductionDetail from './components/teamProductionDetail'
|
import TeamProductionDetail from './components/teamProductionDetail'
|
||||||
|
import { publicFormatter } from '@/utils/dict'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'roomNameDict',
|
||||||
label: '排班创建时间',
|
label: '车间名称',
|
||||||
filter: parseTime,
|
filter: publicFormatter('workshop'),
|
||||||
minWidth: 160
|
showOverflowtooltip: true,
|
||||||
|
minWidth: 100
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'createTime',
|
||||||
|
// label: '排班创建时间',
|
||||||
|
// filter: parseTime,
|
||||||
|
// minWidth: 160
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'startDay',
|
prop: 'startDay',
|
||||||
label: '上班日期',
|
label: '上班日期',
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:54:51
|
* @Date: 2024-01-30 10:54:51
|
||||||
* @LastEditTime: 2024-01-30 16:53:35
|
* @LastEditTime: 2024-02-01 14:46:19
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
|
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
|
||||||
<el-checkbox :label="item.name" :checked="item.id === selected" @change="(e) => handleChange(item, e)"
|
<el-checkbox :label="item.name" :checked="item.choose" @change="(e) => handleChange(item, e)"
|
||||||
class="sl__body-item"></el-checkbox>
|
class="sl__body-item"></el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,8 +25,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
props: {
|
props: {
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
type: String | Number,
|
type: Array,
|
||||||
default: null,
|
default: ()=>[],
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@ -46,24 +46,29 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
list: {
|
list: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
console.log(val)
|
||||||
if (val) {
|
if (val) {
|
||||||
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
this.list__inner = val.map((item) => ({ ...item, choose: false }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
console.log(val)
|
||||||
// val: string
|
// val: string
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.randomKey = Math.random();
|
this.randomKey = Math.random();
|
||||||
// 更新选中状态
|
// 更新选中状态
|
||||||
if (val) {
|
if (val) {
|
||||||
this.list__inner.forEach((item) => {
|
this.list__inner.forEach((item,index) => {
|
||||||
if (item.id == val) item.disabled = false;
|
val.forEach((ele) => {
|
||||||
else item.disabled = true;
|
console.log(ele)
|
||||||
|
if (item.id == ele.id) item.choose = true;console.log(ele.id)
|
||||||
|
// else item.choose = false;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:53:32
|
* @Date: 2024-01-30 10:53:32
|
||||||
* @LastEditTime: 2024-01-30 17:51:13
|
* @LastEditTime: 2024-02-01 14:47:03
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
||||||
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
|
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
|
||||||
:current-select="currentSelectedMaterialBomId" @change="handleMaterialBomChange" />
|
:current-select="currentSelectedIdList" @change="handleMaterialBomChange" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
|
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
|
||||||
@ -78,7 +78,11 @@ export default {
|
|||||||
value: {
|
value: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
chooseList: {
|
||||||
|
type: Array,
|
||||||
|
default:() => []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -87,19 +91,20 @@ export default {
|
|||||||
selected: [],
|
selected: [],
|
||||||
bomArr:[],
|
bomArr:[],
|
||||||
materialsBomList: [],
|
materialsBomList: [],
|
||||||
valuesBomList: [],
|
// valuesBomList: [],
|
||||||
|
|
||||||
refreshKey: Math.random(),
|
refreshKey: Math.random(),
|
||||||
currentSelectedMaterialBomId: null,
|
currentSelectedIdList: [],
|
||||||
currentSelectedValueBomId: null,
|
currentSelectedValueBomId: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
console.log('value', val);
|
console.log('value', val);
|
||||||
if (val) {
|
if (val) {
|
||||||
this.selectedEquipments = val.map((item) => item.equipmentId);
|
this.selectedEquipments = val.map((item) => item.equipmentId)
|
||||||
|
console.log(this.selectedEquipments)
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -109,35 +114,55 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filteredBomList() {
|
filteredBomList() {
|
||||||
return this.bomList.filter((item) => {
|
return this.bomList.filter((item) => {
|
||||||
|
// console.log(item)
|
||||||
return item.name.includes(this.searchText);
|
return item.name.includes(this.searchText);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
// this.getList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
commit() {
|
commit() {
|
||||||
this.$emit('update', this.selected);
|
this.$emit('update', this.selected);
|
||||||
},
|
},
|
||||||
|
// getList() {
|
||||||
|
// this.selectedEquipments = this.chooseList
|
||||||
|
// console.log(this.selectedEquipments)
|
||||||
|
// console.log(this.chooseList);
|
||||||
|
// },
|
||||||
handleLoadDom(eq) {
|
handleLoadDom(eq) {
|
||||||
// 只显示 dom 列表
|
// 只显示 dom 列表
|
||||||
this.currentEquipment = eq.id;
|
this.currentEquipment = eq.id;
|
||||||
this.materialsBomList = eq.materialsBom;
|
this.materialsBomList = eq.materialsBom;
|
||||||
this.valuesBomList = eq.valuesBom;
|
console.log(this.materialsBomList)
|
||||||
|
// this.valuesBomList = eq.valuesBom;
|
||||||
// 回复选中的bom信息
|
// 回复选中的bom信息
|
||||||
if (this.selectedEquipments.includes(eq.id)) {
|
if (this.selectedEquipments.includes(eq.id)) {
|
||||||
const selectedItem = this.selected.find(
|
const selectedItem = this.selected.find(
|
||||||
(item) => item.equipmentId == eq.id
|
(item) => item.equipmentId == eq.id
|
||||||
);
|
)
|
||||||
this.currentSelectedMaterialBomId =
|
// console.log(selectedItem)
|
||||||
selectedItem.equMaterialBomId ?? null;
|
|
||||||
this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
|
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) {
|
handleEquipmentChange(eq, selected) {
|
||||||
this.currentEquipment = eq.id;
|
this.currentEquipment = eq.id;
|
||||||
this.materialsBomList = eq.materialsBom;
|
this.materialsBomList = eq.materialsBom
|
||||||
|
console.log(this.value)
|
||||||
this.valuesBomList = eq.valuesBom;
|
this.valuesBomList = eq.valuesBom;
|
||||||
if (selected) {
|
if (selected) {
|
||||||
console.log(selected)
|
console.log(selected)
|
||||||
@ -165,6 +190,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleMaterialBomChange(equipmentId, bomId, selected) {
|
handleMaterialBomChange(equipmentId, bomId, selected) {
|
||||||
|
// console.log(this.chooseList)
|
||||||
const selectedItem = this.selected.find(
|
const selectedItem = this.selected.find(
|
||||||
(item) => item.equipmentId == equipmentId
|
(item) => item.equipmentId == equipmentId
|
||||||
);
|
);
|
||||||
@ -178,7 +204,7 @@ export default {
|
|||||||
this.selectedEquipments.push(equipmentId);
|
this.selectedEquipments.push(equipmentId);
|
||||||
console.log(this.selected.indexOf(equipmentId))
|
console.log(this.selected.indexOf(equipmentId))
|
||||||
this.selected.forEach((ele,index) => {
|
this.selected.forEach((ele,index) => {
|
||||||
if (ele.equipmentId === equipmentId) {
|
if (ele.equipmentId === equipmentId ) {
|
||||||
this.selected[index].children.push({ id: bomId })
|
this.selected[index].children.push({ id: bomId })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -192,8 +218,10 @@ export default {
|
|||||||
// this.$emit('update', this.selected);
|
// this.$emit('update', this.selected);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
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)
|
||||||
if (ele.equipmentId === equipmentId && e.id == bomId) {
|
if (ele.equipmentId === equipmentId && e.id == bomId) {
|
||||||
this.selected[index].children.splice(i,1)
|
this.selected[index].children.splice(i,1)
|
||||||
}
|
}
|
||||||
@ -201,8 +229,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 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)
|
console.log(this.selected)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:52:01
|
* @Date: 2024-01-30 10:52:01
|
||||||
* @LastEditTime: 2024-01-30 18:03:08
|
* @LastEditTime: 2024-02-01 14:43:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -84,8 +84,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<BomSelector ref="bomSelector" v-if="open" :bom-list="bomList" :value="selectedBoms"
|
<BomSelector ref="bomSelector" v-if="open" :bom-list="bomList" :value="selectedBoms"
|
||||||
@update="selectedBoms = $event" />
|
@update="selectedBoms = $event" />
|
||||||
|
|
||||||
<el-row slot="footer">
|
<el-row slot="footer">
|
||||||
<el-button size="small" @click="cancel">取消</el-button>
|
<el-button size="small" @click="cancel">取消</el-button>
|
||||||
@ -100,8 +100,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import BomSelector from './BomSelector.vue';
|
import BomSelector from './BomSelector.vue';
|
||||||
import {
|
import {
|
||||||
getUserList
|
getUserList,
|
||||||
|
getQualityInspectionBoxBtn,
|
||||||
} from '@/api/base/qualityInspectionBoxPermissions';
|
} from '@/api/base/qualityInspectionBoxPermissions';
|
||||||
|
// import {
|
||||||
|
// createQualityInspectionBoxBtn,
|
||||||
|
// updateQualityInspectionBoxBtn,
|
||||||
|
// deleteQualityInspectionBoxBtn,
|
||||||
|
|
||||||
|
// getPage,
|
||||||
|
// exportQualityInspectionBoxBtnExcel,
|
||||||
|
// getUserList
|
||||||
|
// } from '@/api/base/qualityInspectionBoxPermissions';
|
||||||
export default {
|
export default {
|
||||||
name: 'ProcessBom',
|
name: 'ProcessBom',
|
||||||
components: { BomSelector },
|
components: { BomSelector },
|
||||||
@ -127,7 +137,8 @@ export default {
|
|||||||
],
|
],
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
tableBtn: [],
|
tableBtn: [],
|
||||||
|
chooseList:[],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -159,10 +170,6 @@ export default {
|
|||||||
// deep: true,
|
// deep: true,
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
mounted () {
|
|
||||||
this.getData()
|
|
||||||
this.getDict()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getDict() {
|
getDict() {
|
||||||
getUserList({
|
getUserList({
|
||||||
@ -209,11 +216,11 @@ export default {
|
|||||||
eq.materialsBom.chosen
|
eq.materialsBom.chosen
|
||||||
// eq.valuesBom.chosen
|
// eq.valuesBom.chosen
|
||||||
) {
|
) {
|
||||||
this.selectedBoms.push({
|
// this.selectedBoms.push({
|
||||||
equipmentId: eq.id,
|
// equipmentId: eq.id,
|
||||||
equMaterialBomId: eq.materialsBom.chosen,
|
// equMaterialBomId: eq.materialsBom.chosen,
|
||||||
// equValueBomId: eq.valuesBom.chosen,
|
// // equValueBomId: eq.valuesBom.chosen,
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
// 设置设备id
|
// 设置设备id
|
||||||
eq.materialsBom.equipmentId = eq.id;
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
@ -222,7 +229,6 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.bomList.splice(0);
|
this.bomList.splice(0);
|
||||||
this.selectedBoms = [];
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@ -278,7 +284,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.dataForm);
|
console.log(this.dataForm);
|
||||||
if (this.selectedBoms.length) {
|
if (!this.dataForm.userId) {
|
||||||
const { code, data } = await this.http(
|
const { code, data } = await this.http(
|
||||||
'base/quality-inspection-box-btn-auth/create',
|
'base/quality-inspection-box-btn-auth/create',
|
||||||
'post',
|
'post',
|
||||||
@ -294,7 +300,23 @@ export default {
|
|||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
this.$message.error('操作失败');
|
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({
|
// async getList({
|
||||||
@ -362,11 +384,46 @@ export default {
|
|||||||
// // this.selectedBoms = [];
|
// // this.selectedBoms = [];
|
||||||
// // });
|
// // });
|
||||||
// },
|
// },
|
||||||
async handleAddEquipment() {
|
async handleAddEquipment(userId) {
|
||||||
this.open = true;
|
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() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false
|
||||||
|
this.bomList = []
|
||||||
|
this.selectedBoms = []
|
||||||
|
this.$refs.dataForm.resetFields();
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
this.list = [];
|
this.list = [];
|
||||||
|
@ -25,10 +25,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
createQualityInspectionBoxBtn,
|
|
||||||
updateQualityInspectionBoxBtn,
|
|
||||||
deleteQualityInspectionBoxBtn,
|
deleteQualityInspectionBoxBtn,
|
||||||
getQualityInspectionBoxBtn,
|
|
||||||
getPage,
|
getPage,
|
||||||
exportQualityInspectionBoxBtnExcel,
|
exportQualityInspectionBoxBtnExcel,
|
||||||
getUserList
|
getUserList
|
||||||
@ -157,9 +154,10 @@ 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.toString(),
|
||||||
nickName: item.nickName,
|
nickName: item.nickName,
|
||||||
userName: item.userName,
|
userName: item.userName,
|
||||||
|
userId: item.userId
|
||||||
// sectionId: item.sectionId,
|
// sectionId: item.sectionId,
|
||||||
// sectionName: item.sectionName
|
// sectionName: item.sectionName
|
||||||
}
|
}
|
||||||
@ -182,6 +180,7 @@ export default {
|
|||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
deleteHandle(id, name, index, data) {
|
deleteHandle(id, name, index, data) {
|
||||||
|
console.log(data)
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
|
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
Loading…
Reference in New Issue
Block a user