mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-12 23:45:39 +08:00
feat 支付常量列表
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
:open="visible"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<description :column="2" :data="data" :schema="schema" />
|
||||
<description :column="2" size="default" :data="data" :schema="schema" />
|
||||
<template #footer>
|
||||
<a-button key="cancel" @click="visible = false">取消</a-button>
|
||||
</template>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<basic-modal
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
width="50%"
|
||||
:width="1200"
|
||||
title="查看"
|
||||
:open="visible"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<description :column="2" :data="data" :schema="schema" />
|
||||
<description :column="1" size="small" :data="data" :schema="schema" />
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button key="cancel" @click="visible = false">取消</a-button>
|
||||
@@ -29,7 +29,7 @@
|
||||
let visible = ref(false)
|
||||
let confirmLoading = ref(false)
|
||||
let schema = [
|
||||
{ field: 'id', label: '主键' },
|
||||
{ field: 'id', label: '主键', labelMinWidth: 100 },
|
||||
{ field: 'account', label: '操作账号' },
|
||||
{ field: 'title', label: '操作模块' },
|
||||
{
|
||||
|
||||
36
src/views/daxpay/admin/constant/api/ApiConst.api.ts
Normal file
36
src/views/daxpay/admin/constant/api/ApiConst.api.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { defHttp } from '@/utils/http/axios'
|
||||
import { PageResult, Result } from '#/axios'
|
||||
import { BaseEntity } from '#/web'
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
export const page = (params) => {
|
||||
return defHttp.get<Result<PageResult<ChannelConst>>>({
|
||||
url: '/const/method',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
export const get = (id) => {
|
||||
return defHttp.get<Result<ChannelConst>>({
|
||||
url: '/const/method',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
export interface ChannelConst extends BaseEntity {
|
||||
/** 编码 */
|
||||
code: string
|
||||
/** 名称 */
|
||||
name: string
|
||||
/** 接口地址 */
|
||||
api: string
|
||||
/** 是否启用 */
|
||||
enable: boolean
|
||||
/** 备注 */
|
||||
remark: string
|
||||
}
|
||||
33
src/views/daxpay/admin/constant/channel/ChannelConst.api.ts
Normal file
33
src/views/daxpay/admin/constant/channel/ChannelConst.api.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defHttp } from '@/utils/http/axios'
|
||||
import { PageResult, Result } from '#/axios'
|
||||
import { BaseEntity } from '#/web'
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
export const page = (params) => {
|
||||
return defHttp.get<Result<PageResult<ChannelConst>>>({
|
||||
url: '/const/method',
|
||||
params,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
export const get = (id) => {
|
||||
return defHttp.get<Result<ChannelConst>>({
|
||||
url: '/const/method',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
export interface ChannelConst extends BaseEntity {
|
||||
/** 编码 */
|
||||
code: string
|
||||
/** 名称 */
|
||||
name: string
|
||||
/** 是否启用 */
|
||||
enable: boolean
|
||||
/** 备注 */
|
||||
remark: string
|
||||
}
|
||||
33
src/views/daxpay/admin/constant/method/MethodConst.api.ts
Normal file
33
src/views/daxpay/admin/constant/method/MethodConst.api.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defHttp } from '@/utils/http/axios'
|
||||
import { PageResult, Result } from '#/axios'
|
||||
import { BaseEntity } from '#/web'
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
export const page = (params) => {
|
||||
return defHttp.get<Result<PageResult<MethodConst>>>({
|
||||
url: '/const/method',
|
||||
params,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
export const get = (id) => {
|
||||
return defHttp.get<Result<MethodConst>>({
|
||||
url: '/const/method',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
export interface MethodConst extends BaseEntity {
|
||||
/** 编码 */
|
||||
code: string
|
||||
/** 名称 */
|
||||
name: string
|
||||
/** 是否启用 */
|
||||
enable: boolean
|
||||
/** 备注 */
|
||||
remark: string
|
||||
}
|
||||
@@ -36,15 +36,17 @@ export function syncSystem() {
|
||||
*/
|
||||
export interface PermPath extends BaseEntity {
|
||||
// 标识
|
||||
code: string
|
||||
code?: string
|
||||
// 上级标识
|
||||
parentCode: string
|
||||
parentCode?: string
|
||||
// 权限名称
|
||||
name: string
|
||||
name?: string
|
||||
// 请求类型
|
||||
method: string
|
||||
method?: string
|
||||
// 请求路径
|
||||
path: string
|
||||
path?: string
|
||||
// 叶子节点
|
||||
leaf?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,28 +1,48 @@
|
||||
<template></template>
|
||||
<template>
|
||||
<basic-modal
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
:width="1000"
|
||||
title="查看"
|
||||
:open="visible"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<description :column="1" size="small" :data="data" :schema="schema" />
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button key="cancel" @click="visible = false">取消</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, reactive, ref } from 'vue'
|
||||
import useFormEdit from '@/hooks/bootx/useFormEdit'
|
||||
import { add, get, update, PermPath } from './PermPath.api'
|
||||
import { FormInstance, Rule } from 'ant-design-vue/lib/form'
|
||||
import { FormEditType } from '@/enums/formTypeEnum'
|
||||
import { get, PermPath } from './PermPath.api'
|
||||
import { BasicModal } from '@/components/Modal'
|
||||
import { DescItem, Description } from '@/components/Description'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const {
|
||||
initFormEditType,
|
||||
handleCancel,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
modalWidth,
|
||||
title,
|
||||
confirmLoading,
|
||||
visible,
|
||||
showable,
|
||||
formEditType,
|
||||
} = useFormEdit()
|
||||
// 表单
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
function show(id) {}
|
||||
let data = ref<PermPath>({})
|
||||
let visible = ref(false)
|
||||
let confirmLoading = ref(false)
|
||||
let schema = [
|
||||
{ field: 'id', label: '主键', labelMinWidth: 100 },
|
||||
{ field: 'parentCode', label: '上级标识' },
|
||||
{ field: 'name', label: '权限名称' },
|
||||
{ field: 'method', label: '请求类型' },
|
||||
{ field: 'path', label: '请求路径' },
|
||||
] as DescItem[]
|
||||
|
||||
function show(id) {
|
||||
visible.value = true
|
||||
confirmLoading.value = true
|
||||
get(id).then((res) => {
|
||||
data.value = res.data
|
||||
confirmLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
})
|
||||
|
||||
@@ -51,12 +51,15 @@
|
||||
:tree-config="{ childrenField: 'children' }"
|
||||
:data="tableData"
|
||||
>
|
||||
<vxe-column field="name" title="名称" tree-node />
|
||||
<vxe-column field="path" title="请求路径" />
|
||||
<vxe-column title="操作" fixed="right" width="220" :showOverflow="false">
|
||||
<vxe-column field="name" title="名称" :min-width="200" tree-node />
|
||||
<vxe-column field="path" title="请求路径" :min-width="500">
|
||||
<template #default="{ row }">
|
||||
<a href="javascript:" @click="show(row)">查看</a>
|
||||
<template v-if="String(row.menuType) !== '2'"> </template>
|
||||
{{ row.leaf ? `[${row.method}] ${row.path}` : '' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" fixed="right" :width="100" :showOverflow="false">
|
||||
<template #default="{ row }">
|
||||
<a-link v-if="row.leaf" @click="show(row)">查看</a-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
@@ -165,7 +168,7 @@
|
||||
* 查看
|
||||
*/
|
||||
function show(record: PermPath) {
|
||||
permPathInfo.value.init(record.id)
|
||||
permPathInfo.value.show(record.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user