@uxda/appkit 4.1.54 → 4.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.eslintrc.mjs +7 -7
  2. package/README.md +187 -187
  3. package/babel.config.js +12 -12
  4. package/dist/appkit.css +51 -11
  5. package/dist/index.js +515 -297
  6. package/package.json +77 -77
  7. package/project.config.json +15 -15
  8. package/project.tt.json +13 -13
  9. package/rollup.config.mjs +56 -56
  10. package/src/Appkit.ts +66 -66
  11. package/src/balance/api/endpoints.ts +133 -133
  12. package/src/balance/api/index.ts +106 -106
  13. package/src/balance/components/AccountView.vue +750 -749
  14. package/src/balance/components/BalanceCard.vue +215 -215
  15. package/src/balance/components/BalanceReminder.vue +85 -85
  16. package/src/balance/components/ConsumptionFilter.vue +218 -218
  17. package/src/balance/components/ConsumptionRules.vue +68 -68
  18. package/src/balance/components/DateFilter.vue +250 -250
  19. package/src/balance/components/DateRange.vue +80 -80
  20. package/src/balance/components/ListFilter.vue +62 -63
  21. package/src/balance/components/ListFilterPicker.vue +191 -192
  22. package/src/balance/components/PromoterCard.vue +237 -237
  23. package/src/balance/components/SecondBalance.vue +71 -71
  24. package/src/balance/components/Tip.vue +45 -45
  25. package/src/balance/components/index.ts +8 -8
  26. package/src/balance/types.ts +97 -97
  27. package/src/components/bt-cropper/index.vue +774 -774
  28. package/src/components/bt-cropper/utils/calcCropper.js +42 -42
  29. package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
  30. package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
  31. package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
  32. package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
  33. package/src/components/bt-cropper/utils/ratio.js +3 -3
  34. package/src/components/bt-cropper/utils/tools.js +25 -25
  35. package/src/components/dd-area/index.vue +225 -225
  36. package/src/components/dd-icon/doc.md +21 -21
  37. package/src/components/dd-icon/index.vue +23 -23
  38. package/src/components/dd-notice-bar/index.vue +78 -78
  39. package/src/components/dd-search/doc.md +34 -34
  40. package/src/components/dd-search/index.vue +168 -168
  41. package/src/components/dd-selector/index.vue +124 -124
  42. package/src/components/dd-skeleton/doc.md +19 -19
  43. package/src/components/dd-skeleton/index.vue +36 -36
  44. package/src/global.ts +6 -6
  45. package/src/index.ts +89 -89
  46. package/src/main.scss +1 -1
  47. package/src/notice/api/endpoints.ts +17 -17
  48. package/src/notice/api/index.ts +106 -106
  49. package/src/notice/components/NoticeBanner.vue +243 -243
  50. package/src/notice/components/NoticeEntry.vue +99 -99
  51. package/src/notice/components/NoticeList.vue +315 -315
  52. package/src/notice/components/NoticePopup.vue +162 -162
  53. package/src/notice/components/index.ts +5 -5
  54. package/src/notice/components/useCommonList.ts +86 -86
  55. package/src/notice/components/useNotice.ts +35 -35
  56. package/src/notice/index.ts +1 -1
  57. package/src/notice/types.ts +25 -25
  58. package/src/payment/api/config.ts +7 -7
  59. package/src/payment/api/endpoints.ts +103 -103
  60. package/src/payment/api/index.ts +100 -100
  61. package/src/payment/components/AmountPicker.vue +90 -90
  62. package/src/payment/components/RechargeResult.vue +69 -69
  63. package/src/payment/components/RechargeView.vue +155 -155
  64. package/src/payment/components/RightsPicker.vue +105 -105
  65. package/src/payment/components/TradeView.vue +317 -317
  66. package/src/payment/components/UserAgreement.vue +234 -234
  67. package/src/payment/components/index.ts +22 -22
  68. package/src/payment/index.ts +5 -5
  69. package/src/payment/services/index.ts +16 -16
  70. package/src/payment/services/invoke-recharge.ts +25 -25
  71. package/src/payment/services/request-payment.ts +58 -58
  72. package/src/payment/types.ts +28 -28
  73. package/src/register/components/SelfRegistration.vue +233 -233
  74. package/src/register/components/index.ts +2 -2
  75. package/src/shared/components/AppDrawer.vue +54 -58
  76. package/src/shared/components/AppVerify.vue +128 -129
  77. package/src/shared/components/DeviceVersion.vue +68 -68
  78. package/src/shared/components/EmptyView.vue +33 -33
  79. package/src/shared/components/OcrBusinessLicense.vue +130 -130
  80. package/src/shared/components/OcrIcon.vue +202 -202
  81. package/src/shared/components/PageHeader.vue +79 -79
  82. package/src/shared/components/index.ts +8 -8
  83. package/src/shared/composables/index.ts +8 -8
  84. package/src/shared/composables/useAmount.ts +46 -46
  85. package/src/shared/composables/useCountdown.ts +46 -46
  86. package/src/shared/composables/useCrypto.ts +76 -76
  87. package/src/shared/composables/useDragBox.ts +97 -97
  88. package/src/shared/composables/useEncode.ts +43 -43
  89. package/src/shared/composables/useLogger.ts +123 -123
  90. package/src/shared/composables/useSafeArea.ts +46 -46
  91. package/src/shared/composables/useTabbar.ts +24 -24
  92. package/src/shared/composables/useUpload.ts +54 -54
  93. package/src/shared/composables/useValidator.ts +31 -31
  94. package/src/shared/http/Http.ts +136 -136
  95. package/src/shared/http/index.ts +1 -1
  96. package/src/shared/http/types.ts +157 -157
  97. package/src/shared/index.ts +3 -3
  98. package/src/shared/weixin/payment.ts +38 -38
  99. package/src/styles/vars.scss +3 -3
  100. package/src/user/api/endpoints.ts +17 -17
  101. package/src/user/api/index.ts +111 -111
  102. package/src/user/components/LoginSetting.vue +114 -114
  103. package/src/user/components/UserAuth.vue +216 -0
  104. package/src/user/components/UserBinding.vue +307 -307
  105. package/src/user/components/UserBindingSuccess.vue +80 -80
  106. package/src/user/components/UserEntry.vue +133 -133
  107. package/src/user/components/UserFeedback.vue +431 -431
  108. package/src/user/components/UserFeedbackEntry.vue +192 -192
  109. package/src/user/components/UserHeadCrop.vue +65 -65
  110. package/src/user/components/UserInfo.vue +723 -637
  111. package/src/user/components/UserResourceEmpty.vue +75 -75
  112. package/src/user/components/index.ts +23 -21
  113. package/src/user/index.ts +1 -1
  114. package/tsconfig.json +30 -30
  115. package/types/global.d.ts +21 -21
  116. package/types/vue.d.ts +10 -10
  117. package/dist/assets/asset-3B_CoPto +0 -1
