diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts
index be71517ca70ef426e9e6e6ef84f9c680f2f8585b..5cd9a70966c1f8840f168c81e4d69e8c70dfa779 100644
--- a/src/types/auto-components.d.ts
+++ b/src/types/auto-components.d.ts
@@ -23,8 +23,6 @@ declare module '@vue/runtime-core' {
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
- ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
- ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
@@ -54,7 +52,6 @@ declare module '@vue/runtime-core' {
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
- ElImage: typeof import('element-plus/es')['ElImage']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
@@ -63,26 +60,18 @@ declare module '@vue/runtime-core' {
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
- ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
- ElSpace: typeof import('element-plus/es')['ElSpace']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
- ElTableV2: typeof import('element-plus/es')['ElTableV2']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
- ElTimeline: typeof import('element-plus/es')['ElTimeline']
- ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
- ElTransfer: typeof import('element-plus/es')['ElTransfer']
- ElTree: typeof import('element-plus/es')['ElTree']
- ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
Error: typeof import('./../components/Error/src/Error.vue')['default']
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
diff --git a/src/views/system/tenant/form.vue b/src/views/system/tenant/form.vue
new file mode 100644
index 0000000000000000000000000000000000000000..71304433e675e594d25e00983206642a3528a8f5
--- /dev/null
+++ b/src/views/system/tenant/form.vue
@@ -0,0 +1,208 @@
+
+
+
+
diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue
index bb1ca1a321b65975c02432842dba06065dc2c0c7..0719b5f110973bacabeb2de8fc0bfb604aaacbb5 100644
--- a/src/views/system/tenant/index.vue
+++ b/src/views/system/tenant/index.vue
@@ -1,197 +1,259 @@
-
-
-
-
-
-
-
+
+
+
+
-
-
- {{ row.accountCount }}
-
-
- 系统租户
- {{ getPackageName(row.packageId) }}
-
-
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- 系统租户
- {{ getPackageName(row.packageId) }}
-
-
-
-
-
-
+
+
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+ 新增
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ 系统租户
+ {{ getPackageName(scope.row.packageId) }}
+
+
+
+
+
+
+ {{ scope.row.accountCount }}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts
deleted file mode 100644
index 1137b44a245895829f5b6b23b5d417675a17b6bc..0000000000000000000000000000000000000000
--- a/src/views/system/tenant/tenant.data.ts
+++ /dev/null
@@ -1,186 +0,0 @@
-import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
-import { getTenantPackageList, TenantPackageVO } from '@/api/system/tenantPackage'
-import { ComponentOptions } from '@/types/components'
-
-const { t } = useI18n() // 国际化
-
-export const tenantPackageOption: ComponentOptions[] = []
-const getTenantPackageOptions = async () => {
- const res = await getTenantPackageList()
- res.forEach((tenantPackage: TenantPackageVO) => {
- tenantPackageOption.push({
- key: tenantPackage.id,
- value: tenantPackage.id,
- label: tenantPackage.name
- })
- })
-
- return tenantPackageOption
-}
-getTenantPackageOptions()
-
-const validateName = (rule: any, value: any, callback: any) => {
- const reg = /^[a-zA-Z0-9]{4,30}$/
- if (value === '') {
- callback(new Error('请输入用户名称'))
- } else {
- console.log(reg.test(rule), 'reg.test(rule)')
- if (!reg.test(value)) {
- callback(new Error('用户名称由 数字、字母 组成'))
- } else {
- callback()
- }
- }
-}
-const validateMobile = (rule: any, value: any, callback: any) => {
- const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
- if (value === '') {
- callback(new Error('请输入联系手机'))
- } else {
- if (!reg.test(value)) {
- callback(new Error('请输入正确的手机号'))
- } else {
- callback()
- }
- }
-}
-
-// 表单校验
-export const rules = reactive({
- name: [required],
- packageId: [required],
- contactName: [required],
- contactMobile: [
- required,
- {
- validator: validateMobile,
- trigger: 'blur'
- }
- ],
- accountCount: [required],
- expireTime: [required],
- username: [
- required,
- {
- min: 4,
- max: 30,
- trigger: 'blur',
- message: '用户名称长度为 4-30 个字符'
- },
- { validator: validateName, trigger: 'blur' }
- ],
- password: [
- required,
- {
- min: 4,
- max: 16,
- trigger: 'blur',
- message: '密码长度为 4-16 位'
- }
- ],
- domain: [required],
- status: [required]
-})
-
-// CrudSchema.
-const crudSchemas = reactive({
- primaryKey: 'id',
- primaryTitle: '租户编号',
- primaryType: 'id',
- action: true,
- columns: [
- {
- title: '租户名称',
- field: 'name',
- isSearch: true
- },
- {
- title: '租户套餐',
- field: 'packageId',
- table: {
- slots: {
- default: 'packageId_default'
- }
- },
- form: {
- component: 'Select',
- componentProps: {
- options: tenantPackageOption
- }
- }
- },
- {
- title: '联系人',
- field: 'contactName',
- isSearch: true
- },
- {
- title: '联系手机',
- field: 'contactMobile',
- isSearch: true
- },
- {
- title: '用户名称',
- field: 'username',
- isTable: false,
- isDetail: false
- },
- {
- title: '用户密码',
- field: 'password',
- isTable: false,
- isDetail: false,
- form: {
- component: 'InputPassword'
- }
- },
- {
- title: '账号额度',
- field: 'accountCount',
- table: {
- slots: {
- default: 'accountCount_default'
- }
- },
- form: {
- component: 'InputNumber'
- }
- },
- {
- title: '过期时间',
- field: 'expireTime',
- formatter: 'formatDate',
- form: {
- component: 'DatePicker',
- componentProps: {
- type: 'datetime',
- valueFormat: 'x'
- }
- }
- },
- {
- title: '绑定域名',
- field: 'domain'
- },
- {
- title: '租户状态',
- field: 'status',
- dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number',
- isSearch: true
- },
- {
- title: t('table.createTime'),
- field: 'createTime',
- formatter: 'formatDate',
- isForm: false,
- search: {
- show: true,
- itemRender: {
- name: 'XDataTimePicker'
- }
- }
- }
- ]
-})
-export const { allSchemas } = useVxeCrudSchemas(crudSchemas)