ファイル名の修正
This commit is contained in:
@@ -126,7 +126,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'MuiltDropDownBox',
|
||||
name: 'CascadingDropDownBox',
|
||||
inheritAttrs: false,
|
||||
components: { ShowDialog, AppSelectBox, FieldSelect },
|
||||
props: {
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<ShowDialog v-model:visible="dgIsShow" name="設定ドロップダウンメニュー" @close="closeDg" min-width="50vw" min-height="20vh" disableBtn>
|
||||
<div class="q-mb-md q-ml-md q-mr-md">
|
||||
<MultiDropDownBox v-model:model-value="data" :finishDialogHandler="finishDialogHandler" />
|
||||
<CascadingDropDownBox v-model:model-value="data" :finishDialogHandler="finishDialogHandler" />
|
||||
</div>
|
||||
</ShowDialog>
|
||||
</template>
|
||||
@@ -27,14 +27,14 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, watchEffect } from 'vue';
|
||||
import ShowDialog from '../ShowDialog.vue';
|
||||
import MultiDropDownBox from '../MuiltDropDownBox.vue';
|
||||
import CascadingDropDownBox from '../CascadingDropDownBox.vue';
|
||||
|
||||
export default defineComponent({
|
||||
inheritAttrs: false,
|
||||
name: 'MultiDropDown',
|
||||
name: 'CascadingDropDown',
|
||||
components: {
|
||||
ShowDialog,
|
||||
MultiDropDownBox
|
||||
CascadingDropDownBox
|
||||
},
|
||||
props: {
|
||||
displayName: {
|
||||
@@ -24,7 +24,7 @@ import NumInput from './NumInput.vue';
|
||||
import DataProcessing from './DataProcessing.vue';
|
||||
import DataMapping from './DataMapping.vue';
|
||||
import AppSelect from './AppSelect.vue';
|
||||
import MultiDropDown from './MultiDropDown.vue';
|
||||
import CascadingDropDown from './CascadingDropDown.vue';
|
||||
import { IActionNode,IActionProperty,IProp } from 'src/types/ActionTypes';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -43,7 +43,7 @@ export default defineComponent({
|
||||
DataProcessing,
|
||||
DataMapping,
|
||||
AppSelect,
|
||||
MultiDropDown
|
||||
CascadingDropDown
|
||||
},
|
||||
props: {
|
||||
nodeProps: {
|
||||
|
||||
@@ -8,17 +8,17 @@ import {
|
||||
import { actionAddins } from ".";
|
||||
import { KintoneRestAPIClient } from "@kintone/rest-api-client";
|
||||
import { getPageState } from "../util/url";
|
||||
import "./muilt-dropdown.scss";
|
||||
import "./cascading-dropdown-selectors.scss";
|
||||
import { Record as KTRecord } from "@kintone/rest-api-client/lib/src/client/types";
|
||||
|
||||
// 多段ドロップダウンメニューのプロパティインターフェース
|
||||
interface IMuiltDropDownProps {
|
||||
interface ICascadingDropDownProps {
|
||||
displayName: string;
|
||||
multiDropDown: IMultiDropDown;
|
||||
cascadingDropDown: ICascadingDropDown;
|
||||
}
|
||||
|
||||
// 多段ドロップダウンメニューの設定インターフェース
|
||||
interface IMultiDropDown {
|
||||
interface ICascadingDropDown {
|
||||
sourceApp: IApp;
|
||||
dropDownApp: IApp;
|
||||
fieldList: IFieldList[];
|
||||
@@ -55,7 +55,7 @@ namespace DropDownConfig {
|
||||
let dictionary: DropdownDictionary;
|
||||
|
||||
// ドロップダウンメニューの設定を初期化、必要な時のみ初期化
|
||||
export const init = async (props: IMultiDropDown) => {
|
||||
export const init = async (props: ICascadingDropDown) => {
|
||||
try {
|
||||
const client = new KintoneRestAPIClient();
|
||||
const sourceAppId = props.sourceApp.id;
|
||||
@@ -173,15 +173,15 @@ namespace DropDownConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export class MuiltDropDownAction implements IAction {
|
||||
export class CascadingDropDownAction implements IAction {
|
||||
name: string;
|
||||
actionProps: IActionProperty[];
|
||||
props: IMuiltDropDownProps;
|
||||
props: ICascadingDropDownProps;
|
||||
|
||||
constructor() {
|
||||
this.name = "TestDropDown";
|
||||
this.actionProps = [];
|
||||
this.props = {} as IMuiltDropDownProps;
|
||||
this.props = {} as ICascadingDropDownProps;
|
||||
this.register();
|
||||
}
|
||||
|
||||
@@ -191,20 +191,23 @@ export class MuiltDropDownAction implements IAction {
|
||||
context: IContext
|
||||
): Promise<IActionResult> {
|
||||
this.actionProps = actionNode.actionProps;
|
||||
this.props = actionNode.ActionValue as IMuiltDropDownProps;
|
||||
this.props = actionNode.ActionValue as ICascadingDropDownProps;
|
||||
|
||||
console.log(this.actionProps);
|
||||
console.log(this.props);
|
||||
|
||||
const result: IActionResult = { canNext: true, result: "" };
|
||||
|
||||
try {
|
||||
if (!this.props) return result;
|
||||
|
||||
const appId = this.props.multiDropDown.dropDownApp.id;
|
||||
const appId = this.props.cascadingDropDown.dropDownApp.id;
|
||||
await this.#handlePageState(appId);
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"MuiltDropDownAction プロセス中にエラーが発生しました:",
|
||||
"CascadingDropDownAction プロセス中にエラーが発生しました:",
|
||||
error
|
||||
);
|
||||
context.errors.handleError(error, actionNode);
|
||||
@@ -223,14 +226,14 @@ export class MuiltDropDownAction implements IAction {
|
||||
case "edit":
|
||||
case "show":
|
||||
if (currentState.type === "show" && currentState.mode !== "edit") break;
|
||||
await DropDownConfig.init(this.props.multiDropDown);
|
||||
this.#setupMultiDropdown(currentState.type);
|
||||
await DropDownConfig.init(this.props.cascadingDropDown);
|
||||
this.#setupCascadingDropDown(currentState.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 多段ドロップダウンメニューを設定
|
||||
#setupMultiDropdown(pageType: string): void {
|
||||
#setupCascadingDropDown(pageType: string): void {
|
||||
const tableElement = document.getElementById(
|
||||
pageType === "app" ? "view-list-data-gaia" : "record-gaia"
|
||||
);
|
||||
@@ -242,7 +245,7 @@ export class MuiltDropDownAction implements IAction {
|
||||
DropdownContainer.init(
|
||||
pageType,
|
||||
tableElement,
|
||||
this.props.multiDropDown.fieldList
|
||||
this.props.cascadingDropDown.fieldList
|
||||
);
|
||||
DropdownContainer.addSaveBtnEvent(
|
||||
pageType === "app"
|
||||
@@ -257,7 +260,7 @@ export class MuiltDropDownAction implements IAction {
|
||||
}
|
||||
}
|
||||
|
||||
new MuiltDropDownAction();
|
||||
new CascadingDropDownAction();
|
||||
|
||||
// ドロップダウンメニューコンテナの名前空間
|
||||
namespace DropdownContainer {
|
||||
@@ -22,7 +22,7 @@ import '../actions/half-full-conversion';
|
||||
import '../actions/login-user-getter';
|
||||
import '../actions/auto-lookup';
|
||||
import '../actions/field-disable';
|
||||
import '../actions/muilt-dropdown';
|
||||
import '../actions/cascading-dropdown-selectors';
|
||||
import { ActionFlow,ErrorManager,IActionFlow, IActionResult,IContext } from "./ActionTypes";
|
||||
const ShowErrorEvents:string[] = [
|
||||
"app.record.create.submit.success",
|
||||
|
||||
Reference in New Issue
Block a user