mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
refactor: 调整 eslint.config.js,优化代码格式
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="visible"
|
||||
:title="title"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:modal-style="{ maxWidth: '520px' }"
|
||||
width="90%"
|
||||
@before-ok="save"
|
||||
@close="reset"
|
||||
v-model:visible="visible"
|
||||
:title="title"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:modal-style="{ maxWidth: '520px' }"
|
||||
width="90%"
|
||||
@before-ok="save"
|
||||
@close="reset"
|
||||
>
|
||||
<GiForm ref="formRef" v-model="form" :options="options" :columns="columns" />
|
||||
</a-modal>
|
||||
@@ -33,7 +33,7 @@ const { app_type } = useDict('app_type')
|
||||
|
||||
const options: Options = {
|
||||
form: {},
|
||||
btns: { hide: true }
|
||||
btns: { hide: true },
|
||||
}
|
||||
|
||||
const columns: Columns = reactive([
|
||||
@@ -41,13 +41,13 @@ const columns: Columns = reactive([
|
||||
label: '应用名称',
|
||||
field: 'name',
|
||||
type: 'input',
|
||||
rules: [{ required: true, message: '请输入应用名称' }]
|
||||
rules: [{ required: true, message: '请输入应用名称' }],
|
||||
},
|
||||
{
|
||||
label: 'APPKEY',
|
||||
field: 'appKey',
|
||||
type: 'input',
|
||||
rules: [{ required: true, message: '请输入APPKEY' }]
|
||||
rules: [{ required: true, message: '请输入APPKEY' }],
|
||||
},
|
||||
{
|
||||
label: '应用状态',
|
||||
@@ -61,24 +61,24 @@ const columns: Columns = reactive([
|
||||
uncheckedValue: '0',
|
||||
checkedText: '启用',
|
||||
uncheckedText: '禁用',
|
||||
checkedColor: 'green'
|
||||
checkedColor: 'green',
|
||||
},
|
||||
rules: [{ required: false, message: '请输入应用状态' }]
|
||||
rules: [{ required: false, message: '请输入应用状态' }],
|
||||
},
|
||||
{
|
||||
label: '失效时间',
|
||||
field: 'expirationTime',
|
||||
type: 'date-picker',
|
||||
props: {
|
||||
showTime: true
|
||||
showTime: true,
|
||||
},
|
||||
rules: [{ required: true, message: '请输入失效时间' }]
|
||||
rules: [{ required: true, message: '请输入失效时间' }],
|
||||
},
|
||||
{
|
||||
label: '应用描述',
|
||||
field: 'appDesc',
|
||||
type: 'textarea'
|
||||
}
|
||||
type: 'textarea',
|
||||
},
|
||||
])
|
||||
|
||||
const { form, resetForm } = useForm({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible" title="应用详情" :width="width >= 580 ? 580 : '100%'" :footer="false" >
|
||||
<a-drawer v-model:visible="visible" title="应用详情" :width="width >= 580 ? 580 : '100%'" :footer="false">
|
||||
<a-descriptions :column="1" size="large" class="general-description" bordered>
|
||||
<a-descriptions-item label="应用名称">{{ dataDetail?.name }}</a-descriptions-item>
|
||||
<a-descriptions-item label="APPKEY">{{ dataDetail?.appKey }}</a-descriptions-item>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="visible"
|
||||
title="应用密钥/密码信息"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:modal-style="{ maxWidth: '520px' }"
|
||||
width="90%"
|
||||
v-model:visible="visible"
|
||||
title="应用密钥/密码信息"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:modal-style="{ maxWidth: '520px' }"
|
||||
width="90%"
|
||||
>
|
||||
<a-watermark :content="content" :gap="[10, 10]">
|
||||
<div style="width: 100%; height: 150px;" >
|
||||
<div style="width: 100%; height: 150px;">
|
||||
<a-alert type="warning" style="margin-bottom: 18px">应用密码仅可查看一次,请妥善保管,遗失请刷新。</a-alert>
|
||||
<a-descriptions :data="data" :column="1" bordered/>
|
||||
<a-descriptions :data="data" :column="1" bordered />
|
||||
</div>
|
||||
</a-watermark>
|
||||
</a-modal>
|
||||
@@ -25,10 +25,10 @@ import { useUserStore } from '@/stores'
|
||||
const dataId = ref('')
|
||||
const initData = [{
|
||||
label: '应用密钥(appkey)',
|
||||
value: '*********'
|
||||
value: '*********',
|
||||
}, {
|
||||
label: '应用密码(appsecret)',
|
||||
value: '*********'
|
||||
value: '*********',
|
||||
}]
|
||||
const userStore = useUserStore()
|
||||
const content = ref([userStore.userInfo.username, dayjs().format('YYYY-MM-DD HH:mm:ss')])
|
||||
@@ -41,10 +41,10 @@ const getAppSecretData = async (id: string) => {
|
||||
await getAppSecret(id).then((res) => {
|
||||
data = [{
|
||||
label: '应用密钥(appkey)',
|
||||
value: res.data.appKey
|
||||
value: res.data.appKey,
|
||||
}, {
|
||||
label: '应用密码(appsecret)',
|
||||
value: res.data.appSecret
|
||||
value: res.data.appSecret,
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="table-page">
|
||||
<GiTable
|
||||
row-key="id"
|
||||
title="应用管理"
|
||||
:data="dataList"
|
||||
:columns="columns"
|
||||
:loading="loading"
|
||||
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
|
||||
:pagination="pagination"
|
||||
:disabled-tools="['size']"
|
||||
:disabled-column-keys="['name']"
|
||||
@refresh="search"
|
||||
row-key="id"
|
||||
title="应用管理"
|
||||
:data="dataList"
|
||||
:columns="columns"
|
||||
:loading="loading"
|
||||
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
|
||||
:pagination="pagination"
|
||||
:disabled-tools="['size']"
|
||||
:disabled-column-keys="['name']"
|
||||
@refresh="search"
|
||||
>
|
||||
<template #toolbar-left>
|
||||
<a-input v-model="queryForm.name" placeholder="请输入应用名称" allow-clear @change="search">
|
||||
@@ -53,10 +53,10 @@
|
||||
<a-space>
|
||||
<a-link v-permission="['open:app:update']" @click="onUpdate(record)">修改</a-link>
|
||||
<a-link
|
||||
v-permission="['open:app:delete']"
|
||||
status="danger"
|
||||
:disabled="record.disabled"
|
||||
@click="onDelete(record)"
|
||||
v-permission="['open:app:delete']"
|
||||
status="danger"
|
||||
:disabled="record.disabled"
|
||||
@click="onDelete(record)"
|
||||
>
|
||||
删除
|
||||
</a-link>
|
||||
@@ -74,7 +74,7 @@ import { Message } from '@arco-design/web-vue'
|
||||
import AppAddModal from './AppAddModal.vue'
|
||||
import AppDetailDrawer from './AppDetailDrawer.vue'
|
||||
import AppGetSecretModal from './AppGetSecretModal.vue'
|
||||
import { type AppResp, type AppQuery, deleteApp, exportApp, listApp, refreshAppSecret } from '@/apis/open/app'
|
||||
import { type AppQuery, type AppResp, deleteApp, exportApp, listApp, refreshAppSecret } from '@/apis/open/app'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { useDownload, useTable } from '@/hooks'
|
||||
import { isMobile } from '@/utils'
|
||||
@@ -88,7 +88,7 @@ const { app_type } = useDict('app_type')
|
||||
const queryForm = reactive<AppQuery>({
|
||||
name: '',
|
||||
appKey: '',
|
||||
sort: ['createTime,desc']
|
||||
sort: ['createTime,desc'],
|
||||
})
|
||||
|
||||
const {
|
||||
@@ -96,7 +96,7 @@ const {
|
||||
loading,
|
||||
pagination,
|
||||
search,
|
||||
handleDelete
|
||||
handleDelete,
|
||||
} = useTable((page) => listApp({ ...queryForm, ...page }), { immediate: true })
|
||||
|
||||
const columns: TableInstanceColumns[] = [
|
||||
@@ -111,8 +111,8 @@ const columns: TableInstanceColumns[] = [
|
||||
width: 130,
|
||||
align: 'center',
|
||||
fixed: !isMobile() ? 'right' : undefined,
|
||||
show: has.hasPermOr(['open:app:update', 'open:app:delete'])
|
||||
}
|
||||
show: has.hasPermOr(['open:app:update', 'open:app:delete']),
|
||||
},
|
||||
]
|
||||
|
||||
// 重置
|
||||
@@ -126,7 +126,7 @@ const reset = () => {
|
||||
const onDelete = (record: AppResp) => {
|
||||
return handleDelete(() => deleteApp(record.id), {
|
||||
content: `是否确定删除该条数据?`,
|
||||
showModal: true
|
||||
showModal: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user