Commit 1aa2e4a8a43b2b7d7d3225f7c235c7ba8e3cb5cf
Merge branch 'f-dev' into 'main'
fix:修改设备配置,图片编辑后未显示问题 See merge request huang/yun-teng-iot-front!318
Showing
5 changed files
with
27 additions
and
21 deletions
@@ -174,7 +174,9 @@ export const useUserStore = defineStore({ | @@ -174,7 +174,9 @@ export const useUserStore = defineStore({ | ||
174 | const data = await smsCodeLoginApi(loginParams, mode); | 174 | const data = await smsCodeLoginApi(loginParams, mode); |
175 | return this.process(data, goHome); | 175 | return this.process(data, goHome); |
176 | } catch (error) { | 176 | } catch (error) { |
177 | - return Promise.reject(error); | 177 | + const { createMessage } = useMessage(); |
178 | + createMessage.error(error?.message || ''); | ||
179 | + // return Promise.reject(error); | ||
178 | } | 180 | } |
179 | }, | 181 | }, |
180 | async getMyUserInfoAction(): Promise<UserInfo> { | 182 | async getMyUserInfoAction(): Promise<UserInfo> { |
@@ -96,13 +96,13 @@ | @@ -96,13 +96,13 @@ | ||
96 | :actions="[ | 96 | :actions="[ |
97 | { | 97 | { |
98 | label: '编辑', | 98 | label: '编辑', |
99 | - auth: 'api:yt:streaming:update', | 99 | + auth: 'api:yt:video:platform:update', |
100 | icon: 'clarity:note-edit-line', | 100 | icon: 'clarity:note-edit-line', |
101 | onClick: handleUpdateStreamingMedia.bind(null, record), | 101 | onClick: handleUpdateStreamingMedia.bind(null, record), |
102 | }, | 102 | }, |
103 | { | 103 | { |
104 | label: '删除', | 104 | label: '删除', |
105 | - auth: 'api:yt:streaming:delete', | 105 | + auth: 'api:yt:video:platform:delete', |
106 | icon: 'ant-design:delete-outlined', | 106 | icon: 'ant-design:delete-outlined', |
107 | color: 'error', | 107 | color: 'error', |
108 | popConfirm: { | 108 | popConfirm: { |
@@ -114,10 +114,10 @@ | @@ -114,10 +114,10 @@ | ||
114 | /> | 114 | /> |
115 | </template> | 115 | </template> |
116 | <template #toolbar> | 116 | <template #toolbar> |
117 | - <Authority value="api:yt:streaming:post"> | 117 | + <Authority value="api:yt:video:platform:post"> |
118 | <a-button type="primary" @click="handleCreateStreamingMedia">新增流媒体</a-button> | 118 | <a-button type="primary" @click="handleCreateStreamingMedia">新增流媒体</a-button> |
119 | </Authority> | 119 | </Authority> |
120 | - <Authority value="api:yt:streaming:delete"> | 120 | + <Authority value="api:yt:video:platform:delete"> |
121 | <Popconfirm | 121 | <Popconfirm |
122 | title="您确定要批量删除数据" | 122 | title="您确定要批量删除数据" |
123 | ok-text="确定" | 123 | ok-text="确定" |
@@ -120,17 +120,17 @@ | @@ -120,17 +120,17 @@ | ||
120 | proxy.$refs.DeviceProfileStep1Ref.editOrAddNameStatus(false); | 120 | proxy.$refs.DeviceProfileStep1Ref.editOrAddNameStatus(false); |
121 | } | 121 | } |
122 | noEditObj = { | 122 | noEditObj = { |
123 | - id: editData.value.id, | ||
124 | name: editData.value?.name, | 123 | name: editData.value?.name, |
125 | createTime: createTime.value, | 124 | createTime: createTime.value, |
126 | transportType: editTransportType.value, | 125 | transportType: editTransportType.value, |
127 | type: editData.value?.type, | 126 | type: editData.value?.type, |
128 | profileData: editData.value?.profileData, | 127 | profileData: editData.value?.profileData, |
129 | defaultQueueName: editData.value.defaultQueueName, | 128 | defaultQueueName: editData.value.defaultQueueName, |
130 | - image: editData.value.image, | 129 | + id: editData.value.id, |
131 | defaultRuleChainId: editData.value.defaultRuleChainId, | 130 | defaultRuleChainId: editData.value.defaultRuleChainId, |
132 | - description: editData.value.description, | ||
133 | tenantId: editData.value.tenantId, | 131 | tenantId: editData.value.tenantId, |
132 | + image: editData.value.image, | ||
133 | + description: editData.value.description, | ||
134 | default: editData.value.default, | 134 | default: editData.value.default, |
135 | }; | 135 | }; |
136 | } else if (isUpdate.value == 3) { | 136 | } else if (isUpdate.value == 3) { |
@@ -171,7 +171,11 @@ | @@ -171,7 +171,11 @@ | ||
171 | let getPic = null; | 171 | let getPic = null; |
172 | const getStep1Obj = await proxy.$refs.DeviceProfileStep1Ref?.getStep1Func(); | 172 | const getStep1Obj = await proxy.$refs.DeviceProfileStep1Ref?.getStep1Func(); |
173 | getPic = getStep1Obj.icon; | 173 | getPic = getStep1Obj.icon; |
174 | - Object.assign(noEditObj, { image: getPic }, getStep1Obj.key); | 174 | + getStepOneData = { |
175 | + ...getStep1Obj.key, | ||
176 | + ...{ image: getPic }, | ||
177 | + }; | ||
178 | + Object.assign(noEditObj, getStepOneData); | ||
175 | }); | 179 | }); |
176 | } | 180 | } |
177 | } | 181 | } |
@@ -206,7 +210,7 @@ | @@ -206,7 +210,7 @@ | ||
206 | ...getStep1Obj.key, | 210 | ...getStep1Obj.key, |
207 | ...{ image: getPic }, | 211 | ...{ image: getPic }, |
208 | }; | 212 | }; |
209 | - Object.assign(noEditObj, { image: getPic }, getStep1Obj.key); | 213 | + Object.assign(noEditObj, getStepOneData); |
210 | } | 214 | } |
211 | const id = isUpdate.value == 1 ? '' : postEditId.value; | 215 | const id = isUpdate.value == 1 ? '' : postEditId.value; |
212 | const postDefaultVal = | 216 | const postDefaultVal = |
@@ -2,13 +2,13 @@ | @@ -2,13 +2,13 @@ | ||
2 | <div> | 2 | <div> |
3 | <BasicTable :clickToRowSelect="false" @register="registerTable" :searchInfo="searchInfo"> | 3 | <BasicTable :clickToRowSelect="false" @register="registerTable" :searchInfo="searchInfo"> |
4 | <template #toolbar> | 4 | <template #toolbar> |
5 | - <Authority value="api:yt:report:post"> | 5 | + <Authority value="api:yt:report_form:config:post"> |
6 | <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增报表 </a-button> | 6 | <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增报表 </a-button> |
7 | </Authority> | 7 | </Authority> |
8 | <Authority value="api:yt:report:get"> | 8 | <Authority value="api:yt:report:get"> |
9 | <a-button type="primary" @click="go('/report/export')"> 下载报表 </a-button> | 9 | <a-button type="primary" @click="go('/report/export')"> 下载报表 </a-button> |
10 | </Authority> | 10 | </Authority> |
11 | - <Authority value="api:yt:report:delete"> | 11 | + <Authority value="api:yt:report_form:config:delete"> |
12 | <Popconfirm | 12 | <Popconfirm |
13 | title="您确定要批量删除数据" | 13 | title="您确定要批量删除数据" |
14 | ok-text="确定" | 14 | ok-text="确定" |
@@ -36,14 +36,14 @@ | @@ -36,14 +36,14 @@ | ||
36 | { | 36 | { |
37 | label: '编辑', | 37 | label: '编辑', |
38 | icon: 'clarity:note-edit-line', | 38 | icon: 'clarity:note-edit-line', |
39 | - auth: 'api:yt:report:update', | 39 | + auth: 'api:yt:report_form:config:update', |
40 | onClick: handleCreateOrEdit.bind(null, record), | 40 | onClick: handleCreateOrEdit.bind(null, record), |
41 | ifShow: record.status === 0, | 41 | ifShow: record.status === 0, |
42 | }, | 42 | }, |
43 | { | 43 | { |
44 | label: '删除', | 44 | label: '删除', |
45 | icon: 'ant-design:delete-outlined', | 45 | icon: 'ant-design:delete-outlined', |
46 | - auth: 'api:yt:report:delete', | 46 | + auth: 'api:yt:report_form:config:delete', |
47 | color: 'error', | 47 | color: 'error', |
48 | ifShow: record.status === 0, | 48 | ifShow: record.status === 0, |
49 | popConfirm: { | 49 | popConfirm: { |
@@ -120,12 +120,12 @@ | @@ -120,12 +120,12 @@ | ||
120 | link.rel = 'shortcut icon'; | 120 | link.rel = 'shortcut icon'; |
121 | link.href = userStore.platInfo?.icon ?? '/favicon.ico'; | 121 | link.href = userStore.platInfo?.icon ?? '/favicon.ico'; |
122 | document.getElementsByTagName('head')[0].appendChild(link); | 122 | document.getElementsByTagName('head')[0].appendChild(link); |
123 | - logoUrl.value = userStore.platInfo?.background; | ||
124 | - if (logoUrl.value !== undefined) { | ||
125 | - ifCustom.value = false; | ||
126 | - } else { | ||
127 | - logoUrl.value = 'url(' + defaultShowLogoImg + ')'; | ||
128 | - } | 123 | + // logoUrl.value = userStore.platInfo?.background; |
124 | + // if (logoUrl.value !== undefined) { | ||
125 | + // ifCustom.value = false; | ||
126 | + // } else { | ||
127 | + // logoUrl.value = 'url(' + defaultShowLogoImg + ')'; | ||
128 | + // } | ||
129 | return userStore.platInfo?.name ?? title; | 129 | return userStore.platInfo?.name ?? title; |
130 | }); | 130 | }); |
131 | // const globSetting = useGlobSetting(); | 131 | // const globSetting = useGlobSetting(); |
@@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
146 | background-color: @dark-bg; | 146 | background-color: @dark-bg; |
147 | 147 | ||
148 | &::before { | 148 | &::before { |
149 | - background-image: url(/@/assets/svg/login-bg-dark.svg); | 149 | + // background-image: url(/@/assets/svg/login-bg-dark.svg); |
150 | } | 150 | } |
151 | 151 | ||
152 | .ant-input, | 152 | .ant-input, |