diff --git a/src/views/iot/tplink/camera/components/CameraBitrateForm.vue b/src/views/iot/tplink/camera/components/CameraBitrateForm.vue
index 8264226..2b00141 100644
--- a/src/views/iot/tplink/camera/components/CameraBitrateForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraBitrateForm.vue
@@ -157,7 +157,7 @@
import { getValueType } from '/@/utils';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
- import { getVideoParams,setVideoParams } from "@/views/iot/tplink/camera/camera.api";
+ import { getVideoParams,setVideoParams } from "../camera.api";
const props = defineProps({
data: { type: Object, default: () => ({}) },
diff --git a/src/views/iot/tplink/camera/components/CameraBlockForm.vue b/src/views/iot/tplink/camera/components/CameraBlockForm.vue
index b548c2f..d505200 100644
--- a/src/views/iot/tplink/camera/components/CameraBlockForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraBlockForm.vue
@@ -131,7 +131,7 @@
getTamperNotif,
setTamperNotif,
testAudio
- } from "@/views/iot/tplink/camera/camera.api";
+ } from "../camera.api";
const props = defineProps({
data: { type: Object, default: () => ({}) },
diff --git a/src/views/iot/tplink/camera/components/CameraCommonForm.vue b/src/views/iot/tplink/camera/components/CameraCommonForm.vue
index cba9d0d..44ecaa0 100644
--- a/src/views/iot/tplink/camera/components/CameraCommonForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraCommonForm.vue
@@ -216,7 +216,7 @@ import {
setImageCommon,
configRecovery,
getPreviewUrl,
- } from "@/views/iot/tplink/camera/camera.api";
+ } from "../camera.api";
const props = defineProps({
data: { type: Object, default: () => ({}) },
@@ -350,7 +350,6 @@ import {
"deviceIndex": deviceIndex,
"type": "switch"
}).then(res=>{
- // console.log(res);
formData.flip_type = res.flip_type; //画面镜像翻转
formData.night_vision_mode = res.night_vision_mode; //照明模式
});
diff --git a/src/views/iot/tplink/camera/components/CameraInfoDrawer.vue b/src/views/iot/tplink/camera/components/CameraInfoDrawer.vue
index 9172307..53d53e9 100644
--- a/src/views/iot/tplink/camera/components/CameraInfoDrawer.vue
+++ b/src/views/iot/tplink/camera/components/CameraInfoDrawer.vue
@@ -19,13 +19,12 @@
+
diff --git a/src/views/iot/tplink/project/components/ProjectInfoDrawer.vue b/src/views/iot/tplink/project/components/ProjectInfoDrawer.vue
index c9f0ea5..ebaadcd 100644
--- a/src/views/iot/tplink/project/components/ProjectInfoDrawer.vue
+++ b/src/views/iot/tplink/project/components/ProjectInfoDrawer.vue
@@ -19,7 +19,7 @@ import { formSchema } from "@/views/iot/tplink/project/ProjectInfo.data";
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth';
import { getTenantId } from "/@/utils/auth";
-import { saveOrUpdatePrject } from "@/views/iot/tplink/project/ProjectInfo.api";
+import { saveOrUpdateProject } from "@/views/iot/tplink/project/ProjectInfo.api";
// 声明Emits
const emit = defineEmits(['success', 'register']);
@@ -67,7 +67,7 @@ async function handleSubmit() {
setDrawerProps({ confirmLoading: true });
let params = values;
let isUpdateVal = unref(isUpdate);
- await saveOrUpdatePrject(params,isUpdateVal);
+ await saveOrUpdateProject(params,isUpdateVal);
//关闭弹窗
closeDrawer();
//刷新列表
diff --git a/src/views/iot/tplink/region/RegionInfo.api.ts b/src/views/iot/tplink/region/RegionInfo.api.ts
index 7b6193b..5c1eac3 100644
--- a/src/views/iot/tplink/region/RegionInfo.api.ts
+++ b/src/views/iot/tplink/region/RegionInfo.api.ts
@@ -1,13 +1,56 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
+ queryProjectTreeSync = '/iot/projectInfo/queryRegionTreeSync',
+ queryRegionTreeSync = '/iot/regionInfo/queryRegionTreeSync',
+ syncProject = '/iot/projectInfo/sync',
+ syncRegion = '/iot/regionInfo/sync',
+ syncRegionChildren = '/iot/regionInfo/syncChildren',
list = '/iot/regionInfo/list',
sync = '/iot/regionInfo/sync',
add = '/iot/regionInfo/add',
edit = '/iot/regionInfo/edit',
delete = '/iot/regionInfo/delete',
+ queryChildrenByParentId = '/admin/institutionArea/queryChildrenByParentId',
}
+
+/**
+ * 获取项目树列表
+ * @param params
+ */
+export const queryProjectTreeSync = (params?) => defHttp.get({ url: Api.queryProjectTreeSync, params });
+
+/**
+ * 获取分组树列表
+ * @param params
+ */
+export const queryRegionTreeSync = (params?) => defHttp.get({ url: Api.queryRegionTreeSync, params });
+
+/**
+ * 同步项目
+ * @param params
+ */
+export const syncProject = (params?) => defHttp.get({ url: Api.syncProject, params });
+
+/**
+ * 同步分组
+ * @param params
+ */
+export const syncRegionChildren = (params?) => defHttp.get({ url: Api.syncRegionChildren, params });
+
+/**
+ * 同步子分组
+ * @param params
+ */
+export const syncRegion = (params?) => defHttp.get({ url: Api.syncRegion, params });
+
+/**
+ * 通过parentId获取区域列表
+ * @param params
+ */
+export const queryArea = (params?) => defHttp.get({ url: Api.queryChildrenByParentId, params });
+
/**
* 列表接口
* @param params
@@ -21,7 +64,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
export const sync = (params) => defHttp.get({ url: Api.sync, params });
/**
- * 保存或者更新区域
+ * 保存或者更新分组
* @param params
*/
export const saveOrUpdateRegion = (params, isUpdate) => {
@@ -30,7 +73,7 @@ export const saveOrUpdateRegion = (params, isUpdate) => {
};
/**
- * 删除区域
+ * 删除分组
*/
export const deleteRegion = (params,handleSuccess) => {
return defHttp.post({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => {
diff --git a/src/views/iot/tplink/region/RegionInfo.data.ts b/src/views/iot/tplink/region/RegionInfo.data.ts
index f7789bb..43666f4 100644
--- a/src/views/iot/tplink/region/RegionInfo.data.ts
+++ b/src/views/iot/tplink/region/RegionInfo.data.ts
@@ -4,17 +4,17 @@ import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '区域序号',
+ title: '分组序号',
align: "center",
dataIndex: 'regionId'
},
{
- title: '区域名称',
+ title: '分组名称',
align: "center",
dataIndex: 'regionName'
},
{
- title: '区域层级',
+ title: '分组层级',
align: "center",
dataIndex: 'regionLevel'
},
@@ -24,7 +24,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'parentName'
},
{
- title: '机构名称',
+ title: '项目名称',
align: "center",
dataIndex: 'projectName'
},
@@ -34,7 +34,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'updateTime'
},
{
- title: '区域次序',
+ title: '分组次序',
align: "center",
dataIndex: 'sort'
},
@@ -42,7 +42,7 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
- label: '机构',
+ label: '项目',
field: 'projectId',
component: 'JDictSelectTag',
componentProps: {
@@ -67,6 +67,12 @@ export const formSchema: FormSchema[] = [
component: 'Input',
show: false,
},
+ {
+ label: '',
+ field: 'institutionId',
+ component: 'Input',
+ show: false,
+ },
{
label: '',
field: 'parentId',
@@ -74,18 +80,24 @@ export const formSchema: FormSchema[] = [
show: false,
},
{
- label: '区域序号',
+ label: '分组序号',
field: 'regionId',
component: 'Input',
dynamicDisabled: true
},
{
- label: '区域名称',
+ label: '分组名称',
field: 'regionName',
component: 'Input',
},
{
- label: '区域层级',
+ label: '区域名称',
+ field: 'areaId',
+ component: 'Input',
+ slot: 'areaSelect'
+ },
+ {
+ label: '分组层级',
field: 'regionLevel',
component: 'Input',
dynamicDisabled: true
@@ -94,16 +106,10 @@ export const formSchema: FormSchema[] = [
label: '上级名称',
field: 'parentName',
component: 'Input',
- dynamicDisabled: ({model})=>{
- if(model.regionId || model.parentId){
- return true;
- }else{
- return false;
- }
- }
+ dynamicDisabled: true
},
{
- label: '机构名称',
+ label: '项目名称',
field: 'projectName',
component: 'Input',
dynamicDisabled: ({model})=>{
@@ -121,14 +127,9 @@ export const formSchema: FormSchema[] = [
dynamicDisabled: true
},
{
- label: '区域次序',
+ label: '分组次序',
field: 'sort',
component: 'Input',
dynamicDisabled: true
},
];
-
-// 项目基础表单
-export const projectFormSchema: FormSchema[] = [
-
-];
diff --git a/src/views/iot/tplink/region/components/RegionForm.vue b/src/views/iot/tplink/region/components/RegionForm.vue
index 16fbf34..c80be9c 100644
--- a/src/views/iot/tplink/region/components/RegionForm.vue
+++ b/src/views/iot/tplink/region/components/RegionForm.vue
@@ -1,6 +1,17 @@
-
+
+
+ handleChange(value,option,model)">
+ 请选择…
+
+
+ {{item.instName}}
+
+
+
+
+