Commit 24d763c2db569cd50ae1fd16efeacfaae267f5e0

Authored by xp.Huang
2 parents a9ddc543 4ad44251

Merge branch 'f-dev' into 'main'

pref:优化设备地理位置接口

See merge request huang/yun-teng-iot-front!311
@@ -7,18 +7,12 @@ @@ -7,18 +7,12 @@
7 </template> 7 </template>
8 8
9 <script lang="ts" setup> 9 <script lang="ts" setup>
10 -import { ConfigProvider } from 'ant-design-vue';  
11 -import { AppProvider } from '/@/components/Application';  
12 -import { useTitle } from '/@/hooks/web/useTitle';  
13 -import { useLocale } from '/@/locales/useLocale';  
14 -// support Multi-language  
15 -const { getAntdLocale } = useLocale(); 10 + import { ConfigProvider } from 'ant-design-vue';
  11 + import { AppProvider } from '/@/components/Application';
  12 + import { useTitle } from '/@/hooks/web/useTitle';
  13 + import { useLocale } from '/@/locales/useLocale';
  14 + // support Multi-language
  15 + const { getAntdLocale } = useLocale();
16 16
17 -useTitle();  
18 -</script>  
19 -  
20 -<style lang="less">  
21 -/deep/.ant-message-notice-content {  
22 - max-width: 600px !important;  
23 -}  
24 -</style>  
  17 + useTitle();
  18 +</script>
