Commit 355a19bbf93342808cf450ce8ac6533c435e59e4
Merge branch 'fix/DEFECT-1638' into 'main_dev'
fix: 修改租户配置筛选无效 tcp网关子设备命令类型选择 See merge request yunteng/thingskit-front!918
Showing
6 changed files
with
10 additions
and
17 deletions
... | ... | @@ -174,8 +174,7 @@ |
174 | 174 | const handleFilterOption = async (inputValue: string, option: Recordable) => { |
175 | 175 | const { filterOption, fetchSearch } = props; |
176 | 176 | if (filterOption && isFunction(filterOption)) { |
177 | - filterOption?.(inputValue, option); | |
178 | - return; | |
177 | + return filterOption?.(inputValue, option); | |
179 | 178 | } |
180 | 179 | |
181 | 180 | if (fetchSearch) { |
... | ... | @@ -189,8 +188,9 @@ |
189 | 188 | @dropdownVisibleChange="handleFetch" |
190 | 189 | v-bind="attrs" |
191 | 190 | @change="handleChange" |
191 | + @filterOption="handleFilterOption" | |
192 | 192 | :options="getOptions" |
193 | - :filterOption="handleFilterOption" | |
193 | + optionFilterProp="label" | |
194 | 194 | :showSearch="true" |
195 | 195 | v-model:value="state" |
196 | 196 | @popup-scroll="debounceHandlePopupScroll" | ... | ... |
... | ... | @@ -30,11 +30,6 @@ |
30 | 30 | icon: 'ant-design:eye-outlined', |
31 | 31 | onClick: handleView.bind(null, record), |
32 | 32 | }, |
33 | - // { | |
34 | - // label: '详情', | |
35 | - // icon: 'ant-design:field-time-outlined', | |
36 | - // onClick: handleDetail.bind(null, record), | |
37 | - // }, | |
38 | 33 | { |
39 | 34 | label: '编辑', |
40 | 35 | icon: 'clarity:note-edit-line', |
... | ... | @@ -103,9 +98,6 @@ |
103 | 98 | import { useRouter } from 'vue-router'; |
104 | 99 | import { ref } from 'vue'; |
105 | 100 | import { isObject } from '/@/utils/is'; |
106 | - // import { ChainDetailDrawer } from './chainDetail/index'; | |
107 | - // import { useDrawer } from '/@/components/Drawer'; | |
108 | - | |
109 | 101 | const [registerModal, { openModal }] = useModal(); |
110 | 102 | const { createMessage } = useMessage(); |
111 | 103 | const { hasPermission } = usePermission(); | ... | ... |
... | ... | @@ -293,12 +293,13 @@ export const commonDataSourceSchemas = (): FormSchema[] => { |
293 | 293 | (item) => item.itemValue == CommandTypeEnum.ATTRIBUTE.toString() |
294 | 294 | ); |
295 | 295 | } |
296 | - | |
297 | 296 | // TCP网关子 --> 不能要服务命令类型 |
298 | 297 | if (deviceType == 'SENSOR' && transportType == 'TCP') { |
299 | - return record.filter( | |
300 | - (item) => item.itemValue == CommandTypeEnum.ATTRIBUTE.toString() | |
301 | - ); | |
298 | + return codeType == 'MODBUS_RTU' | |
299 | + ? record.filter((item) => item.itemValue == CommandTypeEnum.ATTRIBUTE.toString()) | |
300 | + : codeType == 'CUSTOM' | |
301 | + ? record.filter((item) => item.itemValue == CommandTypeEnum.CUSTOM.toString()) | |
302 | + : []; | |
302 | 303 | } |
303 | 304 | |
304 | 305 | if (codeType == TaskTypeEnum.MODBUS_RTU) { | ... | ... |