...
|
...
|
@@ -33,13 +33,19 @@ |
33
|
33
|
</Card>
|
34
|
34
|
<Loading v-bind="compState" />
|
35
|
35
|
<Authority value="api:yt:enterprise:update:update">
|
36
|
|
- <a-button @click="handleUpdateInfo" type="primary" class="mt-4">更新基本信息</a-button>
|
|
36
|
+ <a-button
|
|
37
|
+ v-if="isWhereAdmin !== 'CUSTOMER_USER'"
|
|
38
|
+ @click="handleUpdateInfo"
|
|
39
|
+ type="primary"
|
|
40
|
+ class="mt-4"
|
|
41
|
+ >更新基本信息</a-button
|
|
42
|
+ >
|
37
|
43
|
</Authority>
|
38
|
44
|
</div>
|
39
|
45
|
</template>
|
40
|
46
|
|
41
|
47
|
<script lang="ts">
|
42
|
|
- import { defineComponent, onMounted, ref } from 'vue';
|
|
48
|
+ import { defineComponent, onMounted, ref, computed } from 'vue';
|
43
|
49
|
import { Card, Upload } from 'ant-design-vue';
|
44
|
50
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
45
|
51
|
import { schemas, provSchemas } from '../config/enterPriseInfo.config';
|
...
|
...
|
@@ -53,6 +59,8 @@ |
53
|
59
|
import type { FileItem } from '/@/components/Upload/src/typing';
|
54
|
60
|
import type { CityItem, Code } from '../types';
|
55
|
61
|
import { Authority } from '/@/components/Authority';
|
|
62
|
+ import { USER_INFO_KEY } from '/@/enums/cacheEnum';
|
|
63
|
+ import { getAuthCache } from '/@/utils/auth';
|
56
|
64
|
|
57
|
65
|
export default defineComponent({
|
58
|
66
|
components: {
|
...
|
...
|
@@ -65,6 +73,17 @@ |
65
|
73
|
LoadingOutlined,
|
66
|
74
|
},
|
67
|
75
|
setup() {
|
|
76
|
+ const userInfo: any = getAuthCache(USER_INFO_KEY);
|
|
77
|
+ const isWhereAdmin: any = computed(() => {
|
|
78
|
+ if (userInfo.roles.includes('TENANT_ADMIN')) {
|
|
79
|
+ return 'TENANT_ADMIN';
|
|
80
|
+ } else if (userInfo.roles.includes('CUSTOMER_USER')) {
|
|
81
|
+ return 'CUSTOMER_USER';
|
|
82
|
+ } else {
|
|
83
|
+ return 'SYS_ADMIN';
|
|
84
|
+ }
|
|
85
|
+ });
|
|
86
|
+
|
68
|
87
|
const loading = ref(false);
|
69
|
88
|
const compState = ref({
|
70
|
89
|
absolute: false,
|
...
|
...
|
@@ -355,6 +374,7 @@ |
355
|
374
|
beforeUploadqrcodePic,
|
356
|
375
|
registerCustomForm,
|
357
|
376
|
loading,
|
|
377
|
+ isWhereAdmin,
|
358
|
378
|
};
|
359
|
379
|
},
|
360
|
380
|
});
|
...
|
...
|
|