Commit f301b884 authored by hiyonx's avatar hiyonx

SAP数据bug修复

parent 4772c8fa
......@@ -7,9 +7,9 @@
<div class="separator">{{ getViewTypeName(key) }}</div>
<template v-for="item in sapProperties">
<el-col :span="span" :key="item.id">
<el-form-item :label="item.name" :prop="item.sapField"
:rules="{required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['blur', 'change']}">
<el-input-all v-model="sapData[item.sapField]" :item="item"/>
<el-form-item :label="item.name" :prop="key + '.' + item.sapField"
:rules="{required: item.required, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['change']}">
<el-input-all v-model="sapData[key][item.sapField]" :item="item"/>
</el-form-item>
</el-col>
</template>
......@@ -112,12 +112,13 @@ export default {
sapData[key][property.sapField] = propertyData || sapData[key][property.sapField]
}
}
console.log(sapData)
this.sapData = sapData
console.log(sapData)
this.sapPropertyMap = sapPropertyMap
console.log(sapPropertyMap)
},
init(type, relationId, data = {}) {
console.log(relationId)
this.$refs.form && this.$refs.form.resetFields()
this.form.type = type
this.form.relationId = relationId
......@@ -130,8 +131,6 @@ export default {
sapPropertyMap[item.viewType].push(item)
return sapPropertyMap
}, {})
console.log(sapPropertyMap)
this.sapPropertyMap = sapPropertyMap
if (relationId) {
// 获取sap特性值
listData({type, relationId}).then(resp => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment