Commit 84b063f6 authored by “yiyousong”'s avatar “yiyousong”

pref;修改获取事项列表接口

parent 8a675921
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
homeUrl: "http://192.168.0.24:8080/#/", homeUrl: "http://192.168.0.24:8080/#/",
serverUrl: "http://192.168.0.98:11078/", serverUrl: "http://192.168.0.98:11078/",
}, },
devicenum: "B8-13-32-86-9F-04",
}; };
this.WebSocketMq(obj); this.WebSocketMq(obj);
} }
......
...@@ -19,29 +19,45 @@ export const getHomeInfo = (data) => { ...@@ -19,29 +19,45 @@ export const getHomeInfo = (data) => {
export const getdeptList = (data) => { export const getdeptList = (data) => {
let baseUrl = local.getLocal("serverUrl"); let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId"); let siteId = local.getLocal("siteId");
let devicenum = local.getLocal("devicenum"); let deviceCode = local.getLocal("devicenum");
return request({ return request({
url: `${baseUrl}sampleform/home/depts`, url: `${baseUrl}sampleform/home/depts`,
method: "post", method: "post",
data: { data: {
siteId, siteId,
devicenum, deviceCode,
...data, ...data,
}, },
}); });
}; };
// 查询事项列表 // 查询事项列表
// export const getWriteMatterList = (data) => {
// let baseUrl = local.getLocal("serverUrl");
// let siteId = local.getLocal("siteId");
// let devicenum = local.getLocal("devicenum");
// return request({
// url: `${baseUrl}sampleform/matter/list`,
// method: "post",
// data: {
// siteId,
// devicenum,
// ...data,
// },
// });
// };
// 查询设备关联事项列表
export const getWriteMatterList = (data) => { export const getWriteMatterList = (data) => {
let baseUrl = local.getLocal("serverUrl"); let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId"); let siteId = local.getLocal("siteId");
let devicenum = local.getLocal("devicenum"); let deviceCode = local.getLocal("devicenum");
return request({ return request({
url: `${baseUrl}sampleform/matter/list`, url: `${baseUrl}sampleform/device/matter/datum/list`,
method: "post", method: "post",
data: { data: {
siteId, siteId,
devicenum, deviceCode,
...data, ...data,
}, },
}); });
......
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
startTimer() { startTimer() {
let that = this; let that = this;
clearInterval(that.timeOut); clearInterval(that.timeOut);
this.timeOut = setInterval(function () { this.timeOut = setTimeout(function () {
that.$router.push({ path: "/" }); that.$router.push({ path: "/" });
}, 1000 * 60 * 2); }, 1000 * 60 * 2);
}, },
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
document.body.removeEventListener("keyup", this.startTimer); document.body.removeEventListener("keyup", this.startTimer);
document.body.removeEventListener("click", this.startTimer); document.body.removeEventListener("click", this.startTimer);
document.body.removeEventListener("touchend", this.startTimer); document.body.removeEventListener("touchend", this.startTimer);
clearInterval(this.timeOut); clearTimeout(this.timeOut);
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment