提交 d0b5bf0c 编写于 作者: huangwensu's avatar huangwensu

禁用启用可编辑

上级 8a7b997a
......@@ -65,6 +65,7 @@ export default {
if (isNotEmptyUtils(paramMap["token"])) {
vm.token = paramMap["token"]
localStorage.setItem('storageToken', vm.token)
vm.$router.push({ path: 'home' })
} else {
window.location.href = getLoginUrl() // 没有token返回登录页面
return
......
const getters = {
_token: state => state.common._token,
idType: state => state.common.idType
}
export default getters
import education from './education/getters'
const getters = {
_token: state => state.common._token,
idType: state => state.common.idType
}
import { containObject } from '../utils/utils'
export default getters
const getters = containObject(education)
export default getters
\ No newline at end of file
import Vue from 'vue'
import Vuex from 'vuex'
import common from './modules/common'
import common from './education/common'
import getters from './getters'
......
......@@ -202,6 +202,11 @@ html,body{
background: #449284 !important;
border: 1px solid #449284 !important;
}
.el-button.is-disabled {
background: #449284 !important;
border: 1px solid #449284 !important;
opacity: 0.5;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important;
}
......
......@@ -11,9 +11,6 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
// if(config.data && config.data.token) {
// localStorage.setItem('storageToken',config.data.token)
// }
config.headers['sysCode'] = 12
config.headers['token'] = localStorage.getItem('storageToken')
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
......
import axios from 'axios';
// 对象的合并
export const containObject = function(...obj1) {
let obj = Object.assign(...obj1)
return obj
}
//共通函数
Array.prototype.contains = function (obj) {
if (this.length > 0) {
......
......@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" v-if="scope.row.status == 1 || scope.row.status == 2" size="small" @click="editComponentList(scope.row)">编辑</el-button>
<el-button type="primary" size="small" @click="editComponentList(scope.row)">编辑</el-button>
<el-button type="primary" v-if="scope.row.status == 1 || scope.row.status == 2 || scope.row.status == 4" size="small" @click="enableAndDisable(scope.row,1)">启用</el-button>
<el-button type="primary" v-if="scope.row.status == 3" size="small" @click="enableAndDisable(scope.row,2)">禁用</el-button>
<el-button type="primary" v-if="scope.row.status == 1 || scope.row.status == 2" size="small" @click="deleteComponent(scope.row)">删除</el-button>
......
......@@ -22,7 +22,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { setTimeout } from 'timers';
import { setTimeout } from 'timers'
import { isNotEmptyUtils } from '../../utils/utils'
let vm = null
export default {
props: {
......@@ -36,7 +37,6 @@ export default {
},
data() {
return {
// authList: {},
items: [
{
title: '数据总览',
......@@ -80,43 +80,22 @@ export default {
},
created() {
vm = this
vm.authSelect()
},
methods: {
// 获取菜单数据
authSelect() {
vm.$nextTick(() => {
vm.getUserAuth()
})
// let req = {
// "token": vm.tokenValue,
// "system_type": "25"
// }
// vm.POST('portalComponent/menu/list',req).then((res) => {
// if( res.code == '000000') {
// vm.items = res.data.picapMenuModels
// vm.$nextTick(() => {
// vm.getUserAuth()
// })
// }
// })
},
// 获取用户权限
getUserAuth() {
if(vm.authList && vm.authList.length > 0) {
if(!vm.authList.P001) { // 项目管理
vm.items[1].subs[1].index = 'blank'
}
if(!vm.authList.P002) { // 组件管理
vm.items[1].subs[0].index = 'blank'
}
if(!vm.authList.P001) { // 角色管理
vm.items[2].subs[0].index = 'blank'
}
watch: {
authList(newVal, oldVal){
if(!newVal.P001) { // 项目管理
vm.items[1].subs[1].index = 'blank'
}
if(!newVal.P002) { // 组件管理
vm.items[1].subs[0].index = 'blank'
}
}
if(!newVal.P003) { // 角色管理
vm.items[2].subs[0].index = 'blank'
}
}
},
methods: {
}
}
</script>
......@@ -149,6 +128,9 @@ export default {
color: #fff;
background: #06232C;
}
.el-menu-item:focus, .el-menu-item:hover {
background: #06232C !important;
}
}
}
</style>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册