From fc25e55c9f4e95760102b9f813d18d622c9d9b5b Mon Sep 17 00:00:00 2001 From: "maxiaozhe@alicorns.co.jp" Date: Thu, 13 Jul 2023 13:00:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ruleEdit=20=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/quasar.config.js | 4 +++- frontend/src/components/DocUpload.vue | 14 ++++++++++++-- frontend/src/components/Rule.json | 27 +++++++++++++++++++++++++++ frontend/src/components/Rules.ts | 9 +++++++++ frontend/src/pages/RuleEditor.vue | 17 +++++++++++++++++ 5 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 frontend/src/components/Rule.json create mode 100644 frontend/src/components/Rules.ts create mode 100644 frontend/src/pages/RuleEditor.vue diff --git a/frontend/quasar.config.js b/frontend/quasar.config.js index b8fff95..b998514 100644 --- a/frontend/quasar.config.js +++ b/frontend/quasar.config.js @@ -108,7 +108,9 @@ module.exports = configure(function (/* ctx */) { // directives: [], // Quasar plugins - plugins: [] + plugins: [ + 'Notify' + ] }, // animations: 'all', // --- includes all animations diff --git a/frontend/src/components/DocUpload.vue b/frontend/src/components/DocUpload.vue index 2ab3c1b..877f16f 100644 --- a/frontend/src/components/DocUpload.vue +++ b/frontend/src/components/DocUpload.vue @@ -5,7 +5,8 @@ :url="uploadUrl" :label="title" accept=".csv,.xlsx" - :on-rejected="onRejected" + v-on:rejected="onRejected" + v-on:finish="onUploadFinish" field-name="file" > @@ -35,7 +36,16 @@ $q.notify({ type: 'negative', message: `CSVおよびExcelファイルを選択してください。` - }) + + }); + } + + function onUploadFinish(){ + $q.notify({ + message:"ファイルアップロードしました!", + caption:"通知", + type:"positive" + }) } interface Props { diff --git a/frontend/src/components/Rule.json b/frontend/src/components/Rule.json new file mode 100644 index 0000000..62fcbf0 --- /dev/null +++ b/frontend/src/components/Rule.json @@ -0,0 +1,27 @@ +{ + "name":"保存ボタン押す際、入力値チェック", + "condtion":{ + "logic":{ + "logicType":"And", + "condtions":[ + { + "compareType":"event", + "compareItem":"Record-Save" + }, + { + "compareType":"field", + "compareItem":"テキスト", + "op":"!==", + "compareValue":"{value}" + }, + { + "compareType":"field", + "compareItem":"テキスト", + "op":"!==", + "compareValue":"isZengaku('{value}')" + } + ] + } + } + +} \ No newline at end of file diff --git a/frontend/src/components/Rules.ts b/frontend/src/components/Rules.ts new file mode 100644 index 0000000..78173c1 --- /dev/null +++ b/frontend/src/components/Rules.ts @@ -0,0 +1,9 @@ +export interface Rule{ + id:number; + name:string; + condtion:CondtionTree +} + +export interface CondtionTree{ + +} \ No newline at end of file diff --git a/frontend/src/pages/RuleEditor.vue b/frontend/src/pages/RuleEditor.vue new file mode 100644 index 0000000..a6b55fc --- /dev/null +++ b/frontend/src/pages/RuleEditor.vue @@ -0,0 +1,17 @@ + + + From 4620942795232e8185a97c420f2269c02d112d13 Mon Sep 17 00:00:00 2001 From: "maxiaozhe@alicorns.co.jp" Date: Thu, 13 Jul 2023 14:30:07 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=AB=AF=E5=90=88?= =?UTF-8?q?=E4=BD=93=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/api_v1/routers/kintone.py | 2 +- frontend/.env | 2 +- frontend/src/components/DocUpload.vue | 55 ++++++++++++++--------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/backend/app/api/api_v1/routers/kintone.py b/backend/app/api/api_v1/routers/kintone.py index 1203c0a..bdc40da 100644 --- a/backend/app/api/api_v1/routers/kintone.py +++ b/backend/app/api/api_v1/routers/kintone.py @@ -49,7 +49,7 @@ async def createapp(name:str): property=["label","code","type","required","defaultValue","options"] -@r.post("/createappfromexcel",) +@r.post("/createappfromexcel") async def createappfromexcel(files:t.List[UploadFile] = File(...)): for file in files: if file.filename.endswith('.xlsx'): diff --git a/frontend/.env b/frontend/.env index 00485e5..3e3182f 100644 --- a/frontend/.env +++ b/frontend/.env @@ -1,2 +1,2 @@ -KAB_BACKEND_URL="http://127.0.0.1:8000/api/v1/upload" +KAB_BACKEND_URL="http://127.0.0.1:8000/api/v1/" diff --git a/frontend/src/components/DocUpload.vue b/frontend/src/components/DocUpload.vue index 9fcc34e..cfede92 100644 --- a/frontend/src/components/DocUpload.vue +++ b/frontend/src/components/DocUpload.vue @@ -1,14 +1,14 @@