Commit ee0f552d by 李伟康

commit 调整新窗口顺序

1 parent d8893c14
...@@ -119,10 +119,8 @@ export default { ...@@ -119,10 +119,8 @@ export default {
let id = `${data.searchdate}_${data.phoneNumber}_${data.merchantNo}`, let id = `${data.searchdate}_${data.phoneNumber}_${data.merchantNo}`,
windowList = [...this.tab, ...this.dropdownList], windowList = [...this.tab, ...this.dropdownList],
windowItem = windowList.find((e) => e.id == id) windowItem = windowList.find((e) => e.id == id)
this.windowId = id if (windowItem) return this.windowId = id
if (windowItem) return if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
if (windowList.length == 20)
return this.$message.error("最多同时打开20个tabs")
let item = { let item = {
text: data.employeeName, text: data.employeeName,
data, data,
...@@ -133,6 +131,7 @@ export default { ...@@ -133,6 +131,7 @@ export default {
this.tab.push(item) this.tab.push(item)
this.checkEl() this.checkEl()
} }
this.windowId = id
}, },
close (index) { close (index) {
this.tab.splice(index, 1) this.tab.splice(index, 1)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!