12
0
Dieser Commit ist enthalten in:
朱菊兰 2024-02-02 14:39:11 +08:00
Commit 0a91161afe
16 geänderte Dateien mit 297 neuen und 121 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-01-30 16:17:03
# @LastEditTime: 2024-02-01 16:49:38
# @LastEditors: zhp
# @Description:
###
@ -15,12 +15,14 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.20:9001'
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'

Datei anzeigen

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

Datei anzeigen

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-01-19 16:31:53
* @LastEditTime: 2024-02-01 15:35:10
* @Description:
-->
<template>
@ -878,6 +878,7 @@ export default {
background-size: 100% 100%;
color: #00fff0;
text-align: center;
word-spacing:8px;
position: relative;
.unit{
position: absolute;

Datei anzeigen

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-01-29 17:06:50
* @LastEditTime: 2024-02-01 15:35:43
* @LastEditors: zhp
* @Description:
-->
@ -879,6 +879,7 @@ export default {
</script>
<style lang="scss" scoped>
.visual-container {
width: 1920px;
height: 1080px;
@ -892,7 +893,7 @@ export default {
background-size: 100% 100%;
color: rgba(0, 255, 247, 1);
text-align: center;
word-spacing: 8px;
.unit {
position: absolute;
left: 260px;

Datei anzeigen

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2024-01-29 15:35:37
* @LastEditTime: 2024-02-01 15:25:14
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
@ -250,12 +250,12 @@ export default {
width: 100%;
color: #ffffff;
font-size: 24px;
padding: 0.67em;
padding: 0.67em 0.67em 0.3em 0.67em;
display: flex;
}
.bar-content {
padding: 1em;
padding: .5em 1em 1em 1em;
flex: 1 auto;
position: relative;
}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -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)
}
}
}

Datei anzeigen

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-01-30 17:19:32
* @LastEditTime: 2024-02-01 15:35:29
* @Description:
-->
<template>
@ -103,13 +103,13 @@
</base-container>
</el-col>
<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'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
</div> -->
<!-- 像下面这样表格里的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>
</el-col>
</el-row>
@ -990,6 +990,7 @@ export default {
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
word-spacing: 8px;
text-align: center;
.unit {
position: absolute;

Datei anzeigen

@ -51,7 +51,7 @@ export default {
list: {
handler(val) {
if (val) {
console.log(val);
// console.log(val);
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
}
},
@ -60,7 +60,8 @@ export default {
},
currentSelect: {
handler(val) {
// val: string
// val: string
console.log(val)
this.selected = val;
this.randomKey = Math.random();
//

Datei anzeigen

@ -1,8 +1,8 @@
<!--
<!--
filename: BomSelector.vue
author: liubin
date: 2023-11-17 16:23:28
description:
description:
-->
<template>
@ -119,7 +119,9 @@ export default {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId);
this.selected = val;
this.selected = val
console.log(this.materialsBomList)
// console.log(this.selectedEquipments)
}
},
deep: true,

Datei anzeigen

@ -1,8 +1,8 @@
<!--
<!--
filename: ProcessBomList.vue
author: liubin
date: 2023-10-20 15:00:58
description:
description:
-->
<template>
@ -261,7 +261,8 @@ export default {
}
// id
eq.materialsBom.equipmentId = eq.id;
eq.valuesBom.equipmentId = eq.id;
eq.valuesBom.equipmentId = eq.id;
console.log(this.selectedBoms)
return eq;
});
} else {

Datei anzeigen

@ -1,14 +1,14 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:54:51
* @LastEditTime: 2024-01-30 16:53:35
* @LastEditTime: 2024-02-01 14:46:19
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
<el-checkbox :label="item.name" :checked="item.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>
</div>
</div>
@ -25,8 +25,8 @@ export default {
// },
props: {
currentSelect: {
type: String | Number,
default: null,
type: Array,
default: ()=>[],
},
list: {
type: Array,
@ -46,24 +46,29 @@ export default {
},
watch: {
list: {
handler(val) {
handler(val) {
console.log(val)
if (val) {
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
this.list__inner = val.map((item) => ({ ...item, choose: false }));
}
},
deep: true,
immediate: true,
},
currentSelect: {
handler(val) {
handler(val) {
console.log(val)
// val: string
this.selected = val;
this.randomKey = Math.random();
//
if (val) {
this.list__inner.forEach((item) => {
if (item.id == val) item.disabled = false;
else item.disabled = true;
this.list__inner.forEach((item,index) => {
val.forEach((ele) => {
console.log(ele)
if (item.id == ele.id) item.choose = true;console.log(ele.id)
// else item.choose = false;
})
});
}
},

Datei anzeigen

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:53:32
* @LastEditTime: 2024-01-30 17:51:13
* @LastEditTime: 2024-02-01 14:47:03
* @LastEditors: zhp
* @Description:
-->
@ -36,7 +36,7 @@
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
:current-select="currentSelectedMaterialBomId" @change="handleMaterialBomChange" />
:current-select="currentSelectedIdList" @change="handleMaterialBomChange" />
</div>
</el-col>
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
@ -78,7 +78,11 @@ export default {
value: {
type: Array,
default: () => [],
},
},
chooseList: {
type: Array,
default:() => []
}
},
data() {
return {
@ -87,19 +91,20 @@ export default {
selected: [],
bomArr:[],
materialsBomList: [],
valuesBomList: [],
// valuesBomList: [],
refreshKey: Math.random(),
currentSelectedMaterialBomId: null,
currentSelectedIdList: [],
currentSelectedValueBomId: null,
};
},
watch: {
value: {
handler(val) {
handler(val) {
console.log('value', val);
if (val) {
this.selectedEquipments = val.map((item) => item.equipmentId);
this.selectedEquipments = val.map((item) => item.equipmentId)
console.log(this.selectedEquipments)
this.selected = val;
}
},
@ -109,35 +114,55 @@ export default {
},
computed: {
filteredBomList() {
return this.bomList.filter((item) => {
return this.bomList.filter((item) => {
// console.log(item)
return item.name.includes(this.searchText);
});
},
},
mounted () {
// this.getList()
},
methods: {
commit() {
this.$emit('update', this.selected);
},
},
// getList() {
// this.selectedEquipments = this.chooseList
// console.log(this.selectedEquipments)
// console.log(this.chooseList);
// },
handleLoadDom(eq) {
// dom
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom;
this.valuesBomList = eq.valuesBom;
this.materialsBomList = eq.materialsBom;
console.log(this.materialsBomList)
// this.valuesBomList = eq.valuesBom;
// bom
if (this.selectedEquipments.includes(eq.id)) {
const selectedItem = this.selected.find(
(item) => item.equipmentId == eq.id
);
this.currentSelectedMaterialBomId =
selectedItem.equMaterialBomId ?? null;
this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
)
// console.log(selectedItem)
let arr = []
console.log(selectedItem.children);
selectedItem.children.forEach((ele) => {
console.log(ele)
arr.push({ id: ele.id })
})
// console.log(arr)
this.currentSelectedIdList = arr
console.log(this.currentSelectedIdList);
// selectedItem.equMaterialBomId ?? null;
// this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
}
},
handleEquipmentChange(eq, selected) {
this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom;
this.materialsBomList = eq.materialsBom
console.log(this.value)
this.valuesBomList = eq.valuesBom;
if (selected) {
console.log(selected)
@ -165,6 +190,7 @@ export default {
},
handleMaterialBomChange(equipmentId, bomId, selected) {
// console.log(this.chooseList)
const selectedItem = this.selected.find(
(item) => item.equipmentId == equipmentId
);
@ -178,7 +204,7 @@ export default {
this.selectedEquipments.push(equipmentId);
console.log(this.selected.indexOf(equipmentId))
this.selected.forEach((ele,index) => {
if (ele.equipmentId === equipmentId) {
if (ele.equipmentId === equipmentId ) {
this.selected[index].children.push({ id: bomId })
}
})
@ -192,8 +218,10 @@ export default {
// this.$emit('update', this.selected);
return;
} else {
console.log(selected);
this.selected.forEach((ele, index) => {
ele.children.forEach((e, i) => {
console.log(e)
if (ele.equipmentId === equipmentId && e.id == bomId) {
this.selected[index].children.splice(i,1)
}
@ -201,8 +229,8 @@ export default {
})
}
// this.$emit('getData', this.dataForm)
selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
this.currentSelectedMaterialBomId = selected ? bomId : null;
// selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
// this.currentSelectedMaterialBomId = selected ? bomId : null;
console.log(this.selected)
},

Datei anzeigen

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-30 10:52:01
* @LastEditTime: 2024-01-30 18:03:08
* @LastEditTime: 2024-02-01 14:43:53
* @LastEditors: zhp
* @Description:
-->
@ -84,8 +84,8 @@
</el-col>
</el-form>
</el-row>
<BomSelector ref="bomSelector" v-if="open" :bom-list="bomList" :value="selectedBoms"
@update="selectedBoms = $event" />
<BomSelector ref="bomSelector" v-if="open" :bom-list="bomList" :value="selectedBoms"
@update="selectedBoms = $event" />
<el-row slot="footer">
<el-button size="small" @click="cancel">取消</el-button>
@ -100,8 +100,18 @@
<script>
import BomSelector from './BomSelector.vue';
import {
getUserList
getUserList,
getQualityInspectionBoxBtn,
} from '@/api/base/qualityInspectionBoxPermissions';
// import {
// createQualityInspectionBoxBtn,
// updateQualityInspectionBoxBtn,
// deleteQualityInspectionBoxBtn,
// getPage,
// exportQualityInspectionBoxBtnExcel,
// getUserList
// } from '@/api/base/qualityInspectionBoxPermissions';
export default {
name: 'ProcessBom',
components: { BomSelector },
@ -127,7 +137,8 @@ export default {
],
list: [],
total: 0,
tableBtn: [],
tableBtn: [],
chooseList:[],
queryParams: {
pageNo: 1,
pageSize: 10,
@ -159,10 +170,6 @@ export default {
// deep: true,
// },
// },
mounted () {
this.getData()
this.getDict()
},
methods: {
getDict() {
getUserList({
@ -209,11 +216,11 @@ export default {
eq.materialsBom.chosen
// eq.valuesBom.chosen
) {
this.selectedBoms.push({
equipmentId: eq.id,
equMaterialBomId: eq.materialsBom.chosen,
// equValueBomId: eq.valuesBom.chosen,
});
// this.selectedBoms.push({
// equipmentId: eq.id,
// equMaterialBomId: eq.materialsBom.chosen,
// // equValueBomId: eq.valuesBom.chosen,
// });
}
// id
eq.materialsBom.equipmentId = eq.id;
@ -222,7 +229,6 @@ export default {
});
} else {
this.bomList.splice(0);
this.selectedBoms = [];
}
})
.catch((err) => {
@ -278,7 +284,7 @@ export default {
}
})
console.log(this.dataForm);
if (this.selectedBoms.length) {
if (!this.dataForm.userId) {
const { code, data } = await this.http(
'base/quality-inspection-box-btn-auth/create',
'post',
@ -294,7 +300,23 @@ export default {
this.btnLoading = false;
this.$message.error('操作失败');
}
}
} else {
const { code, data } = await this.http(
'base/quality-inspection-box-btn-auth/update',
'put',
this.dataForm
);
if (code == 0) {
this.$message.success('操作成功');
// this.getList(this.currentDet);
this.btnLoading = false;
this.$emit('getList')
this.cancel();
} else {
this.btnLoading = false;
this.$message.error('操作失败');
}
}
});
},
// async getList({
@ -362,11 +384,46 @@ export default {
// // this.selectedBoms = [];
// // });
// },
async handleAddEquipment() {
this.open = true;
async handleAddEquipment(userId) {
this.open = true
this.selectedBoms = []
this.getData()
this.getDict()
if (userId) {
getQualityInspectionBoxBtn(userId).then((res) => {
// console.log(res)
this.$nextTick(() => {
this.dataForm.userId = userId
this.dataForm.nickname = res.data.nickName
this.dataList = res.data.datas
let arr = []
res.data.datas.forEach((item) => {
// console.log(item.children);
// item.children.forEach((ele) => {
// console.log(ele)
this.selectedBoms.push({
equipmentId: item.id,
children: Object.keys(item).length > 0 ? item.children.map((ele) => {
console.log(ele)
return {
id: ele.id
}
}) : []
})
// })
})
})
// console.log(arr)
// this.chooseList = arr
// console.log(this.chooseList)
})
}
},
cancel() {
this.open = false;
this.open = false
this.bomList = []
this.selectedBoms = []
this.$refs.dataForm.resetFields();
},
clearList() {
this.list = [];

Datei anzeigen

@ -25,10 +25,7 @@
<script>
import {
createQualityInspectionBoxBtn,
updateQualityInspectionBoxBtn,
deleteQualityInspectionBoxBtn,
getQualityInspectionBoxBtn,
getPage,
exportQualityInspectionBoxBtnExcel,
getUserList
@ -157,9 +154,10 @@ export default {
this.urlOptions.getDataListURL(this.listQuery).then(res => {
this.tableData = res.data.list.map((item) => {
return {
// datas: item.strList.toString(),
datas: item.strList.toString(),
nickName: item.nickName,
userName: item.userName,
userId: item.userId
// sectionId: item.sectionId,
// sectionName: item.sectionName
}
@ -182,6 +180,7 @@ export default {
this.resetForm('form');
},
deleteHandle(id, name, index, data) {
console.log(data)
// console.log(data)
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
confirmButtonText: "确定",