This commit is contained in:
2022-07-05 11:04:15 +08:00
parent 89fc59b13f
commit ef93dbb864
4 changed files with 23 additions and 9 deletions

View File

@@ -96,6 +96,7 @@ export default {
let res = await maintOpeate(this.pkObj, type)
if (res.code === '1') {
this.toast(res.desc)
this._queryMaintenance(this.val1)
} else {
this.Dialog(res.desc)
}

View File

@@ -72,7 +72,11 @@ export default {
}
next()
},
activated () {},
activated () {
if (this.$route.query.prePage === 'MaintainResults') {
this._queryMaintenance(this.val1)
}
},
methods: {
handleChange1 (e, type) {
if (type) {
@@ -97,6 +101,7 @@ export default {
let res = await maintOpeate(this.pkObj, type)
if (res.code === '1') {
this.toast(res.desc)
this._queryMaintenance(this.val1)
} else {
this.Dialog(res.desc)
}
@@ -127,7 +132,8 @@ export default {
if (this.pkId) {
this.$store.dispatch('materObj', this.pkObj)
this.$router.push({
path: '/MaintainResults'
path: '/MaintainResults',
query: {prePage: 'MaintainExecution'}
})
}
}

View File

@@ -126,10 +126,10 @@ export default {
this.$store.dispatch('materObj', {})
this.$router.back()
},
getValue (p) {
getValue (id, val) {
this.dataList.map(el => {
if (el.repair_dtl_id === p[0]) {
el.isfinish = p[1]
if (el.repair_dtl_id === id) {
el.isfinish = val
}
})
}

View File

@@ -88,10 +88,10 @@ export default {
this.pkId = this.pkId === e.maint_dtl_id ? '' : e.maint_dtl_id
this.pkObj = this.pkId === e.maint_dtl_id ? e : {}
},
getValue (p) {
getValue (id, val) {
this.dataList.map(el => {
if (el.maint_dtl_id === p[0]) {
el.isfinish = p[1]
if (el.maint_dtl_id === id) {
el.isfinish = val
}
})
},
@@ -130,7 +130,14 @@ export default {
},
toCancle () {
this.$store.dispatch('materObj', {})
this.$router.back()
if (this.$route.query.prePage === 'MaintainExecution') {
this.$router.push({
path: '/MaintainExecution',
query: {prePage: 'MaintainResults'}
})
} else {
this.$router.back()
}
}
}
}