Commit b74de5ba authored by renjintao's avatar renjintao

listLength

parent 4627c6ac
......@@ -75,10 +75,7 @@ export default {
handleSuccess(tableData) {
//初始化数据
this.excelData = [];
this.excelDataBack = [];
this.columnsImport = [];
this.sheetNames = [];
this.pageType = undefined;
//处理colum和data
let tabColum = tableData.columns
let tabData = tableData.data
......@@ -96,7 +93,7 @@ export default {
})
this.columnsImport = tabColum;
this.excelData = arrData;
this.excelDataBack = arrData;
this.$emit("on-datalength", this.excelData.length)
},
//粘贴excel失败
handleError(tableData, errorIndex) {
......@@ -104,10 +101,7 @@ export default {
this.$Message.error("表格数据有误");
},
//粘贴excel相关end
l(key) {
key = "import_center" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
......
......@@ -10,7 +10,7 @@
<dictionary code="import.im.page" style="width:160px" @on-change="pageChange" v-model="pageType"></dictionary>
</FormItem>
<FormItem>
<div class="tip mr20">{{excelData.length}}条数据</div>
<div class="tip mr20">{{listLength}}条数据</div>
</FormItem>
<FormItem>
<Button type="primary" @click="openInfoModal" :disabled="btnIm">导入</Button>
......@@ -52,7 +52,7 @@
</div>
<div class="table-main" ref="main">
<Table :border="true" :columns="columnsImport" :data="excelData" :height="tdHeightExcel" ref="table" class="tableCommon" v-if="tableImport"></Table>
<component :is="detailExcel" ref="comExcel" />
<component :is="detailExcel" ref="comExcel" @on-datalength="datalength" />
</div>
<FooterToolbar v-if="sheetNames.length>1&&tableImport">
<Form inline>
......@@ -338,6 +338,7 @@ export default {
dataIm: [],
excelType: '0',
btnIm: true,
listLength: 0,
};
},
props: {
......@@ -395,6 +396,7 @@ export default {
dealOpenTable(val) {
this.excelData = this.openDatas[val].dataTable;
this.excelDataBack = this.openDatas[val].dataTable;
this.listLength = this.excelData.length
var tempCos = Object.keys(this.openDatas[val].dataTable[0]); //获取列表标题
this.columnsImport = [];
var headersNow = [];
......@@ -690,9 +692,13 @@ export default {
this.tableImport = true;
this.pageType = undefined
this.excelType = '0';
this.listLength = this.excelData.length;
}
},
datalength(val) {
this.listLength = val
},
l(key) {
key = "user" + "." + key;
return this.$t(key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment