Commit d4a82cf9 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 5ce6d62b db9172e2
......@@ -28,6 +28,7 @@ export default {
"$route.path"(newVal) {
if (newVal == "/" || newVal == "/home") {
this.getHomeInfo();
this.getSetinfo();
}
},
},
......@@ -60,8 +61,11 @@ export default {
homeUrl: "http://192.168.0.24:8080/#/",
serverUrl: "http://192.168.0.98:11078/",
},
devicenum: "B8-13-32-86-9F-04",
devicenum: "18-93-7F-C0-AD-B5",
// devicenum: "B8-13-32-86-9F-04",
};
local.setLocal(obj.devicenum);
this.SET_deviceCodet(obj.devicenum);
this.WebSocketMq(obj);
}
},
......@@ -77,7 +81,12 @@ export default {
});
},
methods: {
...mapMutations(["SET_homeInfo", "SET_datumList", "SET_matterList"]),
...mapMutations([
"SET_homeInfo",
"SET_datumList",
"SET_matterList",
"SET_deviceCodet",
]),
// 简析url
urlGet() {
let q = {};
......@@ -101,6 +110,7 @@ export default {
let { devicenum } = routeQuery;
this.devicenum = devicenum;
local.setLocal("devicenum", devicenum);
this.SET_deviceCodet(devicenum);
}
},
// 获取首页信息
......
// 事项api
import local from "@/utils/local";
import request from "@/utils/request";
import store from "@/store";
// 首页数据展示
export const getHomeInfo = (data) => {
let baseUrl = local.getLocal("serverUrl");
......@@ -19,13 +20,13 @@ export const getHomeInfo = (data) => {
export const getdeptList = (data) => {
let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId");
let deviceCode = local.getLocal("devicenum");
// let deviceCode = local.getLocal("devicenum");
return request({
url: `${baseUrl}sampleform/home/depts`,
method: "post",
data: {
siteId,
deviceCode,
deviceCode: store.getters.deviceCode,
...data,
},
});
......@@ -49,13 +50,13 @@ export const getSampleformMatterList = (data) => {
export const getDeviceMatterList = (data) => {
let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId");
let deviceCode = local.getLocal("devicenum");
// let deviceCode = local.getLocal("devicenum");
return request({
url: `${baseUrl}sampleform/device/matter/datum/list`,
method: "post",
data: {
siteId,
deviceCode,
deviceCode: store.getters.deviceCode,
...data,
},
});
......
......@@ -94,5 +94,11 @@ export default {
font-size: 24px;
border-radius: 8px;
color: #333;
&:hover {
border-color: var(--main-theme-color);
}
&:focus {
border-color: var(--main-theme-color);
}
}
</style>
\ No newline at end of file
......@@ -195,8 +195,8 @@ export default {
let deviceInfo = objc.deviceInfo; //设备信息
let serverUrl = serviceInfo.serverUrl; //系统地址
let siteId = deviceInfo.siteId; //站点id
let devicenum = objc.devicenum;
local.setLocal("devicenum", devicenum); // 设备编号
// let devicenum = objc.devicenum;
// local.setLocal("devicenum", devicenum); // 设备编号
// 保存地址
local.setLocal("serverUrl", serverUrl);
local.setLocal("siteId", siteId);
......
......@@ -450,6 +450,9 @@ export default {
right: 5px;
top: 5px;
}
:deep(.el-input) {
border-radius: 8px;
}
:deep(.el-input__inner) {
width: 895px;
height: 72px;
......@@ -457,6 +460,12 @@ export default {
font-size: 24px;
border-radius: 8px;
color: #333;
&:hover {
border-color: var(--main-theme-color);
}
&:focus {
border-color: var(--main-theme-color);
}
}
.main {
margin-top: 40px;
......
......@@ -19,7 +19,7 @@ export default {
clearInterval(that.timeOut);
this.timeOut = setTimeout(function () {
that.$router.push({ path: "/" });
}, 1000 * 60 * 2);
}, 1000 * 60 * 5);
},
// 无任何操作返回首页
isTimeOut() {
......
......@@ -83,7 +83,6 @@ import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "../../components/MateralsList.vue";
import YEmpty from "@/components/YEmpty.vue";
import { getDeviceMatterList } from "@/api";
export default {
components: {
Header,
......
......@@ -11,8 +11,13 @@ export default new Vuex.Store({
homeInfo: {}, // 首页数据
datumList: [], // 首页材料
matterList: [], // 首页事项
deviceCode: "", // 设备编码
},
getters: {
deviceCode(state) {
return state.deviceCode;
},
},
getters: {},
mutations: {
SET_devicenum(state, devicenum) {
state.devicenum = devicenum;
......@@ -26,6 +31,9 @@ export default new Vuex.Store({
SET_matterList(state, matterList) {
state.matterList = matterList;
},
SET_deviceCodet(state, deviceCode) {
state.deviceCode = deviceCode;
},
},
actions: {},
modules: {},
......
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