1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
| <template>
| <view-grid
| ref="grid"
| :columns="columns"
| :detail="detail"
| :editFormFields="editFormFields"
| :editFormOptions="editFormOptions"
| :searchFormFields="searchFormFields"
| :searchFormOptions="searchFormOptions"
| :table="table"
| :extend="extend"
| >
| </view-grid>
| </template>
| <script>
| import extend from "@/extension/system/Sys_Tenant.js";
| import { ref, defineComponent } from "vue";
|
| export default defineComponent({
| setup() {
| // 租户管理主配置:对接 api/tenant。
| const table = ref({
| key: "tenantId",
| footer: "Foots",
| cnName: "租户管理",
| name: "sys_Tenant",
| url: "/tenant/",
| sortName: "tenantId",
| });
|
| const editFormFields = ref({
| tenantName: "",
| tenantType: "",
| dbType: "",
| connectionString: "",
| status: "",
| remark: "",
| });
|
| const editFormOptions = ref([
| [
| { field: "tenantName", title: "租户名称", type: "string", required: true },
| { field: "tenantType", title: "租户类型", type: "number", required: true },
| { field: "dbType", title: "数据库类型", type: "number", required: true },
| ],
| [
| { field: "status", title: "状态", type: "select", dataKey: "enableStatusEnum", data: [] },
| { field: "connectionString", title: "连接字符串", type: "textarea" },
| { field: "remark", title: "备注", type: "textarea" },
| ],
| ]);
|
| const searchFormFields = ref({
| tenantName: "",
| tenantType: "",
| dbType: "",
| status: "",
| });
|
| const searchFormOptions = ref([
| [
| { title: "租户名称", field: "tenantName", type: "like" },
| { title: "租户类型", field: "tenantType", type: "number" },
| { title: "数据库类型", field: "dbType", type: "number" },
| { title: "状态", field: "status", type: "select", dataKey: "enableStatusEnum", data: [] },
| ],
| ]);
|
| const columns = ref([
| { field: "tenantId", title: "租户ID", type: "int", width: 90, align: "left" },
| { field: "tenantName", title: "租户名称", type: "string", width: 180, align: "left" },
| { field: "tenantType", title: "租户类型", type: "int", width: 110, align: "left" },
| { field: "dbType", title: "数据库类型", type: "int", width: 110, align: "left" },
| { field: "status", title: "状态", type: "int", width: 100, align: "left", bind: { key: "enableStatusEnum", data: [] } },
| { field: "connectionString", title: "连接字符串", type: "string", width: 280, align: "left" },
| { field: "creater", title: "创建人", type: "string", width: 100, align: "left" },
| { field: "createDate", title: "创建时间", type: "datetime", width: 160, align: "left" },
| { field: "modifier", title: "修改人", type: "string", width: 100, align: "left", hidden: true },
| { field: "modifyDate", title: "修改时间", type: "datetime", width: 160, align: "left", hidden: true },
| { field: "remark", title: "备注", type: "string", width: 180, align: "left" },
| ]);
|
| const detail = ref({
| cnName: "#detailCnName",
| table: "",
| columns: [],
| sortName: "",
| });
|
| return {
| table,
| extend,
| editFormFields,
| editFormOptions,
| searchFormFields,
| searchFormOptions,
| columns,
| detail,
| };
| },
| });
| </script>
|
|