Commit 46b59c872c654af5d90aff1ec7466b00d8f61e72

Authored by sqy
1 parent 10fdcf85

'调整bug'

@@ -45,7 +45,7 @@ export const deleteAlarmContact = (ids: string[]) => { @@ -45,7 +45,7 @@ export const deleteAlarmContact = (ids: string[]) => {
45 // 新增或者编辑 45 // 新增或者编辑
46 export const saveOrEditAlarmContact = (params: ContactInfo, isUpdate: boolean) => { 46 export const saveOrEditAlarmContact = (params: ContactInfo, isUpdate: boolean) => {
47 if (isUpdate) return updateAlarmContact(params); 47 if (isUpdate) return updateAlarmContact(params);
48 - addAlarmContact(params); 48 + return addAlarmContact(params);
49 }; 49 };
50 50
51 // 查询设备分页数据 51 // 查询设备分页数据
@@ -16,7 +16,7 @@ enum DeviceManagerApi { @@ -16,7 +16,7 @@ enum DeviceManagerApi {
16 */ 16 */
17 DEVICE_PROFILE_URL = '/deviceProfile', 17 DEVICE_PROFILE_URL = '/deviceProfile',
18 18
19 - DEVICE_PROFILE_URL_ME = '/deviceProfile/me', 19 + DEVICE_PROFILE_URL_ME = '/deviceProfile/me/list',
20 } 20 }
21 21
22 export const devicePage = (params: DeviceQueryParam) => { 22 export const devicePage = (params: DeviceQueryParam) => {
@@ -42,7 +42,7 @@ export const getAccountList = (params: AccountParams) => @@ -42,7 +42,7 @@ export const getAccountList = (params: AccountParams) =>
42 */ 42 */
43 export const getOrganizationList = (params?: OrganizationListItem) => 43 export const getOrganizationList = (params?: OrganizationListItem) =>
44 defHttp.get<OrganizationListGetResultModel>({ 44 defHttp.get<OrganizationListGetResultModel>({
45 - url: Api.BaseOrganization + '/me/organizations', 45 + url: Api.BaseOrganization + '/me/list',
46 params, 46 params,
47 }); 47 });
48 48
@@ -7,7 +7,7 @@ import { copyTransFun } from '/@/utils/fnUtils'; @@ -7,7 +7,7 @@ import { copyTransFun } from '/@/utils/fnUtils';
7 export const step1Schemas: FormSchema[] = [ 7 export const step1Schemas: FormSchema[] = [
8 { 8 {
9 field: 'icon', 9 field: 'icon',
10 - label: '设备图片: ', 10 + label: '设备图片',
11 slot: 'iconSelect', 11 slot: 'iconSelect',
12 component: 'Input', 12 component: 'Input',
13 }, 13 },
@@ -84,14 +84,14 @@ export const step1Schemas: FormSchema[] = [ @@ -84,14 +84,14 @@ export const step1Schemas: FormSchema[] = [
84 show: false, 84 show: false,
85 }, 85 },
86 { 86 {
87 - field: 'profileId',  
88 - label: '设备配置id', 87 + field: 'deviceToken',
  88 + label: '设备唯一token',
89 component: 'Input', 89 component: 'Input',
90 show: false, 90 show: false,
91 }, 91 },
92 { 92 {
93 - field: 'deviceToken',  
94 - label: '设备唯一token', 93 + field: 'tenantId',
  94 + label: '租户Code',
95 component: 'Input', 95 component: 'Input',
96 show: false, 96 show: false,
97 }, 97 },
@@ -111,8 +111,8 @@ @@ -111,8 +111,8 @@
111 } else { 111 } else {
112 if (!DeviceStep2Ref?.value?.creaentialsPassword.isCreaentials) { 112 if (!DeviceStep2Ref?.value?.creaentialsPassword.isCreaentials) {
113 const valid = await DeviceStep2Ref?.value?.validate(); 113 const valid = await DeviceStep2Ref?.value?.validate();
114 - if (!valid) return;  
115 // 第二页验证通过情况 114 // 第二页验证通过情况
  115 + if (!valid) return;
116 handleCancel(); 116 handleCancel();
117 closeModal(); 117 closeModal();
118 } 118 }
@@ -13,7 +13,6 @@ @@ -13,7 +13,6 @@
13 > 13 >
14 <img v-if="devicePic" :src="devicePic" alt="avatar" /> 14 <img v-if="devicePic" :src="devicePic" alt="avatar" />
15 <div v-else> 15 <div v-else>
16 - <!-- <LoadingOutlined v-if="loading" /> -->  
17 <PlusOutlined /> 16 <PlusOutlined />
18 <div class="ant-upload-text">图片上传</div> 17 <div class="ant-upload-text">图片上传</div>
19 </div> 18 </div>
@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 } 90 }
91 }; 91 };
92 const copyToken = () => { 92 const copyToken = () => {
93 - clipboardRef.value = props.deviceDetail.token; 93 + clipboardRef.value = props.deviceDetail.deviceToken;
94 if (unref(clipboardRef)) { 94 if (unref(clipboardRef)) {
95 createMessage.success('复制成功~'); 95 createMessage.success('复制成功~');
96 } 96 }
@@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
6 <a-button type="primary" @click="handleCreate"> 新增设备 </a-button> 6 <a-button type="primary" @click="handleCreate"> 新增设备 </a-button>
7 </template> 7 </template>
8 <template #deviceProfile="{ record }"> 8 <template #deviceProfile="{ record }">
9 - <a-button type="link" class="ml-2" @click="goDeviceProfile"> 9 + <!-- <a-button type="link" class="ml-2" @click="goDeviceProfile">
10 {{ record.deviceProfile.name }} 10 {{ record.deviceProfile.name }}
11 - </a-button> 11 + </a-button> -->
12 </template> 12 </template>
13 <template #organizationId="{ record }"> 13 <template #organizationId="{ record }">
14 {{ record.organizationDTO.name }} 14 {{ record.organizationDTO.name }}
@@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@
127 title: '操作', 127 title: '操作',
128 dataIndex: 'action', 128 dataIndex: 'action',
129 slots: { customRender: 'action' }, 129 slots: { customRender: 'action' },
130 - fixed: undefined, 130 + fixed: 'right',
131 }, 131 },
132 }); 132 });
133 const handleReload = () => { 133 const handleReload = () => {
@@ -112,8 +112,6 @@ @@ -112,8 +112,6 @@
112 codeTown: fieldsValue.nameTown, 112 codeTown: fieldsValue.nameTown,
113 qrCode: qrcodePic.value, 113 qrCode: qrcodePic.value,
114 }; 114 };
115 - console.log(fieldsValue);  
116 - console.log(newFieldValue);  
117 await updateEnterPriseDetail(newFieldValue); 115 await updateEnterPriseDetail(newFieldValue);
118 compState.value.loading = false; 116 compState.value.loading = false;
119 createMessage.success('更新信息成功'); 117 createMessage.success('更新信息成功');
@@ -261,10 +259,10 @@ @@ -261,10 +259,10 @@
261 259
262 onMounted(async () => { 260 onMounted(async () => {
263 const res = await getEnterPriseDetail(); 261 const res = await getEnterPriseDetail();
264 - updateCityData(res.codeProv, res.codeCity, res.codeCoun, res.codeTown); 262 + const { codeProv, codeCity, codeCoun, codeTown } = res.sysTown;
  263 + updateCityData(codeProv, codeCity, codeCoun, codeTown);
265 setFieldsValue(res); 264 setFieldsValue(res);
266 qrcodePic.value = res.qrCode; 265 qrcodePic.value = res.qrCode;
267 - console.log(res);  
268 }); 266 });
269 267
270 return { 268 return {