Commit cf368d5a9e9e1d675ba749b6aa5fddb60a922ca7

Authored by sqy
2 parents af1d655b b4ae23b4

Merge branch 'main' of http://git.yuntengiot.com/huang/yun-teng-iot-front into sqy_dev

... ... @@ -61,7 +61,7 @@ export const formSchema: FormSchema[] = [
61 61 component: 'Checkbox',
62 62 renderComponentContent: () => {
63 63 return h('span', {}, [
64   - h('span', {}, '隔离板芯容器的加工'),
  64 + h('span', {}, '隔离板芯容器的加工'),
65 65 h('span', { style: { color: 'grey' } }, '(每个独立租户需要单独的微服务)'),
66 66 ]);
67 67 },
... ... @@ -72,7 +72,7 @@ export const formSchema: FormSchema[] = [
72 72 component: 'Checkbox',
73 73 renderComponentContent: () => {
74 74 return h('span', {}, [
75   - h('span', {}, '在独立的ThingsBoard规则引擎中处理'),
  75 + h('span', {}, '在独立的规则引擎中处理'),
76 76 h('span', { style: { color: 'grey' } }, '(每个独立租户需要单独的微服务)'),
77 77 ]);
78 78 },
... ...
... ... @@ -20,7 +20,7 @@ export const formSchema: FormSchema[] = [
20 20 label: '最大设备数(0-无限制)',
21 21 component: 'InputNumber',
22 22 defaultValue: '0',
23   - colProps: { span: 24 },
  23 + colProps: { span: 12 },
24 24 componentProps: {
25 25 placeholder: '请输入最大设备数(请输入数字)',
26 26 },
... ... @@ -29,9 +29,9 @@ export const formSchema: FormSchema[] = [
29 29 field: 'maxAssets',
30 30 required: true,
31 31 defaultValue: '0',
32   -
  32 + ifShow: false,
33 33 label: '最大资产数(0-无限制)',
34   - colProps: { span: 24 },
  34 + colProps: { span: 12 },
35 35 component: 'InputNumber',
36 36 componentProps: {
37 37 placeholder: '请输入最大资产(请输入数字)',
... ... @@ -43,7 +43,7 @@ export const formSchema: FormSchema[] = [
43 43 defaultValue: '0',
44 44
45 45 label: '最大客户数(0-无限制)',
46   - colProps: { span: 24 },
  46 + colProps: { span: 12 },
47 47 component: 'InputNumber',
48 48 componentProps: {
49 49 placeholder: '请输入最大客户数(请输入数字)',
... ... @@ -53,9 +53,9 @@ export const formSchema: FormSchema[] = [
53 53 field: 'maxUsers',
54 54 required: true,
55 55 defaultValue: '0',
56   -
  56 + ifShow: false,
57 57 label: '最大用户数(0-无限制)',
58   - colProps: { span: 24 },
  58 + colProps: { span: 12 },
59 59 component: 'InputNumber',
60 60 componentProps: {
61 61 placeholder: '请输入最大用户数(请输入数字)',
... ... @@ -65,9 +65,9 @@ export const formSchema: FormSchema[] = [
65 65 field: 'maxDashboards',
66 66 required: true,
67 67 defaultValue: '0',
68   -
  68 + ifShow: false,
69 69 label: '仪表板的最大数量(0-无限制)',
70   - colProps: { span: 24 },
  70 + colProps: { span: 12 },
71 71 component: 'InputNumber',
72 72 componentProps: {
73 73 placeholder: '请输入仪表板的最大数量(请输入数字)',
... ... @@ -77,9 +77,9 @@ export const formSchema: FormSchema[] = [
77 77 field: 'maxRuleChains',
78 78 required: true,
79 79 defaultValue: '0',
80   -
  80 + ifShow: false,
81 81 label: '最大规则链数(0-无限制)',
82   - colProps: { span: 24 },
  82 + colProps: { span: 12 },
83 83 component: 'InputNumber',
84 84 componentProps: {
85 85 placeholder: '请输入最大规则链数(请输入数字)',
... ... @@ -89,9 +89,9 @@ export const formSchema: FormSchema[] = [
89 89 field: 'maxResourcesInBytes',
90 90 required: true,
91 91 defaultValue: '0',
92   -
  92 + ifShow: false,
93 93 label: '以字节为单位的资源文件的最大总和(0-无限制)',
94   - colProps: { span: 24 },
  94 + colProps: { span: 12 },
95 95 component: 'InputNumber',
96 96 componentProps: {
97 97 placeholder: '请输入(请输入数字)',
... ... @@ -101,9 +101,9 @@ export const formSchema: FormSchema[] = [
101 101 field: 'maxOtaPackagesInBytes',
102 102 required: true,
103 103 defaultValue: '0',
104   -
  104 + ifShow: false,
105 105 label: 'Ota包文件大小的最大总和(字节)(0-无限制)',
106   - colProps: { span: 24 },
  106 + colProps: { span: 12 },
107 107 component: 'InputNumber',
108 108 componentProps: {
109 109 placeholder: '请输入(请输入数字)',
... ... @@ -115,7 +115,7 @@ export const formSchema: FormSchema[] = [
115 115 defaultValue: '0',
116 116
117 117 label: '最大传输消息数(0-无限制)',
118   - colProps: { span: 24 },
  118 + colProps: { span: 12 },
119 119 component: 'InputNumber',
120 120 componentProps: {
121 121 placeholder: '请输入最大传输消息数(请输入数字)',
... ... @@ -127,7 +127,7 @@ export const formSchema: FormSchema[] = [
127 127 defaultValue: '0',
128 128
129 129 label: '传输数据点的最大数量(0-无限制)',
130   - colProps: { span: 24 },
  130 + colProps: { span: 12 },
131 131 component: 'InputNumber',
132 132 componentProps: {
133 133 placeholder: '请输入传输数据点的最大数量(请输入数字)',
... ... @@ -137,9 +137,9 @@ export const formSchema: FormSchema[] = [
137 137 field: 'maxREExecutions',
138 138 required: true,
139 139 defaultValue: '0',
140   -
  140 + ifShow: false,
141 141 label: '最大规则引擎数(0-无限制)',
142   - colProps: { span: 24 },
  142 + colProps: { span: 12 },
143 143 component: 'InputNumber',
144 144 componentProps: {
145 145 placeholder: '请输入最大规则引擎数(请输入数字)',
... ... @@ -152,7 +152,7 @@ export const formSchema: FormSchema[] = [
152 152 defaultValue: '0',
153 153
154 154 label: '最大JavaScript执行数(0-不受限制)',
155   - colProps: { span: 24 },
  155 + colProps: { span: 12 },
156 156 component: 'InputNumber',
157 157 componentProps: {
158 158 placeholder: '请输入最大JavaScript执行数(请输入数字)',
... ... @@ -164,7 +164,7 @@ export const formSchema: FormSchema[] = [
164 164 defaultValue: '0',
165 165
166 166 label: '最大日存储数据点数(0-无限制)',
167   - colProps: { span: 24 },
  167 + colProps: { span: 12 },
168 168 component: 'InputNumber',
169 169 componentProps: {
170 170 placeholder: '请输入最大日存储数据点数(请输入数字)',
... ... @@ -175,11 +175,11 @@ export const formSchema: FormSchema[] = [
175 175 required: true,
176 176 defaultValue: '0',
177 177
178   - label: '默认存储 TTL 天数(0-无限制)',
179   - colProps: { span: 24 },
  178 + label: '默认存储天数(0-无限制)',
  179 + colProps: { span: 12 },
180 180 component: 'InputNumber',
181 181 componentProps: {
182   - placeholder: '请输入默认存储 TTL 天数(请输入数字)',
  182 + placeholder: '请输入默认存储天数(请输入数字)',
183 183 },
184 184 },
185 185 {
... ... @@ -187,11 +187,11 @@ export const formSchema: FormSchema[] = [
187 187 required: true,
188 188 defaultValue: '0',
189 189
190   - label: 'Alams TTL days(0-无限制)',
191   - colProps: { span: 24 },
  190 + label: '告警存储天数(0-无限制)',
  191 + colProps: { span: 12 },
192 192 component: 'InputNumber',
193 193 componentProps: {
194   - placeholder: '请输入Alarms TTL days(请输入数字)',
  194 + placeholder: '请输入告警存储天数(请输入数字)',
195 195 },
196 196 },
197 197 {
... ... @@ -199,19 +199,20 @@ export const formSchema: FormSchema[] = [
199 199 required: true,
200 200 defaultValue: '0',
201 201
202   - label: 'RPC TTL days(0-无限制)',
203   - colProps: { span: 24 },
  202 + label: 'RPC存储天数(0-无限制)',
  203 + colProps: { span: 12 },
204 204 component: 'InputNumber',
205 205 componentProps: {
206   - placeholder: '请输入RPC TTL days(请输入数字)',
  206 + placeholder: '请输入RPC存储天数(请输入数字)',
207 207 },
208 208 },
209 209 {
  210 + ifShow: false,
210 211 field: 'maxRuleNodeExecutionsPerMessage',
211 212 required: true,
212   - defaultValue: '1',
  213 + defaultValue: '0',
213 214 label: '每条消息的最大规则节点执行数(0-无限制)',
214   - colProps: { span: 24 },
  215 + colProps: { span: 12 },
215 216 component: 'InputNumber',
216 217 componentProps: {
217 218 placeholder: '请输入每条消息的最大规则节点执行数(请输入数字)',
... ... @@ -221,9 +222,9 @@ export const formSchema: FormSchema[] = [
221 222 field: 'maxEmails',
222 223 required: true,
223 224 label: '发送的最大电子邮件数(0-无限制)',
224   - colProps: { span: 24 },
  225 + colProps: { span: 12 },
225 226 defaultValue: '0',
226   -
  227 + ifShow: false,
227 228 component: 'InputNumber',
228 229 componentProps: {
229 230 placeholder: '请输入发送的最大电子邮件数(请输入数字)',
... ... @@ -233,9 +234,9 @@ export const formSchema: FormSchema[] = [
233 234 field: 'maxSms',
234 235 required: true,
235 236 defaultValue: '0',
236   -
  237 + ifShow: false,
237 238 label: '发送的最大短信数(0-无限制)',
238   - colProps: { span: 24 },
  239 + colProps: { span: 12 },
239 240 component: 'InputNumber',
240 241 componentProps: {
241 242 placeholder: '请输入发送的最大短信数(请输入数字)',
... ... @@ -247,7 +248,7 @@ export const formSchema: FormSchema[] = [
247 248 defaultValue: '0',
248 249
249 250 label: '创建的最大报警数 (0 - 无限制)',
250   - colProps: { span: 24 },
  251 + colProps: { span: 12 },
251 252 component: 'InputNumber',
252 253 componentProps: {
253 254 placeholder: '请输入maxCreatedAlarms(请输入数字)',
... ...
... ... @@ -45,7 +45,7 @@
45 45 <style lang="less" scoped>
46 46 .tenant-class {
47 47 :deep .ant-input-number {
48   - width: 34vw !important;
  48 + width: 16vw !important;
49 49 }
50 50 }
51 51 </style>
... ...
... ... @@ -18,6 +18,7 @@
18 18 label: '设置该租户为默认',
19 19 icon: 'ant-design:eye-outlined',
20 20 onClick: handleDefault.bind(null, record),
  21 + ifShow: !record.default,
21 22 },
22 23 {
23 24 label: '编辑',
... ... @@ -32,6 +33,7 @@
32 33 title: '是否确认删除',
33 34 confirm: handleDelete.bind(null, record),
34 35 },
  36 + ifShow: !record.default,
35 37 },
36 38 ]"
37 39 />
... ...
... ... @@ -131,9 +131,10 @@
131 131 }
132 132
133 133 function handleResetPassword(record: Recordable) {
134   - resetPassword(record.id);
135   - createMessage.success('清空密码成功');
136   - handleSuccess();
  134 + resetPassword(record.id).then(() => {
  135 + createMessage.success('清空密码成功');
  136 + handleSuccess();
  137 + });
137 138 }
138 139 function handleSendMsg(record: Recordable) {
139 140 const req = new SendResetPasswordEmailMsg(record.id, MessageTypeEnum.PHONE_MESSAGE);
... ...