Commit 2496db36 authored by 皮倩雯's avatar 皮倩雯

优化事件管理编辑功能

parent 2131a059
Pipeline #33953 passed with stages
in 7 minutes 43 seconds
......@@ -118,9 +118,28 @@ const AddModal = props => {
description: '摘要字段必填',
})
}else{
let data = type == 'add' ? { ...obj, ...inputValue, Order: maxLength } : { ...obj, Order, ID: formObj.ID }
let data = { ...obj, ...inputValue, Order: maxLength }
// let data = { ...obj, ...inputValue, Order: maxLength } : { ...obj, Order, ID: formObj.ID }
if (type == 'edit') {
CM_Event_EditEventTable(data)
CM_Event_EditEventTable({
...inputValue,
ID: formObj.ID,
Name:obj.Name,
Code:obj.Code,
BusinessType:obj.BusinessType,
TableName:obj.TableName,
Reportable:obj.Reportable,
ReportFromWeb:obj.ReportFromWeb,
ReportFromMobile:obj.ReportFromMobile,
Editable:obj.Editable,
CreateMode:obj.CreateMode,
TopWhere:obj.TopWhere,
ReportPage:obj.ReportPage,
DealPage:obj.DealPage,
RelatedEvents:obj.RelatedEvents,
InterfaceConfig:obj.InterfaceConfig,
})
.then(res => {
// setLoading(false);
if (res.msg === 'Ok') {
......@@ -184,9 +203,10 @@ const AddModal = props => {
};
useEffect(() => {
getEventData()
getRole()
if (type === 'add') {
getEventData()
setInputValue({ SummaryFields: '', ReportFields: '', DisplayFields: '', EditableFields: '', TransitFields: '', Roles: '', RelatedEventFields: '', pictureFields: '' })
setFiled({})
setFiled1({})
......@@ -195,6 +215,7 @@ const AddModal = props => {
setReportFromMobile(false)
setReportFromWeb(false)
} else if (type === 'edit') {
getEventData1()
GetCM_Event_QueryEventType({ eventTypeId: formObj.ID }).then(res => {
res.data.root && form.setFieldsValue({ ...res.data.root });
console.log(res.data.root)
......@@ -236,6 +257,16 @@ const AddModal = props => {
})
}
const getEventData1 = () => {
setType('')
GetCM_Event_LoadEventTypeTable().then(res => {
if (res.msg === 'Ok') {
console.log(res.data)
setStandingTable(res.data)
}
})
}
const changTable = (value) => {
LoadEventFields({ eventTableName: value, distinctFields: '' }).then(res => {
if (res.data.root && res.data.root.length) {
......
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