拆分详情表格增加编辑

This commit is contained in:
caoyang
2022-04-05 19:32:38 +08:00
parent 29e4a3ac4a
commit 78ba4bde0e
10 changed files with 177 additions and 68 deletions
@@ -4,9 +4,9 @@
<a-table
class="table"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:row-selection="{ fixed: true, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: 600}"
:scroll="{x: true}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -20,6 +20,7 @@
<span class="content-show" href="javascript:;" @click="showContent">{{record.iterms_conditions&&record.iterms_conditions!=='null'?record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''}}</span>
</a-tooltip>
</span>
<span slot="operation" slot-scope="record" class="operate">
<a v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)">
@@ -28,6 +29,11 @@
</span>
</a>
</span>
<span slot="urlClick" slot-scope="text,record">
<a class="text" :title="text" @click="urlClick(text)">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
</a>
</span>
</a-table>
</div>
<div class="page" v-if="dataSource.length > 0">
@@ -156,8 +162,13 @@
customRender: 'showContent'
}
}
if (res.urlClick) {
this.columns[index].scopedSlots = {
customRender: 'urlClick'
}
}
})
// console.log('columns',this.columns)
let width = 0
if (this.OperationList.length > 0) {
for (let i = 0; i < this.OperationList.length; i++) {
@@ -173,7 +184,7 @@
scopedSlots: { customRender: 'operation' }
})
}
console.log('columns',this.columns)
}
})
},
@@ -183,7 +194,7 @@
this.getTableList()
},
getTableList() {
console.log('this.searchParmestable',this.searchParmes)
// console.log('this.searchParmestable',this.searchParmes)
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
let params = {
@@ -235,6 +246,9 @@
},
showContent(item, index) {
this.$emit('showContent', item)
},
urlClick(item) {
window.open(item)
}
}
}