Browse Source

项目附件列表展示不全调整

sangwenwei 8 months atrás
parent
commit
231859275c

+ 2 - 8
src/views/jy/project/OutInstanceForm.vue

@@ -310,11 +310,6 @@
 			OSSSerivce,
 		},
 		methods: {
-			expandAllRows() {
-				this.$nextTick(() => {
-					this.$refs.clientTable.expandAll();
-				});
-			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -382,9 +377,7 @@
 
 						this.projectInfoService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
-							this.$nextTick(() => {
-								this.$refs.clientTable.expandAll();
-							});
+							this.tableKey = Math.random()
 						})
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectOut', null, '附件', null, null, null)
@@ -414,6 +407,7 @@
 				}
 				this.$refs.inputForm.resetFields()
 				this.visible = false
+				this.tableData = []
 			},
 
 			//测试按钮

+ 2 - 8
src/views/jy/project/ProjectArchiveForm.vue

@@ -279,6 +279,7 @@
 				keyWatch: '',
 				tabName:'',
 				tableData: [],
+				tableKey :'1',
 				isBgs: false
 			}
 		},
@@ -332,11 +333,6 @@
 			OSSSerivce,
 		},
 		methods: {
-			expandAllRows() {
-				this.$nextTick(() => {
-					this.$refs.clientTable.expandAll();
-				});
-			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -412,9 +408,7 @@
 						})
 						this.projectInfoService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
-							this.$nextTick(() => {
-								this.$refs.clientTable.expandAll();
-							});
+							this.tableKey = Math.random()
 						})
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectArchive', null, '附件', null, null, null)

+ 2 - 10
src/views/jy/project/ProjectEiaForm.vue

@@ -121,8 +121,7 @@
 					:column-config="{resizable: true}"
 					:tree-config="{transform: true, expandAll: true}"
 					:key="tableKey"
-					:data="tableData"
-					@table-mounted="expandAllRows">
+					:data="tableData">
 					<vxe-column field="name" title="文件要求" width="260px" tree-node>
 						<template #default="scope">
 							<span style="font-weight: bold"
@@ -307,11 +306,6 @@
 			OSSSerivce,
 		},
 		methods: {
-			expandAllRows() {
-				this.$nextTick(() => {
-					this.$refs.clientTable.expandAll();
-				});
-			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -358,10 +352,8 @@
 					this.projectInfoService.findByIdEia(this.inputForm.id).then((data) => {
 						this.projectInfoService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
+							this.tableKey = Math.random()
 							console.log("getAttachmentList",this.tableData)
-							this.$nextTick(() => {
-								this.$refs.clientTable.expandAll();
-							});
 						})
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm.contractName=data.jyProjectList.contractName