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