| | |
| | | */ |
| | | export const getSyncTables = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/dbtable/queryDbTables/1", |
| | | url: "/data/api-v/dbtable/queryDbTables", |
| | | method: "post", |
| | | data: query |
| | | data: { isSync: 1 } |
| | | }); |
| | | }; |
| | | |
| | |
| | | */ |
| | | export const getLocalTables = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/dbtable/queryDbTables/2", |
| | | url: "/data/api-v/dbtable/queryDbTables", |
| | | method: "post", |
| | | data: query |
| | | data: { isSync: 2 } |
| | | }); |
| | | }; |
| | | |
| | |
| | | return request({ |
| | | url: "/data/api-v/camera/show", |
| | | method: "get", |
| | | params: { cid: id } |
| | | params: { id: id } |
| | | }); |
| | | }; |
| | | |
| | | export const delCamera = (id: string) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/del/" + id, |
| | | method: "delete" |
| | | }); |
| | | }; |
| | | |
| | | export const fetchCameraTasks = (id: string) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/task/" + id, |
| | | method: "get" |
| | | }); |
| | | }; |
| | | |
| | | export const fetchCameraRulesByTask = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/getRulesByCameraAndTask", |
| | | url: "/data/api-v/camera/del", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | }; |
| | | |
| | | export const deleteCameraTask = (cameraId, taskId) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/delTask/" + cameraId + "/" + taskId, |
| | | method: "delete" |
| | | params: { id: id } |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | export const updateSnapshot = (cameraId: string) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/updateSnapshotUrl/" + cameraId, |
| | | method: "get" |
| | | url: "/data/api-v/camera/updateSnapshotUrl", |
| | | method: "get", |
| | | params: { cameraId: cameraId } |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | export const getDirDetails = (id: string) => { |
| | | return request({ |
| | | url: "/data/api-v/fileStack/show/" + id, |
| | | method: "get" |
| | | url: "/data/api-v/fileStack/show", |
| | | method: "get", |
| | | params: { id: id } |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | export const delDir = (id: string) => { |
| | | return request({ |
| | | url: "/data/api-v/fileStack/delete/" + id, |
| | | method: "delete" |
| | | url: "/data/api-v/fileStack/delete", |
| | | method: "delete", |
| | | params: { id: id } |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | export const deleteCameraScene = (id: any) => { |
| | | return request({ |
| | | url: "/data/api-v/camera/rule/deleteGroup/" + id, |
| | | method: "delete" |
| | | url: "/data/api-v/camera/rule/deleteGroup", |
| | | method: "get", |
| | | params: { groupId: id } |
| | | }); |
| | | }; |
| | |
| | | document.addEventListener("visibilitychange", () => { |
| | | this.visibilitychange(); |
| | | }); |
| | | debugger |
| | | this.getSounds(); |
| | | |
| | | this.eventAudio.addEventListener("ended", () => { |
| | |
| | | getSounds() { |
| | | getSoundList().then(res => { |
| | | if (res.success) { |
| | | this.soundList = res.data.list |
| | | this.soundList = res.data; |
| | | } |
| | | }).catch( |
| | | e => console.log(e) |
| | |
| | | this.resolutionList = list |
| | | this.sensors = res.data.sensors |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | | this.initFormData() |
| | | this.initFormData(); |
| | | Object.assign(this.form, res.data) |
| | | |
| | | this.soundList.forEach(element => { |
| | |
| | | this.TreeDataPool.readonly = false; |
| | | this.TreeDataPool.gbReadonly = false; |
| | | this.DataStackPool.readonly = false; |
| | | debugger |
| | | }, |
| | | methods: { |
| | | getUrlKey() { |
| | |
| | | cancelButtonClass: 'comfirm-class-cancle', |
| | | confirmButtonClass: 'comfirm-class-sure' |
| | | }).then(() => { |
| | | fetch(`/data/api-v/dbtable/deleteDBtablesById/${id}`, { |
| | | method: 'POST', |
| | | fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${id}`, { |
| | | method: 'GET', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'Authorization': token |
| | |
| | | confirmButtonClass: "comfirm-class-sure" |
| | | }) |
| | | .then(_ => { |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById/${id}`, { |
| | | method: "POST", |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${id}`, { |
| | | method: "GET", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | Authorization: token |
| | |
| | | confirmButtonClass: "comfirm-class-sure" |
| | | }) |
| | | .then(_ => { |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById/${id}`, { |
| | | method: "POST", |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${id}`, { |
| | | method: "GET", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | Authorization: token |
| | |
| | | this.BaseManageData.page = current; |
| | | this.getPersonList(); |
| | | }, |
| | | handleSizeChange(val){ |
| | | handleSizeChange(val) { |
| | | //this.pageSize = val; |
| | | this.BaseManageData.size = val; |
| | | this.getPersonList(); |