Browse Source

详情关闭按钮重新打开按钮显示问题

intex_online20250327
张立 3 weeks ago
parent
commit
b000c384c2
  1. 10
      src/components/Detail/src/Detail.vue

10
src/components/Detail/src/Detail.vue

@ -227,6 +227,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { cloneDeep } from 'lodash-es'
const { wsCache } = useCache() const { wsCache } = useCache()
defineOptions({ name: 'Detail' }) defineOptions({ name: 'Detail' })
@ -898,6 +899,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
const buttondata = (row) => { const buttondata = (row) => {
let detailButtonEdit: any = [] let detailButtonEdit: any = []
let detailButtonDelete: any = [] let detailButtonDelete: any = []
let detailButtonButtondataTable: any = cloneDeep(buttondataTable.value)
if (props.detailButtonIsShowEdit) { if (props.detailButtonIsShowEdit) {
// //
detailButtonEdit = [ detailButtonEdit = [
@ -917,9 +919,9 @@ const buttondata = (row) => {
] ]
} }
if (props.buttondataTable.length > 0) { if (props.buttondataTable.length > 0) {
buttondataTable.value.forEach(item => { detailButtonButtondataTable.forEach(item => {
if (item.field) { if (item.field) {
item.hide = row[item.field] == '1' ? false : true item.hide = row[item.field]=='1'? false : true
} }
else { else {
item.hide = isShowMainButton(row,item.showStatus) item.hide = isShowMainButton(row,item.showStatus)
@ -929,7 +931,7 @@ const buttondata = (row) => {
return [ return [
...detailButtonEdit, ...detailButtonEdit,
...detailButtonDelete, ...detailButtonDelete,
...buttondataTable.value ...detailButtonButtondataTable
] ]
} }
const updateList =async ()=>{ const updateList =async ()=>{

Loading…
Cancel
Save