@@ -1,637 +1,723 @@
1
- <template>
2
- <scroll-view :scroll-y="!userState.visible && !avatarVisible" class="user-info">
3
- <DdSkeleton v-if="firstLoading" :row="3"></DdSkeleton>
4
- <div v-else class="user-info-wrap">
5
- <div class="user-info-tit">账号信息</div>
6
- <div class="user-info-head">
7
- <div class="user-info-head-avatar" @click="avatarVisible = true">
8
- <img
9
- class="user-info-head-img"
10
- mode="aspectFit"
11
- v-if="userInfo.avatar"
12
- :src="userInfo.avatar"
13
- alt=""
14
- />
15
- <img
16
- class="user-info-head-img"
17
- mode="aspectFit"
18
- v-else
19
- src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
20
- alt=""
21
- />
22
- <div class="user-info-head-upload">
23
- <img
24
- class="user-info-head-upload-icon"
25
- mode="aspectFit"
26
- src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi4wOTk5IDE4LjQyMjRDMjIuMDk5OSAxNS41ODMyIDE5LjgxNjYgMTMuMjgxNiAxNi45OTk5IDEzLjI4MTZDMTQuMTgzMyAxMy4yODE2IDExLjg5OTkgMTUuNTgzMiAxMS44OTk5IDE4LjQyMjRDMTEuODk5OSAyMS4yNjE2IDE0LjE4MzMgMjMuNTYzMiAxNi45OTk5IDIzLjU2MzJDMTkuODE2NiAyMy41NjMyIDIyLjA5OTkgMjEuMjYxNiAyMi4wOTk5IDE4LjQyMjRWMTguNDIyNFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMi41NSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIzLjc5OTkgNS45OTg4QzIzLjc5OTkgNi4yMzUzOSAyMy45OTAyIDYuNDI3MiAyNC4yMjQ5IDYuNDI3MkgyNS45MjVDMjkuNDQ1OCA2LjQyNzIgMzIuMyA5LjMwNDIxIDMyLjMgMTIuODUzMlYyMy45OTE2QzMyLjMgMjcuNTQwNiAyOS40NDU4IDMwLjQxNzYgMjUuOTI1IDMwLjQxNzZIOC4wNzQ5NEM0LjU1NDE0IDMwLjQxNzYgMS42OTk5NSAyNy41NDA2IDEuNjk5OTUgMjMuOTkxNlYxMi44NTMyQzEuNjk5OTUgOS4zMDQyMSA0LjU1NDE0IDYuNDI3MiA4LjA3NDk0IDYuNDI3Mkg5Ljc3NDk1QzEwLjAwOTcgNi40MjcyIDEwLjIgNi4yMzUzOSAxMC4yIDUuOTk4OEMxMC4yIDUuNzA5NDkgMTAuMjQwNiA1LjQyOTc1IDEwLjMxNjUgNS4xNjUwNkMxMC42NzQ4IDMuOTE0NTEgMTEuODE4OSAzIDEzLjE3NSAzSDIwLjgyNUMyMi40NjggMyAyMy43OTk5IDQuMzQyNjEgMjMuNzk5OSA1Ljk5ODhWNS45OTg4WiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyLjU1IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNy42NDk5IDEwLjI4MjhDOC44MjM1MSAxMC4yODI4IDkuNzc0OSAxMS4yNDE4IDkuNzc0OSAxMi40MjQ4QzkuNzc0OSAxMy42MDc4IDguODIzNTEgMTQuNTY2OCA3LjY0OTkgMTQuNTY2OEM2LjQ3NjMgMTQuNTY2OCA1LjUyNDkgMTMuNjA3OCA1LjUyNDkgMTIuNDI0OEM1LjUyNDkgMTEuMjQxOCA2LjQ3NjMgMTAuMjgyOCA3LjY0OTkgMTAuMjgyOFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="
27
- alt=""
28
- />
29
- </div>
30
- </div>
31
- <nut-cell
32
- title="登录手机号"
33
- is-link
34
- :desc="encodePhone(userInfo.mobile || '')"
35
- @click="toBinding"
36
- />
37
- </div>
38
-
39
- <div class="user-info-tit">企业/团队</div>
40
- <div class="user-info-team">
41
- <div v-for="(item, key) in userInfo.tenantInfoList" :key="key" class="user-info-team-item">
42
- <div class="user-info-team-item-avatar">
43
- <img
44
- v-if="item.tenantLogo"
45
- class="user-info-team-item-avatar-img"
46
- mode="aspectFit"
47
- :src="item.tenantLogo"
48
- alt=""
49
- />
50
- <img
51
- v-else
52
- class="user-info-team-item-avatar-img empty"
53
- mode="aspectFit"
54
- src="https://cdn.ddjf.com/static/images/customer-center/tenant-logo.png"
55
- alt=""
56
- />
57
- </div>
58
- <div class="user-info-team-item-bd">
59
- <div class="user-info-team-item-title">{{ item.tenantName }}</div>
60
- <div class="user-info-team-item-app" v-if="item.appRoleInfo">
61
- <div
62
- class="user-info-team-item-app-tag"
63
- v-for="(aitem, akey) in item.appRoleInfo || []"
64
- :key="akey"
65
- >
66
- {{ aitem.appAbbr }}
67
- </div>
68
- <div class="user-info-team-item-role-btn" @click="toShowRole(item)">
69
- 角色详情
70
- <img
71
- :class="{ showRole: item.showRole }"
72
- class="user-info-team-item-role-btn-icon"
73
- src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDlMMTIgMTVMNiA5IiBzdHJva2U9IiMwMTdGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="
74
- alt=""
75
- />
76
- </div>
77
- </div>
78
- <div class="user-info-team-item-role" v-if="item.showRole">
79
- <div
80
- class="user-info-team-item-role-item"
81
- v-for="(aitem, akey) in item.appRoleInfo || []"
82
- :key="akey"
83
- >
84
- <div class="user-info-team-item-role-item-name">{{ aitem.appAbbr }}</div>
85
- <div class="user-info-team-item-role-item-info">
86
- {{ aitem.roleName }}
87
- </div>
88
- </div>
89
- </div>
90
- <div class="user-info-team-item-user">
91
- {{ item.fullName }}
92
- <img
93
- @click="toUserNameChange(item)"
94
- class="user-info-team-item-user-icon"
95
- src="https://cdn.ddjf.com/static/images/appkit/edit.png"
96
- alt=""
97
- />
98
- </div>
99
- <div class="user-info-team-item-dept">
100
- <div
101
- v-for="(ditem, dkey) in item.deptNames"
102
- :key="dkey"
103
- class="user-info-team-item-dept-item"
104
- >
105
- {{ ditem }}
106
- </div>
107
- </div>
108
- </div>
109
- </div>
110
- </div>
111
-
112
- <div class="user-info-ft">
113
- <nut-button
114
- class="user-info-ft-btn"
115
- style="width: 100%"
116
- @click="toLogout"
117
- plain
118
- type="primary"
119
- >退出登录</nut-button
120
- >
121
- </div>
122
- </div>
123
- </scroll-view>
124
-
125
- <!-- 修改用户名弹框 -->
126
- <nut-dialog
127
- title="输入新的用户名"
128
- :border="false"
129
- pop-class="change-username-popup"
130
- v-model:visible="userState.visible"
131
- @cancel="onUserNameCancel"
132
- >
133
- <nut-input :max-length="20" placeholder="请输入新的用户名" v-model="userState.value" />
134
- <template #footer>
135
- <nut-button class="change-username-popup-cancel" type="default" @click="onUserNameCancel">
136
- 取消
137
- </nut-button>
138
- <nut-button class="change-username-popup-ok" type="primary" @click="onUserNameOk">
139
- 确定
140
- </nut-button>
141
- </template>
142
- </nut-dialog>
143
-
144
- <!-- 修改头像弹框 -->
145
- <nut-popup
146
- pop-class="upload-avatar-popup"
147
- style="background: transparent"
148
- v-model:visible="avatarVisible"
149
- :overlay-style="{ background: 'rgba(0, 0, 0, 0.9)' }"
150
- >
151
- <div class="upload-avatar-popup-box">
152
- <img
153
- class="upload-avatar-popup-avatar"
154
- mode="aspectFit"
155
- v-if="userInfo.avatar"
156
- :src="userInfo.avatar"
157
- alt=""
158
- />
159
- <img
160
- class="upload-avatar-popup-avatar"
161
- mode="aspectFit"
162
- v-else
163
- src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
164
- alt=""
165
- />
166
- <div class="upload-avatar-popup-btn" @click="toUpload">更换头像</div>
167
- </div>
168
- </nut-popup>
169
- </template>
170
-
171
- <script lang="ts" setup>
172
- import Taro, { useDidShow } from '@tarojs/taro'
173
- import { ref, onMounted, reactive, onUnmounted } from 'vue'
174
- import { useAppKitOptions } from '../../Appkit'
175
- import { useEncode } from '../../shared/composables/useEncode'
176
- import DdSkeleton from '../../components/dd-skeleton/index.vue'
177
- import { useHttp } from '../api'
178
-
179
- const props = withDefaults(
180
- defineProps<{
181
- miniType?: string
182
- app?: string
183
- userId: string
184
- }>(),
185
- {
186
- miniType: '05',
187
- app: '',
188
- userId: '',
189
- }
190
- )
191
-
192
- const { encodePhone } = useEncode()
193
-
194
- useDidShow(() => {
195
- getUserInfoByUserId()
196
- })
197
- onMounted(() => {
198
- Taro.eventCenter.on('USER-HEAD-CROP-OK', updateImage)
199
- })
200
- onUnmounted(() => {
201
- Taro.eventCenter.off('USER-HEAD-CROP-OK')
202
- })
203
-
204
- const firstLoading = ref(true)
205
- const userInfo = ref<any>({})
206
- // 根据用户id,查询用户所在租户列表
207
- function getUserInfoByUserId() {
208
- const $http = useHttp()
209
-
210
- $http
211
- .get(`/cas/sysAccount/getAccountInfo/${props.userId}`)
212
- .then((result: any) => {
213
- userInfo.value = result
214
- firstLoading.value = false
215
- })
216
- .catch(() => {
217
- firstLoading.value = false
218
- })
219
- }
220
-
221
- // 修改头像弹框
222
- const avatarVisible = ref(false)
223
-
224
- // 去上传头像
225
- async function toUpload() {
226
- if (!userInfo.value.avatar) {
227
- const profile = await Taro.getUserProfile({
228
- desc: '头像用于改变默认头像',
229
- })
230
-
231
- const res = await Taro.downloadFile({
232
- url: profile.userInfo.avatarUrl,
233
- })
234
-
235
- updateImage(res.tempFilePath)
236
- } else {
237
- let res = await Taro.chooseImage({
238
- count: 1,
239
- })
240
- if (res.tempFilePaths) {
241
- const filePath = res.tempFilePaths[0]
242
-
243
- emits('crop', filePath)
244
- }
245
- }
246
- }
247
-
248
- // 上传图片
249
- async function updateImage(filePath: string) {
250
- Taro.showLoading({
251
- title: '上传中...',
252
- })
253
- const appkitOptions = useAppKitOptions()
254
- const $http = useHttp()
255
-
256
- let Res: any = await Taro.uploadFile({
257
- url: `${appkitOptions.baseUrl()}/cas/file/uploadImg`,
258
- filePath: filePath,
259
- name: 'file',
260
- formData: {
261
- objectNo: `${userInfo.value.mobile}${Date.now()}`,
262
- objectTypeCode: `MINI_HEADIMAGE${props.miniType}`,
263
- },
264
- header: {
265
- token: appkitOptions.tempToken() || appkitOptions.token(),
266
- },
267
- })
268
- avatarVisible.value = false
269
-
270
- const res = JSON.parse(Res.data)
271
- if (res.success) {
272
- $http
273
- .post('/cas/sysUser/update', {
274
- appCode: props.app,
275
- avatar: res.result,
276
- userId: props.userId,
277
- })
278
- .then(() => {
279
- Taro.hideLoading()
280
- Taro.showToast({ title: '头像上传成功', icon: 'none' })
281
- getUserInfoByUserId()
282
- emits('avatar-success', res.result)
283
- })
284
- .catch(() => {
285
- Taro.hideLoading()
286
- })
287
- } else {
288
- Taro.hideLoading()
289
- }
290
- }
291
-
292
- // 查看角色详情
293
- function toShowRole(item: any) {
294
- item.showRole = !item.showRole
295
- }
296
-
297
- // 更换用户名
298
- const userState = reactive({
299
- visible: false,
300
- value: '',
301
- oldName: '',
302
- tenantId: '',
303
- })
304
- function toUserNameChange(item: any) {
305
- userState.visible = true
306
- userState.oldName = item.fullName
307
- userState.tenantId = item.tenantId
308
- }
309
- function onUserNameCancel() {
310
- userState.visible = false
311
- userState.value = ''
312
- userState.oldName = ''
313
- userState.tenantId = ''
314
- }
315
- function onUserNameOk() {
316
- if (!userState.value) {
317
- return Taro.showToast({
318
- title: '请输入用户名',
319
- icon: 'none',
320
- })
321
- }
322
- if (userState.value === userState.oldName) {
323
- return Taro.showToast({
324
- title: '用户名不能与原用户名相同',
325
- icon: 'none',
326
- })
327
- }
328
-
329
- const $http = useHttp()
330
-
331
- $http
332
- .post('/cas/sysUser/updateUserInfoByTenantId', {
333
- fullName: userState.value,
334
- tenantId: userState.tenantId,
335
- userId: props.userId,
336
- })
337
- .then(() => {
338
- Taro.showToast({ title: '用户名修改成功', icon: 'none' })
339
- getUserInfoByUserId()
340
- onUserNameCancel()
341
- emits('username-success')
342
- })
343
- }
344
-
345
- // 退出登录
346
- function toLogout() {
347
- Taro.showModal({
348
- title: '提示',
349
- content: '确定要退出登录吗?',
350
- confirmText: '确定',
351
- success: async (e: any) => {
352
- if (e.confirm) {
353
- emits('logout')
354
- }
355
- },
356
- })
357
- }
358
-
359
- // 去绑定手机号
360
- function toBinding() {
361
- emits('binding', userInfo.value.mobile || '')
362
- }
363
-
364
- // 父组件事件
365
- const emits = defineEmits(['avatar-success', 'logout', 'crop', 'binding', 'username-success'])
366
-
367
- // 外部访问
368
- defineExpose({
369
- updateImage,
370
- })
371
- </script>
372
-
373
- <style lang="scss">
374
- .user-info {
375
- height: 100vh;
376
-
377
- &-wrap {
378
- padding: 0 12px;
379
- padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
380
- box-sizing: border-box;
381
- min-height: 100%;
382
- }
383
- &-tit {
384
- height: 38px;
385
- display: flex;
386
- align-items: center;
387
- color: #666666;
388
- font-size: 12px;
389
- padding-left: 10px;
390
- }
391
- &-head {
392
- border-radius: 5px;
393
- background: #fff;
394
- padding: 30px 11px 0;
395
- &-avatar {
396
- position: relative;
397
- width: 80px;
398
- height: 80px;
399
- margin: 0 auto 25px;
400
- }
401
- &-img {
402
- width: 100%;
403
- height: 100%;
404
- overflow: hidden;
405
- border-radius: 50%;
406
- }
407
- &-upload {
408
- position: absolute;
409
- bottom: -2px;
410
- left: 52px;
411
- width: 29px;
412
- height: 29px;
413
- background: #333333;
414
- overflow: hidden;
415
- border-radius: 50%;
416
- display: flex;
417
- align-items: center;
418
- justify-content: center;
419
- &-icon {
420
- width: 17px;
421
- height: 17px;
422
- }
423
- }
424
- }
425
- &-team {
426
- &-item {
427
- border-radius: 5px;
428
- background: #fff;
429
- display: flex;
430
- padding: 15px;
431
- margin-bottom: 10px;
432
- &-avatar {
433
- width: 38px;
434
- height: 38px;
435
- margin-right: 15px;
436
- border-radius: 5px;
437
- background: rgba(1, 127, 255, 0.3);
438
- display: flex;
439
- align-items: center;
440
- justify-content: center;
441
- &-img {
442
- width: 100%;
443
- height: 100%;
444
- }
445
- .empty {
446
- width: 20px;
447
- height: 40px;
448
- }
449
- }
450
- &-title {
451
- font-size: 16px;
452
- font-weight: 500;
453
- margin-bottom: 5px;
454
- }
455
- &-app {
456
- display: flex;
457
- align-items: center;
458
- flex-wrap: wrap;
459
- &-tag {
460
- border: 1px solid rgba(53, 53, 53, 0.2);
461
- font-size: 10px;
462
- height: 18px;
463
- display: inline-flex;
464
- align-items: center;
465
- justify-content: center;
466
- padding: 0 6px;
467
- border-radius: 2px;
468
- margin: 0 10px 6px 0;
469
- }
470
- }
471
- &-bd {
472
- flex: 1;
473
- }
474
- &-role {
475
- padding: 10px;
476
- background: rgba(245, 245, 245, 0.5);
477
- border-radius: 5px;
478
- margin-bottom: 10px;
479
- &-btn {
480
- color: var(--app-primary-color, #017fff);
481
- font-size: 10px;
482
- display: inline-flex;
483
- align-items: center;
484
- margin-bottom: 6px;
485
- &-icon {
486
- width: 12px;
487
- height: 12px;
488
- position: relative;
489
- top: 1px;
490
- &.showRole {
491
- transform: rotate(180deg);
492
- }
493
- }
494
- }
495
- &-item {
496
- display: flex;
497
- font-size: 10px;
498
- margin-bottom: 10px;
499
- &:last-child {
500
- margin-bottom: 0;
501
- }
502
- &-name {
503
- opacity: 0.5;
504
- white-space: nowrap;
505
- margin-right: 10px;
506
- min-width: 40px;
507
- }
508
- &-info {
509
- flex: 1;
510
- color: #1a1a1a;
511
- }
512
- }
513
- }
514
- &-user {
515
- margin-bottom: 4px;
516
- font-size: 12px;
517
- display: flex;
518
- align-items: center;
519
- &-icon {
520
- width: 10px;
521
- height: 10px;
522
- margin-left: 4px;
523
- }
524
- }
525
- &-dept {
526
- display: flex;
527
- flex-wrap: wrap;
528
- font-size: 10px;
529
- color: rgba(26, 26, 26, 0.8);
530
- &-item {
531
- font-size: 10px;
532
- color: rgba(26, 26, 26, 0.5);
533
- margin: 4px 10px 4px 0;
534
- &:first-child {
535
- color: rgba(26, 26, 26, 0.8);
536
- }
537
- }
538
- }
539
- }
540
- }
541
-
542
- &-ft {
543
- &-btn {
544
- width: 100%;
545
- border-color: transparent !important;
546
- color: rgba(27, 63, 107, 0.8) !important;
547
- }
548
- }
549
-
550
- .nut-cell {
551
- padding: 11px 0;
552
- margin: 0;
553
- box-shadow: none;
554
- border-bottom: 1px solid #f0f0f0;
555
- font-size: 16px;
556
- .nut-cell__value {
557
- font-size: 16px;
558
- color: #000;
559
- }
560
- .nut-cell__link {
561
- color: #ccc;
562
- margin-left: 8px;
563
- }
564
- }
565
- }
566
- .upload-avatar-popup {
567
- &-box {
568
- display: flex;
569
- flex-direction: column;
570
- align-items: center;
571
- justify-content: center;
572
- }
573
- &-avatar {
574
- width: 320px;
575
- height: 320px;
576
- overflow: hidden;
577
- border-radius: 50%;
578
- margin-bottom: 50px;
579
- }
580
- &-btn {
581
- width: 106px;
582
- height: 37px;
583
- border-radius: 50px;
584
- border: 1px solid #ffffff;
585
- display: flex;
586
- justify-content: center;
587
- align-items: center;
588
- color: #ffffff;
589
- font-size: 16px;
590
- }
591
- }
592
- .change-username-popup {
593
- .nut-dialog {
594
- min-height: auto;
595
- }
596
- .nut-input {
597
- height: 40px;
598
- padding: 0;
599
- display: flex;
600
- align-items: center;
601
- font-size: 16px;
602
- border: none;
603
- .input-text {
604
- width: 100%;
605
- height: 100%;
606
- font-size: 14px;
607
- }
608
- .nut-input-value,
609
- .nut-input-inner,
610
- .nut-input-box {
611
- height: 100%;
612
- overflow: hidden;
613
- background: #f5f5f5;
614
- border-radius: 6px;
615
- }
616
- .nut-placeholder {
617
- color: #cccccc;
618
- line-height: 38px;
619
- height: 38px;
620
- }
621
- .nut-input-box {
622
- padding: 0 15px;
623
- }
624
- }
625
- &-cancel.nut-button {
626
- border-radius: 15px;
627
- font-size: 14px;
628
- height: 30px;
629
- }
630
- &-ok.nut-button {
631
- background: var(--app-primary-color, #017fff);
632
- height: 30px;
633
- font-size: 14px;
634
- border-radius: 15px;
635
- }
636
- }
637
- </style>
1
+ <template>
2
+ <scroll-view
3
+ :scroll-y="!userState.visible && !avatarVisible"
4
+ class="user-info"
5
+ >
6
+ <DdSkeleton v-if="firstLoading" :row="3"></DdSkeleton>
7
+ <div v-else class="user-info-wrap">
8
+ <div class="user-info-tit">账号信息</div>
9
+ <div class="user-info-head">
10
+ <div class="user-info-head-avatar" @click="avatarVisible = true">
11
+ <img
12
+ class="user-info-head-img"
13
+ mode="aspectFit"
14
+ v-if="userInfo.avatar"
15
+ :src="userInfo.avatar"
16
+ alt=""
17
+ />
18
+ <img
19
+ class="user-info-head-img"
20
+ mode="aspectFit"
21
+ v-else
22
+ src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
23
+ alt=""
24
+ />
25
+ <div class="user-info-head-upload">
26
+ <img
27
+ class="user-info-head-upload-icon"
28
+ mode="aspectFit"
29
+ src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi4wOTk5IDE4LjQyMjRDMjIuMDk5OSAxNS41ODMyIDE5LjgxNjYgMTMuMjgxNiAxNi45OTk5IDEzLjI4MTZDMTQuMTgzMyAxMy4yODE2IDExLjg5OTkgMTUuNTgzMiAxMS44OTk5IDE4LjQyMjRDMTEuODk5OSAyMS4yNjE2IDE0LjE4MzMgMjMuNTYzMiAxNi45OTk5IDIzLjU2MzJDMTkuODE2NiAyMy41NjMyIDIyLjA5OTkgMjEuMjYxNiAyMi4wOTk5IDE4LjQyMjRWMTguNDIyNFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMi41NSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIzLjc5OTkgNS45OTg4QzIzLjc5OTkgNi4yMzUzOSAyMy45OTAyIDYuNDI3MiAyNC4yMjQ5IDYuNDI3MkgyNS45MjVDMjkuNDQ1OCA2LjQyNzIgMzIuMyA5LjMwNDIxIDMyLjMgMTIuODUzMlYyMy45OTE2QzMyLjMgMjcuNTQwNiAyOS40NDU4IDMwLjQxNzYgMjUuOTI1IDMwLjQxNzZIOC4wNzQ5NEM0LjU1NDE0IDMwLjQxNzYgMS42OTk5NSAyNy41NDA2IDEuNjk5OTUgMjMuOTkxNlYxMi44NTMyQzEuNjk5OTUgOS4zMDQyMSA0LjU1NDE0IDYuNDI3MiA4LjA3NDk0IDYuNDI3Mkg5Ljc3NDk1QzEwLjAwOTcgNi40MjcyIDEwLjIgNi4yMzUzOSAxMC4yIDUuOTk4OEMxMC4yIDUuNzA5NDkgMTAuMjQwNiA1LjQyOTc1IDEwLjMxNjUgNS4xNjUwNkMxMC42NzQ4IDMuOTE0NTEgMTEuODE4OSAzIDEzLjE3NSAzSDIwLjgyNUMyMi40NjggMyAyMy43OTk5IDQuMzQyNjEgMjMuNzk5OSA1Ljk5ODhWNS45OTg4WiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyLjU1IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNy42NDk5IDEwLjI4MjhDOC44MjM1MSAxMC4yODI4IDkuNzc0OSAxMS4yNDE4IDkuNzc0OSAxMi40MjQ4QzkuNzc0OSAxMy42MDc4IDguODIzNTEgMTQuNTY2OCA3LjY0OTkgMTQuNTY2OEM2LjQ3NjMgMTQuNTY2OCA1LjUyNDkgMTMuNjA3OCA1LjUyNDkgMTIuNDI0OEM1LjUyNDkgMTEuMjQxOCA2LjQ3NjMgMTAuMjgyOCA3LjY0OTkgMTAuMjgyOFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="
30
+ alt=""
31
+ />
32
+ </div>
33
+ </div>
34
+ <nut-cell
35
+ title="登录手机号"
36
+ is-link
37
+ :desc="encodePhone(userInfo.mobile || '')"
38
+ @click="toBinding"
39
+ />
40
+ <nut-cell title="昵称" :desc="userInfo?.nickName || '--'" />
41
+ <nut-cell title="认证信息" is-link @click="toAuth">
42
+ <template #desc>
43
+ <span v-if="userInfo?.verifyResult == 1">已认证</span>
44
+ <span v-if="userInfo?.verifyResult == 0" style="color: #e8523f"
45
+ >已失效,重新认证</span
46
+ >
47
+ <span v-else style="color: #017fff">未认证,去认证</span>
48
+ </template>
49
+ </nut-cell>
50
+ </div>
51
+
52
+ <div class="user-info-tit">企业/团队</div>
53
+ <div class="user-info-team">
54
+ <div
55
+ v-for="(item, key) in userInfo.tenantInfoList"
56
+ :key="key"
57
+ class="user-info-team-item"
58
+ >
59
+ <div class="user-info-team-item-avatar">
60
+ <img
61
+ v-if="item.tenantLogo"
62
+ class="user-info-team-item-avatar-img"
63
+ mode="aspectFit"
64
+ :src="item.tenantLogo"
65
+ alt=""
66
+ />
67
+ <img
68
+ v-else
69
+ class="user-info-team-item-avatar-img empty"
70
+ mode="aspectFit"
71
+ src="https://cdn.ddjf.com/static/images/customer-center/tenant-logo.png"
72
+ alt=""
73
+ />
74
+ </div>
75
+ <div class="user-info-team-item-bd">
76
+ <div class="user-info-team-item-title">{{ item.tenantName }}</div>
77
+ <div class="user-info-team-item-app" v-if="item.appRoleInfo">
78
+ <div
79
+ class="user-info-team-item-app-tag"
80
+ v-for="(aitem, akey) in item.appRoleInfo || []"
81
+ :key="akey"
82
+ >
83
+ {{ aitem.appAbbr }}
84
+ </div>
85
+ <div
86
+ class="user-info-team-item-role-btn"
87
+ @click="toShowRole(item)"
88
+ >
89
+ 角色详情
90
+ <img
91
+ :class="{ showRole: item.showRole }"
92
+ class="user-info-team-item-role-btn-icon"
93
+ src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDlMMTIgMTVMNiA5IiBzdHJva2U9IiMwMTdGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="
94
+ alt=""
95
+ />
96
+ </div>
97
+ </div>
98
+ <div class="user-info-team-item-role" v-if="item.showRole">
99
+ <div
100
+ class="user-info-team-item-role-item"
101
+ v-for="(aitem, akey) in item.appRoleInfo || []"
102
+ :key="akey"
103
+ >
104
+ <div class="user-info-team-item-role-item-name">
105
+ {{ aitem.appAbbr }}
106
+ </div>
107
+ <div class="user-info-team-item-role-item-info">
108
+ {{ aitem.roleName }}
109
+ </div>
110
+ </div>
111
+ </div>
112
+ <div class="user-info-team-item-user">
113
+ {{ item.fullName }}
114
+ <img
115
+ @click="toUserNameChange(item)"
116
+ class="user-info-team-item-user-icon"
117
+ src="https://cdn.ddjf.com/static/images/appkit/edit.png"
118
+ alt=""
119
+ />
120
+ </div>
121
+ <div class="user-info-team-item-dept">
122
+ <div
123
+ v-for="(ditem, dkey) in item.deptNames"
124
+ :key="dkey"
125
+ class="user-info-team-item-dept-item"
126
+ >
127
+ {{ ditem }}
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+ <div class="user-info-ft">
135
+ <nut-button
136
+ class="user-info-ft-btn"
137
+ style="width: 100%"
138
+ @click="toLogout"
139
+ plain
140
+ type="primary"
141
+ >退出登录</nut-button
142
+ >
143
+ </div>
144
+ </div>
145
+ </scroll-view>
146
+
147
+ <!-- 修改用户名弹框 -->
148
+ <nut-dialog
149
+ title="输入新的用户名"
150
+ :border="false"
151
+ pop-class="change-username-popup"
152
+ v-model:visible="userState.visible"
153
+ @cancel="onUserNameCancel"
154
+ >
155
+ <nut-input
156
+ :max-length="20"
157
+ placeholder="请输入新的用户名"
158
+ v-model="userState.value"
159
+ />
160
+ <template #footer>
161
+ <nut-button
162
+ class="change-username-popup-cancel"
163
+ type="default"
164
+ @click="onUserNameCancel"
165
+ >
166
+ 取消
167
+ </nut-button>
168
+ <nut-button
169
+ class="change-username-popup-ok"
170
+ type="primary"
171
+ @click="onUserNameOk"
172
+ >
173
+ 确定
174
+ </nut-button>
175
+ </template>
176
+ </nut-dialog>
177
+
178
+ <!-- 修改头像弹框 -->
179
+ <nut-popup
180
+ pop-class="upload-avatar-popup"
181
+ style="background: transparent"
182
+ v-model:visible="avatarVisible"
183
+ :overlay-style="{ background: 'rgba(0, 0, 0, 0.9)' }"
184
+ >
185
+ <div class="upload-avatar-popup-box">
186
+ <img
187
+ class="upload-avatar-popup-avatar"
188
+ mode="aspectFit"
189
+ v-if="userInfo.avatar"
190
+ :src="userInfo.avatar"
191
+ alt=""
192
+ />
193
+ <img
194
+ class="upload-avatar-popup-avatar"
195
+ mode="aspectFit"
196
+ v-else
197
+ src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
198
+ alt=""
199
+ />
200
+ <div class="upload-avatar-popup-btn" @click="toUpload">更换头像</div>
201
+ </div>
202
+ </nut-popup>
203
+ </template>
204
+
205
+ <script lang="ts" setup>
206
+ import Taro, { useDidShow } from "@tarojs/taro";
207
+ import { ref, onMounted, reactive, onUnmounted } from "vue";
208
+ import { useAppKitOptions } from "../../Appkit";
209
+ import { useEncode } from "../../shared/composables/useEncode";
210
+ import DdSkeleton from "../../components/dd-skeleton/index.vue";
211
+ import { useHttp } from "../api";
212
+
213
+ const props = withDefaults(
214
+ defineProps<{
215
+ miniType?: string;
216
+ app?: string;
217
+ userId: string;
218
+ }>(),
219
+ {
220
+ miniType: "05",
221
+ app: "",
222
+ userId: "",
223
+ }
224
+ );
225
+
226
+ const { encodePhone } = useEncode();
227
+
228
+ useDidShow(() => {
229
+ getUserInfoByUserId();
230
+ });
231
+ onMounted(() => {
232
+ Taro.eventCenter.on("USER-HEAD-CROP-OK", updateImage);
233
+ });
234
+ onUnmounted(() => {
235
+ Taro.eventCenter.off("USER-HEAD-CROP-OK");
236
+ });
237
+
238
+ const firstLoading = ref(true);
239
+ const userInfo = ref<any>({});
240
+ // 根据用户id,查询用户所在租户列表
241
+ function getUserInfoByUserId() {
242
+ const $http = useHttp();
243
+
244
+ $http
245
+ .get(`/cas/sysAccount/getAccountInfo/${props.userId}`)
246
+ .then((result: any) => {
247
+ userInfo.value = result;
248
+ firstLoading.value = false;
249
+ })
250
+ .catch(() => {
251
+ firstLoading.value = false;
252
+ });
253
+ }
254
+
255
+ // 修改头像弹框
256
+ const avatarVisible = ref(false);
257
+
258
+ // 去上传头像
259
+ async function toUpload() {
260
+ if (!userInfo.value.avatar) {
261
+ const profile = await Taro.getUserProfile({
262
+ desc: "头像用于改变默认头像",
263
+ });
264
+
265
+ const res = await Taro.downloadFile({
266
+ url: profile.userInfo.avatarUrl,
267
+ });
268
+
269
+ updateImage(res.tempFilePath);
270
+ } else {
271
+ let res = await Taro.chooseImage({
272
+ count: 1,
273
+ });
274
+ if (res.tempFilePaths) {
275
+ const filePath = res.tempFilePaths[0];
276
+
277
+ emits("crop", filePath);
278
+ }
279
+ }
280
+ }
281
+
282
+ // 上传图片
283
+ async function updateImage(filePath: string) {
284
+ Taro.showLoading({
285
+ title: "上传中...",
286
+ });
287
+ const appkitOptions = useAppKitOptions();
288
+ const $http = useHttp();
289
+
290
+ let Res: any = await Taro.uploadFile({
291
+ url: `${appkitOptions.baseUrl()}/cas/file/uploadImg`,
292
+ filePath: filePath,
293
+ name: "file",
294
+ formData: {
295
+ objectNo: `${userInfo.value.mobile}${Date.now()}`,
296
+ objectTypeCode: `MINI_HEADIMAGE${props.miniType}`,
297
+ },
298
+ header: {
299
+ token: appkitOptions.tempToken() || appkitOptions.token(),
300
+ },
301
+ });
302
+ avatarVisible.value = false;
303
+
304
+ const res = JSON.parse(Res.data);
305
+ if (res.success) {
306
+ $http
307
+ .post("/cas/sysUser/update", {
308
+ appCode: props.app,
309
+ avatar: res.result,
310
+ userId: props.userId,
311
+ })
312
+ .then(() => {
313
+ Taro.hideLoading();
314
+ Taro.showToast({ title: "头像上传成功", icon: "none" });
315
+ getUserInfoByUserId();
316
+ emits("avatar-success", res.result);
317
+ })
318
+ .catch(() => {
319
+ Taro.hideLoading();
320
+ });
321
+ } else {
322
+ Taro.hideLoading();
323
+ }
324
+ }
325
+
326
+ // 查看角色详情
327
+ function toShowRole(item: any) {
328
+ item.showRole = !item.showRole;
329
+ }
330
+
331
+ // 更换用户名
332
+ const userState = reactive({
333
+ visible: false,
334
+ value: "",
335
+ oldName: "",
336
+ tenantId: "",
337
+ });
338
+ function toUserNameChange(item: any) {
339
+ userState.visible = true;
340
+ userState.oldName = item.fullName;
341
+ userState.tenantId = item.tenantId;
342
+ }
343
+ function onUserNameCancel() {
344
+ userState.visible = false;
345
+ userState.value = "";
346
+ userState.oldName = "";
347
+ userState.tenantId = "";
348
+ }
349
+ function onUserNameOk() {
350
+ if (!userState.value) {
351
+ return Taro.showToast({
352
+ title: "请输入用户名",
353
+ icon: "none",
354
+ });
355
+ }
356
+ if (userState.value === userState.oldName) {
357
+ return Taro.showToast({
358
+ title: "用户名不能与原用户名相同",
359
+ icon: "none",
360
+ });
361
+ }
362
+
363
+ const $http = useHttp();
364
+
365
+ $http
366
+ .post("/cas/sysUser/updateUserInfoByTenantId", {
367
+ fullName: userState.value,
368
+ tenantId: userState.tenantId,
369
+ userId: props.userId,
370
+ })
371
+ .then(() => {
372
+ Taro.showToast({ title: "用户名修改成功", icon: "none" });
373
+ getUserInfoByUserId();
374
+ onUserNameCancel();
375
+ emits("username-success");
376
+ });
377
+ }
378
+
379
+ // 退出登录
380
+ function toLogout() {
381
+ Taro.showModal({
382
+ title: "提示",
383
+ content: "确定要退出登录吗?",
384
+ confirmText: "确定",
385
+ success: async (e: any) => {
386
+ if (e.confirm) {
387
+ emits("logout");
388
+ }
389
+ },
390
+ });
391
+ }
392
+
393
+ // 去绑定手机号
394
+ function toBinding() {
395
+ emits("binding", userInfo.value.mobile || "");
396
+ }
397
+
398
+ // 去认证页
399
+ function toAuth() {
400
+ emits("auth", props.userId);
401
+ }
402
+
403
+ // 父组件事件
404
+ const emits = defineEmits([
405
+ "avatar-success",
406
+ "logout",
407
+ "crop",
408
+ "binding",
409
+ "username-success",
410
+ "auth",
411
+ ]);
412
+
413
+ // 外部访问
414
+ defineExpose({
415
+ updateImage,
416
+ });
417
+ </script>
418
+
419
+ <style lang="scss">
420
+ .user-info {
421
+ height: 100vh;
422
+
423
+ &-wrap {
424
+ padding: 0 12px;
425
+ padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
426
+ box-sizing: border-box;
427
+ min-height: 100%;
428
+ }
429
+
430
+ &-tit {
431
+ height: 38px;
432
+ display: flex;
433
+ align-items: center;
434
+ color: #666666;
435
+ font-size: 12px;
436
+ padding-left: 10px;
437
+ }
438
+
439
+ &-head {
440
+ border-radius: 5px;
441
+ background: #fff;
442
+ padding: 30px 11px 0;
443
+
444
+ &-avatar {
445
+ position: relative;
446
+ width: 80px;
447
+ height: 80px;
448
+ margin: 0 auto 25px;
449
+ }
450
+
451
+ &-img {
452
+ width: 100%;
453
+ height: 100%;
454
+ overflow: hidden;
455
+ border-radius: 50%;
456
+ }
457
+
458
+ &-upload {
459
+ position: absolute;
460
+ bottom: -2px;
461
+ left: 52px;
462
+ width: 29px;
463
+ height: 29px;
464
+ background: #333333;
465
+ overflow: hidden;
466
+ border-radius: 50%;
467
+ display: flex;
468
+ align-items: center;
469
+ justify-content: center;
470
+
471
+ &-icon {
472
+ width: 17px;
473
+ height: 17px;
474
+ }
475
+ }
476
+ }
477
+
478
+ &-team {
479
+ &-item {
480
+ border-radius: 5px;
481
+ background: #fff;
482
+ display: flex;
483
+ padding: 15px;
484
+ margin-bottom: 10px;
485
+
486
+ &-avatar {
487
+ width: 38px;
488
+ height: 38px;
489
+ margin-right: 15px;
490
+ border-radius: 5px;
491
+ background: rgba(1, 127, 255, 0.3);
492
+ display: flex;
493
+ align-items: center;
494
+ justify-content: center;
495
+
496
+ &-img {
497
+ width: 100%;
498
+ height: 100%;
499
+ }
500
+
501
+ .empty {
502
+ width: 20px;
503
+ height: 40px;
504
+ }
505
+ }
506
+
507
+ &-title {
508
+ font-size: 16px;
509
+ font-weight: 500;
510
+ margin-bottom: 5px;
511
+ }
512
+
513
+ &-app {
514
+ display: flex;
515
+ align-items: center;
516
+ flex-wrap: wrap;
517
+
518
+ &-tag {
519
+ border: 1px solid rgba(53, 53, 53, 0.2);
520
+ font-size: 10px;
521
+ height: 18px;
522
+ display: inline-flex;
523
+ align-items: center;
524
+ justify-content: center;
525
+ padding: 0 6px;
526
+ border-radius: 2px;
527
+ margin: 0 10px 6px 0;
528
+ }
529
+ }
530
+
531
+ &-bd {
532
+ flex: 1;
533
+ }
534
+
535
+ &-role {
536
+ padding: 10px;
537
+ background: rgba(245, 245, 245, 0.5);
538
+ border-radius: 5px;
539
+ margin-bottom: 10px;
540
+
541
+ &-btn {
542
+ color: var(--app-primary-color, #017fff);
543
+ font-size: 10px;
544
+ display: inline-flex;
545
+ align-items: center;
546
+ margin-bottom: 6px;
547
+
548
+ &-icon {
549
+ width: 12px;
550
+ height: 12px;
551
+ position: relative;
552
+ top: 1px;
553
+
554
+ &.showRole {
555
+ transform: rotate(180deg);
556
+ }
557
+ }
558
+ }
559
+
560
+ &-item {
561
+ display: flex;
562
+ font-size: 10px;
563
+ margin-bottom: 10px;
564
+
565
+ &:last-child {
566
+ margin-bottom: 0;
567
+ }
568
+
569
+ &-name {
570
+ opacity: 0.5;
571
+ white-space: nowrap;
572
+ margin-right: 10px;
573
+ min-width: 40px;
574
+ }
575
+
576
+ &-info {
577
+ flex: 1;
578
+ color: #1a1a1a;
579
+ }
580
+ }
581
+ }
582
+
583
+ &-user {
584
+ margin-bottom: 4px;
585
+ font-size: 12px;
586
+ display: flex;
587
+ align-items: center;
588
+
589
+ &-icon {
590
+ width: 10px;
591
+ height: 10px;
592
+ margin-left: 4px;
593
+ }
594
+ }
595
+
596
+ &-dept {
597
+ display: flex;
598
+ flex-wrap: wrap;
599
+ font-size: 10px;
600
+ color: rgba(26, 26, 26, 0.8);
601
+
602
+ &-item {
603
+ font-size: 10px;
604
+ color: rgba(26, 26, 26, 0.5);
605
+ margin: 4px 10px 4px 0;
606
+
607
+ &:first-child {
608
+ color: rgba(26, 26, 26, 0.8);
609
+ }
610
+ }
611
+ }
612
+ }
613
+ }
614
+
615
+ &-ft {
616
+ &-btn {
617
+ width: 100%;
618
+ border-color: transparent !important;
619
+ color: rgba(27, 63, 107, 0.8) !important;
620
+ }
621
+ }
622
+
623
+ .nut-cell {
624
+ padding: 11px 0;
625
+ margin: 0;
626
+ box-shadow: none;
627
+ border-bottom: 1px solid #f0f0f0;
628
+ font-size: 16px;
629
+
630
+ .nut-cell__value {
631
+ font-size: 16px;
632
+ color: #000;
633
+ }
634
+
635
+ .nut-cell__link {
636
+ color: #ccc;
637
+ margin-left: 8px;
638
+ }
639
+ }
640
+ }
641
+
642
+ .upload-avatar-popup {
643
+ &-box {
644
+ display: flex;
645
+ flex-direction: column;
646
+ align-items: center;
647
+ justify-content: center;
648
+ }
649
+
650
+ &-avatar {
651
+ width: 320px;
652
+ height: 320px;
653
+ overflow: hidden;
654
+ border-radius: 50%;
655
+ margin-bottom: 50px;
656
+ }
657
+
658
+ &-btn {
659
+ width: 106px;
660
+ height: 37px;
661
+ border-radius: 50px;
662
+ border: 1px solid #ffffff;
663
+ display: flex;
664
+ justify-content: center;
665
+ align-items: center;
666
+ color: #ffffff;
667
+ font-size: 16px;
668
+ }
669
+ }
670
+
671
+ .change-username-popup {
672
+ .nut-dialog {
673
+ min-height: auto;
674
+ }
675
+
676
+ .nut-input {
677
+ height: 40px;
678
+ padding: 0;
679
+ display: flex;
680
+ align-items: center;
681
+ font-size: 16px;
682
+ border: none;
683
+
684
+ .input-text {
685
+ width: 100%;
686
+ height: 100%;
687
+ font-size: 14px;
688
+ }
689
+
690
+ .nut-input-value,
691
+ .nut-input-inner,
692
+ .nut-input-box {
693
+ height: 100%;
694
+ overflow: hidden;
695
+ background: #f5f5f5;
696
+ border-radius: 6px;
697
+ }
698
+
699
+ .nut-placeholder {
700
+ color: #cccccc;
701
+ line-height: 38px;
702
+ height: 38px;
703
+ }
704
+
705
+ .nut-input-box {
706
+ padding: 0 15px;
707
+ }
708
+ }
709
+
710
+ &-cancel.nut-button {
711
+ border-radius: 15px;
712
+ font-size: 14px;
713
+ height: 30px;
714
+ }
715
+
716
+ &-ok.nut-button {
717
+ background: var(--app-primary-color, #017fff);
718
+ height: 30px;
719
+ font-size: 14px;
720
+ border-radius: 15px;
721
+ }
722
+ }
723
+ </style>