projects/mes-test #133

Merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +08:00
Showing only changes of commit 010e51c0f6 - Show all commits

View File

@ -67,7 +67,11 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<el-transfer v-model="choosedEquipments" :data="eqList" :render-content="renderFn"></el-transfer> <el-transfer v-model="choosedEquipments" :data="eqList">
<!-- <span slot-scope="{ option }">
{{ option.key }} - {{ option.label }}
</span> -->
</el-transfer>
</base-dialog> </base-dialog>
</section> </section>
</template> </template>
@ -125,9 +129,9 @@ export default {
}, },
}, },
methods: { methods: {
renderFn(h,option) { renderFn(h, option) {
console.log(option) console.log(option);
return <span>1</span> return <span>1</span>;
}, },
async getEqList() { async getEqList() {
console.log('currentDet', this.currentDet); console.log('currentDet', this.currentDet);
@ -150,12 +154,21 @@ export default {
{ equipmentId: 6, equipmentName: '设备6' }, { equipmentId: 6, equipmentName: '设备6' },
]; // ].map((item) => ({ label: item.equipmentName, key: item.equipmentId })); ]; // ].map((item) => ({ label: item.equipmentName, key: item.equipmentId }));
// bombom // bombom
this.finalList = this.eqList.map((item) => { // bom bom
this.finalList = this.eqList.map((item) => {
item.sub = [];
// key: equipmentId-bomId // key: equipmentId-bomId
item.push({ key: item.equipmentId + '-' + '101', label: '参数bom1' }); item.sub.push({
item.push({ key: item.equipmentId + '-' + '201', label: '物料bom1' }); key: item.equipmentId + '-' + '101',
label: '参数bom1',
});
item.sub.push({
key: item.equipmentId + '-' + '201',
label: '物料bom1',
});
return item;
}); });
} }
}, },
@ -181,7 +194,7 @@ export default {
data: method !== 'get' ? payload : null, data: method !== 'get' ? payload : null,
}); });
}, },
submitForm() {},
async getList({ detId, detName, detDesc, flowId, sectionName } = {}) { async getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
console.log('get list', detId, detName, flowId); console.log('get list', detId, detName, flowId);
const { data, code } = await this.http( const { data, code } = await this.http(