| | |
| | | "docx-preview": "^0.1.18", |
| | | "downloadjs": "^1.4.7", |
| | | "element-ui": "^2.15.13", |
| | | "js-cookie": "^3.0.5", |
| | | "vue": "^2.6.14", |
| | | "vue-router": "^3.5.1", |
| | | "vuex": "^3.6.2" |
| | |
| | | "@sideway/pinpoint": "^2.0.0" |
| | | } |
| | | }, |
| | | "node_modules/js-cookie": { |
| | | "version": "3.0.5", |
| | | "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", |
| | | "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", |
| | | "engines": { |
| | | "node": ">=14" |
| | | } |
| | | }, |
| | | "node_modules/js-message": { |
| | | "version": "1.0.7", |
| | | "resolved": "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz", |
| | |
| | | "docx-preview": "^0.1.18", |
| | | "downloadjs": "^1.4.7", |
| | | "element-ui": "^2.15.13", |
| | | "js-cookie": "^3.0.5", |
| | | "vue": "^2.6.14", |
| | | "vue-router": "^3.5.1", |
| | | "vuex": "^3.6.2" |
| | |
| | | <div class="sales-lead"> |
| | | <div class="header-title">{{ headerTitle }}</div> |
| | | <div class="header-user-info"> |
| | | <!-- <div class="avatar"><el-avatar icon="el-icon-user-solid"></el-avatar></div> |
| | | <div class="avatar"><el-avatar icon="el-icon-user-solid"></el-avatar></div> |
| | | <el-dropdown @command="handleCommand"> |
| | | <div class="el-dropdown-link">用户名<i class="el-icon-arrow-down el-icon--right"></i></div> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="logout">退出</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> --> |
| | | </el-dropdown> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Cookies from "js-cookie" |
| | | export default { |
| | | name: "SalesLead", |
| | | props: { |
| | |
| | | handleCommand(command) { |
| | | console.log(command) |
| | | if (command === "logout") { |
| | | this.$router.push({ path: "/login" }) |
| | | // this.$router.push({ path: "/login" }) |
| | | document.cookie = "cookieName=; path=/;"; |
| | | this.$confirm('确定要注销当前用户吗?', '注销用户', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | Cookies.remove('token') |
| | | window.location.href = 'http://localhost:8080/login'; //本地的智慧工厂-登录页 |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '注销成功!' |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消注销' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |