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