Merge branch 'rongtu_dev' into rongtu_cjw
This commit is contained in:
commit
2e30e3afe0
@ -56,7 +56,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
console.log("判断是访问登陆页,有:", from.fullPath);
|
console.log("判断是访问登陆页,有:", from.fullPath);
|
||||||
console.log("判断是访问登陆页,globalStore.token有:", globalStore.token);
|
console.log("判断是访问登陆页,globalStore.token有:", globalStore.token);
|
||||||
|
|
||||||
if (globalStore.token) return next(from.fullPath);
|
if (globalStore.token && from.fullPath != '/') return next(from.fullPath);
|
||||||
// resetRouter();//重置路由
|
// resetRouter();//重置路由
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,11 @@ import { HOME_URL } from "@/enums/Home/index";
|
|||||||
* staticRouter(静态路由)
|
* staticRouter(静态路由)
|
||||||
*/
|
*/
|
||||||
export const staticRouter: RouteRecordRaw[] = [
|
export const staticRouter: RouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
// redirect: HOME_URL[0]
|
||||||
|
redirect: LOGIN_URL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
|
|||||||
@ -23,10 +23,21 @@
|
|||||||
import Card from "@/components/card.vue";
|
import Card from "@/components/card.vue";
|
||||||
import { reactive, onMounted, ref } from "vue";
|
import { reactive, onMounted, ref } from "vue";
|
||||||
import { getWeatherDataApi } from "@/api/modules/headNoise";
|
import { getWeatherDataApi } from "@/api/modules/headNoise";
|
||||||
|
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
|
const store = GlobalStore();
|
||||||
const weatherList = ref([]);
|
const weatherList = ref([]);
|
||||||
|
//获取项目信息
|
||||||
|
const projectTimeInfo = ref({} as any);
|
||||||
|
const getProjectInfo = async () => {
|
||||||
|
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
|
||||||
|
console.log("获取项目信息", res);
|
||||||
|
projectTimeInfo.value = res.result;
|
||||||
|
loadWeather();
|
||||||
|
};
|
||||||
//获取天气
|
//获取天气
|
||||||
const loadWeather = async () => {
|
const loadWeather = async () => {
|
||||||
const res = await getWeatherDataApi({ cityid: "" });
|
const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode });
|
||||||
let json = JSON.parse(res.result);
|
let json = JSON.parse(res.result);
|
||||||
let list = json;
|
let list = json;
|
||||||
console.log("获取天气", res.result);
|
console.log("获取天气", res.result);
|
||||||
@ -41,7 +52,7 @@ const loadWeather = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadWeather();
|
getProjectInfo();
|
||||||
});
|
});
|
||||||
const weatherIcon = ref([
|
const weatherIcon = ref([
|
||||||
{
|
{
|
||||||
|
|||||||
@ -212,7 +212,7 @@
|
|||||||
<el-carousel-item v-for="(item, index) in detailData.videoList" :key="item.id">
|
<el-carousel-item v-for="(item, index) in detailData.videoList" :key="item.id">
|
||||||
<div style="width: 100%; height: 100%">
|
<div style="width: 100%; height: 100%">
|
||||||
<ckplayerComp
|
<ckplayerComp
|
||||||
:name="0"
|
:name="index"
|
||||||
:poster="''"
|
:poster="''"
|
||||||
:deviceIp="`http://${item.account}:${item.password}`"
|
:deviceIp="`http://${item.account}:${item.password}`"
|
||||||
:videoUrls="item.serialNumber"
|
:videoUrls="item.serialNumber"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user