Commit bf330c42b3dfb5dfc098d7650fb21ee2f60cfe17
Merge branch 'ft' into 'main'
fix:[DEFECT-329] 修复设备配置批量删除不提示问题 See merge request huang/yun-teng-iot-front!193
Showing
8 changed files
with
36 additions
and
22 deletions
@@ -250,8 +250,9 @@ | @@ -250,8 +250,9 @@ | ||
250 | handleSuccess(); | 250 | handleSuccess(); |
251 | selectedRowKeys.length = 0; | 251 | selectedRowKeys.length = 0; |
252 | }) | 252 | }) |
253 | - .catch(() => { | 253 | + .catch((e) => { |
254 | selectedRowKeys.length = 0; | 254 | selectedRowKeys.length = 0; |
255 | + createMessage.error(e); | ||
255 | }); | 256 | }); |
256 | selectedRowKeys.length = 0; | 257 | selectedRowKeys.length = 0; |
257 | }; | 258 | }; |
@@ -124,6 +124,7 @@ | @@ -124,6 +124,7 @@ | ||
124 | }); | 124 | }); |
125 | const handleCancel = () => { | 125 | const handleCancel = () => { |
126 | defineClearFunc(); | 126 | defineClearFunc(); |
127 | + closeModal(); | ||
127 | }; | 128 | }; |
128 | const defineClearFunc = () => { | 129 | const defineClearFunc = () => { |
129 | nextTick(() => { | 130 | nextTick(() => { |
@@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
81 | </div> | 81 | </div> |
82 | </template> | 82 | </template> |
83 | <script lang="ts"> | 83 | <script lang="ts"> |
84 | - import { defineComponent, ref, reactive } from 'vue'; | 84 | + import { defineComponent, ref, reactive, nextTick } from 'vue'; |
85 | import { BasicForm, useForm } from '/@/components/Form'; | 85 | import { BasicForm, useForm } from '/@/components/Form'; |
86 | import { modeApiForm, modeApiInseretKeyAndValueForm } from '../config'; | 86 | import { modeApiForm, modeApiInseretKeyAndValueForm } from '../config'; |
87 | import { InboxOutlined } from '@ant-design/icons-vue'; | 87 | import { InboxOutlined } from '@ant-design/icons-vue'; |
@@ -150,8 +150,10 @@ | @@ -150,8 +150,10 @@ | ||
150 | }); | 150 | }); |
151 | }; | 151 | }; |
152 | const customClearStepTwoValueFunc = async () => { | 152 | const customClearStepTwoValueFunc = async () => { |
153 | - defineClearFunc(); | ||
154 | - defineClearKeyAndValueFunc(); | 153 | + nextTick(() => { |
154 | + defineClearFunc(); | ||
155 | + defineClearKeyAndValueFunc(); | ||
156 | + }); | ||
155 | }; | 157 | }; |
156 | async function customResetFunc() { | 158 | async function customResetFunc() { |
157 | emit('prev'); | 159 | emit('prev'); |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | </div> | 26 | </div> |
27 | </template> | 27 | </template> |
28 | <script lang="ts"> | 28 | <script lang="ts"> |
29 | - import { defineComponent, ref, reactive } from 'vue'; | 29 | + import { defineComponent, ref, reactive, nextTick } from 'vue'; |
30 | import { BasicForm, useForm } from '/@/components/Form'; | 30 | import { BasicForm, useForm } from '/@/components/Form'; |
31 | import { modeKafkaForm, modeKafkaInseretKeyAndValueForm } from '../config'; | 31 | import { modeKafkaForm, modeKafkaInseretKeyAndValueForm } from '../config'; |
32 | import { Alert, Divider, Descriptions } from 'ant-design-vue'; | 32 | import { Alert, Divider, Descriptions } from 'ant-design-vue'; |
@@ -102,8 +102,10 @@ | @@ -102,8 +102,10 @@ | ||
102 | }; | 102 | }; |
103 | 103 | ||
104 | const customClearStepTwoValueFunc = async () => { | 104 | const customClearStepTwoValueFunc = async () => { |
105 | - defineClearFunc(); | ||
106 | - defineClearKeyAndValueFunc(); | 105 | + nextTick(() => { |
106 | + defineClearFunc(); | ||
107 | + defineClearKeyAndValueFunc(); | ||
108 | + }); | ||
107 | }; | 109 | }; |
108 | async function customResetFunc() { | 110 | async function customResetFunc() { |
109 | emit('prev'); | 111 | emit('prev'); |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | </div> | 62 | </div> |
63 | </template> | 63 | </template> |
64 | <script lang="ts"> | 64 | <script lang="ts"> |
65 | - import { defineComponent, ref, reactive } from 'vue'; | 65 | + import { defineComponent, ref, reactive, nextTick } from 'vue'; |
66 | import { BasicForm, useForm } from '/@/components/Form'; | 66 | import { BasicForm, useForm } from '/@/components/Form'; |
67 | import { CredentialsEnum, modeMqttForm } from '../config'; | 67 | import { CredentialsEnum, modeMqttForm } from '../config'; |
68 | import { InboxOutlined } from '@ant-design/icons-vue'; | 68 | import { InboxOutlined } from '@ant-design/icons-vue'; |
@@ -115,7 +115,9 @@ | @@ -115,7 +115,9 @@ | ||
115 | }); | 115 | }); |
116 | }; | 116 | }; |
117 | const customClearStepTwoValueFunc = async () => { | 117 | const customClearStepTwoValueFunc = async () => { |
118 | - defineClearFunc(); | 118 | + nextTick(() => { |
119 | + defineClearFunc(); | ||
120 | + }); | ||
119 | }; | 121 | }; |
120 | async function customResetFunc() { | 122 | async function customResetFunc() { |
121 | emit('prev'); | 123 | emit('prev'); |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | </div> | 24 | </div> |
25 | </template> | 25 | </template> |
26 | <script lang="ts"> | 26 | <script lang="ts"> |
27 | - import { defineComponent, ref, reactive } from 'vue'; | 27 | + import { defineComponent, ref, reactive, nextTick } from 'vue'; |
28 | import { BasicForm, useForm } from '/@/components/Form'; | 28 | import { BasicForm, useForm } from '/@/components/Form'; |
29 | import { modeRabbitMqForm, modeKafkaInseretKeyAndValueForm } from '../config'; | 29 | import { modeRabbitMqForm, modeKafkaInseretKeyAndValueForm } from '../config'; |
30 | 30 | ||
@@ -84,7 +84,9 @@ | @@ -84,7 +84,9 @@ | ||
84 | }); | 84 | }); |
85 | }; | 85 | }; |
86 | const customClearStepTwoValueFunc = async () => { | 86 | const customClearStepTwoValueFunc = async () => { |
87 | - defineClearFunc(); | 87 | + nextTick(() => { |
88 | + defineClearFunc(); | ||
89 | + }); | ||
88 | }; | 90 | }; |
89 | async function customResetFunc() { | 91 | async function customResetFunc() { |
90 | emit('prev'); | 92 | emit('prev'); |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | </div> | 4 | </div> |
5 | </template> | 5 | </template> |
6 | <script lang="ts"> | 6 | <script lang="ts"> |
7 | - import { defineComponent, ref } from 'vue'; | 7 | + import { defineComponent, ref, nextTick } from 'vue'; |
8 | import { BasicForm, useForm } from '/@/components/Form'; | 8 | import { BasicForm, useForm } from '/@/components/Form'; |
9 | import { modeForm } from './config'; | 9 | import { modeForm } from './config'; |
10 | import { Select, Input, Divider } from 'ant-design-vue'; | 10 | import { Select, Input, Divider } from 'ant-design-vue'; |
@@ -46,7 +46,9 @@ | @@ -46,7 +46,9 @@ | ||
46 | 46 | ||
47 | //清空数据 | 47 | //清空数据 |
48 | const customResetStepOneFunc = () => { | 48 | const customResetStepOneFunc = () => { |
49 | - resetFields(); | 49 | + nextTick(() => { |
50 | + resetFields(); | ||
51 | + }); | ||
50 | }; | 52 | }; |
51 | const getSonValueFunc = async () => { | 53 | const getSonValueFunc = async () => { |
52 | sonValues.value = await validateFields(); | 54 | sonValues.value = await validateFields(); |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | </div> | 17 | </div> |
18 | </template> | 18 | </template> |
19 | <script lang="ts"> | 19 | <script lang="ts"> |
20 | - import { defineComponent, watch, ref, getCurrentInstance } from 'vue'; | 20 | + import { defineComponent, watch, ref, getCurrentInstance, nextTick } from 'vue'; |
21 | import TransferConfigKafka from '../cpns/cpns/transferConfigKafka.vue'; | 21 | import TransferConfigKafka from '../cpns/cpns/transferConfigKafka.vue'; |
22 | import TransferConfigMqtt from '../cpns/cpns/transferConfigMqtt.vue'; | 22 | import TransferConfigMqtt from '../cpns/cpns/transferConfigMqtt.vue'; |
23 | import TransferConfigRabbitMq from '../cpns/cpns/transferConfigRabbitMq.vue'; | 23 | import TransferConfigRabbitMq from '../cpns/cpns/transferConfigRabbitMq.vue'; |
@@ -57,14 +57,16 @@ | @@ -57,14 +57,16 @@ | ||
57 | } | 57 | } |
58 | ); | 58 | ); |
59 | const clearSonValueDataFunc = () => { | 59 | const clearSonValueDataFunc = () => { |
60 | - try { | ||
61 | - proxy.$refs.refTransferConfigKafka?.customClearStepTwoValueFunc(); | ||
62 | - proxy.$refs.refTransferConfigMqtt?.customClearStepTwoValueFunc(); | ||
63 | - proxy.$refs.refTransferConfigRabbitMq?.customClearStepTwoValueFunc(); | ||
64 | - proxy.$refs.refTransferConfigApi?.customClearStepTwoValueFunc(); | ||
65 | - } catch (e) { | ||
66 | - return e; | ||
67 | - } | 60 | + nextTick(() => { |
61 | + try { | ||
62 | + proxy.$refs.refTransferConfigKafka?.customClearStepTwoValueFunc(); | ||
63 | + proxy.$refs.refTransferConfigMqtt?.customClearStepTwoValueFunc(); | ||
64 | + proxy.$refs.refTransferConfigRabbitMq?.customClearStepTwoValueFunc(); | ||
65 | + proxy.$refs.refTransferConfigApi?.customClearStepTwoValueFunc(); | ||
66 | + } catch (e) { | ||
67 | + return e; | ||
68 | + } | ||
69 | + }); | ||
68 | }; | 70 | }; |
69 | const clearSonValueValidateFunc = () => { | 71 | const clearSonValueValidateFunc = () => { |
70 | try { | 72 | try { |