Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改按钮 #216

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quasar.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = configure(function (ctx) {
env: {
API: ctx.dev
? '/api'
: '/api',
: 'https://101.42.255.156/api',
TITLE: ''
},

Expand Down
2 changes: 1 addition & 1 deletion src/boot/msw-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { handlers } from 'src/mocks' // 您的请求处理程序

export default boot(() => {
// dev
if (process.env.PROD) {
if (process.env.DEV) {
const worker = setupWorker(...handlers)
worker.start()
}
Expand Down
22 changes: 13 additions & 9 deletions src/pages/exploiters/generators/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@

<!-- preview -->
<q-dialog v-model="previewVisible">
<q-card style="max-width: 45em; width: 45em;">
<q-card class="full-width">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">{{ $t('preview') }}</div>
<q-space />
<q-btn icon="sym_r_close" flat round dense v-close-popup />
</q-card-section>

<q-card-section style="height: 70vh;" class="scroll">
<q-card-section style="max-height: 70vh;" class="scroll">
<q-tabs v-model="tab" no-caps dense>
<q-tab v-for="item in renderedTemplates" :key="item.id" :name="item.id" :label="item.name + item.suffix" />
</q-tabs>
Expand Down Expand Up @@ -85,11 +85,13 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="create" round class="q-ml-sm" color="primary" :disable="loading" icon="sym_r_add"
<q-btn title="create" round padding="xs" class="q-mx-sm" color="primary" :disable="loading" icon="sym_r_add"
@click="saveRow()" />
<q-btn title="import" round outline color="primary" class="q-mx-sm" :disable="loading" icon="sym_r_upload"
@click="importRow" />
<q-btn title="export" round outline color="primary" icon="sym_r_file_save" @click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" :disable="loading" icon="sym_r_refresh"
@click="refresh" />
<q-btn title="import" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_database_upload" @click="importRow" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -202,9 +204,7 @@ const configColumns: QTableProps['columns'] = [
{ name: 'fieldType', label: 'fieldType', align: 'left', field: 'fieldType' },
{ name: 'formType', label: 'formType', align: 'left', field: 'formType' },
{ name: 'queryable', label: 'queryable', align: 'left', field: 'queryable' },
{ name: 'editable', label: 'editable', align: 'left', field: 'editable' },
{ name: 'lastModifiedDate', label: 'lastModifiedDate', align: 'center', field: 'lastModifiedDate' },
{ name: 'id', label: 'actions', field: 'id' }
{ name: 'editable', label: 'editable', align: 'left', field: 'editable' }
]

onMounted(() => {
Expand Down Expand Up @@ -241,6 +241,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

async function loadSchemaFields(id: number) {
retrieveSchemaFields(id).then(res => {
fields.value = res.data
Expand Down
43 changes: 28 additions & 15 deletions src/pages/exploiters/templates/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,29 @@
<q-page padding>

<q-dialog v-model="visible" persistent>
<q-card style="min-width: 25em">
<q-form @submit="onSubmit" @reset="onReset" class="q-gutter-md">
<q-card class="full-width">
<q-form @submit="onSubmit" @reset="onReset" class="q-gutter-x-md">
<q-card-section>
<div class="text-h6">{{ $t('regions') }}</div>
</q-card-section>

<q-card-section>
<q-input v-model="form.name" :label="$t('name')" lazy-rules
:rules="[val => val && val.length > 0 || 'Please type something']" />
<q-input v-model="form.suffix" :label="$t('comment')" lazy-rules />
<q-input v-model="form.version" :label="$t('domain')" lazy-rules />
<q-input v-model="form.content" :label="$t('reference')" lazy-rules />
<q-card-section style="max-height: 70vh;" class="scroll">
<div class="row q-col-gutter-x-md">
<q-input v-model="form.name" :label="$t('name')" class="col-6" lazy-rules
:rules="[val => val && val.length > 0 || 'Please type something']">
<template v-slot:append>
<q-select v-model="form.suffix" :options="['.java', '.vue']" />
</template>
</q-input>
<q-input v-model="form.version" :label="$t('version')" class="col-3" />
<q-input v-model="form.type" :label="$t('type')" class="col-3" />
</div>
<q-input v-model="form.content" :label="$t('content')" type="textarea" autogrow />
</q-card-section>

<q-card-actions align="right">
<q-btn title="cancel" type="reset" unelevated :label="$t('cancel')" v-close-popup />
<q-btn title="submit" type="submit" :label="$t('submit')" color="primary" />
<q-btn title="submit" type="submit" flat :label="$t('submit')" color="primary" />
</q-card-actions>

</q-form>
Expand All @@ -27,7 +33,7 @@

<!-- preview -->
<q-dialog v-model="previewVisible">
<q-card>
<q-card class="full-width">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">{{ form.name }}{{ form.suffix }}</div>
<q-space />
Expand All @@ -49,11 +55,13 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="create" round class="q-ml-sm" color="primary" :disable="loading" icon="sym_r_add"
<q-btn title="create" round padding="xs" class="q-mx-sm" color="primary" :disable="loading" icon="sym_r_add"
@click="saveRow()" />
<q-btn title="import" round outline color="primary" class="q-mx-sm" :disable="loading" icon="sym_r_upload"
@click="importRow" />
<q-btn title="export" round outline color="primary" icon="sym_r_file_save" @click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" :disable="loading" icon="sym_r_refresh"
@click="refresh" />
<q-btn title="import" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_database_upload" @click="importRow" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -94,6 +102,7 @@ import type { Template } from 'src/models'
const $q = useQuasar()

const visible = ref<boolean>(false)
const importVisible = ref<boolean>(false)
const previewVisible = ref<boolean>(false)

const tableRef = ref()
Expand Down Expand Up @@ -159,8 +168,12 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function importRow() {
visible.value = true
importVisible.value = true
}

function previewRow(id: number) {
Expand Down
12 changes: 9 additions & 3 deletions src/pages/files/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<q-card-actions align="right">
<q-btn title="cancel" type="reset" unelevated :label="$t('cancel')" v-close-popup />
<q-btn title="submit" type="submit" :label="$t('submit')" color="primary" />
<q-btn title="submit" type="submit" flat :label="$t('submit')" color="primary" />
</q-card-actions>

</q-form>
Expand All @@ -32,8 +32,10 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="upload" rounded color="primary" class="q-mx-md" :disable="loading" icon="sym_r_upload"
:label="$t('upload')" @click="uploadRow" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="upload" round padding="xs" color="primary" :disable="loading" icon="sym_r_upload"
@click="uploadRow" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -138,6 +140,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function uploadRow() {
visible.value = true
}
Expand Down
10 changes: 8 additions & 2 deletions src/pages/logs/access/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-ml-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="clear" round padding="xs" flat color="negative" class="q-mx-sm" icon="sym_r_clear_all" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -153,6 +155,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function showRow(id: number) {
visible.value = true
if (id) {
Expand Down
9 changes: 7 additions & 2 deletions src/pages/logs/audit/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -144,6 +145,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function showRow(id: number) {
visible.value = true
if (id) {
Expand Down
10 changes: 8 additions & 2 deletions src/pages/logs/operation/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-ml-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="clear" round padding="xs" flat color="negative" class="q-mx-sm" icon="sym_r_clear_all" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -144,6 +146,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function showRow(id: number) {
visible.value = true
if (id) {
Expand Down
17 changes: 12 additions & 5 deletions src/pages/logs/scheduler/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-ml-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="clear" round padding="xs" flat color="negative" class="q-mx-sm" icon="sym_r_clear_all" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand All @@ -39,13 +41,14 @@

<template v-slot:body-cell-status="props">
<q-td :props="props">
<q-chip v-if="props.row.status === 0" size="sm" color="primary" text-color="white">
<q-chip v-if="props.row.status === 0" size="sm" icon="sym_r_progress_activity" color="primary"
text-color="white">
{{ $t('processing') }}
</q-chip>
<q-chip v-else-if="props.row.status === 1" size="sm" color="positive" text-color="white">
<q-chip v-else-if="props.row.status === 1" size="sm" icon="sym_r_check" color="positive" text-color="white">
{{ $t('done') }}
</q-chip>
<q-chip v-else size="sm" color="negative" text-color="white">{{ $t('failure') }}</q-chip>
<q-chip v-else size="sm" icon="sym_r_error" color="negative" text-color="white">{{ $t('failure') }}</q-chip>
</q-td>
</template>
<template v-slot:body-cell-executedTimes="props">
Expand Down Expand Up @@ -144,6 +147,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function refresh() {

}

function showRow(id: number) {
visible.value = true
if (id) {
Expand Down
22 changes: 17 additions & 5 deletions src/pages/regions/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<q-card-actions align="right">
<q-btn title="cancel" type="reset" unelevated :label="$t('cancel')" v-close-popup />
<q-btn title="submit" type="submit" :label="$t('submit')" color="primary" />
<q-btn title="submit" type="submit" flat :label="$t('submit')" color="primary" />
</q-card-actions>

</q-form>
Expand All @@ -33,10 +33,13 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="create" rounded color="primary" class="q-mx-md" :disable="loading" icon="sym_r_add"
:label="$t('create')" @click="saveRow()" />
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="create" round padding="xs" color="primary" class="q-ml-sm" :disable="loading" icon="sym_r_add"
@click="saveRow()" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="import" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_database_upload" @click="importRow" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -89,6 +92,7 @@ import type { Region } from 'src/models'
const $q = useQuasar()

const visible = ref<boolean>(false)
const importVisible = ref<boolean>(false)

const tableRef = ref()
const rows = ref<QTableProps['rows']>([])
Expand Down Expand Up @@ -154,6 +158,14 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
})
}

function importRow() {
importVisible.value = true
}

function refresh() {

}

async function saveRow(id?: number) {
visible.value = true
// You can populate the form with existing user data based on the id
Expand Down
15 changes: 10 additions & 5 deletions src/pages/regions/SubPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<q-card-actions align="right">
<q-btn title="cancel" type="reset" unelevated :label="$t('cancel')" v-close-popup />
<q-btn title="submit" type="submit" :label="$t('submit')" color="primary" />
<q-btn title="submit" type="submit" flat :label="$t('submit')" color="primary" />
</q-card-actions>

</q-form>
Expand All @@ -31,10 +31,11 @@
<q-icon name="sym_r_search" />
</template>
</q-input>
<q-btn title="create" rounded color="primary" class="q-mx-md" :disable="loading" icon="sym_r_add"
:label="$t('create')" @click="saveRow()" />
<q-btn title="export" rounded outline color="primary" icon="sym_r_file_save" :label="$t('export')"
@click="exportTable" />
<q-btn title="create" round padding="xs" color="primary" class="q-mx-md" :disable="loading" icon="sym_r_add"
@click="saveRow()" />
<q-btn title="refresh" round padding="xs" flat color="primary" class="q-mx-sm" :disable="loading"
icon="sym_r_refresh" @click="refresh" />
<q-btn title="export" round padding="xs" flat color="primary" icon="sym_r_file_export" @click="exportTable" />
</template>

<template v-slot:header="props">
Expand Down Expand Up @@ -161,6 +162,10 @@ async function onRequest(props: Parameters<NonNullable<QTableProps['onRequest']>
}
}

function refresh() {

}

async function saveRow(id?: number) {
visible.value = true
// You can populate the form with existing user data based on the id
Expand Down
Loading