Commit 5d81d436 authored by hiyonx's avatar hiyonx

sap特性优化

parent e3a1ec34
......@@ -118,13 +118,13 @@ export default {
console.log(sapPropertyMap)
},
init(type, relationId, data = {}) {
init(type, viewType, relationId, data = {}) {
this.$refs.form && this.$refs.form.resetFields()
this.form.type = type
this.form.relationId = relationId
let sapData = {}
// 获取sap特性列表
listByType({type}).then(res => {
listByType({type, viewType}).then(res => {
let sapProperties = res.data || []
let sapPropertyMap = sapProperties.reduce((sapPropertyMap, item) => {
if (!sapPropertyMap[item.viewType]) sapPropertyMap[item.viewType] = []
......@@ -133,7 +133,7 @@ export default {
}, {})
if (relationId) {
// 获取sap特性值
listData({type, relationId}).then(resp => {
listData({type, viewType, relationId}).then(resp => {
let row = resp.rows[0] || {sapData: '{}'}
this.form.id = row.id
sapData = JSON.parse(row.sapData)
......
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