Commit 435ac045 authored by 田翔's avatar 田翔

fix: 编辑工作台信息其他属性会丢失问题

parent 281a2f1a
Pipeline #81043 passed with stages
...@@ -43,7 +43,7 @@ const WorkDesign = (props) => { ...@@ -43,7 +43,7 @@ const WorkDesign = (props) => {
const editCard = (item) => { const editCard = (item) => {
setCurrentCard(item) setCurrentCard(item)
form.setFieldsValue({ '名称': item['名称'], '描述': item['描述'], '关联角色ID': item.roleInfo.map(v => `${v['角色ID']}`) }) form.setFieldsValue({ '名称': item['名称'], '描述': item['描述'], '关联角色ID': item.roleInfo.map(v => `${v['角色ID']}`), '类型': item['类型'] })
setVisible(true) setVisible(true)
} }
...@@ -89,7 +89,15 @@ const WorkDesign = (props) => { ...@@ -89,7 +89,15 @@ const WorkDesign = (props) => {
const validate = await form.validateFields() const validate = await form.validateFields()
if (validate) { if (validate) {
const values = form.getFieldsValue() const values = form.getFieldsValue()
const { code, data, msg } = await saveScheme({ ID: currentCard.ID || 0, ...values, '关联角色ID': values['关联角色ID'].join(','), '创建人': userName }) let parmas = {
ID: currentCard.ID || 0,
...values,
'关联角色ID': values['关联角色ID'].join(','),
'创建人': userName,
'卡片结构': currentCard['卡片结构'],
'路径': currentCard['路径'],
}
const { code, data, msg } = await saveScheme(parmas)
if (code === 0) { if (code === 0) {
getCardList() getCardList()
message.info({ type: 'success', content: '添加成功!' }) message.info({ type: 'success', content: '添加成功!' })
......
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