projects/mes-test #133

Merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
4 changed files with 53 additions and 19 deletions
Showing only changes of commit 51baca61cc - Show all commits

View File

@ -13,11 +13,11 @@ 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://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080' 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.56:48080' # VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'

View File

@ -60,6 +60,7 @@ export default {
currentSelect: { currentSelect: {
handler(val) { handler(val) {
this.selected = val; this.selected = val;
this.randomKey = Math.random();
}, },
immediate: true, immediate: true,
}, },

View File

@ -142,6 +142,15 @@ export default {
this.currentEquipment = eq.id; this.currentEquipment = eq.id;
this.materialsBomList = eq.materialsBom; this.materialsBomList = eq.materialsBom;
this.valuesBomList = eq.valuesBom; 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;
}
}, },
handleEquipmentChange(eq, selected) { handleEquipmentChange(eq, selected) {
@ -162,8 +171,10 @@ export default {
this.selectedEquipments = this.selectedEquipments.filter( this.selectedEquipments = this.selectedEquipments.filter(
(id) => id !== eq.id (id) => id !== eq.id
); );
this.$refs.materialsBomList.clearSelected(); // this.$refs.materialsBomList.clearSelected();
this.$refs.valuesBomList.clearSelected(); // this.$refs.valuesBomList.clearSelected();
this.currentSelectedMaterialBomId = null;
this.currentSelectedValueBomId = null;
this.selected = this.selected.filter( this.selected = this.selected.filter(
(item) => item.equipmentId !== eq.id (item) => item.equipmentId !== eq.id
); );
@ -222,27 +233,31 @@ export default {
min-height: 200px; min-height: 200px;
} }
.select-list {
}
.sl__body { .sl__body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6px; gap: 6px;
padding: 6px; padding: 6px;
}
> .el-checkbox { .sl__body-item {
margin: 0; margin: 0;
padding: 3px 6px; padding: 3px 6px;
border-radius: 4px; border-radius: 4px;
cursor: pointer;
transition: background 0.3s ease-in-out; transition: background 0.3s ease-in-out;
display: flex;
align-items: center;
gap: 8px;
> span {
flex: 1;
}
&:hover { &:hover {
background: #0001; background: #0001;
} }
} }
}
.sl__header { .sl__header {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }

View File

@ -31,6 +31,9 @@
icon="el-icon-search" icon="el-icon-search"
placeholder="搜索" placeholder="搜索"
v-model="searchText" v-model="searchText"
:disabled="currentDet == null"
@change="handleSearchTextChange"
clearable
style="margin-left: 20px"> style="margin-left: 20px">
<i slot="prefix" class="el-input__icon el-icon-search"></i> <i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
@ -99,7 +102,7 @@ export default {
choosedEquipments: [], choosedEquipments: [],
searchBarFormConfig: [{ label: '工序下设备' }], searchBarFormConfig: [{ label: '工序下设备' }],
tableProps: [ tableProps: [
{ prop: 'equipmentId', label: '设备名称' }, { prop: 'equName', label: '设备名称' },
{ prop: 'materialName', label: '物料BOM' }, { prop: 'materialName', label: '物料BOM' },
{ prop: 'valueName', label: '参数BOM' }, { prop: 'valueName', label: '参数BOM' },
], ],
@ -109,9 +112,11 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
equipmentName: '',
}, },
searchText: '', searchText: '',
selectedBoms: [], selectedBoms: [],
timer: null,
}; };
}, },
watch: { watch: {
@ -130,7 +135,20 @@ export default {
}, },
methods: { methods: {
handleEmitFun() {}, handleEmitFun() {},
handleTableBtnClick() {}, handleTableBtnClick() {},
handleSearchTextChange(val) {
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
console.log('geting list.......');
this.queryParams.equipmentName = val;
this.$nextTick(() => {
this.getList(this.currentDet);
});
}, 300);
},
put(payload) { put(payload) {
return this.http(this.updateUrl, 'put', payload); return this.http(this.updateUrl, 'put', payload);
}, },