Commit 53b9a64fd9c160e29b619f0031eebaec2fb1bcef

Authored by fengtao
1 parent 818b1fa5

fix:DEFECT-511 编辑设备配置,创建时间是很早前,编辑后,创建时间为当前时间了

... ... @@ -70,6 +70,7 @@
70 70 let getStepTwoData: any = reactive({});
71 71 const editData: any = ref({});
72 72 const postEditId = ref('');
  73 + const createTime = ref('');
73 74 const current = ref(0);
74 75 const isUpdate = ref(0);
75 76 const isShowOkBtnFalse = ref(true);
... ... @@ -96,6 +97,7 @@
96 97 isShowOkBtnFalse.value = true;
97 98 current.value = 0;
98 99 postEditId.value = data.record.id;
  100 + createTime.value = data.record.createTime;
99 101 editData.value = await deviceConfigGetDetail(postEditId.value);
100 102 proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({
101 103 name: editData.value.name,
... ... @@ -109,6 +111,7 @@
109 111 isShowOkBtnFalse.value = false;
110 112 current.value = 0;
111 113 postEditId.value = data.record.id;
  114 + createTime.value = data.record.createTime;
112 115 editData.value = await deviceConfigGetDetail(postEditId.value);
113 116 proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({
114 117 name: editData.value.name,
... ... @@ -154,6 +157,7 @@
154 157 };
155 158 }
156 159 const id = isUpdate.value == 1 ? '' : postEditId.value;
  160 + const createTimePost = isUpdate.value == 1 ? {} : { createTime: createTime.value };
157 161
158 162 if (Object.keys(getStepTwoData?.transportConfiguration).length == 0) {
159 163 profileDataObj.profileData = null;
... ... @@ -163,6 +167,7 @@
163 167 ...profileDataObj,
164 168 ...transportTypeObj,
165 169 id,
  170 + ...createTimePost,
166 171 };
167 172 if (isUpdate.value == 1) {
168 173 delete postDeviceConfogData.id;
... ...