|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container home">
|
|
|
- <el-row :gutter="20"></el-row>
|
|
|
+ <!-- <el-row :gutter="20"></el-row>
|
|
|
<el-row :gutter="20"></el-row>
|
|
|
<el-divider/>
|
|
|
|
|
@@ -47,12 +47,23 @@
|
|
|
<div class="body"></div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
+ <div class="info-content">
|
|
|
+ <div class="header" @click="toPersonalCenter">
|
|
|
+ <img :src="avatar" class="user-avatar" />
|
|
|
+ </div>
|
|
|
+ <div class="name">{{ nickName }}</div>
|
|
|
+ <div class="tenant-name">{{ tenantName }}</div>
|
|
|
+ <div class="date">{{ date }}</div>
|
|
|
+ <div class="title">欢迎登录CALL智能制造平台</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getToken} from "@/utils/auth";
|
|
|
+import { formatDate } from "@/utils";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import { mapGetters, mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: "Index",
|
|
@@ -69,16 +80,15 @@ export default {
|
|
|
// 是否更新已经存在的用户数据
|
|
|
updateSupport: 0,
|
|
|
// 设置上传的请求头部
|
|
|
- headers: {Authorization: "Bearer " + getToken()},
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
// 上传的地址
|
|
|
- url: process.env.VUE_APP_BASE_API1 + "common/importDataInfo",
|
|
|
+ url: process.env.VUE_APP_BASE_API3 + "common/importDataInfo",
|
|
|
},
|
|
|
// 版本号
|
|
|
version: "3.8.5",
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|
|
|
this.upload.title = "用户导入";
|
|
@@ -103,10 +113,10 @@ export default {
|
|
|
this.$refs.upload.clearFiles();
|
|
|
this.$alert(
|
|
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
- response.msg +
|
|
|
- "</div>",
|
|
|
+ response.msg +
|
|
|
+ "</div>",
|
|
|
"导入结果",
|
|
|
- {dangerouslyUseHTMLString: true}
|
|
|
+ { dangerouslyUseHTMLString: true }
|
|
|
);
|
|
|
this.getList();
|
|
|
},
|
|
@@ -117,11 +127,64 @@ export default {
|
|
|
goTarget(href) {
|
|
|
window.open(href, "_blank");
|
|
|
},
|
|
|
+
|
|
|
+ toPersonalCenter() {
|
|
|
+ this.$router.push("/user/profile");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ username: (state) => state.user.name,
|
|
|
+ owner: (state) => state.user?.tenant.owner,
|
|
|
+ tenantName: (state) => state.user?.tenant.tenantName,
|
|
|
+ nickName: (state) => state.user?.nickName,
|
|
|
+ }),
|
|
|
+
|
|
|
+ ...mapGetters(["avatar"]),
|
|
|
+ date: () => {
|
|
|
+ return formatDate(new Date());
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.home {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 500px;
|
|
|
+ .info-content {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 30%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ .header {
|
|
|
+ white-space: nowrap;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ .user-avatar {
|
|
|
+ width: 160px;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .name {
|
|
|
+ font-size: 30px;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+ .tenant-name {
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+ .date {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.home {
|
|
|
blockquote {
|
|
|
padding: 10px 20px;
|