diff --git a/src/views/system/devtools/genTable/ClientModal.vue b/src/views/system/devtools/genTable/ClientModal.vue
deleted file mode 100644
index ebacf06..0000000
--- a/src/views/system/devtools/genTable/ClientModal.vue
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
diff --git a/src/views/system/devtools/genTable/GenTableModal.vue b/src/views/system/devtools/genTable/GenTableModal.vue
new file mode 100644
index 0000000..cd58ac8
--- /dev/null
+++ b/src/views/system/devtools/genTable/GenTableModal.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
diff --git a/src/views/system/devtools/genTable/client.data.ts b/src/views/system/devtools/genTable/client.data.ts
deleted file mode 100644
index 39b54c6..0000000
--- a/src/views/system/devtools/genTable/client.data.ts
+++ /dev/null
@@ -1,154 +0,0 @@
-import { BasicColumn } from '/@/components/Table';
-import { FormSchema } from '/@/components/Table';
-
-export const columns: BasicColumn[] = [
- {
- title: '客户端Id',
- dataIndex: 'clientId',
- width: 100
- },
- {
- title: '客户端密钥',
- dataIndex: 'clientSecret',
- width: 100
- },
- {
- title: '授权类型',
- dataIndex: 'authorizedGrantTypes',
- width: 130
- },
- {
- title: '授权范围',
- dataIndex: 'scope',
- width: 90
- },
- {
- title: '令牌过期秒数',
- dataIndex: 'accessTokenValidity',
- width: 130
- },
- {
- title: '令牌过期秒数',
- dataIndex: 'refreshTokenValidity',
- width: 130
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- width: 100
- }
-];
-
-export const searchFormSchema: FormSchema[] = [
- {
- field: 'clientId',
- label: '客户端编码',
- component: 'Input',
- componentProps: {
- placeholder: '请输入客户端编码',
- },
- colProps: { span: 8 },
- },
- {
- field: 'dateRange',
- label: '创建时间',
- component: 'RangePicker',
- componentProps: {
- style: { width:'100%' },
- valueFormat: 'YYYY-MM-DD',
- placeholder: ['开始日期','结束日期']
- },
- colProps: { span: 8 }
- }
-];
-
-export const formSchema: FormSchema[] = [
- {
- field: 'id',
- label: 'ID',
- component: 'Input',
- show: false
- },
- {
- field: 'clientId',
- label: '客户端Id',
- component: 'Input',
- required: true,
- colProps: {
- span: 12
- }
- },
- {
- field: 'clientSecret',
- label: '客户端密钥',
- component: 'Input',
- required: true,
- colProps: {
- span: 12
- }
- },
- {
- field: 'authorizedGrantTypes',
- label: '授权类型',
- component: 'InputTextArea',
- required:true,
- componentProps: {
- rows: 3
- },
- colProps: {
- span: 24
- }
- },
- {
- field: 'scope',
- label: '授权范围',
- component: 'Input',
- required:true,
- colProps: {
- span: 12
- }
- },
- {
- field: 'accessTokenValidity',
- label: '过期秒数',
- component: 'InputNumber',
- componentProps: {
- style: { width:'100%' },
- min: 0
- },
- colProps: {
- span: 12
- }
- },
- {
- field: 'refreshTokenValidity',
- label: '刷新秒数',
- component: 'InputNumber',
- componentProps: {
- style: { width:'100%' },
- min: 0
- },
- colProps: {
- span: 12
- }
- },
- {
- field: 'webServerRedirectUri',
- label: '回调地址',
- component: 'Input',
- colProps: {
- span: 12
- }
- },
- {
- field: 'additionalInformation',
- label: '附加说明',
- component: 'InputTextArea',
- componentProps: {
- rows: 6
- },
- colProps: {
- span: 24
- }
- }
-];
diff --git a/src/views/system/devtools/genTable/genTable.data.ts b/src/views/system/devtools/genTable/genTable.data.ts
new file mode 100644
index 0000000..cee7a05
--- /dev/null
+++ b/src/views/system/devtools/genTable/genTable.data.ts
@@ -0,0 +1,114 @@
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import {h} from 'vue';
+import {Tag} from 'ant-design-vue';
+
+export const columns: BasicColumn[] = [
+ {
+ title: '模板名称',
+ dataIndex: 'name',
+ },
+ {
+ title: '模板分类',
+ dataIndex: 'type',
+ customRender: ({record}) => {
+ const type = record.type;
+ // 采用二进制~~取反,只要为null或者0等等一些其他的空元素都会转为0
+ // 第一次取反会运算为-1,在后一次取反会运算为0
+ const enable = ~~type === 1;
+ const color = enable ? 'green' : 'warning';
+ const text = enable ? '单表' : '主附表';
+ return h(Tag, { color: color }, () => text);
+ }
+ },
+ {
+ title: '系统模板',
+ dataIndex: 'isSystem',
+ customRender: ({ record }) => {
+ const isSystem = record.isSystem;
+ // 采用二进制~~取反,只要为null或者0等等一些其他的空元素都会转为0
+ // 第一次取反会运算为-1,在后一次取反会运算为0
+ const enable = ~~isSystem === 1;
+ const color = enable ? 'green' : 'warning';
+ const text = enable ? '系统内置' : '非系统内置';
+ return h(Tag, { color: color }, () => text);
+ }
+ }
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ field: 'name',
+ label: '模板名称',
+ component: 'Input',
+ componentProps: {
+ placeholder: '请输入模板名称',
+ },
+ colProps: { span: 6 }
+ },
+ {
+ field: 'type',
+ label: '模版分类',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '单表',value: '1' },
+ { label: '主附表',value: '2' }
+ ]
+ },
+ colProps: { span: 6 }
+ }
+];
+
+export const formSchema: FormSchema[] = [
+ {
+ field: 'id',
+ label: 'ID',
+ component: 'Input',
+ show: false
+ },
+ {
+ field: 'name',
+ label: '模板名称',
+ component: 'Input',
+ required: true,
+ colProps: { span: 12 },
+ },
+ {
+ field: 'type',
+ label: '模板分类',
+ component: 'Select',
+ required: true,
+ componentProps: {
+ options: [
+ { label: '单表',value: '1' },
+ { label: '主附表',value: '2' }
+ ]
+ },
+ colProps: { span: 12 },
+ },
+ {
+ field: 'isSystem',
+ label: '系统模板',
+ component: 'Select',
+ required: true,
+ componentProps: {
+ options: [
+ { label: '系统内置',value: '1' },
+ { label: '非系统内置',value: '0' }
+ ]
+ },
+ colProps: { span: 12 },
+ },
+ {
+ label: '备注',
+ field: 'remarks',
+ component: 'InputTextArea',
+ componentProps: {
+ rows: 2
+ },
+ colProps: {
+ span: 24
+ }
+ }
+];
diff --git a/src/views/system/devtools/genTable/index.vue b/src/views/system/devtools/genTable/index.vue
index 41981c5..02fa926 100644
--- a/src/views/system/devtools/genTable/index.vue
+++ b/src/views/system/devtools/genTable/index.vue
@@ -6,22 +6,19 @@
>
新增客户端
+ >新增
修改客户端
+ >修改
删除客户端
+ >删除
@@ -30,32 +27,34 @@
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
- auth: ['client_edit'],
onClick: handleEdit.bind(null, record)
},
+ {
+ label: '复制',
+ icon: 'fa-regular:copy',
+ onClick: handleCopy.bind(null, record)
+ },
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
- auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
-
-
+