Commit 0bdf4fa0d39146ca6dcef00b23a341e53bc62cda
Merge branch 'fix/teambition/10-16/2024' into 'main_dev'
fix: 创建产品时,把默认修改为默认(HTTP、MQTT、COAP) See merge request yunteng/thingskit-front!1511
Showing
5 changed files
with
14 additions
and
15 deletions
@@ -2,7 +2,7 @@ export default { | @@ -2,7 +2,7 @@ export default { | ||
2 | createText: '创建产品', | 2 | createText: '创建产品', |
3 | importText: '导入产品', | 3 | importText: '导入产品', |
4 | exportText: '导出', | 4 | exportText: '导出', |
5 | - defaultText: '默认', | 5 | + defaultText: '默认(HTTP、MQTT、COAP)', |
6 | productListText: '产品列表', | 6 | productListText: '产品列表', |
7 | defaultSettingSuccessText: '设置默认成功', | 7 | defaultSettingSuccessText: '设置默认成功', |
8 | defaultSettingFailedText: '设置默认失败', | 8 | defaultSettingFailedText: '设置默认失败', |
@@ -28,11 +28,11 @@ export default { | @@ -28,11 +28,11 @@ export default { | ||
28 | telemetryDataSubjectFilterText: '遥测数据主题筛选器 ', | 28 | telemetryDataSubjectFilterText: '遥测数据主题筛选器 ', |
29 | attributeTopicFilterText: '属性主题过滤器', | 29 | attributeTopicFilterText: '属性主题过滤器', |
30 | testScriptText: '测试脚本', | 30 | testScriptText: '测试脚本', |
31 | - hexLengthText: 'Hex长度', | 31 | + hexLengthText: 'HEX长度', |
32 | splicePositionText: '截取起止位置', | 32 | splicePositionText: '截取起止位置', |
33 | splicePositionHelpMessageText: '截取示例:"ABCD".substring(0,2) 截取后的值为"AB"', | 33 | splicePositionHelpMessageText: '截取示例:"ABCD".substring(0,2) 截取后的值为"AB"', |
34 | inputSpliceStartPositionText: '请输入截取起止位置', | 34 | inputSpliceStartPositionText: '请输入截取起止位置', |
35 | - splicePositionValidText: '截取起始位置大与截取结束位置', | 35 | + splicePositionValidText: '截取起始位置大于截取结束位置', |
36 | spliceLengthValidText: '截取起止位置大与HEX长度', | 36 | spliceLengthValidText: '截取起止位置大与HEX长度', |
37 | inputStartPositionText: '请输入起始位置', | 37 | inputStartPositionText: '请输入起始位置', |
38 | inputEndPositionText: '请输入截止位置', | 38 | inputEndPositionText: '请输入截止位置', |
@@ -197,7 +197,7 @@ export default { | @@ -197,7 +197,7 @@ export default { | ||
197 | downlinkScriptRuleText: '@:common.chooseText@:deviceManagement.downlinkScriptText', | 197 | downlinkScriptRuleText: '@:common.chooseText@:deviceManagement.downlinkScriptText', |
198 | typeText: '类型', | 198 | typeText: '类型', |
199 | scriptRuleText: '请选择对应的脚本', | 199 | scriptRuleText: '请选择对应的脚本', |
200 | - createCoversionScriptText: '@:common.createText 转换脚本', | 200 | + createCoversionScriptText: '创建转换脚本', |
201 | configurationTypeText: '配置类型', | 201 | configurationTypeText: '配置类型', |
202 | defaultConfigurationText: '默认配置', | 202 | defaultConfigurationText: '默认配置', |
203 | selectCategory: '选择品类', | 203 | selectCategory: '选择品类', |
@@ -6,8 +6,8 @@ export default { | @@ -6,8 +6,8 @@ export default { | ||
6 | fullscreenText: '全屏', | 6 | fullscreenText: '全屏', |
7 | createConfigurationText: '创建视频配置', | 7 | createConfigurationText: '创建视频配置', |
8 | editConfigurationText: '编辑视频配置', | 8 | editConfigurationText: '编辑视频配置', |
9 | - createStreamConfigurationText: '@:common.createText 流媒体配置', | ||
10 | - streamConfigurationPlaceholderText: '@:common.chooseText 流媒体配置', | 9 | + createStreamConfigurationText: '创建流媒体配置', |
10 | + streamConfigurationPlaceholderText: '请选择流媒体配置', | ||
11 | 11 | ||
12 | avatarText: '视频封面', | 12 | avatarText: '视频封面', |
13 | videoNameText: '视频名字', | 13 | videoNameText: '视频名字', |
@@ -446,6 +446,7 @@ export const formSchema: QFormSchema[] = [ | @@ -446,6 +446,7 @@ export const formSchema: QFormSchema[] = [ | ||
446 | ifShow({ values }) { | 446 | ifShow({ values }) { |
447 | return values.accessMode === AccessMode.Streaming; | 447 | return values.accessMode === AccessMode.Streaming; |
448 | }, | 448 | }, |
449 | + required: true, | ||
449 | slot: 'videoPlatformIdSlot', | 450 | slot: 'videoPlatformIdSlot', |
450 | componentProps: {}, | 451 | componentProps: {}, |
451 | }, | 452 | }, |
@@ -130,25 +130,25 @@ | @@ -130,25 +130,25 @@ | ||
130 | { | 130 | { |
131 | label: t('common.sortOperation.isTop'), | 131 | label: t('common.sortOperation.isTop'), |
132 | icon: 'ant-design:vertical-align-top-outlined', | 132 | icon: 'ant-design:vertical-align-top-outlined', |
133 | - ifShow: includeSortIsTop.includes(index) ? false : true, | 133 | + ifShow: index === 0 && includeSortIsTop.includes(record.sort) ? false : true, |
134 | onClick: handleTableSort.bind(null, 'topUp', record), | 134 | onClick: handleTableSort.bind(null, 'topUp', record), |
135 | }, | 135 | }, |
136 | { | 136 | { |
137 | label: t('common.sortOperation.moveUp'), | 137 | label: t('common.sortOperation.moveUp'), |
138 | icon: 'ant-design:up-outlined', | 138 | icon: 'ant-design:up-outlined', |
139 | - ifShow: includeSortIsTop.includes(index) ? false : true, | 139 | + ifShow: index === 0 && includeSortIsTop.includes(record.sort) ? false : true, |
140 | onClick: handleTableSort.bind(null, 'up', record), | 140 | onClick: handleTableSort.bind(null, 'up', record), |
141 | }, | 141 | }, |
142 | { | 142 | { |
143 | label: t('common.sortOperation.moveDown'), | 143 | label: t('common.sortOperation.moveDown'), |
144 | icon: 'ant-design:down-outlined', | 144 | icon: 'ant-design:down-outlined', |
145 | - ifShow: thingsModelListTotal - index <= 1 ? false : true, | 145 | + ifShow: thingsModelListTotal - record.sort <= 1 ? false : true, |
146 | onClick: handleTableSort.bind(null, 'down', record), | 146 | onClick: handleTableSort.bind(null, 'down', record), |
147 | }, | 147 | }, |
148 | { | 148 | { |
149 | label: t('common.sortOperation.isBottom'), | 149 | label: t('common.sortOperation.isBottom'), |
150 | icon: 'ant-design:vertical-align-bottom-outlined', | 150 | icon: 'ant-design:vertical-align-bottom-outlined', |
151 | - ifShow: thingsModelListTotal - index <= 1 ? false : true, | 151 | + ifShow: thingsModelListTotal - record.sort <= 1 ? false : true, |
152 | onClick: handleTableSort.bind(null, 'bottomUp', record), | 152 | onClick: handleTableSort.bind(null, 'bottomUp', record), |
153 | }, | 153 | }, |
154 | ]" | 154 | ]" |
@@ -215,9 +215,7 @@ | @@ -215,9 +215,7 @@ | ||
215 | isCategory: Boolean; | 215 | isCategory: Boolean; |
216 | }>(); | 216 | }>(); |
217 | 217 | ||
218 | - const includeSortIsTop = [0]; | ||
219 | - | ||
220 | - // const includeSortIsBottom = [1]; | 218 | + const includeSortIsTop = [0, 1]; |
221 | 219 | ||
222 | const { createMessage } = useMessage(); | 220 | const { createMessage } = useMessage(); |
223 | const isShowBtn = ref(false); | 221 | const isShowBtn = ref(false); |
@@ -235,7 +233,7 @@ | @@ -235,7 +233,7 @@ | ||
235 | id: props.record.id, | 233 | id: props.record.id, |
236 | selectType: props.record.ifShowClass ? 'category' : undefined, | 234 | selectType: props.record.ifShowClass ? 'category' : undefined, |
237 | }); | 235 | }); |
238 | - thingsModelListTotal.value = res?.total || 0; | 236 | + thingsModelListTotal.value = (res as Recordable)?.total || 0; |
239 | return res; | 237 | return res; |
240 | }, | 238 | }, |
241 | columns: props.record.ifShowClass | 239 | columns: props.record.ifShowClass |
@@ -198,7 +198,7 @@ | @@ -198,7 +198,7 @@ | ||
198 | const newStatus = checked ? 1 : 0; | 198 | const newStatus = checked ? 1 : 0; |
199 | const res = await putSchedueByidAndStatusManage(record.id, newStatus); | 199 | const res = await putSchedueByidAndStatusManage(record.id, newStatus); |
200 | if (res && newStatus) { | 200 | if (res && newStatus) { |
201 | - createMessage.success(t('common.enableSuccessOkText')); | 201 | + createMessage.success(t('common.enabledSuccessOkText')); |
202 | } else { | 202 | } else { |
203 | createMessage.success(t('common.disabledSuccessOkText')); | 203 | createMessage.success(t('common.disabledSuccessOkText')); |
204 | } | 204 | } |