mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
报错
This commit is contained in:
@@ -7,16 +7,18 @@ const btnList = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
function getBtns(arr) {
|
function getBtns(arr) {
|
||||||
const curPermission =
|
// console.log(this.$route, JSON.parse(localStorage.getItem('permission')), 'this.$route')
|
||||||
JSON.parse(localStorage.getItem('permission')).find(
|
// const curPermission =
|
||||||
(item) => item.route == this.$route.fullPath
|
// JSON.parse(localStorage.getItem('permission')).find(
|
||||||
) || {}
|
// (item) => item.route == '/' + this.$route.name
|
||||||
|
// ) || {}
|
||||||
|
|
||||||
// console.log(this.$route, curPermission, localStorage.getItem('permission'), 'curPermission')
|
// console.log(this.$route, curPermission, localStorage.getItem('permission'), 'curPermission')
|
||||||
const btns = []
|
const btns = []
|
||||||
|
// console.log(curPermission, 'curPermission')
|
||||||
btnList.forEach((item) => {
|
btnList.forEach((item) => {
|
||||||
if (arr.includes(item.label)) {
|
if (arr.includes(item.label)) {
|
||||||
// item.disabled = !Boolean(curPermission[item.disFlag])
|
// item.disabled = !Boolean(+curPermission[item.disFlag])
|
||||||
btns.push(item)
|
btns.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
// 删除操作
|
// 删除操作
|
||||||
async handleDelete(id, callback) {
|
async handleDelete(id, callback) {
|
||||||
const that = this
|
const that = this
|
||||||
Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: '你确认删除数据吗?',
|
title: '你确认删除数据吗?',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
|
||||||
|
|||||||
@@ -232,12 +232,11 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.device {
|
.device {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 10px;
|
padding: 0 20px;
|
||||||
|
|
||||||
.content-table {
|
.content-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 90px);
|
height: calc(100% - 90px);
|
||||||
padding: 0 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData:[],
|
||||||
|
|
||||||
formModal: false,
|
formModal: false,
|
||||||
formState: {},
|
formState: {},
|
||||||
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
|
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
|
||||||
@@ -145,7 +147,7 @@ export default {
|
|||||||
// 删除操作
|
// 删除操作
|
||||||
async handleDelete(id, callback) {
|
async handleDelete(id, callback) {
|
||||||
const that = this
|
const that = this
|
||||||
Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: '你确认删除数据吗?',
|
title: '你确认删除数据吗?',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
|
||||||
|
|||||||
@@ -232,11 +232,10 @@ export default {
|
|||||||
.policy {
|
.policy {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 10px;
|
padding: 0 20px;
|
||||||
.content-table {
|
.content-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 90px);
|
height: calc(100% - 90px);
|
||||||
padding: 0 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData:[],
|
||||||
|
|
||||||
formModal: false,
|
formModal: false,
|
||||||
formState: {},
|
formState: {},
|
||||||
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
|
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
|
||||||
@@ -279,7 +281,7 @@ export default {
|
|||||||
// 删除操作
|
// 删除操作
|
||||||
async handleDelete(id, callback) {
|
async handleDelete(id, callback) {
|
||||||
const that = this
|
const that = this
|
||||||
Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: '你确认删除数据吗?',
|
title: '你确认删除数据吗?',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData:[],
|
||||||
|
|
||||||
tableOption: {
|
tableOption: {
|
||||||
select: false
|
select: false
|
||||||
},
|
},
|
||||||
@@ -184,7 +186,7 @@ export default {
|
|||||||
// 删除操作
|
// 删除操作
|
||||||
async handleDelete(id, callback) {
|
async handleDelete(id, callback) {
|
||||||
const that = this
|
const that = this
|
||||||
Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: '你确认删除数据吗?',
|
title: '你确认删除数据吗?',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData:[],
|
||||||
tableOption: {
|
tableOption: {
|
||||||
select: false
|
select: false
|
||||||
},
|
},
|
||||||
@@ -196,7 +197,7 @@ export default {
|
|||||||
// 删除操作
|
// 删除操作
|
||||||
async handleDelete(id, callback) {
|
async handleDelete(id, callback) {
|
||||||
const that = this
|
const that = this
|
||||||
Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: '你确认删除数据吗?',
|
title: '你确认删除数据吗?',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData:[],
|
||||||
tableOption: {
|
tableOption: {
|
||||||
select: false
|
select: false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user