From 1789ce3650a2665b5abca7a3028611190d1983df Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 14 十二月 2023 09:45:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/common/ztt-table.vue | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue index f0f12a8..64d8045 100644 --- a/src/views/common/ztt-table.vue +++ b/src/views/common/ztt-table.vue @@ -149,11 +149,7 @@ v-bind="$attrs" v-on="$listeners" :highlight-current-row="true" - :row-key=" - (row) => { - return row.id - } - " + :row-key="rowKey" @row-dblclick="dbClickRow" @row-contextmenu="contextMenu" @header-click="headClick" @@ -401,6 +397,7 @@ @size-change="sizeChangeHandle" :page-sizes="[10, 20, 50, 100]" :page-size="pagination.pageSize" + :page-count="pagination.size" :layout=" size ? 'total, prev, pager, next' @@ -507,11 +504,11 @@ > <i class="el-icon-upload"></i> <div class="el-upload__text"><em>鐐瑰嚮瀵煎叆鏁版嵁</em></div> - <div class="el-upload__tip" slot="tip"> + <div class="el-upload__tip" slot="tip" > 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;" - @click="downDataTemplate" + @click="downDataTemplate" v-if="uploadInfo.Download" >涓嬭浇妯℃澘</el-button > </div> @@ -563,6 +560,12 @@ name: 'TTable', components: { exSlot, advancedSearchDialog, zttdraggable }, props: { + rowKey: { + type: String, + default: ()=>{ + return 'id' + } + }, // 琛ㄦ牸鍨嬪彿锛歮ini,medium,small tableSize: { type: String, default: 'small' }, // 鏁版嵁璇锋眰鏂规硶 @@ -716,6 +719,7 @@ currentPage: this.table.currentPage == null ? 1 : this.table.currentPage, pageSize: this.table.pageSize == null ? 20 : this.table.pageSize, + size: this.table.size == null ? 7 : this.table.size, total: this.table.total == null ? 0 : this.table.total }, // 鍒嗛〉淇℃伅 inMemoryColWidth: {}, // 璁板繂涓垪瀹斤紝榛樿鍒楀 @@ -819,6 +823,7 @@ this.isCleanInfo = true } } + this.$emit("queryParam",this.queryParam) }, deep: true }, @@ -936,7 +941,8 @@ } }, getDataList(selectedId) { - this.dataListLoading = true + // this.dataListLoading = true + this.dataListLoading = false var criteria = {} criteria.dateTimeFilters = this.dateTimeFilters criteria.multiSearchFilter = this.multiSearchFilter @@ -959,7 +965,6 @@ arr.push(this.paramArr[i]) } } - this.dataListLoading = false return this.doCallback(this.ajaxFun, arr, selectedId) }, doCallback(fn, args, selectedId) { @@ -1000,6 +1005,7 @@ this.clickTable(selectObj) } } + this.$emit('change',resultData); }) .catch((error) => { this.dataListLoading = false @@ -1397,7 +1403,6 @@ } } } - console.log(this.multipleSelection) this.$emit('handleSelectionChange', this.multipleSelection) } else { this.multipleSelection = val @@ -1573,10 +1578,18 @@ if (response.code != '0') { this.$message.warning(response.msg) } else { + if(response.data!=""&&response.data!=[]&&response.data!=null){ + this.$message({ + message: response.data, + type: 'success' + }) + }else{ this.$message({ message: '涓婁紶鎴愬姛', type: 'success' }) + } + this.importDialogVisible=false this.getDataList() } this.$refs.uploadScan.clearFiles() -- Gitblit v1.9.3