| | |
| | | <img class="system" :src="`${publicPath}images/desktop/header-icon/system.png`" /> |
| | | </div> |
| | | <div class="tools-icon no-hover-style"> |
| | | <img class="smart-ai" :src="`${publicPath}images/desktop/header-icon/SmartAI.png`" alt /> |
| | | <img class="smart-ai" :src="`${publicPath}images/desktop/header-icon/SmartAI-新.png`" alt /> |
| | | </div> |
| | | </div> |
| | | <div class="tools-middle"> |
| | |
| | | |
| | | <script> |
| | | import html2canvas from 'html2canvas'; |
| | | import { logout,updatePwd } from "@/api/login"; |
| | | import { logout, updatePwd } from "@/api/login"; |
| | | export default { |
| | | name: "Tools", |
| | | data () { |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入密码')); |
| | |
| | | maxOrderOne: '', |
| | | userInfo: {}, |
| | | showPasswdForm: false, |
| | | rules:{ |
| | | rules: { |
| | | oldPwd: [ |
| | | {required: true, message: '请输入旧密码', trigger: 'blur'} |
| | | { required: true, message: '请输入旧密码', trigger: 'blur' } |
| | | ], |
| | | newPwd: [ |
| | | { required: true, validator: validatePass, trigger: 'blur' } |
| | |
| | | |
| | | }; |
| | | }, |
| | | created () { |
| | | created() { |
| | | let _that = this; |
| | | this.userInfo = sessionStorage.getItem("userInfo") && JSON.parse(sessionStorage.getItem("userInfo")); |
| | | console.log(this.userInfo) |
| | |
| | | oldPwd: this.passwdForm.oldPwd, |
| | | newPwd: this.passwdForm.checkPwd |
| | | } |
| | | updatePwd(json).then(res=>{ |
| | | console.log(res,'修改密码') |
| | | updatePwd(json).then(res => { |
| | | console.log(res, '修改密码') |
| | | this.$notify({ |
| | | type:res.success?'success':'error', |
| | | message:res.msg |
| | | type: res.success ? 'success' : 'error', |
| | | message: res.msg |
| | | }) |
| | | if(res.success){ |
| | | if (res.success) { |
| | | this.showPasswdForm = false |
| | | // this.$nextTick(_=>{ |
| | | // this.toLogout('修改密码成功,请重新登录!') |
| | |
| | | ); |
| | | }, |
| | | |
| | | togglePreference () { |
| | | togglePreference() { |
| | | //this.$store.commit("desktop/togglePreference"); |
| | | //显示桌面,最小化已打开的应用 |
| | | ; |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | dockClick (dock) { |
| | | dockClick(dock) { |
| | | |
| | | if (dock.type === "1") { |
| | | window.open(dock.url); |
| | |
| | | this.$store.commit("desktop/refreshFrame", dock); |
| | | } |
| | | }, |
| | | toolHover (dock) { |
| | | toolHover(dock) { |
| | | //this.$parent.screenShot(dock) |
| | | }, |
| | | |
| | | toLogout () { |
| | | toLogout() { |
| | | let _this = this; |
| | | this.$confirm("提示:确定退出吗?", { |
| | | center: true, |
| | |
| | | logout().then(res => { |
| | | if (res === "退出成功") { |
| | | sessionStorage.removeItem("userInfo"); |
| | | // 手动退出, 取消自动登录 |
| | | sessionStorage.removeItem("autoLogin"); |
| | | _this.userInfo = {}; |
| | | location.assign('/view/index'); |
| | | this.$notify({ |
| | |
| | | margin: auto; |
| | | } |
| | | .tools .tools-left { |
| | | width: 200px; |
| | | width: 275px; |
| | | height: 100%; |
| | | float: left; |
| | | margin-left: 14px; |
| | |
| | | .tools .tools-middle::before { |
| | | width: 1px; |
| | | height: 20px; |
| | | content: ''; |
| | | content: ""; |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 0; |
| | |
| | | .el-dropdown-menu { |
| | | top: 40px !important; |
| | | } |
| | | |
| | | .smart-ai { |
| | | height: 65%; |
| | | } |
| | | </style> |