diff --git a/frontend/index.html b/frontend/index.html index 43d25b2..b50159a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,7 +2,6 @@ <%= productName %> - diff --git a/frontend/package.json b/frontend/package.json index 5016fbf..3343684 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,8 +17,9 @@ }, "dependencies": { "@quasar/extras": "^1.16.4", + "@vueuse/core": "^10.9.0", "axios": "^1.4.0", - "pinia": "^2.1.6", + "pinia": "^2.1.7", "quasar": "^2.6.0", "uuid": "^9.0.0", "vue": "^3.0.0", diff --git a/frontend/src/boot/error-handler.ts b/frontend/src/boot/error-handler.ts index 57253da..93be80b 100644 --- a/frontend/src/boot/error-handler.ts +++ b/frontend/src/boot/error-handler.ts @@ -4,6 +4,7 @@ import { Router } from 'vue-router'; import { App } from 'vue'; export default boot(({ app, router }: { app: App; router: Router }) => { + document.documentElement.lang="ja-JP"; app.config.errorHandler = (err: any, instance: any, info: string) => { if (err.response && err.response.status === 401) { // 認証エラーの場合再ログインする diff --git a/frontend/src/components/ConditionEditor/ConditionEditor.vue b/frontend/src/components/ConditionEditor/ConditionEditor.vue index ef47543..eef9401 100644 --- a/frontend/src/components/ConditionEditor/ConditionEditor.vue +++ b/frontend/src/components/ConditionEditor/ConditionEditor.vue @@ -1,5 +1,5 @@ @@ -88,9 +88,9 @@ .condition-object{ min-width: 200px; max-height: 40px; - padding: 2px; + margin: 0 2px; } .selected-obj{ - margin: 0px; + margin: 0 2px; } diff --git a/frontend/src/components/ConditionEditor/NodeCondition.vue b/frontend/src/components/ConditionEditor/NodeCondition.vue index c684992..943fdab 100644 --- a/frontend/src/components/ConditionEditor/NodeCondition.vue +++ b/frontend/src/components/ConditionEditor/NodeCondition.vue @@ -66,7 +66,7 @@
-
+
- + @@ -30,7 +30,7 @@
+ } +}; + + +export default defineComponent({ + name: 'FieldInput', + inheritAttrs: false, + components: { + ConditionEditor + }, + props: { + context: { + type: Array, + default: '', + }, + displayName: { + type: String, + default: '', + }, + name: { + type: String, + default: '', + }, + placeholder: { + type: String, + default: '', + }, + hint: { + type: String, + default: '', + }, + modelValue: { + type: String, + default: null + }, + sourceType: { + type: String, + default: 'field' + } + }, + + setup(props, { emit }) { + const source = props.context.find(element => element?.props?.name === 'sources') + + if (source) { + if(props.sourceType === 'field'){ + provide('sourceFields', computed( () => source.props?.modelValue?.fields ?? [])); + } else if(props.sourceType === 'app'){ + console.log('sourceApp', source.props?.modelValue); + provide('sourceApp', computed( () => source.props?.modelValue?.app?.id)); + } + } + + const appDg = ref(); + const show = ref(false); + const tree = reactive(new ConditionTree()); + if (props.modelValue && props.modelValue !== '') { + tree.fromJson(props.modelValue); + } else { + const newNode = new ConditionNode({}, Operator.Equal, '', tree.root); + tree.addNode(tree.root, newNode); + } + + const isSetted = ref(props.modelValue && props.modelValue !== ''); + + const conditionString = computed(() => { + return tree.buildConditionString(tree.root); + }); + + const showDg = () => { + show.value = true; + }; + + const onClosed = (val: string) => { + if (val == 'OK') { + const conditionJson = tree.toJson(); + isSetted.value = true; + emit('update:modelValue', conditionJson); + } + }; + + watchEffect(() => { + const conditionJson = tree.toJson(); + emit('update:modelValue', conditionJson); + }); + + return { + appDg, + isSetted, + show, + showDg, + onClosed, + tree, + conditionString + }; + } +}); + diff --git a/frontend/src/components/right/DataProcessing.vue b/frontend/src/components/right/DataProcessing.vue new file mode 100644 index 0000000..9aa554b --- /dev/null +++ b/frontend/src/components/right/DataProcessing.vue @@ -0,0 +1,229 @@ + + + + diff --git a/frontend/src/components/right/InputText.vue b/frontend/src/components/right/InputText.vue index 76b3c2f..cb6ee83 100644 --- a/frontend/src/components/right/InputText.vue +++ b/frontend/src/components/right/InputText.vue @@ -1,10 +1,7 @@