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

工作中心默认选第一个

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