diff --git a/src/views/iot/baseIot/CheckBaseIotList.vue b/src/views/iot/baseIot/CheckBaseIotList.vue index aec3a83..87e947d 100644 --- a/src/views/iot/baseIot/CheckBaseIotList.vue +++ b/src/views/iot/baseIot/CheckBaseIotList.vue @@ -68,7 +68,7 @@ - + @@ -126,6 +126,7 @@ function searchReset() { //选择摄像头 function handleSxt(item){ console.log("🚀 ~ handleSxt ~ item:", item) + item.orgInfo = orgInfo.value; sxtModal.value.init(item); } //选择电表 @@ -141,6 +142,11 @@ function searchReset() { console.log("🚀 ~ handleWsd ~ item:", item) } + //物联设备同步后刷新列表 + function handleWlsbSuccess(){ + getBaseList(orgInfo.value) + } + // 自动请求并暴露内部方法 onMounted(() => { activeKey.value = "1"; diff --git a/src/views/iot/baseIot/compoents/SxtForm.vue b/src/views/iot/baseIot/compoents/SxtForm.vue index 0098306..f7964f4 100644 --- a/src/views/iot/baseIot/compoents/SxtForm.vue +++ b/src/views/iot/baseIot/compoents/SxtForm.vue @@ -53,6 +53,7 @@ * 初始化 */ function init(record) { + console.log("🚀 ~ init ~ record:", record) baseIotInfo.value = record; queryParam.pageNo = 1; getDataList(); @@ -99,6 +100,27 @@ * 提交数据 */ function submitForm() { + const list = checkDataList.value.records; + console.log('---->',list) + console.log("🚀 ~ submitForm ~ baseIotInfo.value:", baseIotInfo.value) + const orgInfo = baseIotInfo.value.orgInfo; + console.log("🚀 ~ submitForm ~ orgInfo:", orgInfo) + // console.log("🚀 ~ submitForm ~ orgInfo:", orgInfo.value.departId) + console.log("🚀 ~ submitForm ~ orgInfo:", orgInfo.id) + console.log("🚀 ~ submitForm ~ orgInfo:", orgInfo.departName) + + const params = {nuId:baseIotInfo.value.nuId, + nuName:baseIotInfo.value.nuName, + dataSourceCode:baseIotInfo.value.sysOrgCode, + departId: orgInfo.id, + departName: orgInfo.departName, + list} + console.log("🚀 ~ submitForm ~ params:", params) + defHttp.post({url:"/iot/tplink/cameraInfo/syncCameraList",params}).then((res)=>{ + console.log("🚀 ~ submitForm ~ res:", res) + emit("ok") + }) + } diff --git a/src/views/iot/baseIot/compoents/SxtModal.vue b/src/views/iot/baseIot/compoents/SxtModal.vue index 1ab6ab1..2c2ec07 100644 --- a/src/views/iot/baseIot/compoents/SxtModal.vue +++ b/src/views/iot/baseIot/compoents/SxtModal.vue @@ -1,5 +1,5 @@