bug修改
This commit is contained in:
@@ -222,12 +222,12 @@
|
||||
//删除
|
||||
deleteDetail(val){
|
||||
this.$confirm({
|
||||
content: '确认删除?',
|
||||
content: this.$t('confirmDeletion'),
|
||||
onOk() {
|
||||
deleteAction(``, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
if(this.tableData&&this.tableData.length==1){
|
||||
if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){
|
||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
}
|
||||
this.loadData()
|
||||
@@ -270,7 +270,19 @@
|
||||
},
|
||||
//回传至文档库
|
||||
backDocument(val){
|
||||
|
||||
this.$confirm({
|
||||
content: this.$t('backDocument'),
|
||||
onOk() {
|
||||
deleteAction(``, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//查看
|
||||
detail(val){
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-detail-table">
|
||||
<a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">
|
||||
<a-table bordered :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>
|
||||
<a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>
|
||||
@@ -110,18 +110,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<splitAddForm v-if="addVisible" :addVisible="addVisible" @closeVisible="closeVisible"></splitAddForm>
|
||||
<splitAddForm v-if="addVisible" :addVisible="addVisible" @closeVisible="closeVisible"></splitAddForm>
|
||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import upload from '@/components/uploadFile/file.vue'
|
||||
import splitAddForm from './splitAddForm'
|
||||
export default {
|
||||
name: 'splitDetail',
|
||||
components:{
|
||||
splitAddForm
|
||||
splitAddForm,
|
||||
upload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -170,7 +174,7 @@
|
||||
],
|
||||
}
|
||||
],
|
||||
selecIds:'',
|
||||
selecIds:[],
|
||||
loading:false,
|
||||
columns: [
|
||||
{
|
||||
@@ -213,7 +217,9 @@
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
addVisible:false
|
||||
addVisible:false,
|
||||
attId:'',
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -293,22 +299,22 @@
|
||||
}
|
||||
this.loadData()
|
||||
},
|
||||
//删除
|
||||
//复制按钮
|
||||
handleCopyManage(record){
|
||||
let params={
|
||||
id:record.id
|
||||
}
|
||||
this.$confirm({
|
||||
title: '确认删除?',
|
||||
title: this.$t('ConfirmReplication'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
deleteAction(``,params).then(res=> {
|
||||
if(res.success){
|
||||
this.$message.success(res.message)
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loadData()
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -324,7 +330,17 @@
|
||||
},
|
||||
//导入
|
||||
handleImportManage(){
|
||||
|
||||
this.$refs.uploadSplit.visible=true
|
||||
},
|
||||
//上传成功
|
||||
uploadSuccess(data){
|
||||
let attIdList = []
|
||||
if(data && data.length > 0){
|
||||
data.forEach(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
this.attId = attIdList.join(',')
|
||||
}
|
||||
},
|
||||
//导出
|
||||
handleExportManage(){
|
||||
@@ -332,7 +348,7 @@
|
||||
},
|
||||
//模板下载
|
||||
handleDownManage(){
|
||||
|
||||
// downloadFile('', fileName, { fileName: val.docRealName })
|
||||
},
|
||||
//合并条款
|
||||
handleMergeManage(){
|
||||
@@ -344,11 +360,32 @@
|
||||
},
|
||||
//批量删除
|
||||
handleBatCancel(){
|
||||
|
||||
let params={
|
||||
id:this.selecIds.join(',')
|
||||
}
|
||||
this.$confirm({
|
||||
title: this.$t('ConfirmBatchDeletion'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
deleteAction(``,params).then(res=> {
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
|
||||
this.queryParams.pageNo=this.queryParams.pageNo-1
|
||||
}
|
||||
this.loadData()
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
onEdit(val){
|
||||
|
||||
this.addVisible=true
|
||||
},
|
||||
//删除
|
||||
onCancel(val){
|
||||
@@ -357,13 +394,7 @@
|
||||
//选择框
|
||||
onSelectChange(selectedRowKeys,rows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
let ids=[]
|
||||
if(rows && rows.length>0){
|
||||
rows.forEach(item=>{
|
||||
ids.push(item.id)
|
||||
})
|
||||
}
|
||||
this.selecIds=ids.join(',')
|
||||
this.selecIds=selectedRowKeys
|
||||
},
|
||||
//点击页数
|
||||
onChangePage(page,pageSize){
|
||||
|
||||
Reference in New Issue
Block a user