Commit c3e0e97a authored by 燕南天's avatar 燕南天

后台权限优化

parent 3b42857b
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- <el-table-column prop="isShopping" label="消费区间"></el-table-column> --> <!-- <el-table-column prop="isShopping" label="消费区间"></el-table-column> -->
<el-table-column label="是否展示"> <el-table-column label="是否展示" v-if="isAdmin==1">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
<el-switch <el-switch
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<!-- 审核 --> <!-- 审核 -->
<el-popover <el-popover
v-if="scope.row.isAuditing!=1" v-if="scope.row.isAuditing!=1&&isAdmin==1"
placement="top" placement="top"
width="160" width="160"
v-model="scope.row.delState1"> v-model="scope.row.delState1">
...@@ -450,7 +450,7 @@ import axios from 'axios'; ...@@ -450,7 +450,7 @@ import axios from 'axios';
import UpLoadImg from "@/components/UpLoadImg"; import UpLoadImg from "@/components/UpLoadImg";
import Tinymce from "@/components/Tinymce"; import Tinymce from "@/components/Tinymce";
import ViewPage from "./components/ViewPage"; import ViewPage from "./components/ViewPage";
import * as cookie from '@/utils/auth'
import * as Utils from "../../utils/index.js"; import * as Utils from "../../utils/index.js";
import * as store from "../../api/store"; import * as store from "../../api/store";
import * as common from "../../api/common"; import * as common from "../../api/common";
...@@ -532,14 +532,24 @@ export default { ...@@ -532,14 +532,24 @@ export default {
// 全选的id // 全选的id
tableItemIDS:'', tableItemIDS:'',
// 登陆角色
isAdmin:'0'
}; };
}, },
beforeMount() { beforeMount() {
this.isAdmin = this.getCookAdminType()
this.getList(); this.getList();
}, },
mounted() {}, mounted() {},
methods: { methods: {
// 登陆角色
getCookAdminType(){
let adminType = cookie.getUserInfro()
return JSON.parse(adminType).isAdmin
},
seachFun() { seachFun() {
this.$seach this.$seach
.submmit(this, store.storeList) .submmit(this, store.storeList)
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<!-- 审核 --> <!-- 审核 -->
<el-popover <el-popover
v-if="scope.row.isAuditing!=1" v-if="scope.row.isAuditing!=1&&isAdmin==1"
placement="top" placement="top"
width="160" width="160"
v-model="scope.row.delState1"> v-model="scope.row.delState1">
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
import UpLoadImg from "@/components/UpLoadImg"; import UpLoadImg from "@/components/UpLoadImg";
import Tinymce from "@/components/Tinymce"; import Tinymce from "@/components/Tinymce";
import ViewPage from "./components/ViewPage"; import ViewPage from "./components/ViewPage";
import * as cookie from '@/utils/auth'
import * as Utils from "../../utils/index.js"; import * as Utils from "../../utils/index.js";
import * as worker from "../../api/worker"; import * as worker from "../../api/worker";
import * as common from "../../api/common"; import * as common from "../../api/common";
...@@ -452,13 +452,15 @@ export default { ...@@ -452,13 +452,15 @@ export default {
tableItemIDS:'' tableItemIDS:'',
isAdmin:'0'
}; };
}, },
beforeMount() { beforeMount() {
this.isAdmin = this.getCookAdminType()
worker.getStores().then(res=>{ worker.getStores().then(res=>{
this.ownStoreData = res.data.data this.ownStoreData = res.data.data
this.getList(); this.getList();
...@@ -467,6 +469,10 @@ export default { ...@@ -467,6 +469,10 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
getCookAdminType(){
let adminType = cookie.getUserInfro()
return JSON.parse(adminType).isAdmin
},
seachFun() { seachFun() {
this.$seach this.$seach
.submmit(this, worker.workerList) .submmit(this, worker.workerList)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment