This commit is contained in:
2021-04-09 22:40:07 +00:00
parent a4d1e93a81
commit 457c6dfe1c
2 changed files with 12 additions and 2 deletions

View File

@@ -90,6 +90,12 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
export default { export default {
created() {
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
this.selectedRow = [{ index: 0 }];
this.activeItemIndex = 0;
}
},
data() { data() {
return { return {
activeItemIndex: null, activeItemIndex: null,

View File

@@ -101,6 +101,12 @@ export default {
components: { components: {
GzWoItemScheduledUsers GzWoItemScheduledUsers
}, },
created() {
if (this.value.items.length == 1) {
this.selectedRow = [{ index: 0 }];
this.activeItemIndex = 0;
}
},
data() { data() {
return { return {
activeItemIndex: null, activeItemIndex: null,
@@ -117,7 +123,6 @@ export default {
type: Object type: Object
} }
}, },
methods: { methods: {
newItem() { newItem() {
let newIndex = this.value.items.length; let newIndex = this.value.items.length;
@@ -177,7 +182,6 @@ export default {
this.activeItemIndex = item.index; this.activeItemIndex = item.index;
this.selectedRow = [{ index: item.index }]; this.selectedRow = [{ index: item.index }];
}, },
form() { form() {
return window.$gz.form; return window.$gz.form;
}, },