fix style && some warning

This commit is contained in:
2025-02-05 17:33:11 +08:00
parent 14191e4f1e
commit c0672f2487
5 changed files with 102 additions and 98 deletions

View File

@@ -12,15 +12,30 @@
field-name="files"
></q-uploader>
</div>
</template>
<script setup lang="ts">
import { createUploaderComponent, useQuasar } from 'quasar';
import { useQuasar } from 'quasar';
import { useAuthStore } from 'src/stores/useAuthStore';
import { ref } from 'vue';
const $q = useQuasar();
const authStore = useAuthStore();
const emit = defineEmits(['uploaded']);
interface Props {
title?: string;
uploadUrl?: string;
}
const headers = ref([
{ name: 'Authorization', value: 'Bearer ' + authStore.token },
]);
const props = withDefaults(defineProps<Props>(), {
title: '設計書から導入する(Excel)',
uploadUrl: `${process.env.KAB_BACKEND_URL}api/v1/createappfromexcel?format=1`,
});
/**
* ファイルアップロードを拒否する時の処理
* @param rejectedEntries
@@ -30,8 +45,8 @@ import { ref } from 'vue';
// https://quasar.dev/quasar-plugins/notify#Installation
$q.notify({
type: 'negative',
message: 'Excelファイルを選択してください。'
})
message: 'Excelファイルを選択してください。',
});
}
/**
@@ -45,7 +60,7 @@ import { ref } from 'vue';
$q.notify({
type: 'positive',
caption: '通知',
message: msg
message: msg,
});
setTimeout(() => {
emit('uploaded', xhr.responseText);
@@ -69,30 +84,22 @@ import { ref } from 'vue';
*
* @param info ファイルアップロード失敗時の処理
*/
function onFailed({files,xhr}:{files: readonly any[],xhr:XMLHttpRequest}){
function onFailed({
files,
xhr,
}: {
files: readonly any[];
xhr: XMLHttpRequest;
}) {
let msg = 'ファイルアップロードが失敗しました。';
if (xhr && xhr.status) {
const detail = getResponseError(xhr);
msg=`${msg} (${xhr.status }:${detail})`
msg = `${msg} (${xhr.status}:${detail})`;
}
$q.notify({
type: 'negative',
message:msg
message: msg,
});
}
interface Props {
title: string;
uploadUrl:string;
}
const headers = ref([{name:'Authorization',value:'Bearer ' + authStore.token}]);
const props = withDefaults(defineProps<Props>(), {
title:'設計書から導入する(Excel)',
uploadUrl: `${process.env.KAB_BACKEND_URL}api/v1/createappfromexcel?format=1`
});
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

View File

@@ -1,6 +1,5 @@
<template>
<q-page>
<div class="q-pa-md">
<div class="q-gutter-sm row items-start">
<q-breadcrumbs>
@@ -16,18 +15,18 @@
</template>
<script setup lang="ts">
import {ref} from 'vue'
import { ref } from 'vue';
import DocUploader from 'components/DocUpload.vue';
import AppInfo from 'components/AppInfo.vue';
import { AppSeed } from 'src/components/models';
interface AppInfo {
app:string,
revision:string
app: string;
revision: string;
}
const appseed = withDefaults(defineProps<AppSeed>(), {
app:''
app: '',
});
// const appseed = defineProps<AppSeed>();
@@ -38,6 +37,4 @@ function onAppUploaded(responseText :string){
let json: AppInfo = JSON.parse(responseText);
props.value = json;
}
</script>

View File

@@ -61,7 +61,7 @@ import { useAuthStore } from 'stores/useAuthStore';
let email = ref('');
let password = ref('');
let visibility = ref(false);
let passwordFieldType = ref('password');
let passwordFieldType = ref<'text'|'password'>('password');
let visibilityIcon = ref('visibility');
const required = (val:string) => {
return (val && val.length > 0 || '必須項目')

View File

@@ -309,7 +309,7 @@ const deleteDomain = () => {
editId.value = 0; // set in removeRow()
};
function editRow(row) {
function editRow(row: any) {
isCreate.value = false
editId.value = row.id;
// tenantid.value = row.tenantid;

View File

@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
path: '/',
component: () => import('layouts/MainLayout.vue'),
children: [
{ path: '', component: () => import('pages/IndexPage.vue') },
{ path: '', component: () => import('pages/IndexPage.vue'), props: { app: '' } },
{ path: 'ruleEditor', component: () => import('pages/RuleEditor.vue') },
{ path: 'flow', component: () => import('pages/testFlow.vue') },
{ path: 'FlowChartTest', component: () => import('pages/FlowChartTest.vue') },