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