Merge branch 'master' of https://dev.azure.com/alicorn-dev/KintoneAppBuilder/_git/KintoneAppBuilder
This commit is contained in:
@@ -196,7 +196,7 @@ async def createapp(name:str):
|
|||||||
|
|
||||||
property=["label","code","type","required","defaultValue","options"]
|
property=["label","code","type","required","defaultValue","options"]
|
||||||
|
|
||||||
@r.post("/createappfromexcel",)
|
@r.post("/createappfromexcel")
|
||||||
async def createappfromexcel(files:t.List[UploadFile] = File(...)):
|
async def createappfromexcel(files:t.List[UploadFile] = File(...)):
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.filename.endswith('.xlsx'):
|
if file.filename.endswith('.xlsx'):
|
||||||
|
|||||||
@@ -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/"
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// directives: [],
|
// directives: [],
|
||||||
|
|
||||||
// Quasar plugins
|
// Quasar plugins
|
||||||
plugins: []
|
plugins: [
|
||||||
|
'Notify'
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// animations: 'all', // --- includes all animations
|
// animations: 'all', // --- includes all animations
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-uploader
|
<q-uploader
|
||||||
:on-finish="uploadFinished"
|
|
||||||
style="max-width: 400px"
|
style="max-width: 400px"
|
||||||
:url="uploadUrl"
|
:url="uploadUrl"
|
||||||
:label="title"
|
:label="title"
|
||||||
accept=".csv,.xlsx"
|
accept=".csv,.xlsx"
|
||||||
:on-rejected="onRejected"
|
v-on:rejected="onRejected"
|
||||||
field-name="file"
|
v-on:uploaded="onUploadFinished"
|
||||||
|
v-on:failed="onFailed"
|
||||||
|
field-name="files"
|
||||||
></q-uploader>
|
></q-uploader>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -17,20 +18,11 @@
|
|||||||
|
|
||||||
|
|
||||||
const $q=useQuasar();
|
const $q=useQuasar();
|
||||||
// const allowTypes=['.xlsx','.csv'];
|
|
||||||
|
|
||||||
// function checkFileType(files : File[] ):File[]{
|
|
||||||
// return files.filter((file)=>{
|
|
||||||
// let filename = file.name.toLowerCase();
|
|
||||||
// for(let ext of allowTypes){
|
|
||||||
// if(filename.endsWith(ext)){
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ファイルアップロードを拒否する時の処理
|
||||||
|
* @param rejectedEntries
|
||||||
|
*/
|
||||||
function onRejected (rejectedEntries:any) {
|
function onRejected (rejectedEntries:any) {
|
||||||
// Notify plugin needs to be installed
|
// Notify plugin needs to be installed
|
||||||
// https://quasar.dev/quasar-plugins/notify#Installation
|
// https://quasar.dev/quasar-plugins/notify#Installation
|
||||||
@@ -38,27 +30,46 @@
|
|||||||
type: 'negative',
|
type: 'negative',
|
||||||
message: `CSVおよびExcelファイルを選択してください。`
|
message: `CSVおよびExcelファイルを選択してください。`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadFinished(){
|
/**
|
||||||
|
* ファイルアップロード成功時の処理
|
||||||
|
*/
|
||||||
|
function onUploadFinished({xhr}:{xhr:XMLHttpRequest}){
|
||||||
|
let msg="ファイルのアップロードが完了しました。";
|
||||||
|
if(xhr && xhr.response){
|
||||||
|
msg=`${msg} (${xhr.responseText})`;
|
||||||
|
}
|
||||||
$q.notify({
|
$q.notify({
|
||||||
type: 'info',
|
type: 'positive',
|
||||||
message: 'ファイルの読込が完了しました。'
|
caption:"通知",
|
||||||
})
|
message: msg
|
||||||
|
});
|
||||||
}
|
}
|
||||||
interface Props {
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param info ファイルアップロード失敗時の処理
|
||||||
|
*/
|
||||||
|
function onFailed({files,xhr}:{files: readonly any[],xhr:any}){
|
||||||
|
let msg ="ファイルアップロードが失敗しました。";
|
||||||
|
if(xhr && xhr.status){
|
||||||
|
msg=`${msg} (${xhr.status }:${xhr.statusText})`
|
||||||
|
}
|
||||||
|
$q.notify({
|
||||||
|
type:"negative",
|
||||||
|
message:msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
uploadUrl:string;
|
uploadUrl:string;
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
title:"設計書から導入する(csv or excel)",
|
title:"設計書から導入する(csv or excel)",
|
||||||
uploadUrl:process.env.KAB_BACKEND_URL
|
uploadUrl: `${process.env.KAB_BACKEND_URL}createappfromexcel`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
|
|||||||
27
frontend/src/components/Rule.json
Normal file
27
frontend/src/components/Rule.json
Normal file
@@ -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}')"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
9
frontend/src/components/Rules.ts
Normal file
9
frontend/src/components/Rules.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export interface Rule{
|
||||||
|
id:number;
|
||||||
|
name:string;
|
||||||
|
condtion:CondtionTree
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CondtionTree{
|
||||||
|
|
||||||
|
}
|
||||||
17
frontend/src/pages/RuleEditor.vue
Normal file
17
frontend/src/pages/RuleEditor.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<q-page>
|
||||||
|
<div class="q-pa-md">
|
||||||
|
<div class="q-gutter-sm row items-start">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Todo, Meta } from 'components/models';
|
||||||
|
import DocUploader from 'components/DocUpload.vue';
|
||||||
|
// import ExampleComponent from 'components/ExampleComponent.vue';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user