1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Add more information to the locator (#661)

* Fixes: #61 fix sequence field location

* Fixes: #62 Add more information to the locator

* minimal changes

Co-authored-by: Elsio Sanchez <elsiosanche@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-03-11 15:08:27 -04:00 committed by GitHub
parent 7292bad75e
commit 66d877e627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
<template>
<el-cascader
:ref="metadata.columnName"
v-model="value"
:v-model="[value]"
:placeholder="metadata.help"
:options="options"
:readonly="Boolean(metadata.readonly)"
@ -28,6 +28,7 @@ export default {
data() {
return {
options: [],
level: 0,
props: {
// checkStrictly: true,
// emitPath: false,
@ -70,15 +71,30 @@ export default {
warehouseId: node.value
})
.then(responseData => {
const locatorList = responseData.recordsList.map(item => {
const { attributes: values } = item
return {
label: values.Value,
value: values.M_Locator_ID,
warehouse: values.M_Warehouse_ID, // node.value
const data = responseData.recordsList[this.level]
const locatorList = [
{
value: data.id,
label: data.attributes.Value,
warehouse: data.id,
leaf: true
}, {
value: data.id,
label: data.attributes.X,
warehouse: data.id,
leaf: true
}, {
value: data.id,
label: data.attributes.Y,
warehouse: data.id,
leaf: true
}, {
value: data.id,
label: data.attributes.Z,
warehouse: data.id,
leaf: true
}
})
]
resolve(locatorList)
})
.catch(error => {