This commit is contained in:
ym1026
2025-09-12 16:51:32 +08:00
parent 52f016d3ea
commit bd55c0375a
9 changed files with 22 additions and 14 deletions

View File

@@ -7,16 +7,18 @@ const btnList = [
]
function getBtns(arr) {
const curPermission =
JSON.parse(localStorage.getItem('permission')).find(
(item) => item.route == this.$route.fullPath
) || {}
// console.log(this.$route, JSON.parse(localStorage.getItem('permission')), 'this.$route')
// const curPermission =
// JSON.parse(localStorage.getItem('permission')).find(
// (item) => item.route == '/' + this.$route.name
// ) || {}
// console.log(this.$route, curPermission, localStorage.getItem('permission'), 'curPermission')
const btns = []
// console.log(curPermission, 'curPermission')
btnList.forEach((item) => {
if (arr.includes(item.label)) {
// item.disabled = !Boolean(curPermission[item.disFlag])
// item.disabled = !Boolean(+curPermission[item.disFlag])
btns.push(item)
}
})

View File

@@ -133,7 +133,7 @@ export default {
// 删除操作
async handleDelete(id, callback) {
const that = this
Modal.confirm({
this.$Modal.confirm({
title: '你确认删除数据吗?',
icon: createVNode(ExclamationCircleOutlined),

View File

@@ -232,12 +232,11 @@ export default {
<style lang="scss" scoped>
.device {
height: 100%;
padding: 0 10px;
padding: 0 20px;
.content-table {
width: 100%;
height: calc(100% - 90px);
padding: 0 10px;
}
}
</style>

View File

@@ -58,6 +58,8 @@ export default {
props: {},
data() {
return {
tableData:[],
formModal: false,
formState: {},
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
@@ -145,7 +147,7 @@ export default {
// 删除操作
async handleDelete(id, callback) {
const that = this
Modal.confirm({
this.$Modal.confirm({
title: '你确认删除数据吗?',
icon: createVNode(ExclamationCircleOutlined),

View File

@@ -232,11 +232,10 @@ export default {
.policy {
// width: 100%;
height: 100%;
padding: 0 10px;
padding: 0 20px;
.content-table {
width: 100%;
height: calc(100% - 90px);
padding: 0 10px;
}
}
</style>

View File

@@ -67,6 +67,8 @@ export default {
props: {},
data() {
return {
tableData:[],
formModal: false,
formState: {},
formStatus: 'add', //表单状态辑状态 add:新增 edit:编辑
@@ -279,7 +281,7 @@ export default {
// 删除操作
async handleDelete(id, callback) {
const that = this
Modal.confirm({
this.$Modal.confirm({
title: '你确认删除数据吗?',
icon: createVNode(ExclamationCircleOutlined),

View File

@@ -58,6 +58,8 @@ export default {
props: {},
data() {
return {
tableData:[],
tableOption: {
select: false
},
@@ -184,7 +186,7 @@ export default {
// 删除操作
async handleDelete(id, callback) {
const that = this
Modal.confirm({
this.$Modal.confirm({
title: '你确认删除数据吗?',
icon: createVNode(ExclamationCircleOutlined),

View File

@@ -62,6 +62,7 @@ export default {
props: {},
data() {
return {
tableData:[],
tableOption: {
select: false
},
@@ -196,7 +197,7 @@ export default {
// 删除操作
async handleDelete(id, callback) {
const that = this
Modal.confirm({
this.$Modal.confirm({
title: '你确认删除数据吗?',
icon: createVNode(ExclamationCircleOutlined),

View File

@@ -54,6 +54,7 @@ export default {
props: {},
data() {
return {
tableData:[],
tableOption: {
select: false
},