Commit 36d028484b63f41cabfb8862e40141ec2e4aafc1

Authored by xp.Huang
2 parents 7e5ba484 b5f017a3

Merge branch 'local_dev_ft' into 'main'

fix:上下线记录修改为产品名字,客户进入添加判断

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