Commit 36d028484b63f41cabfb8862e40141ec2e4aafc1
Merge branch 'local_dev_ft' into 'main'
fix:上下线记录修改为产品名字,客户进入添加判断 See merge request huang/yun-teng-iot-front!469
Showing
2 changed files
with
15 additions
and
5 deletions
@@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [ | @@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [ | ||
12 | width: 120, | 12 | width: 120, |
13 | }, | 13 | }, |
14 | { | 14 | { |
15 | - title: '设备配置', | 15 | + title: '产品', |
16 | dataIndex: 'deviceProfileName', | 16 | dataIndex: 'deviceProfileName', |
17 | width: 120, | 17 | width: 120, |
18 | }, | 18 | }, |
@@ -79,11 +79,11 @@ export const searchFormSchema: FormSchema[] = [ | @@ -79,11 +79,11 @@ export const searchFormSchema: FormSchema[] = [ | ||
79 | }, | 79 | }, |
80 | { | 80 | { |
81 | field: 'deviceProfileName', | 81 | field: 'deviceProfileName', |
82 | - label: '设备配置', | 82 | + label: '产品', |
83 | component: 'Input', | 83 | component: 'Input', |
84 | componentProps: { | 84 | componentProps: { |
85 | maxLength: 255, | 85 | maxLength: 255, |
86 | - placeholder: '请输入设备配置', | 86 | + placeholder: '请输入产品', |
87 | }, | 87 | }, |
88 | dynamicRules: () => { | 88 | dynamicRules: () => { |
89 | return [ | 89 | return [ |
@@ -162,7 +162,7 @@ export const formSchema: DescItem[] = [ | @@ -162,7 +162,7 @@ export const formSchema: DescItem[] = [ | ||
162 | }, | 162 | }, |
163 | { | 163 | { |
164 | field: 'deviceProfileName', | 164 | field: 'deviceProfileName', |
165 | - label: '设备配置', | 165 | + label: '产品', |
166 | }, | 166 | }, |
167 | { | 167 | { |
168 | field: 'deviceType', | 168 | field: 'deviceType', |
@@ -50,6 +50,7 @@ | @@ -50,6 +50,7 @@ | ||
50 | icon: 'ant-design:login-outlined', | 50 | icon: 'ant-design:login-outlined', |
51 | tooltip: '以客户用户身份登录', | 51 | tooltip: '以客户用户身份登录', |
52 | onClick: handleLoginCustomAdmin.bind(null, record), | 52 | onClick: handleLoginCustomAdmin.bind(null, record), |
53 | + ifShow: !isAdmin(role), | ||
53 | }, | 54 | }, |
54 | { | 55 | { |
55 | label: '用户详情', | 56 | label: '用户详情', |
@@ -110,6 +111,9 @@ | @@ -110,6 +111,9 @@ | ||
110 | import { RouteRecordRaw } from 'vue-router'; | 111 | import { RouteRecordRaw } from 'vue-router'; |
111 | import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; | 112 | import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; |
112 | import { PageEnum } from '/@/enums/pageEnum'; | 113 | import { PageEnum } from '/@/enums/pageEnum'; |
114 | + import { getAuthCache } from '/@/utils/auth'; | ||
115 | + import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | ||
116 | + import { isAdmin } from '/@/enums/roleEnum'; | ||
113 | 117 | ||
114 | export default defineComponent({ | 118 | export default defineComponent({ |
115 | name: 'AccountManagement', | 119 | name: 'AccountManagement', |
@@ -124,6 +128,9 @@ | @@ -124,6 +128,9 @@ | ||
124 | Popconfirm, | 128 | Popconfirm, |
125 | }, | 129 | }, |
126 | setup() { | 130 | setup() { |
131 | + const userInfo: any = getAuthCache(USER_INFO_KEY); | ||
132 | + const role: string = userInfo?.roles[0]; | ||
133 | + | ||
127 | const go = useGo(); | 134 | const go = useGo(); |
128 | const [registerModal, { openModal }] = useModal(); | 135 | const [registerModal, { openModal }] = useModal(); |
129 | let searchInfo = reactive<Recordable>({}); | 136 | let searchInfo = reactive<Recordable>({}); |
@@ -137,7 +144,7 @@ | @@ -137,7 +144,7 @@ | ||
137 | formConfig: { | 144 | formConfig: { |
138 | labelWidth: 120, | 145 | labelWidth: 120, |
139 | schemas: searchFormSchema, | 146 | schemas: searchFormSchema, |
140 | - autoSubmitOnEnter: true, | 147 | + // autoSubmitOnEnter: true, |
141 | resetFunc: resetFn, | 148 | resetFunc: resetFn, |
142 | }, | 149 | }, |
143 | useSearchForm: true, | 150 | useSearchForm: true, |
@@ -148,6 +155,7 @@ | @@ -148,6 +155,7 @@ | ||
148 | title: '操作', | 155 | title: '操作', |
149 | dataIndex: 'action', | 156 | dataIndex: 'action', |
150 | slots: { customRender: 'action' }, | 157 | slots: { customRender: 'action' }, |
158 | + fixed: 'right', | ||
151 | }, | 159 | }, |
152 | }); | 160 | }); |
153 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete( | 161 | const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete( |
@@ -218,6 +226,8 @@ | @@ -218,6 +226,8 @@ | ||
218 | organizationIdTreeRef, | 226 | organizationIdTreeRef, |
219 | hasBatchDelete, | 227 | hasBatchDelete, |
220 | handleDeleteOrBatchDelete, | 228 | handleDeleteOrBatchDelete, |
229 | + isAdmin, | ||
230 | + role, | ||
221 | }; | 231 | }; |
222 | }, | 232 | }, |
223 | }); | 233 | }); |