From 662af6a226f1bff4e021882ab7ce05eebbfd7e9a Mon Sep 17 00:00:00 2001 From: Mouriya Date: Wed, 18 Sep 2024 21:37:09 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E7=B7=A8=E9=9B=86=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AB=E6=96=B0=E3=81=97=E3=81=84=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=81=A7=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kintone-addins/src/actions/style-field.ts | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/plugin/kintone-addins/src/actions/style-field.ts b/plugin/kintone-addins/src/actions/style-field.ts index 73d6b9c..836a017 100644 --- a/plugin/kintone-addins/src/actions/style-field.ts +++ b/plugin/kintone-addins/src/actions/style-field.ts @@ -59,10 +59,16 @@ export class StyleFieldAction implements IAction{ } this.props = actionNode.ActionValue as IStyleFieldProps; //書式設定 - if(event.type==="app.record.index.show"){ - this.setStyleForView(event,this.props,context); - }else if(event.type==="app.record.detail.show"){ - this.setStyleForDetail(event,this.props,context); + console.log(event.type) + if (event.type === "app.record.index.show") { + this.setStyleForView(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= { 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 From 30f44ca92320c02ff4270fb124afd9a4d1ff5b35 Mon Sep 17 00:00:00 2001 From: "xiaozhe.ma" Date: Tue, 24 Sep 2024 01:26:19 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=81=AB?= =?UTF-8?q?=E9=81=A9=E7=94=A8=E8=A8=AD=E5=AE=9A=E3=81=AE=E4=B8=8D=E5=85=B7?= =?UTF-8?q?=E5=90=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ActionSelect.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/ActionSelect.vue b/frontend/src/components/ActionSelect.vue index 0c351d0..c3f8eec 100644 --- a/frontend/src/components/ActionSelect.vue +++ b/frontend/src/components/ActionSelect.vue @@ -82,7 +82,7 @@ export default { if(store.selectedEvent ){ 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; const categoryNames = Array.from(new Set(actionData.map(x=>x.categoryname))); categorys.value=categoryNames;