Merged PR 97: BUG680:値変更イベント適用しない設定は無効
修正内容: 下記値変更イベントをeventactionマスタについてしても適用されない問題を修正しました。 app.record.create.change app.record.edit.change Related work items: #680
This commit is contained in:
@@ -82,7 +82,7 @@ export default {
|
|||||||
if(store.selectedEvent ){
|
if(store.selectedEvent ){
|
||||||
eventId=store.selectedEvent.header!=='DELETABLE'? store.selectedEvent.eventId : store.selectedEvent.parentId;
|
eventId=store.selectedEvent.header!=='DELETABLE'? store.selectedEvent.eventId : store.selectedEvent.parentId;
|
||||||
}
|
}
|
||||||
const res =await api.get(`api/eventactions/${store.selectedEvent.eventId}`);
|
const res =await api.get(`api/eventactions/${eventId}`);
|
||||||
actionData= res.data;
|
actionData= res.data;
|
||||||
const categoryNames = Array.from(new Set(actionData.map(x=>x.categoryname)));
|
const categoryNames = Array.from(new Set(actionData.map(x=>x.categoryname)));
|
||||||
categorys.value=categoryNames;
|
categorys.value=categoryNames;
|
||||||
|
|||||||
@@ -59,10 +59,16 @@ export class StyleFieldAction implements IAction{
|
|||||||
}
|
}
|
||||||
this.props = actionNode.ActionValue as IStyleFieldProps;
|
this.props = actionNode.ActionValue as IStyleFieldProps;
|
||||||
//書式設定
|
//書式設定
|
||||||
if(event.type==="app.record.index.show"){
|
console.log(event.type)
|
||||||
this.setStyleForView(event,this.props,context);
|
if (event.type === "app.record.index.show") {
|
||||||
}else if(event.type==="app.record.detail.show"){
|
this.setStyleForView(event, this.props, context);
|
||||||
this.setStyleForDetail(event,this.props,context);
|
} else if (event.type === "app.record.detail.show") {
|
||||||
|
this.setStyleForDetail(event, this.props, context);
|
||||||
|
} else if (
|
||||||
|
event.type.includes("app.record.create.change.") ||
|
||||||
|
event.type.includes("app.record.edit.change.")
|
||||||
|
) {
|
||||||
|
this.setStyleForEdit(event, this.props, context);
|
||||||
}
|
}
|
||||||
result= {
|
result= {
|
||||||
canNext:true,
|
canNext:true,
|
||||||
@@ -77,6 +83,36 @@ export class StyleFieldAction implements IAction{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setStyleForEdit(event:any,props:IStyleFieldProps,context:IContext){
|
||||||
|
const recordTable = document.getElementById('record-gaia');
|
||||||
|
if (recordTable) {
|
||||||
|
Array.from(
|
||||||
|
recordTable.getElementsByTagName("span")
|
||||||
|
)
|
||||||
|
.filter((span) => span.innerText === props.field.code)
|
||||||
|
.map((span) =>
|
||||||
|
span.parentElement?.nextElementSibling
|
||||||
|
?.querySelector(".input-text-outer-cybozu")
|
||||||
|
?.firstElementChild as HTMLElement | null
|
||||||
|
)
|
||||||
|
.filter((inputElement): inputElement is HTMLElement => !!inputElement)
|
||||||
|
.forEach((inputElement) => {
|
||||||
|
const conditionResult = this.getConditionResult(
|
||||||
|
this.getCondition(props.condition),
|
||||||
|
context
|
||||||
|
);
|
||||||
|
|
||||||
|
if (conditionResult) {
|
||||||
|
this.setFieldStyle(props, inputElement);
|
||||||
|
} else {
|
||||||
|
inputElement.removeAttribute('style');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 詳細表示時のスタイル設定
|
* 詳細表示時のスタイル設定
|
||||||
* @param event
|
* @param event
|
||||||
|
|||||||
Reference in New Issue
Block a user