Commit 12028af0116d810484d0cd50bad3d84b9cff9624
Merge branch 'fengtao' into 'main_dev'
perf: 优化视频配置代码,如果是萤石云则暂时隐藏云台控制 See merge request yunteng/thingskit-front!1189
Showing
3 changed files
with
10 additions
and
25 deletions
@@ -191,20 +191,13 @@ | @@ -191,20 +191,13 @@ | ||
191 | const handleViewVideo = (record) => { | 191 | const handleViewVideo = (record) => { |
192 | const { videoPlatformDTO } = record; | 192 | const { videoPlatformDTO } = record; |
193 | const { type } = videoPlatformDTO || {}; | 193 | const { type } = videoPlatformDTO || {}; |
194 | - if ( | ||
195 | - record.accessMode === AccessMode.ManuallyEnter || | ||
196 | - (record.accessMode === AccessMode.Streaming && type === VideoPlatformEnum.FLUORITE) | ||
197 | - ) { | ||
198 | - openModal(true, { | ||
199 | - isUpdate: true, | ||
200 | - record, | ||
201 | - }); | ||
202 | - return; | ||
203 | - } | ||
204 | - openModal1(true, { | 194 | + const commonRecord = { |
205 | isUpdate: true, | 195 | isUpdate: true, |
206 | record, | 196 | record, |
207 | - }); | 197 | + }; |
198 | + if (record.accessMode === AccessMode.Streaming && type === VideoPlatformEnum.HAIKANG) | ||
199 | + openModal1(true, commonRecord); | ||
200 | + else openModal(true, commonRecord); | ||
208 | }; | 201 | }; |
209 | 202 | ||
210 | const handleSwitchMode = () => { | 203 | const handleSwitchMode = () => { |
@@ -30,9 +30,7 @@ | @@ -30,9 +30,7 @@ | ||
30 | cancel-text="取消" | 30 | cancel-text="取消" |
31 | @confirm="handleBatchPublish('batchPublish')" | 31 | @confirm="handleBatchPublish('batchPublish')" |
32 | > | 32 | > |
33 | - <a-button :style="publishButtonBg" :disabled="hasBatchPublish"> | ||
34 | - <span :style="publishButtonTextColor">批量发布</span> | ||
35 | - </a-button> | 33 | + <a-button color="primary" :disabled="hasBatchPublish"> 批量发布 </a-button> |
36 | </Popconfirm> | 34 | </Popconfirm> |
37 | </Authority> | 35 | </Authority> |
38 | <!-- <Popconfirm | 36 | <!-- <Popconfirm |
@@ -95,7 +93,7 @@ | @@ -95,7 +93,7 @@ | ||
95 | <PublicApiForm @register="registerDrawer" @success="handleSuccess" /> | 93 | <PublicApiForm @register="registerDrawer" @success="handleSuccess" /> |
96 | </template> | 94 | </template> |
97 | <script lang="ts" setup name="list"> | 95 | <script lang="ts" setup name="list"> |
98 | - import { h, ref, computed } from 'vue'; | 96 | + import { h, ref } from 'vue'; |
99 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 97 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
100 | import { useDrawer } from '/@/components/Drawer'; | 98 | import { useDrawer } from '/@/components/Drawer'; |
101 | import { columns, searchFormSchema } from './config/config'; | 99 | import { columns, searchFormSchema } from './config/config'; |
@@ -152,14 +150,6 @@ | @@ -152,14 +150,6 @@ | ||
152 | 150 | ||
153 | const { createMessage } = useMessage(); | 151 | const { createMessage } = useMessage(); |
154 | 152 | ||
155 | - const publishButtonBg = computed(() => { | ||
156 | - return { backgroundColor: `rgba(0, 128, 0, ${hasBatchPublish.value ? 0.5 : 1})` }; | ||
157 | - }); | ||
158 | - | ||
159 | - const publishButtonTextColor = computed(() => { | ||
160 | - return { color: `rgba(255, 255, 255, ${hasBatchPublish.value ? 0.5 : 1})` }; | ||
161 | - }); | ||
162 | - | ||
163 | const handleSuccess = () => { | 153 | const handleSuccess = () => { |
164 | reload(); | 154 | reload(); |
165 | setStatusIsTrue(); | 155 | setStatusIsTrue(); |
@@ -154,7 +154,9 @@ | @@ -154,7 +154,9 @@ | ||
154 | :value="getInputValue" | 154 | :value="getInputValue" |
155 | @change="handleSyncValue" | 155 | @change="handleSyncValue" |
156 | :disabled="disabled" | 156 | :disabled="disabled" |
157 | - :placeholder="`请输入${inputType === AddressTypeEnum.DEC ? '十进制' : '十六进制'}设备地址码`" | 157 | + :placeholder="`请输入${ |
158 | + inputType === AddressTypeEnum.DEC ? '十进制' : '十六进制' | ||
159 | + }寄存器地址码`" | ||
158 | /> | 160 | /> |
159 | <div class="text-center h-8 leading-8 px-2 bg-gray-200 cursor-pointer rounded-1 w-20"> | 161 | <div class="text-center h-8 leading-8 px-2 bg-gray-200 cursor-pointer rounded-1 w-20"> |
160 | <div>{{ getValueOpposite }}</div> | 162 | <div>{{ getValueOpposite }}</div> |