Commit 5c00e249776a604d3e2cd8801889be5588f189ac

Authored by ww
1 parent 645bde0e

perf: DEFECT-805 modify device profile name to product

@@ -12,5 +12,5 @@ export const PageEnum = { @@ -12,5 +12,5 @@ export const PageEnum = {
12 //消息配置 12 //消息配置
13 MESSAGE_CONFIG: '/message/config', 13 MESSAGE_CONFIG: '/message/config',
14 //设备配置 14 //设备配置
15 - DEVICE_PROFILE: '/device/profiles', 15 + DEVICE_PROFILE: '/product/profiles',
16 }; 16 };
@@ -17,7 +17,7 @@ export default { @@ -17,7 +17,7 @@ export default {
17 device: { 17 device: {
18 deviceManagement: '设备管理', 18 deviceManagement: '设备管理',
19 device: '设备列表', 19 device: '设备列表',
20 - deviceProfile: '设备配置', 20 + product: '产品',
21 }, 21 },
22 22
23 tenant: { 23 tenant: {
@@ -250,7 +250,7 @@ export const DeviceProfileIdMaxLength: Rule[] = [ @@ -250,7 +250,7 @@ export const DeviceProfileIdMaxLength: Rule[] = [
250 required: true, 250 required: true,
251 validator: (_, value: string) => { 251 validator: (_, value: string) => {
252 if (String(value).length > 36) { 252 if (String(value).length > 36) {
253 - return Promise.reject('设备配置长度不超过36字'); 253 + return Promise.reject('所属产品长度不超过36字');
254 } 254 }
255 return Promise.resolve(); 255 return Promise.resolve();
256 }, 256 },
@@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
206 target: '_blank ', 206 target: '_blank ',
207 }, 207 },
208 { 208 {
209 - title: '什么是设备配置?', 209 + title: '什么是产品?',
210 href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E9%85%8D%E7%BD%AE', 210 href: 'https://docs.thingskit.com/thingskit-link/operation-guide/device-manage.html#%E8%AE%BE%E5%A4%87%E9%85%8D%E7%BD%AE',
211 target: '_blank ', 211 target: '_blank ',
212 }, 212 },
@@ -35,7 +35,7 @@ export const step1Schemas: FormSchema[] = [ @@ -35,7 +35,7 @@ export const step1Schemas: FormSchema[] = [
35 }, 35 },
36 { 36 {
37 field: 'profileId', 37 field: 'profileId',
38 - label: '设备配置', 38 + label: '所属产品',
39 required: true, 39 required: true,
40 component: 'ApiSelect', 40 component: 'ApiSelect',
41 componentProps: ({ formActionType }) => { 41 componentProps: ({ formActionType }) => {
@@ -57,7 +57,7 @@ export const step1Schemas: FormSchema[] = [ @@ -57,7 +57,7 @@ export const step1Schemas: FormSchema[] = [
57 required: true, 57 required: true,
58 component: 'ApiSelect', 58 component: 'ApiSelect',
59 dynamicDisabled: true, 59 dynamicDisabled: true,
60 - helpMessage: ['选择设备配置,自动关联设备类型'], 60 + helpMessage: ['选择所属产品,自动关联设备类型'],
61 componentProps: { 61 componentProps: {
62 placeholder: '设备类型', 62 placeholder: '设备类型',
63 api: findDictItemByCode, 63 api: findDictItemByCode,
@@ -21,7 +21,7 @@ export const descSchema: DescItem[] = [ @@ -21,7 +21,7 @@ export const descSchema: DescItem[] = [
21 }, 21 },
22 { 22 {
23 field: 'deviceProfile.name', 23 field: 'deviceProfile.name',
24 - label: '设备配置', 24 + label: '产品',
25 }, 25 },
26 { 26 {
27 field: 'gatewayName', 27 field: 'gatewayName',
@@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [ @@ -32,7 +32,7 @@ export const columns: BasicColumn[] = [
32 slots: { customRender: 'deviceType' }, 32 slots: { customRender: 'deviceType' },
33 }, 33 },
34 { 34 {
35 - title: '设备配置', 35 + title: '所属产品',
36 dataIndex: 'deviceProfile.name', 36 dataIndex: 'deviceProfile.name',
37 width: 160, 37 width: 160,
38 slots: { customRender: 'deviceProfile' }, 38 slots: { customRender: 'deviceProfile' },
@@ -33,7 +33,7 @@ export const formSchema: FormSchema[] = [ @@ -33,7 +33,7 @@ export const formSchema: FormSchema[] = [
33 component: 'ApiSelect', 33 component: 'ApiSelect',
34 componentProps: { 34 componentProps: {
35 api: getDeviceProfile, 35 api: getDeviceProfile,
36 - placeholder: '请选择设备配置', 36 + placeholder: '请选择产品',
37 labelField: 'name', 37 labelField: 'name',
38 valueField: 'id', 38 valueField: 'id',
39 }, 39 },
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 :size="size" 33 :size="size"
34 @change="handleChange" 34 @change="handleChange"
35 > 35 >
36 - <TabPane forceRender key="1" tab="设备配置"> 36 + <TabPane forceRender key="1" tab="产品">
37 <div class="relative"> 37 <div class="relative">
38 <DeviceConfigurationStep 38 <DeviceConfigurationStep
39 :ifShowBtn="isViewDetail ? false : true" 39 :ifShowBtn="isViewDetail ? false : true"
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 isEditCreatTime.value = data.record !== undefined ? data.record.createTime : null; 109 isEditCreatTime.value = data.record !== undefined ? data.record.createTime : null;
110 if (!unref(isViewDetail)) { 110 if (!unref(isViewDetail)) {
111 dynamicWidth.value = 55 + 'rem'; 111 dynamicWidth.value = 55 + 'rem';
112 - const title = !unref(isUpdate) ? '编辑设备配置' : '新增设备配置'; 112 + const title = !unref(isUpdate) ? '编辑产品' : '新增产品';
113 setModalProps({ title, showOkBtn: true, showCancelBtn: true }); 113 setModalProps({ title, showOkBtn: true, showCancelBtn: true });
114 if (!unref(isUpdate)) { 114 if (!unref(isUpdate)) {
115 await setDeviceConfEditFormData(res); 115 await setDeviceConfEditFormData(res);
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
118 } 118 }
119 } else { 119 } else {
120 dynamicWidth.value = 60 + 'rem'; 120 dynamicWidth.value = 60 + 'rem';
121 - setModalProps({ showOkBtn: false, showCancelBtn: false, title: '设备配置详情' }); 121 + setModalProps({ showOkBtn: false, showCancelBtn: false, title: '产品详情' });
122 await setDeviceConfEditFormData(res); 122 await setDeviceConfEditFormData(res);
123 await setTransConfEditFormData(res); 123 await setTransConfEditFormData(res);
124 handleStepNext(false, res); 124 handleStepNext(false, res);
@@ -10,7 +10,7 @@ import { deviceConfigGetRuleChain } from '/@/api/device/deviceConfigApi'; @@ -10,7 +10,7 @@ import { deviceConfigGetRuleChain } from '/@/api/device/deviceConfigApi';
10 10
11 export const steps = [ 11 export const steps = [
12 { 12 {
13 - title: '设备配置', 13 + title: '产品',
14 content: 'First-content', 14 content: 'First-content',
15 }, 15 },
16 { 16 {
@@ -8,11 +8,11 @@ @@ -8,11 +8,11 @@
8 > 8 >
9 <template #toolbar> 9 <template #toolbar>
10 <Authority value="api:yt:deviceProfile:post"> 10 <Authority value="api:yt:deviceProfile:post">
11 - <a-button type="primary" @click="handleCreate"> 新增设备配置 </a-button> 11 + <a-button type="primary" @click="handleCreate"> 新增产品 </a-button>
12 </Authority> 12 </Authority>
13 <Authority value="api:yt:deviceProfile:import"> 13 <Authority value="api:yt:deviceProfile:import">
14 <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD"> 14 <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
15 - <a-button @click="handleImport"> 导入设备配置 </a-button> 15 + <a-button @click="handleImport"> 导入产品 </a-button>
16 </ImpExcel> 16 </ImpExcel>
17 </Authority> 17 </Authority>
18 <Authority value="api:yt:deviceProfile:delete"> 18 <Authority value="api:yt:deviceProfile:delete">
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 const [registerModal, { openModal }] = useModal(); 126 const [registerModal, { openModal }] = useModal();
127 const [registerExportModal, { openModal: openModalExcel }] = useModal(); 127 const [registerExportModal, { openModal: openModalExcel }] = useModal();
128 const [registerTable, { setProps, reload, setTableData, getForm }] = useTable({ 128 const [registerTable, { setProps, reload, setTableData, getForm }] = useTable({
129 - title: '设备配置列表', 129 + title: '产品列表',
130 clickToRowSelect: false, 130 clickToRowSelect: false,
131 api: deviceConfigGetQuery, 131 api: deviceConfigGetQuery,
132 immediate: immediateStatus.value, 132 immediate: immediateStatus.value,
@@ -297,8 +297,8 @@ @@ -297,8 +297,8 @@
297 const handleSetDefault = async (record: Recordable) => { 297 const handleSetDefault = async (record: Recordable) => {
298 let id = record.tbProfileId; 298 let id = record.tbProfileId;
299 const data = await setDeviceProfileIsDefaultApi(id, 'default', defaultObj); 299 const data = await setDeviceProfileIsDefaultApi(id, 'default', defaultObj);
300 - if (!data) return createMessage.error('设置该设备配置为默认失败');  
301 - createMessage.success('设置该设备配置为默认成功'); 300 + if (!data) return createMessage.error('设置该产品为默认失败');
  301 + createMessage.success('设置该产品为默认成功');
302 reload(); 302 reload();
303 disabled.value = true; 303 disabled.value = true;
304 }; 304 };
@@ -103,15 +103,15 @@ export const formSchema: FormSchema[] = [ @@ -103,15 +103,15 @@ export const formSchema: FormSchema[] = [
103 }, 103 },
104 { 104 {
105 field: PackageField.DEVICE_PROFILE_INFO, 105 field: PackageField.DEVICE_PROFILE_INFO,
106 - label: '设备配置', 106 + label: '所属产品',
107 component: 'ApiSearchSelect', 107 component: 'ApiSearchSelect',
108 helpMessage: ['上传的包仅适用于具有所选配置文件的设备'], 108 helpMessage: ['上传的包仅适用于具有所选配置文件的设备'],
109 defaultValue: 'default', 109 defaultValue: 'default',
110 - rules: [{ required: true, message: '设备配置为必填项' }], 110 + rules: [{ required: true, message: '所属产品为必填项' }],
111 componentProps: ({ formActionType }) => { 111 componentProps: ({ formActionType }) => {
112 const { setFieldsValue } = formActionType; 112 const { setFieldsValue } = formActionType;
113 return { 113 return {
114 - placeholder: '请选择设备配置', 114 + placeholder: '请选择所属产品',
115 showSearch: true, 115 showSearch: true,
116 resultField: 'data', 116 resultField: 'data',
117 labelField: 'name', 117 labelField: 'name',
@@ -137,7 +137,7 @@ export const formSchema: FormSchema[] = [ @@ -137,7 +137,7 @@ export const formSchema: FormSchema[] = [
137 field: PackageField.PACKAGE_TYPE, 137 field: PackageField.PACKAGE_TYPE,
138 label: '包类型', 138 label: '包类型',
139 component: 'Select', 139 component: 'Select',
140 - helpMessage: ['上传包后,您将无法修改标题、版本、设备配置文件和包类型'], 140 + helpMessage: ['上传包后,您将无法修改标题、版本、产品文件和包类型'],
141 defaultValue: PackageType.FIRMWARE, 141 defaultValue: PackageType.FIRMWARE,
142 rules: [{ required: true, message: '包类型为必填项' }], 142 rules: [{ required: true, message: '包类型为必填项' }],
143 componentProps: () => { 143 componentProps: () => {
@@ -146,7 +146,7 @@ export const formSchema: FormSchema[] = [ @@ -146,7 +146,7 @@ export const formSchema: FormSchema[] = [
146 { label: '固件', value: PackageType.FIRMWARE }, 146 { label: '固件', value: PackageType.FIRMWARE },
147 { label: '软件', value: PackageType.SOFTWARE }, 147 { label: '软件', value: PackageType.SOFTWARE },
148 ], 148 ],
149 - placeholder: '请选择设备配置', 149 + placeholder: '请选择所属产品',
150 }; 150 };
151 }, 151 },
152 }, 152 },
@@ -21,7 +21,7 @@ export const formSchema: FormSchema[] = [ @@ -21,7 +21,7 @@ export const formSchema: FormSchema[] = [
21 }, 21 },
22 { 22 {
23 field: PackageField.DEVICE_PROFILE_INFO, 23 field: PackageField.DEVICE_PROFILE_INFO,
24 - label: '设备配置', 24 + label: '所属产品',
25 component: 'Input', 25 component: 'Input',
26 }, 26 },
27 { 27 {
@@ -35,7 +35,7 @@ export const formSchema: FormSchema[] = [ @@ -35,7 +35,7 @@ export const formSchema: FormSchema[] = [
35 { label: '固件', value: PackageType.FIRMWARE }, 35 { label: '固件', value: PackageType.FIRMWARE },
36 { label: '软件', value: PackageType.SOFTWARE }, 36 { label: '软件', value: PackageType.SOFTWARE },
37 ], 37 ],
38 - placeholder: '请选择设备配置', 38 + placeholder: '请选择所属产品',
39 }; 39 };
40 }, 40 },
41 }, 41 },