Commit 5e178bdc authored by renjintao's avatar renjintao

imBtn

parent 3fb95eeb
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<DataGrid :tool="false" :page="false" :columns="colsIm" :data="dataIm" :height="tdHeightExcel+30" ref="dataImport"></DataGrid> <DataGrid :tool="false" :page="false" :columns="colsIm" :data="dataIm" :height="tdHeightExcel+30" ref="dataImport"></DataGrid>
<div slot="footer"> <div slot="footer">
<Button @click="infoModal=false">关闭</Button> <Button @click="infoModal=false">关闭</Button>
<Button type="primary" @click="importOk">确定导入</Button> <Button type="primary" @click="importOk" v-show="imBtn">确定导入</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -350,6 +350,7 @@ export default { ...@@ -350,6 +350,7 @@ export default {
listLength: 0, listLength: 0,
titleInfo: '', titleInfo: '',
noDataText: '暂无数据', noDataText: '暂无数据',
imBtn: true,
}; };
}, },
props: { props: {
...@@ -641,6 +642,7 @@ export default { ...@@ -641,6 +642,7 @@ export default {
//打开导入数据格式化后的窗口 //打开导入数据格式化后的窗口
openInfoModal() { openInfoModal() {
if (this.excelData.length > 0 && this.pageType != undefined) { if (this.excelData.length > 0 && this.pageType != undefined) {
this.imBtn = true;
switch (this.pageType) { switch (this.pageType) {
case 0: case 0:
this.loadColum(this.columns0); this.loadColum(this.columns0);
...@@ -657,6 +659,7 @@ export default { ...@@ -657,6 +659,7 @@ export default {
) + "】 模块" ) + "】 模块"
this.infoModal = true this.infoModal = true
} else { } else {
this.imBtn = true;
if (this.excelData.length == 0) { if (this.excelData.length == 0) {
this.$Message.error("表【" + this.sheetNames[this.tabVal] + "】没有可导入的数据!") this.$Message.error("表【" + this.sheetNames[this.tabVal] + "】没有可导入的数据!")
} else if (this.pageType == undefined) { } else if (this.pageType == undefined) {
...@@ -711,6 +714,7 @@ export default { ...@@ -711,6 +714,7 @@ export default {
Api.importUser(parms).then((res) => { Api.importUser(parms).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("成功批量导入用户管理成功模块 " + tempList.length + " 条数据"); this.$Message.success("成功批量导入用户管理成功模块 " + tempList.length + " 条数据");
this.imBtn = false;
this.cancelExcel(); this.cancelExcel();
} else { } else {
this.$Message.error("批量导入用户管理失败!"); this.$Message.error("批量导入用户管理失败!");
......
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