Commit 53b9a64fd9c160e29b619f0031eebaec2fb1bcef
1 parent
818b1fa5
fix:DEFECT-511 编辑设备配置,创建时间是很早前,编辑后,创建时间为当前时间了
Showing
1 changed file
with
5 additions
and
0 deletions
@@ -70,6 +70,7 @@ | @@ -70,6 +70,7 @@ | ||
70 | let getStepTwoData: any = reactive({}); | 70 | let getStepTwoData: any = reactive({}); |
71 | const editData: any = ref({}); | 71 | const editData: any = ref({}); |
72 | const postEditId = ref(''); | 72 | const postEditId = ref(''); |
73 | + const createTime = ref(''); | ||
73 | const current = ref(0); | 74 | const current = ref(0); |
74 | const isUpdate = ref(0); | 75 | const isUpdate = ref(0); |
75 | const isShowOkBtnFalse = ref(true); | 76 | const isShowOkBtnFalse = ref(true); |
@@ -96,6 +97,7 @@ | @@ -96,6 +97,7 @@ | ||
96 | isShowOkBtnFalse.value = true; | 97 | isShowOkBtnFalse.value = true; |
97 | current.value = 0; | 98 | current.value = 0; |
98 | postEditId.value = data.record.id; | 99 | postEditId.value = data.record.id; |
100 | + createTime.value = data.record.createTime; | ||
99 | editData.value = await deviceConfigGetDetail(postEditId.value); | 101 | editData.value = await deviceConfigGetDetail(postEditId.value); |
100 | proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({ | 102 | proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({ |
101 | name: editData.value.name, | 103 | name: editData.value.name, |
@@ -109,6 +111,7 @@ | @@ -109,6 +111,7 @@ | ||
109 | isShowOkBtnFalse.value = false; | 111 | isShowOkBtnFalse.value = false; |
110 | current.value = 0; | 112 | current.value = 0; |
111 | postEditId.value = data.record.id; | 113 | postEditId.value = data.record.id; |
114 | + createTime.value = data.record.createTime; | ||
112 | editData.value = await deviceConfigGetDetail(postEditId.value); | 115 | editData.value = await deviceConfigGetDetail(postEditId.value); |
113 | proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({ | 116 | proxy.$refs.DeviceProfileStep1Ref.setStepOneFieldsValueFunc({ |
114 | name: editData.value.name, | 117 | name: editData.value.name, |
@@ -154,6 +157,7 @@ | @@ -154,6 +157,7 @@ | ||
154 | }; | 157 | }; |
155 | } | 158 | } |
156 | const id = isUpdate.value == 1 ? '' : postEditId.value; | 159 | const id = isUpdate.value == 1 ? '' : postEditId.value; |
160 | + const createTimePost = isUpdate.value == 1 ? {} : { createTime: createTime.value }; | ||
157 | 161 | ||
158 | if (Object.keys(getStepTwoData?.transportConfiguration).length == 0) { | 162 | if (Object.keys(getStepTwoData?.transportConfiguration).length == 0) { |
159 | profileDataObj.profileData = null; | 163 | profileDataObj.profileData = null; |
@@ -163,6 +167,7 @@ | @@ -163,6 +167,7 @@ | ||
163 | ...profileDataObj, | 167 | ...profileDataObj, |
164 | ...transportTypeObj, | 168 | ...transportTypeObj, |
165 | id, | 169 | id, |
170 | + ...createTimePost, | ||
166 | }; | 171 | }; |
167 | if (isUpdate.value == 1) { | 172 | if (isUpdate.value == 1) { |
168 | delete postDeviceConfogData.id; | 173 | delete postDeviceConfogData.id; |