进入后台管理

zhangtao
laozt 1 year ago
parent 5b616a9363
commit 1f69106ba5

@ -8,7 +8,7 @@
<script>
import ThemePicker from "@/components/ThemePicker";
import { xzTree } from "@/api/yingji/keyEnterprise.js";
import { mapState } from "vuex";
// import { mapState } from "vuex";
export default {
name: "App",
@ -35,26 +35,24 @@ export default {
});
},
computed: {
...mapState({
isorgpwd: (state) => state.user.isorgpwd,
}),
// ...mapState({
// isorgpwd: (state) => state.user.isorgpwd,
// }),
},
watch: {
isorgpwd(newVal, oldVal) {
// console.log("");
// console.log(newVal, oldVal);
//
let _this = this
if (newVal) {
this.$alert("您的密码为原始密码,需要修改!", "警告信息", {
confirmButtonText: "确定",
showClose: false,
callback: (action) => {
_this.$router.push("/user/profile");
},
});
}
},
// isorgpwd(newVal, oldVal) {
// //
// let _this = this
// if (newVal) {
// this.$alert("", "", {
// confirmButtonText: "",
// showClose: false,
// callback: (action) => {
// _this.$router.push("/user/profile");
// },
// });
// }
// },
},
};
</script>

@ -56,19 +56,15 @@
</div>
</div>
<el-dropdown-menu slot="dropdown">
<router-link v-show="userInfo.userName == 'admin'" to="/system/user">
<el-dropdown-item>进入后台管理</el-dropdown-item>
</router-link>
<router-link to="/user/profile">
<el-dropdown-item>修改密码</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <div
class="showGLstyle"
v-if="roles && roles[0] == 'admin'"
@click="toNewPage"
>
进入管理平台
</div> -->
</header>
<div class="bottom-view">
<router-view></router-view>
@ -86,6 +82,7 @@ export default {
routerIndex: 0,
avatarFlag: false,
userName: null,
userInfo: JSON.parse(sessionStorage.getItem("USER_INFO")),
};
},
computed: {
@ -102,11 +99,12 @@ export default {
"isGovernmentAffairsNetwork"
);
// const G_USER_INFO = JSON.parse(localStorage.getItem("G_USER_INFO"));
let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO"));
if (isGovernmentAffairsNetwork == "1") {
this.userName = userInfo.lawLevel + " " + userInfo.nickName;
// let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO"));
// if (isGovernmentAffairsNetwork == "1") {
if (this.userInfo.userName == "admin") {
this.userName = this.userInfo.userName;
} else {
this.userName = userInfo.lawLevel + " " + userInfo.nickName;
this.userName = this.userInfo.lawLevel + " " + this.userInfo.nickName;
}
},
watch: {
@ -139,6 +137,8 @@ export default {
let isGovernmentAffairsNetwork = localStorage.getItem(
"isGovernmentAffairsNetwork"
);
sessionStorage.removeItem("SET_IS_ORG_PWD");
// console.log("");
if (isGovernmentAffairsNetwork == "1") {
localStorage.removeItem("isGovernmentAffairsNetwork");

@ -70,7 +70,8 @@ const user = {
commit("SET_TOKEN", res.token);
// 判断是否是初始密码
if (password == "Yingji@123") {
commit("SET_IS_ORG_PWD", true);
// commit("SET_IS_ORG_PWD", true);
sessionStorage.setItem("SET_IS_ORG_PWD", JSON.stringify(true));
}
resolve();
})
@ -119,7 +120,7 @@ const user = {
getInfo()
.then((res) => {
const user = res.user;
sessionStorage.setItem("USER_INFO", JSON.stringify(user))
sessionStorage.setItem("USER_INFO", JSON.stringify(user));
commit("get_dept", user.dept);
const avatar =
user.avatar == "" || user.avatar == null

@ -20,36 +20,38 @@
<div class="content">
<!-- tabs -->
<div class="module">
<div
<!-- <div
class="select"
:class="{ nextStepSelect: activeTab == 0 }"
@click="selectTab(0)"
>
<span class="span-one"></span>
<span>选择省重点</span>
</div>
</div> -->
<div
class="issue"
:class="{ nextStepIssue: activeTab == 1 }"
@click="selectTab(1)"
>
<span class="span-one"></span>
<span>选择非省重点</span>
<!-- <span class="span-one"></span> -->
<span class="span-one"></span>
<span>选择企业</span>
</div>
<div
class="issue"
:class="{ nextStepIssue: activeTab == 2 }"
@click="selectTab(2)"
>
<span class="span-one"></span>
<!-- <span class="span-one"></span> -->
<span class="span-one"></span>
<span>草稿箱</span>
</div>
</div>
<!-- tabs-content -->
<div v-show="activeTab == 0">
<!-- <div v-show="activeTab == 0">
<tab1 ref="tabs1" @nextTab="selectTab" />
</div>
</div> -->
<div v-show="activeTab == 1">
<tab2 ref="tabs2" @nextTab="selectTab" />
</div>
@ -63,7 +65,7 @@
</template>
<script>
//tab
import tab1 from "./tab1.vue";
// import tab1 from "./tab1.vue";
import tab2 from "./tab2.vue";
import tab3 from "./tab3.vue";
@ -75,10 +77,11 @@ export default {
"entpr_color",
"major_hazard_level",
],
components: { tab1, tab2, tab3 },
// components: { tab1, tab2, tab3 },
components: { tab2, tab3 },
data() {
return {
activeTab: 0,
activeTab: 1,
dialogVisible: false,
};
},
@ -97,7 +100,7 @@ export default {
},
//
openDialog() {
this.activeTab = 0;
this.activeTab = 1;
this.dialogVisible = true;
},
//

Loading…
Cancel
Save