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