This commit is contained in:
zhoumengru
2025-09-12 16:53:50 +08:00
9 changed files with 22 additions and 12 deletions

View File

@@ -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)
} }
}) })

View File

@@ -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),

View File

@@ -224,7 +224,7 @@ 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%;

View File

@@ -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),

View File

@@ -232,7 +232,7 @@ 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);

View File

@@ -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),

View File

@@ -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),

View File

@@ -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),

View File

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