|
@@ -36,7 +36,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="buttonArrow">
|
|
<div class="buttonArrow">
|
|
|
- <div :class="sumbitSubList.filter(item => item.daAn !== '').length!==sumbitSubList.length?'btn':'btn btnColor'" @click="sumbitChange()">提交</div>
|
|
|
|
|
|
|
+ <div :class="sumbitSubList.filter(item => item.daAn !== '').length!==sumbitSubList.length || submitBtn?'btn':'btn btnColor'" @click="sumbitChange()">提交</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -51,6 +51,10 @@ export default {
|
|
|
type: Number,
|
|
type: Number,
|
|
|
default: 0
|
|
default: 0
|
|
|
},
|
|
},
|
|
|
|
|
+ objTypeName: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: ''
|
|
|
|
|
+ },
|
|
|
infoData: {
|
|
infoData: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: function() { return [] }
|
|
default: function() { return [] }
|
|
@@ -66,7 +70,8 @@ export default {
|
|
|
sumbitMaster: {},
|
|
sumbitMaster: {},
|
|
|
sumbitSubList: [],
|
|
sumbitSubList: [],
|
|
|
scheduleNum: 0,
|
|
scheduleNum: 0,
|
|
|
- jinRuShiJian: this.$common.getDateNow(19)
|
|
|
|
|
|
|
+ jinRuShiJian: this.$common.getDateNow(19),
|
|
|
|
|
+ submitBtn: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -86,7 +91,7 @@ export default {
|
|
|
createTime: this.jinRuShiJian,
|
|
createTime: this.jinRuShiJian,
|
|
|
// dataStatus: 'string',
|
|
// dataStatus: 'string',
|
|
|
// delBeforeSave: true,
|
|
// delBeforeSave: true,
|
|
|
- diaoChaDuiXian: this.infoDataEdit[0].diao_cha_dui_xian,
|
|
|
|
|
|
|
+ diaoChaDuiXian: this.objTypeName,
|
|
|
diaoChaMingChe: this.infoDataEdit[0].dc_name,
|
|
diaoChaMingChe: this.infoDataEdit[0].dc_name,
|
|
|
// dsAlias: '',
|
|
// dsAlias: '',
|
|
|
faQiShiJian: this.jinRuShiJian,
|
|
faQiShiJian: this.jinRuShiJian,
|
|
@@ -130,12 +135,12 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
const toast = Toast({
|
|
const toast = Toast({
|
|
|
- duration: 3000, // 持续展示 toast
|
|
|
|
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
message: '无数据,请重新扫码,或联系相关人员!'
|
|
message: '无数据,请重新扫码,或联系相关人员!'
|
|
|
})
|
|
})
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.$router.push({ name: 'dashboard' })
|
|
this.$router.push({ name: 'dashboard' })
|
|
|
- }, 3000)
|
|
|
|
|
|
|
+ }, 2000)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -143,7 +148,8 @@ export default {
|
|
|
this.changeIndex = i
|
|
this.changeIndex = i
|
|
|
},
|
|
},
|
|
|
sumbitChange() {
|
|
sumbitChange() {
|
|
|
- if (this.sumbitSubList.filter(item => item.daAn !== '').length === this.sumbitSubList.length) {
|
|
|
|
|
|
|
+ if (this.sumbitSubList.filter(item => item.daAn !== '').length === this.sumbitSubList.length && !this.submitBtn) {
|
|
|
|
|
+ this.submitBtn = true
|
|
|
const obj = []
|
|
const obj = []
|
|
|
this.sumbitSubList.forEach((e, i) => {
|
|
this.sumbitSubList.forEach((e, i) => {
|
|
|
// eslint-disable-next-line no-undef
|
|
// eslint-disable-next-line no-undef
|
|
@@ -153,24 +159,36 @@ export default {
|
|
|
this.sumbitMaster.satisfactionDetailPoList = obj
|
|
this.sumbitMaster.satisfactionDetailPoList = obj
|
|
|
this.sumbitMaster.tiJiaoShiJian = this.$common.getDateNow(16)
|
|
this.sumbitMaster.tiJiaoShiJian = this.$common.getDateNow(16)
|
|
|
this.sumbitMaster.shiFouGuoShen = '已完成'
|
|
this.sumbitMaster.shiFouGuoShen = '已完成'
|
|
|
- console.log(this.sumbitMaster, 'this.sumbitMasterthis.sumbitMaster')
|
|
|
|
|
save(
|
|
save(
|
|
|
this.sumbitMaster
|
|
this.sumbitMaster
|
|
|
).then((res) => {
|
|
).then((res) => {
|
|
|
localStorage.setItem(this.codeId, '已完成')
|
|
localStorage.setItem(this.codeId, '已完成')
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
const toast = Toast({
|
|
const toast = Toast({
|
|
|
- duration: 3000, // 持续展示 toast
|
|
|
|
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
message: '已提交成功!'
|
|
message: '已提交成功!'
|
|
|
})
|
|
})
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.$router.push({ name: 'dashboard' })
|
|
this.$router.push({ name: 'dashboard' })
|
|
|
- }, 3000)
|
|
|
|
|
|
|
+ }, 2000)
|
|
|
|
|
+ }).catch((e) => {
|
|
|
|
|
+ // eslint-disable-next-line no-unused-vars
|
|
|
|
|
+ const toast = Toast({
|
|
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
|
|
+ message: '提交失败,请重新提交!'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.submitBtn = false
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (this.submitBtn) {
|
|
|
|
|
+ // eslint-disable-next-line no-unused-vars
|
|
|
|
|
+ const toast = Toast({
|
|
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
|
|
+ message: '请勿重复点击!'
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
const toast = Toast({
|
|
const toast = Toast({
|
|
|
- duration: 3000, // 持续展示 toast
|
|
|
|
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
message: '有未填写的问题,请检查!'
|
|
message: '有未填写的问题,请检查!'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|