Commit 612086218645dda1174cadb349d66d10c4a7f031
1 parent
ad6bb0b4
feat:修复没分配首页权限显示404,秋云修复修改密码,wip:设配配置搜集三个子弹窗的数据
Showing
25 changed files
with
731 additions
and
370 deletions
... | ... | @@ -6,7 +6,8 @@ VITE_PUBLIC_PATH = / |
6 | 6 | |
7 | 7 | # Cross-domain proxy, you can configure multiple |
8 | 8 | # Please note that no line breaks |
9 | -VITE_PROXY = [["/api","http://192.168.10.117:8082/api"],["/upload","http://192.168.10.116:3300/upload"]] | |
9 | +# VITE_PROXY = [["/api","http://192.168.10.118:8080/api"],["/upload","http://192.168.10.116:3300/upload"]] | |
10 | +VITE_PROXY = [["/api","http://101.133.234.90:8080/api"],["/upload","http://192.168.10.116:3300/upload"]] | |
10 | 11 | # VITE_PROXY=[["/api","https://vvbin.cn/test"]] |
11 | 12 | |
12 | 13 | # Delete console |
... | ... | @@ -19,4 +20,4 @@ VITE_GLOB_API_URL=/api |
19 | 20 | VITE_GLOB_UPLOAD_URL=/upload |
20 | 21 | |
21 | 22 | # Interface prefix |
22 | -VITE_GLOB_API_URL_PREFIX=/v1 | |
23 | +VITE_GLOB_API_URL_PREFIX=/yt | ... | ... |
... | ... | @@ -71,7 +71,9 @@ export const notifyAddLeaseApi = (params: NotifyAddreLeaseModel) => { |
71 | 71 | export const notifyDeleteApi = (ids: string[]) => { |
72 | 72 | return defHttp.delete({ |
73 | 73 | url: NotifyManagerApi.NOTICE_DELETE_URL, |
74 | - data: ids, | |
74 | + data: { | |
75 | + ids, | |
76 | + }, | |
75 | 77 | }); |
76 | 78 | }; |
77 | 79 | ... | ... |
1 | -// import { getMenuList } from '/@/api/sys/menu'; | |
2 | -// import { reactive } from 'vue'; | |
3 | - | |
4 | -// const isDolang = reactive({ | |
5 | -// key: 1, | |
6 | -// value: '', | |
7 | -// }); | |
8 | -// //这里判断是否含有首页 | |
9 | -// async function doMenu() { | |
10 | -// const routeList = await getMenuList(); | |
11 | -// const getHomePage = routeList.find((f) => { | |
12 | -// return f.path == '/dashboard'; | |
13 | -// }); | |
14 | -// if (getHomePage?.path == '/dashboard') { | |
15 | -// // router.push('/dashboard'); | |
16 | -// } else { | |
17 | -// const route = routeList[0].path + ''; | |
18 | -// isDolang.key = 1; | |
19 | -// isDolang.value = route; | |
20 | -// return isDolang; | |
21 | -// // router.push(route); | |
22 | -// } | |
23 | -// } | |
24 | - | |
25 | -// setTimeout(() => { | |
26 | -// doMenu(); | |
27 | -// }, 1000); | |
28 | - | |
29 | -// console.log(isDolang.value); | |
30 | -// console.log(typeof isDolang.value); | |
31 | - | |
32 | -// setTimeout(() => { | |
33 | -// console.log(isDolang); | |
34 | -// }, 1500); | |
35 | -const firstMenu = '/system/account'; | |
36 | - | |
37 | 1 | export const PageEnum = { |
38 | 2 | // basic login path |
39 | 3 | BASE_LOGIN: '/login', |
40 | 4 | // basic home path |
41 | - BASE_HOME: firstMenu, | |
42 | - // BASE_HOME = '/dashboard', | |
5 | + // BASE_HOME: isDolang.value == '/dashboard/workbench' ? '/dashboard/workbench' : isDolang.value, | |
6 | + BASE_HOME: '/dashboard/workbench', | |
43 | 7 | // error page path |
44 | 8 | ERROR_PAGE: '/exception', |
45 | 9 | // error log page path | ... | ... |
... | ... | @@ -21,11 +21,29 @@ |
21 | 21 | </transition> |
22 | 22 | </template> |
23 | 23 | </RouterView> |
24 | + <BasicModal | |
25 | + @register="register" | |
26 | + v-bind="$attrs" | |
27 | + :mask="true" | |
28 | + :showCancelBtn="false" | |
29 | + :showOkBtn="false" | |
30 | + :canFullscreen="false" | |
31 | + :closable="false" | |
32 | + :maskStyle="maskColor" | |
33 | + :height="600" | |
34 | + :width="1500" | |
35 | + :maskClosable="false" | |
36 | + title="请您修改初始密码" | |
37 | + :helpMessage="['请您修改初始密码']" | |
38 | + > | |
39 | + <PasswordDialog /> | |
40 | + </BasicModal> | |
24 | 41 | <FrameLayout v-if="getCanEmbedIFramePage" /> |
25 | 42 | </template> |
26 | 43 | |
27 | 44 | <script lang="ts"> |
28 | - import { computed, defineComponent, unref } from 'vue'; | |
45 | + import { computed, defineComponent, ref, unref, onMounted } from 'vue'; | |
46 | + import PasswordDialog from '/@/views/system/password/index.vue'; | |
29 | 47 | |
30 | 48 | import FrameLayout from '/@/layouts/iframe/index.vue'; |
31 | 49 | |
... | ... | @@ -36,10 +54,12 @@ |
36 | 54 | import { getTransitionName } from './transition'; |
37 | 55 | |
38 | 56 | import { useMultipleTabStore } from '/@/store/modules/multipleTab'; |
39 | - | |
57 | + import { BasicModal, useModal } from '/@/components/Modal'; | |
58 | + import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | |
59 | + import { getAuthCache } from '/@/utils/auth'; | |
40 | 60 | export default defineComponent({ |
41 | 61 | name: 'PageLayout', |
42 | - components: { FrameLayout }, | |
62 | + components: { FrameLayout, BasicModal, PasswordDialog }, | |
43 | 63 | setup() { |
44 | 64 | const { getShowMultipleTab } = useMultipleTabSetting(); |
45 | 65 | const tabStore = useMultipleTabStore(); |
... | ... | @@ -57,6 +77,17 @@ |
57 | 77 | return tabStore.getCachedTabList; |
58 | 78 | }); |
59 | 79 | |
80 | + const [register, { openModal }] = useModal(); | |
81 | + const maskColor = ref({ backgroundColor: 'grey' }); | |
82 | + const statusModel = ref(false); | |
83 | + onMounted(() => { | |
84 | + const userInfo = getAuthCache(USER_INFO_KEY); | |
85 | + if (userInfo.needSetPwd == true) { | |
86 | + statusModel.value = true; | |
87 | + openModal(statusModel.value); | |
88 | + } | |
89 | + }); | |
90 | + | |
60 | 91 | return { |
61 | 92 | getTransitionName, |
62 | 93 | openCache, |
... | ... | @@ -64,6 +95,8 @@ |
64 | 95 | getBasicTransition, |
65 | 96 | getCaches, |
66 | 97 | getCanEmbedIFramePage, |
98 | + register, | |
99 | + maskColor, | |
67 | 100 | }; |
68 | 101 | }, |
69 | 102 | }); | ... | ... |
... | ... | @@ -9,6 +9,9 @@ import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; |
9 | 9 | |
10 | 10 | import { RootRoute } from '/@/router/routes'; |
11 | 11 | |
12 | +import { router } from '/@/router'; | |
13 | +import { getMenuList } from '/@/api/sys/menu'; | |
14 | + | |
12 | 15 | const LOGIN_PATH = PageEnum.BASE_LOGIN; |
13 | 16 | |
14 | 17 | const ROOT_PATH = RootRoute.path; |
... | ... | @@ -25,6 +28,7 @@ export function createPermissionGuard(router: Router) { |
25 | 28 | userStore.getUserInfo.homePath && |
26 | 29 | userStore.getUserInfo.homePath !== PageEnum.BASE_HOME |
27 | 30 | ) { |
31 | + console.log('根路径'); | |
28 | 32 | next(userStore.getUserInfo.homePath); |
29 | 33 | return; |
30 | 34 | } |
... | ... | @@ -60,12 +64,43 @@ export function createPermissionGuard(router: Router) { |
60 | 64 | return; |
61 | 65 | } |
62 | 66 | |
63 | - // Jump to the 404 page after processing the login | |
67 | + // if (from.path === LOGIN_PATH) { | |
68 | + // console.log('登录过后'); | |
69 | + // router.push('/system/password'); | |
70 | + // } else { | |
71 | + // // return; | |
72 | + // } | |
64 | 73 | if ( |
65 | 74 | from.path === LOGIN_PATH && |
66 | 75 | to.name === PAGE_NOT_FOUND_ROUTE.name && |
67 | 76 | to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME) |
68 | 77 | ) { |
78 | + // Jump to the 404 page after processing the login | |
79 | + console.log(router); | |
80 | + getMenuList().then((res) => { | |
81 | + if (res) { | |
82 | + console.log(res); | |
83 | + const getHomePage = res.find((f) => { | |
84 | + return f.path == '/dashboard/workbench'; | |
85 | + }); | |
86 | + if (getHomePage?.path == '/dashboard/workbench') { | |
87 | + setTimeout(() => { | |
88 | + router.push('/stationnotification/notificationmanager'); | |
89 | + }, 10); | |
90 | + } else { | |
91 | + const routeF = res[0]?.children[0]?.path || res[0].path; | |
92 | + router.push(routeF); | |
93 | + } | |
94 | + } | |
95 | + }); | |
96 | + | |
97 | + // if (getHomePage?.path == '/dashboard/workbench') { | |
98 | + // isDolang.value = '/dashboard/workbench'; | |
99 | + // } else { | |
100 | + // const route = routeList[0].path + ''; | |
101 | + // isDolang.key = 1; | |
102 | + // isDolang.value = route; | |
103 | + // } | |
69 | 104 | next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME); |
70 | 105 | return; |
71 | 106 | } | ... | ... |
... | ... | @@ -21,7 +21,10 @@ export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList]; |
21 | 21 | export const RootRoute: AppRouteRecordRaw = { |
22 | 22 | path: '/', |
23 | 23 | name: 'Root', |
24 | + // redirect: '/', | |
24 | 25 | redirect: PageEnum.BASE_HOME, |
26 | + // redirect: !PageEnum.BASE_HOME ? '/dashboard' : PageEnum.BASE_HOME, | |
27 | + // redirect: '/dashboard', | |
25 | 28 | meta: { |
26 | 29 | title: 'Root', |
27 | 30 | }, | ... | ... |
1 | -import type { AppRouteModule } from '/@/router/types'; | |
1 | +// import type { AppRouteModule } from '/@/router/types'; | |
2 | 2 | |
3 | -import { LAYOUT } from '/@/router/constant'; | |
4 | -import { t } from '/@/hooks/web/useI18n'; | |
3 | +// import { LAYOUT } from '/@/router/constant'; | |
4 | +// import { t } from '/@/hooks/web/useI18n'; | |
5 | 5 | |
6 | -const dashboard: AppRouteModule = { | |
7 | - path: '/about', | |
8 | - name: 'About', | |
9 | - component: LAYOUT, | |
10 | - redirect: '/about/index', | |
11 | - meta: { | |
12 | - hideChildrenInMenu: true, | |
13 | - icon: 'simple-icons:about-dot-me', | |
14 | - title: t('routes.dashboard.about'), | |
15 | - orderNo: 100000, | |
16 | - }, | |
17 | - children: [ | |
18 | - { | |
19 | - path: 'index', | |
20 | - name: 'AboutPage', | |
21 | - component: () => import('/@/views/sys/about/index.vue'), | |
22 | - meta: { | |
23 | - title: t('routes.dashboard.about'), | |
24 | - icon: 'simple-icons:about-dot-me', | |
25 | - hideMenu: true, | |
26 | - }, | |
27 | - }, | |
28 | - ], | |
29 | -}; | |
6 | +// const dashboard: AppRouteModule = { | |
7 | +// path: '/about', | |
8 | +// name: 'About', | |
9 | +// component: LAYOUT, | |
10 | +// redirect: '/about/index', | |
11 | +// meta: { | |
12 | +// hideChildrenInMenu: true, | |
13 | +// icon: 'simple-icons:about-dot-me', | |
14 | +// title: t('routes.dashboard.about'), | |
15 | +// orderNo: 100000, | |
16 | +// }, | |
17 | +// children: [ | |
18 | +// { | |
19 | +// path: 'index', | |
20 | +// name: 'AboutPage', | |
21 | +// component: () => import('/@/views/sys/about/index.vue'), | |
22 | +// meta: { | |
23 | +// title: t('routes.dashboard.about'), | |
24 | +// icon: 'simple-icons:about-dot-me', | |
25 | +// hideMenu: true, | |
26 | +// }, | |
27 | +// }, | |
28 | +// ], | |
29 | +// }; | |
30 | 30 | |
31 | -export default dashboard; | |
31 | +// export default dashboard; | ... | ... |
... | ... | @@ -5,6 +5,21 @@ import { Rule } from 'ant-design-vue/lib/form/interface'; |
5 | 5 | */ |
6 | 6 | |
7 | 7 | // 手机号验证 |
8 | +export const numberRule: Rule[] = [ | |
9 | + { | |
10 | + required: true, | |
11 | + validator: (_, value: string) => { | |
12 | + const reg = /^[0-9]{8}$/; | |
13 | + if (!reg.test(value)) { | |
14 | + return Promise.reject('只能输入数字'); | |
15 | + } | |
16 | + return Promise.resolve(); | |
17 | + }, | |
18 | + validateTrigger: 'blur', | |
19 | + }, | |
20 | +]; | |
21 | + | |
22 | +// 手机号验证 | |
8 | 23 | export const phoneRule: Rule[] = [ |
9 | 24 | { |
10 | 25 | required: true, | ... | ... |
... | ... | @@ -12,49 +12,15 @@ |
12 | 12 | <div class="md:w-3/10 w-full enter-y"> |
13 | 13 | <HelpDoc /> |
14 | 14 | </div> |
15 | - <!-- 密码弹窗 --> | |
16 | - <BasicModal | |
17 | - @register="register" | |
18 | - v-bind="$attrs" | |
19 | - :mask="true" | |
20 | - :showCancelBtn="false" | |
21 | - :showOkBtn="false" | |
22 | - :canFullscreen="false" | |
23 | - :closable="false" | |
24 | - :maskStyle="maskColor" | |
25 | - :height="600" | |
26 | - :width="1500" | |
27 | - :maskClosable="false" | |
28 | - title="请您修改初始密码" | |
29 | - :helpMessage="['请您修改初始密码']" | |
30 | - > | |
31 | - <PasswordDialog /> | |
32 | - </BasicModal> | |
33 | 15 | </div> |
34 | 16 | </template> |
35 | 17 | <script lang="ts" setup> |
36 | - import PasswordDialog from '/@/views/system/password/index.vue'; | |
37 | - import { BasicModal, useModal } from '/@/components/Modal'; | |
38 | - import { getAuthCache } from '/@/utils/auth'; | |
39 | - import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | |
40 | - import { ref, onMounted } from 'vue'; | |
18 | + import { ref } from 'vue'; | |
41 | 19 | import GrowCard from './components/GrowCard.vue'; |
42 | 20 | import SiteAnalysis from './components/SiteAnalysis.vue'; |
43 | 21 | import { Card } from 'ant-design-vue'; |
44 | 22 | import HelpDoc from './components/HelpDoc.vue'; |
45 | 23 | |
46 | - const maskColor = ref({ backgroundColor: 'grey' }); | |
47 | - const statusModel = ref(false); | |
48 | - const [register, { openModal }] = useModal(); | |
49 | - onMounted(() => { | |
50 | - const userInfo = getAuthCache(USER_INFO_KEY); | |
51 | - if (userInfo.needSetPwd == true) { | |
52 | - statusModel.value = true; | |
53 | - openModal(statusModel.value); | |
54 | - } else if (userInfo.needSetPwd == false) { | |
55 | - openModal(statusModel.value); | |
56 | - } | |
57 | - }); | |
58 | 24 | const loading = ref(true); |
59 | 25 | setTimeout(() => { |
60 | 26 | loading.value = false; | ... | ... |
1 | 1 | <template> |
2 | 2 | <div class="step3"> |
3 | - <template v-for="(item, index) in alarms" :key="item.id"> | |
3 | + <template v-for="(item, index) in profileData" :key="item.id"> | |
4 | 4 | <CollapseContainer class="border mb-8"> |
5 | 5 | <template #action> |
6 | 6 | <div @click="deleteAlarmRule(index)" class="cursor-pointer"> |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | </BasicForm> |
18 | 18 | </CollapseContainer> |
19 | 19 | <p>创建报警规则</p> |
20 | - <template v-for="(childItem, createIndex) in item.createRule" :key="childItem.id"> | |
20 | + <template v-for="(childItem, createIndex) in item.alarms" :key="childItem.id"> | |
21 | 21 | <div class="aic mb-4" style="border: 1px solid #bfbfbf"> |
22 | 22 | <div class="w-3/4"> |
23 | 23 | <BasicForm @register="registerFormCreateAlarm" /> |
... | ... | @@ -72,15 +72,29 @@ |
72 | 72 | <a-button style="margin-left: 20px" type="primary" @click="addAlarmRule">添加报警规则</a-button> |
73 | 73 | </div> |
74 | 74 | <!-- 详情模板 --> |
75 | - <DetailTemplate v-if="isDetailTemplateEnableRuleAlarmRuleConditions" @register="registerModal" /> | |
75 | + <DetailTemplate | |
76 | + v-if="isRuleAlarmRuleConditions == 1" | |
77 | + @getAllFields="getAllFieldsFunc" | |
78 | + @register="registerModal1" | |
79 | + /> | |
76 | 80 | <!-- 启用规则 --> |
77 | - <EnableRule v-if="!isDetailTemplateEnableRuleAlarmRuleConditions" @register="registerModal" /> | |
81 | + <EnableRule | |
82 | + v-if="isRuleAlarmRuleConditions == 2" | |
83 | + ref="getChildData2" | |
84 | + @getAllFieldsEnab="getAllFieldsEnabFunc" | |
85 | + @register="registerModal2" | |
86 | + /> | |
78 | 87 | <!-- 报警规则条件 --> |
79 | - <AlarmRuleConditions v-if="isRuleAlarmRuleConditions == 1" @register="registerModal" /> | |
88 | + <AlarmRuleConditions | |
89 | + v-if="isRuleAlarmRuleConditions == 3" | |
90 | + ref="getChildData3" | |
91 | + @getAllFieldsRule="getAllFieldsRuleFunc" | |
92 | + @register="registerModal3" | |
93 | + /> | |
80 | 94 | </template> |
81 | 95 | |
82 | 96 | <script lang="ts"> |
83 | - import { defineComponent, ref, unref } from 'vue'; | |
97 | + import { defineComponent, ref, unref, getCurrentInstance } from 'vue'; | |
84 | 98 | import type { alarmListItem } from '../types/index'; |
85 | 99 | import { CollapseContainer } from '/@/components/Container/index'; |
86 | 100 | import { BasicForm, useForm } from '/@/components/Form'; |
... | ... | @@ -115,41 +129,60 @@ |
115 | 129 | }, |
116 | 130 | emits: ['prev', 'next'], |
117 | 131 | setup(_, { emit }) { |
118 | - const isDetailTemplateEnableRuleAlarmRuleConditions = ref(true); | |
119 | - const isRuleAlarmRuleConditions = ref(1); | |
132 | + const { proxy } = getCurrentInstance(); | |
133 | + // const isDetailTemplateEnableRuleAlarmRuleConditions = ref(true); | |
134 | + const getChildData1 = ref(null); | |
135 | + const getChildData2 = ref(null); | |
136 | + const getChildData3 = ref(null); | |
137 | + const isRuleAlarmRuleConditions = ref(0); | |
120 | 138 | const getAllFormData: any = ref({}); |
139 | + const alarmss: any = ref([]); | |
140 | + const emptyObj: any = ref({}); | |
121 | 141 | //告警列表 |
122 | - let alarms = ref<alarmListItem[]>([]); | |
142 | + let profileData = ref<alarmListItem[]>([]); | |
123 | 143 | const log = (e) => { |
124 | 144 | console.log(e); |
125 | 145 | }; |
126 | 146 | // 添加和删除告警配置 |
127 | 147 | const deleteAlarmRule = (index: number) => { |
128 | - unref(alarms).splice(index, 1); | |
148 | + unref(profileData).splice(index, 1); | |
129 | 149 | }; |
130 | 150 | // 上一步 |
131 | 151 | const prevStep = () => { |
132 | 152 | emit('prev'); |
133 | 153 | }; |
134 | 154 | const addAlarmRule = () => { |
135 | - unref(alarms).push({ | |
136 | - id: Date.now(), | |
137 | - messageMode: '', | |
138 | - propagate: false, | |
139 | - propagateRelationTypes: [''], | |
140 | - createRule: [ | |
155 | + unref(profileData).push({ | |
156 | + // id: Date.now(), | |
157 | + // messageMode: '', | |
158 | + // propagate: false, | |
159 | + // propagateRelationTypes: [''], | |
160 | + configuration: {}, | |
161 | + transportConfiguration: {}, | |
162 | + provisionConfiguration: { | |
163 | + provisionDeviceSecret: '', | |
164 | + }, | |
165 | + // alarms: [ | |
166 | + // { | |
167 | + // id: Date.now() + Math.random(), | |
168 | + // alarmVisible: false, | |
169 | + // addKeyFilterVisible: false, | |
170 | + // detailVisible: false, | |
171 | + // detail: '', | |
172 | + // }, | |
173 | + // ], | |
174 | + // clearRule: [], | |
175 | + alarms: [ | |
141 | 176 | { |
142 | 177 | id: Date.now() + Math.random(), |
143 | - alarmVisible: false, | |
144 | - addKeyFilterVisible: false, | |
145 | - detailVisible: false, | |
146 | - detail: '', | |
147 | - filterList: [], | |
178 | + alarmType: '', | |
179 | + createRules: {}, | |
180 | + clearRule: {}, | |
181 | + propagate: true, | |
182 | + propagateRelationTypes: [''], | |
148 | 183 | }, |
149 | 184 | ], |
150 | - clearRule: [], | |
151 | 185 | }); |
152 | - console.log(alarms.value); | |
153 | 186 | }; |
154 | 187 | |
155 | 188 | // 表单部分 报警类型 |
... | ... | @@ -195,7 +228,7 @@ |
195 | 228 | |
196 | 229 | // 添加‘创建条件’ |
197 | 230 | const addCreateRole = (index: number) => { |
198 | - unref(alarms)[index].createRule.push({ | |
231 | + unref(profileData)[index].alarms.push({ | |
199 | 232 | id: Date.now() + Math.random(), |
200 | 233 | alarmVisible: false, |
201 | 234 | addKeyFilterVisible: false, |
... | ... | @@ -206,7 +239,16 @@ |
206 | 239 | }; |
207 | 240 | // 删除‘创建条件’ |
208 | 241 | const deleteCondition = (index: number, createIndex: number) => { |
209 | - alarms.value[index].createRule.splice(createIndex, 1); | |
242 | + profileData.value[index].alarms.splice(createIndex, 1); | |
243 | + }; | |
244 | + const getAllFieldsFunc = (v) => { | |
245 | + console.log(v); | |
246 | + }; | |
247 | + const getAllFieldsEnabFunc = (v) => { | |
248 | + console.log(v); | |
249 | + }; | |
250 | + const getAllFieldsRuleFunc = (v) => { | |
251 | + console.log(v); | |
210 | 252 | }; |
211 | 253 | |
212 | 254 | const handleFormStep3toStep4Next = async () => { |
... | ... | @@ -216,53 +258,71 @@ |
216 | 258 | const valueRegisterFormHighSetting = await validateRegisterFormHighSetting(); |
217 | 259 | const valueRegisterFormCreateAlarm = await validateRegisterFormCreateAlarm(); |
218 | 260 | const valueRegisterFormClearAlarm = await validateRegisterFormClearAlarm(); |
261 | + const getValueRegisterFormHighSetting = { | |
262 | + propagate: valueRegisterFormHighSetting?.propagate, | |
263 | + propagateRelationTypes: [valueRegisterFormHighSetting?.propagateRelationTypes], | |
264 | + }; | |
265 | + // console.log(proxy.$refs.getChildData1); | |
266 | + // console.log(proxy.$refs.getChildData2); | |
267 | + // console.log(proxy.$refs.getChildData3); | |
268 | + // let getChildValues1 = proxy.$refs.getChildData1.getAllFields(); | |
269 | + // console.log('详情模板', getChildValues1); | |
270 | + // let getChildValues2 = proxy.$refs.getChildData2.getAllFieldsEnab(); | |
271 | + // console.log('启用规则', getChildValues2); | |
272 | + // let getChildValues3 = proxy.$refs.getChildData3.getAllFieldsRule(); | |
273 | + // console.log('报警规则条件', getChildValues3); | |
274 | + | |
275 | + Object.assign(emptyObj.value, valueRegisterForm, getValueRegisterFormHighSetting); | |
276 | + alarmss.value.push(emptyObj.value); | |
277 | + const getAlarms = { | |
278 | + alarms: alarmss.value, | |
279 | + }; | |
219 | 280 | Object.assign( |
220 | 281 | getAllFormData.value, |
221 | - valueRegisterForm, | |
222 | - valueRegisterFormHighSetting, | |
223 | - valueRegisterFormCreateAlarm, | |
224 | - valueRegisterFormClearAlarm, | |
225 | - alarms.value | |
282 | + getAlarms | |
283 | + // valueRegisterFormCreateAlarm, | |
284 | + // valueRegisterFormClearAlarm | |
285 | + // profileData.value | |
226 | 286 | ); |
227 | 287 | console.log('第三步的数据', getAllFormData.value); |
228 | 288 | emit('next', getAllFormData.value); |
229 | 289 | } catch (error) {} |
230 | 290 | }; |
231 | 291 | |
232 | - const [registerModal, { openModal }] = useModal(); | |
292 | + const [registerModal1, { openModal: openModal1 }] = useModal(); | |
293 | + const [registerModal2, { openModal: openModal2 }] = useModal(); | |
294 | + const [registerModal3, { openModal: openModal3 }] = useModal(); | |
233 | 295 | |
234 | 296 | const handleOpenDetailTemplate = () => { |
235 | - openModal(true, { | |
236 | - isUpdate: false, | |
237 | - }); | |
238 | - isDetailTemplateEnableRuleAlarmRuleConditions.value = true; | |
239 | - console.log(isDetailTemplateEnableRuleAlarmRuleConditions.value); | |
297 | + isRuleAlarmRuleConditions.value = 1; | |
298 | + openModal1(true); | |
240 | 299 | }; |
241 | 300 | const handleOpenEnableRule = () => { |
242 | - openModal(true, { | |
243 | - isUpdate: false, | |
244 | - }); | |
245 | - isDetailTemplateEnableRuleAlarmRuleConditions.value = false; | |
246 | - console.log(isDetailTemplateEnableRuleAlarmRuleConditions.value); | |
301 | + isRuleAlarmRuleConditions.value = 2; | |
302 | + openModal2(true); | |
247 | 303 | }; |
248 | 304 | const handleOpenAlaramRuleConditions = () => { |
249 | - openModal(true, { | |
250 | - isUpdate: false, | |
251 | - }); | |
252 | - isRuleAlarmRuleConditions.value = 1; | |
253 | - console.log(isRuleAlarmRuleConditions.value); | |
305 | + isRuleAlarmRuleConditions.value = 3; | |
306 | + openModal3(true); | |
254 | 307 | }; |
255 | 308 | |
256 | 309 | return { |
310 | + getAllFieldsRuleFunc, | |
311 | + getAllFieldsEnabFunc, | |
312 | + getAllFieldsFunc, | |
313 | + getChildData1, | |
314 | + getChildData2, | |
315 | + getChildData3, | |
257 | 316 | isRuleAlarmRuleConditions, |
258 | - isDetailTemplateEnableRuleAlarmRuleConditions, | |
259 | - registerModal, | |
317 | + registerModal1, | |
318 | + registerModal2, | |
319 | + registerModal3, | |
260 | 320 | handleOpenEnableRule, |
261 | 321 | handleOpenAlaramRuleConditions, |
262 | 322 | handleOpenDetailTemplate, |
263 | 323 | handleFormStep3toStep4Next, |
264 | 324 | log, |
265 | - alarms, | |
325 | + profileData, | |
266 | 326 | deleteAlarmRule, |
267 | 327 | prevStep, |
268 | 328 | addAlarmRule, | ... | ... |
src/views/device/profile/step/cpns/1.json
0 → 100644
1 | +{ | |
2 | + "alarmProfile": { | |
3 | + "alarmContactId": "string", | |
4 | + "createTime": "2021-12-20T08:19:59.510Z", | |
5 | + "creator": "string", | |
6 | + "defaultConfig": "string", | |
7 | + "description": "string", | |
8 | + "deviceProfileId": "string", | |
9 | + "enabled": true, | |
10 | + "icon": "string", | |
11 | + "id": "string", | |
12 | + "messageMode": "string", | |
13 | + "name": "string", | |
14 | + "roleIds": [ | |
15 | + "string" | |
16 | + ], | |
17 | + "tenantExpireTime": "2021-12-20T08:19:59.511Z", | |
18 | + "tenantId": "string", | |
19 | + "tenantStatus": "DISABLED", | |
20 | + "updateTime": "2021-12-20T08:19:59.511Z", | |
21 | + "updater": "string" | |
22 | + }, | |
23 | + "convertJs": "string", | |
24 | + "createTime": "2021-12-20T08:19:59.511Z", | |
25 | + "creator": "string", | |
26 | + "defaultConfig": "string", | |
27 | + "defaultQueueName": "string", | |
28 | + "defaultRuleChainId": "string", | |
29 | + "description": "string", | |
30 | + "enabled": true, | |
31 | + "icon": "string", | |
32 | + "id": "string", | |
33 | + "name": "string", | |
34 | + "profileData": { | |
35 | + "configuration": {}, | |
36 | + "transportConfiguration": {}, | |
37 | + "provisionConfiguration": { | |
38 | + "provisionDeviceSecret": "string" | |
39 | + }, | |
40 | + "alarms": [ | |
41 | + { | |
42 | + "id": "highTemperatureAlarmID", | |
43 | + "alarmType": "High Temperature Alarm", | |
44 | + "createRules": { | |
45 | + "additionalProp1": { | |
46 | + "condition": { | |
47 | + "condition": [ | |
48 | + { | |
49 | + "key": { | |
50 | + "type": "TIME_SERIES", | |
51 | + "key": "temp" | |
52 | + }, | |
53 | + "valueType": "NUMERIC", | |
54 | + "value": {}, | |
55 | + "predicate": {} | |
56 | + } | |
57 | + ], | |
58 | + "spec": {} | |
59 | + }, | |
60 | + "schedule": { | |
61 | + "type": "ANY_TIME" | |
62 | + }, | |
63 | + "alarmDetails": "string", | |
64 | + "dashboardId": { | |
65 | + "id": "784f394c-42b6-435a-983c-b7beff2784f9", | |
66 | + "entityType": "DASHBOARD" | |
67 | + } | |
68 | + }, | |
69 | + "additionalProp2": { | |
70 | + "condition": { | |
71 | + "condition": [ | |
72 | + { | |
73 | + "key": { | |
74 | + "type": "TIME_SERIES", | |
75 | + "key": "temp" | |
76 | + }, | |
77 | + "valueType": "NUMERIC", | |
78 | + "value": {}, | |
79 | + "predicate": {} | |
80 | + } | |
81 | + ], | |
82 | + "spec": {} | |
83 | + }, | |
84 | + "schedule": { | |
85 | + "type": "ANY_TIME" | |
86 | + }, | |
87 | + "alarmDetails": "string", | |
88 | + "dashboardId": { | |
89 | + "id": "784f394c-42b6-435a-983c-b7beff2784f9", | |
90 | + "entityType": "DASHBOARD" | |
91 | + } | |
92 | + }, | |
93 | + "additionalProp3": { | |
94 | + "condition": { | |
95 | + "condition": [ | |
96 | + { | |
97 | + "key": { | |
98 | + "type": "TIME_SERIES", | |
99 | + "key": "temp" | |
100 | + }, | |
101 | + "valueType": "NUMERIC", | |
102 | + "value": {}, | |
103 | + "predicate": {} | |
104 | + } | |
105 | + ], | |
106 | + "spec": {} | |
107 | + }, | |
108 | + "schedule": { | |
109 | + "type": "ANY_TIME" | |
110 | + }, | |
111 | + "alarmDetails": "string", | |
112 | + "dashboardId": { | |
113 | + "id": "784f394c-42b6-435a-983c-b7beff2784f9", | |
114 | + "entityType": "DASHBOARD" | |
115 | + } | |
116 | + } | |
117 | + }, | |
118 | + "clearRule": { | |
119 | + "condition": { | |
120 | + "condition": [ | |
121 | + { | |
122 | + "key": { | |
123 | + "type": "TIME_SERIES", | |
124 | + "key": "temp" | |
125 | + }, | |
126 | + "valueType": "NUMERIC", | |
127 | + "value": {}, | |
128 | + "predicate": {} | |
129 | + } | |
130 | + ], | |
131 | + "spec": {} | |
132 | + }, | |
133 | + "schedule": { | |
134 | + "type": "ANY_TIME" | |
135 | + }, | |
136 | + "alarmDetails": "string", | |
137 | + "dashboardId": { | |
138 | + "id": "784f394c-42b6-435a-983c-b7beff2784f9", | |
139 | + "entityType": "DASHBOARD" | |
140 | + } | |
141 | + }, | |
142 | + "propagate": true, | |
143 | + "propagateRelationTypes": [ | |
144 | + "string" | |
145 | + ] | |
146 | + } | |
147 | + ] | |
148 | + }, | |
149 | + "roleIds": [ | |
150 | + "string" | |
151 | + ], | |
152 | + "tbProfileId": "string", | |
153 | + "tenantExpireTime": "2021-12-20T08:19:59.511Z", | |
154 | + "tenantId": "string", | |
155 | + "tenantStatus": "DISABLED", | |
156 | + "transportType": "COAP", | |
157 | + "updateTime": "2021-12-20T08:19:59.511Z", | |
158 | + "updater": "string" | |
159 | +} | ... | ... |
src/views/device/profile/step/cpns/2.json
0 → 100644
1 | +{ | |
2 | + "name": "hhhhh", | |
3 | + "transportType": "COAP", | |
4 | + "profileData": { | |
5 | + "alarms": [ | |
6 | + { | |
7 | + "alarmType": "1", | |
8 | + "propagate": true, | |
9 | + "propagateRelationTypes": [ | |
10 | + "1" | |
11 | + ] | |
12 | + } | |
13 | + ] | |
14 | + }, | |
15 | + "alarmProfile": { | |
16 | + "alarmContactId": "ce350734-9504-48c2-82d2-277e3fe5583f", | |
17 | + "messageMode": "DING_TALK_MESSAGE" | |
18 | + } | |
19 | +} | ... | ... |
1 | 1 | import { FormSchema } from '/@/components/Table'; |
2 | 2 | |
3 | +/** | |
4 | + * 所使用的枚举值 | |
5 | + */ | |
6 | + | |
7 | +export enum TriggerEnum { | |
8 | + IS_DEVICE_ACT = 'DEVICE_ACT', | |
9 | + IS_TIME_ACT = 'TIME_ACT', | |
10 | + IS_SCENE_ACT = 'SCENE_ACT', | |
11 | +} | |
12 | + | |
13 | +export const isShiDu = (type: string) => { | |
14 | + return type === TriggerEnum.IS_DEVICE_ACT; | |
15 | +}; | |
16 | +export const isWenDu = (type: string) => { | |
17 | + return type === TriggerEnum.IS_TIME_ACT; | |
18 | +}; | |
19 | + | |
20 | +export const isTimeAll = (type: string) => { | |
21 | + return type === TriggerEnum.IS_SCENE_ACT; | |
22 | +}; | |
23 | + | |
3 | 24 | export const formSchema: FormSchema[] = [ |
4 | 25 | { |
5 | 26 | field: 'detail', |
6 | - label: '报警详细信息', | |
27 | + label: '条件类型', | |
28 | + colProps: { span: 24 }, | |
29 | + component: 'Select', | |
30 | + componentProps: { | |
31 | + placeholder: '请选择报警日程表', | |
32 | + options: [ | |
33 | + { label: '简单', value: 'DEVICE_ACT' }, | |
34 | + { label: '持续时间', value: 'TIME_ACT' }, | |
35 | + { label: '重复', value: 'SCENE_ACT' }, | |
36 | + ], | |
37 | + }, | |
38 | + }, | |
39 | + { | |
40 | + field: 'type1', | |
41 | + label: '动态源类型', | |
42 | + colProps: { span: 24 }, | |
43 | + component: 'Select', | |
44 | + componentProps: { | |
45 | + placeholder: '请选择动态源类型', | |
46 | + options: [ | |
47 | + { label: '无动态值', value: 'second' }, | |
48 | + { label: '当前租户', value: 'minute' }, | |
49 | + { label: '当前客户', value: 'hour' }, | |
50 | + { label: '当前设备', value: 'day' }, | |
51 | + ], | |
52 | + }, | |
53 | + ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
54 | + }, | |
55 | + { | |
56 | + field: 'time1', | |
57 | + label: '源属性', | |
58 | + colProps: { span: 24 }, | |
59 | + component: 'Input', | |
60 | + componentProps: { | |
61 | + placeholder: '源属性', | |
62 | + }, | |
63 | + ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
64 | + }, | |
65 | + { | |
66 | + field: 'type1', | |
67 | + label: '动态源类型', | |
68 | + colProps: { span: 24 }, | |
69 | + component: 'Select', | |
70 | + componentProps: { | |
71 | + placeholder: '请选择动态源类型', | |
72 | + options: [ | |
73 | + { label: '无动态值', value: 'second' }, | |
74 | + { label: '当前租户', value: 'minute' }, | |
75 | + { label: '当前客户', value: 'hour' }, | |
76 | + { label: '当前设备', value: 'day' }, | |
77 | + ], | |
78 | + }, | |
79 | + ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
80 | + }, | |
81 | + { | |
82 | + field: 'time1', | |
83 | + label: '源属性', | |
84 | + colProps: { span: 24 }, | |
85 | + component: 'Input', | |
86 | + componentProps: { | |
87 | + placeholder: '源属性', | |
88 | + }, | |
89 | + ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
90 | + }, | |
91 | + { | |
92 | + field: 'time', | |
93 | + label: '持续时间值', | |
94 | + colProps: { span: 24 }, | |
95 | + component: 'Input', | |
96 | + componentProps: { | |
97 | + placeholder: '请输入持续时间值', | |
98 | + }, | |
99 | + ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
100 | + }, | |
101 | + { | |
102 | + field: 'r', | |
103 | + label: '时间单位', | |
104 | + colProps: { span: 24 }, | |
105 | + component: 'Select', | |
106 | + componentProps: { | |
107 | + placeholder: '请选择报警日程表', | |
108 | + options: [ | |
109 | + { label: '秒', value: 'second' }, | |
110 | + { label: '分钟', value: 'minute' }, | |
111 | + { label: '小时', value: 'hour' }, | |
112 | + { label: '天', value: 'day' }, | |
113 | + ], | |
114 | + }, | |
115 | + ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
116 | + }, | |
117 | + { | |
118 | + field: 'time', | |
119 | + label: '事件计数值必填', | |
7 | 120 | colProps: { span: 24 }, |
8 | - required: true, | |
9 | 121 | component: 'Input', |
10 | 122 | componentProps: { |
11 | - placeholder: '请输入报警详细信息', | |
123 | + placeholder: '请输入事件计数值必填', | |
12 | 124 | }, |
125 | + rules: [{ message: '事件计数应在1到2147483637之间', trigger: 'blur' }], | |
126 | + ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
13 | 127 | }, |
14 | 128 | ]; | ... | ... |
... | ... | @@ -21,21 +21,35 @@ |
21 | 21 | BasicModal, |
22 | 22 | BasicForm, |
23 | 23 | }, |
24 | - emits: ['success', 'register'], | |
25 | - setup() { | |
24 | + emits: ['success', 'register', 'getAllFieldsRule'], | |
25 | + setup(_, { emit }) { | |
26 | + // const getValueData: any = ref({}); | |
27 | + | |
26 | 28 | const isUpdate = ref(true); |
27 | - const [registerForm] = useForm({ | |
29 | + const [registerForm, { getFieldsValue }] = useForm({ | |
28 | 30 | labelWidth: 120, |
29 | 31 | schemas: formSchema, |
30 | 32 | }); |
31 | - const getTitle = computed(() => (!unref(isUpdate) ? '新增报警规则条件' : '编辑报警规则条件')); | |
32 | - const [register] = useModalInner((data) => { | |
33 | + const getTitle = computed(() => (!unref(isUpdate) ? '添加报警规则条件' : '编辑报警规则条件')); | |
34 | + const [register, { closeModal }] = useModalInner((data) => { | |
33 | 35 | isUpdate.value = !!data?.isUpdate; |
34 | 36 | }); |
35 | 37 | const handleSubmit = () => { |
36 | - console.log(1); | |
38 | + const values = getFieldsValue(); | |
39 | + emit('getAllFieldsRule', values); | |
40 | + // console.log(1); | |
41 | + // let getV = {}; | |
42 | + // getAllFieldsRule(getV); | |
43 | + closeModal(); | |
37 | 44 | }; |
45 | + // function getAllFieldsRule(getV) { | |
46 | + // const values = getFieldsValue(); | |
47 | + // getValueData.value = values; | |
48 | + // getV = getValueData.value; | |
49 | + // return getV; | |
50 | + // } | |
38 | 51 | return { |
52 | + // getAllFieldsRule, | |
39 | 53 | registerForm, |
40 | 54 | handleSubmit, |
41 | 55 | register, | ... | ... |
1 | 1 | import { FormSchema } from '/@/components/Table'; |
2 | 2 | |
3 | -/** | |
4 | - * 所使用的枚举值 | |
5 | - */ | |
6 | - | |
7 | -export enum TriggerEnum { | |
8 | - IS_DEVICE_ACT = 'DEVICE_ACT', | |
9 | - IS_TIME_ACT = 'TIME_ACT', | |
10 | - IS_SCENE_ACT = 'SCENE_ACT', | |
11 | -} | |
12 | - | |
13 | -export const isShiDu = (type: string) => { | |
14 | - return type === TriggerEnum.IS_DEVICE_ACT; | |
15 | -}; | |
16 | -export const isWenDu = (type: string) => { | |
17 | - return type === TriggerEnum.IS_TIME_ACT; | |
18 | -}; | |
19 | - | |
20 | -export const isTimeAll = (type: string) => { | |
21 | - return type === TriggerEnum.IS_SCENE_ACT; | |
22 | -}; | |
23 | - | |
24 | 3 | export const formSchema: FormSchema[] = [ |
25 | 4 | { |
26 | 5 | field: 'detail', |
27 | - label: '条件类型', | |
28 | - colProps: { span: 24 }, | |
29 | - component: 'Select', | |
30 | - componentProps: { | |
31 | - placeholder: '请选择报警日程表', | |
32 | - options: [ | |
33 | - { label: '简单', value: 'DEVICE_ACT' }, | |
34 | - { label: '持续时间', value: 'TIME_ACT' }, | |
35 | - { label: '重复', value: 'SCENE_ACT' }, | |
36 | - ], | |
37 | - }, | |
38 | - }, | |
39 | - { | |
40 | - field: 'type1', | |
41 | - label: '动态源类型', | |
42 | - colProps: { span: 24 }, | |
43 | - component: 'Select', | |
44 | - componentProps: { | |
45 | - placeholder: '请选择动态源类型', | |
46 | - options: [ | |
47 | - { label: '无动态值', value: 'second' }, | |
48 | - { label: '当前租户', value: 'minute' }, | |
49 | - { label: '当前客户', value: 'hour' }, | |
50 | - { label: '当前设备', value: 'day' }, | |
51 | - ], | |
52 | - }, | |
53 | - ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
54 | - }, | |
55 | - { | |
56 | - field: 'time1', | |
57 | - label: '源属性', | |
58 | - colProps: { span: 24 }, | |
59 | - component: 'Input', | |
60 | - componentProps: { | |
61 | - placeholder: '源属性', | |
62 | - }, | |
63 | - ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
64 | - }, | |
65 | - { | |
66 | - field: 'type1', | |
67 | - label: '动态源类型', | |
68 | - colProps: { span: 24 }, | |
69 | - component: 'Select', | |
70 | - componentProps: { | |
71 | - placeholder: '请选择动态源类型', | |
72 | - options: [ | |
73 | - { label: '无动态值', value: 'second' }, | |
74 | - { label: '当前租户', value: 'minute' }, | |
75 | - { label: '当前客户', value: 'hour' }, | |
76 | - { label: '当前设备', value: 'day' }, | |
77 | - ], | |
78 | - }, | |
79 | - ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
80 | - }, | |
81 | - { | |
82 | - field: 'time1', | |
83 | - label: '源属性', | |
84 | - colProps: { span: 24 }, | |
85 | - component: 'Input', | |
86 | - componentProps: { | |
87 | - placeholder: '源属性', | |
88 | - }, | |
89 | - ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
90 | - }, | |
91 | - { | |
92 | - field: 'time', | |
93 | - label: '持续时间值', | |
94 | - colProps: { span: 24 }, | |
95 | - component: 'Input', | |
96 | - componentProps: { | |
97 | - placeholder: '请输入持续时间值', | |
98 | - }, | |
99 | - ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
100 | - }, | |
101 | - { | |
102 | - field: 'r', | |
103 | - label: '时间单位', | |
104 | - colProps: { span: 24 }, | |
105 | - component: 'Select', | |
106 | - componentProps: { | |
107 | - placeholder: '请选择报警日程表', | |
108 | - options: [ | |
109 | - { label: '秒', value: 'second' }, | |
110 | - { label: '分钟', value: 'minute' }, | |
111 | - { label: '小时', value: 'hour' }, | |
112 | - { label: '天', value: 'day' }, | |
113 | - ], | |
114 | - }, | |
115 | - ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), | |
116 | - }, | |
117 | - { | |
118 | - field: 'time', | |
119 | - label: '事件计数值必填', | |
6 | + label: '报警详细信息', | |
120 | 7 | colProps: { span: 24 }, |
8 | + required: true, | |
121 | 9 | component: 'Input', |
122 | 10 | componentProps: { |
123 | - placeholder: '请输入事件计数值必填', | |
11 | + placeholder: '请输入报警详细信息', | |
124 | 12 | }, |
125 | - rules: [{ message: '事件计数应在1到2147483637之间', trigger: 'blur' }], | |
126 | - ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), | |
127 | 13 | }, |
128 | 14 | ]; | ... | ... |
... | ... | @@ -21,21 +21,33 @@ |
21 | 21 | BasicModal, |
22 | 22 | BasicForm, |
23 | 23 | }, |
24 | - emits: ['success', 'register'], | |
25 | - setup() { | |
24 | + emits: ['success', 'register', 'getAllFields'], | |
25 | + setup(_, { emit }) { | |
26 | + // const getValueData: any = ref({}); | |
26 | 27 | const isUpdate = ref(true); |
27 | - const [registerForm] = useForm({ | |
28 | + const [registerForm, { getFieldsValue }] = useForm({ | |
28 | 29 | labelWidth: 120, |
29 | 30 | schemas: formSchema, |
30 | 31 | }); |
31 | 32 | const getTitle = computed(() => (!unref(isUpdate) ? '新增详情模板' : '编辑详情模板')); |
32 | - const [register] = useModalInner((data) => { | |
33 | + const [register, { closeModal }] = useModalInner((data) => { | |
33 | 34 | isUpdate.value = !!data?.isUpdate; |
34 | 35 | }); |
35 | 36 | const handleSubmit = () => { |
36 | - console.log(1); | |
37 | + const values = getFieldsValue(); | |
38 | + emit('getAllFields', values); | |
39 | + // let getV = {}; | |
40 | + // getAllFields(getV); | |
41 | + closeModal(); | |
37 | 42 | }; |
43 | + // function getAllFields(getV) { | |
44 | + // const values = getFieldsValue(); | |
45 | + // getValueData.value = values; | |
46 | + // getV = getValueData.value; | |
47 | + // return getV; | |
48 | + // } | |
38 | 49 | return { |
50 | + // getAllFields, | |
39 | 51 | registerForm, |
40 | 52 | handleSubmit, |
41 | 53 | register, | ... | ... |
... | ... | @@ -61,7 +61,7 @@ export const formSchema: FormSchema[] = [ |
61 | 61 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
62 | 62 | }, |
63 | 63 | { |
64 | - field: 'time', | |
64 | + field: 'time1', | |
65 | 65 | component: 'TimePicker', |
66 | 66 | label: '时间选择', |
67 | 67 | colProps: { |
... | ... | @@ -70,7 +70,7 @@ export const formSchema: FormSchema[] = [ |
70 | 70 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
71 | 71 | }, |
72 | 72 | { |
73 | - field: 'time', | |
73 | + field: 'time2', | |
74 | 74 | component: 'TimePicker', |
75 | 75 | label: '时间选择', |
76 | 76 | colProps: { |
... | ... | @@ -90,7 +90,7 @@ export const formSchema: FormSchema[] = [ |
90 | 90 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
91 | 91 | }, |
92 | 92 | { |
93 | - field: 'time', | |
93 | + field: 'time3', | |
94 | 94 | component: 'TimePicker', |
95 | 95 | label: '时间选择', |
96 | 96 | colProps: { |
... | ... | @@ -99,7 +99,7 @@ export const formSchema: FormSchema[] = [ |
99 | 99 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
100 | 100 | }, |
101 | 101 | { |
102 | - field: 'time', | |
102 | + field: 'time4', | |
103 | 103 | component: 'TimePicker', |
104 | 104 | label: '时间选择', |
105 | 105 | colProps: { |
... | ... | @@ -118,7 +118,7 @@ export const formSchema: FormSchema[] = [ |
118 | 118 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
119 | 119 | }, |
120 | 120 | { |
121 | - field: 'time', | |
121 | + field: 'time5', | |
122 | 122 | component: 'TimePicker', |
123 | 123 | label: '时间选择', |
124 | 124 | colProps: { |
... | ... | @@ -127,7 +127,7 @@ export const formSchema: FormSchema[] = [ |
127 | 127 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
128 | 128 | }, |
129 | 129 | { |
130 | - field: 'time', | |
130 | + field: 'time6', | |
131 | 131 | component: 'TimePicker', |
132 | 132 | label: '时间选择', |
133 | 133 | colProps: { |
... | ... | @@ -146,7 +146,7 @@ export const formSchema: FormSchema[] = [ |
146 | 146 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
147 | 147 | }, |
148 | 148 | { |
149 | - field: 'time', | |
149 | + field: 'time7', | |
150 | 150 | component: 'TimePicker', |
151 | 151 | label: '时间选择', |
152 | 152 | colProps: { |
... | ... | @@ -155,7 +155,7 @@ export const formSchema: FormSchema[] = [ |
155 | 155 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
156 | 156 | }, |
157 | 157 | { |
158 | - field: 'time', | |
158 | + field: 'time8', | |
159 | 159 | component: 'TimePicker', |
160 | 160 | label: '时间选择', |
161 | 161 | colProps: { |
... | ... | @@ -174,7 +174,7 @@ export const formSchema: FormSchema[] = [ |
174 | 174 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
175 | 175 | }, |
176 | 176 | { |
177 | - field: 'time', | |
177 | + field: 'time9', | |
178 | 178 | component: 'TimePicker', |
179 | 179 | label: '时间选择', |
180 | 180 | colProps: { |
... | ... | @@ -183,7 +183,7 @@ export const formSchema: FormSchema[] = [ |
183 | 183 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
184 | 184 | }, |
185 | 185 | { |
186 | - field: 'time', | |
186 | + field: 'time33', | |
187 | 187 | component: 'TimePicker', |
188 | 188 | label: '时间选择', |
189 | 189 | colProps: { |
... | ... | @@ -202,7 +202,7 @@ export const formSchema: FormSchema[] = [ |
202 | 202 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
203 | 203 | }, |
204 | 204 | { |
205 | - field: 'time', | |
205 | + field: 'time333', | |
206 | 206 | component: 'TimePicker', |
207 | 207 | label: '时间选择', |
208 | 208 | colProps: { |
... | ... | @@ -211,7 +211,7 @@ export const formSchema: FormSchema[] = [ |
211 | 211 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
212 | 212 | }, |
213 | 213 | { |
214 | - field: 'time', | |
214 | + field: 'time131', | |
215 | 215 | component: 'TimePicker', |
216 | 216 | label: '时间选择', |
217 | 217 | colProps: { |
... | ... | @@ -230,7 +230,7 @@ export const formSchema: FormSchema[] = [ |
230 | 230 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
231 | 231 | }, |
232 | 232 | { |
233 | - field: 'time', | |
233 | + field: 'time3423', | |
234 | 234 | component: 'TimePicker', |
235 | 235 | label: '时间选择', |
236 | 236 | colProps: { |
... | ... | @@ -239,7 +239,7 @@ export const formSchema: FormSchema[] = [ |
239 | 239 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'detail')), |
240 | 240 | }, |
241 | 241 | { |
242 | - field: 'time', | |
242 | + field: 'time3431', | |
243 | 243 | component: 'TimePicker', |
244 | 244 | label: '时间选择', |
245 | 245 | colProps: { |
... | ... | @@ -296,7 +296,7 @@ export const formSchema: FormSchema[] = [ |
296 | 296 | ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), |
297 | 297 | }, |
298 | 298 | { |
299 | - field: 'time', | |
299 | + field: 'timerrw', | |
300 | 300 | component: 'TimePicker', |
301 | 301 | label: '时间选择', |
302 | 302 | colProps: { |
... | ... | @@ -305,7 +305,7 @@ export const formSchema: FormSchema[] = [ |
305 | 305 | ifShow: ({ values }) => isWenDu(Reflect.get(values, 'detail')), |
306 | 306 | }, |
307 | 307 | { |
308 | - field: 'time', | |
308 | + field: 'timewwq', | |
309 | 309 | component: 'TimePicker', |
310 | 310 | label: '时间选择', |
311 | 311 | colProps: { | ... | ... |
... | ... | @@ -21,21 +21,33 @@ |
21 | 21 | BasicModal, |
22 | 22 | BasicForm, |
23 | 23 | }, |
24 | - emits: ['success', 'register'], | |
25 | - setup() { | |
24 | + emits: ['success', 'register', 'getAllFieldsEnab'], | |
25 | + setup(_, { emit }) { | |
26 | + // const getValueData: any = ref({}); | |
26 | 27 | const isUpdate = ref(true); |
27 | - const [registerForm] = useForm({ | |
28 | + const [registerForm, { getFieldsValue }] = useForm({ | |
28 | 29 | labelWidth: 120, |
29 | 30 | schemas: formSchema, |
30 | 31 | }); |
31 | 32 | const getTitle = computed(() => (!unref(isUpdate) ? '新增报警日程表' : '编辑报警日程表')); |
32 | - const [register] = useModalInner((data) => { | |
33 | + const [register, { closeModal }] = useModalInner((data) => { | |
33 | 34 | isUpdate.value = !!data?.isUpdate; |
34 | 35 | }); |
35 | 36 | const handleSubmit = () => { |
36 | - console.log(1); | |
37 | + const values = getFieldsValue(); | |
38 | + emit('getAllFieldsEnab', values); | |
39 | + // let getV = {}; | |
40 | + // getAllFieldsEnab(getV); | |
41 | + closeModal(); | |
37 | 42 | }; |
43 | + // function getAllFieldsEnab(getV) { | |
44 | + // const values = getFieldsValue(); | |
45 | + // getValueData.value = values; | |
46 | + // getV = getValueData.value; | |
47 | + // return getV; | |
48 | + // } | |
38 | 49 | return { |
50 | + // getAllFieldsEnab, | |
39 | 51 | registerForm, |
40 | 52 | handleSubmit, |
41 | 53 | register, | ... | ... |
... | ... | @@ -13,12 +13,30 @@ interface createRule { |
13 | 13 | interface clearRule { |
14 | 14 | detail: string; |
15 | 15 | } |
16 | + | |
17 | +interface provisionConfigurationD { | |
18 | + provisionDeviceSecret: string; | |
19 | +} | |
20 | + | |
21 | +interface IAddAlarms { | |
22 | + id: number; | |
23 | + alarmType: string; | |
24 | + createRules: object; | |
25 | + clearRule: object; | |
26 | + propagate: true; | |
27 | + propagateRelationTypes: string[]; | |
28 | +} | |
29 | + | |
16 | 30 | export interface alarmListItem { |
17 | - id?: number; | |
18 | - alarmType?: string; | |
19 | - messageMode?: string; | |
20 | - propagate?: boolean; | |
21 | - propagateRelationTypes?: string[]; | |
22 | - createRule?: createRule[]; | |
23 | - clearRule?: clearRule[]; | |
31 | + configuration?: object; | |
32 | + transportConfiguration?: object; | |
33 | + provisionConfiguration?: provisionConfigurationD; | |
34 | + // id?: number; | |
35 | + alarms?: IAddAlarms[]; | |
36 | + // alarmType?: string; | |
37 | + // messageMode?: string; | |
38 | + // createRule?: createRule[]; | |
39 | + // clearRule?: clearRule[]; | |
40 | + // propagate?: boolean; | |
41 | + // propagateRelationTypes?: string[]; | |
24 | 42 | } | ... | ... |
... | ... | @@ -117,30 +117,7 @@ export const formSchema: FormSchema[] = [ |
117 | 117 | }); |
118 | 118 | }, |
119 | 119 | }, |
120 | - { | |
121 | - field: 'organizationId', | |
122 | - label: '所属组织', | |
123 | - colProps: { span: 12 }, | |
124 | - component: 'ApiTreeSelect', | |
125 | - componentProps: { | |
126 | - api: async () => { | |
127 | - const data = await getOrganizationList(); | |
128 | - copyTransFun(data as any as any[]); | |
129 | - // const filterData = data.map((m) => { | |
130 | - // return { | |
131 | - // label: m.label, | |
132 | - // value: m.value, | |
133 | - // }; | |
134 | - // }); | |
135 | - // return filterData; | |
136 | - return data; | |
137 | - }, | |
138 | - onChange: (v) => { | |
139 | - isDeptId.value = v; | |
140 | - }, | |
141 | - }, | |
142 | - ifShow: ({ values }) => isOrg(Reflect.get(values, 'receiverType')), | |
143 | - }, | |
120 | + | |
144 | 121 | { |
145 | 122 | field: 'receiverType', |
146 | 123 | required: true, |
... | ... | @@ -194,6 +171,30 @@ export const formSchema: FormSchema[] = [ |
194 | 171 | // }, |
195 | 172 | }, |
196 | 173 | { |
174 | + field: 'organizationId', | |
175 | + label: '所属组织', | |
176 | + colProps: { span: 12 }, | |
177 | + component: 'ApiTreeSelect', | |
178 | + componentProps: { | |
179 | + api: async () => { | |
180 | + const data = await getOrganizationList(); | |
181 | + copyTransFun(data as any as any[]); | |
182 | + // const filterData = data.map((m) => { | |
183 | + // return { | |
184 | + // label: m.label, | |
185 | + // value: m.value, | |
186 | + // }; | |
187 | + // }); | |
188 | + // return filterData; | |
189 | + return data; | |
190 | + }, | |
191 | + onChange: (v) => { | |
192 | + isDeptId.value = v; | |
193 | + }, | |
194 | + }, | |
195 | + ifShow: ({ values }) => isOrg(Reflect.get(values, 'receiverType')), | |
196 | + }, | |
197 | + { | |
197 | 198 | field: '', |
198 | 199 | component: 'Input', |
199 | 200 | label: '', | ... | ... |
... | ... | @@ -32,7 +32,7 @@ export const formSchema: FormSchema[] = [ |
32 | 32 | required: true, |
33 | 33 | validator: (_, value) => { |
34 | 34 | if (!value) { |
35 | - return Promise.reject('不能为空'); | |
35 | + return Promise.reject('密码不能为空'); | |
36 | 36 | } |
37 | 37 | if (value !== values.passwordNew) { |
38 | 38 | return Promise.reject('两次输入的密码不一致!'); | ... | ... |
... | ... | @@ -36,13 +36,15 @@ export const formSchema: FormSchema[] = [ |
36 | 36 | }, |
37 | 37 | { |
38 | 38 | field: 'isolatedTbRuleEngine', |
39 | - label: '隔离板芯容器的加工', | |
39 | + label: '', | |
40 | 40 | component: 'Checkbox', |
41 | + renderComponentContent: '隔离板芯容器的加工', | |
41 | 42 | }, |
42 | 43 | { |
43 | 44 | field: 'isolatedTbCore', |
44 | - label: '在独立的ThinngsBoard规则引擎中处理', | |
45 | + label: '', | |
45 | 46 | component: 'Checkbox', |
47 | + renderComponentContent: '在独立的ThinngsBoard规则引擎中处理', | |
46 | 48 | }, |
47 | 49 | { |
48 | 50 | field: 'description', | ... | ... |
1 | 1 | import { FormSchema } from '/@/components/Table'; |
2 | +import { numberRule } from '/@/utils/rules'; | |
2 | 3 | |
3 | 4 | export const formSchema: FormSchema[] = [ |
4 | 5 | { |
5 | 6 | field: 'maxDevices', |
6 | 7 | label: '最大设备数(0-无限制)', |
7 | - component: 'InputNumber', | |
8 | + component: 'Input', | |
9 | + colProps: { span: 24 }, | |
8 | 10 | componentProps: { |
9 | 11 | placeholder: '请输入最大设备数', |
10 | 12 | }, |
13 | + rules: numberRule, | |
11 | 14 | }, |
12 | 15 | { |
13 | 16 | field: 'maxAssets', |
14 | 17 | label: '最大资产数(0-无限制)', |
15 | 18 | colProps: { span: 24 }, |
16 | - component: 'InputNumber', | |
19 | + component: 'Input', | |
20 | + rules: numberRule, | |
21 | + | |
17 | 22 | componentProps: { |
18 | 23 | placeholder: '请输入最大资产', |
19 | 24 | }, |
... | ... | @@ -22,7 +27,9 @@ export const formSchema: FormSchema[] = [ |
22 | 27 | field: 'maxCustomers', |
23 | 28 | label: '最大客户数(0-无限制)', |
24 | 29 | colProps: { span: 24 }, |
25 | - component: 'InputNumber', | |
30 | + component: 'Input', | |
31 | + rules: numberRule, | |
32 | + | |
26 | 33 | componentProps: { |
27 | 34 | placeholder: '请输入最大客户数', |
28 | 35 | }, |
... | ... | @@ -31,7 +38,9 @@ export const formSchema: FormSchema[] = [ |
31 | 38 | field: 'maxUsers', |
32 | 39 | label: '最大用户数(0-无限制)', |
33 | 40 | colProps: { span: 24 }, |
34 | - component: 'InputNumber', | |
41 | + component: 'Input', | |
42 | + rules: numberRule, | |
43 | + | |
35 | 44 | componentProps: { |
36 | 45 | placeholder: '请输入最大用户数', |
37 | 46 | }, |
... | ... | @@ -40,7 +49,9 @@ export const formSchema: FormSchema[] = [ |
40 | 49 | field: 'maxDashboards', |
41 | 50 | label: '仪表板的最大数量(0-无限制)', |
42 | 51 | colProps: { span: 24 }, |
43 | - component: 'InputNumber', | |
52 | + component: 'Input', | |
53 | + rules: numberRule, | |
54 | + | |
44 | 55 | componentProps: { |
45 | 56 | placeholder: '请输入仪表板的最大数量', |
46 | 57 | }, |
... | ... | @@ -49,25 +60,31 @@ export const formSchema: FormSchema[] = [ |
49 | 60 | field: 'maxRuleChains', |
50 | 61 | label: '最大规则链数(0-无限制)', |
51 | 62 | colProps: { span: 24 }, |
52 | - component: 'InputNumber', | |
63 | + component: 'Input', | |
64 | + rules: numberRule, | |
65 | + | |
53 | 66 | componentProps: { |
54 | 67 | placeholder: '请输入最大规则链数', |
55 | 68 | }, |
56 | 69 | }, |
57 | 70 | { |
58 | 71 | field: 'maxResourcesInBytes', |
59 | - label: 'Maximun sum of resource files in bytes(0-unlimited)', | |
72 | + label: '以字节为单位的资源文件的最大总和(0-无限制)', | |
60 | 73 | colProps: { span: 24 }, |
61 | - component: 'InputNumber', | |
74 | + component: 'Input', | |
75 | + rules: numberRule, | |
76 | + | |
62 | 77 | componentProps: { |
63 | 78 | placeholder: '请输入', |
64 | 79 | }, |
65 | 80 | }, |
66 | 81 | { |
67 | 82 | field: 'maxOtaPackagesInBytes', |
68 | - label: 'Maximun sum of ota packages files size in bytes(0-unlimited)', | |
83 | + label: 'Ota包文件大小的最大总和(字节)(0-无限制)', | |
69 | 84 | colProps: { span: 24 }, |
70 | - component: 'InputNumber', | |
85 | + component: 'Input', | |
86 | + rules: numberRule, | |
87 | + | |
71 | 88 | componentProps: { |
72 | 89 | placeholder: '请输入', |
73 | 90 | }, |
... | ... | @@ -76,7 +93,9 @@ export const formSchema: FormSchema[] = [ |
76 | 93 | field: 'maxTransportMessages', |
77 | 94 | label: '最大传输消息数(0-无限制)', |
78 | 95 | colProps: { span: 24 }, |
79 | - component: 'InputNumber', | |
96 | + component: 'Input', | |
97 | + rules: numberRule, | |
98 | + | |
80 | 99 | componentProps: { |
81 | 100 | placeholder: '请输入最大传输消息数', |
82 | 101 | }, |
... | ... | @@ -85,7 +104,9 @@ export const formSchema: FormSchema[] = [ |
85 | 104 | field: 'maxTransportDataPoints', |
86 | 105 | label: '传输数据点的最大数量(0-无限制)', |
87 | 106 | colProps: { span: 24 }, |
88 | - component: 'InputNumber', | |
107 | + component: 'Input', | |
108 | + rules: numberRule, | |
109 | + | |
89 | 110 | componentProps: { |
90 | 111 | placeholder: '请输入传输数据点的最大数量', |
91 | 112 | }, |
... | ... | @@ -94,7 +115,9 @@ export const formSchema: FormSchema[] = [ |
94 | 115 | field: 'maxREExecutions', |
95 | 116 | label: '最大规则引擎数(0-无限制)', |
96 | 117 | colProps: { span: 24 }, |
97 | - component: 'InputNumber', | |
118 | + component: 'Input', | |
119 | + rules: numberRule, | |
120 | + | |
98 | 121 | componentProps: { |
99 | 122 | placeholder: '请输入最大规则引擎数', |
100 | 123 | }, |
... | ... | @@ -104,7 +127,9 @@ export const formSchema: FormSchema[] = [ |
104 | 127 | field: 'maxJSExecutions', |
105 | 128 | label: '最大JavaScript执行数(0-不受限制)', |
106 | 129 | colProps: { span: 24 }, |
107 | - component: 'InputNumber', | |
130 | + component: 'Input', | |
131 | + rules: numberRule, | |
132 | + | |
108 | 133 | componentProps: { |
109 | 134 | placeholder: '请输入最大JavaScript执行数', |
110 | 135 | }, |
... | ... | @@ -113,7 +138,9 @@ export const formSchema: FormSchema[] = [ |
113 | 138 | field: 'maxDPStorageDays', |
114 | 139 | label: '最大日存储数据点数(0-无限制)', |
115 | 140 | colProps: { span: 24 }, |
116 | - component: 'InputNumber', | |
141 | + component: 'Input', | |
142 | + rules: numberRule, | |
143 | + | |
117 | 144 | componentProps: { |
118 | 145 | placeholder: '请输入最大日存储数据点数', |
119 | 146 | }, |
... | ... | @@ -122,25 +149,31 @@ export const formSchema: FormSchema[] = [ |
122 | 149 | field: 'defaultStorageTtlDays', |
123 | 150 | label: '默认存储 TTL 天数(0-无限制)', |
124 | 151 | colProps: { span: 24 }, |
125 | - component: 'InputNumber', | |
152 | + component: 'Input', | |
153 | + rules: numberRule, | |
154 | + | |
126 | 155 | componentProps: { |
127 | 156 | placeholder: '请输入默认存储 TTL 天数', |
128 | 157 | }, |
129 | 158 | }, |
130 | 159 | { |
131 | 160 | field: 'alarmsTtlDays', |
132 | - label: 'Alams TTL days(0-unlimaited)', | |
161 | + label: 'Alams TTL days(0-无限制)', | |
133 | 162 | colProps: { span: 24 }, |
134 | - component: 'InputNumber', | |
163 | + component: 'Input', | |
164 | + rules: numberRule, | |
165 | + | |
135 | 166 | componentProps: { |
136 | 167 | placeholder: '请输入Alams TTL days', |
137 | 168 | }, |
138 | 169 | }, |
139 | 170 | { |
140 | 171 | field: 'rpcTtlDays', |
141 | - label: 'RPC TTL days(0-unlimaited)', | |
172 | + label: 'RPC TTL days(0-无限制)', | |
142 | 173 | colProps: { span: 24 }, |
143 | - component: 'InputNumber', | |
174 | + component: 'Input', | |
175 | + rules: numberRule, | |
176 | + | |
144 | 177 | componentProps: { |
145 | 178 | placeholder: '请输入RPC TTL days', |
146 | 179 | }, |
... | ... | @@ -149,7 +182,9 @@ export const formSchema: FormSchema[] = [ |
149 | 182 | field: 'maxRuleNodeExecutionsPerMessage', |
150 | 183 | label: '每条消息的最大规则节点执行数(0-无限制)', |
151 | 184 | colProps: { span: 24 }, |
152 | - component: 'InputNumber', | |
185 | + component: 'Input', | |
186 | + rules: numberRule, | |
187 | + | |
153 | 188 | componentProps: { |
154 | 189 | placeholder: '请输入每条消息的最大规则节点执行数', |
155 | 190 | }, |
... | ... | @@ -158,7 +193,9 @@ export const formSchema: FormSchema[] = [ |
158 | 193 | field: 'maxEmails', |
159 | 194 | label: '发送的最大电子邮件数(0-无限制)', |
160 | 195 | colProps: { span: 24 }, |
161 | - component: 'InputNumber', | |
196 | + component: 'Input', | |
197 | + rules: numberRule, | |
198 | + | |
162 | 199 | componentProps: { |
163 | 200 | placeholder: '请输入发送的最大电子邮件数', |
164 | 201 | }, |
... | ... | @@ -167,16 +204,19 @@ export const formSchema: FormSchema[] = [ |
167 | 204 | field: 'maxSms', |
168 | 205 | label: '发送的最大短信数(0-无限制)', |
169 | 206 | colProps: { span: 24 }, |
170 | - component: 'InputNumber', | |
207 | + component: 'Input', | |
208 | + rules: numberRule, | |
209 | + | |
171 | 210 | componentProps: { |
172 | 211 | placeholder: '请输入发送的最大短信数', |
173 | 212 | }, |
174 | 213 | }, |
175 | 214 | { |
176 | 215 | field: 'maxCreatedAlarms', |
177 | - label: 'Maximum number of alarms created (0 - unlimited)', | |
216 | + label: '创建的最大报警数 (0 - 无限制)', | |
178 | 217 | colProps: { span: 24 }, |
179 | - component: 'InputNumber', | |
218 | + component: 'Input', | |
219 | + rules: numberRule, | |
180 | 220 | componentProps: { |
181 | 221 | placeholder: '请输入maxCreatedAlarms', |
182 | 222 | }, |
... | ... | @@ -186,6 +226,7 @@ export const formSchema: FormSchema[] = [ |
186 | 226 | label: '传输租户消息速率限制', |
187 | 227 | colProps: { span: 24 }, |
188 | 228 | component: 'Input', |
229 | + | |
189 | 230 | componentProps: { |
190 | 231 | placeholder: '请输入传输租户消息速率限制', |
191 | 232 | }, |
... | ... | @@ -195,6 +236,7 @@ export const formSchema: FormSchema[] = [ |
195 | 236 | label: '租户遥测消息速率限制', |
196 | 237 | colProps: { span: 24 }, |
197 | 238 | component: 'Input', |
239 | + | |
198 | 240 | componentProps: { |
199 | 241 | placeholder: '请输入租户遥测消息速率限制', |
200 | 242 | }, |
... | ... | @@ -204,6 +246,7 @@ export const formSchema: FormSchema[] = [ |
204 | 246 | label: '租户遥测数据点速率限制', |
205 | 247 | colProps: { span: 24 }, |
206 | 248 | component: 'Input', |
249 | + | |
207 | 250 | componentProps: { |
208 | 251 | placeholder: '请输入租户遥测数据点速率限制', |
209 | 252 | }, |
... | ... | @@ -213,6 +256,7 @@ export const formSchema: FormSchema[] = [ |
213 | 256 | label: '传输设备消息速率限制', |
214 | 257 | colProps: { span: 24 }, |
215 | 258 | component: 'Input', |
259 | + | |
216 | 260 | componentProps: { |
217 | 261 | placeholder: '请输入传输设备消息速率限制', |
218 | 262 | }, |
... | ... | @@ -222,6 +266,7 @@ export const formSchema: FormSchema[] = [ |
222 | 266 | label: '设备遥测消息速率限制', |
223 | 267 | colProps: { span: 24 }, |
224 | 268 | component: 'Input', |
269 | + | |
225 | 270 | componentProps: { |
226 | 271 | placeholder: '请输入设备遥测消息速率限制', |
227 | 272 | }, | ... | ... |