Commit 20e86003df4e0bcd30c763973c22b18c4c3ee1d3
Merge branch 'ww' into 'main'
fix: rule data flow carry params incorrect See merge request huang/yun-teng-iot-front!474
Showing
16 changed files
with
169 additions
and
39 deletions
@@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
5 | <meta charset="UTF-8" /> | 5 | <meta charset="UTF-8" /> |
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
7 | <meta name="renderer" content="webkit" /> | 7 | <meta name="renderer" content="webkit" /> |
8 | + <meta name="keywords" content="Thingskit 物联网平台" /> | ||
9 | + <meta name="description" content="Thingskit 物联网平台" /> | ||
8 | <meta http-equiv="Expires" content="0" /> | 10 | <meta http-equiv="Expires" content="0" /> |
9 | <meta http-equiv="Cache-control" content="no-cache" /> | 11 | <meta http-equiv="Cache-control" content="no-cache" /> |
10 | <meta http-equiv="Cache" content="no-cache" /> | 12 | <meta http-equiv="Cache" content="no-cache" /> |
@@ -168,6 +168,7 @@ export interface DeviceRecord { | @@ -168,6 +168,7 @@ export interface DeviceRecord { | ||
168 | provisionType: string; | 168 | provisionType: string; |
169 | deviceType: string; | 169 | deviceType: string; |
170 | deviceCount: number; | 170 | deviceCount: number; |
171 | + tbDeviceId: string; | ||
171 | tbProfileId: string; | 172 | tbProfileId: string; |
172 | profileData: ProfileData; | 173 | profileData: ProfileData; |
173 | defaultQueueName: string; | 174 | defaultQueueName: string; |
@@ -307,6 +307,7 @@ | @@ -307,6 +307,7 @@ | ||
307 | if (keys === Active.PENDING) { | 307 | if (keys === Active.PENDING) { |
308 | reloadPending(); | 308 | reloadPending(); |
309 | } else { | 309 | } else { |
310 | + reloadSelected(); | ||
310 | setProps({ | 311 | setProps({ |
311 | dataSource: unref(selectedRows), | 312 | dataSource: unref(selectedRows), |
312 | }); | 313 | }); |
@@ -319,6 +320,8 @@ | @@ -319,6 +320,8 @@ | ||
319 | if (props.value && !props.value.length) { | 320 | if (props.value && !props.value.length) { |
320 | selectedRowKeys.value = []; | 321 | selectedRowKeys.value = []; |
321 | selectedRows.value = []; | 322 | selectedRows.value = []; |
323 | + pendingTotal.value = 0; | ||
324 | + selectedTotal.value = 0; | ||
322 | } | 325 | } |
323 | } | 326 | } |
324 | ); | 327 | ); |
1 | +<script lang="ts" setup> | ||
2 | + import { h } from 'vue'; | ||
3 | + import { Description, useDescription } from '/@/components/Description'; | ||
4 | + import { BasicModal, useModal } from '/@/components/Modal'; | ||
5 | + | ||
6 | + const [register] = useModal(); | ||
7 | + | ||
8 | + const [registerDes] = useDescription({ | ||
9 | + bordered: false, | ||
10 | + column: 1, | ||
11 | + labelStyle: { | ||
12 | + width: '100px', | ||
13 | + textAlign: 'right', | ||
14 | + justifyContent: 'right', | ||
15 | + paddingRight: '20px', | ||
16 | + }, | ||
17 | + data: { | ||
18 | + copyright: | ||
19 | + 'ThingsKit物联网平台版权归成都云腾五洲科技有限公司所有,您可以任意商用,但请注意保留本版权声明', | ||
20 | + website: 'https://thingskit.com', | ||
21 | + authorization: '若不想保留本版权声明,请前往以下链接查看移出方法,', | ||
22 | + }, | ||
23 | + schema: [ | ||
24 | + { | ||
25 | + field: 'copyright', | ||
26 | + label: '版权声明', | ||
27 | + }, | ||
28 | + { | ||
29 | + field: 'website', | ||
30 | + label: '官网', | ||
31 | + render: (val: string) => { | ||
32 | + return h( | ||
33 | + 'span', | ||
34 | + { class: 'text-blue-500 cursor-pointer', onClick: () => open(val) }, | ||
35 | + val | ||
36 | + ); | ||
37 | + }, | ||
38 | + }, | ||
39 | + { | ||
40 | + field: 'authorization', | ||
41 | + label: '商业授权', | ||
42 | + render: (val: string) => { | ||
43 | + console.log(val); | ||
44 | + // https://community.thingskit.com/question/20.html | ||
45 | + return h('div', {}, [ | ||
46 | + h('span', val), | ||
47 | + h( | ||
48 | + 'span', | ||
49 | + { | ||
50 | + class: 'text-blue-500 cursor-pointer', | ||
51 | + onClick: () => open('https://community.thingskit.com/question/20.html'), | ||
52 | + }, | ||
53 | + '点击前往' | ||
54 | + ), | ||
55 | + ]); | ||
56 | + }, | ||
57 | + }, | ||
58 | + ], | ||
59 | + }); | ||
60 | +</script> | ||
61 | + | ||
62 | +<template> | ||
63 | + <BasicModal | ||
64 | + @register="register" | ||
65 | + title="关于我们" | ||
66 | + width="50%" | ||
67 | + cancel-text="关闭" | ||
68 | + :show-ok-btn="false" | ||
69 | + > | ||
70 | + <Description @register="registerDes" /> | ||
71 | + </BasicModal> | ||
72 | +</template> |
1 | +<script lang="ts" setup> | ||
2 | + import { QuestionCircleOutlined } from '@ant-design/icons-vue'; | ||
3 | + import { Tooltip } from 'ant-design-vue'; | ||
4 | + | ||
5 | + const handleJump = () => { | ||
6 | + open('https://docs.thingskit.com'); | ||
7 | + }; | ||
8 | +</script> | ||
9 | + | ||
10 | +<template> | ||
11 | + <Tooltip title="帮助文档"> | ||
12 | + <QuestionCircleOutlined class="text-base cursor-pointer" @click="handleJump" /> | ||
13 | + </Tooltip> | ||
14 | +</template> |
@@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
37 | :text="t('layout.header.dropdownItemChangePassword')" | 37 | :text="t('layout.header.dropdownItemChangePassword')" |
38 | icon="ant-design:unlock-twotone" | 38 | icon="ant-design:unlock-twotone" |
39 | /> | 39 | /> |
40 | + <MenuItem key="aboutSoftware" text="关于软件" icon="ant-design:message-outline" /> | ||
40 | <MenuItem | 41 | <MenuItem |
41 | v-if="getUseLockPage" | 42 | v-if="getUseLockPage" |
42 | key="lock" | 43 | key="lock" |
@@ -57,6 +58,7 @@ | @@ -57,6 +58,7 @@ | ||
57 | ref="personalRef" | 58 | ref="personalRef" |
58 | @register="registerPersonal" | 59 | @register="registerPersonal" |
59 | /> | 60 | /> |
61 | + <AboutSoftwareModal @register="registerModal" /> | ||
60 | </template> | 62 | </template> |
61 | <script lang="ts"> | 63 | <script lang="ts"> |
62 | // components | 64 | // components |
@@ -74,8 +76,9 @@ | @@ -74,8 +76,9 @@ | ||
74 | import { getAuthCache } from '/@/utils/auth'; | 76 | import { getAuthCache } from '/@/utils/auth'; |
75 | import { useRouter } from 'vue-router'; | 77 | import { useRouter } from 'vue-router'; |
76 | import { usePermission } from '/@/hooks/web/usePermission'; | 78 | import { usePermission } from '/@/hooks/web/usePermission'; |
79 | + import AboutSoftwareModal from '../AboutSoftwareModal.vue'; | ||
77 | 80 | ||
78 | - type MenuEvent = 'logout' | 'doc' | 'lock' | 'personal' | 'changePassword'; | 81 | + type MenuEvent = 'logout' | 'doc' | 'lock' | 'personal' | 'changePassword' | 'aboutSoftware'; |
79 | 82 | ||
80 | export default defineComponent({ | 83 | export default defineComponent({ |
81 | name: 'UserDropdown', | 84 | name: 'UserDropdown', |
@@ -85,6 +88,7 @@ | @@ -85,6 +88,7 @@ | ||
85 | MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), | 88 | MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), |
86 | LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')), | 89 | LockAction: createAsyncComponent(() => import('../lock/LockModal.vue')), |
87 | PersonalChild: createAsyncComponent(() => import('../personal/index.vue')), | 90 | PersonalChild: createAsyncComponent(() => import('../personal/index.vue')), |
91 | + AboutSoftwareModal, | ||
88 | }, | 92 | }, |
89 | props: { | 93 | props: { |
90 | theme: propTypes.oneOf(['dark', 'light']), | 94 | theme: propTypes.oneOf(['dark', 'light']), |
@@ -120,6 +124,11 @@ | @@ -120,6 +124,11 @@ | ||
120 | openModal(true); | 124 | openModal(true); |
121 | } | 125 | } |
122 | 126 | ||
127 | + const [registerModal, { openModal: openAboutSoftwareModal }] = useModal(); | ||
128 | + function handleOpenAboutSoftwareModal() { | ||
129 | + openAboutSoftwareModal(); | ||
130 | + } | ||
131 | + | ||
123 | // login out | 132 | // login out |
124 | function handleLoginOut() { | 133 | function handleLoginOut() { |
125 | userStore.confirmLoginOut(); | 134 | userStore.confirmLoginOut(); |
@@ -138,6 +147,8 @@ | @@ -138,6 +147,8 @@ | ||
138 | case 'changePassword': | 147 | case 'changePassword': |
139 | changePassword(); | 148 | changePassword(); |
140 | break; | 149 | break; |
150 | + case 'aboutSoftware': | ||
151 | + handleOpenAboutSoftwareModal(); | ||
141 | } | 152 | } |
142 | } | 153 | } |
143 | 154 | ||
@@ -180,6 +191,7 @@ | @@ -180,6 +191,7 @@ | ||
180 | register, | 191 | register, |
181 | getUseLockPage, | 192 | getUseLockPage, |
182 | hasPermission, | 193 | hasPermission, |
194 | + registerModal, | ||
183 | }; | 195 | }; |
184 | }, | 196 | }, |
185 | }); | 197 | }); |
@@ -39,6 +39,8 @@ | @@ -39,6 +39,8 @@ | ||
39 | 39 | ||
40 | <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> | 40 | <Notify v-if="getShowNotice" :class="`${prefixCls}-action__item notify-item`" /> |
41 | 41 | ||
42 | + <HelpDoc /> | ||
43 | + | ||
42 | <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" /> | 44 | <FullScreen v-if="getShowFullScreen" :class="`${prefixCls}-action__item fullscreen-item`" /> |
43 | 45 | ||
44 | <AppLocalePicker | 46 | <AppLocalePicker |
@@ -75,6 +77,7 @@ | @@ -75,6 +77,7 @@ | ||
75 | 77 | ||
76 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | 78 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; |
77 | import { useLocale } from '/@/locales/useLocale'; | 79 | import { useLocale } from '/@/locales/useLocale'; |
80 | + import HelpDoc from './components/HelpDoc.vue'; | ||
78 | 81 | ||
79 | export default defineComponent({ | 82 | export default defineComponent({ |
80 | name: 'LayoutHeader', | 83 | name: 'LayoutHeader', |
@@ -92,6 +95,7 @@ | @@ -92,6 +95,7 @@ | ||
92 | SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), { | 95 | SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), { |
93 | loading: true, | 96 | loading: true, |
94 | }), | 97 | }), |
98 | + HelpDoc, | ||
95 | }, | 99 | }, |
96 | props: { | 100 | props: { |
97 | fixed: propTypes.bool, | 101 | fixed: propTypes.bool, |
@@ -196,26 +196,25 @@ | @@ -196,26 +196,25 @@ | ||
196 | const dataSource = ref([]); | 196 | const dataSource = ref([]); |
197 | const go = useGo(); | 197 | const go = useGo(); |
198 | const helpDoc = ref([ | 198 | const helpDoc = ref([ |
199 | - { | ||
200 | - title: '如何接入设备?', | ||
201 | - href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E5%88%97%E8%A1%A8', | ||
202 | - target: '_blank ', | ||
203 | - }, | ||
204 | - { | ||
205 | - title: '什么是产品?', | ||
206 | - href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E9%85%8D%E7%BD%AE', | ||
207 | - target: '_blank ', | ||
208 | - }, | ||
209 | - { | ||
210 | - title: '云组态模板如何使用?', | ||
211 | - href: 'https://docs.thingskit.com/', | ||
212 | - target: '_blank ', | ||
213 | - }, | ||
214 | - { | ||
215 | - title: '查看全部>>', | ||
216 | - href: 'https://docs.thingskit.com/', | ||
217 | - target: '_blank ', | ||
218 | - }, | 199 | + // title: '如何接入设备?', |
200 | + // href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E5%88%97%E8%A1%A8', | ||
201 | + // target: '_blank ', | ||
202 | + // }, | ||
203 | + // { | ||
204 | + // title: '什么是产品?', | ||
205 | + // href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E9%85%8D%E7%BD%AE', | ||
206 | + // target: '_blank ', | ||
207 | + // }, | ||
208 | + // { | ||
209 | + // title: '云组态模板如何使用?', | ||
210 | + // href: 'https://docs.thingskit.com/', | ||
211 | + // target: '_blank ', | ||
212 | + // }, | ||
213 | + // { | ||
214 | + // title: '查看全部>>', | ||
215 | + // href: 'https://docs.thingskit.com/', | ||
216 | + // target: '_blank ', | ||
217 | + // }, | ||
219 | ]); | 218 | ]); |
220 | const activeKey = ref('tab1'); | 219 | const activeKey = ref('tab1'); |
221 | const tabListTitle = [ | 220 | const tabListTitle = [ |
1 | <template> | 1 | <template> |
2 | <div class="p-4 md:flex"> | 2 | <div class="p-4 md:flex"> |
3 | - <div class="md:w-7/10 w-full !mr-4 enter-y"> | 3 | + <div |
4 | + class="md:w-7/10 w-full !mr-4 enter-y" | ||
5 | + :class="role !== RoleEnum.SYS_ADMIN && '!md:w-full !mr-0'" | ||
6 | + > | ||
4 | <GrowCard :loading="loading" class="enter-y" :role="role" /> | 7 | <GrowCard :loading="loading" class="enter-y" :role="role" /> |
5 | <SiteAnalysisMessage class="!my-4 enter-y" :loading="loading" :role="role" /> | 8 | <SiteAnalysisMessage class="!my-4 enter-y" :loading="loading" :role="role" /> |
6 | <SiteAnalysis class="!my-4 enter-y" :loading="loading" :role="role" /> | 9 | <SiteAnalysis class="!my-4 enter-y" :loading="loading" :role="role" /> |
@@ -10,7 +13,7 @@ | @@ -10,7 +13,7 @@ | ||
10 | </Card> | 13 | </Card> |
11 | </div> | 14 | </div> |
12 | </div> | 15 | </div> |
13 | - <div class="md:w-3/10 w-full enter-y"> | 16 | + <div v-if="role === RoleEnum.SYS_ADMIN" class="md:w-3/10 w-full enter-y"> |
14 | <Card | 17 | <Card |
15 | :style="{ width: '100%', height: !isAdmin(role) ? '100%' : '98.4%' }" | 18 | :style="{ width: '100%', height: !isAdmin(role) ? '100%' : '98.4%' }" |
16 | :title="!isAdmin(role) ? '帮助文档' : ''" | 19 | :title="!isAdmin(role) ? '帮助文档' : ''" |
@@ -29,7 +32,7 @@ | @@ -29,7 +32,7 @@ | ||
29 | import HelpDoc from './components/HelpDoc.vue'; | 32 | import HelpDoc from './components/HelpDoc.vue'; |
30 | import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | 33 | import { USER_INFO_KEY } from '/@/enums/cacheEnum'; |
31 | import { getAuthCache } from '/@/utils/auth'; | 34 | import { getAuthCache } from '/@/utils/auth'; |
32 | - import { isAdmin } from '/@/enums/roleEnum'; | 35 | + import { isAdmin, RoleEnum } from '/@/enums/roleEnum'; |
33 | 36 | ||
34 | defineExpose({ | 37 | defineExpose({ |
35 | isAdmin, | 38 | isAdmin, |
@@ -39,6 +42,8 @@ | @@ -39,6 +42,8 @@ | ||
39 | 42 | ||
40 | const role: string = userInfo?.roles[0]; | 43 | const role: string = userInfo?.roles[0]; |
41 | 44 | ||
45 | + console.log({ role }); | ||
46 | + | ||
42 | const loading = ref(true); | 47 | const loading = ref(true); |
43 | 48 | ||
44 | setTimeout(() => { | 49 | setTimeout(() => { |
@@ -278,6 +278,7 @@ | @@ -278,6 +278,7 @@ | ||
278 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { | 278 | if (isApiHeaders && Object.values(isApiHeaders).includes('')) { |
279 | return createMessage.error('请填写属性'); | 279 | return createMessage.error('请填写属性'); |
280 | } | 280 | } |
281 | + Object.assign(allPostForm, { clientProperties: {} }); | ||
281 | const res = await postAddConvertApi(allPostForm); | 282 | const res = await postAddConvertApi(allPostForm); |
282 | if (res) { | 283 | if (res) { |
283 | closeModalAfterSuccess && closeModal(); | 284 | closeModalAfterSuccess && closeModal(); |
@@ -303,6 +304,7 @@ | @@ -303,6 +304,7 @@ | ||
303 | } | 304 | } |
304 | } | 305 | } |
305 | Object.assign(noEditObj, getTypeObj, { | 306 | Object.assign(noEditObj, getTypeObj, { |
307 | + clientProperties: {}, | ||
306 | datasourceType: allPostForm.datasourceType, | 308 | datasourceType: allPostForm.datasourceType, |
307 | datasourceContent: allPostForm.datasourceContent, | 309 | datasourceContent: allPostForm.datasourceContent, |
308 | }); | 310 | }); |
@@ -64,9 +64,9 @@ const handleGroupDevice = (options: DeviceRecord[]) => { | @@ -64,9 +64,9 @@ const handleGroupDevice = (options: DeviceRecord[]) => { | ||
64 | options.forEach((item) => { | 64 | options.forEach((item) => { |
65 | if (map.has(item.profileId)) { | 65 | if (map.has(item.profileId)) { |
66 | const deviceList = map.get(item.profileId)!; | 66 | const deviceList = map.get(item.profileId)!; |
67 | - deviceList.push(item.id); | 67 | + deviceList.push(item.tbDeviceId); |
68 | } else { | 68 | } else { |
69 | - map.set(item.profileId, [item.id]); | 69 | + map.set(item.profileId, [item.tbDeviceId]); |
70 | } | 70 | } |
71 | }); | 71 | }); |
72 | const value = Array.from(map.entries()).map(([product, devices]) => ({ product, devices })); | 72 | const value = Array.from(map.entries()).map(([product, devices]) => ({ product, devices })); |
@@ -230,7 +230,8 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | @@ -230,7 +230,8 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | ||
230 | 230 | ||
231 | return { | 231 | return { |
232 | labelField: 'name', | 232 | labelField: 'name', |
233 | - valueField: 'id', | 233 | + valueField: 'tbDeviceId', |
234 | + primaryKey: 'tbDeviceId', | ||
234 | pendingTableProps: { | 235 | pendingTableProps: { |
235 | ...TransferTableProps, | 236 | ...TransferTableProps, |
236 | api: devicePage, | 237 | api: devicePage, |
@@ -261,12 +262,14 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | @@ -261,12 +262,14 @@ export const modeForm = (submitFn?: Function): FormSchema[] => { | ||
261 | initSelectedOptions: async ({ setSelectedTotal }) => { | 262 | initSelectedOptions: async ({ setSelectedTotal }) => { |
262 | const values = getFieldsValue(); | 263 | const values = getFieldsValue(); |
263 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); | 264 | const convertConfigId = Reflect.get(values, BasicInfoFormField.CONVERT_CONFIG_ID); |
265 | + const deviceProfileIds = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_PRODUCT); | ||
264 | const devices = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_DEVICE); | 266 | const devices = Reflect.get(values, BasicInfoFormField.DATA_SOURCE_DEVICE); |
265 | if (convertConfigId && devices) { | 267 | if (convertConfigId && devices) { |
266 | const { items, total } = await devicePage({ | 268 | const { items, total } = await devicePage({ |
267 | page: 1, | 269 | page: 1, |
268 | pageSize: 10, | 270 | pageSize: 10, |
269 | convertConfigId: values[BasicInfoFormField.CONVERT_CONFIG_ID], | 271 | convertConfigId: values[BasicInfoFormField.CONVERT_CONFIG_ID], |
272 | + deviceProfileIds, | ||
270 | selected: true, | 273 | selected: true, |
271 | }); | 274 | }); |
272 | setSelectedTotal(total); | 275 | setSelectedTotal(total); |
@@ -69,10 +69,11 @@ | @@ -69,10 +69,11 @@ | ||
69 | ...record, | 69 | ...record, |
70 | [BasicInfoFormField.DATA_SOURCE_PRODUCT]: | 70 | [BasicInfoFormField.DATA_SOURCE_PRODUCT]: |
71 | record?.datasourceContent?.convertProducts || [], | 71 | record?.datasourceContent?.convertProducts || [], |
72 | - [BasicInfoFormField.DATA_SOURCE_DEVICE]: | ||
73 | - (record?.datasourceContent?.convertDevices || []).reduce((prev, next) => { | ||
74 | - return [...prev, ...(next?.devices || [])]; | ||
75 | - }, []) || [], | 72 | + [BasicInfoFormField.DATA_SOURCE_DEVICE]: record?.datasourceContent?.convertDevices, |
73 | + // [BasicInfoFormField.DATA_SOURCE_DEVICE]: | ||
74 | + // (record?.datasourceContent?.convertDevices || []).reduce((prev, next) => { | ||
75 | + // return [...prev, ...(next?.devices || [])]; | ||
76 | + // }, []) || [], | ||
76 | }; | 77 | }; |
77 | setFieldsValue(value); | 78 | setFieldsValue(value); |
78 | }; | 79 | }; |
@@ -132,13 +132,13 @@ | @@ -132,13 +132,13 @@ | ||
132 | const provideOrgid = ref(''); | 132 | const provideOrgid = ref(''); |
133 | 133 | ||
134 | const { createMessage } = useMessage(); | 134 | const { createMessage } = useMessage(); |
135 | - const triggerData = ref([]); | ||
136 | - const conditionData = ref([]); | ||
137 | - const actionData = ref([]); | 135 | + const triggerData = ref<number[]>([]); |
136 | + const conditionData = ref<number[]>([]); | ||
137 | + const actionData = ref<number[]>([]); | ||
138 | const skipUnwrap = { | 138 | const skipUnwrap = { |
139 | - triggerItemRefs: ref([]), | ||
140 | - conditionItemRefs: ref([]), | ||
141 | - actionItemRefs: ref([]), | 139 | + triggerItemRefs: ref<InstanceType<typeof TriggerOrCondition>[]>([]), |
140 | + conditionItemRefs: ref<InstanceType<typeof TriggerOrCondition>[]>([]), | ||
141 | + actionItemRefs: ref<InstanceType<typeof Action>[]>([]), | ||
142 | }; | 142 | }; |
143 | const title = computed( | 143 | const title = computed( |
144 | () => `${isUpdate.value === 3 ? '查看' : isUpdate.value ? '编辑' : '新增'}场景联动` | 144 | () => `${isUpdate.value === 3 ? '查看' : isUpdate.value ? '编辑' : '新增'}场景联动` |
@@ -387,6 +387,7 @@ | @@ -387,6 +387,7 @@ | ||
387 | doActions.forEach((action, index) => { | 387 | doActions.forEach((action, index) => { |
388 | nextTick(() => { | 388 | nextTick(() => { |
389 | const selectProductId = ref(''); | 389 | const selectProductId = ref(''); |
390 | + console.log('doActions', unref(skipUnwrap.actionItemRefs)); | ||
390 | // 设置执行动作外层值 | 391 | // 设置执行动作外层值 |
391 | unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({ | 392 | unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({ |
392 | ...action, | 393 | ...action, |
@@ -536,6 +536,7 @@ export const actionSchema: FormSchema[] = [ | @@ -536,6 +536,7 @@ export const actionSchema: FormSchema[] = [ | ||
536 | params: { | 536 | params: { |
537 | dictCode: 'custom_define', | 537 | dictCode: 'custom_define', |
538 | }, | 538 | }, |
539 | + numberToString: true, | ||
539 | getPopupContainer: () => document.body, | 540 | getPopupContainer: () => document.body, |
540 | onChange: () => { | 541 | onChange: () => { |
541 | setFieldsValue({ doContext: null, thingsModelId: null }); | 542 | setFieldsValue({ doContext: null, thingsModelId: null }); |
@@ -81,6 +81,7 @@ | @@ -81,6 +81,7 @@ | ||
81 | 81 | ||
82 | <script lang="ts"> | 82 | <script lang="ts"> |
83 | import { defineComponent } from 'vue'; | 83 | import { defineComponent } from 'vue'; |
84 | + import { isNumber } from '/@/utils/is'; | ||
84 | export default defineComponent({ | 85 | export default defineComponent({ |
85 | components: { | 86 | components: { |
86 | VNodes: (_, { attrs }) => { | 87 | VNodes: (_, { attrs }) => { |
@@ -261,9 +262,13 @@ | @@ -261,9 +262,13 @@ | ||
261 | }; | 262 | }; |
262 | 263 | ||
263 | const setFieldsFormValueFun = (fieldsValue) => { | 264 | const setFieldsFormValueFun = (fieldsValue) => { |
265 | + console.log(getFieldsValue()); | ||
266 | + | ||
264 | setFieldsValue({ | 267 | setFieldsValue({ |
265 | ...fieldsValue, | 268 | ...fieldsValue, |
266 | - ...(fieldsValue.commandType ? { commandType: String(fieldsValue.commandType) } : {}), | 269 | + ...(isNumber(fieldsValue.commandType) |
270 | + ? { commandType: String(fieldsValue.commandType) } | ||
271 | + : {}), | ||
267 | }); | 272 | }); |
268 | }; | 273 | }; |
269 | //ft-add | 274 | //ft-add |
@@ -80,6 +80,7 @@ | @@ -80,6 +80,7 @@ | ||
80 | // import { useUserStore } from '/@/store/modules/user'; | 80 | // import { useUserStore } from '/@/store/modules/user'; |
81 | import { getPlatForm } from '/@/api/oem/index'; | 81 | import { getPlatForm } from '/@/api/oem/index'; |
82 | import defaultShowLogoImg from '/@/assets/svg/login-bg.svg'; | 82 | import defaultShowLogoImg from '/@/assets/svg/login-bg.svg'; |
83 | + import { useTitle } from '@vueuse/core'; | ||
83 | 84 | ||
84 | defineProps({ | 85 | defineProps({ |
85 | sessionTimeout: { | 86 | sessionTimeout: { |
@@ -136,6 +137,10 @@ | @@ -136,6 +137,10 @@ | ||
136 | const localeStore = useLocaleStore(); | 137 | const localeStore = useLocaleStore(); |
137 | const showLocale = localeStore.getShowPicker; | 138 | const showLocale = localeStore.getShowPicker; |
138 | // const title = computed(() => globSetting?.title ?? ''); | 139 | // const title = computed(() => globSetting?.title ?? ''); |
140 | + | ||
141 | + onMounted(() => { | ||
142 | + useTitle('ThingsKit 物联网平台'); | ||
143 | + }); | ||
139 | </script> | 144 | </script> |
140 | <style lang="less"> | 145 | <style lang="less"> |
141 | @prefix-cls: ~'@{namespace}-login'; | 146 | @prefix-cls: ~'@{namespace}-login'; |
@@ -195,7 +200,7 @@ | @@ -195,7 +200,7 @@ | ||
195 | width: 100%; | 200 | width: 100%; |
196 | height: 100%; | 201 | height: 100%; |
197 | margin-left: -48%; | 202 | margin-left: -48%; |
198 | - background-image: v-bind(logoUrl); | 203 | + background-image: v-bind(logourl); |
199 | // background-image: url(/@/assets/svg/login-bg.svg); | 204 | // background-image: url(/@/assets/svg/login-bg.svg); |
200 | background-position: 100%; | 205 | background-position: 100%; |
201 | background-repeat: no-repeat; | 206 | background-repeat: no-repeat; |