Browse Source

所属部门回显bug

yukai 1 year ago
parent
commit
3411f7ce00
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/views/iot/property/dossier/edit.vue

+ 4 - 2
src/views/iot/property/dossier/edit.vue

@@ -200,7 +200,6 @@ const open = async (row: any,productInfo:any) => {
 					id:getIdByKey(row.productKey),
 					key:row.productKey,
 				}
-			
 			}
 			//根据产品ID获取设备列表
 			api.device.allList({ productId: productInfo.id }).then((res: any) => {
@@ -216,8 +215,11 @@ const open = async (row: any,productInfo:any) => {
 		
 		//获取部门
 		api.dept.getList({ status: -1 }).then((res: any) => {
+				res.forEach((item) => {
+					item.deptId = item.deptId.toString();
+				});
         deptData.value = res || [];
-      });
+    });
 
 		console.log(row);
 		Object.assign(formData, { ...row });