[update] 修改bug80276

This commit is contained in:
lideqin
2024-01-12 11:46:56 +08:00
parent 46be7892ad
commit 92482c305f
11 changed files with 323 additions and 62 deletions
@@ -7,11 +7,12 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => {return index}"
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
<!-- 修改前 -->
<template v-slot:beforeUpdate="{text, record}">
@@ -57,6 +58,18 @@ export default {
},
data () {
return {
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -145,6 +158,9 @@ export default {
data.dataSource = this.dataSource
return data
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 修改前按钮点击
beforeUpdateClick (record) {
this.$refs.textContentModal.open(record.beforeUpdate)
@@ -30,11 +30,12 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => { return index }"
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
<!-- 修改前 -->
<template v-slot:beforeUpdate="{text, record}">
@@ -268,6 +269,18 @@ export default {
},
data () {
return {
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -509,6 +522,9 @@ export default {
processNameChange (value) {
this.$emit('processNameChange', value)
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 新增修改单
handleAdd () {
// 不知道左侧要预览哪个文件
@@ -521,11 +537,19 @@ export default {
// 不知道左侧要预览哪个文件
const file = ''
this.$refs.updateListModal.title = this.$t('edit')
this.$refs.updateListModal.edit(file, record, index)
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.$refs.updateListModal.edit(file, record, dataIndex)
},
// 修改单的删除
handleDelete (index) {
this.dataSource.splice(index, 1)
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.dataSource.splice(dataIndex, 1)
}
})
},
// 修改单新增编辑完成
modalFormOk (value, index) {