Commit 717a95fae20a960cf95d14e910f92bf46fe05e1d
1 parent
dba7b13a
账号模式参数修改,退出登录不重刷新登录页面
i
Showing
4 changed files
with
15 additions
and
9 deletions
src/store/modules/layout/index.js
| @@ -5,13 +5,13 @@ export default { | @@ -5,13 +5,13 @@ export default { | ||
| 5 | logoShow: sessionStorage.getItem('isCollapse') && sessionStorage.getItem('isCollapse') == 1 ? true : false || false, | 5 | logoShow: sessionStorage.getItem('isCollapse') && sessionStorage.getItem('isCollapse') == 1 ? true : false || false, |
| 6 | uniquerouter: true, | 6 | uniquerouter: true, |
| 7 | rightNav: {}, | 7 | rightNav: {}, |
| 8 | - tabnavBox: JSON.parse(sessionStorage.getItem("addTab")) || [{ | 8 | + tabnavBox: sessionStorage.getItem("addTab") && JSON.parse(sessionStorage.getItem("addTab")) || [{ |
| 9 | title: "home", | 9 | title: "home", |
| 10 | path: "/index" | 10 | path: "/index" |
| 11 | }] | 11 | }] |
| 12 | }, | 12 | }, |
| 13 | mutations: { | 13 | mutations: { |
| 14 | - resetTabnavBox(state){ | 14 | + resetTabnavBox(state) { |
| 15 | state.tabnavBox = [{ | 15 | state.tabnavBox = [{ |
| 16 | title: "home", | 16 | title: "home", |
| 17 | path: "/index" | 17 | path: "/index" |
src/views/admin/account/index.vue
| @@ -237,8 +237,8 @@ | @@ -237,8 +237,8 @@ | ||
| 237 | class="sel" | 237 | class="sel" |
| 238 | v-model="formAddCount.versionType" | 238 | v-model="formAddCount.versionType" |
| 239 | placeholder="请选择账号类型" | 239 | placeholder="请选择账号类型" |
| 240 | + @change="versionTypeChange" | ||
| 240 | > | 241 | > |
| 241 | - <el-option label="无" :value="0"></el-option> | ||
| 242 | <el-option label="标准版" :value="1"></el-option> | 242 | <el-option label="标准版" :value="1"></el-option> |
| 243 | <el-option label="个人版" :value="2"></el-option> | 243 | <el-option label="个人版" :value="2"></el-option> |
| 244 | <el-option label="定制版" :value="3"></el-option> | 244 | <el-option label="定制版" :value="3"></el-option> |
| @@ -274,8 +274,8 @@ | @@ -274,8 +274,8 @@ | ||
| 274 | </el-input> | 274 | </el-input> |
| 275 | </el-col> | 275 | </el-col> |
| 276 | </el-form-item> | 276 | </el-form-item> |
| 277 | - <el-form-item label="使用模式:"> | ||
| 278 | - <el-radio-group v-model="formCount.usageMode"> | 277 | + <el-form-item label="使用模式:" v-if="formAddCount.versionType == 1"> |
| 278 | + <el-radio-group v-model="formAddCount.usageMode"> | ||
| 279 | <el-radio :label="0">专用模式</el-radio> | 279 | <el-radio :label="0">专用模式</el-radio> |
| 280 | <el-radio :label="1">共享模式</el-radio> | 280 | <el-radio :label="1">共享模式</el-radio> |
| 281 | <el-radio :label="2">自由模式 </el-radio> | 281 | <el-radio :label="2">自由模式 </el-radio> |
| @@ -357,10 +357,13 @@ export default { | @@ -357,10 +357,13 @@ export default { | ||
| 357 | this.formAddCount.contactPhone = ""; | 357 | this.formAddCount.contactPhone = ""; |
| 358 | this.formAddCount.contactPerson = ""; | 358 | this.formAddCount.contactPerson = ""; |
| 359 | this.formAddCount.tenantName = ""; | 359 | this.formAddCount.tenantName = ""; |
| 360 | - this.formAddCount.versionType = 0; | 360 | + this.formAddCount.versionType = 1; |
| 361 | this.formAddCount.usageMode = ""; | 361 | this.formAddCount.usageMode = ""; |
| 362 | this.diaAdd = true; | 362 | this.diaAdd = true; |
| 363 | }, | 363 | }, |
| 364 | + versionTypeChange(){ | ||
| 365 | + this.formAddCount.usageMode = ""; | ||
| 366 | + }, | ||
| 364 | saveAddCount() { | 367 | saveAddCount() { |
| 365 | //保存新增账号 | 368 | //保存新增账号 |
| 366 | this.$refs.formAddCount.validate(async (valid) => { | 369 | this.$refs.formAddCount.validate(async (valid) => { |
src/views/layout/header/header.vue
| @@ -59,7 +59,11 @@ | @@ -59,7 +59,11 @@ | ||
| 59 | </div> | 59 | </div> |
| 60 | </li> | 60 | </li> |
| 61 | 61 | ||
| 62 | - <li class="fullScreen" v-if="role != 'ROLE_PERSONAL' && !code" @click="openPwd"> | 62 | + <li |
| 63 | + class="fullScreen" | ||
| 64 | + v-if="role != 'ROLE_PERSONAL' && !code" | ||
| 65 | + @click="openPwd" | ||
| 66 | + > | ||
| 63 | <el-tooltip | 67 | <el-tooltip |
| 64 | class="item" | 68 | class="item" |
| 65 | effect="dark" | 69 | effect="dark" |
| @@ -302,6 +306,7 @@ export default { | @@ -302,6 +306,7 @@ export default { | ||
| 302 | window.location.href = data; | 306 | window.location.href = data; |
| 303 | } else { | 307 | } else { |
| 304 | localStorage.setItem("token", ""); | 308 | localStorage.setItem("token", ""); |
| 309 | + sessionStorage.setItem("addTab","") | ||
| 305 | this.$store.commit("setToken", ""); | 310 | this.$store.commit("setToken", ""); |
| 306 | this.$store.commit("setInfo", ""); | 311 | this.$store.commit("setInfo", ""); |
| 307 | this.$store.commit("setRouters", ""); | 312 | this.$store.commit("setRouters", ""); |
| @@ -309,7 +314,6 @@ export default { | @@ -309,7 +314,6 @@ export default { | ||
| 309 | this.$router.push({ | 314 | this.$router.push({ |
| 310 | path: "/login", | 315 | path: "/login", |
| 311 | }); | 316 | }); |
| 312 | - window.location.reload(); | ||
| 313 | } | 317 | } |
| 314 | } else { | 318 | } else { |
| 315 | this.$message.error(info); | 319 | this.$message.error(info); |
src/views/login/index.vue
| @@ -188,7 +188,6 @@ $cursor: #000; | @@ -188,7 +188,6 @@ $cursor: #000; | ||
| 188 | input { | 188 | input { |
| 189 | background: transparent; | 189 | background: transparent; |
| 190 | border: 0px; | 190 | border: 0px; |
| 191 | - -webkit-appearance: none; | ||
| 192 | border-radius: 0px; | 191 | border-radius: 0px; |
| 193 | font-size: 16px; | 192 | font-size: 16px; |
| 194 | color: $light_gray; | 193 | color: $light_gray; |