Commit 46b59c872c654af5d90aff1ec7466b00d8f61e72

Authored by sqy
1 parent 10fdcf85

'调整bug'

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