@@ -3,7 +3,7 @@ import { defHttp } from '/@/utils/http/axios'; @@ -3,7 +3,7 @@ import { defHttp } from '/@/utils/http/axios';
3 // 获取设备配置 3 // 获取设备配置
4 export const getDeviceProfile = () => { 4 export const getDeviceProfile = () => {
5 return defHttp.get({ 5 return defHttp.get({
6 - url: '/deviceProfile/me/list', 6 + url: '/device_profile/me/list',
7 }); 7 });
8 }; 8 };
9 9
@@ -15,10 +15,10 @@ @@ -15,10 +15,10 @@
15 </Tag> 15 </Tag>
16 </template> 16 </template>
17 <template #toolbar> 17 <template #toolbar>
18 - <Authority value="api:yt:admin:addConfiguration"> 18 + <Authority value="api:yt:configuration:center:post">
19 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增组态 </a-button> 19 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增组态 </a-button>
20 </Authority> 20 </Authority>
21 - <Authority value="api:yt:admin:deleteConfiguration"> 21 + <Authority value="api:yt:configuration:center:delete">
22 <Popconfirm 22 <Popconfirm
23 title="您确定要批量删除数据" 23 title="您确定要批量删除数据"
24 ok-text="确定" 24 ok-text="确定"
@@ -36,25 +36,25 @@ @@ -36,25 +36,25 @@
36 :actions="[ 36 :actions="[
37 { 37 {
38 label: '设计', 38 label: '设计',
39 - auth: 'api:yt:admin:designConfiguration', 39 + auth: 'api:yt:configuration:center:get_configuration_info:get',
40 icon: 'clarity:note-edit-line', 40 icon: 'clarity:note-edit-line',
41 onClick: handleDesign.bind(null, record), 41 onClick: handleDesign.bind(null, record),
42 }, 42 },
43 { 43 {
44 label: '预览', 44 label: '预览',
45 - auth: 'api:yt:admin:viewConfiguration', 45 + auth: 'api:yt:configuration:center:get_configuration_info:get',
46 icon: 'ant-design:eye-outlined', 46 icon: 'ant-design:eye-outlined',
47 onClick: handlePreview.bind(null, record), 47 onClick: handlePreview.bind(null, record),
48 }, 48 },
49 { 49 {
50 label: '编辑', 50 label: '编辑',
51 - auth: 'api:yt:admin:editConfiguration', 51 + auth: 'api:yt:configuration:center:update',
52 icon: 'clarity:note-edit-line', 52 icon: 'clarity:note-edit-line',
53 onClick: handleCreateOrEdit.bind(null, record), 53 onClick: handleCreateOrEdit.bind(null, record),
54 }, 54 },
55 { 55 {
56 label: '删除', 56 label: '删除',
57 - auth: 'api:yt:admin:deleteConfiguration', 57 + auth: 'api:yt:configuration:center:delete',
58 icon: 'ant-design:delete-outlined', 58 icon: 'ant-design:delete-outlined',
59 color: 'error', 59 color: 'error',
60 popConfirm: { 60 popConfirm: {
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </template> 20 </template>
21 21
22 <script setup lang="ts"> 22 <script setup lang="ts">
23 - import { ref, nextTick, onMounted } from 'vue'; 23 + import { ref, nextTick } from 'vue';
24 import { BasicTable, useTable, BasicColumn } from '/@/components/Table'; 24 import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
25 import { Switch } from 'ant-design-vue'; 25 import { Switch } from 'ant-design-vue';
26 import { h } from 'vue'; 26 import { h } from 'vue';
@@ -76,13 +76,6 @@ @@ -76,13 +76,6 @@
76 const remotePort = ref(0); 76 const remotePort = ref(0);
77 const address = ref(''); 77 const address = ref('');
78 const enableRemoteDisabled = ref(false); 78 const enableRemoteDisabled = ref(false);
79 - onMounted(() => {  
80 - tableData.value.push({  
81 - enableRemote: '',  
82 - proxyName: props.deviceDetail.sn,  
83 - status: '',  
84 - });  
85 - });  
86 const getTableData = async () => { 79 const getTableData = async () => {
87 const res = await frpGetInfoApi(props.deviceDetail.sn); 80 const res = await frpGetInfoApi(props.deviceDetail.sn);
88 enableRemote.value = res.enableRemote; 81 enableRemote.value = res.enableRemote;
@@ -105,7 +98,7 @@ @@ -105,7 +98,7 @@
105 } 98 }
106 tableData.value.push({ 99 tableData.value.push({
107 enableRemote: res.enableRemote, 100 enableRemote: res.enableRemote,
108 - proxyName: res.proxyName, 101 + proxyName: res.proxyName || props.deviceDetail.sn,
109 status: res.status, 102 status: res.status,
110 }); 103 });
111 if (res == '') { 104 if (res == '') {
1 <template> 1 <template>
2 - <div :style="{ backgroundImage: 'url(' + (logoUrl !== undefined ? logoUrl : '') + ')',backgroundSize:'100% 100%;' }"  
3 - :class="prefixCls" class="relative w-full h-full px-4">  
4 - <AppLocalePicker class="absolute text-white top-4 right-4 enter-x xl:text-gray-600" :showText="false"  
5 - v-if="!sessionTimeout && showLocale" /> 2 + <div
  3 + style="background-size: 100% 100%"
  4 + :style="{ backgroundImage: 'url(' + (logoUrl !== undefined ? logoUrl : '') + ')' }"
  5 + :class="prefixCls"
  6 + class="relative w-full h-full px-4"
  7 + >
  8 + <AppLocalePicker
  9 + class="absolute text-white top-4 right-4 enter-x xl:text-gray-600"
  10 + :showText="false"
  11 + v-if="!sessionTimeout && showLocale"
  12 + />
6 <AppDarkModeToggle class="absolute top-3 right-7 enter-x" v-if="!sessionTimeout" /> 13 <AppDarkModeToggle class="absolute top-3 right-7 enter-x" v-if="!sessionTimeout" />
7 14
8 <span class="-enter-x xl:hidden"> 15 <span class="-enter-x xl:hidden">
@@ -14,20 +21,31 @@ @@ -14,20 +21,31 @@
14 <div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12"> 21 <div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
15 <!-- <AppLogo class="-enter-x" /> --> 22 <!-- <AppLogo class="-enter-x" /> -->
16 <div style="display: flex; margin-top: 10px"> 23 <div style="display: flex; margin-top: 10px">
17 - <img v-if="defaultLogo || getLogo" :src="defaultLogo || getLogo" style="width: 48px; height: 48px" /> 24 + <img
  25 + v-if="defaultLogo || getLogo"
  26 + :src="defaultLogo || getLogo"
  27 + style="width: 48px; height: 48px"
  28 + />
18 <img style="width: 48px; height: 48px" v-else src="/src/assets/images/logo.png" /> 29 <img style="width: 48px; height: 48px" v-else src="/src/assets/images/logo.png" />
19 - <div class="ml-2 truncate md:opacity-100" style=" 30 + <div
  31 + class="ml-2 truncate md:opacity-100"
  32 + style="
20 line-height: 45px; 33 line-height: 45px;
21 margin-left: 5px; 34 margin-left: 5px;
22 font-size: 24px; 35 font-size: 24px;
23 color: #fff; 36 color: #fff;
24 font-weight: 700; 37 font-weight: 700;
25 - "> 38 + "
  39 + >
26 {{ defaultTitle || getTitle }} 40 {{ defaultTitle || getTitle }}
27 </div> 41 </div>
28 </div> 42 </div>
29 <div v-if="ifCustom" class="my-auto"> 43 <div v-if="ifCustom" class="my-auto">
30 - <img :alt="title" src="../../../assets/svg/thingskit-login-background.svg" class="w-1/2 -mt-16 -enter-x" /> 44 + <img
  45 + :alt="title"
  46 + src="../../../assets/svg/thingskit-login-background.svg"
  47 + class="w-1/2 -mt-16 -enter-x"
  48 + />
31 <div class="mt-10 font-medium text-white -enter-x"> 49 <div class="mt-10 font-medium text-white -enter-x">
32 <span class="inline-block mt-4 text-3xl"> {{ t('sys.login.signInTitle') }}</span> 50 <span class="inline-block mt-4 text-3xl"> {{ t('sys.login.signInTitle') }}</span>
33 </div> 51 </div>
@@ -37,8 +55,10 @@ @@ -37,8 +55,10 @@
37 </div> 55 </div>
38 </div> 56 </div>
39 <div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12"> 57 <div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12">
40 - <div :class="`${prefixCls}-form`"  
41 - class="relative w-full px-5 py-8 mx-auto my-auto rounded-md shadow-md xl:ml-16 xl:bg-transparent sm:px-8 xl:p-4 xl:shadow-none sm:w-3/4 lg:w-2/4 xl:w-auto enter-x"> 58 + <div
  59 + :class="`${prefixCls}-form`"
  60 + class="relative w-full px-5 py-8 mx-auto my-auto rounded-md shadow-md xl:ml-16 xl:bg-transparent sm:px-8 xl:p-4 xl:shadow-none sm:w-3/4 lg:w-2/4 xl:w-auto enter-x"
  61 + >
42 <LoginForm /> 62 <LoginForm />
43 <ForgetPasswordForm /> 63 <ForgetPasswordForm />
44 <RegisterForm /> 64 <RegisterForm />
@@ -50,213 +70,213 @@ @@ -50,213 +70,213 @@
50 </div> 70 </div>
51 </template> 71 </template>
52 <script lang="ts" setup> 72 <script lang="ts" setup>
53 -import { computed, ref, onMounted } from 'vue';  
54 -// import { AppLogo } from '/@/components/Application';  
55 -import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';  
56 -import LoginForm from './LoginForm.vue';  
57 -import ForgetPasswordForm from './ForgetPasswordForm.vue';  
58 -import RegisterForm from './RegisterForm.vue';  
59 -import MobileForm from './MobileForm.vue';  
60 -import { useGlobSetting } from '/@/hooks/setting';  
61 -import { useI18n } from '/@/hooks/web/useI18n';  
62 -import { useDesign } from '/@/hooks/web/useDesign';  
63 -import { useLocaleStore } from '/@/store/modules/locale';  
64 -import { useUserStore } from '/@/store/modules/user';  
65 -import { getPlatForm } from '/@/api/oem/index';  
66 -  
67 -defineProps({  
68 - sessionTimeout: {  
69 - type: Boolean,  
70 - },  
71 -});  
72 -const defaultTitle = ref('');  
73 -const defaultLogo = ref('');  
74 -const logoUrl = ref('');  
75 -onMounted(async () => {  
76 - const res = await getPlatForm();  
77 - logoUrl.value = res?.background;  
78 - defaultTitle.value = res?.name;  
79 - defaultLogo.value = res?.logo;  
80 - if (logoUrl.value !== undefined) {  
81 - ifCustom.value = false;  
82 - } else {  
83 - const defaultLogo = 'src/assets/svg/login-bg.svg';  
84 - logoUrl.value = 'url(' + defaultLogo + ')';  
85 - }  
86 -});  
87 -  
88 -const userStore = useUserStore();  
89 -  
90 -const ifCustom = ref(true);  
91 -const getLogo = computed(() => {  
92 - return userStore.platInfo?.logo;  
93 -});  
94 -const { title } = useGlobSetting();  
95 -const getTitle = computed(() => {  
96 - // 设置icon  
97 - let link = (document.querySelector("link[rel*='icon']") ||  
98 - document.createElement('link')) as HTMLLinkElement;  
99 - link.type = 'image/x-icon';  
100 - link.rel = 'shortcut icon';  
101 - link.href = userStore.platInfo?.icon ?? '/favicon.ico';  
102 - document.getElementsByTagName('head')[0].appendChild(link);  
103 - logoUrl.value = userStore.platInfo?.background;  
104 - if (logoUrl.value !== undefined) {  
105 - ifCustom.value = false;  
106 - } else {  
107 - const defaultLogo = 'src/assets/svg/login-bg.svg';  
108 - logoUrl.value = 'url(' + defaultLogo + ')';  
109 - }  
110 - return userStore.platInfo?.name ?? title;  
111 -});  
112 -// const globSetting = useGlobSetting();  
113 -const { prefixCls } = useDesign('login');  
114 -const { t } = useI18n();  
115 -const localeStore = useLocaleStore();  
116 -const showLocale = localeStore.getShowPicker; 73 + import { computed, ref, onMounted } from 'vue';
  74 + // import { AppLogo } from '/@/components/Application';
  75 + import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
  76 + import LoginForm from './LoginForm.vue';
  77 + import ForgetPasswordForm from './ForgetPasswordForm.vue';
  78 + import RegisterForm from './RegisterForm.vue';
  79 + import MobileForm from './MobileForm.vue';
  80 + import { useGlobSetting } from '/@/hooks/setting';
  81 + import { useI18n } from '/@/hooks/web/useI18n';
  82 + import { useDesign } from '/@/hooks/web/useDesign';
  83 + import { useLocaleStore } from '/@/store/modules/locale';
  84 + import { useUserStore } from '/@/store/modules/user';
  85 + import { getPlatForm } from '/@/api/oem/index';
  86 +
  87 + defineProps({
  88 + sessionTimeout: {
  89 + type: Boolean,
  90 + },
  91 + });
  92 + const defaultTitle = ref('');
  93 + const defaultLogo = ref('');
  94 + const logoUrl = ref('');
  95 + onMounted(async () => {
  96 + const res = await getPlatForm();
  97 + logoUrl.value = res?.background;
  98 + defaultTitle.value = res?.name;
  99 + defaultLogo.value = res?.logo;
  100 + if (logoUrl.value !== undefined) {
  101 + ifCustom.value = false;
  102 + } else {
  103 + const defaultLogo = 'src/assets/svg/login-bg.svg';
  104 + logoUrl.value = 'url(' + defaultLogo + ')';
  105 + }
  106 + });
  107 +
  108 + const userStore = useUserStore();
  109 +
  110 + const ifCustom = ref(true);
  111 + const getLogo = computed(() => {
  112 + return userStore.platInfo?.logo;
  113 + });
  114 + const { title } = useGlobSetting();
  115 + const getTitle = computed(() => {
  116 + // 设置icon
  117 + let link = (document.querySelector("link[rel*='icon']") ||
  118 + document.createElement('link')) as HTMLLinkElement;
  119 + link.type = 'image/x-icon';
  120 + link.rel = 'shortcut icon';
  121 + link.href = userStore.platInfo?.icon ?? '/favicon.ico';
  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 + const defaultLogo = 'src/assets/svg/login-bg.svg';
  128 + logoUrl.value = 'url(' + defaultLogo + ')';
  129 + }
  130 + return userStore.platInfo?.name ?? title;
  131 + });
  132 + // const globSetting = useGlobSetting();
  133 + const { prefixCls } = useDesign('login');
  134 + const { t } = useI18n();
  135 + const localeStore = useLocaleStore();
  136 + const showLocale = localeStore.getShowPicker;
117 // const title = computed(() => globSetting?.title ?? ''); 137 // const title = computed(() => globSetting?.title ?? '');
118 </script> 138 </script>
119 <style lang="less"> 139 <style lang="less">
120 -@prefix-cls: ~'@{namespace}-login';  
121 -@logo-prefix-cls: ~'@{namespace}-app-logo';  
122 -@countdown-prefix-cls: ~'@{namespace}-countdown-input';  
123 -@dark-bg: #293146; 140 + @prefix-cls: ~'@{namespace}-login';
  141 + @logo-prefix-cls: ~'@{namespace}-app-logo';
  142 + @countdown-prefix-cls: ~'@{namespace}-countdown-input';
  143 + @dark-bg: #293146;
124 144
125 -html[data-theme='dark'] {  
126 - .@{prefix-cls} {  
127 - background-color: @dark-bg; 145 + html[data-theme='dark'] {
  146 + .@{prefix-cls} {
  147 + background-color: @dark-bg;
128 148
129 - &::before {  
130 - background-image: url(/@/assets/svg/login-bg-dark.svg);  
131 - } 149 + &::before {
  150 + background-image: url(/@/assets/svg/login-bg-dark.svg);
  151 + }
132 152
133 - .ant-input,  
134 - .ant-input-password {  
135 - background-color: #232a3b;  
136 - } 153 + .ant-input,
  154 + .ant-input-password {
  155 + background-color: #232a3b;
  156 + }
137 157
138 - .ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {  
139 - border: 1px solid #4a5569;  
140 - } 158 + .ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {
  159 + border: 1px solid #4a5569;
  160 + }
141 161
142 - &-form {  
143 - background: transparent !important;  
144 - } 162 + &-form {
  163 + background: transparent !important;
  164 + }
145 165
146 - .app-iconify {  
147 - color: #fff; 166 + .app-iconify {
  167 + color: #fff;
  168 + }
148 } 169 }
149 - }  
150 170
151 - input.fix-auto-fill,  
152 - .fix-auto-fill input {  
153 - -webkit-text-fill-color: #c9d1d9 !important;  
154 - box-shadow: inherit !important;  
155 - }  
156 -}  
157 -  
158 -.@{prefix-cls} {  
159 - min-height: 100%;  
160 - overflow: hidden;  
161 -  
162 - @media (max-width: @screen-xl) {  
163 - background-color: #293146;  
164 -  
165 - .@{prefix-cls}-form {  
166 - background-color: #fff; 171 + input.fix-auto-fill,
  172 + .fix-auto-fill input {
  173 + -webkit-text-fill-color: #c9d1d9 !important;
  174 + box-shadow: inherit !important;
167 } 175 }
168 } 176 }
169 177
170 - &::before {  
171 - position: absolute;  
172 - top: 0;  
173 - left: 0;  
174 - width: 100%;  
175 - height: 100%;  
176 - margin-left: -48%;  
177 - background-image: v-bind(logoUrl);  
178 - // background-image: url(/@/assets/svg/login-bg.svg);  
179 - background-position: 100%;  
180 - background-repeat: no-repeat;  
181 - background-size: auto 100%;  
182 - content: ''; 178 + .@{prefix-cls} {
  179 + min-height: 100%;
  180 + overflow: hidden;
183 181
184 @media (max-width: @screen-xl) { 182 @media (max-width: @screen-xl) {
185 - display: none;  
186 - }  
187 - }  
188 -  
189 - .@{logo-prefix-cls} {  
190 - position: absolute;  
191 - top: 12px;  
192 - height: 30px; 183 + background-color: #293146;
193 184
194 - &__title {  
195 - font-size: 16px;  
196 - color: #fff; 185 + .@{prefix-cls}-form {
  186 + background-color: #fff;
  187 + }
197 } 188 }
198 189
199 - img {  
200 - width: 32px; 190 + &::before {
  191 + position: absolute;
  192 + top: 0;
  193 + left: 0;
  194 + width: 100%;
  195 + height: 100%;
  196 + margin-left: -48%;
  197 + background-image: v-bind(logoUrl);
  198 + // background-image: url(/@/assets/svg/login-bg.svg);
  199 + background-position: 100%;
  200 + background-repeat: no-repeat;
  201 + background-size: auto 100%;
  202 + content: '';
  203 +
  204 + @media (max-width: @screen-xl) {
  205 + display: none;
  206 + }
201 } 207 }
202 - }  
203 208
204 - .container {  
205 .@{logo-prefix-cls} { 209 .@{logo-prefix-cls} {
206 - display: flex;  
207 - width: 60%;  
208 - height: 80px; 210 + position: absolute;
  211 + top: 12px;
  212 + height: 30px;
209 213
210 &__title { 214 &__title {
211 - font-size: 24px; 215 + font-size: 16px;
212 color: #fff; 216 color: #fff;
213 } 217 }
214 218
215 img { 219 img {
216 - width: 48px; 220 + width: 32px;
217 } 221 }
218 } 222 }
219 - }  
220 223
221 - &-sign-in-way {  
222 - .anticon {  
223 - font-size: 22px;  
224 - color: #888;  
225 - cursor: pointer; 224 + .container {
  225 + .@{logo-prefix-cls} {
  226 + display: flex;
  227 + width: 60%;
  228 + height: 80px;
  229 +
  230 + &__title {
  231 + font-size: 24px;
  232 + color: #fff;
  233 + }
226 234
227 - &:hover {  
228 - color: @primary-color; 235 + img {
  236 + width: 48px;
  237 + }
229 } 238 }
230 } 239 }
231 - }  
232 240
233 - input:not([type='checkbox']) {  
234 - min-width: 360px; 241 + &-sign-in-way {
  242 + .anticon {
  243 + font-size: 22px;
  244 + color: #888;
  245 + cursor: pointer;
235 246
236 - @media (max-width: @screen-xl) {  
237 - min-width: 320px; 247 + &:hover {
  248 + color: @primary-color;
  249 + }
  250 + }
238 } 251 }
239 252
240 - @media (max-width: @screen-lg) {  
241 - min-width: 260px;  
242 - } 253 + input:not([type='checkbox']) {
  254 + min-width: 360px;
243 255
244 - @media (max-width: @screen-md) {  
245 - min-width: 240px;  
246 - } 256 + @media (max-width: @screen-xl) {
  257 + min-width: 320px;
  258 + }
  259 +
  260 + @media (max-width: @screen-lg) {
  261 + min-width: 260px;
  262 + }
  263 +
  264 + @media (max-width: @screen-md) {
  265 + min-width: 240px;
  266 + }
247 267
248 - @media (max-width: @screen-sm) {  
249 - min-width: 160px; 268 + @media (max-width: @screen-sm) {
  269 + min-width: 160px;
  270 + }
250 } 271 }
251 - }  
252 272
253 - .@{countdown-prefix-cls} input {  
254 - min-width: unset;  
255 - } 273 + .@{countdown-prefix-cls} input {
  274 + min-width: unset;
  275 + }
256 276
257 - .ant-divider-inner-text {  
258 - font-size: 12px;  
259 - color: @text-color-secondary; 277 + .ant-divider-inner-text {
  278 + font-size: 12px;
  279 + color: @text-color-secondary;
  280 + }
260 } 281 }
261 -}  
262 </style> 282 </style>
@@ -17,11 +17,15 @@ @@ -17,11 +17,15 @@
17 import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; 17 import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
18 import { useI18n } from '/@/hooks/web/useI18n'; 18 import { useI18n } from '/@/hooks/web/useI18n';
19 import { getOrganizationList, saveOrUpdateOrganization } from '/@/api/system/system'; 19 import { getOrganizationList, saveOrUpdateOrganization } from '/@/api/system/system';
  20 + import { useMessage } from '/@/hooks/web/useMessage';
  21 +
20 export default defineComponent({ 22 export default defineComponent({
21 name: 'OrganizationDrawer', 23 name: 'OrganizationDrawer',
22 components: { BasicDrawer, BasicForm }, 24 components: { BasicDrawer, BasicForm },
23 emits: ['success', 'register'], 25 emits: ['success', 'register'],
24 setup(_, { emit }) { 26 setup(_, { emit }) {
  27 + const { createMessage } = useMessage();
  28 +
25 const isUpdate = ref(true); 29 const isUpdate = ref(true);
26 let organizationId; 30 let organizationId;
27 31
@@ -79,6 +83,7 @@ @@ -79,6 +83,7 @@
79 isUpdate.value 83 isUpdate.value
80 ); 84 );
81 closeDrawer(); //关闭侧框 85 closeDrawer(); //关闭侧框
  86 + createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`);
82 emit('success'); 87 emit('success');
83 } catch { 88 } catch {
84 } finally { 89 } finally {