添加摄像头同步功能
This commit is contained in:
parent
9fed0b9442
commit
54b77f2840
|
@ -68,7 +68,7 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<SxtModal ref="sxtModal" @success="handleSuccess"></SxtModal>
|
||||
<SxtModal ref="sxtModal" @success="handleWlsbSuccess"></SxtModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -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";
|
||||
|
|
|
@ -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")
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" okText="同步" @cancel="handleCancel" cancelText="关闭">
|
||||
<SxtForm ref="registerForm" @ok="submitCallback"></SxtForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue