Commit 5d7434f3 authored by 沈翠玲's avatar 沈翠玲

工作中心默认选第一个

parent 34888448
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
data() { data() {
return { return {
tabIndex: 'PRO', tabIndex: 'PRO',
showWorkstationFlag: true, showWorkstationFlag: false,
showPrintFlag: false, showPrintFlag: false,
showLogoutMenu: false, showLogoutMenu: false,
activeProcess: null, activeProcess: null,
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
currentFlag: 0 currentFlag: 0
}; };
}, },
created() { async created() {
this.createSocket(); this.createSocket();
uni.$on('switchTab', (indexCode) => { uni.$on('switchTab', (indexCode) => {
this.tabIndex = indexCode; this.tabIndex = indexCode;
...@@ -145,8 +145,9 @@ export default { ...@@ -145,8 +145,9 @@ export default {
this.handleCommand('workunit'); this.handleCommand('workunit');
}); });
this.checkWorkstation(); // this.checkWorkstation();
this.getWorkUnitList(); await this.getWorkUnitList();
this.setWorkUnit(this.workUnitList[0])
}, },
destroyed() { destroyed() {
uni.$off('switchTab'); uni.$off('switchTab');
...@@ -200,8 +201,8 @@ export default { ...@@ -200,8 +201,8 @@ export default {
} }
}); });
}, },
getWorkUnitList(item) { async getWorkUnitList(item) {
this.$u.api.getWorkUnitList({}).then((res) => { await this.$u.api.getWorkUnitList({}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.workUnitList = res.rows; this.workUnitList = res.rows;
} else { } else {
......
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