mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
fix:修改版本号
This commit is contained in:
363
src/App.vue
363
src/App.vue
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div id="container" v-if="!isLogin">
|
||||
<nav-top />
|
||||
<div style="display: flex">
|
||||
<nav-left />
|
||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||
<open-pages />
|
||||
<bread-crumb />
|
||||
<main>
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container" v-if="isLogin">
|
||||
<router-view />
|
||||
</div>
|
||||
<div id="container" v-if="!isLogin">
|
||||
<nav-top />
|
||||
<div style="display: flex">
|
||||
<nav-left />
|
||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||
<open-pages />
|
||||
<bread-crumb />
|
||||
<main>
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container" v-if="isLogin">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { computed, defineComponent, ref } from "vue";
|
||||
@@ -32,99 +32,99 @@ import * as api1 from "@/api/index1";
|
||||
import * as api2 from "@/api/index";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
NavLeft,
|
||||
NavTop,
|
||||
OpenPages,
|
||||
BreadCrumb,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本1.06------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
// watch(
|
||||
// () => route.path,
|
||||
// () => {
|
||||
// route.path === "/login" && (isLogin.value = true);
|
||||
// }
|
||||
// );
|
||||
const currentRouteName = computed(() => route.name);
|
||||
components: {
|
||||
NavLeft,
|
||||
NavTop,
|
||||
OpenPages,
|
||||
BreadCrumb,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本1.07------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
// watch(
|
||||
// () => route.path,
|
||||
// () => {
|
||||
// route.path === "/login" && (isLogin.value = true);
|
||||
// }
|
||||
// );
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
function init() {
|
||||
console.log(store);
|
||||
getUserInfo();
|
||||
initDict("faceclassPic");
|
||||
initDict("faceclassClass");
|
||||
initDict("faceclassScene");
|
||||
initDict("projectLevel");
|
||||
initDict("projectSys");
|
||||
initDict("pathmapPic");
|
||||
initDict("projectClass");
|
||||
initDict("projectPic");
|
||||
getMemberInfo();
|
||||
getOrgTree();
|
||||
}
|
||||
function init() {
|
||||
console.log(store);
|
||||
getUserInfo();
|
||||
initDict("faceclassPic");
|
||||
initDict("faceclassClass");
|
||||
initDict("faceclassScene");
|
||||
initDict("projectLevel");
|
||||
initDict("projectSys");
|
||||
initDict("pathmapPic");
|
||||
initDict("projectClass");
|
||||
initDict("projectPic");
|
||||
getMemberInfo();
|
||||
getOrgTree();
|
||||
}
|
||||
|
||||
async function getMemberInfo() {
|
||||
const list = localStorage.getItem("memberInitInfo");
|
||||
if (list) {
|
||||
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
||||
return;
|
||||
}
|
||||
const memberInitInfo = await api1
|
||||
.getMemberInfo({ keyWord: "", pageNo: 1, pageSize: 10 })
|
||||
.then((res) => res.data.data.rows);
|
||||
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
||||
localStorage.setItem("memberInitInfo", JSON.stringify(memberInitInfo));
|
||||
}
|
||||
async function getMemberInfo() {
|
||||
const list = localStorage.getItem("memberInitInfo");
|
||||
if (list) {
|
||||
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
||||
return;
|
||||
}
|
||||
const memberInitInfo = await api1
|
||||
.getMemberInfo({ keyWord: "", pageNo: 1, pageSize: 10 })
|
||||
.then((res) => res.data.data.rows);
|
||||
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
||||
localStorage.setItem("memberInitInfo", JSON.stringify(memberInitInfo));
|
||||
}
|
||||
|
||||
async function getUserInfo() {
|
||||
const userInfo = await api2.userInfo();
|
||||
store.commit("SET_USER", userInfo.data.data);
|
||||
}
|
||||
async function getUserInfo() {
|
||||
const userInfo = await api2.userInfo();
|
||||
store.commit("SET_USER", userInfo.data.data);
|
||||
}
|
||||
|
||||
async function initDict(key, localStory = false) {
|
||||
let list;
|
||||
if (localStory) {
|
||||
list = localStorage.getItem(key);
|
||||
if (list) {
|
||||
store.commit("SET_DICT", { key, data: JSON.parse(list) });
|
||||
return;
|
||||
}
|
||||
}
|
||||
list = await getDictList(key);
|
||||
localStory && localStorage.setItem(key, JSON.stringify(list));
|
||||
store.commit("SET_DICT", { key, data: list });
|
||||
}
|
||||
async function initDict(key, localStory = false) {
|
||||
let list;
|
||||
if (localStory) {
|
||||
list = localStorage.getItem(key);
|
||||
if (list) {
|
||||
store.commit("SET_DICT", { key, data: JSON.parse(list) });
|
||||
return;
|
||||
}
|
||||
}
|
||||
list = await getDictList(key);
|
||||
localStory && localStorage.setItem(key, JSON.stringify(list));
|
||||
store.commit("SET_DICT", { key, data: list });
|
||||
}
|
||||
|
||||
const getDictList = (param) =>
|
||||
api1
|
||||
.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param,
|
||||
})
|
||||
.then((res) => res.data.data.rows);
|
||||
//获取组织树
|
||||
const getOrgTree = () => {
|
||||
api.getOrgTreeInfo().then((res) => {
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
});
|
||||
};
|
||||
init();
|
||||
return {
|
||||
isLogin,
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
zhCN,
|
||||
};
|
||||
},
|
||||
const getDictList = (param) =>
|
||||
api1
|
||||
.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param,
|
||||
})
|
||||
.then((res) => res.data.data.rows);
|
||||
//获取组织树
|
||||
const getOrgTree = () => {
|
||||
api.getOrgTreeInfo().then((res) => {
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
});
|
||||
};
|
||||
init();
|
||||
return {
|
||||
isLogin,
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
zhCN,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -151,88 +151,89 @@ export default defineComponent({
|
||||
//}
|
||||
|
||||
#app {
|
||||
// font-family: MicrosoftYaHei, Microsoft YaHei, Avenir, Helvetica, Arial,
|
||||
// sans-serif;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
// font-family: MicrosoftYaHei, Microsoft YaHei, Avenir, Helvetica, Arial,
|
||||
// sans-serif;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 1000px;
|
||||
min-height: 100%;
|
||||
background-color: rgba(245, 247, 250, 1);
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 1000px;
|
||||
min-height: 100%;
|
||||
background-color: rgba(245, 247, 250, 1);
|
||||
|
||||
main {
|
||||
height: 0;
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
// margin-bottom: 20px;
|
||||
margin: 0px 20px 20px 20px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
}
|
||||
main {
|
||||
height: 0;
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
// margin-bottom: 20px;
|
||||
margin: 0px 20px 20px 20px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
}
|
||||
|
||||
.cus-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 16px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
background: #4ea6ff;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
}
|
||||
.cus-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 16px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
background: #4ea6ff;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
.white {
|
||||
background: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// @media screen and (max-width: 1366px) {
|
||||
// .cmMain {
|
||||
// width: 750px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1367px) and (max-width: 1680px) {
|
||||
// .cmMain {
|
||||
// width: 1010px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1681px) and (max-width: 1920px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1921px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// @media screen and (max-width: 1366px) {
|
||||
// .cmMain {
|
||||
// width: 750px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1367px) and (max-width: 1680px) {
|
||||
// .cmMain {
|
||||
// width: 1010px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1681px) and (max-width: 1920px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1921px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user